-
-
Save csrutil/31d91ae47d31a508bc729f22b6303999 to your computer and use it in GitHub Desktop.
How to build a bootable SSD card with a NetBSD kernel on Cubieboard2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# working on Mac OS X :) | |
# You have a blank or unused SSD card. | |
# Get latest at http://dl.linux-sunxi.org/nightly/u-boot-sunxi/u-boot-sunxi/ | |
wget http://dl.linux-sunxi.org/nightly/u-boot-sunxi/u-boot-sunxi/u-boot-sunxi-20140413T154240-9167f4b/u-boot-sunxi-cubieboard2.tar.xz | |
tar xvf u-boot-sunxi-cubieboard2.tar.xz | |
cd u-boot-sunxi-cubieboard2-20140413T154240-9167f4b/ | |
# Follow the instructions written in http://docs.cubieboard.org/zh/tutorials/ct1/installation/install_lubuntu_desktop_server_to_sd_card | |
card=/dev/disk1 | |
sudo dd if=/dev/zero of=${card} bs=1024 seek=544 count=128 | |
sudo dd if=u-boot-sunxi-with-spl.bin of=$card bs=1024 seek=8 | |
# Create "1st partitions start from 2048 sectors, 64MB in size". The 1st partition starts from 2048 to 133119 sectors. | |
# msdos partition is good on Mac OS X :) | |
sudo fdisk -e /dev/disk1 | |
# Build a CUBIEBOARD kernel | |
# or get from somewhere else, e.g, http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201404140200Z/evbarm-earmhf/binary/kernel/netbsd-CUBIEBOARD.ub.gz | |
mount /dev/disk1 /Volume/NO\ NAME | |
cat <<EOF > /Volume/NO\ NAME/uEnv.txt | |
uenvcmd=mmc dev 0; mmc rescan; mmc dev 0; mmc rescan; fatload mmc 0:1 82000000 netbsd.ub; bootm 82000000 | |
EOF | |
cp /tmp/netbsd.ub /Volume/NO\ NAME/netbsd.ub | |
# Insert the SSD card, then boot your Cubieboard2! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment