Update U-Boot on Colibri PXA270 u-boot$ tftpboot 0xa1000000 u-boot.bin dm9000 i/o: 0x8000000, id: 0x90000a46 DM9000: running in 32 bit mode MAC: 00:14:2d:00:17:a6 operating at 100M full duplex mode TFTP from server 192.168.10.1; our IP address is 192.168.10.68 Filename 'u-boot.bin'. Load address: 0xa1000000 Loading: ################################### done Bytes transferred = 177412 (2b504 hex) u-boot$ protect off 0x0 0x40000 Error: end address not on sector boundary u-boot$ protect off 0x0 0x3ffff . done Un-Protected 1 sectors u-boot$ erase 0x0 0x3ffff . done Erased 1 sectors u-boot$ cp.b 0xa1000000 0x0 $filesize Copy to Flash... done u-boot$ reset resetting ... Update U-Boot on Colibri PXA3xx $ tftpboot 0x81000000 u-boot-nand-2010.09-colibri_pxa320v20.bin Using ax88796c device TFTP from server 192.168.10.1; our IP address is 192.168.10.2 Filename 'u-boot-nand-2010.09-colibri_pxa320v20.bin'. Load address: 0x81000000 Loading: ################################################################ done Bytes transferred = 322612 (4ec34 hex) $ nupdate 0x81000000 $filesize Successfully verified 0x0004ec34 bytes $ nand erase 0x80000 0x80000 NAND erase: device 0 offset 0x80000, size 0x80000 Erasing at 0xe0000 -- 100% complete. OK $ reset resetting ... U-Boot 2010.09-toradex (Feb 01 2011 - 15:03:04) DRAM: 128 MiB NAND: 1024 MiB *** Warning - bad CRC or NAND, using default environment In: serial Out: serial Err: serial Erasing Nand... Erasing at 0xe0000 -- 100% complete. Writing to Nand... done Net: ax88796c Hit any key to stop autoboot: 0 Update U-Boot on Colibri PXA3xx in 2 stages (e.g. comming from an older BSP) $ tftpboot 0x81000000 u-boot-update-2010.09-colibri_pxa300v11.bin Using ax88796b device TFTP from server 192.168.1.2; our IP address is 192.168.1.1 Filename 'u-boot-update-2010.09-colibri_pxa300v11.bin'. Load address: 0x81000000 Loading: ################################################### done Bytes transferred = 256324 (3e944 hex) $ nupdate 0x81000000 $filesize Successfully verified 0x0003e944 bytes $ reset resetting ... U-Boot 2010.09-toradex (Feb 01 2011 - 14:02:41) DRAM: 64 MiB NAND: 128 MiB In: serial Out: serial Err: serial Net: ax88796b Hit any key to stop autoboot: 0 $ setenv serverip 192.168.1.2 $ setenv ipaddr 192.168.1.1 $ tftpboot 0x81000000 u-boot-nand-2010.09-colibri_pxa300v11.bin Using ax88796b device TFTP from server 192.168.1.2; our IP address is 192.168.1.1 Filename 'u-boot-nand-2010.09-colibri_pxa300v11.bin'. Load address: 0x81000000 Loading: ################################################################ done Bytes transferred = 322628 (4ec44 hex) $ nupdate 0x81000000 $filesize Successfully verified 0x0004ec44 bytes $ nand erase 0x80000 0x80000 NAND erase: device 0 offset 0x80000, size 0x80000 Erasing at 0xe0000 -- 100% complete. OK $ reset resetting ... U-Boot 2010.09-toradex (Feb 01 2011 - 13:58:51) DRAM: 64 MiB NAND: 128 MiB *** Warning - bad CRC or NAND, using default environment In: serial Out: serial Err: serial Erasing Nand... Erasing at 0xe0000 -- 100% complete. Writing to Nand... done Net: ax88796b Hit any key to stop autoboot: 0 Flash Kernel on PXA270 $ setenv ethaddr 00:14:2d:00:17:a6 $ setenv serverip 192.168.10.1 $ setenv ipaddr 192.168.10.2 $ tftpboot 0xa0000000 uImage dm9000 i/o: 0x8000000, id: 0x90000a46 DM9000: running in 32 bit mode MAC: 00:14:2d:00:17:a6 operating at 100M full duplex mode Using dm9000 device TFTP from server 192.168.10.1; our IP address is 192.168.10.2 Filename 'uImage'. Load address: 0xa0000000 Loading: T T T T #T ####################################T ############################ ################################################################T # ################################################################# ################################################################# ################################################################# ################################################################# ############ done Bytes transferred = 2055612 (1f5dbc hex) $ protect off 0x80000 0x47ffff ................ done Un-Protected 16 sectors $ erase 0x80000 0x47ffff ................ done Erased 16 sectors $ cp.b 0xa0000000 0x80000 $filesize Copy to Flash... done Flash Kernel on PXA3xx $ bootp BOOTP broadcast 1 DHCP client bound to address 192.168.10.2 Using ax88796b device TFTP from server 192.168.10.1; our IP address is 192.168.10.2 Filename 'uImage'. Load address: 0x81000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############ done Bytes transferred = 2055612 (1f5dbc hex) $ mtdparts device nand0 , # parts = 9 #: name size offset mask_flags 0: u-boot-1-part 0x00020000 0x00000000 1 1: u-boot-2-part 0x00020000 0x00020000 1 2: configuration-block 0x00020000 0x00040000 1 3: u-boot-3-part 0x00020000 0x00060000 1 4: u-boot-env 0x00080000 0x00080000 1 5: kernel-ubi 0x00300000 0x00100000 0 6: rootfs-ubi 0x07c00000 0x00400000 0 7: mass-storage 0x36000000 0x08000000 0 8: replacement-blocks 0x02000000 0x3e000000 1 active partition: nand0,0 - (u-boot-1-part) 0x00020000 @ 0x00000000 defaults: mtdids : nand0=pxa3xx-nand mtdparts: mtdparts=pxa3xx-nand:128k(u-boot-1-part)ro,128k(u-boot-2-part)ro,128k@256k(configuration-block)ro,128k(u-boot-3-part)ro,512k(u-boot-env)ro,3m(kernel-ubi),124m(rootfs-ubi),864m(mass-storage),-(replacement-blocks)ro $ nand erase 0x100000 0x300000 NAND erase: device 0 offset 0x100000, size 0x300000 Erasing at 0x3e0000 -- 100% complete. OK $ ubi part kernel-ubi Creating 1 MTD partitions on "nand0": 0x000000100000-0x000000400000 : "mtd=5" UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 126976 bytes UBI: smallest flash I/O unit: 2048 UBI: VID header offset: 2048 (aligned 2048) UBI: data offset: 4096 UBI: empty MTD device detected UBI: create volume table (copy #1) UBI: create volume table (copy #2) UBI: attached mtd1 to ubi0 UBI: MTD device name: "mtd=5" UBI: MTD device size: 3 MiB UBI: number of good PEBs: 24 UBI: number of bad PEBs: 0 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 0 UBI: available PEBs: 18 UBI: total number of reserved PEBs: 6 UBI: number of PEBs reserved for bad PEB handling: 2 UBI: max/mean erase counter: 1/0 $ ubi createvol kernel Creating dynamic volume kernel of size 2285568 $ ubi write 0x81000000 kernel $filesize Volume "kernel" found at volume id 0 Write UBI Root File System Image from within U-Boot: PXA300 via Ethernet $ tftpboot 0x80000000 rootfs-toradex-bsp-2011.02-r1-ubifs.img Using ax88796b device TFTP from server 192.168.10.1; our IP address is 192.168.10.2 Filename 'rootfs-toradex-bsp-2011.02-r1-ubifs.img'. Load address: 0x80000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ###################################################### 32 MB received ################### done Bytes transferred = 33648640 (2017000 hex) $ mtdparts device nand0 , # parts = 8 #: name size offset mask_flags 0: u-boot-1-part 0x00020000 0x00000000 1 1: u-boot-2-part 0x00020000 0x00020000 1 2: configuration-block 0x00020000 0x00040000 1 3: u-boot-3-part 0x00020000 0x00060000 1 4: u-boot-env 0x00080000 0x00080000 1 5: kernel-ubi 0x00300000 0x00100000 0 6: rootfs-ubi 0x05c00000 0x00400000 0 7: replacement-blocks 0x02000000 0x06000000 1 active partition: nand0,0 - (u-boot-1-part) 0x00020000 @ 0x00000000 defaults: mtdids : nand0=pxa3xx-nand mtdparts: mtdparts=pxa3xx-nand:128k(u-boot-1-part)ro,128k(u-boot-2-part)ro,128k@256k(configuration-block)ro,128k(u-boot-3-part)ro,512k(u-boot-env)ro,3m(kernel-ubi),92m(rootfs-ubi),-(replacement-blocks)ro $ nand erase 0x400000 0x5c00000 NAND erase: device 0 offset 0x400000, size 0x5c00000 Skipping bad block at 0x01480000 Erasing at 0x5fe0000 -- 100% complete. OK $ ubi part rootfs-ubi Creating 1 MTD partitions on "nand0": 0x000000400000-0x000006000000 : "mtd=6" UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 126976 bytes UBI: smallest flash I/O unit: 2048 UBI: VID header offset: 2048 (aligned 2048) UBI: data offset: 4096 UBI: empty MTD device detected UBI: create volume table (copy #1) UBI: create volume table (copy #2) UBI: attached mtd1 to ubi0 UBI: MTD device name: "mtd=6" UBI: MTD device size: 92 MiB UBI: number of good PEBs: 735 UBI: number of bad PEBs: 1 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 0 UBI: available PEBs: 724 UBI: total number of reserved PEBs: 11 UBI: number of PEBs reserved for bad PEB handling: 7 UBI: max/mean erase counter: 1/0 $ ubi createvol rootfs Creating dynamic volume rootfs of size 91930624 $ ubi write 0x80000000 rootfs $filesize Volume "rootfs" found at volume id 0 PXA320 via USB memory stick $ usb start (Re)start USB... USB: scanning bus for devices... 2 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found $ fatload usb 0:1 0x81000000 ubifs.img reading ubifs.img 33648640 bytes read $ mtdparts device nand0 , # parts = 9 #: name size offset mask_flags 0: u-boot-1-part 0x00020000 0x00000000 1 1: u-boot-2-part 0x00020000 0x00020000 1 2: configuration-block 0x00020000 0x00040000 1 3: u-boot-3-part 0x00020000 0x00060000 1 4: u-boot-env 0x00080000 0x00080000 1 5: kernel-ubi 0x00300000 0x00100000 0 6: rootfs-ubi 0x07c00000 0x00400000 0 7: mass-storage 0x36000000 0x08000000 0 8: replacement-blocks 0x02000000 0x3e000000 1 active partition: nand0,0 - (u-boot-1-part) 0x00020000 @ 0x00000000 defaults: mtdids : nand0=limestone-nand mtdparts: mtdparts=limestone-nand:128k(u-boot-1-part)ro,128k(u-boot-2-part)ro,128k@256k(configuration-block)ro,128k(u-boot-3-part)ro,512k(u-boot-env)ro,3m(kernel-ubi),124m(rootfs-ubi),864m(mass-storage),-(replacement-blocks)ro $ nand erase 0x400000 0x8000000 NAND erase: device 0 offset 0x400000, size 0x8000000 Skipping bad block at 0x00d60000 Skipping bad block at 0x01480000 Skipping bad block at 0x014a0000 Skipping bad block at 0x014c0000 Skipping bad block at 0x014e0000 Skipping bad block at 0x01500000 Skipping bad block at 0x01520000 Skipping bad block at 0x01540000 Skipping bad block at 0x01560000 Skipping bad block at 0x01580000 Skipping bad block at 0x015a0000 Skipping bad block at 0x015c0000 Skipping bad block at 0x015e0000 Skipping bad block at 0x01600000 Skipping bad block at 0x01620000 Skipping bad block at 0x01640000 Skipping bad block at 0x01660000 Skipping bad block at 0x01680000 Skipping bad block at 0x016a0000 Skipping bad block at 0x016c0000 Skipping bad block at 0x016e0000 Skipping bad block at 0x01700000 Skipping bad block at 0x01720000 Skipping bad block at 0x01740000 Skipping bad block at 0x01760000 Skipping bad block at 0x01780000 Skipping bad block at 0x017a0000 Skipping bad block at 0x017c0000 Skipping bad block at 0x017e0000 Skipping bad block at 0x01800000 Skipping bad block at 0x01820000 Skipping bad block at 0x01840000 Skipping bad block at 0x01860000 Skipping bad block at 0x01880000 Skipping bad block at 0x018a0000 Skipping bad block at 0x018c0000 Erasing at 0x83e0000 -- 100% complete. OK $ ubi part rootfs-ubi Creating 1 MTD partitions on "nand0": 0x000000400000-0x000008000000 : "mtd=6" UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 126976 bytes UBI: smallest flash I/O unit: 2048 UBI: VID header offset: 2048 (aligned 2048) UBI: data offset: 4096 UBI: empty MTD device detected UBI: create volume table (copy #1) UBI: create volume table (copy #2) UBI: attached mtd1 to ubi0 UBI: MTD device name: "mtd=6" UBI: MTD device size: 124 MiB UBI: number of good PEBs: 956 UBI: number of bad PEBs: 36 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 0 UBI: available PEBs: 943 UBI: total number of reserved PEBs: 13 UBI: number of PEBs reserved for bad PEB handling: 9 UBI: max/mean erase counter: 1/0 $ ubi createvol rootfs Creating dynamic volume rootfs of size 119738368 $ ubi write 0x81000000 rootfs $filesize Volume "rootfs" found at volume id 0 Write UBI Root File System Image from within Linux: root@toradex:~# ubiformat /dev/mtd6 -f /media/sda1/ubi.img ubiformat: mtd6 (nand), size 130023424 bytes (124.0 MiB), 992 eraseblocks of 131 072 bytes (128.0 KiB), min. I/O size 2048 bytes libscan: scanning eraseblock 991 -- 100 % complete ubiformat: 956 eraseblocks have valid erase counter, mean value is 2 ubiformat: 36 bad eraseblocks found, numbers: 75, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166 ubiformat: flashing eraseblock 302 -- 100 % complete ubiformat: formatting eraseblock 991 -- 100 % complete