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

Difference between revisions of "Rock/debian"

(rootfs)
 
(One intermediate revision by the same user not shown)
Line 31: Line 31:
 
  EOF
 
  EOF
  
 +
Add file system table
 
  cat <<EOF >> /etc/fstab
 
  cat <<EOF >> /etc/fstab
 
  none    /tmp    tmpfs  defaults,noatime,mode=1777 0 0
 
  none    /tmp    tmpfs  defaults,noatime,mode=1777 0 0
 
  EOF
 
  EOF
  
 +
Add the host name
 
  echo "radxa-debian" > /etc/hostname
 
  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
 
  export LANG=C
 
  apt-get update
 
  apt-get update
 
  apt-get install locales
 
  apt-get install locales
 
  dpkg-reconfigure locales
 
  dpkg-reconfigure locales
  apt-get install ssh wireless-tools usbutils wpasupplicant
+
  apt-get install ssh wireless-tools usbutils wpasupplicant   # install other packages as you like
  
  echo "T0:2345:respawn:/sbin/getty -L ttyFIQ0 115200 vt100" >> /etc/inittab
+
Set root password.
 +
  passwd
 +
Now we are done with the rootfs.
 +
exit
 +
 
 +
Umount the rootfs.ext4, yo now get the Debian rootfs.
 +
sudo umount /mnt

Latest revision as of 11:31, 21 January 2015

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

Set root password.

passwd

Now we are done with the rootfs.

exit

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

sudo umount /mnt