u-boot-amlogic-s905x-tv: new aport (MR 3955)

This commit is contained in:
exkc 2023-03-16 03:08:45 +08:00 committed by Newbyte
parent 287e7c4521
commit 611ead9cf1
No known key found for this signature in database
GPG key ID: 990600ED1DB95E02
3 changed files with 136 additions and 0 deletions

View file

@ -0,0 +1,96 @@
diff --git a/arch/arm/dts/meson-gxl-s905x-libretech-cc.dts b/arch/arm/dts/meson-gxl-s905x-libretech-cc.dts
index e8348b2728..92c9c2b9f0 100644
--- a/arch/arm/dts/meson-gxl-s905x-libretech-cc.dts
+++ b/arch/arm/dts/meson-gxl-s905x-libretech-cc.dts
@@ -55,17 +55,11 @@
compatible = "gpio-leds";
system {
- label = "librecomputer:system-status";
+ label = "system-status";
gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
default-state = "on";
panic-indicator;
};
-
- blue {
- label = "librecomputer:blue";
- gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "heartbeat";
- };
};
memory@0 {
diff --git a/configs/khadas-vim2_defconfig b/configs/khadas-vim2_defconfig
index 771632c782..eda02e6a5f 100644
--- a/configs/khadas-vim2_defconfig
+++ b/configs/khadas-vim2_defconfig
@@ -64,3 +64,6 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada
CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_BOOTDELAY=5
+CONFIG_USE_PREBOOT=y
diff --git a/configs/libretech-cc_defconfig b/configs/libretech-cc_defconfig
index 48e8800ce4..68de6715a7 100644
--- a/configs/libretech-cc_defconfig
+++ b/configs/libretech-cc_defconfig
@@ -64,3 +64,8 @@ CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_VIDEO_MESON=y
CONFIG_VIDEO_DT_SIMPLEFB=y
CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_BOOTDELAY=5
+CONFIG_USE_PREBOOT=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
diff --git a/configs/libretech-s912-pc_defconfig b/configs/libretech-s912-pc_defconfig
index 50138aa3ac..bc1c07e232 100644
--- a/configs/libretech-s912-pc_defconfig
+++ b/configs/libretech-s912-pc_defconfig
@@ -30,7 +30,6 @@ CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_REGULATOR=y
CONFIG_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="meson-gxm-s912-libretech-pc"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SARADC_MESON=y
CONFIG_DM_KEYBOARD=y
@@ -74,3 +73,5 @@ CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_VIDEO_MESON=y
CONFIG_VIDEO_DT_SIMPLEFB=y
CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_BOOTDELAY=5
diff --git a/include/configs/meson64.h b/include/configs/meson64.h
index 50707a3197..61da7caa08 100644
--- a/include/configs/meson64.h
+++ b/include/configs/meson64.h
@@ -76,6 +76,8 @@
#endif
#ifndef CONFIG_EXTRA_ENV_SETTINGS
+/* the led system-status on is a hack to turn on the led as for some strange reason it does not
+ * the usb start below makes sure a usb keyboard is available when the autoboot prompt starts */
#define CONFIG_EXTRA_ENV_SETTINGS \
"stdin=" STDIN_CFG "\0" \
"stdout=" STDOUT_CFG "\0" \
@@ -86,6 +88,17 @@
"pxefile_addr_r=0x01080000\0" \
"ramdisk_addr_r=0x13000000\0" \
"fdtfile=amlogic/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+ "bootenv_addr_r=0x01080000\0" \
+ "preboot=led system-status on; " \
+ "usb start; " \
+ "for target in 0 1;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

View file

@ -0,0 +1,39 @@
# Maintainer: exkc <exxxxkc@getgoogleoff.me>
pkgname=u-boot-amlogic-s905x-tv
pkgver=2020.07
pkgrel=0
pkgdesc="U-Boot for devices using the Amlogic S905X 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 p212_defconfig
make
}
package() {
install -Dm644 "$builddir/u-boot.bin" \
"$pkgdir/boot/u-boot.bin"
}
sha512sums="
df91264fe8a42e676c3f2aa09d644c6a3035cc8169bf52a8ab95efe7e542cfc758a0ef150949b0d9f03c7dec7d95f8d20a2efe2dbb60c2ef1a61c8063770478d u-boot-2020.07.tar.bz2
6c8527fa34948a84bce889771c35979376139e2947ad7e449de3e1d8616353c9ebba088b19092750e9e19fcb9719443fbd6955f53f6e97ace5515b2840fb4985 0001-p201_defconfig-v2020.07.patch
e8d27471665a89a882d8add3c4446bec3e0fd84fb830381e00c71e159d528c129ae9f14469ac52ef3b2f40d144c10241ebb8004276a962b87c22751cb28ab96c gcc-12-u-boot-2020-fix-read-only-segment-has-dynamic-relocations-error.patch
"

View file

@ -0,0 +1 @@
../../.shared-patches/u-boot/gcc-12-u-boot-2020-fix-read-only-segment-has-dynamic-relocations-error.patch