u-boot-amlogic-s905-tv: new aport (MR 3833)
Also add a GCC12 patch for versions <2020.xx to device/.shared-patches/u-boot Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
This commit is contained in:
parent
5adb3352e9
commit
964b1268f7
4 changed files with 221 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -970,6 +970,8 @@
|
||||||
|
# Avoid 'Not enough room for program headers' error on binutils 2.28 onwards.
|
||||||
|
LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker)
|
||||||
|
|
||||||
|
+LDFLAGS_u-boot += -z notext $(call ld-option, --apply-dynamic-relocs)
|
||||||
|
+
|
||||||
|
ifeq ($(CONFIG_ARC)$(CONFIG_NIOS2)$(CONFIG_X86)$(CONFIG_XTENSA),)
|
||||||
|
LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
|
||||||
|
endif
|
|
@ -0,0 +1,169 @@
|
||||||
|
Patch based on:
|
||||||
|
https://raw.githubusercontent.com/hexdump0815/u-boot-misc/master/misc.gxb/add-usb-kbd-uenv-txt-and-own-strings.patch
|
||||||
|
|
||||||
|
diff --git a/configs/nanopi-k2_defconfig b/configs/nanopi-k2_defconfig
|
||||||
|
index 63d486e905..5fd09d930a 100644
|
||||||
|
--- a/configs/nanopi-k2_defconfig
|
||||||
|
+++ b/configs/nanopi-k2_defconfig
|
||||||
|
@@ -39,3 +39,25 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
|
||||||
|
CONFIG_DEBUG_UART_SKIP_INIT=y
|
||||||
|
CONFIG_MESON_SERIAL=y
|
||||||
|
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||||
|
+CONFIG_POWER_DOMAIN=y
|
||||||
|
+CONFIG_MESON_GX_VPU_POWER_DOMAIN=y
|
||||||
|
+CONFIG_DM_VIDEO=y
|
||||||
|
+CONFIG_VIDEO_MESON=y
|
||||||
|
+CONFIG_SYS_WHITE_ON_BLACK=y
|
||||||
|
+CONFIG_VIDEO_DT_SIMPLEFB=y
|
||||||
|
+CONFIG_CONSOLE_MUX=y
|
||||||
|
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
||||||
|
+# CONFIG_VIDEO_BPP8 is not set
|
||||||
|
+# CONFIG_VIDEO_BPP16 is not set
|
||||||
|
+CONFIG_CMD_ADC=y
|
||||||
|
+CONFIG_SARADC_MESON=y
|
||||||
|
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||||
|
+CONFIG_DM_KEYBOARD=y
|
||||||
|
+CONFIG_USB_KEYBOARD=y
|
||||||
|
+CONFIG_BOOTDELAY=5
|
||||||
|
+CONFIG_USE_PREBOOT=y
|
||||||
|
+CONFIG_CMD_USB=y
|
||||||
|
+CONFIG_MESON_GXBB_USB_PHY=y
|
||||||
|
+CONFIG_USB=y
|
||||||
|
+CONFIG_DM_USB=y
|
||||||
|
+CONFIG_USB_DWC2=y
|
||||||
|
diff --git a/configs/odroid-c2_defconfig b/configs/odroid-c2_defconfig
|
||||||
|
index f62e83a345..38baeaec55 100644
|
||||||
|
--- a/configs/odroid-c2_defconfig
|
||||||
|
+++ b/configs/odroid-c2_defconfig
|
||||||
|
@@ -49,3 +49,19 @@ CONFIG_DM_USB=y
|
||||||
|
CONFIG_USB_DWC2=y
|
||||||
|
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||||
|
CONFIG_SMBIOS_MANUFACTURER="Hardkernel Co., Ltd."
|
||||||
|
+CONFIG_POWER_DOMAIN=y
|
||||||
|
+CONFIG_MESON_GX_VPU_POWER_DOMAIN=y
|
||||||
|
+CONFIG_DM_VIDEO=y
|
||||||
|
+CONFIG_VIDEO_MESON=y
|
||||||
|
+CONFIG_SYS_WHITE_ON_BLACK=y
|
||||||
|
+CONFIG_VIDEO_DT_SIMPLEFB=y
|
||||||
|
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
||||||
|
+# CONFIG_VIDEO_BPP8 is not set
|
||||||
|
+# CONFIG_VIDEO_BPP16 is not set
|
||||||
|
+CONFIG_CMD_ADC=y
|
||||||
|
+CONFIG_SARADC_MESON=y
|
||||||
|
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||||
|
+CONFIG_DM_KEYBOARD=y
|
||||||
|
+CONFIG_USB_KEYBOARD=y
|
||||||
|
+CONFIG_BOOTDELAY=5
|
||||||
|
+CONFIG_USE_PREBOOT=y
|
||||||
|
diff --git a/configs/p200_defconfig b/configs/p200_defconfig
|
||||||
|
index 6e43bea276..d384d87c24 100644
|
||||||
|
--- a/configs/p200_defconfig
|
||||||
|
+++ b/configs/p200_defconfig
|
||||||
|
@@ -38,3 +38,25 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
|
||||||
|
CONFIG_DEBUG_UART_SKIP_INIT=y
|
||||||
|
CONFIG_MESON_SERIAL=y
|
||||||
|
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||||
|
+CONFIG_POWER_DOMAIN=y
|
||||||
|
+CONFIG_MESON_GX_VPU_POWER_DOMAIN=y
|
||||||
|
+CONFIG_DM_VIDEO=y
|
||||||
|
+CONFIG_VIDEO_MESON=y
|
||||||
|
+CONFIG_SYS_WHITE_ON_BLACK=y
|
||||||
|
+CONFIG_VIDEO_DT_SIMPLEFB=y
|
||||||
|
+CONFIG_CONSOLE_MUX=y
|
||||||
|
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
||||||
|
+# CONFIG_VIDEO_BPP8 is not set
|
||||||
|
+# CONFIG_VIDEO_BPP16 is not set
|
||||||
|
+CONFIG_CMD_ADC=y
|
||||||
|
+CONFIG_SARADC_MESON=y
|
||||||
|
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||||
|
+CONFIG_DM_KEYBOARD=y
|
||||||
|
+CONFIG_USB_KEYBOARD=y
|
||||||
|
+CONFIG_BOOTDELAY=5
|
||||||
|
+CONFIG_USE_PREBOOT=y
|
||||||
|
+CONFIG_CMD_USB=y
|
||||||
|
+CONFIG_MESON_GXBB_USB_PHY=y
|
||||||
|
+CONFIG_USB=y
|
||||||
|
+CONFIG_DM_USB=y
|
||||||
|
+CONFIG_USB_DWC2=y
|
||||||
|
diff --git a/configs/p201_defconfig b/configs/p201_defconfig
|
||||||
|
index 9fc9d188d0..2bde343d1f 100644
|
||||||
|
--- a/configs/p201_defconfig
|
||||||
|
+++ b/configs/p201_defconfig
|
||||||
|
@@ -5,10 +5,7 @@ CONFIG_SYS_TEXT_BASE=0x01000000
|
||||||
|
CONFIG_ENV_SIZE=0x2000
|
||||||
|
CONFIG_DM_GPIO=y
|
||||||
|
CONFIG_NR_DRAM_BANKS=1
|
||||||
|
-CONFIG_DEBUG_UART_BASE=0xc81004c0
|
||||||
|
-CONFIG_DEBUG_UART_CLOCK=24000000
|
||||||
|
-CONFIG_IDENT_STRING=" p201"
|
||||||
|
-CONFIG_DEBUG_UART=y
|
||||||
|
+CONFIG_IDENT_STRING=" hexdump-gxbb"
|
||||||
|
CONFIG_OF_BOARD_SETUP=y
|
||||||
|
CONFIG_MISC_INIT_R=y
|
||||||
|
# CONFIG_DISPLAY_CPUINFO is not set
|
||||||
|
@@ -35,7 +32,29 @@ CONFIG_PINCTRL_MESON_GXBB=y
|
||||||
|
CONFIG_DM_REGULATOR=y
|
||||||
|
CONFIG_DM_REGULATOR_FIXED=y
|
||||||
|
CONFIG_DM_RESET=y
|
||||||
|
-CONFIG_DEBUG_UART_ANNOUNCE=y
|
||||||
|
-CONFIG_DEBUG_UART_SKIP_INIT=y
|
||||||
|
-CONFIG_MESON_SERIAL=y
|
||||||
|
+# CONFIG_DEBUG_UART is not set
|
||||||
|
+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
|
||||||
|
+# CONFIG_SERIAL_PRESENT is not set
|
||||||
|
+CONFIG_CONSOLE_MUX=y
|
||||||
|
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
||||||
|
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||||
|
+CONFIG_POWER_DOMAIN=y
|
||||||
|
+CONFIG_MESON_GX_VPU_POWER_DOMAIN=y
|
||||||
|
+CONFIG_DM_VIDEO=y
|
||||||
|
+CONFIG_VIDEO_MESON=y
|
||||||
|
+CONFIG_SYS_WHITE_ON_BLACK=y
|
||||||
|
+CONFIG_VIDEO_DT_SIMPLEFB=y
|
||||||
|
+# CONFIG_VIDEO_BPP8 is not set
|
||||||
|
+# CONFIG_VIDEO_BPP16 is not set
|
||||||
|
+CONFIG_CMD_ADC=y
|
||||||
|
+CONFIG_SARADC_MESON=y
|
||||||
|
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||||
|
+CONFIG_DM_KEYBOARD=y
|
||||||
|
+CONFIG_USB_KEYBOARD=y
|
||||||
|
+CONFIG_BOOTDELAY=5
|
||||||
|
+CONFIG_USE_PREBOOT=y
|
||||||
|
+CONFIG_CMD_USB=y
|
||||||
|
+CONFIG_MESON_GXBB_USB_PHY=y
|
||||||
|
+CONFIG_USB=y
|
||||||
|
+CONFIG_DM_USB=y
|
||||||
|
+CONFIG_USB_DWC2=y
|
||||||
|
diff --git a/include/configs/meson64.h b/include/configs/meson64.h
|
||||||
|
index 50707a3197..e0c3b6293a 100644
|
||||||
|
--- a/include/configs/meson64.h
|
||||||
|
+++ b/include/configs/meson64.h
|
||||||
|
@@ -76,6 +76,9 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CONFIG_EXTRA_ENV_SETTINGS
|
||||||
|
+/* the usb start below makes sure a usb keyboard is available when the autoboot prompt starts
|
||||||
|
+ * the stdin line is to disable the serial console as it might produce noise on the cmdline
|
||||||
|
+ * otherwise in some situations so that the system will hang in u-boot cmdline at boot */
|
||||||
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
|
"stdin=" STDIN_CFG "\0" \
|
||||||
|
"stdout=" STDOUT_CFG "\0" \
|
||||||
|
@@ -86,6 +89,18 @@
|
||||||
|
"pxefile_addr_r=0x01080000\0" \
|
||||||
|
"ramdisk_addr_r=0x13000000\0" \
|
||||||
|
"fdtfile=amlogic/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
|
||||||
|
+ "bootenv_addr_r=0x01080000\0" \
|
||||||
|
+ "preboot=usb start; " \
|
||||||
|
+ "mmc dev 1; " \
|
||||||
|
+ "setenv stdin usbkbd; " \
|
||||||
|
+ "for target in 1 2;do " \
|
||||||
|
+ "for prefix in / /boot/;do " \
|
||||||
|
+ "if test -e mmc ${target}:1 ${prefix}uEnv.txt;then " \
|
||||||
|
+ "load mmc ${target}:1 ${bootenv_addr_r} ${prefix}uEnv.txt; " \
|
||||||
|
+ "env import -t ${bootenv_addr_r} ${filesize}; " \
|
||||||
|
+ "fi; " \
|
||||||
|
+ "done; " \
|
||||||
|
+ "done\0" \
|
||||||
|
BOOTENV
|
||||||
|
#endif
|
||||||
|
|
40
device/testing/u-boot-amlogic-s905-tv/APKBUILD
Normal file
40
device/testing/u-boot-amlogic-s905-tv/APKBUILD
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# Maintainer: Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
||||||
|
pkgname=u-boot-amlogic-s905-tv
|
||||||
|
pkgver=2020.07
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="U-Boot for devices using the Amlogic S905 SoC"
|
||||||
|
url="https://www.denx.de/wiki/U-Boot/"
|
||||||
|
arch="aarch64"
|
||||||
|
license="GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs
|
||||||
|
ISC LGPL-2.0-only LGPL-2.1-only X11"
|
||||||
|
options="!check"
|
||||||
|
depends="soc-amlogic-s905-boot"
|
||||||
|
makedepends="$depends_dev bc dtc python3-dev swig bison flex openssl-dev
|
||||||
|
py3-setuptools linux-headers u-boot-tools"
|
||||||
|
source="
|
||||||
|
https://ftp.denx.de/pub/u-boot/u-boot-${pkgver//_/-}.tar.bz2
|
||||||
|
0001-p201_defconfig-v2020.07.patch
|
||||||
|
gcc-12-u-boot-2020-fix-read-only-segment-has-dynamic-relocations-error.patch
|
||||||
|
"
|
||||||
|
builddir="$srcdir/u-boot-${pkgver//_/-}"
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
unset LDFLAGS
|
||||||
|
make ARCH=arm p201_defconfig
|
||||||
|
make ARCH=arm CC="${CC:-gcc}"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
mkdir -p "$pkgdir/boot/"
|
||||||
|
install -Dm644 "$builddir/u-boot.bin" \
|
||||||
|
"$pkgdir/boot/u-boot.bin"
|
||||||
|
}
|
||||||
|
sha512sums="
|
||||||
|
df91264fe8a42e676c3f2aa09d644c6a3035cc8169bf52a8ab95efe7e542cfc758a0ef150949b0d9f03c7dec7d95f8d20a2efe2dbb60c2ef1a61c8063770478d u-boot-2020.07.tar.bz2
|
||||||
|
36b1c22b312ce0998dee2c44a498a15daf69613f0968bb1e1c0e7c64411a67797fd137db11297345717164f1841cee025c56b41f95130f08d545caa0bddee7b2 0001-p201_defconfig-v2020.07.patch
|
||||||
|
e8d27471665a89a882d8add3c4446bec3e0fd84fb830381e00c71e159d528c129ae9f14469ac52ef3b2f40d144c10241ebb8004276a962b87c22751cb28ab96c gcc-12-u-boot-2020-fix-read-only-segment-has-dynamic-relocations-error.patch
|
||||||
|
"
|
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/u-boot/gcc-12-u-boot-2020-fix-read-only-segment-has-dynamic-relocations-error.patch
|
Loading…
Reference in a new issue