From 743cae0cc6bfafbf6e462fc084256cef36115df3 Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Mon, 7 Mar 2011 03:16:13 +0300 Subject: [PATCH] Updated ECC settings to support new Linux kernel. --- config/initial.cfg | 2 +- script/flash_xz0032_linux.scr | 25 +++++++------------------ 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/config/initial.cfg b/config/initial.cfg index eb0c30c..a2c9370 100644 --- a/config/initial.cfg +++ b/config/initial.cfg @@ -23,7 +23,7 @@ set NAND_PAGESIZE 2048 # The page size of the NAND chip in bytes(512|2048| set NAND_PAGEPERBLOCK 128 # The page number per block set NAND_FORCEERASE 1 # The force to erase flag (0|1) set NAND_OOBSIZE 64 # OOB size in byte -set NAND_ECCPOS 8 # Specify the ECC offset inside the oob data (0-[oobsize-1]) +set NAND_ECCPOS 3 # Specify the ECC offset inside the oob data (0-[oobsize-1]) set NAND_BADBLOCKPOS 0 # Specify the badblock flag offset inside the oob (0-[oobsize-1]) set NAND_BADBLOCKPAGE 0 # Specify the page number of badblock flag inside a block(0-[PAGEPERBLOCK-1]) set NAND_PLANENUM 1 # The planes number of target nand flash diff --git a/script/flash_xz0032_linux.scr b/script/flash_xz0032_linux.scr index a1edd82..0c55582 100644 --- a/script/flash_xz0032_linux.scr +++ b/script/flash_xz0032_linux.scr @@ -3,36 +3,25 @@ # fixes by whitequark echo "---- Linux kernel+loader+rootfs flashing script ----" + echo "Including initial config for 4750 XZ0032 board" - source config/boot.cfg - echo "jzboot successfully configured for XZ0032" -echo "Configuring for bootloader IO" -source script/ecc_boot.scr -echo "Configured for bootloader IO" - echo "Erasing all flash" nerase 0 0 4096 echo "Erased all flash" + echo "Flashing loader" nprogram 0 0 u-boot-nand.bin -echo "Flashed loader" -echo "Flashing kernel" -nprogram 0 2048 uImage -echo "Flashed kernel" +echo "Flashed loader" -echo "Configuring for rootfs IO" -set NAND_ECCPOS 24 # Specify the ECC offset inside the oob data (0-[oobsize-1]) -set NAND_BADBLOCKPAGE 127 # Specify the page number of badblock flag inside a block(0-[PAGEPERBLOCK-1]) -set NAND_BCHBIT 4 # Specify the hardware BCH algorithm for 4750 (4|8) -rebuildcfg -boot -echo "Configured for rootfs IO" +echo "Flashing kernel" +nprogram 0 512 uImage +echo "Flashed kernel" echo "Flashing rootfs" -nprogram_oob 0 4096 rootfs.yaffs2 +nprogram_oob 0 8192 rootfs.ubifs echo "Flashed rootfs" echo "---- All done ----"