CHIP Stuff
This page is a changing document. I’ll probably add more notes to it in the future.
These are just some notes that I’ve put together in the past about flashing and upgrading the CHIP (and Pocket CHIP) computer.
This device doesn’t have any first party support any more, and it’s not as powerful as Raspberry Pi, but it’s quite fun and the Pocket CHIP form-factor is great. If you can get hold of one, you should!
Erasing and re-flashing the CHIP
You can erase and factory flash a CHIP from your computer using this repo. It will completely erase the CHIP, so make sure you have anything important backed up.
First you need to jumper the CHIP in FEL mode. You can do this by connecting the FEL pin to any GND pin:
Next you can clone the repo and run the Flash.sh
:
git clone https://github.com/Thore-Krug/Flash-CHIP.git
cd Flash-CHIP
sudo chmod +x Flash.sh
./Flash.sh
Making APT work with a mirror of the NTC APT repository
This will replace the now defunct nextthing.co APT repositories with a mirror provided by chip.jfpossibilities.com
- Open
/etc/apt/sources.list
in your editorsudo nano /etc/apt/sources.list
- replace all instances of
opensource.nextthing.co
withchip.jfpossibilities.com
- remove
jessie-updates
repositories - change
jessie-backports
to:deb http://deb.debian.org/debian jessie-backports main contrib non-free deb-src http://deb.debian.org/debian jessie-backports main contrib non-free
- Disable
apt valid
check:echo 'Acquire::Check-Valid-Until "0";' | sudo tee /etc/apt/apt.conf.d/10-no-check-valid
- In
/etc/apt/preferences
replaceopensource.nextthing.co
withchip.jfpossibilities.com
- Lastly, make sure everything is up to date
sudo apt update sudo apt upgrade
Making APT work with a mainline Debian APT repository
This will replace all of the APT repositories with mainline Debian mirrors. This is best done on a fresh install.
- Open
/etc/apt/sources.list
in your editorsudo nano /etc/apt/sources.list
- Replace all lines of
sources.list
with the following (you can use a more local mirror rather than theftp.uk.debian.org
if you prefer):deb http://ftp.uk.debian.org/debian/ jessie main contrib non-free deb-src http://ftp.uk.debian.org/debian/ jessie main contrib non-free deb http://ftp.uk.debian.org/debian/ jessie-updates main contrib non-free deb-src http://ftp.uk.debian.org/debian/ jessie-updates main contrib non-free deb http://security.debian.org/ jessie/updates main contrib non-free deb-src http://security.debian.org/ jessie/updates main contrib non-free
- Make sure everything is up to date and install
apt-transport-https
as it will likely be missingsudo apt update sudo apt upgrade sudo apt install apt-transport-https
- Generate missing locales:
sudo apt install locales sudo locale-gen en_US en_US.UTF-8 sudo dpkg-reconfigure locales sudo dpkg-reconfigure tzdata
Don’t bother trying to dist-upgrade
to a newer Debian version as it tends to break stuff. 🤷
Installing a newer (> 3.7) version of Cmake on the CHIP
- Remove any version of
cmake
installed fromapt
sudo apt remove --purge --auto-remove cmake
- Download the “Unix/Linux Source” tar.gz from https://cmake.org/download/ (I’ve used the 3.15.0-rc1 — so long as it’s newer than 3.7 you should be fine)
- Decompress the tar.gz somewhere and
cd
to it. - Start the initial bootstrap
./bootstrap
- Set up a
swapfile
so that we can runmake
with our limited resources on the CHIPsudo su - dd if=/dev/zero of=/tmp/swapfile bs=1024 count=1048576 # 1gb swap file mkswap /tmp/swapfile chmod 600 /tmp/swapfile losetup /dev/loop0 /tmp/swapfile # create a loopback so we can use it swapon /dev/loop0 #double check that it is mounted cat /proc/swaps
- Start the build
make -j2 # j4 caused the CHIP to hang # will take a couple of hours... sudo make install
- After that, check that the new version of
cmake
is installed and workingcmake --version