Notes on the PocketCHIP handheld (if you're coming to it new in 2019)

There's what's presumably new old stock of NTC CHIP chips and PocketCHIP handhelds circulating, and I picked up a PocketCHIP, having missed them the first time around. I had a CHIP and backed up much of NTC's information myself, so let's just put everything to understand the PocketCHIP in one place.

There's a few different ways to flash your CHIP, check Reddit or the wiki for the latest options.

Note that you don't need to remove the CHIP from your PocketCHIP to flash it; you can jumper the FEL to any GROUND using the header holes at the top.


b126's BUILD_ID


b667's BUILD_ID

Unclear if any differences

The U-Boot version differences (00115 v. 00119) and hashes (g5f814bb v. g2b4a5dd) don't align with standard U-Boot release numbers or with commits in either the mainline U-Boot repository or the preserved NTC CHIP U-Boot repository. It's unclear if there are any practical differences, given the builds are only about a month apart.

There are no NTC packages to upgrade with either b126 or b667 except for PICO-8, which has since had a first-party update from Lexaloffle anyway. This means once flashed, you only need to specify the stock Debian Jessie archive and security repositories in your apt configuration.

Under b126, there are 208 other Debian packages to upgrade (205 with three held back due to additional dependencies). Under b667, there are 206 other Debian packages to upgrade (203 with the same three held back due to additional dependencies. Once either one is upgraded, both should be identical.

The three held back packages can be installed manually, or you can use sudo apt-get --with-new-pkgs upgrade to include them. There doesn't appear to be any point to preserving the package pinning.

Given that you can restore the boot animation, and all the rest of the software on the system comes from the Debian repositories, I'm not sure there's any reason to stick with the stock image or bother with the "testing" image.

Restoring the boot animation after flashing

Boot animations are provided by a program called Plymouth. With a stock PocketCHIP, you'll see a CHIP splash image, and then an animated progress bar that fills in pink. After flashing, the splash image may show briefly, but then it'll be just scrolling Linux kernel text.

A post in this archived forum thread basically says you need to add the quiet lpj=501248 loglevel=3 splash plymouth.ignore-serial-consoles parameters (back) to the kernel boot command.

You can do this with a serial cable by interrupting the U-Boot boot process, but it's not actually necessary, and these instructions are the same regardless of the brand or size of NAND your CHIP has, or which build you've flashed with.

From Terminal or serial console, sudo nano /etc/fw_env.config, and type the line /dev/mtdblock3 0 0x400000 0x4000. Ctrl-O, Enter to save, Ctrl-X to exit. Then, sudo fw_printenv bootargs to see what the current boot command is (it should match the output of cat /proc/cmdline).

To change it, sudo fw_setenv bootargs root=ubi0:rootfs rootfstype=ubifs rw ubi.mtd=4 quiet loglevel=3 splash plymouth.ignore-serial-consoles. We're leaving out the lpj=501248 as we're assuming that the later firmware discovered it didn't need to set loops per jiffy. We're removing earlyprintk because we're silencing everything, so early kernel output won't still show up on the screen and interrupt the animation.

To make sure it was set, run sudo fw_printenv bootargs again. Then, reboot.

Updating Debian packages

Configure your wifi, then from Terminal (an external USB keyboard is recommended):

$ cd /usr/lib/apt/methods/
$ sudo ln -s http https
$ sudo rm /etc/apt/preferences
$ sudo nano /etc/apt/apt.conf
$ cat /etc/apt/apt.conf
Acquire::Check-Valid-Until "false";
$ sudo nano /etc/apt/sources.list
$ cat /etc/apt/sources.list
deb jessie main contrib non-free
deb jessie/updates main contrib non-free
deb jessie-backports main contrib non-free
$ sudo apt-get update
$ sudo apt-get install apt-transport-https
$ sudo apt-get --with-new-pkgs upgrade

Configure locales and time zones so other software doesn't complain:

$ sudo apt-get install locales
$ sudo dpkg-reconfigure locales
$ sudo dpkg-reconfigure tzdata

Change the hostname from chip to pocketchip:

$ sudo nano /etc/hostname
$ cat /etc/hostname
$ sudo nano /etc/hosts
$ cat /etc/hosts       pocketchip       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters
$ sudo /etc/init.d/avahi-daemon restart

Optionally, add SSH:

$ sudo apt-get install openssh-server openssh-client

Because Debian Jessie is EOL, once updated, you shouldn't have to update it ever again. All packages installed should be the final ones.

I'm Vitorio, it's April 27, 2019, thanks for your time.