diff --git a/usbboot/README b/usbboot/README index 4972748..59c83a6 100644 --- a/usbboot/README +++ b/usbboot/README @@ -30,7 +30,7 @@ Build and Installation: make install *) make install will install the 'usbboot' binary to /usr/bin/usbboot and the stage 1 and 2 bootloaders as well as usbboot.cfg configuration - file into /usr/share/xburst-tools + file into /etc/xburst-tools Configuration file: /usr/share/xburst-tools/usbboot.cfg diff --git a/usbboot/src/cmd.c b/usbboot/src/cmd.c index 7e95946..8e6ccab 100644 --- a/usbboot/src/cmd.c +++ b/usbboot/src/cmd.c @@ -450,6 +450,9 @@ int nand_program_file(struct nand_in *nand_in, transfer_size = (hand.nand_ppb * hand.nand_ps); else transfer_size = (hand.nand_ppb * (hand.nand_ps + hand.nand_os)); + printf("nand_ppb: %d, nand_ps: %d, nand_os: %d\n", hand.nand_ppb, + hand.nand_ps, hand.nand_os); + m = flen / transfer_size; j = flen % transfer_size; printf(" Size to send %d, transfer_size %d\n", flen, transfer_size); diff --git a/usbboot/src/ingenic_cfg.c b/usbboot/src/ingenic_cfg.c index cb6fd72..30716f2 100644 --- a/usbboot/src/ingenic_cfg.c +++ b/usbboot/src/ingenic_cfg.c @@ -126,11 +126,13 @@ int check_dump_cfg(struct hand *hand) total_size / 0x100000, 2 * (hand->fw_args.bank_num + 1), 16 * (2 - hand->fw_args.bus_width)); - printf("Nand page size %d, " + printf("Nand page per block %d, " + "Nand page size %d, " "ECC offset in OOB %d, " "bad block offset in OOB %d, " "bad block page %d, " "use %d plane mode\n", + hand->nand_ppb, hand->nand_ps, hand->nand_eccpos, hand->nand_bbpos, diff --git a/usbboot/xburst_stage2/boothandler.c b/usbboot/xburst_stage2/boothandler.c index 2b30274..b166b6a 100644 --- a/usbboot/xburst_stage2/boothandler.c +++ b/usbboot/xburst_stage2/boothandler.c @@ -315,14 +315,21 @@ void Borad_Init() nand_init_4740(Hand.nand_bw,Hand.nand_rc,Hand.nand_ps,Hand.nand_ppb, Hand.nand_bbpage,Hand.nand_bbpos,Hand.nand_force_erase,Hand.nand_eccpos); - nand_program=nand_program_4740; - nand_erase =nand_erase_4740; - nand_read =nand_read_4740; - nand_read_oob=nand_read_oob_4740; - nand_read_raw=nand_read_raw_4740; - nand_query = nand_query_4740; + dprintf("\nnand_ps, nand_ppb, nand_bbpage, nand_bbpos, nand_eccpos\n"); + serial_put_hex(Hand.nand_ps); + serial_put_hex(Hand.nand_ppb); + serial_put_hex(Hand.nand_bbpage); + serial_put_hex(Hand.nand_bbpos); + serial_put_hex(Hand.nand_eccpos); + + nand_program = nand_program_4740; + nand_erase = nand_erase_4740; + nand_read = nand_read_4740; + nand_read_oob = nand_read_oob_4740; + nand_read_raw = nand_read_raw_4740; + nand_query = nand_query_4740; nand_enable = nand_enable_4740; - nand_disable= nand_disable_4740; + nand_disable = nand_disable_4740; nand_mark_bad = nand_mark_bad_4740; break; case 0x4750: @@ -331,14 +338,14 @@ void Borad_Init() Hand.nand_ppb, Hand.nand_bchbit, Hand.nand_eccpos, Hand.nand_bbpos, Hand.nand_bbpage, Hand.nand_force_erase); - nand_program=nand_program_4750; - nand_erase =nand_erase_4750; - nand_read =nand_read_4750; - nand_read_oob=nand_read_oob_4750; - nand_read_raw=nand_read_raw_4750; - nand_query = nand_query_4750; + nand_program = nand_program_4750; + nand_erase = nand_erase_4750; + nand_read = nand_read_4750; + nand_read_oob = nand_read_oob_4750; + nand_read_raw = nand_read_raw_4750; + nand_query = nand_query_4750; nand_enable = nand_enable_4750; - nand_disable= nand_disable_4750; + nand_disable = nand_disable_4750; nand_mark_bad = nand_mark_bad_4750; break; default: