PDK is the Platform Development Kit that we use for creating the PiDeck distro image, based on Debian GNU/Linux. Most people will prefer to start with a ready-made image, which you can download from the releases page.
These build instructions have been tested on Debian only. Ubuntu users may run into issue #2 with debootstrap. Pull requests to resolve this or any other issue you might encounter are welcome.
sudo apt install apt-transport-https
echo "deb https://apt.64studio.net stretch main" | sudo tee /etc/apt/sources.list.d/64studio.list
wget -qO - https://apt.64studio.net/archive-keyring.asc | sudo apt-key add -
sudo apt update
sudo apt install pdk pdk-mediagen make rng-tools
- Ignore the
rng-tools
service failing to start with "Cannot find a hardware RNG device to use." You won't need this to run as a service for now
- Make the APT repository key email address apt@your-domain where your-domain is the domain used by your project. For example we use pideck.com but you will be serving your own images from somewhere else.
- To enable automated builds later, either do not set a passphrase when you generate the key (less secure), or automate signing with gpg-preset-passphrase running on each boot. You will be prompted twice for the passphrase, if any.
sudo rngd -r /dev/urandom
gpg --gen-key
pdk workspace create pideck
cd pideck/
git remote add github https://github.com/pideck/pideck-distro.git
git pull github master
pdk channel update
pdk pull components
make local
pdk download pideck.xml
nano pideck.xml
nano Makefile
nano postinst.sh
make local
pdk download pideck.xml
pdk commit -m "A note about my changes"
- You only need to
pdk download pideck.xml
again if you have added packages in your modifications
make image
-
This step uses
sudo
, you will be prompted for your login password as well as your GnuPG passphrase, if you are using one. -
After some time, you should find the out.img file in your PDK workspace.
-
Use the
lsblk
command to identify the device of your microSD card writer before and after plugging it in, such as/dev/sdb
in the example below. If you get this device wrong, you could wipe your hard disk, so please be careful. -
Copy the image you created to a microSD card using the
dd
command (the status=progress option is helpful). Afterdd
has completed, use thesync
command before unplugging:
sudo dd status=progress bs=4M if=tmp/out.img of=/dev/sdb conv=fsync
sync
- Or try bmap-tools to create checksums for your image and potentially make it easier to deploy. Your users may prefer using Etcher which is a GUI program.
Please see the PDK project on GitHub for more details of how to use PDK.