Skip to content

Commit

Permalink
Merge pull request #15 from armbian/main
Browse files Browse the repository at this point in the history
[pull] main from armbian:main
  • Loading branch information
inozemtsev-roman authored Feb 24, 2024
2 parents 98bccc1 + 1739542 commit 3a79434
Show file tree
Hide file tree
Showing 20 changed files with 227 additions and 134 deletions.
22 changes: 22 additions & 0 deletions config/boards/aml-s9xx-box.tvb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,27 @@ SERIALCON="ttyAML0"
FULL_DESKTOP="yes"
ASOUND_STATE="asound.state.mesongx"
BOOT_LOGO="desktop"
SRC_EXTLINUX="yes"
SRC_CMDLINE='rootflags=data=writeback console=ttyAML0,115200n8 console=tty0'

function aml-s9xx-box-bsp-cli-preinst() {
#update of the board bsp-cli package fails because the filesystem type is
#fat and dpkg tries to create a hard link for the existing files as backup
#so rm the files instead in a preinst step
[ -f /boot/aml_autoscript ] && rm /boot/aml_autoscript
[ -f /boot/emmc_autoscript ] && rm /boot/emmc_autoscript
[ -f /boot/s905_autoscript ] && rm /boot/s905_autoscript
[ -f /boot/u-boot-s905 ] && rm /boot/u-boot-s905
[ -f /boot/u-boot-s905x-s912 ] && rm /boot/u-boot-s905x-s912
[ -f /boot/u-boot-s905x2-s922 ] && rm /boot/u-boot-s905x2-s922
[ -f /boot/u-boot-s905x3 ] && rm /boot/u-boot-s905x3
[ -f /boot/extlinux/extlinux.conf.template ] && rm /boot/extlinux/extlinux.conf.template
[ -f /boot/build-u-boot/readme.txt ] && rm /boot/build-u-boot/readme.txt
[ -f /boot/build-u-boot/u-boot-s905x-s912.patch ] && rm /boot/build-u-boot/u-boot-s905x-s912.patch
[ -f /boot/build-u-boot/u-boot-s905x2-s922.patch ] && rm /boot/build-u-boot/u-boot-s905x2-s922.patch
[ -f /boot/build-u-boot/u-boot-s905x3.patch ] && rm /boot/build-u-boot/u-boot-s905x3.patch

}

function post_family_tweaks_bsp__config_aml-s9xx-box_bsp() {

Expand All @@ -25,4 +44,7 @@ function post_family_tweaks_bsp__config_aml-s9xx-box_bsp() {

rm "${destination}"/usr/sbin/armbian-install

display_alert "${BOARD}" "Adding bsp-cli preinst logic" "info"

preinst_functions+=('aml-s9xx-box-bsp-cli-preinst')
}
1 change: 0 additions & 1 deletion config/boards/bigtreetech-cb1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ BOOTCONFIG="bigtreetech_cb1_defconfig"
DEFAULT_CONSOLE="serial"
SERIALCON="ttyS0"
KERNEL_TARGET="legacy,current,edge"
KERNEL_TEST_TARGET="legacy"
FORCE_BOOTSCRIPT_UPDATE="yes"
BOOTFS_TYPE="fat"
BOOT_FS_LABEL="BOOT"
Expand Down
8 changes: 8 additions & 0 deletions config/sources/families/meson-s4t7.conf
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ function kernel_copy_extra_sources__khadas_common_drivers() {
fetch_from_repo "${COMMON_DRIVERS_SOURCE}" "common_drivers:${KERNEL_MAJOR_MINOR}" "${KERNELBRANCH}" "yes"
}

function pre_package_kernel_headers__copy_common_drivers_header_include_mk_file() {
display_alert "Copy common_drivers/header_include.mk file in kernel headers"
declare makefile_destination="${headers_target_dir}"/common_drivers
run_host_command_logged mkdir -p ${makefile_destination}
run_host_command_logged cp ${kernel_work_dir}/common_drivers/header_include.mk ${makefile_destination}/
run_host_command_logged cp -r ${kernel_work_dir}/common_drivers/include ${makefile_destination}/
}

function pre_package_kernel_image__copy_meson_s4t7_overlays() {
display_alert "Copy meson s4t7 overlays"
declare dtbo_destination="${tmp_kernel_install_dirs[INSTALL_DTBS_PATH]}"/amlogic
Expand Down
4 changes: 2 additions & 2 deletions config/sources/families/sun50iw9-btt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ case $BRANCH in
ASOUND_STATE='asound.state.sun50iw9-legacy'

ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
ATFBRANCH='branch:master'
ATFBRANCH='tag:lts-v2.10.2'
ATF_PLAT="sun50i_h616"
ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin'
BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
Expand All @@ -36,7 +36,7 @@ case $BRANCH in

current | edge)
ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
ATFBRANCH='branch:master'
ATFBRANCH='tag:lts-v2.10.2'
ATF_PLAT="sun50i_h616"
ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin'
BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
Expand Down
2 changes: 1 addition & 1 deletion config/sources/families/sun50iw9.conf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ case $BRANCH in

current | edge)
ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
ATFBRANCH='branch:master'
ATFBRANCH='tag:lts-v2.10.2'
ATF_PLAT="sun50i_h616"
ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin'
BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
Expand Down
2 changes: 1 addition & 1 deletion lib/functions/artifacts/artifact-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function artifact_kernel_prepare_version() {
declare var_config_hash_short="${vars_config_hash:0:${short_hash_size}}"

# Hash the extension hooks
declare -a extension_hooks_to_hash=("pre_package_kernel_image" "kernel_copy_extra_sources")
declare -a extension_hooks_to_hash=("pre_package_kernel_image" "kernel_copy_extra_sources" "pre_package_kernel_headers")
declare -a extension_hooks_hashed=("$(dump_extension_method_sources_functions "${extension_hooks_to_hash[@]}")")
declare hash_hooks="undetermined"
hash_hooks="$(echo "${extension_hooks_hashed[@]}" | sha256sum | cut -d' ' -f1)"
Expand Down
4 changes: 3 additions & 1 deletion lib/functions/artifacts/artifact-uboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ function artifact_uboot_prepare_version() {
hash_hooks_and_functions="$(echo "${hash_hooks}" "${hash_uboot_functions}" | sha256sum | cut -d' ' -f1)"
declare hash_hooks_and_functions_short="${hash_hooks_and_functions:0:${short_hash_size}}"

display_alert "BOOTCONFIG: ${BOOTCONFIG}" "BOOTCONFIG: ${BOOTCONFIG}" "debug"

# Hash variables that affect the build and package of u-boot
declare -a vars_to_hash=(
"BASE_VAR_REBUILD_2" # Change this to force a full rebuild of all uboot's
"${BOOTCONFIG:-"no_bootconfig"}"
"${BOOTDELAY}" "${UBOOT_DEBUGGING}" "${UBOOT_TARGET_MAP}" # general for all families
"${BOOT_SCENARIO}" "${BOOT_SUPPORT_SPI}" "${BOOT_SOC}" # rockchip stuff, sorry.
"${DDR_BLOB}" "${BL31_BLOB}" "${MINILOADER_BLOB}" # More rockchip stuff, even more sorry.
Expand Down
7 changes: 7 additions & 0 deletions lib/functions/compilation/kernel-debs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,13 @@ function kernel_package_callback_linux_headers() {
)
fi

call_extension_method "pre_package_kernel_headers" <<- 'PRE_PACKAGE_KERNEL_HEADERS'
*fix kernel headers before packaging*
Some (legacy/vendor) kernels need preprocessing of the produced kernel headers before packaging.
Use this hook to do that, by modifying the file in place, in `${headers_target_dir}` directory.
The kernel sources can be found in `${kernel_work_dir}`.
PRE_PACKAGE_KERNEL_HEADERS

# Generate a control file
# TODO: libssl-dev is only required if we're signing modules, which is a kernel .config option.
cat <<- CONTROL_FILE > "${package_DEBIAN_dir}/control"
Expand Down
11 changes: 0 additions & 11 deletions packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf

This file was deleted.

14 changes: 14 additions & 0 deletions packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
label Armbian-unofficial
kernel /Image
initrd /uInitrd
fdtdir /dtb/

#Insert the correct FDT line for your box's dtb in the extlinux.conf file
#The dtbs for Amlogic s9xx boxes are located in /boot/dtb/amlogic
#For example for a TX3 mini box the FDT line to insert would look like this:
FDT /dtb/amlogic/meson-gxl-s905w-tx3-mini.dtb


append root=UUID=<root partition uuid> rootflags=data=writeback console=ttyAML0,115200n8 console=tty0 rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles


2 changes: 1 addition & 1 deletion packages/bsp/common/usr/sbin/ddbr
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ then
echo "$_r UNABLE TO FIND ANY DRIVES ON THIS SYSTEM!!! $_x"
exit 1
fi
runfrom=$(lsblk | grep / | grep -oE '(mmcblk[0-9]|sda[0-9])')
runfrom=$(lsblk | grep / | grep -oE '(mmcblk[0-9]|sda[0-9])' | sort | uniq)
if [ "$runfrom" = "" ]
then
echo "$_r UNABLE TO FIND ROOT OF THE RUNNING SYSTEM!!! $_x"
Expand Down
40 changes: 0 additions & 40 deletions patch/kernel/archive/rockchip-6.6/hack-barrier-stmmac.patch

This file was deleted.

40 changes: 0 additions & 40 deletions patch/kernel/archive/rockchip-6.7/hack-barrier-stmmac.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ index 000000000000..8a18476307ff
+ regulator-always-on;
+ };
+
+ reg_aldo1: ldo1 {
+ reg_aldo1: aldo1 {
+ regulator-name = "axp313a-aldo1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
Expand All @@ -367,7 +367,7 @@ index 000000000000..8a18476307ff
+ regulator-always-on;
+ };
+
+ reg_dldo1: ldo2 {
+ reg_dldo1: dldo1 {
+ regulator-name = "axp313a-dldo1";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,46 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Your Name <[email protected]>
Date: Tue, 30 May 2023 10:18:55 +0800
Subject: add bigtreetech-cb1 dts
From: Alan <Alan>
Date: Tue, 30 May 2023 17:36:29 +0800
Subject: [ARCHEOLOGY] Patches: add current(6.1) & edge(6.2) patch for
BigTreeTech CB1

> X-Git-Archeology: > recovered message: > Signed-off-by: Alan.Ma from BigTreeTech [email protected]
> X-Git-Archeology: - Revision 9d69bb1da699f5729dc5c1dcc2d8d5f4590152fd: https://github.com/armbian/build/commit/9d69bb1da699f5729dc5c1dcc2d8d5f4590152fd
> X-Git-Archeology: Date: Tue, 30 May 2023 17:36:29 +0800
> X-Git-Archeology: From: Alan <Alan>
> X-Git-Archeology: Subject: Patches: add current(6.1) & edge(6.2) patch for BigTreeTech CB1
> X-Git-Archeology:
> X-Git-Archeology: - Revision 8562428877003ddd46045cb3429d7fdc9df4acee: https://github.com/armbian/build/commit/8562428877003ddd46045cb3429d7fdc9df4acee
> X-Git-Archeology: Date: Sat, 02 Sep 2023 03:34:28 +0518
> X-Git-Archeology: From: Gunjan Gupta <[email protected]>
> X-Git-Archeology: Subject: Allwinner: Kernel patches for 6.5-rc7 kernel
> X-Git-Archeology:
> X-Git-Archeology: - Revision bb78fac2fadb40a43a9ccb36266dbd21746c2eb6: https://github.com/armbian/build/commit/bb78fac2fadb40a43a9ccb36266dbd21746c2eb6
> X-Git-Archeology: Date: Fri, 29 Sep 2023 08:46:52 +0200
> X-Git-Archeology: From: Ricardo Pardini <[email protected]>
> X-Git-Archeology: Subject: `sunxi`/`sunxi64` `edge` 6.5.y: rebase/rewrite all patches for v6.5.5; fix UTF-8 "From:" encoding
> X-Git-Archeology:
> X-Git-Archeology: - Revision d1186b8a0e3d44d5b285e94772ebe2c17a014193: https://github.com/armbian/build/commit/d1186b8a0e3d44d5b285e94772ebe2c17a014193
> X-Git-Archeology: Date: Mon, 30 Oct 2023 22:46:11 +0518
> X-Git-Archeology: From: Gunjan Gupta <[email protected]>
> X-Git-Archeology: Subject: kernel: sunxi: Add patches for 6.6 kernel
> X-Git-Archeology:
> X-Git-Archeology: - Revision a269c9a1c5784bd89630df1652923f0d76278b61: https://github.com/armbian/build/commit/a269c9a1c5784bd89630df1652923f0d76278b61
> X-Git-Archeology: Date: Sun, 24 Dec 2023 09:13:08 +0100
> X-Git-Archeology: From: Gunjan Gupta <[email protected]>
> X-Git-Archeology: Subject: Refreshed patches using rewrite-kernel-patches command
> X-Git-Archeology:
> X-Git-Archeology: - Revision 30ef1a3e149f96200bffaf1c3138a4467b6f0aa7: https://github.com/armbian/build/commit/30ef1a3e149f96200bffaf1c3138a4467b6f0aa7
> X-Git-Archeology: Date: Sun, 24 Dec 2023 09:13:08 +0100
> X-Git-Archeology: From: Gunjan Gupta <[email protected]>
> X-Git-Archeology: Subject: Allwinner: Add kernel patches for 6.7 kernel
> X-Git-Archeology:
---
arch/arm64/boot/dts/allwinner/Makefile | 2 +
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts | 44 ++
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts | 35 ++
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 241 +++++++++-
4 files changed, 296 insertions(+), 26 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 227 +++++++++-
4 files changed, 289 insertions(+), 19 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index db00a538d7ca..fc37dd819137 100644
Expand Down Expand Up @@ -115,7 +147,7 @@ index 000000000000..e18dd854d74b
+ <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
index 1fed2b46cfe8..8a18476307ff 100644
index 1fed2b46cfe8..b7bc079be521 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
@@ -1,33 +1,53 @@
Expand Down Expand Up @@ -324,7 +356,7 @@ index 1fed2b46cfe8..8a18476307ff 100644
};
};

@@ -90,49 +205,123 @@ &r_i2c {
@@ -90,29 +205,34 @@ &r_i2c {
axp313a: pmic@36 {
compatible = "x-powers,axp313a";
reg = <0x36>;
Expand All @@ -334,10 +366,9 @@ index 1fed2b46cfe8..8a18476307ff 100644

regulators{
reg_dcdc1: dcdc1 {
- regulator-name = "vdd-gpu-sys";
regulator-name = "vdd-gpu-sys";
- regulator-min-microvolt = <810000>;
- regulator-max-microvolt = <990000>;
+ regulator-name = "axp313a-dcdc1";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-step-delay-us = <25>;
Expand All @@ -346,10 +377,9 @@ index 1fed2b46cfe8..8a18476307ff 100644
};

reg_dcdc2: dcdc2 {
- regulator-name = "vdd-cpu";
regulator-name = "vdd-cpu";
- regulator-min-microvolt = <810000>;
- regulator-max-microvolt = <1100000>;
+ regulator-name = "axp313a-dcdc2";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1540000>;
+ regulator-step-delay-us = <25>;
Expand All @@ -359,32 +389,27 @@ index 1fed2b46cfe8..8a18476307ff 100644
};

reg_dcdc3: dcdc3 {
- regulator-name = "vcc-dram";
regulator-name = "vcc-dram";
- regulator-min-microvolt = <1350000>;
- regulator-max-microvolt = <1500000>;
+ regulator-name = "axp313a-dcdc3";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1840000>;
+ regulator-step-delay-us = <25>;
+ regulator-final-delay-us = <50>;
regulator-always-on;
};

- reg_aldo1: aldo1 {
- regulator-name = "vcc-1v8-pll";
+ reg_aldo1: ldo1 {
+ regulator-name = "axp313a-aldo1";
@@ -120,6 +240,8 @@ reg_aldo1: aldo1 {
regulator-name = "vcc-1v8-pll";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
+ regulator-step-delay-us = <25>;
+ regulator-final-delay-us = <50>;
regulator-always-on;
};

- reg_dldo1: dldo1 {
- regulator-name = "vcc-3v3-io";
+ reg_dldo1: ldo2 {
+ regulator-name = "axp313a-dldo1";
@@ -127,12 +249,79 @@ reg_dldo1: dldo1 {
regulator-name = "vcc-3v3-io";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
+ regulator-step-delay-us = <25>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <[email protected]>
Date: Sat, 1 Jul 2023 10:49:27 +0200
Subject: rk3588_meko_defconfig - evb sans optee
Subject: rk3588_meko_defconfig - evb sans optee (original-ish by Meko from
EVB)

---
configs/rk3588_meko_defconfig | 238 ++++++++++
Expand Down
Loading

0 comments on commit 3a79434

Please sign in to comment.