August 14, 2020, 01:09:35 am


Have you visited the Allwinner Chipset wiki? -

Using disk images from other devices - eg MK802 or similar.

Started by lawrence, January 27, 2013, 07:24:55 am

Previous topic - Next topic


The MK802 is quite similar to the Cubieboard, so a lot of the images for that will work without too much headache.

There are different versions though - one with 512M, and one with 1G ram.

The 512M images will need to have their IPL and SPL replaced with correct versions for our board.

Assuming you already have an image from one of those devices written to an SD card with your tool of choice (eg DD or WinFlashPro++with bells on), then you'll need to do the following after you write your image.


Boot into a Linux distribution of your choice (Linux Mint is a good choice for beginners - ), and mount your SD card.

Note the device name that it gets mounted as.
A quick way to work this out is to plug in the SD adaptor after everything finishes loading up, then checking dmesg.


[97544.060233] usb 1-2: >USB disconnect, device number 4
[97902.878164] usb 1-2: >new high-speed USB device number 5 using ehci_hcd
[97903.070777] usb 1-2: >New USB device found, idVendor=14cd, idProduct=125c
[97903.070781] usb 1-2: >New USB device strings: Mfr=1, Product=3, SerialNumber=2
[97903.070782] usb 1-2: >Product: Mass Storage Device
[97903.070784] usb 1-2: >Manufacturer: Generic
[97903.070785] usb 1-2: >SerialNumber: 125C20100726
[97903.213204] scsi6 : usb-storage 1-2:1.0
[97904.214819] scsi 6:0:0:0: >Direct-Access     Mass     Storage Device        PQ: 0 ANSI: 0 CCS
[97904.218577] sd 6:0:0:0: >Attached scsi generic sg3 type 0
[97904.227571] sd 6:0:0:0: >[sdc] 7744512 512-byte logical blocks: (3.96 GB/3.69 GiB)

Above I can see that its fairly obvious my SD card was mounted as /dev/sdc

So,  for me to "fix" this image, I'll need to overwrite the ipl/spl with this:

[color=red]# ******DO NOT COPY PASTE THIS NEXT PART************[/color]

dd if=sunxi-spl.bin of=/dev/sdc bs=1024 seek=8
dd if=u-boot.bin of=/dev/sdc bs=1024 seek=32

Then take a look at the first partition.

mkdir /mnt/boot
mount /dev/sdc1 -t auto /mnt/boot

cd /mnt/boot
ls *.bin

If there are any bin files there named script.bin or evb.bin or similar, delete them.
Replace any found  with the script.bin from the cubie_hwpack file.

Last step is to unmount the image.

cd ~
umount /mnt/boot

#Also check to see if any automounted partitions.
df -h

umount /dev/[your device name if any mounted]

#Do a last sync to ensure drive is really written.


Eject your SD card, and stick into the Cubie to test it now.


Useful instructions ... thanks.

However, there are a couple of noobie points:

1. You state download the hwpack & unpack.  It would be useful if you gave instructions on how to do this from the command line in Linux Mint.

2. Similarly, you write 'If there are any bin files there named script.bin or evb.bin or similar, delete them.
Replace any found  with the script.bin from the cubie_hwpack file.'.  Again a simple example code would be useful here.


I didn't think it was something I needed to explain -
To unpack a file in Mint, double click on it.

Most people should be able to do this.  Things like look at a folder, delete files named X, drag files from your other folder to that folder, are fairly basic, especially even in a GUI.

If you can't, well, there is a certain level of skill required for any of this, if people aren't at that level, this isn't the product for you.

If you think this is something that needs images for each step, go ahead and make some docs!
Saves me the time  ;D


I'm not an absolute newbie - but I do need a degree of help to get started.

Sorry to see you're adopting the old linux approach of 'if you don't know what you're doing, then clear off!'.

Everybody starts as a learner.


I'm actually offended by that.

I specifically set about making documentation as the wiki wasn't the best source of info (although its improving), and I wanted to explain things in a better way.

I have spent my own time to explain how to go about doing various things and posted it up here.
I have most definitely not adopted the linux approach of if you don't know what you are doing clear off.

I did suggest that if you thought it needed improvement, you could go ahead and add further detail.
I'm not prepared to spend time explaining basic concepts, as there is a lot of ground to cover, and my time is best spent explaining the harder parts.

There are also many many sites which go over the very basics.  At the end of the day, the cubieboard is a development board, and its not aimed at absolute beginners. 
There is a degree of knowledge required for using a development board - some knowledge of installing various things, how to compile software, some minor hardware knowledge etc.

While I do endeavour to spread the knowledge I have, at the end of the day its my choice to do that, and I'll do it at a level that I feel comfortable explaining at.

That said, I am not the site, and if you find the documentation difficult, be proactive about it.
We do have a completely empty beginners section, start making some posts about what you're doing/ trying to do, and what pitfalls you get to, so I or others can assist.

Turn your negative into a positive for others.  At the end of the day, I'm trying to build a community, and I want it to be a friendly helpful one.



 Note that recent uboot/kernel versions handle DRAM size detection automatically and can be used on both 512MB and 1GB boards interchangeably.


You talking about images from other devices that works, why dont you link us to them? So we can try them out?


@lawrence: Big thanks for all the guides! You're a good one. :D Though I don't own a CubieBoard ... yet.

wget -N
wget -N
tar xJf cubieboard_*.tar.xz

After cd'ing to /mnt/boot:
rm *.bin
cp ~/{cubiepack_*}/kernel/script.bin .
You need to replace ~/{cubiepack_*} with the directory where you unpacked the hwpack.

@patwood: Are you sure about the DRAM detection? Why two hwpacks? References?

@pege63: There is e.g.
I hope I don't need to direct you to:


>@patwood: Are you sure about the DRAM detection? Why two hwpacks? References?

Actually, it looks like the mmc uboot  doesn't detect dram sizes but the nand flash one does (reference: I have both 512mb and 1gb hackberrys and mk802s booting from nand with the same uboot  and kernel without any memory setting in my uenv.txt file).

My mistake, as I don't boot much from mmc any more.