summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorBrian Kim <brian.kim@hardkernel.com>2016-04-19 17:35:35 +0900
committerPeter Korsgaard <peter@korsgaard.com>2016-04-23 22:15:44 +0200
commitff5ea2f6360a07d885e5c35992210fa57747c9c4 (patch)
tree728a5620b3935f546a359d5224f3d7714973c82e /board
parentd88100f4343016a2b492a896bf8225fca051eb88 (diff)
downloadbuildroot-ff5ea2f6360a07d885e5c35992210fa57747c9c4.tar.gz
buildroot-ff5ea2f6360a07d885e5c35992210fa57747c9c4.zip
board: add support for Hardkernel ODROID-C2 Board
The ODROID-C2 is a 64-bit quad-core single board computer(SBC) that is one of the most cost-effective 64bit development boards available in the ARM world. http://www.hardkernel.com/main/products/prdt_info.php?g_code=G145457216438 [Peter: fix typos, drop neon/C++ settings, use git hash for Linux/U-Boot] Signed-off-by: Brian Kim <brian.kim@hardkernel.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'board')
-rw-r--r--board/hardkernel/odroidc2/boot.ini22
-rw-r--r--board/hardkernel/odroidc2/genimage.cfg27
-rwxr-xr-xboard/hardkernel/odroidc2/post-image.sh19
-rw-r--r--board/hardkernel/odroidc2/readme.txt53
4 files changed, 121 insertions, 0 deletions
diff --git a/board/hardkernel/odroidc2/boot.ini b/board/hardkernel/odroidc2/boot.ini
new file mode 100644
index 0000000000..8b67b5ed53
--- /dev/null
+++ b/board/hardkernel/odroidc2/boot.ini
@@ -0,0 +1,22 @@
+ODROIDC2-UBOOT-CONFIG
+
+# HDMI mode
+setenv m "720p60hz" # Progressive 60Hz
+
+# HDMI BPP Mode
+setenv m_bpp "32"
+
+# Default Console Device Setting
+setenv condev "console=ttyS0,115200n8" # Serial Console
+
+# Boot Arguments
+setenv bootargs "root=/dev/mmcblk0p2 rootwait ro ${condev} no_console_suspend hdmimode=${m} m_bpp=${m_bpp} vout=${vout} fsck.repair=yes net.ifnames=0 elevator=noop"
+
+# Load Images
+setenv loadaddr "0x11000000"
+setenv dtb_loadaddr "0x10000000"
+fatload mmc 0:1 ${loadaddr} Image
+fatload mmc 0:1 ${dtb_loadaddr} meson64_odroidc2.dtb
+
+# Booting
+booti ${loadaddr} - ${dtb_loadaddr}
diff --git a/board/hardkernel/odroidc2/genimage.cfg b/board/hardkernel/odroidc2/genimage.cfg
new file mode 100644
index 0000000000..15f97d4457
--- /dev/null
+++ b/board/hardkernel/odroidc2/genimage.cfg
@@ -0,0 +1,27 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "boot.ini",
+ "Image",
+ "meson64_odroidc2.dtb"
+ }
+ }
+ size = 32M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition vfat {
+ partition-type = 0xC
+ image = "boot.vfat"
+ offset = 1048576
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ size = 512M
+ }
+}
diff --git a/board/hardkernel/odroidc2/post-image.sh b/board/hardkernel/odroidc2/post-image.sh
new file mode 100755
index 0000000000..aaf12c1e79
--- /dev/null
+++ b/board/hardkernel/odroidc2/post-image.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+cp ${BOARD_DIR}/boot.ini ${BINARIES_DIR}/
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+ --rootpath "${TARGET_DIR}" \
+ --tmppath "${GENIMAGE_TMP}" \
+ --inputpath "${BINARIES_DIR}" \
+ --outputpath "${BINARIES_DIR}" \
+ --config "${GENIMAGE_CFG}"
+
+dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=1 count=442 conv=sync,notrunc
+dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=512 skip=1 seek=1 conv=fsync,notrunc
diff --git a/board/hardkernel/odroidc2/readme.txt b/board/hardkernel/odroidc2/readme.txt
new file mode 100644
index 0000000000..b44aa67f5a
--- /dev/null
+++ b/board/hardkernel/odroidc2/readme.txt
@@ -0,0 +1,53 @@
+ODROID-C2
+
+Intro
+=====
+To be able to use ODROID-C2 board with the images generated by
+Buildroot, you have to prepare the SDCard or eMMC.
+
+How to build it
+===============
+
+ $ make odroidc2_defconfig
+
+Then you can edit the build options using
+
+ $ make menuconfig
+
+Compile all and build rootfs image:
+
+ $ make
+
+Note: you will need to have access to the network, since Buildroot will
+download the packages' sources.
+
+Result of the build
+-------------------
+
+After building, you should obtain this tree:
+
+ output/images/
+ +-- Image
+ +-- boot.ini [1]
+ +-- boot.vfat
+ +-- meson64_odroidc2.dtb
+ +-- rootfs.ext2
+ +-- rootfs.ext4
+ +-- rootfs.tar
+ +-- sdcard.img
+ `-- u-boot.bin
+
+[1] This is the ODROID-C2 configuration file used in u-boot.
+
+How to write the SD card or eMMC
+================================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card or eMMC with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+
+Insert the SDcard into your ODROID-C2, and power it up. Your new system
+should come up now.
OpenPOWER on IntegriCloud