[vc_row][vc_column width=”1/1″][vc_column_text]Arch Linux was founded by Canadian programmer Judd Vinet. Its first formal release, Arch Linux 0.1, was on March 11, 2002. Although Arch is completely independent, it draws inspiration from the simplicity of other distributions including Slackware, CRUX and BSD. In 2007, Judd Vinet stepped down as Project Lead to pursue other interests and was replaced by American programmer Aaron Griffin who continues to lead the project today.
In this post, we will look at how to build Archlinux image for pcDuino.
Before we start, please read the following tutorials, as we will base our work on these two posts:
- How to setup a X86-64 Virtual Box Cross Compilation Build Enviroment for pcDuino
- How to build linux images by yourself for pcDuino?
[/vc_column_text][vc_tour][vc_tab title=”Preparation” tab_id=”1388645852-1-63″][vc_column_text]We would need a x86-64 PC host to do the cross build, please refer to How to setup a X86-64 Virtual Box Cross Compilation Build Enviroment for pcDuino to setup the environment.
We also need a pcDuino to boot from a bootable SD (with lastest Lbuntu image) with capacity larger than 4GB.
[/vc_column_text][/vc_tab][vc_tab title=”Build Basic Image” tab_id=”1388645852-2-28″][vc_column_text]The operations described in this section is running on a X86-64 machine.
1. Build kernel. Please refer to: Cross build pcDuino kernel on X86-64 machine.
After finishing, we will get pcduino_a10_hwpack_YYYYMMDD.tar.xz in the output directory. It includes uImage and ko files. If you have downloaded kernel source files before, and haven’t used it for a while. We can use ‘$git pull’ under kernel directory to synchronize with the github.
2. Build basic image:
Download ArchLinux for Sun4i from archlinux website:
Create a blank img image file:
#dd if=/dev/zero of=archlinux.img bs=1M count=1800
Format the image to ext3 format:
#mke2fs -t ext3 archlinux.img
Mount the newly created image:
#sudo mount -t ext3 -o loop archlinux.img /mnt
#sudo tar xvf ArchLinuxARM-sun4i-latest.tar.gz -C /mnt
Next, we should replace kernel.
Firstly, we will unpack pcduino_a10_hwpack_XXXXXXXX.tar.xz under directory: kernel/output/.
#tar xvf pcduino_a10_hwpack_XXXXXX.tar.xz
#sudo rm /mnt/lib/modules/* -rf
#sudo cp rootfs/lib/modules/3.4.29+/ /mnt/lib/modules/ -rf
The extracted directory rootfs is used to replace the corresponding location under /mnt.
#sudo umount /mnt
Now we will move in to edit update.sh. The original copy of update.sh can be downloaded here.
We use the editor ‘nano’ to edit update.sh, and replace line 3 with “IMG=archlinux,img”:
Till now, we are done with the basic images:
The kernel: pcduino_a10_kernel_livesuit_xxxxxx.img is located under kernel/output. This file is to burned using Phoenixcard.
rootfs fles: archlinux.img and update.sh are located under ~/archlinux.
[/vc_column_text][/vc_tab][vc_tab title=”How to copy files from VirtualBox’s Ubuntu ” tab_id=”1388693476899-2-8″][vc_column_text]We can enable the USB disk 2.0 feature from settings. That way, when we plug in a USB drive to PC, the USB drive will show up under Virtual Box, and we can copy files out.
[/vc_column_text][/vc_tab][vc_tab title=”Burn the basic image” tab_id=”1388722472231-3-7″][vc_column_text]We can burn the newly generated images to pcDuino following Steps to Flash Ubuntu Images to pcDuino .
After it is done, we got: