Skip to contentSkip to conversation

update: Add eccmode switching for different types

RFC In review Jan Weitzel 2 participants 2 messages Jun 22, 2011 – Jun 23, 2011

lore
Share & tools
lore
#0 lore raw

RFC 1/1 update: Add eccmode switching for different types

to use update on nand with different eccmodes for the nand partitions we need to set the eccmode before updating.
Adding eccdev and eccmode to enviroment to use.
eccdev example: gpmc_nand0
eccmode for the different types:
root_eccmode
barebox_eccmode
bareboxenv_eccmode
xload_eccmode

---
 defaultenv/bin/update |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
defaultenv/bin/update +8 -0
index 55ac10b..7473611 100644
@@ -27,21 +27,26 @@ done
 
 if [ x${type} = xkernel ]; then
 	image=$kernelimage
+	eccmode=${kernel_eccmode}
 elif [ x${type} = xrootfs ]; then
 	image=$rootfsimage
 	type=root
+	eccmode=${root_eccmode}
 elif [ x${type} = xbarebox ]; then
 	image=$bareboximage
 	if [ x${image} = x ]; then
 		image=barebox.bin
 	fi
+	eccmode=${barebox_eccmode}
 elif [ x${type} = xbareboxenv ]; then
 	image=$bareboxenvimage
 	if [ x${image} = x ]; then
 		image=bareboxenv.bin
 	fi
+	eccmode=${bareboxenv_eccmode}
 elif [ x${type} = xxload ]; then
 	image=$xloadimage
+	eccmode=${xload_eccmode}
 else
 	. /env/bin/_update_help
 	exit 1
@@ -53,6 +58,9 @@ fi
 
 if [ x${device_type} = xnand ]; then
 	part=/dev/nand0.${type}.bb
+	if [ x${eccmode} != x ] && [ x${eccdev} != x ]; then
+		${eccdev}.eccmode=${eccmode}
+	fi
 elif [ x${device_type} = xnor ]; then
 	part=/dev/nor0.${type}
 else
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

Hi Jan,

Quoted 9 lines · Jan Weitzel

to use update on nand with different eccmodes for the nand partitions we need to set the eccmode before updating.
Adding eccdev and eccmode to enviroment to use.
eccdev example: gpmc_nand0
eccmode for the different types:
root_eccmode
barebox_eccmode
bareboxenv_eccmode
xload_eccmode

I do not have a good idea how to solve this, but this is a generic script and putting omap specific stuff in it is not a good idea.

Sascha

Quoted 56 lines
---
 defaultenv/bin/update |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
defaultenv/bin/update +8 -0
index 55ac10b..7473611 100644
@@ -27,21 +27,26 @@ done
 
 if [ x${type} = xkernel ]; then
 	image=$kernelimage
+	eccmode=${kernel_eccmode}
 elif [ x${type} = xrootfs ]; then
 	image=$rootfsimage
 	type=root
+	eccmode=${root_eccmode}
 elif [ x${type} = xbarebox ]; then
 	image=$bareboximage
 	if [ x${image} = x ]; then
 		image=barebox.bin
 	fi
+	eccmode=${barebox_eccmode}
 elif [ x${type} = xbareboxenv ]; then
 	image=$bareboxenvimage
 	if [ x${image} = x ]; then
 		image=bareboxenv.bin
 	fi
+	eccmode=${bareboxenv_eccmode}
 elif [ x${type} = xxload ]; then
 	image=$xloadimage
+	eccmode=${xload_eccmode}
 else
 	. /env/bin/_update_help
 	exit 1
@@ -53,6 +58,9 @@ fi
 
 if [ x${device_type} = xnand ]; then
 	part=/dev/nand0.${type}.bb
+	if [ x${eccmode} != x ] && [ x${eccdev} != x ]; then
+		${eccdev}.eccmode=${eccmode}
+	fi
 elif [ x${device_type} = xnor ]; then
 	part=/dev/nor0.${type}
 else
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox