Loader forth changes for customization
Teske, Devin
Devin.Teske at fisglobal.com
Thu Nov 14 16:08:57 UTC 2013
On Nov 14, 2013, at 12:36 AM, <rank1seeker at gmail.com> wrote:
>>> Um,
>>>
>>> Little of thread, but could you rewrite loader in just 1 task?
>>> That is, once it has been pulled by STAGE 2 boot, ALL loader's path
> should be RELATIVE to loader itself, instead currently using full path
> approach (/boot/...)
>>>
>>> I.e;
>>> Line: (from: '/sys/boot/common/interp.c')
>>> include("/boot/boot.conf");
>>> into:
>>> include("boot.conf");
>>> and so on ...
>>>
>>> Thanks.
>>>
>>
>> Is that true for the Forth layer? I didn't think there was a relative
> path.
>> Just tested on 9.2-R loader(8):
>>
>> Contents of /boot/loader.rc.local:
>> echo "Hello, World!"
>>
>> At loader(8) prompt:
>> OK include /boot/loader.rc.local
>> Hello, World!
>> OK include loader.rc.local
>> can't open 'loader.rc.local': no such file or directory
>>
>> --
>> Devin
>
>
> No no. Loader's prompt, where you type CMD's ... is out of context.
> Normal loader's boot sequence should work with paths relative to loader
> binary itself.
> I.e; Upon boot it would pull 'defaults/loader.conf' as it is relative to
> it, instead via current full path '/boot/defaults/loader.conf'
>
So I tried... changing a path in /boot/loader.rc
E.g., in my patchset, I changed...
try-include /boot/loader.rc.local
To instead:
try-incude loader.rc.local
The result is that the file is no longer included.
> This isn't a current behaviour, but something that should be done.
>
I'm finding that currently all paths in the Forth layer must be
absolute paths.
I just don't see how relative paths could work in Forth.
There's no "cd" command, to start with (what would dictate
the current working directory?? -- but more importantly,
would "include" actually adhere to it?)
--
Devin
_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
More information about the freebsd-hackers
mailing list