km/common: force set ethaddr only for KM kirkwood boards
PATCH 1/3 km/common: force set ethaddr only for KM kirkwood boards
This prevents u-boot to print out "Can't overwrite "ethaddr"" each time a powerpc board starts.
--- board/keymile/common/ivm.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
board/keymile/common/ivm.c +5 -0
@@ -221,7 +221,12 @@ static int ivm_analyze_block2(unsigned char *buf, int len)sprintf ((char *)valbuf,"%pM" , buf); }#endif +#ifdef MACH_TYPE_KM_KIRKWOOD setenv ((char *)"ethaddr" , (char *)valbuf); +#else +if (getenv ("ethaddr" ) ==NULL ) +setenv ((char *)"ethaddr" , (char *)valbuf); +#endif /* IVM_MacCount */ count = (buf[10] << 24) +
Signature · 1 line
1.7.1
PATCH 2/3 km/common: fix ramfs development target
From: Andreas Huber <[email protected]>
Calucations of PRAM needs to take into account the 'rootfssize'. Memory available to the linux kernel 'mem=' is in all cases set to the total memory size minus the pram size.
--- board/keymile/common/common.c | 16 ++++++++++++++-- board/keymile/scripts/develop-common.txt | 1 + board/keymile/scripts/ramfs-common.txt | 5 ++--- include/configs/km/keymile-common.h | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-)
board/keymile/common/common.c +14 -2
@@ -67,20 +67,32 @@ int set_km_env(void)unsigned int pnvramaddr;unsigned int pram;unsigned int varaddr; +unsigned int kernelmem; +char *p; +unsigned long rootfssize =0 ; pnvramaddr = gd->ram_size -CONFIG_KM_RESERVED_PRAM -CONFIG_KM_PHRAM -CONFIG_KM_PNVRAM ;sprintf ((char *)buf,"0x%x" , pnvramaddr);setenv ("pnvramaddr" , (char *)buf); - pram = (CONFIG_KM_RESERVED_PRAM +CONFIG_KM_PHRAM +CONFIG_KM_PNVRAM ) / -0x400 ; +/* try to read rootfssize (ram image) from envrionment */ + p =getenv ("rootfssize" ); +if (p !=NULL ) +strict_strtoul (p,16 , &rootfssize); + pram = (rootfssize +CONFIG_KM_RESERVED_PRAM +CONFIG_KM_PHRAM + +CONFIG_KM_PNVRAM ) /0x400 ;sprintf ((char *)buf,"0x%x" , pram);setenv ("pram" , (char *)buf); varaddr = gd->ram_size -CONFIG_KM_RESERVED_PRAM -CONFIG_KM_PHRAM ;sprintf ((char *)buf,"0x%x" , varaddr);setenv ("varaddr" , (char *)buf); + + kernelmem = gd->ram_size -0x400 * pram; +sprintf ((char *)buf,"0x%x" , kernelmem); +setenv ("kernelmem" , (char *)buf); +return 0 ; }
board/keymile/scripts/develop-common.txt +1 -0
@@ -4,3 +4,4 @@ configure=km_setboardid && saveenv && reset subbootcmds=tftpfdt tftpkernel nfsargs add_default boot nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:/opt/eldk/${arch} tftpkernel=tftpboot ${load_addr_r} ${hostname}/uImage +rootfssize=0
board/keymile/scripts/ramfs-common.txt +2 -3
@@ -1,11 +1,10 @@ -addramfs=setenv bootargs "${bootargs} mem=${rootfsaddr} phram.phram=rootfs${boot_bank},${rootfsaddr},${rootfssize}" +addramfs=setenv bootargs "${bootargs} phram.phram=rootfs${boot_bank},${rootfsaddr},${rootfssize}" actual_bank=-1 altbootcmd=run ${subbootcmds} bootcmd=run ${subbootcmds} subbootcmds=tftpfdt tftpkernel setrootfsaddr tftpramfs flashargs add_default addpanic addramfs boot nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} -configure=km_setboardid && run setramfspram && saveenv && reset -setramfspram=setexpr value 0 + ${rootfssize} && setexpr value 0x${value} / 0x400 && setexpr value 0x${value} + ${pram} && setenv pram 0x${value} +configure=km_setboardid && saveenv && reset rootfsfile=${hostname}/rootfsImage setrootfsaddr=setexpr value ${pnvramaddr} - ${rootfssize} && setenv rootfsaddr 0x${value} tftpkernel=tftpboot ${load_addr_r} ${hostname}/uImage
include/configs/km/keymile-common.h +1 -1
@@ -177,7 +177,7 @@"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \":${hostname}:${netdev}:off3" \" console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}" \ -" mem=${pnvramaddr} init=${init}" \ +" mem=${kernelmem} init=${init}" \ " phram.phram=phvar,${varaddr}," xstr(CONFIG_KM_PHRAM) \" ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \CONFIG_KM_DEF_BOOT_ARGS_CPU \
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH 2/3 km/common: fix ramfs development target
Dear Holger Brunck,
Quoted 9 lines · In message <[email protected]> you…
From: Andreas Huber <[email protected]>
Calucations of PRAM needs to take into account the 'rootfssize'. Memory available to the linux kernel 'mem=' is in all cases set to the total memory size minus the pram size.
Signed-off-by Andreas Huber <[email protected]>Signed-off-by Holger Brunck <[email protected]>cc Wolfgang Denk <[email protected]>
Quoted 6 lines
--- board/keymile/common/common.c | 16 ++++++++++++++-- board/keymile/scripts/develop-common.txt | 1 + board/keymile/scripts/ramfs-common.txt | 5 ++--- include/configs/km/keymile-common.h | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A day without sunshine is like night.
PATCH 3/3 km/common: remove obsolete header file
In reply to Holger BrunckThis header is unneeded due to code which was removed in the past.
--- board/keymile/common/common.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
board/keymile/common/common.c +0 -4
@@ -34,10 +34,6 @@#include <asm/io.h> #include <linux/ctype.h> -#if defined(CONFIG_OF_BOARD_SETUP ) && defined(CONFIG_OF_LIBFDT ) -#include <libfdt.h> -#endif -#include "common.h" #if defined(CONFIG_HARD_I2C ) || defined(CONFIG_SOFT_I2C )#include <i2c.h>
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH 3/3 km/common: remove obsolete header file
Dear Holger Brunck,
Quoted 8 lines · In message <[email protected]> you…
This header is unneeded due to code which was removed in the past.
Signed-off-by Holger Brunck <[email protected]>cc Wolfgang Denk <[email protected]>--- board/keymile/common/common.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The following statement is not true. The previous statement is true.
Wolfgang Denk
AppliedPATCH 1/3 km/common: force set ethaddr only for KM kirkwood boards
In reply to Holger BrunckDear Holger Brunck,
Quoted 8 lines · In message <[email protected]> you…
This prevents u-boot to print out "Can't overwrite "ethaddr"" each time a powerpc board starts.
Signed-off-by Holger Brunck <[email protected]>cc Wolfgang Denk <[email protected]>--- board/keymile/common/ivm.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Brain: an apparatus with which we think we think. - Ambrose Bierce