diff --git a/Documentation/kernel.md b/Documentation/kernel.md index d262bc0f4..079fd5608 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -7,5 +7,5 @@ | Raspberry Pi | 4.14.81 | | Tinker Board | 4.14.82 | | Odroid-C2 | 4.18.20 | -| Orangepi-Prime | 4.18.20 | +| Orangepi-Prime | 4.19.13 | | Intel NUC | 4.14.82 | diff --git a/buildroot-external/board/orangepi/hassos-hook.sh b/buildroot-external/board/orangepi/hassos-hook.sh index 983837053..9636f0d25 100755 --- a/buildroot-external/board/orangepi/hassos-hook.sh +++ b/buildroot-external/board/orangepi/hassos-hook.sh @@ -9,8 +9,8 @@ function hassos_pre_image() { cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" cp "${BINARIES_DIR}/sun50i-h5-orangepi-prime.dtb" "${BOOT_DATA}/sun50i-h5-orangepi-prime.dtb" + cp "${BOARD_DIR}/config.txt" "${BOOT_DATA}/config.txt" touch "${BOOT_DATA}/cmdline.txt" - touch "${BOOT_DATA}/config.txt" # SPL create_spl_image diff --git a/buildroot-external/board/orangepi/kernel.config b/buildroot-external/board/orangepi/kernel.config new file mode 100644 index 000000000..570e83546 --- /dev/null +++ b/buildroot-external/board/orangepi/kernel.config @@ -0,0 +1,3 @@ +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y + diff --git a/buildroot-external/board/orangepi/prime/config.txt b/buildroot-external/board/orangepi/prime/config.txt new file mode 100644 index 000000000..982ca9256 --- /dev/null +++ b/buildroot-external/board/orangepi/prime/config.txt @@ -0,0 +1,3 @@ +i2c0_enable=true +i2c1_enable=false +i2c2_enable=false diff --git a/buildroot-external/board/orangepi/prime/uboot-boot.ush b/buildroot-external/board/orangepi/prime/uboot-boot.ush index e5a8353bf..920a2d090 100644 --- a/buildroot-external/board/orangepi/prime/uboot-boot.ush +++ b/buildroot-external/board/orangepi/prime/uboot-boot.ush @@ -11,10 +11,6 @@ setenv storebootstate " \ env export -c -s 0x8000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT; \ mmc write ${ramdisk_addr_r} ${mmc_env} 0x40;" -if load mmc ${devnum}:1 ${ramdisk_addr_r} config.txt; then - env import -t ${ramdisk_addr_r} ${filesize}; -fi - run loadbootstate test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B" test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3 @@ -32,6 +28,23 @@ fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline # Load device tree fatload mmc ${devnum}:1 ${fdt_addr_r} sun50i-h5-orangepi-prime.dtb +fdt addr ${fdt_addr_r} + +if load mmc ${devnum}:1 ${ramdisk_addr_r} config.txt; then + env import -t ${ramdisk_addr_r} ${filesize}; +fi + +if test "${i2c0_enable}" != "false"; then + fdt set /soc/i2c@1c2ac00 status "okay" +fi + +if test "${i2c1_enable}" != "false"; then + fdt set /soc/i2c@1c2b000 status "okay" +fi + +if test "${i2c2_enable}" != "false"; then + fdt set /soc/i2c@1c2b400 status "okay" +fi setenv bootargs for BOOT_SLOT in "${BOOT_ORDER}"; do diff --git a/buildroot-external/configs/opi_prime_defconfig b/buildroot-external/configs/opi_prime_defconfig index f8f3517e2..2b577e699 100644 --- a/buildroot-external/configs/opi_prime_defconfig +++ b/buildroot-external/configs/opi_prime_defconfig @@ -6,7 +6,7 @@ BR2_CCACHE=y BR2_CCACHE_DIR="/cache/cc" BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches $(BR2_EXTERNAL_HASSOS_PATH)/board/orangepi/patches" BR2_TOOLCHAIN_BUILDROOT_GLIBC=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_18=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y BR2_GCC_VERSION_7_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_BINUTILS_ENABLE_LTO=y @@ -38,14 +38,14 @@ BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/orangepi/ BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/orangepi/prime/uboot.config" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.20" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.13" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-orangepi-prime" BR2_LINUX_KERNEL_LZ4=y BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/orangepi/kernel.config" BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" diff --git a/buildroot-patches/0013-linux-bump-default-to-4.19.2.patch b/buildroot-patches/0013-linux-bump-default-to-4.19.2.patch new file mode 100644 index 000000000..9a2244cd5 --- /dev/null +++ b/buildroot-patches/0013-linux-bump-default-to-4.19.2.patch @@ -0,0 +1,27 @@ +From 377944f65a74670075c1878a0b6b61ad84856ed5 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Tue, 20 Nov 2018 15:30:08 +0200 +Subject: [PATCH] linux: bump default to 4.19.2 + +Signed-off-by: Baruch Siach +Signed-off-by: Peter Korsgaard +--- + linux/Config.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/linux/Config.in b/linux/Config.in +index ecb12d0b16..c75e149a37 100644 +--- a/linux/Config.in ++++ b/linux/Config.in +@@ -30,7 +30,7 @@ choice + prompt "Kernel version" + + config BR2_LINUX_KERNEL_LATEST_VERSION +- bool "Latest version (4.18)" ++ bool "Latest version (4.19)" + + config BR2_LINUX_KERNEL_LATEST_CIP_VERSION + bool "Latest CIP SLTS version (v4.4.138-cip25)" +-- +2.17.1 + diff --git a/buildroot-patches/0015-toolchain-add-4.19.x-choice-for-headers.patch b/buildroot-patches/0015-toolchain-add-4.19.x-choice-for-headers.patch new file mode 100644 index 000000000..9f02a1ee4 --- /dev/null +++ b/buildroot-patches/0015-toolchain-add-4.19.x-choice-for-headers.patch @@ -0,0 +1,50 @@ +From 561770fd032744b4daac186c1ede9bce1d4b4c45 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Tue, 20 Nov 2018 15:30:06 +0200 +Subject: [PATCH] toolchain: add 4.19.x choice for headers + +Signed-off-by: Baruch Siach +Signed-off-by: Peter Korsgaard +--- + toolchain/Config.in | 5 +++++ + .../toolchain-external-custom/Config.in.options | 4 ++++ + 2 files changed, 9 insertions(+) + +diff --git a/toolchain/Config.in b/toolchain/Config.in +index c2192a52b1..474e3c8bba 100644 +--- a/toolchain/Config.in ++++ b/toolchain/Config.in +@@ -361,10 +361,15 @@ config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17 + ++config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 ++ bool ++ select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 ++ + # This order guarantees that the highest version is set, as kconfig + # stops affecting a value on the first matching default. + config BR2_TOOLCHAIN_HEADERS_AT_LEAST + string ++ default "4.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + default "4.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 + default "4.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17 + default "4.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16 +diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options +index 8665d2e2a7..288fc3f3e0 100644 +--- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options ++++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options +@@ -123,6 +123,10 @@ choice + m = ( LINUX_VERSION_CODE >> 8 ) & 0xFF + p = ( LINUX_VERSION_CODE >> 0 ) & 0xFF + ++config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_19 ++ bool "4.19.x" ++ select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 ++ + config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_18 + bool "4.18.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 +-- +2.17.1 + diff --git a/buildroot/linux/Config.in b/buildroot/linux/Config.in index efce31c7e..6b216140a 100644 --- a/buildroot/linux/Config.in +++ b/buildroot/linux/Config.in @@ -30,7 +30,7 @@ choice prompt "Kernel version" config BR2_LINUX_KERNEL_LATEST_VERSION - bool "Latest version (4.18)" + bool "Latest version (4.19)" config BR2_LINUX_KERNEL_LATEST_CIP_VERSION bool "Latest CIP SLTS version (v4.4.154-cip28)" diff --git a/buildroot/package/linux-headers/Config.in.host b/buildroot/package/linux-headers/Config.in.host index 7d7b93b89..5a71e9248 100644 --- a/buildroot/package/linux-headers/Config.in.host +++ b/buildroot/package/linux-headers/Config.in.host @@ -6,7 +6,7 @@ config BR2_PACKAGE_HOST_LINUX_HEADERS choice prompt "Kernel Headers" default BR2_KERNEL_HEADERS_AS_KERNEL if BR2_LINUX_KERNEL - default BR2_KERNEL_HEADERS_4_18 + default BR2_KERNEL_HEADERS_4_19 help Select the kernel version to get headers from. @@ -60,6 +60,10 @@ config BR2_KERNEL_HEADERS_4_18 bool "Linux 4.18.x kernel headers" select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 +config BR2_KERNEL_HEADERS_4_19 + bool "Linux 4.19.x kernel headers" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + config BR2_KERNEL_HEADERS_VERSION bool "Manually specified Linux version" help @@ -125,6 +129,10 @@ choice This is used to hide/show some packages that have strict requirements on the version of kernel headers. +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19 + bool "4.19.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_18 bool "4.18.x" select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 diff --git a/buildroot/toolchain/Config.in b/buildroot/toolchain/Config.in index 196612b8b..bf8ed5bf5 100644 --- a/buildroot/toolchain/Config.in +++ b/buildroot/toolchain/Config.in @@ -366,10 +366,15 @@ config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 bool select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17 +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 + # This order guarantees that the highest version is set, as kconfig # stops affecting a value on the first matching default. config BR2_TOOLCHAIN_HEADERS_AT_LEAST string + default "4.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 default "4.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 default "4.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17 default "4.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16 diff --git a/buildroot/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/buildroot/toolchain/toolchain-external/toolchain-external-custom/Config.in.options index 8665d2e2a..288fc3f3e 100644 --- a/buildroot/toolchain/toolchain-external/toolchain-external-custom/Config.in.options +++ b/buildroot/toolchain/toolchain-external/toolchain-external-custom/Config.in.options @@ -123,6 +123,10 @@ choice m = ( LINUX_VERSION_CODE >> 8 ) & 0xFF p = ( LINUX_VERSION_CODE >> 0 ) & 0xFF +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_19 + bool "4.19.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_18 bool "4.18.x" select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18