[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] Re: [PATCH] microblaze: Cleanup compiled-in rootfs in BSS section
On Tue, May 19, 2009 at 8:55 AM, Michal Simek <monstr@xxxxxxxxx> wrote:
> This patch is based on patch from Steve Magnani.
>
> There were bug for compiled-in rootfs. We have to move
> moving rootfs which is in BSS section to _ebss section
> which is at the end of kernel and then clear bss section
> not vice-versa.
Could be expressed a lttle better :)
How about
If the rootfs is compiled into the kernel, it will be at _sbss. We
must move it to
_ebss before clearing the BSS segment, not after.
> + /* Move ROMFS out of BSS before clearing it */
> + romfs_base = (ram ? ram : (unsigned int)&__bss_start);
> + /* if CONFIG_MTD_UCLINUX_EBSS is defined, assume ROMFS is at the
> + * end of kernel, which is ROMFS_LOCATION defined above.
> + */
I don't understand this comment. What is the difference between
CONFIG_MTD_UCLINUX_EBSS and the CONFIG_MTD_UCLINUX that this code is
conditional on?
> + romfs_size = PAGE_ALIGN(get_romfs_len((unsigned *)romfs_base));
> + if (romfs_size > 0) {
> + memmove(&_ebss, (int *)romfs_base, romfs_size);
> + klimit += PAGE_ALIGN(romfs_size);
Second PAGE_ALIGN is not required, it was already done in assignment
to romfs_size above.
> diff --git a/arch/microblaze/platform/generic/system.dts b/arch/microblaze/platform/generic/system.dts
> index 29993f6..9c486e7 100644
> --- a/arch/microblaze/platform/generic/system.dts
> +++ b/arch/microblaze/platform/generic/system.dts
> @@ -38,7 +38,7 @@
> reg = < 0x90000000 0x10000000 >;
> } ;
> chosen {
> - bootargs = "console=ttyUL0,115200 highres=on";
> + bootargs = "console=ttyUL0,115200 highres=on root=/dev/mtdblock0";
> linux,stdout-path = "/plb@0/serial@84000000";
Do you really want to update the default DTS for this? If user
compiles e.g. initramsf, will it override the commandlineroot=...?
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/