Skip to content

Instantly share code, notes, and snippets.

@dpruessner
Last active June 7, 2017 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpruessner/74e52759d9a7fb26a602909d2b673311 to your computer and use it in GitHub Desktop.
Save dpruessner/74e52759d9a7fb26a602909d2b673311 to your computer and use it in GitHub Desktop.
Problems with ChipPRO SDK Programming custom BuildRoot image

Following procedure from: http://www.chip-community.org/index.php/Startup_Program_with_Buildroot

Buildroot executes and builds images properly (we have lots of experience with buildroot for building our i.MX6 images).

Environment

  • Late 2015 MacBook Pro (2x USB3.0 ports)
  • VirtualBox 5.1.6 (with proper guest tools installed)
  • USB 2.0 Hub (MACALLY Trihub4 from Amazon)
  • 2x ChipPro Dev Kit (1.0)
  • 2x ChipPro loose modules
  • CHIP-SDK 1cf0def (master)
  • VAGRANT environment:
    • CHIP-tools 6c16df (chip/stable)
  • EVK-DUT1 board (for future reference) is a ChipPro DevKit 1.0 with:
    • the "USB V" jumper cut (to allow external power supply)
    • The UART (PG3, PG4) -> FT230X jumpers cut (to allow external FTDI UART logging).
    • Power provided by Mastech bench-top variable DC power supply

Observations

  1. Programming through Chrome http://flash.getchip.com/pro works to program debian image to ChipPro DevKits (and EVK-DUT1).
  2. Sometimes takes a few tries
  3. Image is bootable and useable
  4. Programming through Vagrant (CHIP-SDK):
  5. Writing standard buildroot image (sudo ./chip-update-firmware.sh -b -f) fails every time to pass fastboot initialization. 1. ChipPro UART in LOG1.txt below
  6. Writing custom image (sudo ./chip-flash-nand-images.sh sr400-brchip-image) fails at exactly same point.
  7. Programming through RaspberryPi (raspbian Linux / same checkout version on CHIP-tools):
  8. Seems to program the device (programming step reports good for sudo ./chip-update-firmware.sh -b -f.
  9. See LOG2.txt below

Questions

  1. Is there an easy way to use the Chrome flashing utility to write custom built images to the ChipPro? It seems like (for now) the only easy way to flash with my hardware is with Chrome.
  2. Do the CHIP-tools scripts use the same images as the Chrome flashing utility? If so, does this mean that the RaspberryPi flashing method is not correctly writing the images?
  3. Do you have any environment that will run on ARM? I have built an Intel Edison image that uses fastboot from the SDK Vagrant image. It completes a programming sequence, but with -b flag (buildroot image), the ChipPro still does not boot-- the log is just like LOG2.txt in looking for devicetree and kernel images but not finding them.
========== CHIPPRO UART LOG ===========
U-Boot SPL 2016.01 (Dec 01 2016 - 23:52:05)
DRAM: 256 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from
U-Boot 2016.01 (Dec 01 2016 - 23:52:05 +0000) Allwinner Technology
CPU: Allwinner A13 (SUN5I)
I2C: ready
DRAM: 256 MiB
NAND: 512 MiB
video-mode 720x480-24@60 not available, falling back to 1024x768-24@60
Setting up a 720x480i composite-ntsc console (overscan 40x20)
In: serial
Out: serial
Err: serial
Net: usb_ether
starting USB...
No controllers found
Hit any key to stop autoboot: 0
## Error: "test_fastboot" not defined
(FEL boot)
## Executing script at 43100000
Device 0: nand0, sector size 256 KiB
Page size 4096 b
OOB size 256 b
Erase size 262144 b
subpagesize 1024 b
options 0x40001000
bbt options 0x 8000
resetting ...
U-Boot SPL 2016.01 (Dec 01 2016 - 23:52:05)
DRAM: 256 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from
U-Boot 2016.01 (Dec 01 2016 - 23:52:05 +0000) Allwinner Technology
CPU: Allwinner A13 (SUN5I)
I2C: ready
DRAM: 256 MiB
NAND: 512 MiB
video-mode 720x480-24@60 not available, falling back to 1024x768-24@60
Setting up a 720x480i composite-ntsc console (overscan 40x20)
In: serial
Out: serial
Err: serial
Net: usb_ether
starting USB...
No controllers found
Hit any key to stop autoboot: 0
## Error: "test_fastboot" not defined
(FEL boot)
## Executing script at 43100000
NAND erase.chip: device 0 whole chip
Skipping bad block at 0x08f00000
Skipping bad block at 0x18000000
Skipping bad block at 0x18040000
Erasing at 0x1ffc0000 -- 100% complete.
OK
NAND write: 174080 bytes written: OK
NAND write: 174080 bytes written: OK
NAND write: device 0 offset 0x800000, size 0xc0000
786432 bytes written: OK
Enabling Splash
Configuring Video Mode
Saving Environment to NAND...
Erasing NAND...
Erasing at 0xfc0000 -- 100% complete.
Writing to NAND... OK
going to fastboot mode
musb-hdrc: peripheral reset irq lost!
[[[ Chip halts here ]]]
========== PROGRAMMING LOG ===========
vagrant@vagrant-ubuntu-trusty-32:~/CHIP-tools$ sudo ./chip-update-firmware.sh -b -f
== Buildroot selected ==
== Force clean and download ==
== preparing images ==
== New image available ==
== Downloading.. ==
--2017-06-02 15:42:20-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/spl-40000-1000-100.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.184.183
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.184.183|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 278528 (272K) [application/octet-stream]
Saving to: ‘spl-40000-1000-100.bin’
100%[===================================================================================================>] 278,528 185KB/s in 1.5s
2017-06-02 15:42:22 (185 KB/s) - ‘spl-40000-1000-100.bin’ saved [278528/278528]
--2017-06-02 15:42:22-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/spl-400000-4000-500.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 52.218.160.79
Connecting to opensource.nextthing.co (opensource.nextthing.co)|52.218.160.79|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4521984 (4.3M) [application/octet-stream]
Saving to: ‘spl-400000-4000-500.bin’
100%[===================================================================================================>] 4,521,984 1.38MB/s in 3.3s
2017-06-02 15:42:25 (1.33 MB/s) - ‘spl-400000-4000-500.bin’ saved [4521984/4521984]
--2017-06-02 15:42:25-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/spl-400000-4000-680.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 52.218.160.79
Connecting to opensource.nextthing.co (opensource.nextthing.co)|52.218.160.79|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4620288 (4.4M) [application/octet-stream]
Saving to: ‘spl-400000-4000-680.bin’
100%[===================================================================================================>] 4,620,288 1.38MB/s in 3.2s
2017-06-02 15:42:29 (1.38 MB/s) - ‘spl-400000-4000-680.bin’ saved [4620288/4620288]
--2017-06-02 15:42:29-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/sunxi-spl.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.169.43
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.169.43|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16384 (16K) [application/octet-stream]
Saving to: ‘sunxi-spl.bin’
100%[===================================================================================================>] 16,384 --.-K/s in 0.08s
2017-06-02 15:42:29 (212 KB/s) - ‘sunxi-spl.bin’ saved [16384/16384]
--2017-06-02 15:42:29-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/u-boot-dtb.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.169.43
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.169.43|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 620578 (606K) [application/octet-stream]
Saving to: ‘u-boot-dtb.bin’
100%[===================================================================================================>] 620,578 553KB/s in 1.1s
2017-06-02 15:42:30 (553 KB/s) - ‘u-boot-dtb.bin’ saved [620578/620578]
--2017-06-02 15:42:30-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/uboot-40000.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.169.43
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.169.43|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 786432 (768K) [application/octet-stream]
Saving to: ‘uboot-40000.bin’
100%[===================================================================================================>] 786,432 537KB/s in 1.4s
2017-06-02 15:42:32 (537 KB/s) - ‘uboot-40000.bin’ saved [786432/786432]
--2017-06-02 15:42:32-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/uboot-400000.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.169.43
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.169.43|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4194304 (4.0M) [application/octet-stream]
Saving to: ‘uboot-400000.bin’
100%[===================================================================================================>] 4,194,304 1.23MB/s in 3.5s
2017-06-02 15:42:36 (1.14 MB/s) - ‘uboot-400000.bin’ saved [4194304/4194304]
== Staging for NAND probe ==
Image Name: detect NAND
Created: Fri Jun 2 15:42:36 2017
Image Type: ARM Linux Script (uncompressed)
Data Size: 97 Bytes = 0.09 kB = 0.00 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 89 Bytes = 0.09 kB = 0.00 MB
waiting for fel.......OK
waiting for fel......OK
NAND detected:
nand_erasesize=40000
nand_oobsize=100
nand_writesize=1000
== Downloading new UBI, this will be cached for future flashes. ==
--2017-06-02 15:42:54-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/chip-40000-1000-100.ubi.sparse
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.184.231
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.184.231|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36438056 (35M) [binary/octet-stream]
Saving to: ‘chip-40000-1000-100.ubi.sparse’
100%[===================================================================================================>] 36,438,056 7.77MB/s in 8.0s
2017-06-02 15:43:03 (4.36 MB/s) - ‘chip-40000-1000-100.ubi.sparse’ saved [36438056/36438056]
Image Name: flash buildroot
Created: Fri Jun 2 15:43:03 2017
Image Type: ARM Linux Script (uncompressed)
Data Size: 1784 Bytes = 1.74 kB = 0.00 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 1776 Bytes = 1.73 kB = 0.00 MB
waiting for fel...OK
waiting for fastboot.................................TIMEOUT
failed to flash the UBI image
FLASH VERIFICATION FAILED.
TROUBLESHOOTING:
Is the FEL pin connected to GND?
Have you tried turning it off and turning it on again?
Did you run the setup script in CHIP-SDK?
Download could be corrupt, it can be re-downloaded by adding the '-f' flag.
[[[ end ]]]
===== CHIPPRO UART LOG =====
U-Boot SPL 2016.01 (Dec 01 2016 - 23:52:05)
DRAM: 256 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from
U-Boot 2016.01 (Dec 01 2016 - 23:52:05 +0000) Allwinner Technology
CPU: Allwinner A13 (SUN5I)
I2C: ready
DRAM: 256 MiB
NAND: 512 MiB
video-mode 720x480-24@60 not available, falling back to 1024x768-24@60
Setting up a 720x480i composite-ntsc console (overscan 40x20)
In: serial
Out: serial
Err: serial
Net: usb_ether
starting USB...
No controllers found
Hit any key to stop autoboot: 0
## Error: "test_fastboot" not defined
(FEL boot)
## Executing script at 43100000
Device 0: nand0, sector size 256 KiB
Page size 4096 b
OOB size 256 b
Erase size 262144 b
subpagesize 1024 b
options 0x40001000
bbt options 0x 8000
resetting ...
U-Boot SPL 2016.01 (Dec 01 2016 - 23:52:05)
DRAM: 256 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from
U-Boot 2016.01 (Dec 01 2016 - 23:52:05 +0000) Allwinner Technology
CPU: Allwinner A13 (SUN5I)
I2C: ready
DRAM: 256 MiB
NAND: 512 MiB
video-mode 720x480-24@60 not available, falling back to 1024x768-24@60
Setting up a 720x480i composite-ntsc console (overscan 40x20)
In: serial
Out: serial
Err: serial
Net: usb_ether
starting USB...
No controllers found
Hit any key to stop autoboot: 0
## Error: "test_fastboot" not defined
(FEL boot)
## Executing script at 43100000
NAND erase.chip: device 0 whole chip
Skipping bad block at 0x08f00000
Skipping bad block at 0x18000000
Skipping bad block at 0x18040000
Erasing at 0x1ffc0000 -- 100% complete.
OK
NAND write: 174080 bytes written: OK
NAND write: 174080 bytes written: OK
NAND write: device 0 offset 0x800000, size 0xc0000
786432 bytes written: OK
Enabling Splash
Configuring Video Mode
Saving Environment to NAND...
Erasing NAND...
Erasing at 0xfc0000 -- 100% complete.
Writing to NAND... OK
going to fastboot mode
musb-hdrc: peripheral reset irq lost!
Starting download of 33292340 bytes
..........................................................................
..........................................................................
..........................................................................
................................
downloading of 33292340 bytes finished
Flashing sparse image on partition UBI at offset 0x1000000 (ID: 0)
start 0x1000 blkcnt 0x1fc0 partition 0x1000 size 0x1f000
Writing at offset 0x1000000
New offset 0x2fc0000
........ wrote 8128 blocks to 'UBI'
status: -104 ep 'ep1in' trans: 4
Starting download of 3145780 bytes
........................
downloading of 3145780 bytes finished
Flashing sparse image on partition UBI at offset 0x2fc0000 (ID: 1)
start 0x2fc0 blkcnt 0x300 partition 0x1000 size 0x1f000
Writing at offset 0x2fc0000
New offset 0x32c0000
........ wrote 768 blocks to 'UBI'
status: -104 ep 'ep1in' trans: 4
[[[ Program complete ]]]
[[[ Power cycle device ]]]
U-Boot SPL 2016.01 (Dec 01 2016 - 23:52:05)
DRAM: 256 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from NAND
U-Boot 2016.01 (Dec 01 2016 - 23:52:05 +0000) Allwinner Technology
CPU: Allwinner A13 (SUN5I)
I2C: ready
DRAM: 256 MiB
NAND: 512 MiB
video-mode 720x480-24@60 not available, falling back to 1024x768-24@60
Setting up a 720x480i composite-ntsc console (overscan 40x20)
In: serial
Out: serial
Err: serial
Net: usb_ether
starting USB...
No controllers found
Hit any key to stop autoboot: 0
## Error: "test_fastboot" not defined
device nand0 <sunxi-nand.0>, # parts = 5
#: name size offset mask_flags
0: spl 0x00400000 0x00000000 0
1: spl-backup 0x00400000 0x00400000 0
2: uboot 0x00400000 0x00800000 0
3: env 0x00400000 0x00c00000 0
4: UBI 0x1f000000 0x01000000 0
active partition: nand0,0 - (spl) 0x00400000 @ 0x00000000
defaults:
mtdids : none
mtdparts: none
ubi0: attaching mtd1
ubi0: scanning is finished
ubi0: attached mtd1 (name "mtd=4", size 496 MiB)
ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes
ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 1024
ubi0: VID header offset: 1024 (aligned 1024), data offset: 4096
ubi0: good PEBs: 1981, bad PEBs: 3, corrupted PEBs: 0
ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1820931222
ubi0: available PEBs: 1803, total reserved PEBs: 178, PEBs reserved for bad PEB handling: 37
Loading file '/boot/ntc-gr8-crumb.dtb' to addr 0x43000000...
** File not found /boot/ntc-gr8-crumb.dtb **
Loading file '/boot/initrd.uimage' to addr 0x44000000...
** File not found /boot/initrd.uimage **
Loading file '/boot/zImage' to addr 0x42000000...
Done
Kernel image @ 0x42000000 [ 0x000000 - 0x693b48 ]
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
device nand0 <sunxi-nand.0>, # parts = 5
#: name size offset mask_flags
0: spl 0x00400000 0x00000000 0
1: spl-backup 0x00400000 0x00400000 0
2: uboot 0x00400000 0x00800000 0
3: env 0x00400000 0x00c00000 0
4: UBI 0x1f000000 0x01000000 0
active partition: nand0,0 - (spl) 0x00400000 @ 0x00000000
defaults:
mtdids : none
mtdparts: none
Unmounting UBIFS volume rootfs!
ubi0: detaching mtd1
ubi0: mtd1 is detached
ubi0: attaching mtd1
ubi0: scanning is finished
ubi0: attached mtd1 (name "mtd=4", size 496 MiB)
ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes
ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 1024
ubi0: VID header offset: 1024 (aligned 1024), data offset: 4096
ubi0: good PEBs: 1981, bad PEBs: 3, corrupted PEBs: 0
ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1820931222
ubi0: available PEBs: 1803, total reserved PEBs: 178, PEBs reserved for bad PEB handling: 37
Loading file '/boot/ntc-gr8-crumb.dtb' to addr 0x43000000...
** File not found /boot/ntc-gr8-crumb.dtb **
Loading file '/boot/zImage' to addr 0x42000000...
Done
Kernel image @ 0x42000000 [ 0x000000 - 0x693b48 ]
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
=>
[[[ hang ]]]
============== PROGRAMMING LOG =====================
pi@raspberrypi /v/i/s/CHIP-tools> sudo ./chip-update-firmware.sh -f -b
== Force clean and download ==
== Buildroot selected ==
== preparing images ==
== New image available ==
== Downloading.. ==
--2017-06-02 15:50:58-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/spl-40000-1000-100.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.168.171
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.168.171|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 278528 (272K) [application/octet-stream]
Saving to: ‘spl-40000-1000-100.bin’
spl-40000-1000-100.bin 100%[=============================================================================>] 272.00K 435KB/s in 0.6s
2017-06-02 15:50:59 (435 KB/s) - ‘spl-40000-1000-100.bin’ saved [278528/278528]
--2017-06-02 15:50:59-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/spl-400000-4000-500.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.168.171
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.168.171|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4521984 (4.3M) [application/octet-stream]
Saving to: ‘spl-400000-4000-500.bin’
spl-400000-4000-500.bin 100%[=============================================================================>] 4.31M 1.79MB/s in 2.4s
2017-06-02 15:51:01 (1.79 MB/s) - ‘spl-400000-4000-500.bin’ saved [4521984/4521984]
--2017-06-02 15:51:01-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/spl-400000-4000-680.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.168.171
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.168.171|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4620288 (4.4M) [application/octet-stream]
Saving to: ‘spl-400000-4000-680.bin’
spl-400000-4000-680.bin 100%[=============================================================================>] 4.41M 1.85MB/s in 2.4s
2017-06-02 15:51:04 (1.85 MB/s) - ‘spl-400000-4000-680.bin’ saved [4620288/4620288]
--2017-06-02 15:51:04-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/sunxi-spl.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.168.255
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.168.255|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16384 (16K) [application/octet-stream]
Saving to: ‘sunxi-spl.bin’
sunxi-spl.bin 100%[=============================================================================>] 16.00K --.-KB/s in 0.08s
2017-06-02 15:51:04 (212 KB/s) - ‘sunxi-spl.bin’ saved [16384/16384]
--2017-06-02 15:51:04-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/u-boot-dtb.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.168.255
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.168.255|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 620578 (606K) [application/octet-stream]
Saving to: ‘u-boot-dtb.bin’
u-boot-dtb.bin 100%[=============================================================================>] 606.03K 600KB/s in 1.0s
2017-06-02 15:51:06 (600 KB/s) - ‘u-boot-dtb.bin’ saved [620578/620578]
--2017-06-02 15:51:06-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/uboot-40000.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.168.255
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.168.255|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 786432 (768K) [application/octet-stream]
Saving to: ‘uboot-40000.bin’
uboot-40000.bin 100%[=============================================================================>] 768.00K 678KB/s in 1.1s
2017-06-02 15:51:07 (678 KB/s) - ‘uboot-40000.bin’ saved [786432/786432]
--2017-06-02 15:51:07-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/uboot-400000.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.168.255
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.168.255|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4194304 (4.0M) [application/octet-stream]
Saving to: ‘uboot-400000.bin’
uboot-400000.bin 100%[=============================================================================>] 4.00M 1.56MB/s in 2.6s
2017-06-02 15:51:10 (1.56 MB/s) - ‘uboot-400000.bin’ saved [4194304/4194304]
== Staging for NAND probe ==
Image Name: detect NAND
Created: Fri Jun 2 15:51:10 2017
Image Type: ARM Linux Script (uncompressed)
Data Size: 97 Bytes = 0.09 kB = 0.00 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 89 Bytes = 0.09 kB = 0.00 MB
waiting for fel.........OK
waiting for fel.....OK
NAND detected:
nand_erasesize=40000
nand_oobsize=100
nand_writesize=1000
== Downloading new UBI, this will be cached for future flashes. ==
--2017-06-02 15:51:29-- http://opensource.nextthing.co/chip/images/stable/buildroot/34/chip-40000-1000-100.ubi.sparse
Resolving opensource.nextthing.co (opensource.nextthing.co)... 52.218.160.79
Connecting to opensource.nextthing.co (opensource.nextthing.co)|52.218.160.79|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36438056 (35M) [binary/octet-stream]
Saving to: ‘chip-40000-1000-100.ubi.sparse’
chip-40000-1000-100.ubi.sparse 100%[=============================================================================>] 34.75M 6.10MB/s in 15s
2017-06-02 15:51:45 (2.28 MB/s) - ‘chip-40000-1000-100.ubi.sparse’ saved [36438056/36438056]
Image Name: flash buildroot
Created: Fri Jun 2 15:51:45 2017
Image Type: ARM Linux Script (uncompressed)
Data Size: 1784 Bytes = 1.74 kB = 0.00 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 1776 Bytes = 1.73 kB = 0.00 MB
waiting for fel...OK
waiting for fastboot.............OK
target reported max download size of 33554432 bytes
sending sparse 'UBI' (32512 KB)...
OKAY [ 2.853s]
writing 'UBI'...
OKAY [ 16.427s]
sending sparse 'UBI' (3072 KB)...
OKAY [ 0.281s]
writing 'UBI'...
OKAY [ 1.480s]
finished. total time: 21.041s
resuming boot...
OKAY [ 0.000s]
finished. total time: 0.000s
FLASH VERIFICATION COMPLETE.
# # #
#########
### ###
# {#} #
### '%######
# #
### ###
########
# # #
CHIP is ready to roll!
[[[ end ]]]
@howientc
Copy link

howientc commented Jun 6, 2017

Is there an easy way to use the Chrome flashing utility to write custom built images to the ChipPro? It seems like (for now) the only easy way to flash with my hardware is with Chrome.

Not at the current time.

Do the CHIP-tools scripts use the same images as the Chrome flashing utility? If so, does this mean that the RaspberryPi flashing method is not correctly writing the images?

The Raspberry Pi flashing method should be fine. The Chrome flasher does not use the sunxi-fel and fastboot programs, but the data that it sends are identical.

Do you have any environment that will run on ARM? I have built an Intel Edison image that uses fastboot from the SDK Vagrant image. It completes a programming sequence, but with -b flag (buildroot image), the ChipPro still does not boot-- the log is just like LOG2.txt in looking for devicetree and kernel images but not finding them.

Seems like your Raspberry Pi method is ok for ARM. We flash CHIPs (and CHIP Pros) from other CHIPS.

If you can, I'd make sure you're on the latest OSX - Apple completely rewrote their USB stack to deal with some of their issues (that not-recognizing fastboot for example).

Lastly, live-booting Ubuntu from a USB stick might be an option.

@howientc
Copy link

howientc commented Jun 7, 2017

Another thought:
You might be able to flash directly from OSX using just FEL.

First, you can grab an osx build of the sunxi-fel tool.
You'll also need to install libusb on your mac. Should be something like:
brew install libusb

In the CHIP-tools repository, there is a script called
chip-fel-flash.sh
You will need to modify the script so that the sunxi-fel tool is found (line 34):
e.g. instead of:
FEL=fel
make it
FEL=<path to sunxi-fel downloaded from above>

Then, I believe you'll be able to flash using FEL only, thus avoiding fastboot hiccups. It will, however take longer, because FEL works at USB 1.1 speeds instead of USB 2.0.

to do so, run
./chip-fel-flash -u <your buildroot output directory>

Note that the buildroot output directory is the one which has a subdirectory images in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment