Cubieboard 1 revised Installation howto

This forum is for supported devices using an ARMv7 Allwinner SoC.

Cubieboard 1 revised Installation howto

Postby trixpan » Tue May 13, 2014 2:56 am

Intro Notes
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.

you can find updated versions of this instructions on https://gist.github.com/trixpan/6ff425f65d736b07aecf

Step 1 - Format disk your SD Card
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


Step 2 - Installing the cubieboard bootloader

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.


$this->bbcode_second_pass_code('', '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.


$this->bbcode_second_pass_code('', 'wget http://archlinuxarm.org/os/sunxi/cubieboard-bootloader.tar.gz
tar xzf cubieboard-bootloader.tar.gz')


Step 3 - Copying files to the SD Card
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

$this->bbcode_second_pass_code('', '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

$this->bbcode_second_pass_code('', 'cp cubieboard/cubieboard*.bin ./boot/
cp cubieboard/uEnv.txt ./boot/uEnv.txt
')

Step 4 - Enabling DVI on BOOT
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.

$this->bbcode_second_pass_code('', 'vi arch/etc/modules-load.d/cubie.conf
')

Add the following contents.

$this->bbcode_second_pass_code('', '# 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.


$this->bbcode_second_pass_code('', 'vi boot/uEnv.txt')


Ensure it has the following contents


$this->bbcode_second_pass_code('', '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

Step 5 - Unmount the drive


$this->bbcode_second_pass_code('', 'sync
umount /dev/mmcblkX*
')

Step 6 - Finishing it up
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
trixpan
 
Posts: 1
Joined: Tue May 13, 2014 2:46 am

Re: Cubieboard 1 revised Installation howto

Postby tcorb » Mon May 26, 2014 9:34 pm

Hi,

Thanks for your effort to make a revised version of the installation.... but, I still get 512Mb of RAM instead of 1Gb.

With the u-boot from sunxi, it prints out :

$this->bbcode_second_pass_code('', 'U-Boot 2012.10-04280-g1a8ac55 (May 22 2013 - 22:16:08) Allwinner Technology

CPU: SUNXI Family
Board: Cubieboard
I2C: ready
DRAM: 512 MiB
MMC: SUNXI SD/MMC: 0')

While the original u-boot from Arch prints out :

$this->bbcode_second_pass_code('', 'U-Boot 2012.10-04277-g7aa9f04 (Mar 18 2013 - 23:48:11) Allwinner Technology

CPU: SUNXI Family
Board: Cubieboard 512
I2C: ready
DRAM: 512 MiB
MMC: SUNXI SD/MMC: 0')

Now, is obvious that I got rid of that "512" from the board section but that's the only notable difference.

Other details of my configuration:

in uEnv.txt I have the following :
$this->bbcode_second_pass_code('', '
boot_mmc=fatload mmc 0 0x43000000 ${fexfile}; fatload mmc 0 0x48000000 ${kernel}; bootm 0x48000000
extraargs=rootwait ethaddr=00:CE:39:B7:74:4E
fexfile=cubieboard.bin')

In cubieboard.bin/cubieboard.fex at [dram_para] section :

$this->bbcode_second_pass_code('', '[dram_para]
dram_baseaddr = 0x40000000
dram_clk = 480
dram_type = 3
dram_rank_num = 1
dram_chip_density = 4096
dram_io_width = 16
dram_bus_width = 32
dram_cas = 6
dram_zq = 0x7b
dram_odt_en = 0
dram_size = 1024
dram_tpr0 = 0x30926692
dram_tpr1 = 0x1090
dram_tpr2 = 0x1a0c8
dram_tpr3 = 0x0
dram_tpr4 = 0x0
dram_tpr5 = 0x0
dram_emr1 = 0x0
dram_emr2 = 0x0
dram_emr3 = 0x0')

Any other places to look ?

And a bit off topic, isn't Cubieboard equiped with 1 GB of RAM from the very first release of the board? Why would someone make a default configuration for an unexisting case?
tcorb
 
Posts: 2
Joined: Mon May 26, 2014 8:15 pm

Re: Cubieboard 1 revised Installation howto

Postby tcorb » Mon May 26, 2014 10:13 pm

Nevermind ... I used even an older version as sugessted in this post :

http://www.cubieforums.com/index.php?topic=223.0

It seems to work fine with this package:

http://dl.linux-sunxi.org/amery/sunxi-3 ... ack.tar.xz

Here is the output:

$this->bbcode_second_pass_code('', '
U-Boot 2012.10-04259-g832a8e5 (Nov 09 2012 - 10:05:54) Allwinner Technology

CPU: SUNXI Family
Board: Cubieboard
I2C: ready
DRAM: 1 GiB
MMC: SUNXI SD/MMC: 0

')

I hope I'll figure out eventualy what is the diffrence and why it works :lol:
tcorb
 
Posts: 2
Joined: Mon May 26, 2014 8:15 pm

Re: Cubieboard 1 revised Installation howto

Postby pistoletov74 » Sun Aug 17, 2014 7:01 pm

Hi !
i want to install a arch linux to my Cubieboard a10 but i do not have a linux machine to make a boot sd. Can i make this with windows machine o download sd card image with u-boot.
pistoletov74
 
Posts: 18
Joined: Sun Aug 17, 2014 6:50 pm

Re: Cubieboard 1 revised Installation howto

Postby WarheadsSE » Sun Aug 17, 2014 9:51 pm

Linux Live CD/USB or VM will work fine.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Cubieboard 1 revised Installation howto

Postby pistoletov74 » Mon Aug 25, 2014 1:51 pm

Big thanks! I have made a bootable card using this instruction: http://archlinuxarm.org/platforms/armv7 ... cubieboard
but my cubie did not starting. I have made 2 partitions format 1 in fat and second in ext4. How i can check correctly installed bootloader or not?
pistoletov74
 
Posts: 18
Joined: Sun Aug 17, 2014 6:50 pm

Re: Cubieboard 1 revised Installation howto

Postby pistoletov74 » Mon Aug 25, 2014 4:09 pm

and one more question - does hdmi output enabled on default?
pistoletov74
 
Posts: 18
Joined: Sun Aug 17, 2014 6:50 pm

Re: Cubieboard 1 revised Installation howto

Postby WarheadsSE » Mon Aug 25, 2014 5:36 pm

Nope.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Cubieboard 1 revised Installation howto

Postby tomangoumoisin » Tue Sep 23, 2014 7:42 am

Thanks for this revised install guide :-)

$this->bbcode_second_pass_quote('', 'N')ote: 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.


Is there any chance to see the original bootloader package updated to solve the missing RAM question ?
tomangoumoisin
 
Posts: 1
Joined: Tue Sep 23, 2014 7:35 am

Re: Cubieboard 1 revised Installation howto

Postby WarheadsSE » Tue Sep 23, 2014 3:57 pm

Because the original device had 512M of ram. There are two uboot there. Some people flashed the wrong one.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to Allwinner

Who is online

Users browsing this forum: No registered users and 5 guests

cron