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

Re: [microblaze-uclinux] microblaze: Fix compiled-in rootfs



> And I checked it in petalinux and there is one other secret step which add romfs.img to __init_end.
> The main thing is that image.bin is not generated from image.elf which is the same for me too
> but it is just cat command below which takes romfs at the end of linux.bin which should be __init_end.
>
> cat linux.bin romfs.img > image.bin
> (vendor/PetaLogix/common/common.mak: line 403)
>
> Anyway in pre MMU version was .init.ramfs section aligned with the same boundary as bss section.
> This mean that symbols __init_end and __bss_start was the same.
>
> If you look at arch/microblaze/kernel/vmlinux.lds.S you can see there that comment.
>
> 167: /* FIXME this can break initramfs for MMU */
> 168: /*         . = ALIGN(4096);*//* Pad init.ramfs up to page boundary, so
> 169:                             that __init_end == __bss_start.  This will
> 170:                             make image.elf consistent with the image.bin */
>
> From petalinux side we have got inconsistence between image.elf and linux.bin which were caused my
> mmu merge to petalinux. That's why for you (Steve) work __init_end instead of __bss_start.

exactly correct.

image.bin comes from linux.bin + romfs.img, not vmlinux+romfs -> objcopy

> There are some solution how to solve it.
> 1. Check both location __init_end first

You mean, check __init_end *only*?

> 2. in petalinux generate image.bin from image.elf and remove that cat command from common.mak
>
> IMHO we should use the first version. I paste patch for it below + part of log for both cases.

Somehow it still feels a bit risky.  It assumes that .init is always
last part of laoded kernel image (before BSS).  Maybe that is OK.
There is equavalent assumption for using ROMFS at SBSS anyway I
suppose.

Steve, does Michal's latest patch work for you?

John

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/