This guide is mainly written as a reminder for the PiNet team on the process of building SD card images for PiNet.
WARNING - This guide was written mainly for myself to on steps to build the SD card boot files. The guide may be missing parts or may be out of date. This guide is not an officially supported piece of documentation, follow at your own risk.
sudo ltsp-chroot
.apt-get update
.overlay
is in /opt/ltsp/armhf/etc/initramfs-tools/modules
.wget http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/download/head:/ltsp-20111101201947-dgapvhpfim127xu6-2/ltsp -O /opt/ltsp/armhf/usr/share/initramfs-tools/scripts/init-bottom/ltsp
.apt-get install linux-image-rpi-rpfv linux-image-rpi2-rpfv
in the Raspbian chroot. If you need to regenerate the initramfs’s, uses sudo ltsp-chroot update-initramfs -k all -u
.apt-get install raspberrypi-bootloader
.exit
.git clone https://github.com/PiNet/PiNet.git --depth 1
.mkdir newBootFiles
.cp -r PiNet/boot/* newBootFiles/
cd /opt/ltsp/armhf/boot
followed by cp -r bcm2708-rpi-b.dtb bcm2708-rpi-b-plus.dtb bcm2709-rpi-2-b.dtb bootcode.bin overlays start_cd.elf start.elf start_x.elf fixup_cd.dat fixup.dat fixup_x.dat /home/$USER/newBootFiles/
then cd
.cd /opt/ltsp/armhf/boot
followed by cp vmlinuz-3.18.0-trunk-rpi vmlinuz-3.18.0-trunk-rpi2 initrd.img-3.18.0-trunk-rpi initrd.img-3.18.0-trunk-rpi2 /home/$USER/newBootFiles/
then cd
.This section is kept for reference but is no longer needed.
In the 3.18 kernel release, overlayfs was renamed to overlay, which breaks LTSP support for it. We must manually fetch a more up to date version of the script.
mkdir pi1Initrd
.cp initrd.img-3.18.0-trunk-rpi pi1Initrd/
.cd pi1Initrd
.gzip -dc initrd.img-3.18.0-trunk-rpi | cpio -id
.rm -f initrd.img-3.18.0-trunk-rpi
.wget http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/download/head:/ltsp-20111101201947-dgapvhpfim127xu6-2/ltsp -O /home/$USER/ltsp-script
.cp /home/$USER/ltsp-script /home/$USER/newBootFiles/pi1Initrd/scripts/init-bottom/ltsp
find . | cpio -o -H newc | gzip -9 > ../initrd.img-3.18.0-trunk-rpi
.The boot files should now be ready. Verify the cmdline files have 1.1.1.1 in them and that the config.txt files are correct. Then copy to an SD card and test.