aboutsummaryrefslogtreecommitdiff
path: root/board/nexbox
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <peter@korsgaard.com>2017-02-17 17:33:10 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2017-02-19 23:22:31 +0100
commit688c9aab75c740919ddab80dff769986846c8f6f (patch)
tree8a08ef5e9c1bef5011451e0f638ba021a05df8ac /board/nexbox
parente3ddd1c1f3304423e7143b99aad151355a3baada (diff)
downloadbuildroot-688c9aab75c740919ddab80dff769986846c8f6f.tar.gz
buildroot-688c9aab75c740919ddab80dff769986846c8f6f.tar.bz2
board: add support for nexbox a95x
Nexbox A95X is a low cost Android STB based around an Amlogic s905(x) SoC (quad A53), 8/16GB eMMC and 1/2GB RAM. Both the s905 (gxbb) and s905x (gxl) variant is supported. This defconfig uses mainline Linux. As the mainline support for s905 is quite young, use the latest release candidate. There is currently no support for this board in U-Boot or sources available for the vendor U-Boot, so the defconfig doesn't build a u-boot and instead uses the existing U-Boot available in the eMMC. This also means that we need to wrap the kernel as uImage, which isn't suppported for aarch64. Instead this is done in the post-build script. Mainline aarch64 defconfig builds most drivers modular, so add mdev for module autoloading. [Peter: explicitly set BR2_cortex_a53=y] Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'board/nexbox')
-rw-r--r--board/nexbox/a95x/boot.txt11
-rw-r--r--board/nexbox/a95x/genimage.cfg28
-rwxr-xr-xboard/nexbox/a95x/post-build.sh12
-rwxr-xr-xboard/nexbox/a95x/post-image.sh14
-rw-r--r--board/nexbox/a95x/readme.txt48
5 files changed, 113 insertions, 0 deletions
diff --git a/board/nexbox/a95x/boot.txt b/board/nexbox/a95x/boot.txt
new file mode 100644
index 0000000000..b538b4a9ab
--- /dev/null
+++ b/board/nexbox/a95x/boot.txt
@@ -0,0 +1,11 @@
+setenv bootargs console=ttyAML0,115200 earlyprintk root=/dev/mmcblk1p2 rootwait
+
+fatload mmc 0:1 0x01080000 uImage
+
+if itest.s "${aml_dt}" == "gxl_p212_2g"; then
+ fatload mmc 0:1 $dtb_mem_addr meson-gxl-nexbox-a95x.dtb
+else
+ fatload mmc 0:1 $dtb_mem_addr meson-gxbb-nexbox-a95x.dtb
+fi
+
+bootm 0x1080000 - $dtb_mem_addr
diff --git a/board/nexbox/a95x/genimage.cfg b/board/nexbox/a95x/genimage.cfg
new file mode 100644
index 0000000000..c6c80f860b
--- /dev/null
+++ b/board/nexbox/a95x/genimage.cfg
@@ -0,0 +1,28 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "uImage",
+ "meson-gxbb-nexbox-a95x.dtb",
+ "meson-gxl-nexbox-a95x.dtb",
+ "boot.scr"
+ }
+ }
+ size = 32M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ size = 512M
+ }
+}
diff --git a/board/nexbox/a95x/post-build.sh b/board/nexbox/a95x/post-build.sh
new file mode 100755
index 0000000000..9f4cc04518
--- /dev/null
+++ b/board/nexbox/a95x/post-build.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+MKIMAGE=$HOST_DIR/usr/bin/mkimage
+
+$MKIMAGE -C none -A arm64 -T script -d $BOARD_DIR/boot.txt $BINARIES_DIR/boot.scr
+
+# vendor u-boot uses uImage
+if [ -e $BINARIES_DIR/Image ]; then
+ $MKIMAGE -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 \
+ -n linux -d $BINARIES_DIR/Image $BINARIES_DIR/uImage
+fi
diff --git a/board/nexbox/a95x/post-image.sh b/board/nexbox/a95x/post-image.sh
new file mode 100755
index 0000000000..359b4c9e7c
--- /dev/null
+++ b/board/nexbox/a95x/post-image.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+ --rootpath "${TARGET_DIR}" \
+ --tmppath "${GENIMAGE_TMP}" \
+ --inputpath "${BINARIES_DIR}" \
+ --outputpath "${BINARIES_DIR}" \
+ --config "${GENIMAGE_CFG}"
diff --git a/board/nexbox/a95x/readme.txt b/board/nexbox/a95x/readme.txt
new file mode 100644
index 0000000000..e08b4e4e6b
--- /dev/null
+++ b/board/nexbox/a95x/readme.txt
@@ -0,0 +1,48 @@
+Nexbox A95X
+
+Intro
+=====
+
+Nexbox A95X is a low cost Android STB based around an Amlogic s905(x) SoC
+(quad A53), 8/16GB eMMC and 1/2GB RAM. To use this defconfig, wires to the
+internal UART solder pads must be added. See the linux-meson page for
+details:
+
+http://linux-meson.com/doku.php?id=nexbox_a95x_s905
+
+Both the s905 (gxbb) and s905x (gxl) variant is supported.
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the A95X. With the current configuration it will
+bring-up the board from microSD, and allow access through the serial
+console.
+
+How to build it
+===============
+
+Configure Buildroot:
+
+ $ make nexbox_a95x_defconfig
+
+Compile everything and build the SD card image:
+
+ $ make
+
+How to write the SD card
+========================
+
+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 a microSD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+
+How to boot
+===========
+
+Insert microSD card and connect serial cable. Power board and stop
+U-Boot by pressing any key. Boot the system by typing:
+
+fatload mmc 0:1 0x1070000 boot.scr
+autoscr 0x1070000