Ollie Lho wrote:
> Eric W. Biederman wrote:
>
>>> We found that the elfImage generated by mkelfImage can not be loaded
>>> by Etherboot (with -DELF_IMAGE). We have to use mkelf-linux form mknbi
>>> to generate a Etherboot bootable ELF image. We also found that with
>>> -DMULTIBOOT, nothing boots. Can you give me more explaination on these
>>> stuff ??
>>>
>>
>> O.k. The quick answer is that mknbi assumes you have a BIOS and will
>> set the kernel up to do 16 bit BIOS calls before booting. That will
>> not work
>> under linuxbios. The multiboot specifcation passes on things like
>> memory size
>> and mkelfImage can use that information instead of trying 16bit queries.
>>
>> I am 90% certain that what you are seeing is the cpu tripple faulting
>> and rebooting when the mknbi ELF kernel attempts 16 bit BIOS calls.
>>
>> Attached is my configuration for etherboot for use with linuxbios.
>> Just in case the version of mkelfImage in CVS is bad please look at:
>> ftp://download.lnxi.com/pub/src/mkelfImage.
>> Every version I have should be up there..
>
>
>
> With your Config.etherboot and MkelfImage in LinuxBIOS tree, I still got
> error message like:
>
>
> Loading 172.19.209.106:/tftpboot/kernel ..(ELF)... segment exceeding memory
> Unable to load file.
> <sleep>
> <abort>
>
>
> It seems that ube.c does not pass the correct totalmem. How can I solve
> this problem ??
>
> Ollie
>
>
O.K. I got everything working ;-). For some reason, the mkelfImage-1.6
in LinuxBIOS tree addes a .ramdisk section which exceeds the totalmem.
ollie mkelfImage-1.6 341:objdump -h elfImage
elfImage: file format elf32-i386
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000795 00010000 00010000 00001000 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .rodata 000000ab 00010795 00010795 00001795 2**5
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .data 0000000c 00010840 00010840 00001840 2**2
CONTENTS, ALLOC, LOAD, DATA
3 .bss 00004014 0001084c 0001084c 0000184c 2**5
ALLOC
4 .nokill 0000002c 00091000 00091000 00002000 2**0
CONTENTS, ALLOC, LOAD, CODE
5 .kernel 0014a660 00100000 00100000 00003000 2**0
CONTENTS, ALLOC, LOAD, DATA
6 .ramdisk 00000000 04000000 04000000 0014e000 2**0
CONTENTS, ALLOC, LOAD, DATA
7 .comment 0000003d 00000000 00000000 0014e000 2**0
CONTENTS, READONLY
8 .note 00000014 00014860 00014860 0014e03d 2**0
CONTENTS, READONLY
By removing unneceressary sections with
ollie mkelfImage-1.6 344:strip -R .comment -R .note -R .ramdisk elfImage
I got
ollie mkelfImage-1.6 345:objdump -h elfImage
elfImage: file format elf32-i386
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000795 00010000 00010000 00001000 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .rodata 000000ab 00010795 00010795 00001795 2**5
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .data 0000000c 00010840 00010840 00001840 2**2
CONTENTS, ALLOC, LOAD, DATA
3 .bss 00004014 0001084c 0001084c 0000184c 2**5
ALLOC
4 .nokill 0000002c 00091000 00091000 00002000 2**0
CONTENTS, ALLOC, LOAD, CODE
5 .kernel 0014a660 00100000 00100000 00003000 2**0
CONTENTS, ALLOC, LOAD, DATA
This Image boots without any problem !!!!
Ollie