by salmonix » Sun Apr 27, 2014 1:56 pm
Hi, there,
I am trying to make my Cubieboard A10 / 1Ghz boot from the SDcard.
I followed the
installation instructions and some other posts around, but regardless my efforts the box loads only into Android, directly.
Partition structure:
$this->bbcode_second_pass_quote('', 'M')odel: Generic Storage Device (scsi)
Disk /dev/sdb: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 95.4MB 94.4MB primary fat16 lba
2 95.4MB 15.7GB 15.6GB primary ext4
I fabricated the following script to format and install:
$this->bbcode_second_pass_code('', '#!/bin/bash
sdcard=/dev/sdb
if [[ ! -e cubieboard-bootloader.tar.gz ]]; then
wget http://archlinuxarm.org/os/sunxi/cubieboard-bootloader.tar.gz
tar xzf cubieboard-bootloader.tar.gz
fi
if [[ `mount | grep /tmp/boot` ]]; then
umount /tmp/boot
umount /tmp/arch
fi
if [[ 1 ]]; then
echo "writing full ZEROS"
sfdisk -R ${sdcard}
dd if=/dev/zero of=${sdcard} bs=1M count=1 # this deletes the partition, so we need a repartitioning
sfdisk --in-order -uM ${sdcard} << EOF
1,90,b
,,L
EOF
fi
echo "Writing bootloader"
dd if=cubieboard/sunxi-spl.bin of=${sdcard}1 bs=1024 seek=8
dd if=cubieboard/u-boot.bin of=${sdcard}1 bs=1024 seek=32
echo "writing filesystem"
mkfs.vfat -F 32 ${sdcard}1
mkfs.ext4 ${sdcard}2
if [[ ! -d /tmp/boot ]]; then
mkdir /tmp/boot
mkdir /tmp/arch
fi
mount ${sdcard}1 /tmp/boot
mount ${sdcard}2 /tmp/arch
echo " ----> Placing all to place"
tar -zxf ArchLinuxARM-sun4i-latest.tar.gz -C /tmp/arch
cp /tmp/arch/boot/uImage /tmp/boot/uImage
# Copy the compiled FEX and uEnv.txt to /boot
cp cubieboard/cubieboard*.bin /tmp/boot/
cp cubieboard/uEnv.txt /tmp/boot/uEnv.txt
# Unmount the drive, insert into the cubieboard, and power it on.
sync
echo "FINISHED."
')
Thanx for looking at it!