Skip to contentSkip to conversation

configs/licheepi_zero: support both standard and dock variant

PATCH New Angelo Compagnucci 1 participant 1 message Oct 13, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs/licheepi_zero: support both standard and dock variant

In order to support both the standard and the dock variant, a different dtb must be choosen, else some of the board hardware doesn't work as expected (like the RGB led).

This patch configures both the genimage.cfg and the boot.scr with the correct dtb version before assembling the image.

---
 board/licheepi/genimage.cfg     |  1 -
 board/licheepi/genimage.sh      | 51 +++++++++++++++++++++++++++++++++
 board/licheepi/readme.txt       |  6 ++++
 configs/licheepi_zero_defconfig |  6 ++--
 4 files changed, 60 insertions(+), 4 deletions(-)
 create mode 100755 board/licheepi/genimage.sh
board/licheepi/genimage.cfg +0 -1
index 0d8540f2a0..4faed4de3e 100644
@@ -2,7 +2,6 @@ image boot.vfat {
 	vfat {
 		files = {
 			"zImage",
-			"sun8i-v3s-licheepi-zero-dock.dtb",
 			"sun8i-v3s-licheepi-zero.dtb",
 			"boot.scr"
 		}
board/licheepi/genimage.sh new file +51 -0

51 lines not on this page · raw message

board/licheepi/readme.txt +6 -0
index 6b8bf94b45..b687849c37 100644
@@ -12,6 +12,12 @@ Configure Buildroot
 
   $ make licheepi_zero_defconfig
 
+Build the dock variant
+-----------------------
+
+In order to have a working dock variant of the board, you need to change
+BR2_LINUX_KERNEL_INTREE_DTS_NAME to sun8i-v3s-licheepi-zero-dock.
+
 Build the rootfs
 ----------------
 
configs/licheepi_zero_defconfig +3 -3
index 8bb21292ca..467aab852f 100644
@@ -11,8 +11,8 @@ BR2_TARGET_GENERIC_HOSTNAME="licheepi-zero"
 BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the LicheePi Zero"
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
-BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/genimage.cfg"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/licheepi/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/genimage.cfg -d $(BR2_LINUX_KERNEL_INTREE_DTS_NAME)"
 
 # Kernel
 BR2_LINUX_KERNEL=y
@@ -20,7 +20,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.5"
 BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
-BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-v3s-licheepi-zero sun8i-v3s-licheepi-zero-dock"
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-v3s-licheepi-zero"
 
 BR2_PACKAGE_LINUX_FIRMWARE=y
 BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y
Signature · 1 line
2.17.1