diff -purN u-boot-cvs/README u-boot-new/README --- u-boot-cvs/README 2003-09-18 12:02:25.000000000 +0200 +++ u-boot-new/README 2003-10-09 12:37:08.000000000 +0200 @@ -405,7 +405,7 @@ The following options need to be configu CONFIG_8xx_GCLK_FREQ - if get_gclk_freq() can not work e.g. no 32KHz reference PIT/RTC clock -- Clock Interface: +- Linux Interface: CONFIG_CLOCKS_IN_MHZ U-Boot stores all clock information in Hz @@ -415,11 +415,16 @@ The following options need to be configu "clocks_in_mhz" can be defined so that U-Boot converts clock data to MHZ before passing it to the Linux kernel. - When CONFIG_CLOCKS_IN_MHZ is defined, a definition of "clocks_in_mhz=1" is automatically included in the default environment. + CONFIG_MEMSIZE_IN_BYTES + + When transfering memsize parameter to linux, some versions + expect it to be in bytes, others in MB. + Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes. + - Console Interface: Depending on board, define exactly one serial port (like CONFIG_8xx_CONS_SMC1, CONFIG_8xx_CONS_SMC2, diff -purN u-boot-cvs/lib_mips/mips_linux.c u-boot-new/lib_mips/mips_linux.c --- u-boot-cvs/lib_mips/mips_linux.c 2003-06-27 23:32:47.000000000 +0200 +++ u-boot-new/lib_mips/mips_linux.c 2003-10-09 12:46:39.000000000 +0200 @@ -183,7 +183,18 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, in linux_params_init (PHYSADDR(gd->bd->bi_boot_params), commandline); +#ifdef CONFIG_MEMSIZE_IN_BYTES + sprintf (env_buf, "%lu", gd->ram_size); +#ifdef DEBUG + printf ("## Giving linux memsize in bytes, %lu\n",gd->ram_size); +#endif +#else sprintf (env_buf, "%lu", gd->ram_size >> 20); +#ifdef DEBUG + printf ("## Giving linux memsize in MB, %lu\n",gd->ram_size >> 20); +#endif +#endif /* CONFIG_MEMSIZE_IN_BYTES */ + linux_env_set ("memsize", env_buf); sprintf (env_buf, "0x%08X", (uint)PHYSADDR(initrd_start));