diff --git a/inflash/README b/inflash/README index ca5b04b..68579d6 100644 --- a/inflash/README +++ b/inflash/README @@ -14,6 +14,10 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. +inflash is the Linux version of a Windows utility from Ingenic called 'usbboot'. +Homepage: http://www.ingenic.cn/eng/productServ/kfyd/compiler/pffaqContents.aspx#questionAnchor8 +Manual: ftp://ftp.ingenic.cn/3sw/00tools/usb_boot/manual/USB_Boot_Tool_Manual_1.4_EN.pdf + Build Requirements: libusb-dev, libconfuse-dev Build and Installation: @@ -28,6 +32,7 @@ Build and Installation: Configuration file: /usr/share/inflash/inflash.cfg Examples: + sudo inflash (invoking inflash without options will let you enter commands at the inflash prompt) sudo inflash -c "boot" sudo inflash -c "nprog 0 u-boot-nand.bin 0 0 -n" sudo inflash -c "nprog 2048 uImage 0 0 -n" diff --git a/inflash/src/inflash.cfg b/inflash/src/inflash.cfg index 1d343ca..2b16cc1 100644 --- a/inflash/src/inflash.cfg +++ b/inflash/src/inflash.cfg @@ -37,8 +37,8 @@ NAND_PAGEPERBLOCK = 128 #The page number per block NAND_FORCEERASE = 1 #The force to erase flag (0|1) NAND_OOBSIZE = 64 #oob size in byte NAND_ECCPOS = 6 #Specify the ECC offset inside the oob data (0-[oobsize-1]) -NAND_BADBLACKPOS = 0 #Specify the badblock flag offset inside the oob (0-[oobsize-1]) -NAND_BADBLACKPAGE = 127 #Specify the page number of badblock flag inside a block(0-[PAGEPERBLOCK-1]) +NAND_BADBLOCKPOS = 0 #Specify the badblock flag offset inside the oob (0-[oobsize-1]) +NAND_BADBLOCKPAGE = 127 #Specify the page number of badblock flag inside a block(0-[PAGEPERBLOCK-1]) NAND_PLANENUM = 1 #The planes number of target nand flash NAND_BCHBIT = 4 #Specify the hardware BCH algorithm for 4750 (4|8) NAND_WPPIN = 0 #Specify the write protect pin number diff --git a/inflash/src/ingenic_cfg.c b/inflash/src/ingenic_cfg.c index f2f49db..b5b8801 100644 --- a/inflash/src/ingenic_cfg.c +++ b/inflash/src/ingenic_cfg.c @@ -118,11 +118,13 @@ int check_dump_cfg(struct hand *hand) 16 * (2 - hand->fw_args.bus_width)); printf("\n Nand page size %d, " - "ECC offset %d, " - "bad block ID %d, " + "ECC offset in OOB %d, " + "bad block offset in OOB %d, " + "bad block page %d, " "use %d plane mode\n", hand->nand_ps, hand->nand_eccpos, + hand->nand_bbpos, hand->nand_bbpage, hand->nand_plane); return 1; @@ -164,12 +166,12 @@ int parse_configure(struct hand *hand, char * file_path) CFG_SIMPLE_INT("NAND_FORCEERASE", &hand->nand_force_erase), CFG_SIMPLE_INT("NAND_OOBSIZE", &hand->nand_os), CFG_SIMPLE_INT("NAND_ECCPOS", &hand->nand_eccpos), - CFG_SIMPLE_INT("NAND_BADBLACKPOS", &hand->nand_bbpos), - CFG_SIMPLE_INT("NAND_BADBLACKPAGE", &hand->nand_bbpage), + CFG_SIMPLE_INT("NAND_BADBLOCKPOS", &hand->nand_bbpos), + CFG_SIMPLE_INT("NAND_BADBLOCKPAGE", &hand->nand_bbpage), CFG_SIMPLE_INT("NAND_PLANENUM", &hand->nand_plane), CFG_SIMPLE_INT("NAND_BCHBIT", &hand->nand_bchbit), CFG_SIMPLE_INT("NAND_WPPIN", &hand->nand_wppin), - CFG_SIMPLE_INT("NAND_BLOCKPERCHIP", &hand->nand_bbpage), + CFG_SIMPLE_INT("NAND_BLOCKPERCHIP", &hand->nand_bpc), CFG_END() };