Difference between revisions of "Rock/debian"
< Rock
(Created page with "This page describe how to make a Debian image for radxa rock/pro/lite. == rootfs == We can use debootstrap to create a Debian rootfs. First install qemu-user-staic if you ha...") |
(→rootfs) |
||
Line 1: | Line 1: | ||
This page describe how to make a Debian image for radxa rock/pro/lite. | This page describe how to make a Debian image for radxa rock/pro/lite. | ||
− | |||
We can use debootstrap to create a Debian rootfs. | We can use debootstrap to create a Debian rootfs. | ||
First install qemu-user-staic if you haven't | First install qemu-user-staic if you haven't | ||
− | sudo apt-get install qemu-user-static | + | 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''' | export distro='''wheezy''' | ||
− | |||
sudo debootstrap --arch=armhf --foreign $distro . | sudo debootstrap --arch=armhf --foreign $distro . | ||
sudo cp /usr/bin/qemu-arm-static ./usr/bin/ | sudo cp /usr/bin/qemu-arm-static ./usr/bin/ | ||
Line 38: | Line 41: | ||
apt-get install locales | apt-get install locales | ||
dpkg-reconfigure locales | dpkg-reconfigure locales | ||
− | apt-get install wireless-tools usbutils wpasupplicant | + | apt-get install ssh wireless-tools usbutils wpasupplicant |
echo "T0:2345:respawn:/sbin/getty -L ttyFIQ0 115200 vt100" >> /etc/inittab | echo "T0:2345:respawn:/sbin/getty -L ttyFIQ0 115200 vt100" >> /etc/inittab |
Revision as of 11:26, 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
cat <<EOF >> /etc/fstab none /tmp tmpfs defaults,noatime,mode=1777 0 0 EOF
echo "radxa-debian" > /etc/hostname
export LANG=C apt-get update apt-get install locales dpkg-reconfigure locales apt-get install ssh wireless-tools usbutils wpasupplicant
echo "T0:2345:respawn:/sbin/getty -L ttyFIQ0 115200 vt100" >> /etc/inittab