[PATCH 01/22] ARM: Karo TX25: register external NAND boot update handler

Sascha Hauer s.hauer at pengutronix.de
Fri Jan 17 10:03:11 EST 2014


To be able to update barebox with the barebox_update command.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/boards/karo-tx25/board.c                | 4 ++++
 arch/arm/boards/karo-tx25/env/init/mtdparts-nand | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/karo-tx25/board.c b/arch/arm/boards/karo-tx25/board.c
index 337ae01..7cdeecc 100644
--- a/arch/arm/boards/karo-tx25/board.c
+++ b/arch/arm/boards/karo-tx25/board.c
@@ -38,6 +38,7 @@
 #include <mach/iim.h>
 #include <linux/err.h>
 #include <mach/devices-imx25.h>
+#include <mach/bbu.h>
 #include <asm/mmu.h>
 
 static struct fec_platform_data fec_info = {
@@ -115,6 +116,9 @@ static int tx25_devices_init(void)
 	armlinux_set_architecture(MACH_TYPE_TX25);
 	armlinux_set_serial(imx_uid());
 
+	imx_bbu_external_nand_register_handler("nand", "/dev/nand0.barebox",
+			BBU_HANDLER_FLAG_DEFAULT);
+
 	return 0;
 }
 
diff --git a/arch/arm/boards/karo-tx25/env/init/mtdparts-nand b/arch/arm/boards/karo-tx25/env/init/mtdparts-nand
index 4fffefc..e2dcfab 100644
--- a/arch/arm/boards/karo-tx25/env/init/mtdparts-nand
+++ b/arch/arm/boards/karo-tx25/env/init/mtdparts-nand
@@ -5,7 +5,7 @@ if [ "$1" = menu ]; then
 	exit
 fi
 
-mtdparts="512k(nand0.barebox)ro,512k(nand0.bareboxenv),4M(nand0.kernel),-(nand0.root)"
+mtdparts="512k(nand0.barebox),512k(nand0.bareboxenv),4M(nand0.kernel),-(nand0.root)"
 kernelname="mxc_nand"
 
 mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}
-- 
1.8.5.2




More information about the barebox mailing list