Skip to contentSkip to conversation

Env. vars fix for lite5200

PATCH New Karim Yaghmour 2 participants 2 messages Feb 25, 2011 – Apr 13, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Env. vars fix for lite5200

I still have a few older lite5200 boards around and when I recently tried to upgrade U-Boot I ran into weird problems where "saveenv" would fry the bootloader. Attached is a fix. It seems that somewhere along the way the image size grew larger than 256K and the address for the env vars overlapped with the code.

P.S.: Apologies for not putting the patch inline, the email provider I use has a brain-dead policy of enforcing line-wraps on text emails :/

--
Karim Yaghmour
CEO - Opersys inc. / www.opersys.com
http://twitter.com/karimyaghmour
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot-2010.12-fix-lite5200.patch
Type: application/octet-stream
Size: 618 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110225/73134e79/attachment.obj

#1 lore raw

PATCH 1/1 Env. vars fix for lite5200

Dear Karim Yaghmour,

Quoted 6 lines · In message <[email protected]> you wrote:

I still have a few older lite5200 boards around and when I recently tried to upgrade U-Boot I ran into weird problems where "saveenv" would fry the bootloader. Attached is a fix. It seems that somewhere along the way the image size grew larger than 256K and the address for the env vars overlapped with the code.

...

/include/configs/IceCube.h

Quoted 3 lines

diff -urN u-boot-2010.12/include/configs/IceCube.h u-boot-2010.12-fix-lite5200//include/configs/IceCube.h

/include/configs/IceCube.h renamed from include/configs/IceCube.h +0 -0

Proper commit message and Signed-off-by: line missing.

Also, patches should be made using "git format-patch". If you really have to do it by hand, then please make sure that they can be applied with "git am", i. e. at least make sure that "patch -p1 works", and that your attached patch has the full information including From:,
Date: and Subject.

/include/configs/IceCube.h line 240

Quoted 9 lines
/include/configs/IceCube.h renamed from include/configs/IceCube.h +1 -1
@@ -234,7 +234,7 @@
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + 0x00040000 + 0x00800000)
 #endif
 #if defined(CONFIG_SYS_LOWBOOT16)
-#define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + 0x00040000)
+#define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + 0x00050000)
 #endif
 #endif	/* CONFIG_SYS_LOWBOOT */
 #endif /* CONFIG_LITE5200B */

Hm... This should also be fixed for the highboot case, then.

Best regards,

Wolfgang Denk

Signature · 6 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
Quotation, n. The act of repeating erroneously the words of  another.
The  words  erroneously  repeated.
                            - Ambrose Bierce _The Devil's Dictionary_