At 21:39 20/01/2008, you wrote:

Hello

  I am trying to hack in some symlink support into the [sys/boot/i386/]boot2
bootloader (for my project [1]) and I seem to fall short of about 69 bytes:

as  -o boot2.o boot2.s
ld -static -N --gc-sections -nostdlib -Ttext 0x2000 -o
boot2.out/build/obj/build/src/sys/boot/i386/boot2/../btx/lib/crt0.o
boot2.o sio.o
objcopy -S -O binary boot2.out boot2.bin
btxld -v -E 0x2000 -f bin -b
/build/obj/build/src/sys/boot/i386/boot2/../btx/btx/btx -l boot2.ldr  -o
boot2.ld -P 1 boot2.bin
kernel: ver=1.01 size=7b0 load=9000 entry=9010 map=16M pgctl=1:1
client: fmt=bin size=1581 text=0 data=0 bss=0 entry=0
output: fmt=bin size=1e45 text=114 data=1d31 org=0 entry=0
-69 bytes available
*** Error code 1

  What can I do to get room for about 70-100 bytes for these changes to make
it into the bootloader ?

[1] I'm trying to get support for /boot being mounted as a separate FS and
as such I would need to have a "self-pointing" symlink (e.g. "boot -> ." )
to easily mask the fact that the boot stuff is now right in the root of that
FS. Fortunately the FORTH loader does support symlinks and I do not get
problems with it. I know that I can use /boot.kernel as a workaround, but
that is not too elegant.

How big is boot2? You can compress it with an arithmetic coder, and only put the decoder plus the compressed boot2. There are very tiny arith coders, in assm, with 100-120 bytes of code (even less).


----------------------------------------------------------------------------------------------------------------
One reason that life is complex is that it has a real part and an imaginary part -Andrew Koenig
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to