]> pere.pagekite.me Git - homepage.git/blobdiff - blog/data/2013-10-27-vmdebootstrap-rpi.txt
Fix typo in URL.
[homepage.git] / blog / data / 2013-10-27-vmdebootstrap-rpi.txt
index 150502d8e0c9d0859df4f50fdeaa6187afe65ea4..726a4ed6d86d6aa55cd9d74cb8ab3be453475782 100644 (file)
@@ -1,5 +1,5 @@
 Title: Teaching vmdebootstrap to create Raspberry Pi SD card images
-Tags: english, freedombox, mesh network
+Tags: english, debian, freedombox, mesh network
 Date: 2013-10-27 17:00
 
 <p>The
@@ -9,22 +9,24 @@ create a image file, add a partition table, mount it and run
 debootstrap in the mounted directory to create a Debian system on a
 stick.  Yesterday, I decided to try to teach it how to make images for
 <a href="https://wiki.debian.org/RaspberryPi">Raspberry Pi</a>, as part
-of a plan to simplify the build system for the FreedomBox project.
-The FreedomBox project already uses vmdebootstrap for the virtualbox
-images, but its home made multistrap based system for Dreamplug
-images, and it is lacking support for Raspberry Pi.</p>
+of a plan to simplify the build system for
+<a href="https://wiki.debian.org/FreedomBox">the FreedomBox
+project</a>.  The FreedomBox project already uses vmdebootstrap for
+the virtualbox images, but its current build system made multistrap
+based system for Dreamplug images, and it is lacking support for
+Raspberry Pi.</p>
 
 <p>Armed with the knowledge on how to build "foreign" (aka non-native
 architecture) chroots for Raspberry Pi, I dived into the vmdebootstrap
 code and adjusted it to be able to build armel images on my amd64
 Debian laptop.  I ended up giving vmdebootstrap five new options,
 allowing me to replicate the image creation process I use to make
-<a href=http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html"">Debian
+<a href="http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html">Debian
 Jessie based mesh node images for the Raspberry Pi</a>.  First, the
 <tt>--foreign /path/to/binfm_handler</tt> option tell vmdebootstrap to
 call debootstrap with --foreign and to copy the handler into the
 generated chroot before running the second stage.  This allow
-vmdebootstrap to create armel images on a amd64 host.  Next I added
+vmdebootstrap to create armel images on an amd64 host.  Next I added
 two new options <tt>--bootsize size</tt> and <tt>--boottype
 fstype</tt> to teach it to create a separate /boot/ partition with the
 given file system type, allowing me to create an image with a vfat
@@ -34,7 +36,7 @@ Debian base system packages installed.  Finally, I added an option
 <tt>--no-extlinux</tt> to tell vmdebootstrap to not install extlinux
 as a boot loader.  It is not needed on the Raspberry Pi and probably
 most other non-x86 architectures.  The changes were accepted by the
-upstream author of vmdebootstrap yesterday and today, and am now
+upstream author of vmdebootstrap yesterday and today, and is now
 available from
 <a href="http://git.liw.fi/cgi-bin/cgit/cgit.cgi/vmdebootstrap/">the
 upstream project page</a>.</p>
@@ -49,7 +51,7 @@ list:</p>
 set -e # Exit on first error
 rootdir="$1"
 cd "$rootdir"
-cat <<EOF > etc/apt/sources.list
+cat &lt;&lt;EOF > etc/apt/sources.list
 deb http://http.debian.net/debian/ jessie main contrib non-free
 EOF
 # Install non-free binary blob needed to boot Raspberry Pi.  This
@@ -94,7 +96,10 @@ sudo ./vmdebootstrap \
 <p>The list of packages being installed are the ones needed by
 rpi-update to make the image bootable on the Raspberry Pi, with the
 exception of netbase, which is needed by debootstrap to find
-/etc/hosts with the minbase variant.</p>
+/etc/hosts with the minbase variant.  I really wish there was a way to
+set up an Raspberry Pi using only packages in the Debian archive, but
+that is not possible as far as I know, because it boots from the GPU
+using a non-free binary blob.</p>
 
 <p>The build host need debootstrap, kpartx and qemu-user-static and
 probably a few others installed.  I have not checked the complete