Re: x86: Executing a raw vmlinux image (embedded environment)

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

 



>       /vmlinux                                        2,629,659  bytes
>       /vmlinux.o                                      2,889,050  bytes
>       /arch/i386/boot/bzImage                         1,104,864  bytes
>       /arch/x86/boot/bzImage                          1,104,864  bytes
>       /arch/x86/boot/vmlinux.bin                      1,092,060  bytes
>       /arch/x86/boot/compressed/vmlinux               1,099,538  bytes
>       /arch/x86/boot/compressed/vmlinux.bin           2,094,132  bytes
>       /arch/x86/boot/compressed/vmlinux.bin.gz        1,074,711  bytes
>
> I understand that /arch/x86/boot/compressed/vmlinux.bin.gz is a compressed
> version of /arch/x86/boot/compressed/vmlinux.bin, and
> /arch/i386/boot/bzImage and /arch/x86/boot/bzImage are the same file and
> that it is the 16-bit boot code + /arch/x86/boot/compressed/vmlinux.bin.gz
This is correct.
> but I don't understand the rest...

>
> My guess is that /vmlinux.o is the ELF image generated by the compiler +
> linker stage and /vmlinux may be /vmlinux.o objdump'd into a raw binary and
> perhaps /arch/x86/boot/vmlinux.bin is a further stripped version
> of/vmlinux, but I'm at a loss with /arch/x86/boot/compressed/vmlinux

vmlinux is ELF image with ELF header. So actual point of kernel entry
would be at an offset, somewhere after the ELF header.
vmlinux.bin is what you would get after doing
#objcopy -O binary vmlinux vmlinux.bin.
vmlinux.bin has only obj code and nothing else.
>
> In any event, it looks like either /arch/x86/boot/compressed/vmlinux.bin or
> /vmlinux is what I need to copy into RAM @ 0x100000 (1MiB) which is where
> my non-relocatable kernel is compiled to.

copy vmlinux.bin.

>  - How to setup the memory map (keeping in mind I have 2GB of contiguous
>   memory with no BIOS/ACPI etc to worry about clobbering
>  - Any other tricks I need to be aware of..
Check if x86 kernel expects some parameters(like machineid, bootargs
location etc) in some registers.
Check if x86 has low level debug support(like DEBUG_LL).
Also you might want to check how initial page tables are being setup in kernel.

-syed

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux