Skip to contentSkip to conversation

OrangePi Plus: Add support

PATCH New Troy Dack 2 participants 10 messages May 14, 2016 – May 16, 2016

lore
Share & tools
lore

Troy Dack

author
#0 lore raw

cover OrangePi Plus: Add support

Add support for the OrangePi Plus board.

Generates a self-extracting fel-boot.bsx file that can boot an OrangePi Plus connected via USB-OTG. Root filesystem is loaded via initrd.

Also generates a bootable SD card image.

---
Troy Dack (3):
OrangePi Plus rootfs-overlay files
OrangePi Plus files required to generate SD card image and a self
extracting fel-boot command for booting from RAM using USB-OTG and
sunxi-fel
Default config for OrangePi Plus. Generates kernel using
sunxi/for-next branch of git.kernel.org/git/mripard U-boot built
from git tag v2016.05-rc3

 board/orangepi/orangepi_plus/boot-fel.cmd          |  4 ++
 board/orangepi/orangepi_plus/boot-sdcard.cmd       |  8 +++
 board/orangepi/orangepi_plus/boot.cmd              |  4 ++
 board/orangepi/orangepi_plus/decompress            | 21 +++++++
 board/orangepi/orangepi_plus/genimage.cfg          | 35 ++++++++++++
 board/orangepi/orangepi_plus/payload.sh            | 21 +++++++
 board/orangepi/orangepi_plus/post-build.sh         | 15 +++++
 board/orangepi/orangepi_plus/post-image.sh         | 54 ++++++++++++++++++
 board/orangepi/orangepi_plus/readme.txt            | 35 ++++++++++++
 .../orangepi_plus/rootfs-overlay/etc/profile       | 21 +++++++
 configs/orangepi_plus_defconfig                    | 64 ++++++++++++++++++++++
 11 files changed, 282 insertions(+)
 create mode 100644 board/orangepi/orangepi_plus/boot-fel.cmd
 create mode 100644 board/orangepi/orangepi_plus/boot-sdcard.cmd
 create mode 100644 board/orangepi/orangepi_plus/boot.cmd
 create mode 100644 board/orangepi/orangepi_plus/decompress
 create mode 100644 board/orangepi/orangepi_plus/genimage.cfg
 create mode 100644 board/orangepi/orangepi_plus/payload.sh
 create mode 100755 board/orangepi/orangepi_plus/post-build.sh
 create mode 100755 board/orangepi/orangepi_plus/post-image.sh
 create mode 100644 board/orangepi/orangepi_plus/readme.txt
 create mode 100644 board/orangepi/orangepi_plus/rootfs-overlay/etc/profile
 create mode 100644 configs/orangepi_plus_defconfig
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/3 OrangePi Plus rootfs-overlay files

---
 .../orangepi_plus/rootfs-overlay/etc/profile        | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 board/orangepi/orangepi_plus/rootfs-overlay/etc/profile
board/orangepi/orangepi_plus/rootfs-overlay/etc/profile new file +21 -0
new file mode 100644
index 0000000..a4ddccd
@@ -0,0 +1,21 @@
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+if [ "$PS1" ]; then
+        if [ "`id -u`" -eq 0 ]; then
+                export PS1='\h:\w\# '
+        else
+                export PS1='\h:\w\$ '
+        fi
+fi
+
+export PAGER='/bin/more '
+export EDITOR='/bin/vi'
+
+# Source configuration files from /etc/profile.d
+for i in /etc/profile.d/*.sh ; do
+        if [ -r "$i" ]; then
+                . $i
+        fi
+        unset i
+done
+
Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/3 OrangePi Plus rootfs-overlay files

Quoted 25 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Troy" == Troy Dack <[email protected]> writes:

---
 .../orangepi_plus/rootfs-overlay/etc/profile        | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 board/orangepi/orangepi_plus/rootfs-overlay/etc/profile
board/orangepi/orangepi_plus/rootfs-overlay/etc/profile new file +10 -0
new file mode 100644
index 0000000..a4ddccd
@@ -0,0 +1,21 @@
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+if [ "$PS1" ]; then
+        if [ "`id -u`" -eq 0 ]; then
+                export PS1='\h:\w\# '
+        else
+                export PS1='\h:\w\$ '
+        fi
+fi
+

board/orangepi/orangepi_plus/rootfs-overlay/etc/profile line 20

Quoted 10 lines
board/orangepi/orangepi_plus/rootfs-overlay/etc/profile new file +10 -0
+export PAGER='/bin/more '
+export EDITOR='/bin/vi'
+
+# Source configuration files from /etc/profile.d
+for i in /etc/profile.d/*.sh ; do
+        if [ -r "$i" ]; then
+                . $i
+        fi
+        unset i
+done

Why? This doesn't seem critical/specific to this board? Any specific reason to change the prompt? If this is generally useful, then perhaps we should just change it in system/skeleton instead?

Please verify that this shell works with busybox ash/hush and bash.

Signature · 1 line
Bye, Peter Korsgaard
author
#3 lore raw

PATCH 2/3 OrangePi Plus files required to generate SD card image and a self extracting fel-boot command for booting from RAM using USB-OTG and sunxi-fel

In reply to Troy Dack
---
 board/orangepi/orangepi_plus/boot-fel.cmd    |  4 +++
 board/orangepi/orangepi_plus/boot-sdcard.cmd |  8 +++++
 board/orangepi/orangepi_plus/boot.cmd        |  4 +++
 board/orangepi/orangepi_plus/decompress      | 21 +++++++++++
 board/orangepi/orangepi_plus/genimage.cfg    | 35 ++++++++++++++++++
 board/orangepi/orangepi_plus/payload.sh      | 21 +++++++++++
 board/orangepi/orangepi_plus/post-build.sh   | 15 ++++++++
 board/orangepi/orangepi_plus/post-image.sh   | 54 ++++++++++++++++++++++++++++
 board/orangepi/orangepi_plus/readme.txt      | 35 ++++++++++++++++++
 9 files changed, 197 insertions(+)
 create mode 100644 board/orangepi/orangepi_plus/boot-fel.cmd
 create mode 100644 board/orangepi/orangepi_plus/boot-sdcard.cmd
 create mode 100644 board/orangepi/orangepi_plus/boot.cmd
 create mode 100644 board/orangepi/orangepi_plus/decompress
 create mode 100644 board/orangepi/orangepi_plus/genimage.cfg
 create mode 100644 board/orangepi/orangepi_plus/payload.sh
 create mode 100755 board/orangepi/orangepi_plus/post-build.sh
 create mode 100755 board/orangepi/orangepi_plus/post-image.sh
 create mode 100644 board/orangepi/orangepi_plus/readme.txt
board/orangepi/orangepi_plus/boot-fel.cmd new file +4 -0
new file mode 100644
index 0000000..50e80a3
@@ -0,0 +1,4 @@
+setenv fdt_high ffffffff
+setenv bootargs console=ttyS0,115200 earlyprintk rootwait
+
+bootm $kernel_addr_r $ramdisk_addr_r $fdt_addr_r
board/orangepi/orangepi_plus/boot-sdcard.cmd new file +8 -0
new file mode 100644
index 0000000..5fe9920
@@ -0,0 +1,8 @@
+setenv fdt_high ffffffff
+
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+fatload mmc 0 $kernel_addr_r uImage
+fatload mmc 0 $fdt_addr_r sun8i-h3-orangepi-plus.dtb
+
+bootm $kernel_addr_r - $fdt_addr_r
board/orangepi/orangepi_plus/boot.cmd new file +4 -0
new file mode 100644
index 0000000..50e80a3
@@ -0,0 +1,4 @@
+setenv fdt_high ffffffff
+setenv bootargs console=ttyS0,115200 earlyprintk rootwait
+
+bootm $kernel_addr_r $ramdisk_addr_r $fdt_addr_r
board/orangepi/orangepi_plus/decompress new file +21 -0
new file mode 100644
index 0000000..5f10737
@@ -0,0 +1,21 @@
+#!/bin/bash
+echo ""
+echo "Self Extracting sunxi-fel USB boot"
+echo ""
+
+export TMPDIR=`mktemp -d /tmp/selfextract.XXXXXX`
+
+ARCHIVE=`awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' $0`
+
+tail -n+$ARCHIVE $0 | tar xjv -C $TMPDIR
+
+CDIR=`pwd`
+cd $TMPDIR
+./fel-boot.sh
+
+cd $CDIR
+rm -rf $TMPDIR
+
+exit 0
+
+__ARCHIVE_BELOW__
board/orangepi/orangepi_plus/genimage.cfg new file +35 -0
new file mode 100644
index 0000000..c607b9e
@@ -0,0 +1,35 @@
+# Minimal SD card image for the OrangePi PC
+#
+image boot.vfat {
+	vfat {
+		files = {
+			"uImage",
+			"sun8i-h3-orangepi-plus.dtb",
+			"boot-sdcard.scr"
+		}
+	}
+	size = 10M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8192
+	}
+
+	partition boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		size = 512M
+	}
+}
board/orangepi/orangepi_plus/payload.sh new file +21 -0
new file mode 100644
index 0000000..ca247fd
@@ -0,0 +1,21 @@
+#!/bin/bash
+cd ${BINARIES_DIR}
+tar czf .tar ./*
+
+if [ -e "payload.tar" ]; then
+    gzip payload.tar
+
+    if [ -e "payload.tar.gz" ]; then
+        cat decompress payload.tar.gz > selfextract.bsx
+    else
+        echo "payload.tar.gz does not exist"
+        exit 1
+    fi
+else
+    echo "payload.tar does not exist"
+    exit 1
+fi
+
+echo "selfextract.bsx created"
+exit 0
+
board/orangepi/orangepi_plus/post-build.sh new file +15 -0
new file mode 100755
index 0000000..9885453
@@ -0,0 +1,15 @@
+#!/bin/sh
+# post-build.sh for OrangePi Plus
+# based on OrangePi PC by Carlo Caione <[email protected]>
+# 2016, Troy Dack <[email protected]>
+
+BOARD_DIR="$(dirname $0)"
+MKIMAGE=$HOST_DIR/usr/bin/mkimage
+
+for F in fel sdcard; do
+	BOOT_CMD=$BOARD_DIR/boot-$F.cmd
+	BOOT_CMD_H=$BINARIES_DIR/boot-$F.scr
+	# U-Boot script
+	$MKIMAGE -C none -A arm -T script -d $BOOT_CMD $BOOT_CMD_H
+done
+
board/orangepi/orangepi_plus/post-image.sh new file +54 -0

54 lines not on this page · raw message

board/orangepi/orangepi_plus/readme.txt new file +35 -0
new file mode 100644
index 0000000..818cfa5
@@ -0,0 +1,35 @@
+OrangePi Plus
+
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the OrangePi PC. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+How to build it
+===============
+
+Configure Buildroot:
+
+    $ make orangepi_plus_defconfig
+
+Compile everything and build the self extracting initrd FEL boot image:
+
+    $ make
+
+Booting
+=======
+
+Once the build process is finished you will have a script called 
+"fel-boot.bsx" in the output/images/ directory.
+
+Make sure sunxi-tools/sunxi-fel is in your current PATH if they are
+not installed.
+
+Connect your OrangePi Plus via the OSB-OTG port and put it into FEL
+mode by pressing the FEL button. Run fel-boot.bsx and the OrangePi
+Plus will boot from the compiled image.
+
+  $ sudo fel-boot.bsx
+
Signature · 1 line
2.7.4
#4 lore raw

PATCH 2/3 OrangePi Plus files required to generate SD card image and a self extracting fel-boot command for booting from RAM using USB-OTG and sunxi-fel

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Troy" == Troy Dack <[email protected]> writes:

---
 board/orangepi/orangepi_plus/boot-fel.cmd    |  4 +++
 board/orangepi/orangepi_plus/boot-sdcard.cmd |  8 +++++

Is there any specific reason to support fel boot? As we create a full blown sd card image, isn't that just as easy to use as fel boot?

Quoted 1 line
 board/orangepi/orangepi_plus/boot.cmd        |  4 +++

This looks identical to boot-fel.cmd.

Quoted 13 lines

+++ b/board/orangepi/orangepi_plus/decompress

board/orangepi/orangepi_plus/decompress new file +11 -0
@@ -0,0 +1,21 @@
+#!/bin/bash
+echo ""
+echo "Self Extracting sunxi-fel USB boot"
+echo ""
+
+export TMPDIR=`mktemp -d /tmp/selfextract.XXXXXX`
+
+ARCHIVE=`awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' $0`
+
+tail -n+$ARCHIVE $0 | tar xjv -C $TMPDIR
+

board/orangepi/orangepi_plus/decompress line 21

Quoted 10 lines
board/orangepi/orangepi_plus/decompress new file +10 -0
+CDIR=`pwd`
+cd $TMPDIR
+./fel-boot.sh
+
+cd $CDIR
+rm -rf $TMPDIR
+
+exit 0
+
+__ARCHIVE_BELOW__

A description what this is about would be nice.

Quoted 16 lines
board/orangepi/orangepi_plus/payload.sh new file +10 -0
new file mode 100644
index 0000000..ca247fd
@@ -0,0 +1,21 @@
+#!/bin/bash
+cd ${BINARIES_DIR}
+tar czf .tar ./*
+
+if [ -e "payload.tar" ]; then
+    gzip payload.tar
+
+    if [ -e "payload.tar.gz" ]; then
+        cat decompress payload.tar.gz > selfextract.bsx
+    else

board/orangepi/orangepi_plus/payload.sh line 20

Quoted 10 lines
board/orangepi/orangepi_plus/payload.sh new file +10 -0
+        echo "payload.tar.gz does not exist"
+        exit 1
+    fi
+else
+    echo "payload.tar does not exist"
+    exit 1
+fi
+
+echo "selfextract.bsx created"
+exit 0

And this as well?

Quoted 7 lines
board/orangepi/orangepi_plus/payload.sh new file +6 -0
+++ b/board/orangepi/orangepi_plus/post-image.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname ${BR2_CONFIG})/$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"

board/orangepi/orangepi_plus/payload.sh line 15

Quoted 10 lines
board/orangepi/orangepi_plus/payload.sh new file +10 -0
+
+echo ">>> Generating fel-boot.bsx self-extracting boot image"
+# Create fel-boot.sh
+cat > ${BINARIES_DIR}/fel-boot.sh <<__EOF__
+#!/bin/bash
+
+SUNXI_TOOLS=${HOST_DIR}
+BINARIES_DIR=${BINARIES_DIR}
+
+sudo \${SUNXI_TOOLS}/usr/bin/sunxi-fel -v -p \\

Calling sudo from the post-image.sh script isn't nice. I think the best option is perhaps to just drop all the fel stuff, unless you have a specific reason to have it?

board/orangepi/orangepi_plus/payload.sh line 28

Quoted 13 lines
board/orangepi/orangepi_plus/payload.sh new file +13 -0
+echo ">>> Generating SD card image"
+# Generate SD Card image
+rm -rf "${GENIMAGE_TMP}"
+
+genimage                               \
+	--rootpath "${TARGET_DIR}"     \
+	--tmppath "${GENIMAGE_TMP}"    \
+	--inputpath "${BINARIES_DIR}"  \
+	--outputpath "${BINARIES_DIR}" \
+	--config "${GENIMAGE_CFG}"
+
+
+exit $?

The exit line (and empty lines above) can be dropped.

board/orangepi/orangepi_plus/readme.txt line 7

Quoted 13 lines
board/orangepi/orangepi_plus/readme.txt new file +7 -0
new file mode 100644
index 0000000..818cfa5
@@ -0,0 +1,35 @@
+OrangePi Plus
+
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the OrangePi PC. With the current configuration

s/OrangePi PC/OrangePi Plus/

Quoted 13 lines
board/orangepi/orangepi_plus/readme.txt new file +11 -0
+it will bring-up the board, and allow access through the serial console.
 
 
+
+How to build it
+===============
+
+Configure Buildroot:
+
+    $ make orangepi_plus_defconfig
+
+Compile everything and build the self extracting initrd FEL boot image:
+

board/orangepi/orangepi_plus/readme.txt line 28

Quoted 10 lines
board/orangepi/orangepi_plus/readme.txt new file +10 -0
+    $ make
+
+Booting
+=======
+
+Once the build process is finished you will have a script called 
+"fel-boot.bsx" in the output/images/ directory.
+
+Make sure sunxi-tools/sunxi-fel is in your current PATH if they are
+not installed.

If needed, we should use the tools built by buildroot (but I think we shold just drop the fel stuff).

board/orangepi/orangepi_plus/readme.txt line 34

Quoted 6 lines
board/orangepi/orangepi_plus/readme.txt new file +6 -0
+
+Connect your OrangePi Plus via the OSB-OTG port and put it into FEL
+mode by pressing the FEL button. Run fel-boot.bsx and the OrangePi
+Plus will boot from the compiled image.
+
+  $ sudo fel-boot.bsx

It would be better to document how to use the sd card image.

Signature · 1 line
Bye, Peter Korsgaard
author
#5 lore raw

PATCH 3/3 Default config for OrangePi Plus. Generates kernel using sunxi/for-next branch of git.kernel.org/git/mripard U-boot built from git tag v2016.05-rc3

In reply to Troy Dack
---
 configs/orangepi_plus_defconfig | 64 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 configs/orangepi_plus_defconfig
configs/orangepi_plus_defconfig new file +64 -0
new file mode 100644
index 0000000..c4668ad
@@ -0,0 +1,64 @@
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_ARM_FPU_VFPV4=y
+# Kernel is a pre-release of 4.5, so we do not yet have a _CUSTOM_4_5
+# option for the headers. Thus, we stick with the 4.4 headers for now.
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="4.4"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
+BR2_TARGET_GENERIC_HOSTNAME="OrangePi_PC"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Plus"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/orangepi_plus/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/orangepi/orangepi_plus/post-image.sh"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="sunxi/for-next"
+BR2_LINUX_KERNEL_VERSION="sunxi/for-next"
+BR2_LINUX_KERNEL_PATCH=""
+BR2_LINUX_KERNEL_USE_DEFCONFIG=y
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES=""
+BR2_LINUX_KERNEL_UBOOT_IMAGE=y
+BR2_LINUX_KERNEL_UIMAGE=y
+BR2_LINUX_KERNEL_GZIP=y
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x40008000"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_USE_INTREE_DTS=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-orangepi-plus"
+BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL=""
+BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION=""
+
+BR2_TARGET_ROOTFS_CPIO=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y
+BR2_TARGET_ROOTFS_CPIO_UIMAGE=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="http://git.denx.de/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2016.05-rc3"
+BR2_TARGET_UBOOT_VERSION="v2016.05-rc3"
+BR2_TARGET_UBOOT_PATCH=""
+BR2_TARGET_UBOOT_USE_DEFCONFIG=y
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_plus"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
+BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL=""
+BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION=""
+
+BR2_CCACHE=y
+BR2_CCACHE_DIR="$(HOME)/.buildroot-ccache"
+BR2_CCACHE_INITIAL_SETUP=""
+BR2_CCACHE_USE_BASEDIR=y
+
+BR2_PACKAGE_HOST_DTC=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_SUNXI_TOOLS=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_MTOOLS=y
Signature · 1 line
2.7.4
#6 lore raw

PATCH 3/3 Default config for OrangePi Plus. Generates kernel using sunxi/for-next branch of git.kernel.org/git/mripard U-boot built from git tag v2016.05-rc3

Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Troy" == Troy Dack <[email protected]> writes:

---
 configs/orangepi_plus_defconfig | 64 +++++++++++++++++++++++++++++++++++++++++

Thanks. This should be in the same patch as the one adding the post-image/build scripts.

Quoted 16 lines
 1 file changed, 64 insertions(+)
 create mode 100644 configs/orangepi_plus_defconfig
configs/orangepi_plus_defconfig new file +7 -0
new file mode 100644
index 0000000..c4668ad
@@ -0,0 +1,64 @@
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_ARM_FPU_VFPV4=y
+# Kernel is a pre-release of 4.5, so we do not yet have a _CUSTOM_4_5
+# option for the headers. Thus, we stick with the 4.4 headers for now.
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="4.4"

configs/orangepi_plus_defconfig line 17

Quoted 10 lines
configs/orangepi_plus_defconfig new file +10 -0
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
+BR2_TARGET_GENERIC_HOSTNAME="OrangePi_PC"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Plus"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/orangepi_plus/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/orangepi/orangepi_plus/post-image.sh"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="sunxi/for-next"
+BR2_LINUX_KERNEL_VERSION="sunxi/for-next"

Why can't you use 4.5 like orangepipc_defconfig? This for-next branch most likely isn't stable (E.G. it gets rebased and recreated once it is merged into mainline). We want reproducable builds, so _REPO_VERSION has to point to a git commit hash or a tag, and not to a branch.

configs/orangepi_plus_defconfig line 21

Quoted 4 lines
configs/orangepi_plus_defconfig new file +4 -0
+BR2_LINUX_KERNEL_PATCH=""
+BR2_LINUX_KERNEL_USE_DEFCONFIG=y
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES=""

Please drop unneeded lines (E.G. the ones equal to the default values).

configs/orangepi_plus_defconfig line 23

Quoted 2 lines
configs/orangepi_plus_defconfig new file +2 -0
+BR2_LINUX_KERNEL_UBOOT_IMAGE=y
+BR2_LINUX_KERNEL_UIMAGE=y

Why? U-boot supports zImage (and orangepipc_defconfig already uses it)

configs/orangepi_plus_defconfig line 30

Quoted 7 lines
configs/orangepi_plus_defconfig new file +7 -0
+BR2_LINUX_KERNEL_GZIP=y
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x40008000"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_USE_INTREE_DTS=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-orangepi-plus"
+BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL=""
+BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION=""

Huh?

configs/orangepi_plus_defconfig line 34

Quoted 4 lines
configs/orangepi_plus_defconfig new file +4 -0
+
+BR2_TARGET_ROOTFS_CPIO=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y
+BR2_TARGET_ROOTFS_CPIO_UIMAGE=y

What is this for? Fel boot?

Quoted 11 lines
configs/orangepi_plus_defconfig new file +11 -0
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="http://git.denx.de/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2016.05-rc3"
+BR2_TARGET_UBOOT_VERSION="v2016.05-rc3"

configs/orangepi_plus_defconfig line 53

Quoted 10 lines
configs/orangepi_plus_defconfig new file +8 -0
+BR2_TARGET_UBOOT_PATCH=""
+BR2_TARGET_UBOOT_USE_DEFCONFIG=y
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_plus"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
 
 
+BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL=""
+BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION=""

Again, huh?

configs/orangepi_plus_defconfig line 58

Quoted 5 lines
configs/orangepi_plus_defconfig new file +5 -0
+
+BR2_CCACHE=y
+BR2_CCACHE_DIR="$(HOME)/.buildroot-ccache"
+BR2_CCACHE_INITIAL_SETUP=""
+BR2_CCACHE_USE_BASEDIR=y

This is not specific to this board, so it doesn't belong here.

Care to fixup these issues and resend? Thanks!

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

cover OrangePi Plus: Add support

In reply to Troy Dack
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Troy" == Troy Dack <[email protected]> writes:

Add support for the OrangePi Plus board.

In what way does this differ from our existing orangepipc support? Can anything be shared between them?

Signature · 1 line
Bye, Peter Korsgaard
author
#8 lore raw

cover OrangePi Plus: Add support

Quoted 9 lines · Peter Korsgaard
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Troy" == Troy Dack <[email protected]> writes:

Add support for the OrangePi Plus board.

In what way does this differ from our existing orangepipc support? Can anything be shared between them?

More than likely yes. Although the OrangePi PC support does rename the Plus .dts as U-boot doesn?t generate one for the PC yet.

Thanks for the comments on the patches themselves.

The intent was to create a minimal system that could be used either by putting it onto an SD card, or boot via fel with a usable initrd - without needing to create an SD card. This was mainly because network support in mainline on the H3 based OrangePi?s isn?t the best at the moment.

Is it possible to have a generic configuration (say OrangePi-H3) that is shared and then configs that include the specifics for the OrangePi Plus/PC etc?

--
Troy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160516/db895350/attachment.asc>

#9 lore raw

cover OrangePi Plus: Add support

Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Troy" == Troy Dack <[email protected]> writes:

Quoted 3 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Troy" == Troy Dack <[email protected]> writes:

Add support for the OrangePi Plus board.

Quoted 7 lines
Quoted 2 lines

In what way does this differ from our existing orangepipc support? Can anything be shared between them?

More than likely yes. Although the OrangePi PC support does rename the Plus .dts as U-boot doesn?t generate one for the PC yet.

Thanks for the comments on the patches themselves.

Ok, good - And you're welcome.

Quoted 4 lines

The intent was to create a minimal system that could be used either by putting it onto an SD card, or boot via fel with a usable initrd - without needing to create an SD card. This was mainly because network support in mainline on the H3 based OrangePi?s isn?t the best at the moment.

Ahh, yes - The plus has a onboard eMMC? The PC variant doesn't, so that's not really an option there.

Still, the easiest is probably to just go with the sdcard image for now.

Quoted 3 lines

Is it possible to have a generic configuration (say OrangePi-H3) that is shared and then configs that include the specifics for the OrangePi Plus/PC etc?

We can have multiple defconfigs sharing the same board files, or a single config working on multiple boards (if u-boot can detect the board variant), but there's currently no support for having a base defconfig that gets included/overridden by other defconfigs.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard