board: add Beelink GS1 support
PATCH v2 1/3 board: add Beelink GS1 support
---
Changes since v1:
- Add myself to DEVELOPPERS file
- Add U-boot and Linux version
ATF patch is merged in v2.2 but tag is not pushed on github U-Boot patch is accepted upstream will be available in 2020.01
DEVELOPERS | 4 + board/beelink/gs1/extlinux.conf | 4 + board/beelink/gs1/genimage.cfg | 33 +++ ...er-common-use-r_wdog-instead-of-wdog.patch | 39 +++ ...01-arm-dts-sync-dts-for-Allwinner-H6.patch | 279 ++++++++++++++++++ board/beelink/gs1/post-build.sh | 4 + configs/beelink_gs1_defconfig | 39 +++ 7 files changed, 402 insertions(+) create mode 100644 board/beelink/gs1/extlinux.conf create mode 100644 board/beelink/gs1/genimage.cfg create mode 100644 board/beelink/gs1/patches/arm-trusted-firmware/0001-plat-allwinner-common-use-r_wdog-instead-of-wdog.patch create mode 100644 board/beelink/gs1/patches/uboot/0001-arm-dts-sync-dts-for-Allwinner-H6.patch create mode 100755 board/beelink/gs1/post-build.sh create mode 100644 configs/beelink_gs1_defconfig
DEVELOPERS +4 -0
@@ -591,6 +591,10 @@ F: package/libsemanage/ F: package/libsepol/ F: package/policycoreutils/ +N: Cl?ment P?ron <[email protected]> +F: board/beelink/gs1/ +F: configs/beelink_gs1_defconfig + N: Corentin Guillevic <[email protected]> F: package/libloki/
board/beelink/gs1/extlinux.conf new file +4 -0
@@ -0,0 +1,4 @@ +label linux + kernel /Image + devicetree /sun50i-h6-beelink-gs1.dtb + append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
board/beelink/gs1/genimage.cfg new file +33 -0
@@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-h6-beelink-gs1.dtb", + "extlinux" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +}
board/beelink/gs1/patches/arm-trusted-firmware/0001-plat-allwinner-common-use-r_wdog-instead-of-wdog.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 523ab5be1a84e9aa15fb62c3a15a6338b01d3961 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= <[email protected]> +Date: Tue, 9 Apr 2019 00:15:06 +0200 +Subject: [PATCH] plat: allwinner: common: use r_wdog instead of wdog +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some Allwinner H6 has a broken watchdog that doesn't +make the soc reboot. + +Use the R_WATCHDOG instead. + +Signed-off-by: Cl?ment P?ron <[email protected]> +Change-Id: Ie95cc30a80ed517b60b30d6bc2e655a1b53f18ba +--- + plat/allwinner/common/sunxi_pm.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/plat/allwinner/common/sunxi_pm.c b/plat/allwinner/common/sunxi_pm.c +index 1d2dc938..13e13532 100644 +--- a/plat/allwinner/common/sunxi_pm.c ++++ b/plat/allwinner/common/sunxi_pm.c +@@ -20,9 +20,9 @@ + #include <sunxi_mmap.h> + #include <sunxi_private.h> + +-#define SUNXI_WDOG0_CTRL_REG (SUNXI_WDOG_BASE + 0x0010) +-#define SUNXI_WDOG0_CFG_REG (SUNXI_WDOG_BASE + 0x0014) +-#define SUNXI_WDOG0_MODE_REG (SUNXI_WDOG_BASE + 0x0018) ++#define SUNXI_WDOG0_CTRL_REG (SUNXI_R_WDOG_BASE + 0x0010) ++#define SUNXI_WDOG0_CFG_REG (SUNXI_R_WDOG_BASE + 0x0014) ++#define SUNXI_WDOG0_MODE_REG (SUNXI_R_WDOG_BASE + 0x0018) + + #define mpidr_is_valid(mpidr) ( \ + MPIDR_AFFLVL3_VAL(mpidr) == 0 && \ +-- +2.20.1 +
board/beelink/gs1/patches/uboot/0001-arm-dts-sync-dts-for-Allwinner-H6.patch new file +279 -0
279 lines not on this page · raw message
board/beelink/gs1/post-build.sh new file +4 -0
@@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
configs/beelink_gs1_defconfig new file +39 -0
@@ -0,0 +1,39 @@ +# Architecture +BR2_aarch64=y +BR2_ARM_FPU_VFPV4=y +BR2_TARGET_GENERIC_ISSUE="Welcome to Beelink GS1" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/beelink/gs1/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beelink/gs1/genimage.cfg" +BR2_GLOBAL_PATCH_DIR="board/beelink/gs1/patches/" + +# Kernel Linux headers same as kernel, a 5.3 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h6-beelink-gs1" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50i_h6" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="beelink_gs1" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y
Signature · 1 line
2.20.1
PATCH v2 2/3 board/beelink_gs1: enable mdev and dhcp on eth0
--- configs/beelink_gs1_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/beelink_gs1_defconfig +3 -0
@@ -2,6 +2,9 @@ BR2_aarch64=y BR2_ARM_FPU_VFPV4=y BR2_TARGET_GENERIC_ISSUE="Welcome to Beelink GS1" +# MDEV is required to autoload the ethernet driver module +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_SYSTEM_DHCP="eth0" BR2_ROOTFS_POST_BUILD_SCRIPT="board/beelink/gs1/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beelink/gs1/genimage.cfg"
Signature · 1 line
2.20.1
PATCH v2 2/3 board/beelink_gs1: enable mdev and dhcp on eth0
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Cl?ment" == Cl?ment P?ron <[email protected]> writes:
Signed-off-by Cl?ment P?ron <[email protected]>--- configs/beelink_gs1_defconfig | 3 +++ 1 file changed, 3 insertions(+)configs/beelink_gs1_defconfig +0
-0
configs/beelink_gs1_defconfig line 6
Quoted 5 lines
configs/beelink_gs1_defconfig +2
-0@@ -2,6 +2,9 @@ BR2_aarch64=y BR2_ARM_FPU_VFPV4=y BR2_TARGET_GENERIC_ISSUE="Welcome to Beelink GS1" +# MDEV is required to autoload the ethernet driver module +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
If this is just about the network driver, then a simpler solution is to just use a linux kernel config fragment to build the STMMAC_ETH driver + allwinner support into the kernel instead of as a module. That way things like root on NFS would also automatically work.
But Ok, that can be done later. Committed to next, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 3/3 boards/beelink_gs1: autossh with trivial root password
In reply to Clément Péron--- configs/beelink_gs1_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/beelink_gs1_defconfig +3 -0
@@ -4,6 +4,7 @@ BR2_ARM_FPU_VFPV4=y BR2_TARGET_GENERIC_ISSUE="Welcome to Beelink GS1" # MDEV is required to autoload the ethernet driver module BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_ROOT_PASSWD="admin" BR2_SYSTEM_DHCP="eth0" BR2_ROOTFS_POST_BUILD_SCRIPT="board/beelink/gs1/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
@@ -17,6 +18,8 @@ BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h6-beelink-gs1" BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_AUTOSSH=y +BR2_PACKAGE_DROPBEAR=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y
Signature · 1 line
2.20.1
PATCH v2 1/3 board: add Beelink GS1 support
In reply to Clément PéronQuoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Cl?ment" == Cl?ment P?ron <[email protected]> writes:
Signed-off-by Cl?ment P?ron <[email protected]>---
Changes since v1:
- Add myself to DEVELOPPERS file
- Add U-boot and Linux versionATF patch is merged in v2.2 but tag is not pushed on github
I do see it now:
https://github.com/ARM-software/arm-trusted-firmware/tree/v2.2
So it would be good to send an update to move it to 2.2 after you have tested.
Quoted 9 lines
U-Boot patch is accepted upstream will be available in 2020.01
DEVELOPERS | 4 + board/beelink/gs1/extlinux.conf | 4 + board/beelink/gs1/genimage.cfg | 33 +++ ...er-common-use-r_wdog-instead-of-wdog.patch | 39 +++ ...01-arm-dts-sync-dts-for-Allwinner-H6.patch | 279 ++++++++++++++++++ board/beelink/gs1/post-build.sh | 4 + configs/beelink_gs1_defconfig | 39 +++
A board/beelink/gs1/readme.txt with some basic information about how to use this would be nice. Care to send a followup patch with that?
Quoted 5 lines
+++ b/configs/beelink_gs1_defconfig
configs/beelink_gs1_defconfig new file +3
-0@@ -0,0 +1,39 @@ +# Architecture +BR2_aarch64=y +BR2_ARM_FPU_VFPV4=y
configs/beelink_gs1_defconfig line 13
Quoted 10 lines
configs/beelink_gs1_defconfig new file +10
-0+BR2_TARGET_GENERIC_ISSUE="Welcome to Beelink GS1" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/beelink/gs1/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beelink/gs1/genimage.cfg" +BR2_GLOBAL_PATCH_DIR="board/beelink/gs1/patches/" + +# Kernel Linux headers same as kernel, a 5.3 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
This still uses the default kernel version which will change over time. I added:
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.12"
To explicitly use 5.3.12 and committed to next, thanks!
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/3 board: add Beelink GS1 support
Hi Peter,
Quoted 10 lines · Peter Korsgaard
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Cl?ment" == Cl?ment P?ron <[email protected]> writes:
Signed-off-by Cl?ment P?ron <[email protected]>---
Changes since v1:
- Add myself to DEVELOPPERS file
- Add U-boot and Linux version
Quoted 8 lines
Quoted 1 line
ATF patch is merged in v2.2 but tag is not pushed on github
I do see it now:
https://github.com/ARM-software/arm-trusted-firmware/tree/v2.2
So it would be good to send an update to move it to 2.2 after you have tested.
OK I will,
Quoted 11 lines
Quoted 10 lines
U-Boot patch is accepted upstream will be available in 2020.01
DEVELOPERS | 4 + board/beelink/gs1/extlinux.conf | 4 + board/beelink/gs1/genimage.cfg | 33 +++ ...er-common-use-r_wdog-instead-of-wdog.patch | 39 +++ ...01-arm-dts-sync-dts-for-Allwinner-H6.patch | 279 ++++++++++++++++++ board/beelink/gs1/post-build.sh | 4 + configs/beelink_gs1_defconfig | 39 +++
Quoted 2 lines
A
board/beelink/gs1/readme.txtwith some basic information about how to use this would be nice. Care to send a followup patch with that?
Ok,
Regards,
Clement
Quoted 27 lines
Quoted 6 lines
+++ b/configs/beelink_gs1_defconfig
configs/beelink_gs1_defconfig new file +3
-0@@ -0,0 +1,39 @@ +# Architecture +BR2_aarch64=y +BR2_ARM_FPU_VFPV4=yconfigs/beelink_gs1_defconfig line 13
Quoted 10 lines
configs/beelink_gs1_defconfig new file +10
-0+BR2_TARGET_GENERIC_ISSUE="Welcome to Beelink GS1" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/beelink/gs1/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beelink/gs1/genimage.cfg" +BR2_GLOBAL_PATCH_DIR="board/beelink/gs1/patches/" + +# Kernel Linux headers same as kernel, a 5.3 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=yThis still uses the default kernel version which will change over time. I added:
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.12"To explicitly use 5.3.12 and committed to next, thanks!
--
Bye, Peter Korsgaard