Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rock/debian

< Rock
Revision as of 11:29, 21 January 2015 by Hipboi (Talk | contribs)

This page describe how to make a Debian image for radxa rock/pro/lite.

We can use debootstrap to create a Debian rootfs.

First install qemu-user-staic if you haven't

sudo apt-get install qemu-user-static binfmt-support

Generate the image

dd if=/dev/zero of=rootfs.ext4 bs=1M count=1024
mkfs.ext4 -F -L linuxroot rootfs.ext4
sudo mount -o loop rootfs.ext4 /mnt

Start the bootstrap

cd /mnt
export distro=wheezy
sudo debootstrap --arch=armhf --foreign $distro .
sudo cp /usr/bin/qemu-arm-static ./usr/bin/
sudo chroot .
/debootstrap/debootstrap --second-stage

Add source.list

export distro=wheezy
cat <<EOF > /etc/apt/sources.list
deb http://http.debian.net/debian $distro main contrib non-free
deb-src http://http.debian.net/debian $distro main contrib non-free
deb http://http.debian.net/debian $distro-updates main contrib non-free
deb-src http://http.debian.net/debian $distro-updates main contrib non-free
deb http://security.debian.org/debian-security $distro/updates main contrib non-free
deb-src http://security.debian.org/debian-security $distro/updates main contrib non-free
EOF

Add file system table

cat <<EOF >> /etc/fstab
none    /tmp    tmpfs   defaults,noatime,mode=1777 0 0
EOF

Add the host name

echo "radxa-debian" > /etc/hostname

enable serial console

echo "T0:2345:respawn:/sbin/getty -L ttyFIQ0 115200 vt100" >> /etc/inittab

setup the locale and install some packages

export LANG=C
apt-get update
apt-get install locales
dpkg-reconfigure locales
apt-get install ssh wireless-tools usbutils wpasupplicant   # install other packages as you like

Now we are done with the rootfs.

exit

Umount the rootfs.ext4, yo now get the Debian rootfs.

sudo umount /mnt