DragonFly users List (threaded) for 2008-08
DragonFly BSD
DragonFly users List (threaded) for 2008-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [GSoC] beastie.4th problem


From: Patrick Georgi <patrick.georgi@xxxxxxxxxxxxxx>
Date: Tue, 19 Aug 2008 11:24:22 +0200

Louisa Luciani schrieb:
> +        dup bootsmpkey @ = if
> +            s" /kernel.smp/modules" s" module_path" setenv
> +            s" /kernel.smp/kernel" boot
> +        then
> +        dup bootsmpnoapickey @ = if
> +            s" /kernel.smp/modules" s" module_path" setenv
> +            0 s" /kernel.smp/kernel.noapic" boot
> +        then
what works for me is:

0 1 unload drop
s" kernel.foo" s" kernel" setenv
1 boot

seems like the "kernel" variable can only be changed if the kernel is
unloaded, hence the "unload" directive. boot automatically loads the
kernel based on that variable if no kernel is loaded already.

I'm not sure if the constants in front of "unload" are strictly
necessary, I merely copied that line from somewhere else.

What you were definitely missing was the "interpreted or not" flag on
the top-of-stack when entering boot: the first line of boot starts with
	0= if ( interpreted ) .... then

The comment thankfully gives a hint what is tested here. The point is,
you ran boot with the following stack layout: (addr/len is what s" returns)
	address-of-string length-of-string
where boot expects (unfortunately that isn't documented, so that's
reconstructed from the code):
	addr1 len1 .. addrN lenN N interpreted-flag
with N the number of addr/len pairs.

If addrN/lenN points to a string that doesn't start with "-", it's
considered a path (to kernel and modules, or filename of the kernel, so
the following might work, too - warning: untested!):
	s" /kernel.smp/kernel.noapic" 1 1 boot


Regards,
Patrick Georgi



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]