C.H.I.P. flashing HOWTO

Index, feed.

[ Date | 2017-09-23 12:36 -0400 ]
[ Mod. | 2017-09-30 11:03 -0400 ]
Chip computer wireless module

Chip computer wireless module

From time to time, my Chips don't survive a power failure. They have to be reflashed before they can boot again.

Steps

  1. Use a jump wire to connect GND to FEL;

  2. connect Chip to computer, the following device should appear in lsusb's output:

    Bus 001 Device 051: ID 1f3a:1010 Onda (unverified)
  3. from a checkout of https://github.com/NextThingCo/CHIP-tools, run:

    ./chip-update-firmware.sh -s
  4. remove jump wire, reboot, connect using screen /dev/ttyACM0 115200.

Note: perhaps pass -f as well to force downloading fresh image files.

Success output

Note: it's just one of the writing 'UBI'... steps that takes most of the time. There is also a long run of null bytes at the start of the ==Downloading new UBI line (== Cached UBI located == for subsequent runs).

== Reset after flash ==
== Force clean and download ==
== Server selected ==
== preparing images ==
== New image available ==
== Downloading.. ==
— 2017-09-23 12:11:00 — http://opensource.nextthing.co/chip/images/stable/server/149/spl-40000-1000-100.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.177.11
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.177.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 278528 (272K) [application/octet-stream]
Saving to: `spl-40000-1000-100.bin'

     0K .......... .......... .......... .......... .......... 18%  292K 1s
[...]
   250K .......... .......... ..                              100%  377K=0.7s

2017-09-23 12:11:01 (416 KB/s) - `spl-40000-1000-100.bin' saved [278528/278528]

— 2017-09-23 12:11:01 — http://opensource.nextthing.co/chip/images/stable/server/149/spl-400000-4000-500.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.177.11
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.177.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4521984 (4.3M) [application/octet-stream]
Saving to: `spl-400000-4000-500.bin'

     0K .......... .......... .......... .......... ..........  1%  153K 29s
[...]
  4400K .......... ......                                     100% 2.10M=3.4s

2017-09-23 12:11:05 (1.28 MB/s) - `spl-400000-4000-500.bin' saved [4521984/4521984]

— 2017-09-23 12:11:05 — http://opensource.nextthing.co/chip/images/stable/server/149/spl-400000-4000-680.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.177.3
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.177.3|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4620288 (4.4M) [application/octet-stream]
Saving to: `spl-400000-4000-680.bin'

     0K .......... .......... .......... .......... ..........  1%  289K 15s
[...]
  4500K .......... ..                                         100% 2.19M=2.9s

2017-09-23 12:11:08 (1.50 MB/s) - `spl-400000-4000-680.bin' saved [4620288/4620288]

— 2017-09-23 12:11:08 — http://opensource.nextthing.co/chip/images/stable/server/149/sunxi-spl.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.177.3
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.177.3|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16384 (16K) [application/octet-stream]
Saving to: `sunxi-spl.bin'

     0K .......... ......                                     100%  182K=0.09s

2017-09-23 12:11:09 (182 KB/s) - `sunxi-spl.bin' saved [16384/16384]

— 2017-09-23 12:11:09 — http://opensource.nextthing.co/chip/images/stable/server/149/u-boot-dtb.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.177.3
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.177.3|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 625858 (611K) [application/octet-stream]
Saving to: `u-boot-dtb.bin'

     0K .......... .......... .......... .......... ..........  8%  297K 2s
[...]
   600K .......... .                                          100% 2.55M=0.8s

2017-09-23 12:11:10 (733 KB/s) - `u-boot-dtb.bin' saved [625858/625858]

— 2017-09-23 12:11:11 — http://opensource.nextthing.co/chip/images/stable/server/149/uboot-40000.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.185.55
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.185.55|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 786432 (768K) [application/octet-stream]
Saving to: `uboot-40000.bin'

     0K .......... .......... .......... .......... ..........  6%  126K 6s
[...]
   750K .......... ........                                   100% 1.94M=1.4s

2017-09-23 12:11:12 (531 KB/s) - `uboot-40000.bin' saved [786432/786432]

— 2017-09-23 12:11:12 — http://opensource.nextthing.co/chip/images/stable/server/149/uboot-400000.bin
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.185.55
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.185.55|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4194304 (4.0M) [application/octet-stream]
Saving to: `uboot-400000.bin'

     0K .......... .......... .......... .......... ..........  1%  294K 14s
[...]
  4050K .......... .......... .......... .......... ......    100% 2.05M=2.7s

2017-09-23 12:11:15 (1.50 MB/s) - `uboot-400000.bin' saved [4194304/4194304]

== Staging for NAND probe ==
Image Name:   detect NAND
Created:      Sat Sep 23 12:11:15 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=400000
nand_oobsize=500
nand_writesize=4000
== Downloading new UBI, this will be cached for future flashes. ==
— 2017-09-23 12:11:24 — http://opensource.nextthing.co/chip/images/stable/server/149/chip-400000-4000-500.ubi.sparse
Resolving opensource.nextthing.co (opensource.nextthing.co)... 54.231.169.63
Connecting to opensource.nextthing.co (opensource.nextthing.co)|54.231.169.63|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 310378536 (296M) [binary/octet-stream]
Saving to: `chip-400000-4000-500.ubi.sparse'

     0K .......... .......... .......... .......... ..........  0%  297K 16m59s
[...]
303100K ....                                                  100% 31.6M=2m30s

2017-09-23 12:13:54 (1.98 MB/s) - `chip-400000-4000-500.ubi.sparse' saved [310378536/310378536]

Image Name:   flash server
Created:      Sat Sep 23 12:13:54 2017
Image Type:   ARM Linux Script (uncompressed)
Data Size:    1758 Bytes = 1.72 kB = 0.00 MB
Load Address: 00000000
Entry Point:  00000000
Contents:
   Image 0: 1750 Bytes = 1.71 kB = 0.00 MB
waiting for fel...OK
waiting for fastboot.................OK
target reported max download size of 33554432 bytes
sending sparse 'UBI' (28672 KB)...
OKAY [  2.040s]
writing 'UBI'...
OKAY [  3.316s]
sending sparse 'UBI' (28672 KB)...
OKAY [  2.144s]
writing 'UBI'...
OKAY [  9.064s]
sending sparse 'UBI' (28672 KB)...
OKAY [  2.038s]
writing 'UBI'...
OKAY [ 20.539s]
sending sparse 'UBI' (28672 KB)...
OKAY [  2.134s]
writing 'UBI'...
OKAY [ 20.507s]
sending sparse 'UBI' (28672 KB)...
OKAY [  1.922s]
writing 'UBI'...
OKAY [ 20.501s]
sending sparse 'UBI' (28672 KB)...
OKAY [  2.143s]
writing 'UBI'...
OKAY [ 20.531s]
sending sparse 'UBI' (28672 KB)...
OKAY [  2.068s]
writing 'UBI'...
OKAY [ 20.641s]
sending sparse 'UBI' (28672 KB)...
OKAY [  1.952s]
writing 'UBI'...
OKAY [ 20.675s]
sending sparse 'UBI' (28672 KB)...
OKAY [  2.019s]
writing 'UBI'...
OKAY [ 20.485s]
sending sparse 'UBI' (28672 KB)...
OKAY [  2.153s]
writing 'UBI'...
OKAY [ 20.712s]
sending sparse 'UBI' (16384 KB)...
OKAY [  1.135s]
writing 'UBI'...
OKAY [  4.336s]
finished. total time: 203.056s
resuming boot...
OKAY [  0.000s]
finished. total time: 0.000s


FLASH VERIFICATION COMPLETE.


   #  #  #
  #########
###       ###
  # {#}   #
###  '%######
  #       #
###       ###
  ########
   #  #  #


CHIP is ready to roll!

real    4m15.583s
user    0m0.104s
sys     0m0.220s

Notes

Output from ./chip-update-firmware.sh -h:

  -s  --  Server             [Debian + Headless]
  -g  --  GUI                [Debian + XFCE]
  -p  --  PocketCHIP         [CHIP on the go!]
  -b  --  Buildroot          [Tiny, but powerful]
  -f  --  Force clean        [re-download if applicable]
  -n  --  No limit           [enable greater power draw]
  -r  --  Reset              [reset device after flash]
  -B  --  Branch             [eg. -B testing]
  -N  --  Build#             [eg. -N 150]
  -F  --  Format             [eg. -F Toshiba_4G_MLC]
  -L  --  Local              [eg. -L ../img/buildroot/]

www.kurokatta.org


www.kurokatta.org

Quick links:

Photos
Montréal
Oregon
Paris
Camp info 2007
Camp Faécum 2007
--more--
Doc
Jussieu
Japanese adjectives
Muttrc
Bcc
Montréal
Couleurs LTP
French English words
Petites arnaques
--more--
Hacks
Statmail
DSC-W17 patch
Scarab: dictionnaire de Scrabble
Sigpue
Recipes
Omelette soufflée au sirop d'érable
Camembert fondu au sirop d'érable
La Mona de Tata Zineb
Cake aux bananes, au beurre de cacahuètes et aux pépites de chocolat
*