I wrote this guide because after getting my CubieBoard 1 I followed the Arch Linux ARM instructions and was suprised to be left with a system that albeit working, had missing RAM and no fbconsole at all.
This guide gets Arch Linux ARM into your 1GB Cubieboard 1 with the minimum functionality one would expect. It is not intended to be an all encompassing document, focusing instead on saving your time having to read through the forum to get functionality that otherwise every other Linux distribution brings out of box.
You will have to adjust these instructions if you have a 512M Cubieboard.
At a minimum, you need to create the first partition on an SD card to store the bootloader files and kernel uImage. For the root filesystem you can choose to use either a second partition on the SD card, USB or SATA. This guide however only covers SD. Replace instances of /dev/mmcblkX with the appropriate device name registered on your system.
Use fdisk to partition, then format the SD card. The first partition as 32MB FAT, the second as ext4. It is suggested that the first partition start after block 2048.
REMEMBER TO MKFS BOTH partitions accordingly
Download the cubieboard bootloader tarball, and write the bootloader to disk
Note: The Arch original bootloader package does not initialise the full 1GB of RAM. In order to get that you need to get the latest Bootloader files from Sunxi.
mkdir arch_arm_temp
cd arch_arm_temp
mkdir sunxi
wget http://dl.linux-sunxi.org/users/amery/testing-3.4/latest/cubieboard_hwpack.tar.xz
tar tf cubieboard_hwpack.tar.xz -C sunxi
dd if=sunxi/bootloader/sunxi-spl.bin of=/dev/mmcblkX bs=1024 seek=8
dd if=sunxi/bootloader/u-boot.bin of=/dev/mmcblkX bs=1024 seek=32
Get the standard Arch instalation files.
wget http://archlinuxarm.org/os/sunxi/cubieboard-bootloader.tar.gz
tar xzf cubieboard-bootloader.tar.gz
Download the root filesystem tarball and extract it (as root, or sudo su) to the ext4 partition on the SD card. It is important to do this as root, as special files need to be created as part of the filesystem that can only be created by root. Then, copy the kernel uImage to the boot partition
mkdir boot
mkdir arch
mount /dev/mmcblkXp1 boot
mount /dev/mmcblkXp2 arch
wget http://archlinuxarm.org/os/ArchLinuxARM-sun4i-latest.tar.gz
tar -zxf ArchLinuxARM-sun4i-latest.tar.gz -C ./arch
cp ./arch/boot/uImage ./boot/uImage
Copy the compiled FEX and uEnv.txt to /boot
cp cubieboard/cubieboard*.bin ./boot/
cp cubieboard/uEnv.txt ./boot/uEnv.txt
NOTE THE FOLLOWING CHANGES ARE RELATED TO GETTING AN DVI MONITOR CONNECTED TO THE CUBIEBOARD HDMI PORT Since I don't have an HDMI capable monitor I have no clue what happens to the box when you plug it to a HDMI connector...
Also note these steps will disable HDMI audio but at least your monitor should be working
Configure Arch to load the required modules on boot.
vi arch/etc/modules-load.d/cubie.conf
Add the following contents.
# Enable video on boot
fbcon
lcd
hdmi
disp
disp_ump
ump
# If you want to enable the board Status leds uncomment the line bellow. The box will light up a green led upon boot...
leds_sunxi
Modify bootloader configuration to enable HDMI-> DVI on boot.
vi boot/uEnv.txt
Ensure it has the following contents
boot_mmc=fatload mmc 0 0x43000000 ${fexfile}; fatload mmc 0 0x48000000 ${kernel}; bootm 0x48000000
console=tty0
extraargs=console=tty0 disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=0 rootwait mac_addr=00:CE:39:B7:74:4E
fexfile=cubieboard.bin
Please note the original Arch entry uses ethaddr
instead of mac_addr
. For some reason the original syntax did not work for me
sync
umount /dev/mmcblkX*
Insert into the CubieBoard, and power it on.
You should be able to login to the box using ssh as root/root or the console. Remember to:
- passwd
- pacman -Syu
- vi /etc/hostname
- etc etc etc
in step 2, you are only testing the tar, instead of extracting it ....