Notice: Radxa Wiki is no longer maintained and content is for reference only. Please visit the latest Radxa Documentation site:
docs.radxa.com
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...") |
|||
| (2 intermediate revisions by the same user not shown) | |||
| 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 28: | 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 wireless-tools usbutils wpasupplicant | + | 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 | ||
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
