├── .gitignore ├── local-scripts ├── script_dir.sh ├── refresh_uboot.sh └── build_r2s.sh ├── openwrt-23.05 ├── patches │ ├── package │ │ ├── adguardhome │ │ │ ├── files │ │ │ │ ├── adguardhome.config │ │ │ │ └── adguardhome.init │ │ │ └── Makefile │ │ ├── uboot-rockchip │ │ │ ├── patches │ │ │ │ ├── 004-no-kwbimage.patch │ │ │ │ ├── 302-arm64-dts-rk3399-nanopi4-Add-u-boot-spl-broken-hs.patch │ │ │ │ ├── 005-fix-mkimage-host-build.patch │ │ │ │ ├── 307-configs-Add-CONFIG_SYS_MMC_ENV_DEV-1-for-nanopi-r4s.patch │ │ │ │ ├── 303-rockchip-rk3328-add-mmc-aliases-for-nanopi-r2s.patch │ │ │ │ ├── 306-arm64-rk3399-r4s-disable-nodes-for-vopb-vopl.patch │ │ │ │ ├── 301-rockchip-dw_mmc-support-to-disable-HS-mode-for-SPL.patch │ │ │ │ ├── 304-mmc-dw_mmc-Fixes-timeout-issue-for-FIFO-mode.patch │ │ │ │ ├── 308-rockchip-rk3328-Implement-arch_addr_aligned-hook.patch │ │ │ │ ├── 305-common-bouncebuf-Add-arch_addr_aligned-hook-for-rk33.patch │ │ │ │ ├── 003-Revert-Makefile-Only-build-dtc-if-needed.patch │ │ │ │ ├── 201-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch │ │ │ │ └── 309-ram-rk3399-Add-support-for-multiple-DDR-types-v2.patch │ │ │ └── Makefile │ │ └── mbedtls │ │ │ └── patches │ │ │ └── 200-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch │ ├── snd-usb-caiaq.makefileaddon │ └── target │ │ └── linux │ │ └── rockchip │ │ ├── patches-5.15 │ │ ├── 005-rockchip-rk3328-add-compatible-to-NanoPi-R2S-etherne.patch │ │ ├── 100-rockchip-use-system-LED-for-OpenWrt.patch │ │ └── 103-arm64-rockchip-add-OF-node-for-eth.patch │ │ └── image │ │ └── armv8.mk ├── steps │ ├── 05-create_luci_acl.sh │ ├── 01_clone_openwrt.sh │ ├── 02_prepare_openwrt_folder.sh │ ├── 06-create_config_from_seed.sh │ ├── organize_files.sh │ ├── 07-all_kmods.sh │ ├── 04-prepare_package.sh │ ├── 03_patch_openwrt.sh │ └── create_acl_for_luci.sh ├── release-info.md └── seed │ ├── ao-R4S-mini.seed │ └── ao-R4S-mini.seed.orig ├── openwrt-24.10 ├── patches │ ├── package │ │ ├── adguardhome │ │ │ ├── files │ │ │ │ ├── adguardhome.config │ │ │ │ └── adguardhome.init │ │ │ └── Makefile │ │ ├── uboot-rockchip │ │ │ ├── patches │ │ │ │ ├── 004-no-kwbimage.patch │ │ │ │ ├── 302-arm64-dts-rk3399-nanopi4-Add-u-boot-spl-broken-hs.patch │ │ │ │ ├── 005-fix-mkimage-host-build.patch │ │ │ │ ├── 307-configs-Add-CONFIG_SYS_MMC_ENV_DEV-1-for-nanopi-r4s.patch │ │ │ │ ├── 303-rockchip-rk3328-add-mmc-aliases-for-nanopi-r2s.patch │ │ │ │ ├── 306-arm64-rk3399-r4s-disable-nodes-for-vopb-vopl.patch │ │ │ │ ├── 301-rockchip-dw_mmc-support-to-disable-HS-mode-for-SPL.patch │ │ │ │ ├── 304-mmc-dw_mmc-Fixes-timeout-issue-for-FIFO-mode.patch │ │ │ │ ├── 308-rockchip-rk3328-Implement-arch_addr_aligned-hook.patch │ │ │ │ ├── 305-common-bouncebuf-Add-arch_addr_aligned-hook-for-rk33.patch │ │ │ │ ├── 003-Revert-Makefile-Only-build-dtc-if-needed.patch │ │ │ │ ├── 201-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch │ │ │ │ └── 309-ram-rk3399-Add-support-for-multiple-DDR-types-v2.patch │ │ │ └── Makefile │ │ └── mbedtls │ │ │ └── patches │ │ │ └── 200-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch │ ├── snd-usb-caiaq.makefileaddon │ └── target │ │ └── linux │ │ └── rockchip │ │ ├── patches-6.6 │ │ ├── 103-arm64-dts-rockchip-lower-mmc-speed.patch │ │ ├── 101-rockchip-rk3328-add-compatible-to-NanoPi-R2S-etherne.patch │ │ ├── 501-mmc-core-set-initial-signal-voltage-on-power-off.patch │ │ ├── 402-1-rk3399-fix-pci-phy-reset-on-probe.patch │ │ └── 610-arm64-rockchip-add-OF-node-for-eth.patch │ │ └── image │ │ └── armv8.mk ├── steps │ ├── 05-create_luci_acl.sh │ ├── 01_clone_openwrt.sh │ ├── 02_prepare_openwrt_folder.sh │ ├── 06-create_config_from_seed.sh │ ├── organize_files.sh │ ├── 07-all_kmods.sh │ ├── 04-prepare_package.sh │ ├── 03_patch_openwrt.sh │ └── create_acl_for_luci.sh ├── release-info.md └── seed │ └── ao-R4S-mini.seed ├── docs └── resize-f2fs.md ├── LICENSE ├── README.md ├── .github ├── workflows │ ├── cleanup.yml │ └── NanoPi-Build.yml └── actions │ └── setup-devenv │ └── action.yml └── workflow-scripts └── free_disk_space.sh /.gitignore: -------------------------------------------------------------------------------- 1 | build/ -------------------------------------------------------------------------------- /local-scripts/script_dir.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | 5 | SCRIPTDIR=$(dirname $(readlink -f $0)) 6 | echo $SCRIPTDIR -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/adguardhome/files/adguardhome.config: -------------------------------------------------------------------------------- 1 | config adguardhome config 2 | # Where to store persistent data by AdGuard Home 3 | option workdir /var/adguardhome 4 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/adguardhome/files/adguardhome.config: -------------------------------------------------------------------------------- 1 | config adguardhome config 2 | # Where to store persistent data by AdGuard Home 3 | option workdir /var/adguardhome 4 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/004-no-kwbimage.patch: -------------------------------------------------------------------------------- 1 | --- a/tools/Makefile 2 | +++ b/tools/Makefile 3 | @@ -117,7 +117,6 @@ dumpimage-mkimage-objs := aisimage.o \ 4 | imximage.o \ 5 | imx8image.o \ 6 | imx8mimage.o \ 7 | - kwbimage.o \ 8 | lib/md5.o \ 9 | lpc32xximage.o \ 10 | mxsimage.o \ 11 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/004-no-kwbimage.patch: -------------------------------------------------------------------------------- 1 | --- a/tools/Makefile 2 | +++ b/tools/Makefile 3 | @@ -117,7 +117,6 @@ dumpimage-mkimage-objs := aisimage.o \ 4 | imximage.o \ 5 | imx8image.o \ 6 | imx8mimage.o \ 7 | - kwbimage.o \ 8 | lib/md5.o \ 9 | lpc32xximage.o \ 10 | mxsimage.o \ 11 | -------------------------------------------------------------------------------- /openwrt-23.05/steps/05-create_luci_acl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | cd "$ROOTDIR/build" 10 | 11 | # install feeds 12 | cd openwrt 13 | 14 | /bin/bash $ROOTDIR/openwrt-23.05/steps/create_acl_for_luci.sh -a -------------------------------------------------------------------------------- /openwrt-24.10/steps/05-create_luci_acl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | cd "$ROOTDIR/build" 10 | 11 | # install feeds 12 | cd openwrt 13 | 14 | /bin/bash $ROOTDIR/openwrt-24.10/steps/create_acl_for_luci.sh -a -------------------------------------------------------------------------------- /openwrt-23.05/steps/01_clone_openwrt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/LICENSE" ]; then 5 | echo "Please run from root" 6 | exit 1 7 | fi 8 | 9 | cd $ROOTDIR 10 | mkdir build 11 | cd build 12 | 13 | OPENWRT_FOLDER=openwrt-fresh-23.05 14 | 15 | git clone -b openwrt-23.05 --single-branch https://git.openwrt.org/openwrt/openwrt.git $OPENWRT_FOLDER 16 | #git clone --single-branch https://git.openwrt.org/openwrt/openwrt.git $OPENWRT_FOLDER 17 | 18 | cd $OPENWRT_FOLDER 19 | echo "Current OpenWRT commit" 20 | git log -1 21 | -------------------------------------------------------------------------------- /openwrt-24.10/steps/01_clone_openwrt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/LICENSE" ]; then 5 | echo "Please run from root" 6 | exit 1 7 | fi 8 | 9 | cd $ROOTDIR 10 | mkdir build 11 | cd build 12 | 13 | OPENWRT_FOLDER=openwrt-fresh-24.10 14 | 15 | git clone -b openwrt-24.10 --single-branch https://git.openwrt.org/openwrt/openwrt.git $OPENWRT_FOLDER 16 | #git clone --single-branch https://git.openwrt.org/openwrt/openwrt.git $OPENWRT_FOLDER 17 | 18 | cd $OPENWRT_FOLDER 19 | echo "Current OpenWRT commit" 20 | git log -1 21 | -------------------------------------------------------------------------------- /local-scripts/refresh_uboot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | BUILDDIR="$ROOTDIR/build" 10 | SCRIPTDIR=$(dirname $(readlink -f $0)) 11 | 12 | if [ ! -e "$BUILDDIR/openwrt-fresh-master" ]; then 13 | echo "Please run from root / no openwrt-fresh-master ! please clone first" 14 | exit 1 15 | fi 16 | 17 | rm -rf $ROOTDIR/package/uboot-rockchip 18 | cp -R $BUILDDIR/openwrt-fresh-master/package/boot/uboot-rockchip $ROOTDIR/package/uboot-rockchip 19 | -------------------------------------------------------------------------------- /openwrt-23.05/steps/02_prepare_openwrt_folder.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | cd "$ROOTDIR/build" 10 | 11 | cp -R openwrt-fresh-23.05 openwrt 12 | 13 | # freeze revision to 23.05.5 14 | cd openwrt 15 | git reset --hard 28cf53e6bd9bb68958aae7958e7950d967f02b46 16 | 17 | echo "Current OpenWRT commit" 18 | git log -1 19 | git describe 20 | 21 | # install feeds 22 | # cd openwrt 23 | # ./scripts/feeds update -a && ./scripts/feeds install -a 24 | 25 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/adguardhome/files/adguardhome.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | PROG=/usr/bin/AdGuardHome 4 | 5 | USE_PROCD=1 6 | 7 | # starts after network starts 8 | START=21 9 | # stops before networking stops 10 | STOP=89 11 | 12 | start_service() { 13 | config_load adguardhome 14 | config_get WORK_DIR config workdir 15 | 16 | [ -d "$WORK_DIR" ] || mkdir -m 0755 -p "$WORK_DIR" 17 | 18 | procd_open_instance 19 | procd_set_param command "$PROG" -c /etc/adguardhome.yaml -w "$WORK_DIR" --no-check-update 20 | procd_set_param stdout 1 21 | procd_set_param stderr 1 22 | procd_close_instance 23 | } 24 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/adguardhome/files/adguardhome.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | PROG=/usr/bin/AdGuardHome 4 | 5 | USE_PROCD=1 6 | 7 | # starts after network starts 8 | START=21 9 | # stops before networking stops 10 | STOP=89 11 | 12 | start_service() { 13 | config_load adguardhome 14 | config_get WORK_DIR config workdir 15 | 16 | [ -d "$WORK_DIR" ] || mkdir -m 0755 -p "$WORK_DIR" 17 | 18 | procd_open_instance 19 | procd_set_param command "$PROG" -c /etc/adguardhome.yaml -w "$WORK_DIR" --no-check-update 20 | procd_set_param stdout 1 21 | procd_set_param stderr 1 22 | procd_close_instance 23 | } 24 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/snd-usb-caiaq.makefileaddon: -------------------------------------------------------------------------------- 1 | # append to package/kernel/linux/modules/usb.mk 2 | 3 | define KernelPackage/sound-usb-caiaq 4 | TITLE:=Support for USB audio devices caiaq 5 | KCONFIG:= \ 6 | CONFIG_SND_USB_CAIAQ \ 7 | CONFIG_SND_USB_CAIAQ_INPUT=n 8 | $(call AddDepends/usb) 9 | $(call AddDepends/sound) 10 | FILES:= \ 11 | $(LINUX_DIR)/sound/usb/caiaq/snd-usb-caiaq.ko 12 | AUTOLOAD:=$(call AutoProbe,snd-usb-caiaq) 13 | endef 14 | 15 | define KernelPackage/sound-usb-caiaq/description 16 | Kernel support for USB audio devices caiaq 17 | endef 18 | 19 | $(eval $(call KernelPackage,sound-usb-caiaq)) 20 | 21 | 22 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/snd-usb-caiaq.makefileaddon: -------------------------------------------------------------------------------- 1 | # append to package/kernel/linux/modules/usb.mk 2 | 3 | define KernelPackage/sound-usb-caiaq 4 | TITLE:=Support for USB audio devices caiaq 5 | KCONFIG:= \ 6 | CONFIG_SND_USB_CAIAQ \ 7 | CONFIG_SND_USB_CAIAQ_INPUT=n 8 | $(call AddDepends/usb) 9 | $(call AddDepends/sound) 10 | FILES:= \ 11 | $(LINUX_DIR)/sound/usb/caiaq/snd-usb-caiaq.ko 12 | AUTOLOAD:=$(call AutoProbe,snd-usb-caiaq) 13 | endef 14 | 15 | define KernelPackage/sound-usb-caiaq/description 16 | Kernel support for USB audio devices caiaq 17 | endef 18 | 19 | $(eval $(call KernelPackage,sound-usb-caiaq)) 20 | 21 | 22 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/302-arm64-dts-rk3399-nanopi4-Add-u-boot-spl-broken-hs.patch: -------------------------------------------------------------------------------- 1 | From c608d2fd04cb4973f75082807e5df0653fc6e819 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 1 Dec 2021 18:20:37 +0800 4 | Subject: [PATCH 302/308] arm64: dts: rk3399-nanopi4: Add u-boot,spl-broken-hs 5 | 6 | Signed-off-by: hmz007 7 | --- 8 | arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 2 ++ 9 | 1 file changed, 2 insertions(+) 10 | 11 | --- a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi 12 | +++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi 13 | @@ -13,4 +13,6 @@ 14 | 15 | &sdmmc { 16 | pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>; 17 | + 18 | + u-boot,spl-broken-hs; 19 | }; 20 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/302-arm64-dts-rk3399-nanopi4-Add-u-boot-spl-broken-hs.patch: -------------------------------------------------------------------------------- 1 | From c608d2fd04cb4973f75082807e5df0653fc6e819 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 1 Dec 2021 18:20:37 +0800 4 | Subject: [PATCH 302/308] arm64: dts: rk3399-nanopi4: Add u-boot,spl-broken-hs 5 | 6 | Signed-off-by: hmz007 7 | --- 8 | arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 2 ++ 9 | 1 file changed, 2 insertions(+) 10 | 11 | --- a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi 12 | +++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi 13 | @@ -13,4 +13,6 @@ 14 | 15 | &sdmmc { 16 | pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>; 17 | + 18 | + u-boot,spl-broken-hs; 19 | }; 20 | -------------------------------------------------------------------------------- /openwrt-24.10/steps/02_prepare_openwrt_folder.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | cd "$ROOTDIR/build" 10 | 11 | cp -R openwrt-fresh-24.10 openwrt 12 | 13 | # freeze revision to 24.10.5 14 | cd openwrt 15 | git reset --hard 4f7e6e554be2aef6a55be36f9f954d56705eb2ee 16 | # patch telephony feed to include last patch (remove after 24.10.4) 17 | #sed -i 's/2a4541d46199ac96fac214d02c908402831c4dc6/11e9c73bff6be34ff2fdcd4bc0e81a4723d78652/g' feeds.conf.default 18 | 19 | echo "Current OpenWRT commit" 20 | git log -1 21 | git describe 22 | 23 | # install feeds 24 | # cd openwrt 25 | # ./scripts/feeds update -a && ./scripts/feeds install -a 26 | 27 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/005-fix-mkimage-host-build.patch: -------------------------------------------------------------------------------- 1 | --- a/tools/image-host.c 2 | +++ b/tools/image-host.c 3 | @@ -1122,6 +1122,7 @@ static int fit_config_add_verification_d 4 | * 2) get public key (X509_get_pubkey) 5 | * 3) provide der format (d2i_RSAPublicKey) 6 | */ 7 | +#ifdef CONFIG_TOOLS_LIBCRYPTO 8 | static int read_pub_key(const char *keydir, const void *name, 9 | unsigned char **pubkey, int *pubkey_len) 10 | { 11 | @@ -1175,6 +1176,13 @@ err_cert: 12 | fclose(f); 13 | return ret; 14 | } 15 | +#else 16 | +static int read_pub_key(const char *keydir, const void *name, 17 | + unsigned char **pubkey, int *pubkey_len) 18 | +{ 19 | + return -ENOSYS; 20 | +} 21 | +#endif 22 | 23 | int fit_pre_load_data(const char *keydir, void *keydest, void *fit) 24 | { 25 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/005-fix-mkimage-host-build.patch: -------------------------------------------------------------------------------- 1 | --- a/tools/image-host.c 2 | +++ b/tools/image-host.c 3 | @@ -1122,6 +1122,7 @@ static int fit_config_add_verification_d 4 | * 2) get public key (X509_get_pubkey) 5 | * 3) provide der format (d2i_RSAPublicKey) 6 | */ 7 | +#ifdef CONFIG_TOOLS_LIBCRYPTO 8 | static int read_pub_key(const char *keydir, const void *name, 9 | unsigned char **pubkey, int *pubkey_len) 10 | { 11 | @@ -1175,6 +1176,13 @@ err_cert: 12 | fclose(f); 13 | return ret; 14 | } 15 | +#else 16 | +static int read_pub_key(const char *keydir, const void *name, 17 | + unsigned char **pubkey, int *pubkey_len) 18 | +{ 19 | + return -ENOSYS; 20 | +} 21 | +#endif 22 | 23 | int fit_pre_load_data(const char *keydir, void *keydest, void *fit) 24 | { 25 | -------------------------------------------------------------------------------- /docs/resize-f2fs.md: -------------------------------------------------------------------------------- 1 | # How to expand filesystem to fill SD card 2 | 3 | ## Squashfs 4 | Note : cfdisk, losetup and f2fs-tools are needed, included in latest images 5 | 6 | 1. first use cfdisk to expand partition 7 | ``` 8 | cfdisk /dev/mmcblk0 9 | ``` 10 | Select the second partition and resize it, write and quit. 11 | 12 | 2. grow f2fs filesystem 13 | ``` 14 | LOOP="$(losetup -n -O NAME | sort | sed -n -e "1p")" 15 | ROOT="$(losetup -n -O BACK-FILE ${LOOP} | sed -e "s|^|/dev|")" 16 | OFFS="$(losetup -n -O OFFSET ${LOOP})" 17 | LOOP="$(losetup -f)" 18 | losetup -o ${OFFS} ${LOOP} ${ROOT} 19 | fsck.f2fs -f ${LOOP} 20 | mount ${LOOP} /mnt 21 | umount ${LOOP} 22 | resize.f2fs ${LOOP} 23 | reboot 24 | ``` 25 | 26 | ## Notes 27 | 28 | Original info from here : https://openwrt.org/docs/guide-user/installation/openwrt_x86#resizing_filesystem 29 | 30 | -------------------------------------------------------------------------------- /openwrt-23.05/steps/06-create_config_from_seed.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | cd "$ROOTDIR/build" 10 | 11 | cd openwrt 12 | # copy R4S in any case, and then patch if R2S 13 | cp $ROOTDIR/openwrt-23.05/seed/ao-R4S-$2.seed .config 14 | 15 | # $1 is model 16 | # if model == R2S, then patch .config 17 | if [[ "$1" == "R2S" ]]; then 18 | echo "NanoPi R2S model, post patching .config" 19 | sed -i 's/nanopi-r4s/nanopi-r2s/' .config 20 | sed -i 's/cortex-a72.cortex-a53/cortex-a53/' .config 21 | fi 22 | 23 | if [[ "$1" == "R2C" ]]; then 24 | echo "NanoPi R2C model, post patching .config" 25 | sed -i 's/nanopi-r4s/nanopi-r2c/' .config 26 | sed -i 's/cortex-a72.cortex-a53/cortex-a53/' .config 27 | fi 28 | 29 | make defconfig 30 | -------------------------------------------------------------------------------- /openwrt-24.10/steps/06-create_config_from_seed.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | cd "$ROOTDIR/build" 10 | 11 | cd openwrt 12 | # copy R4S in any case, and then patch if R2S 13 | cp $ROOTDIR/openwrt-24.10/seed/ao-R4S-$2.seed .config 14 | 15 | # $1 is model 16 | # if model == R2S, then patch .config 17 | if [[ "$1" == "R2S" ]]; then 18 | echo "NanoPi R2S model, post patching .config" 19 | sed -i 's/nanopi-r4s/nanopi-r2s/' .config 20 | sed -i 's/cortex-a72.cortex-a53/cortex-a53/' .config 21 | fi 22 | 23 | if [[ "$1" == "R2C" ]]; then 24 | echo "NanoPi R2C model, post patching .config" 25 | sed -i 's/nanopi-r4s/nanopi-r2c/' .config 26 | sed -i 's/cortex-a72.cortex-a53/cortex-a53/' .config 27 | fi 28 | 29 | make defconfig 30 | -------------------------------------------------------------------------------- /openwrt-23.05/steps/organize_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | 10 | NANOPI_MODEL=$1 11 | NANOPI_MODEL_LOW=$(echo ${NANOPI_MODEL} | tr '[:upper:]' '[:lower:]') 12 | VARIANT=$2 13 | OPENWRT_BRANCH=$3 14 | RELTAG=$4 15 | 16 | mkdir -p ./artifact/ 17 | mv build/openwrt/bin/targets/rockchip/armv8/*sysupgrade.img* ./artifact/ 18 | cd ./artifact/ 19 | ls -Ahl 20 | mv openwrt-rockchip-armv8-friendlyarm_nanopi-$NANOPI_MODEL_LOW-ext4-sysupgrade.img.gz OpenWrt-AO-NanoPi$NANOPI_MODEL-$VARIANT-$OPENWRT_BRANCH-$RELTAG-ext4.img.gz 21 | mv openwrt-rockchip-armv8-friendlyarm_nanopi-$NANOPI_MODEL_LOW-squashfs-sysupgrade.img.gz OpenWrt-AO-NanoPi$NANOPI_MODEL-$VARIANT-$OPENWRT_BRANCH-$RELTAG-squashfs.img.gz 22 | gzip -d *.gz && exit 0 23 | gzip --best *.img 24 | ls -Ahl 25 | 26 | -------------------------------------------------------------------------------- /openwrt-24.10/steps/organize_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | 10 | NANOPI_MODEL=$1 11 | NANOPI_MODEL_LOW=$(echo ${NANOPI_MODEL} | tr '[:upper:]' '[:lower:]') 12 | VARIANT=$2 13 | OPENWRT_BRANCH=$3 14 | RELTAG=$4 15 | 16 | mkdir -p ./artifact/ 17 | mv build/openwrt/bin/targets/rockchip/armv8/*sysupgrade.img* ./artifact/ 18 | cd ./artifact/ 19 | ls -Ahl 20 | mv openwrt-rockchip-armv8-friendlyarm_nanopi-$NANOPI_MODEL_LOW-ext4-sysupgrade.img.gz OpenWrt-AO-NanoPi$NANOPI_MODEL-$VARIANT-$OPENWRT_BRANCH-$RELTAG-ext4.img.gz 21 | mv openwrt-rockchip-armv8-friendlyarm_nanopi-$NANOPI_MODEL_LOW-squashfs-sysupgrade.img.gz OpenWrt-AO-NanoPi$NANOPI_MODEL-$VARIANT-$OPENWRT_BRANCH-$RELTAG-squashfs.img.gz 22 | gzip -d *.gz && exit 0 23 | gzip --best *.img 24 | ls -Ahl 25 | 26 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/307-configs-Add-CONFIG_SYS_MMC_ENV_DEV-1-for-nanopi-r4s.patch: -------------------------------------------------------------------------------- 1 | From 92c1bcf0983464f7bcc9e38bc2a6edccc239bd93 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 12 Jan 2022 11:00:21 +0800 4 | Subject: [PATCH 307/308] configs: Add CONFIG_SYS_MMC_ENV_DEV=1 for nanopi-r4s 5 | 6 | Signed-off-by: hmz007 7 | --- 8 | configs/nanopi-r4s-rk3399_defconfig | 1 + 9 | 1 file changed, 1 insertion(+) 10 | 11 | --- a/configs/nanopi-r4s-rk3399_defconfig 12 | +++ b/configs/nanopi-r4s-rk3399_defconfig 13 | @@ -27,6 +27,7 @@ CONFIG_SPL_OF_CONTROL=y 14 | CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" 15 | CONFIG_ENV_IS_IN_MMC=y 16 | CONFIG_SYS_RELOC_GD_ENV_ADDR=y 17 | +CONFIG_SYS_MMC_ENV_DEV=1 18 | CONFIG_ROCKCHIP_GPIO=y 19 | CONFIG_SYS_I2C_ROCKCHIP=y 20 | CONFIG_MMC_DW=y 21 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/307-configs-Add-CONFIG_SYS_MMC_ENV_DEV-1-for-nanopi-r4s.patch: -------------------------------------------------------------------------------- 1 | From 92c1bcf0983464f7bcc9e38bc2a6edccc239bd93 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 12 Jan 2022 11:00:21 +0800 4 | Subject: [PATCH 307/308] configs: Add CONFIG_SYS_MMC_ENV_DEV=1 for nanopi-r4s 5 | 6 | Signed-off-by: hmz007 7 | --- 8 | configs/nanopi-r4s-rk3399_defconfig | 1 + 9 | 1 file changed, 1 insertion(+) 10 | 11 | --- a/configs/nanopi-r4s-rk3399_defconfig 12 | +++ b/configs/nanopi-r4s-rk3399_defconfig 13 | @@ -27,6 +27,7 @@ CONFIG_SPL_OF_CONTROL=y 14 | CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" 15 | CONFIG_ENV_IS_IN_MMC=y 16 | CONFIG_SYS_RELOC_GD_ENV_ADDR=y 17 | +CONFIG_SYS_MMC_ENV_DEV=1 18 | CONFIG_ROCKCHIP_GPIO=y 19 | CONFIG_SYS_I2C_ROCKCHIP=y 20 | CONFIG_MMC_DW=y 21 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/target/linux/rockchip/patches-6.6/103-arm64-dts-rockchip-lower-mmc-speed.patch: -------------------------------------------------------------------------------- 1 | From: David Bauer 2 | Subject: arm64: dts: rockchip: disable UHS modes for NanoPi R4S 3 | 4 | The NanoPi R4S leaves the SD card in 1.8V signalling when rebooting 5 | while U-Boot requires the card to be in 3.3V mode. 6 | 7 | Remove UHS support from the SD controller so the card remains in 3.3V 8 | mode. This reduces transfer speeds but ensures a reboot whether from 9 | userspace or following a kernel panic is always working. 10 | 11 | Signed-off-by: David Bauer 12 | 13 | --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts 14 | +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts 15 | @@ -119,6 +119,11 @@ 16 | status = "disabled"; 17 | }; 18 | 19 | +&sdmmc { 20 | + /delete-property/ sd-uhs-sdr104; 21 | + cap-sd-highspeed; 22 | +}; 23 | + 24 | &u2phy0_host { 25 | phy-supply = <&vdd_5v>; 26 | }; -------------------------------------------------------------------------------- /local-scripts/build_r2s.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #!/bin/bash 4 | ROOTDIR=$(pwd) 5 | echo $ROOTDIR 6 | if [ ! -e "$ROOTDIR/build" ]; then 7 | echo "Please run from root / no build dir" 8 | exit 1 9 | fi 10 | 11 | BUILDDIR="$ROOTDIR/build" 12 | cd $BUILDDIR 13 | 14 | # update instead of cloning 15 | cd $BUILDDIR/openwrt-fresh-2102 16 | git pull 17 | 18 | cd $ROOTDIR 19 | echo -n "Step 02...\n------------------------------" 20 | ./steps/21.02/02_prepare_openwrt_folder.sh 21 | echo -n "Step 03...\n------------------------------" 22 | ./steps/21.02/R2S/03_patch_openwrt.sh 23 | echo -n "Step 04...\n------------------------------" 24 | ./steps/04-prepare_package.sh 25 | echo -n "Step 05...\n------------------------------" 26 | ./steps/05-create_luci_acl.sh 27 | echo -n "Step 06...\n------------------------------" 28 | ./steps/06-create_config_from_toolchain_seed.sh 29 | 30 | cd $BUILDDIR/openwrt 31 | make download -j 12 32 | make toolchain/install -j 12 33 | make -j 12 34 | 35 | 36 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/303-rockchip-rk3328-add-mmc-aliases-for-nanopi-r2s.patch: -------------------------------------------------------------------------------- 1 | From b8d642fadf95508f3a728a995b6892467deb1097 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Tue, 4 Jan 2022 14:54:20 +0800 4 | Subject: [PATCH 303/308] rockchip: rk3328: add mmc aliases for nanopi-r2s 5 | 6 | Signed-off-by: hmz007 7 | --- 8 | arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi | 5 +++++ 9 | 1 file changed, 5 insertions(+) 10 | 11 | diff --git a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi 12 | index 9e2ced1541..df692ec30a 100644 13 | --- a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi 14 | +++ b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi 15 | @@ -7,6 +7,11 @@ 16 | #include "rk3328-u-boot.dtsi" 17 | #include "rk3328-sdram-ddr4-666.dtsi" 18 | / { 19 | + aliases { 20 | + mmc0 = &sdmmc; 21 | + mmc1 = &emmc; 22 | + }; 23 | + 24 | chosen { 25 | u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc; 26 | }; 27 | -- 28 | 2.34.1 29 | 30 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/303-rockchip-rk3328-add-mmc-aliases-for-nanopi-r2s.patch: -------------------------------------------------------------------------------- 1 | From b8d642fadf95508f3a728a995b6892467deb1097 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Tue, 4 Jan 2022 14:54:20 +0800 4 | Subject: [PATCH 303/308] rockchip: rk3328: add mmc aliases for nanopi-r2s 5 | 6 | Signed-off-by: hmz007 7 | --- 8 | arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi | 5 +++++ 9 | 1 file changed, 5 insertions(+) 10 | 11 | diff --git a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi 12 | index 9e2ced1541..df692ec30a 100644 13 | --- a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi 14 | +++ b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi 15 | @@ -7,6 +7,11 @@ 16 | #include "rk3328-u-boot.dtsi" 17 | #include "rk3328-sdram-ddr4-666.dtsi" 18 | / { 19 | + aliases { 20 | + mmc0 = &sdmmc; 21 | + mmc1 = &emmc; 22 | + }; 23 | + 24 | chosen { 25 | u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc; 26 | }; 27 | -- 28 | 2.34.1 29 | 30 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/306-arm64-rk3399-r4s-disable-nodes-for-vopb-vopl.patch: -------------------------------------------------------------------------------- 1 | From 8a8b3ef12c68ad662223aefb4a46b1ca43e23482 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 12 Jan 2022 11:00:08 +0800 4 | Subject: [PATCH 306/308] arm64: rk3399: r4s: disable nodes for vopb/vopl 5 | 6 | Disable vopb and vopl to fix: 7 | rk3399_vop vop@ff8f0000: failed to get ahb reset (ret=-524) 8 | rk3399_vop vop@ff8f0000: failed to get ahb reset (ret=-524) 9 | 10 | Signed-off-by: hmz007 11 | --- 12 | arch/arm/dts/rk3399-nanopi-r4s.dts | 16 ++++++++++++++++ 13 | 1 file changed, 16 insertions(+) 14 | 15 | --- a/arch/arm/dts/rk3399-nanopi-r4s.dts 16 | +++ b/arch/arm/dts/rk3399-nanopi-r4s.dts 17 | @@ -131,3 +131,19 @@ 18 | &vcc3v3_sys { 19 | vin-supply = <&vcc5v0_sys>; 20 | }; 21 | + 22 | +&vopb { 23 | + status = "disabled"; 24 | +}; 25 | + 26 | +&vopb_mmu { 27 | + status = "disabled"; 28 | +}; 29 | + 30 | +&vopl { 31 | + status = "disabled"; 32 | +}; 33 | + 34 | +&vopl_mmu { 35 | + status = "disabled"; 36 | +}; 37 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/306-arm64-rk3399-r4s-disable-nodes-for-vopb-vopl.patch: -------------------------------------------------------------------------------- 1 | From 8a8b3ef12c68ad662223aefb4a46b1ca43e23482 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 12 Jan 2022 11:00:08 +0800 4 | Subject: [PATCH 306/308] arm64: rk3399: r4s: disable nodes for vopb/vopl 5 | 6 | Disable vopb and vopl to fix: 7 | rk3399_vop vop@ff8f0000: failed to get ahb reset (ret=-524) 8 | rk3399_vop vop@ff8f0000: failed to get ahb reset (ret=-524) 9 | 10 | Signed-off-by: hmz007 11 | --- 12 | arch/arm/dts/rk3399-nanopi-r4s.dts | 16 ++++++++++++++++ 13 | 1 file changed, 16 insertions(+) 14 | 15 | --- a/arch/arm/dts/rk3399-nanopi-r4s.dts 16 | +++ b/arch/arm/dts/rk3399-nanopi-r4s.dts 17 | @@ -131,3 +131,19 @@ 18 | &vcc3v3_sys { 19 | vin-supply = <&vcc5v0_sys>; 20 | }; 21 | + 22 | +&vopb { 23 | + status = "disabled"; 24 | +}; 25 | + 26 | +&vopb_mmu { 27 | + status = "disabled"; 28 | +}; 29 | + 30 | +&vopl { 31 | + status = "disabled"; 32 | +}; 33 | + 34 | +&vopl_mmu { 35 | + status = "disabled"; 36 | +}; 37 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/301-rockchip-dw_mmc-support-to-disable-HS-mode-for-SPL.patch: -------------------------------------------------------------------------------- 1 | From baecb10c4b34be29ca0aac97158d4cdbc84d76a0 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 1 Dec 2021 16:45:27 +0800 4 | Subject: [PATCH 301/308] rockchip: dw_mmc: support to disable HS mode for SPL 5 | 6 | For rk3399, the highspeed mode doesn't work because of 7 | the signal voltage remains at 1.8V after reboot. 8 | 9 | Signed-off-by: hmz007 10 | --- 11 | drivers/mmc/rockchip_dw_mmc.c | 4 ++++ 12 | 1 file changed, 4 insertions(+) 13 | 14 | --- a/drivers/mmc/rockchip_dw_mmc.c 15 | +++ b/drivers/mmc/rockchip_dw_mmc.c 16 | @@ -147,6 +147,10 @@ static int rockchip_dwmmc_probe(struct u 17 | } 18 | #endif 19 | dwmci_setup_cfg(&plat->cfg, host, priv->minmax[1], priv->minmax[0]); 20 | +#ifdef CONFIG_SPL_BUILD 21 | + if (dev_read_bool(dev, "u-boot,spl-broken-hs")) 22 | + plat->cfg.host_caps &= ~MMC_MODE_HS; 23 | +#endif 24 | host->mmc = &plat->mmc; 25 | host->mmc->priv = &priv->host; 26 | host->mmc->dev = dev; 27 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/301-rockchip-dw_mmc-support-to-disable-HS-mode-for-SPL.patch: -------------------------------------------------------------------------------- 1 | From baecb10c4b34be29ca0aac97158d4cdbc84d76a0 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 1 Dec 2021 16:45:27 +0800 4 | Subject: [PATCH 301/308] rockchip: dw_mmc: support to disable HS mode for SPL 5 | 6 | For rk3399, the highspeed mode doesn't work because of 7 | the signal voltage remains at 1.8V after reboot. 8 | 9 | Signed-off-by: hmz007 10 | --- 11 | drivers/mmc/rockchip_dw_mmc.c | 4 ++++ 12 | 1 file changed, 4 insertions(+) 13 | 14 | --- a/drivers/mmc/rockchip_dw_mmc.c 15 | +++ b/drivers/mmc/rockchip_dw_mmc.c 16 | @@ -147,6 +147,10 @@ static int rockchip_dwmmc_probe(struct u 17 | } 18 | #endif 19 | dwmci_setup_cfg(&plat->cfg, host, priv->minmax[1], priv->minmax[0]); 20 | +#ifdef CONFIG_SPL_BUILD 21 | + if (dev_read_bool(dev, "u-boot,spl-broken-hs")) 22 | + plat->cfg.host_caps &= ~MMC_MODE_HS; 23 | +#endif 24 | host->mmc = &plat->mmc; 25 | host->mmc->priv = &priv->host; 26 | host->mmc->dev = dev; 27 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/target/linux/rockchip/patches-5.15/005-rockchip-rk3328-add-compatible-to-NanoPi-R2S-etherne.patch: -------------------------------------------------------------------------------- 1 | From bc6c96d850419e71dbc9b0094ccc9b668ba9be43 Mon Sep 17 00:00:00 2001 2 | From: David Bauer 3 | Date: Mon, 28 Sep 2020 22:54:52 +0200 4 | Subject: [PATCH] rockchip: rk3328: add compatible to NanoPi R2S ethernet PHY 5 | 6 | This adds the compatible property to the NanoPi R2S ethernet PHY node. 7 | Otherwise, the PHY might not be probed, as the PHY ID reads all 0xff 8 | when it is still in reset. 9 | 10 | Signed-off-by: David Bauer 11 | --- 12 | arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 2 ++ 13 | 1 file changed, 2 insertions(+) 14 | 15 | --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts 16 | +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts 17 | @@ -156,6 +156,8 @@ 18 | #size-cells = <0>; 19 | 20 | rtl8211e: ethernet-phy@1 { 21 | + compatible = "ethernet-phy-id001c.c915", 22 | + "ethernet-phy-ieee802.3-c22"; 23 | reg = <1>; 24 | pinctrl-0 = <ð_phy_reset_pin>; 25 | pinctrl-names = "default"; 26 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/target/linux/rockchip/patches-6.6/101-rockchip-rk3328-add-compatible-to-NanoPi-R2S-etherne.patch: -------------------------------------------------------------------------------- 1 | From bc6c96d850419e71dbc9b0094ccc9b668ba9be43 Mon Sep 17 00:00:00 2001 2 | From: David Bauer 3 | Date: Mon, 28 Sep 2020 22:54:52 +0200 4 | Subject: [PATCH] rockchip: rk3328: add compatible to NanoPi R2S ethernet PHY 5 | 6 | This adds the compatible property to the NanoPi R2S ethernet PHY node. 7 | Otherwise, the PHY might not be probed, as the PHY ID reads all 0xff 8 | when it is still in reset. 9 | 10 | Signed-off-by: David Bauer 11 | --- 12 | arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 2 ++ 13 | 1 file changed, 2 insertions(+) 14 | 15 | --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts 16 | +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts 17 | @@ -165,6 +165,8 @@ 18 | #size-cells = <0>; 19 | 20 | rtl8211e: ethernet-phy@1 { 21 | + compatible = "ethernet-phy-id001c.c915", 22 | + "ethernet-phy-ieee802.3-c22"; 23 | reg = <1>; 24 | pinctrl-0 = <ð_phy_reset_pin>; 25 | pinctrl-names = "default"; 26 | -------------------------------------------------------------------------------- /openwrt-24.10/release-info.md: -------------------------------------------------------------------------------- 1 | ## OpenWrt 24.10 2 | 3 | ### General Info 4 | - Based of openwrt 24.10.5 5 | 6 | ### Notes 7 | - For R2C/R2S, theres almost no difference with official builds, except the preinstalled package set 8 | 9 | ### Configuration 10 | - OpenWRT 24.10 Vanilla / Kernel 6.6 11 | - Cherry pick some ImmortalWRT patches for Rockchip target 12 | - NanoPi R4S : r8168 driver for R4S (realtek) instead of kernel r8169 + r8169 firmwares package 13 | - Older uBoot with patches to boot on R4S 1Gb 14 | 15 | ### Applications 16 | - A useful set of applications from official OpenWrt package feed 17 | - Mini build without UI 18 | - Full build with LuCI, docker and extra packages 19 | - firewall4 based (nftables) + iptables compatibility packages for now, might change later. 20 | - pbr branch 1.1.8 from https://github.com/stangri/pbr 21 | 22 | ### Changelog 23 | - [2025-03-21] Initial OpenWrt 24.10.0 24 | - [2025-04-14] OpenWrt 24.10.1 25 | - [2025-06-25] OpenWrt 24.10.2 26 | - [2025-10-10] OpenWrt 24.10.3 27 | - [2025-10-23] OpenWrt 24.10.4 28 | - [2025-11-02] Update adguardhome 29 | - [2025-12-19] OpenWrt 24.10.5 + update adguardhome 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Anael Orlinski 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /openwrt-23.05/release-info.md: -------------------------------------------------------------------------------- 1 | ## OpenWrt 23.05 2 | 3 | ### General Info 4 | - Based of openwrt 23.05.4 5 | 6 | ### Notes 7 | - For R2C/R2S, theres almost no difference with official builds, except the preinstalled package set 8 | 9 | ### Configuration 10 | - OpenWRT 23.05 Vanilla / Kernel 5.15 11 | - ImmortalWRT patches for Rockchip target NanoPi R2S (rk3328) / NanoPi R4S support (rk3399) 12 | - NanoPi R4S : r8168 driver for R4S (realtek) instead of kernel r8169 + r8169 firmwares package 13 | 14 | ### Applications 15 | - A useful set of applications from official OpenWrt package feed 16 | - Mini build without UI 17 | - Full build with LuCI, docker and extra packages 18 | - firewall4 based (nftables) + iptables compatibility packages for now, might change later. 19 | - pbr latest version from https://github.com/stangri/source.openwrt.melmac.net 20 | 21 | ### Changelog 22 | - [2024-09-25] OpenWrt 23.05.5 23 | - [2024-09-07] Fix missing pbr 24 | - [2024-09-06] Update adguardhome 25 | - [2024-07-22] OpenWrt 23.05.4 26 | - [2024-03-27] OpenWrt 23.05.3 27 | - [2023-11-15] OpenWrt 23.05.2 28 | - [2023-10-13] OpenWrt 23.05.0 29 | - [2023-08-22] OpenWrt 23.05.0-rc3 30 | - [2023-06-28] Initial OpenWrt 23.05.0-rc2 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## OpenWrt Builds for NanoPi R2S & NanoPi R4S 2 | Automated builds of OpenWrt for FriendlyARM NanoPi R2S & R4S boards 3 | 4 | ⚠️ Since OpenWrt 23.05, those devices are supported by vanilla OpenWrt. You might want to use regular builds instead of this one, especially if you plan to add extra kernel modules for usb wifi support. 5 | 6 | [![NanoPi Build](https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/actions/workflows/NanoPi-Build.yml/badge.svg)](https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/actions/workflows/NanoPi-Build.yml) 7 | 8 | If you like this project you can gift me a coffee ! 9 | [![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/donate/?business=8XQTGXAHEAKPY&no_recurring=0¤cy_code=EUR) 10 | 11 | ## OpenWrt 24.10.5 (current) 12 | 13 | [Download 24.10 Releases](https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/releases?q=OpenWrtAO-24.10&expanded=true) [Changelog](https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/blob/main/openwrt-24.10/release-info.md) 14 | Supported Models : R2S / R4S(1Gb & 4Gb) 15 | 16 | ⚠ Warning: No support / Use at your own risk ⚠ 17 | 18 | ## License 19 | [MIT](https://github.com/anaelorlinski/OpenWRT-Rockchip/blob/master/LICENSE) 20 | -------------------------------------------------------------------------------- /.github/workflows/cleanup.yml: -------------------------------------------------------------------------------- 1 | name: Cleaning 2 | 3 | on: 4 | #schedule: 5 | # - cron: 1 8 * * 1 6 | # watch: 7 | # types: started 8 | workflow_dispatch: 9 | 10 | jobs: 11 | #Cleanup-Old-Releases: 12 | # runs-on: ubuntu-20.04 13 | # if: github.event.repository.owner.id == github.event.sender.id 14 | # steps: 15 | # - name: Delete Older Releases 16 | # uses: dev-drprasad/delete-older-releases@master 17 | # with: 18 | # keep_latest: 4 19 | # delete_tags: true 20 | # env: 21 | # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 22 | 23 | Cleanup-Old-Artifacts: 24 | runs-on: ubuntu-20.04 25 | if: github.event.repository.owner.id == github.event.sender.id 26 | steps: 27 | - name: Cleanup Old Action Artifacts 28 | uses: kolpav/purge-artifacts-action@master 29 | with: 30 | token: ${{ github.token }} 31 | expire-in: 3d 32 | 33 | Cleanup-Workflow-Logs: 34 | runs-on: ubuntu-20.04 35 | if: github.event.repository.owner.id == github.event.sender.id 36 | steps: 37 | - name: Cleanup Workflow Logs 38 | uses: Mattraks/delete-workflow-runs@main 39 | with: 40 | token: ${{ github.token }} 41 | repository: ${{ github.repository }} 42 | retain_days: 3 -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/304-mmc-dw_mmc-Fixes-timeout-issue-for-FIFO-mode.patch: -------------------------------------------------------------------------------- 1 | From 6a662654973ff75baa44288829142eed4ed5a411 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Tue, 11 Jan 2022 16:22:04 +0800 4 | Subject: [PATCH 304/308] mmc: dw_mmc: Fixes timeout issue for FIFO mode 5 | 6 | Clearing the DTO interrupt should be unnecessary, and it would 7 | potentially result in never receiving this interrupt again. 8 | 9 | Do power-on or reset from uboot for a while can reproduce the issue: 10 | dwmci_data_transfer: Timeout waiting for data! 11 | mmc_load_image_raw_sector: mmc block read error 12 | 13 | Tested on NanoPi R4S with SanDisk Extreme PRO 32GB. 14 | 15 | Fixes: 8cb9d3ed3a ("mmc: dw_mmc: Fixes data read when receiving DTO interrupt in FIFO mode") 16 | Signed-off-by: hmz007 17 | --- 18 | drivers/mmc/dw_mmc.c | 2 +- 19 | 1 file changed, 1 insertion(+), 1 deletion(-) 20 | 21 | --- a/drivers/mmc/dw_mmc.c 22 | +++ b/drivers/mmc/dw_mmc.c 23 | @@ -168,7 +168,7 @@ static int dwmci_data_transfer(struct dw 24 | if (data->flags == MMC_DATA_READ && 25 | (mask & (DWMCI_INTMSK_RXDR | DWMCI_INTMSK_DTO))) { 26 | dwmci_writel(host, DWMCI_RINTSTS, 27 | - DWMCI_INTMSK_RXDR | DWMCI_INTMSK_DTO); 28 | + DWMCI_INTMSK_RXDR); 29 | while (size) { 30 | ret = dwmci_fifo_ready(host, 31 | DWMCI_FIFO_EMPTY, 32 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/304-mmc-dw_mmc-Fixes-timeout-issue-for-FIFO-mode.patch: -------------------------------------------------------------------------------- 1 | From 6a662654973ff75baa44288829142eed4ed5a411 Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Tue, 11 Jan 2022 16:22:04 +0800 4 | Subject: [PATCH 304/308] mmc: dw_mmc: Fixes timeout issue for FIFO mode 5 | 6 | Clearing the DTO interrupt should be unnecessary, and it would 7 | potentially result in never receiving this interrupt again. 8 | 9 | Do power-on or reset from uboot for a while can reproduce the issue: 10 | dwmci_data_transfer: Timeout waiting for data! 11 | mmc_load_image_raw_sector: mmc block read error 12 | 13 | Tested on NanoPi R4S with SanDisk Extreme PRO 32GB. 14 | 15 | Fixes: 8cb9d3ed3a ("mmc: dw_mmc: Fixes data read when receiving DTO interrupt in FIFO mode") 16 | Signed-off-by: hmz007 17 | --- 18 | drivers/mmc/dw_mmc.c | 2 +- 19 | 1 file changed, 1 insertion(+), 1 deletion(-) 20 | 21 | --- a/drivers/mmc/dw_mmc.c 22 | +++ b/drivers/mmc/dw_mmc.c 23 | @@ -168,7 +168,7 @@ static int dwmci_data_transfer(struct dw 24 | if (data->flags == MMC_DATA_READ && 25 | (mask & (DWMCI_INTMSK_RXDR | DWMCI_INTMSK_DTO))) { 26 | dwmci_writel(host, DWMCI_RINTSTS, 27 | - DWMCI_INTMSK_RXDR | DWMCI_INTMSK_DTO); 28 | + DWMCI_INTMSK_RXDR); 29 | while (size) { 30 | ret = dwmci_fifo_ready(host, 31 | DWMCI_FIFO_EMPTY, 32 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/target/linux/rockchip/patches-6.6/501-mmc-core-set-initial-signal-voltage-on-power-off.patch: -------------------------------------------------------------------------------- 1 | From 0d329112c709d6cfedf0fffb19f0cc6b19043f6b Mon Sep 17 00:00:00 2001 2 | From: Jonas Karlman 3 | Date: Wed, 20 Feb 2019 07:38:34 +0000 4 | Subject: [PATCH] mmc: core: set initial signal voltage on power off 5 | 6 | Some boards have SD card connectors where the power rail cannot be switched 7 | off by the driver. If the card has not been power cycled, it may still be 8 | using 1.8V signaling after a warm re-boot. Bootroms expecting 3.3V signaling 9 | will fail to boot from a UHS card that continue to use 1.8V signaling. 10 | 11 | Set initial signal voltage in mmc_power_off() to allow re-boot to function. 12 | 13 | This fixes re-boot with UHS cards on Asus Tinker Board (Rockchip RK3288), 14 | same issue have been seen on some Rockchip RK3399 boards. 15 | 16 | I am sending this as a RFC because I have no insights into SD/MMC subsystem, 17 | this change fix a re-boot issue on my boards and does not break emmc/sdio. 18 | Is this an acceptable workaround? Any advice is appreciated. 19 | 20 | Signed-off-by: Jonas Karlman 21 | --- 22 | drivers/mmc/core/core.c | 2 ++ 23 | 1 file changed, 2 insertions(+) 24 | 25 | --- a/drivers/mmc/core/core.c 26 | +++ b/drivers/mmc/core/core.c 27 | @@ -1370,6 +1370,8 @@ void mmc_power_off(struct mmc_host *host 28 | 29 | mmc_pwrseq_power_off(host); 30 | 31 | + mmc_set_initial_signal_voltage(host); 32 | + 33 | host->ios.clock = 0; 34 | host->ios.vdd = 0; 35 | 36 | -------------------------------------------------------------------------------- /openwrt-23.05/steps/07-all_kmods.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | cd "$ROOTDIR/build" 10 | 11 | cd openwrt 12 | 13 | # patch config to build all kernel modules 14 | sed -i -e '/^# CONFIG_PACKAGE_kmod-/d' .config 15 | echo CONFIG_ALL_KMODS=y >> .config 16 | make defconfig 17 | 18 | rm -rf bin/ 19 | rm -rf files/ipks/ 20 | let make_process=$(nproc)+1 21 | 22 | # compile toolchain if not built yet 23 | make toolchain/install -j${make_process} || { make toolchain/install -j 1 V=s ; exit 1 ; } 24 | 25 | # compile kernel kmods and build packages 26 | make target/compile -j ${make_process} || { make target/compile -j 1 V=s ; exit 1 ; } 27 | make package/linux/compile -j ${make_process} || { make package/linux/compile -j 1 V=s ; exit 1 ; } 28 | 29 | # make packages that generate kmods 30 | make package/kernel/mt76/compile -j ${make_process} || { make package/linux/compile -j 1 V=s ; exit 1 ; } 31 | 32 | # build signing tools and generate key 33 | make package/usign/host/compile V=s || exit 1 34 | make package/ucert/host/compile V=s || exit 1 35 | make package/base-files/configure V=s || exit 1 36 | 37 | # sign packages 38 | make package/index V=s || exit 1 39 | mkdir -p files/ipks 40 | cd files/ipks 41 | find ../../bin/targets/rockchip/armv8/packages/ -type f -exec ln {} . \; 42 | cd .. 43 | mkdir -p etc/uci-defaults 44 | cat << "EOF" > etc/uci-defaults/99-local-ipks 45 | echo "src/gz local file:///ipks/" >> /etc/opkg/distfeeds.conf 46 | EOF 47 | 48 | -------------------------------------------------------------------------------- /openwrt-24.10/steps/07-all_kmods.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | cd "$ROOTDIR/build" 10 | 11 | cd openwrt 12 | 13 | # patch config to build all kernel modules 14 | sed -i -e '/^# CONFIG_PACKAGE_kmod-/d' .config 15 | echo CONFIG_ALL_KMODS=y >> .config 16 | make defconfig 17 | 18 | rm -rf bin/ 19 | rm -rf files/ipks/ 20 | let make_process=$(nproc)+1 21 | 22 | # compile toolchain if not built yet 23 | make toolchain/install -j${make_process} || { make toolchain/install -j 1 V=s ; exit 1 ; } 24 | 25 | # compile kernel kmods and build packages 26 | make target/compile -j ${make_process} || { make target/compile -j 1 V=s ; exit 1 ; } 27 | make package/linux/compile -j ${make_process} || { make package/linux/compile -j 1 V=s ; exit 1 ; } 28 | 29 | # make packages that generate kmods 30 | make package/kernel/mt76/compile -j ${make_process} || { make package/linux/compile -j 1 V=s ; exit 1 ; } 31 | 32 | # build signing tools and generate key 33 | make package/usign/host/compile V=s || exit 1 34 | make package/ucert/host/compile V=s || exit 1 35 | make package/base-files/configure V=s || exit 1 36 | 37 | # sign packages 38 | make package/index V=s || exit 1 39 | mkdir -p files/ipks 40 | cd files/ipks 41 | find ../../bin/targets/rockchip/armv8/packages/ -type f -exec ln {} . \; 42 | cd .. 43 | mkdir -p etc/uci-defaults 44 | cat << "EOF" > etc/uci-defaults/99-local-ipks 45 | echo "src/gz local file:///ipks/" >> /etc/opkg/distfeeds.conf 46 | EOF 47 | 48 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/308-rockchip-rk3328-Implement-arch_addr_aligned-hook.patch: -------------------------------------------------------------------------------- 1 | From 886a84ea1a0e501fd168ad779ca54aecc70f8f4d Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 12 Jan 2022 11:21:37 +0800 4 | Subject: [PATCH 308/308] rockchip: rk3328: Implement arch_addr_aligned() hook 5 | 6 | Signed-off-by: hmz007 7 | --- 8 | arch/arm/dts/rk3328-u-boot.dtsi | 6 ------ 9 | arch/arm/mach-rockchip/rk3328/rk3328.c | 13 +++++++++++++ 10 | 2 files changed, 13 insertions(+), 6 deletions(-) 11 | 12 | --- a/arch/arm/dts/rk3328-u-boot.dtsi 13 | +++ b/arch/arm/dts/rk3328-u-boot.dtsi 14 | @@ -52,16 +52,10 @@ 15 | 16 | &emmc { 17 | u-boot,dm-pre-reloc; 18 | - 19 | - /* mmc to sram can't do dma, prevent aborts transfering TF-A parts */ 20 | - u-boot,spl-fifo-mode; 21 | }; 22 | 23 | &sdmmc { 24 | u-boot,dm-pre-reloc; 25 | - 26 | - /* mmc to sram can't do dma, prevent aborts transfering TF-A parts */ 27 | - u-boot,spl-fifo-mode; 28 | }; 29 | 30 | &usb20_otg { 31 | --- a/arch/arm/mach-rockchip/rk3328/rk3328.c 32 | +++ b/arch/arm/mach-rockchip/rk3328/rk3328.c 33 | @@ -58,6 +58,19 @@ int arch_cpu_init(void) 34 | return 0; 35 | } 36 | 37 | +int arch_addr_aligned(void *ubuf) 38 | +{ 39 | +#define DRAM_END 0xff000000 40 | + 41 | + if ((uintptr_t)ubuf < DRAM_END) { 42 | + /* Aligned for DRAM area */ 43 | + return 1; 44 | + } 45 | + 46 | + debug("Unsupported buffer for DMA transfer\n"); 47 | + return 0; 48 | +} 49 | + 50 | void board_debug_uart_init(void) 51 | { 52 | struct rk3328_grf_regs * const grf = (void *)GRF_BASE; 53 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/308-rockchip-rk3328-Implement-arch_addr_aligned-hook.patch: -------------------------------------------------------------------------------- 1 | From 886a84ea1a0e501fd168ad779ca54aecc70f8f4d Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 12 Jan 2022 11:21:37 +0800 4 | Subject: [PATCH 308/308] rockchip: rk3328: Implement arch_addr_aligned() hook 5 | 6 | Signed-off-by: hmz007 7 | --- 8 | arch/arm/dts/rk3328-u-boot.dtsi | 6 ------ 9 | arch/arm/mach-rockchip/rk3328/rk3328.c | 13 +++++++++++++ 10 | 2 files changed, 13 insertions(+), 6 deletions(-) 11 | 12 | --- a/arch/arm/dts/rk3328-u-boot.dtsi 13 | +++ b/arch/arm/dts/rk3328-u-boot.dtsi 14 | @@ -52,16 +52,10 @@ 15 | 16 | &emmc { 17 | u-boot,dm-pre-reloc; 18 | - 19 | - /* mmc to sram can't do dma, prevent aborts transfering TF-A parts */ 20 | - u-boot,spl-fifo-mode; 21 | }; 22 | 23 | &sdmmc { 24 | u-boot,dm-pre-reloc; 25 | - 26 | - /* mmc to sram can't do dma, prevent aborts transfering TF-A parts */ 27 | - u-boot,spl-fifo-mode; 28 | }; 29 | 30 | &usb20_otg { 31 | --- a/arch/arm/mach-rockchip/rk3328/rk3328.c 32 | +++ b/arch/arm/mach-rockchip/rk3328/rk3328.c 33 | @@ -58,6 +58,19 @@ int arch_cpu_init(void) 34 | return 0; 35 | } 36 | 37 | +int arch_addr_aligned(void *ubuf) 38 | +{ 39 | +#define DRAM_END 0xff000000 40 | + 41 | + if ((uintptr_t)ubuf < DRAM_END) { 42 | + /* Aligned for DRAM area */ 43 | + return 1; 44 | + } 45 | + 46 | + debug("Unsupported buffer for DMA transfer\n"); 47 | + return 0; 48 | +} 49 | + 50 | void board_debug_uart_init(void) 51 | { 52 | struct rk3328_grf_regs * const grf = (void *)GRF_BASE; 53 | -------------------------------------------------------------------------------- /.github/actions/setup-devenv/action.yml: -------------------------------------------------------------------------------- 1 | name: "Setup Devenv" 2 | description: "Prepares image with packages and cleanup" 3 | runs: 4 | using: "composite" 5 | steps: 6 | - name: Show CPU Model and Free Space 7 | shell: bash 8 | run: | 9 | echo -e "Total CPU cores\t: $(nproc)" 10 | cat /proc/cpuinfo | grep 'model name' 11 | free -h 12 | 13 | - name: check disk space 14 | shell: bash 15 | run: | 16 | df -h 17 | 18 | - name: Initialization environment 19 | env: 20 | DEBIAN_FRONTEND: noninteractive 21 | shell: bash 22 | run: | 23 | sudo -E apt-get update -y 24 | sudo -E apt-get install -y build-essential ccache ecj fastjar file g++ gawk gettext git java-propose-classpath libelf-dev libncurses5-dev libncursesw5-dev libssl-dev python3 unzip wget python3-distutils python3-setuptools python3-dev rsync subversion swig time xsltproc zlib1g-dev python3-pyelftools 25 | #sudo -E apt-get install -y rsync asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core p7zip p7zip-full msmtp libssl-dev texinfo libreadline-dev libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint ccache curl wget vim nano python3 python3-pip python3-ply haveged lrzsz device-tree-compiler scons 26 | sudo -E apt-get install clang llvm 27 | sudo -E apt-get clean -y 28 | git config --global user.name 'GitHub Actions' && git config --global user.email 'noreply@github.com' 29 | df -h 30 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/target/linux/rockchip/patches-5.15/100-rockchip-use-system-LED-for-OpenWrt.patch: -------------------------------------------------------------------------------- 1 | From 6731d2c9039fbe1ecf21915eab3acee0a999508a Mon Sep 17 00:00:00 2001 2 | From: David Bauer 3 | Date: Fri, 10 Jul 2020 21:38:20 +0200 4 | Subject: [PATCH] rockchip: use system LED for OpenWrt 5 | 6 | Use the SYS LED on the casing for showing system status. 7 | 8 | This patch is kept separate from the NanoPi R2S support patch, as i plan 9 | on submitting the device support upstream. 10 | 11 | Signed-off-by: David Bauer 12 | --- 13 | arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 9 ++++++++- 14 | 1 file changed, 8 insertions(+), 1 deletion(-) 15 | 16 | --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts 17 | +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts 18 | @@ -16,6 +16,11 @@ 19 | aliases { 20 | ethernet1 = &rtl8153; 21 | mmc0 = &sdmmc; 22 | + 23 | + led-boot = &sys_led; 24 | + led-failsafe = &sys_led; 25 | + led-running = &sys_led; 26 | + led-upgrade = &sys_led; 27 | }; 28 | 29 | chosen { 30 | @@ -49,18 +54,18 @@ 31 | 32 | lan_led: led-0 { 33 | gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>; 34 | - label = "nanopi-r2s:green:lan"; 35 | + label = "green:lan"; 36 | }; 37 | 38 | sys_led: led-1 { 39 | gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; 40 | - label = "nanopi-r2s:red:sys"; 41 | + label = "red:sys"; 42 | default-state = "on"; 43 | }; 44 | 45 | wan_led: led-2 { 46 | gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>; 47 | - label = "nanopi-r2s:green:wan"; 48 | + label = "green:wan"; 49 | }; 50 | }; 51 | 52 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/adguardhome/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is free software, licensed under the GNU General Public License v2. 3 | # See /LICENSE for more information. 4 | # 5 | 6 | include $(TOPDIR)/rules.mk 7 | 8 | PKG_NAME:=adguardhome 9 | PKG_VERSION:=0.107.59 10 | PKG_RELEASE:=1 11 | 12 | # WARNING : need rework for other arch 13 | PKG_SOURCE:=AdGuardHome_linux_arm64.tar.gz 14 | PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome/releases/download/v$(PKG_VERSION)/ 15 | PKG_HASH:=efc7d2e7e0507af1269f36f9f04274f9097fa3fe0ae1f0c18d2be586ff452c5c 16 | 17 | PKG_LICENSE:=GPL-3.0-only 18 | PKG_LICENSE_FILES:=LICENSE.txt 19 | PKG_MAINTAINER:=Dobroslaw Kijowski 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | 23 | define Package/adguardhome 24 | SECTION:=net 25 | CATEGORY:=Network 26 | TITLE:=Network-wide ads and trackers blocking DNS server 27 | URL:=https://github.com/AdguardTeam/AdGuardHome 28 | DEPENDS:=+ca-bundle 29 | endef 30 | 31 | define Package/adguardhome/conffiles 32 | /etc/adguardhome.yaml 33 | /etc/config/adguardhome 34 | endef 35 | 36 | define Package/adguardhome/description 37 | Free and open source, powerful network-wide ads and trackers blocking DNS server. 38 | endef 39 | 40 | define Build/Prepare 41 | $(TAR) -C $(PKG_BUILD_DIR) -xf $(DL_DIR)/$(PKG_SOURCE) 42 | endef 43 | 44 | define Build/Compile 45 | endef 46 | 47 | define Package/adguardhome/install 48 | $(INSTALL_DIR) $(1)/usr/bin 49 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/AdGuardHome/AdGuardHome $(1)/usr/bin/AdGuardHome 50 | 51 | $(INSTALL_DIR) $(1)/etc/init.d 52 | $(INSTALL_BIN) ./files/adguardhome.init $(1)/etc/init.d/adguardhome 53 | 54 | $(INSTALL_DIR) $(1)/etc/config 55 | $(INSTALL_DATA) ./files/adguardhome.config $(1)/etc/config/adguardhome 56 | endef 57 | 58 | $(eval $(call BuildPackage,adguardhome)) 59 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/adguardhome/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is free software, licensed under the GNU General Public License v2. 3 | # See /LICENSE for more information. 4 | # 5 | 6 | include $(TOPDIR)/rules.mk 7 | 8 | PKG_NAME:=adguardhome 9 | PKG_VERSION:=0.107.71 10 | PKG_RELEASE:=1 11 | 12 | # WARNING : need rework for other arch 13 | PKG_SOURCE:=AdGuardHome_linux_arm64.tar.gz 14 | PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome/releases/download/v$(PKG_VERSION)/ 15 | PKG_HASH:=f5ea04e043994f63a1f2d240805398abeda877046db0cf943b976872562dfc3e 16 | 17 | PKG_LICENSE:=GPL-3.0-only 18 | PKG_LICENSE_FILES:=LICENSE.txt 19 | PKG_MAINTAINER:=Dobroslaw Kijowski 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | 23 | define Package/adguardhome 24 | SECTION:=net 25 | CATEGORY:=Network 26 | TITLE:=Network-wide ads and trackers blocking DNS server 27 | URL:=https://github.com/AdguardTeam/AdGuardHome 28 | DEPENDS:=+ca-bundle 29 | endef 30 | 31 | define Package/adguardhome/conffiles 32 | /etc/adguardhome.yaml 33 | /etc/config/adguardhome 34 | endef 35 | 36 | define Package/adguardhome/description 37 | Free and open source, powerful network-wide ads and trackers blocking DNS server. 38 | endef 39 | 40 | define Build/Prepare 41 | $(TAR) -C $(PKG_BUILD_DIR) -xf $(DL_DIR)/$(PKG_SOURCE) 42 | endef 43 | 44 | define Build/Compile 45 | endef 46 | 47 | define Package/adguardhome/install 48 | $(INSTALL_DIR) $(1)/usr/bin 49 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/AdGuardHome/AdGuardHome $(1)/usr/bin/AdGuardHome 50 | 51 | $(INSTALL_DIR) $(1)/etc/init.d 52 | $(INSTALL_BIN) ./files/adguardhome.init $(1)/etc/init.d/adguardhome 53 | 54 | $(INSTALL_DIR) $(1)/etc/config 55 | $(INSTALL_DATA) ./files/adguardhome.config $(1)/etc/config/adguardhome 56 | endef 57 | 58 | $(eval $(call BuildPackage,adguardhome)) 59 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/target/linux/rockchip/patches-6.6/402-1-rk3399-fix-pci-phy-reset-on-probe.patch: -------------------------------------------------------------------------------- 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 | From: Andrey Safonov 3 | Date: Sat, 16 Dec 2023 22:46:35 +0300 4 | Subject: rk3399 PCIE PHY reset on probe 5 | 6 | This patches the PCIE initialization error after warm reboot. The root of cause is, when the device is booted after power on, PHY stays in 'factory' state. After warm boot PHY stays in the previous state and prevents any training, thus PCIE init fails. 7 | 8 | Signed-off-by: Andrey Safonov 9 | --- 10 | drivers/phy/rockchip/phy-rockchip-pcie.c | 16 ++++++++++++++++ 11 | 1 file changed, 16 insertions(+) 12 | 13 | --- a/drivers/phy/rockchip/phy-rockchip-pcie.c 14 | +++ b/drivers/phy/rockchip/phy-rockchip-pcie.c 15 | @@ -344,6 +344,20 @@ static const struct of_device_id rockchi 16 | 17 | MODULE_DEVICE_TABLE(of, rockchip_pcie_phy_dt_ids); 18 | 19 | +static void rockchip_pcie_phy_reset(struct rockchip_pcie_phy *rk_phy) 20 | +{ 21 | + int i; 22 | + 23 | + for (i = 0; i < PHY_MAX_LANE_NUM; i++) 24 | + regmap_write(rk_phy->reg_base, 25 | + rk_phy->phy_data->pcie_laneoff, 26 | + HIWORD_UPDATE(PHY_LANE_IDLE_OFF, 27 | + PHY_LANE_IDLE_MASK, 28 | + PHY_LANE_IDLE_A_SHIFT + i)); 29 | + 30 | + reset_control_assert(rk_phy->phy_rst); 31 | +} 32 | + 33 | static int rockchip_pcie_phy_probe(struct platform_device *pdev) 34 | { 35 | struct device *dev = &pdev->dev; 36 | @@ -393,6 +407,8 @@ static int rockchip_pcie_phy_probe(struc 37 | 38 | phy_num = (phy_num == 0) ? 1 : PHY_MAX_LANE_NUM; 39 | dev_dbg(dev, "phy number is %d\n", phy_num); 40 | + 41 | + rockchip_pcie_phy_reset(rk_phy); 42 | 43 | for (i = 0; i < phy_num; i++) { 44 | rk_phy->phys[i].phy = devm_phy_create(dev, dev->of_node, &ops); 45 | -------------------------------------------------------------------------------- /openwrt-23.05/steps/04-prepare_package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | OPENWRT_BRANCH=23.05 10 | 11 | cd "$ROOTDIR/build" 12 | 13 | # clone stangri repo 14 | rm -rf stangri_repo 15 | mkdir stangri_repo 16 | cd stangri_repo 17 | # stick to version 1.1.6 of pbr for now 18 | git clone -b 1.1.6 https://github.com/stangri/pbr.git 19 | git clone https://github.com/stangri/luci-app-pbr.git 20 | #git clone https://github.com/stangri/source.openwrt.melmac.net stangri_repo 21 | cd .. 22 | 23 | # install feeds 24 | cd openwrt 25 | ./scripts/feeds update -a 26 | 27 | # replace pbr packages 28 | rm -rf feeds/packages/net/pbr/ 29 | cp -R ../stangri_repo/pbr feeds/packages/net/ 30 | rm -rf feeds/luci/applications/luci-app-pbr 31 | cp -R ../stangri_repo/luci-app-pbr feeds/luci/applications/ 32 | 33 | # replace adguardhome with prebuilt latest version 34 | rm -rf feeds/packages/net/adguardhome 35 | cp -R $ROOTDIR/openwrt-$OPENWRT_BRANCH/patches/package/adguardhome feeds/packages/net/ 36 | 37 | ./scripts/feeds update -i && ./scripts/feeds install -a 38 | 39 | # Time stamp with $Build_Date=$(date +%Y.%m.%d) 40 | MANUAL_DATE="$(date +%Y.%m.%d) (manual build)" 41 | BUILD_STRING=${BUILD_STRING:-$MANUAL_DATE} 42 | echo "Write build date in openwrt : $BUILD_DATE" 43 | echo -e '\nAO Build@'${BUILD_STRING}'\n' >> package/base-files/files/etc/banner 44 | #sed -i '/DISTRIB_REVISION/d' package/base-files/files/etc/openwrt_release 45 | #echo "DISTRIB_REVISION='${BUILD_STRING}'" >> package/base-files/files/etc/openwrt_release 46 | sed -i '/DISTRIB_DESCRIPTION/d' package/base-files/files/etc/openwrt_release 47 | echo "DISTRIB_DESCRIPTION='AO Build@${BUILD_STRING}'" >> package/base-files/files/etc/openwrt_release 48 | #sed -i '/luciversion/d' feeds/luci/modules/luci-base/luasrc/version.lua 49 | 50 | rm -rf .config 51 | -------------------------------------------------------------------------------- /openwrt-24.10/steps/04-prepare_package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | OPENWRT_BRANCH=24.10 10 | 11 | cd "$ROOTDIR/build" 12 | 13 | # clone stangri repo 14 | rm -rf stangri_repo 15 | mkdir stangri_repo 16 | cd stangri_repo 17 | # stick to version 1.1.8 of pbr for now 18 | git clone -b 1.1.8 https://github.com/stangri/pbr.git 19 | git clone -b 1.1.8 https://github.com/stangri/luci-app-pbr.git 20 | #git clone https://github.com/stangri/source.openwrt.melmac.net stangri_repo 21 | cd .. 22 | 23 | # install feeds 24 | cd openwrt 25 | ./scripts/feeds update -a 26 | 27 | # replace pbr packages 28 | rm -rf feeds/packages/net/pbr/ 29 | cp -R ../stangri_repo/pbr feeds/packages/net/ 30 | rm -rf feeds/luci/applications/luci-app-pbr 31 | cp -R ../stangri_repo/luci-app-pbr feeds/luci/applications/ 32 | 33 | # replace adguardhome with prebuilt latest version 34 | rm -rf feeds/packages/net/adguardhome 35 | cp -R $ROOTDIR/openwrt-$OPENWRT_BRANCH/patches/package/adguardhome feeds/packages/net/ 36 | 37 | ./scripts/feeds update -i && ./scripts/feeds install -a 38 | 39 | # Time stamp with $Build_Date=$(date +%Y.%m.%d) 40 | MANUAL_DATE="$(date +%Y.%m.%d) (manual build)" 41 | BUILD_STRING=${BUILD_STRING:-$MANUAL_DATE} 42 | echo "Write build date in openwrt : $BUILD_DATE" 43 | echo -e '\nAO Build@'${BUILD_STRING}'\n' >> package/base-files/files/etc/banner 44 | #sed -i '/DISTRIB_REVISION/d' package/base-files/files/etc/openwrt_release 45 | #echo "DISTRIB_REVISION='${BUILD_STRING}'" >> package/base-files/files/etc/openwrt_release 46 | sed -i '/DISTRIB_DESCRIPTION/d' package/base-files/files/etc/openwrt_release 47 | echo "DISTRIB_DESCRIPTION='AO Build@${BUILD_STRING}'" >> package/base-files/files/etc/openwrt_release 48 | #sed -i '/luciversion/d' feeds/luci/modules/luci-base/luasrc/version.lua 49 | 50 | rm -rf .config 51 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/target/linux/rockchip/patches-5.15/103-arm64-rockchip-add-OF-node-for-eth.patch: -------------------------------------------------------------------------------- 1 | From 2795c8b31a686bdb8338f9404d18ef7a154f0d75 Mon Sep 17 00:00:00 2001 2 | From: David Bauer 3 | Date: Sun, 26 Jul 2020 13:32:59 +0200 4 | Subject: [PATCH] arm64: rockchip: add OF node for USB eth on NanoPi R2S 5 | 6 | This adds the OF node for the USB3 ethernet adapter on the FriendlyARM 7 | NanoPi R2S. Add the correct value for the RTL8153 LED configuration 8 | register to match the blink behavior of the other port on the device. 9 | 10 | Signed-off-by: David Bauer 11 | --- 12 | arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 7 +++++++ 13 | 1 file changed, 7 insertions(+) 14 | 15 | --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts 16 | +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts 17 | @@ -38,3 +38,7 @@ 18 | }; 19 | }; 20 | }; 21 | + 22 | +&rtl8153 { 23 | + realtek,led-data = <0x78>; 24 | +}; 25 | --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts 26 | +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts 27 | @@ -401,9 +401,9 @@ 28 | #size-cells = <0>; 29 | 30 | /* Second port is for USB 3.0 */ 31 | - rtl8153: device@2 { 32 | - compatible = "usbbda,8153"; 33 | + rtl8153: usb-eth@2 { 34 | + compatible = "realtek,rtl8153"; 35 | reg = <2>; 36 | realtek,led-data = <0x87>; 37 | }; 38 | }; 39 | 40 | --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts 41 | +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts 42 | @@ -83,6 +83,19 @@ 43 | max-link-speed = <1>; 44 | num-lanes = <1>; 45 | vpcie3v3-supply = <&vcc3v3_sys>; 46 | + 47 | + pcie@0 { 48 | + reg = <0x00000000 0 0 0 0>; 49 | + #address-cells = <3>; 50 | + #size-cells = <2>; 51 | + 52 | + pcie-eth@0,0 { 53 | + compatible = "pci10ec,8168"; 54 | + reg = <0x000000 0 0 0 0>; 55 | + 56 | + realtek,led-data = <0x870>; 57 | + }; 58 | + }; 59 | }; 60 | 61 | &pinctrl { 62 | -------------------------------------------------------------------------------- /openwrt-23.05/steps/03_patch_openwrt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | BUILDDIR="$ROOTDIR/build" 10 | 11 | cd "$BUILDDIR/openwrt" 12 | OPENWRT_BRANCH=23.05 13 | 14 | # -------------- UBOOT ----------------------------------- 15 | # replace uboot with local uboot package 16 | # this version does not need arm-trusted-firmware-rk3328 17 | rm -rf package/boot/uboot-rockchip 18 | cp -R $ROOTDIR/openwrt-$OPENWRT_BRANCH/patches/package/uboot-rockchip package/boot/ 19 | 20 | # -------------- target linux/rockchip ---------------- 21 | # replace target rockchip with original one 22 | rm -rf target/linux/rockchip 23 | cp -R $BUILDDIR/openwrt-fresh-$OPENWRT_BRANCH/target/linux/rockchip target/linux/ 24 | 25 | # override manually some files in the rockchip target using rsync to merge folders and override same filenames 26 | rsync -avz $ROOTDIR/openwrt-$OPENWRT_BRANCH/patches/target/ target 27 | 28 | # ------------------ packages ------------------------------------ 29 | 30 | # enable armv8 crypto for mbedtls 31 | cp $ROOTDIR/openwrt-$OPENWRT_BRANCH/patches/package/mbedtls/patches/200-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch \ 32 | package/libs/mbedtls/patches/ 33 | 34 | # enable motorcomm for R2C 35 | echo "CONFIG_MOTORCOMM_PHY=y" >> target/linux/rockchip/armv8/config-5.15 36 | 37 | # add caiaq usb sound module for shairport with old soundcard 38 | ADDON_PATH='snd-usb-caiaq.makefileaddon' 39 | ADDON_DEST='package/kernel/linux/modules/usb.mk' 40 | if ! grep -q " --- $ADDON_PATH" $ADDON_DEST; then 41 | echo "Adding $ADDON_PATH to $ADDON_DEST" 42 | echo "# --- $ADDON_PATH" >> $ADDON_DEST 43 | cat $ROOTDIR/openwrt-$OPENWRT_BRANCH/patches/$ADDON_PATH >> $ADDON_DEST 44 | else 45 | echo "Already added $ADDON_PATH to $ADDON_DEST" 46 | fi 47 | 48 | # revert to fresh config 49 | cp $BUILDDIR/openwrt-fresh-$OPENWRT_BRANCH/target/linux/generic/config-5.15 target/linux/generic/config-5.15 50 | 51 | cat << "EOF" >> target/linux/generic/config-5.15 52 | # CONFIG_BLK_DEV_SX8 is not set 53 | EOF 54 | 55 | 56 | #cleanup 57 | if [ -e .config ]; then 58 | echo "Cleaning up ..." 59 | make target/linux/clean 60 | make package/boot/uboot-rockchip/clean 61 | make package/kernel/r8168/clean 62 | fi -------------------------------------------------------------------------------- /openwrt-24.10/steps/03_patch_openwrt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ROOTDIR=$(pwd) 3 | echo $ROOTDIR 4 | if [ ! -e "$ROOTDIR/build" ]; then 5 | echo "Please run from root / no build dir" 6 | exit 1 7 | fi 8 | 9 | BUILDDIR="$ROOTDIR/build" 10 | 11 | cd "$BUILDDIR/openwrt" 12 | OPENWRT_BRANCH=24.10 13 | 14 | # -------------- UBOOT ----------------------------------- 15 | # replace uboot with local uboot package 16 | # this version does not need arm-trusted-firmware-rk3328 17 | rm -rf package/boot/uboot-rockchip 18 | cp -R $ROOTDIR/openwrt-$OPENWRT_BRANCH/patches/package/uboot-rockchip package/boot/ 19 | 20 | # -------------- target linux/rockchip ---------------- 21 | # replace target rockchip with original one 22 | rm -rf target/linux/rockchip 23 | cp -R $BUILDDIR/openwrt-fresh-$OPENWRT_BRANCH/target/linux/rockchip target/linux/ 24 | 25 | # override manually some files in the rockchip target using rsync to merge folders and override same filenames 26 | rsync -avz $ROOTDIR/openwrt-$OPENWRT_BRANCH/patches/target/ target 27 | 28 | # ------------------ packages ------------------------------------ 29 | 30 | # enable armv8 crypto for mbedtls 31 | #TODO : reenable 32 | #cp $ROOTDIR/openwrt-$OPENWRT_BRANCH/patches/package/mbedtls/patches/200-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch \ 33 | # package/libs/mbedtls/patches/ 34 | 35 | # enable motorcomm for R2C 36 | echo "CONFIG_MOTORCOMM_PHY=y" >> target/linux/rockchip/armv8/config-6.6 37 | 38 | # add caiaq usb sound module for shairport with old soundcard 39 | ADDON_PATH='snd-usb-caiaq.makefileaddon' 40 | ADDON_DEST='package/kernel/linux/modules/usb.mk' 41 | if ! grep -q " --- $ADDON_PATH" $ADDON_DEST; then 42 | echo "Adding $ADDON_PATH to $ADDON_DEST" 43 | echo "# --- $ADDON_PATH" >> $ADDON_DEST 44 | cat $ROOTDIR/openwrt-$OPENWRT_BRANCH/patches/$ADDON_PATH >> $ADDON_DEST 45 | else 46 | echo "Already added $ADDON_PATH to $ADDON_DEST" 47 | fi 48 | 49 | # revert to fresh config 50 | cp $BUILDDIR/openwrt-fresh-$OPENWRT_BRANCH/target/linux/generic/config-6.6 target/linux/generic/config-6.6 51 | 52 | #cat << "EOF" >> target/linux/generic/config-6.6 53 | # CONFIG_BLK_DEV_SX8 is not set 54 | #EOF 55 | 56 | 57 | #cleanup 58 | if [ -e .config ]; then 59 | echo "Cleaning up ..." 60 | make target/linux/clean 61 | make package/boot/uboot-rockchip/clean 62 | make package/kernel/r8168/clean 63 | fi -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/305-common-bouncebuf-Add-arch_addr_aligned-hook-for-rk33.patch: -------------------------------------------------------------------------------- 1 | From 7b108ebc5f9ac82487ad17dea0ae7163285d906f Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 12 Jan 2022 10:59:31 +0800 4 | Subject: [PATCH 305/308] common: bouncebuf: Add arch_addr_aligned() hook for 5 | rk3399 6 | 7 | As described in rk3399-u-boot.dtsi ("mmc to sram can't do dma"), 8 | this restrict can be sorted out by adding a hook and returning 9 | the non-DRAM area as Unaligned (0) in rk3399's implementation. 10 | 11 | Then we can enable DMA mode and save about 200ms of SPL boot. 12 | 13 | Signed-off-by: hmz007 14 | --- 15 | arch/arm/dts/rk3399-u-boot.dtsi | 3 --- 16 | arch/arm/mach-rockchip/rk3399/rk3399.c | 13 +++++++++++++ 17 | common/bouncebuf.c | 9 +++++++-- 18 | 3 files changed, 20 insertions(+), 5 deletions(-) 19 | 20 | --- a/arch/arm/dts/rk3399-u-boot.dtsi 21 | +++ b/arch/arm/dts/rk3399-u-boot.dtsi 22 | @@ -119,9 +119,6 @@ 23 | 24 | &sdmmc { 25 | u-boot,dm-pre-reloc; 26 | - 27 | - /* mmc to sram can't do dma, prevent aborts transferring TF-A parts */ 28 | - u-boot,spl-fifo-mode; 29 | }; 30 | 31 | &spi1 { 32 | --- a/arch/arm/mach-rockchip/rk3399/rk3399.c 33 | +++ b/arch/arm/mach-rockchip/rk3399/rk3399.c 34 | @@ -111,6 +111,19 @@ int arch_cpu_init(void) 35 | return 0; 36 | } 37 | 38 | +int arch_addr_aligned(void *ubuf) 39 | +{ 40 | +#define DRAM_END 0xf8000000 41 | + 42 | + if ((uintptr_t)ubuf < DRAM_END) { 43 | + /* Aligned for DRAM area */ 44 | + return 1; 45 | + } 46 | + 47 | + debug("Unsupported buffer for DMA transfer\n"); 48 | + return 0; 49 | +} 50 | + 51 | #ifdef CONFIG_DEBUG_UART_BOARD_INIT 52 | void board_debug_uart_init(void) 53 | { 54 | --- a/common/bouncebuf.c 55 | +++ b/common/bouncebuf.c 56 | @@ -13,6 +13,12 @@ 57 | #include 58 | #include 59 | 60 | +__weak int arch_addr_aligned(void *ubuf) 61 | +{ 62 | + /* Aligned */ 63 | + return 1; 64 | +} 65 | + 66 | static int addr_aligned(struct bounce_buffer *state) 67 | { 68 | const ulong align_mask = ARCH_DMA_MINALIGN - 1; 69 | @@ -29,8 +35,7 @@ static int addr_aligned(struct bounce_bu 70 | return 0; 71 | } 72 | 73 | - /* Aligned */ 74 | - return 1; 75 | + return arch_addr_aligned(state->user_buffer); 76 | } 77 | 78 | int bounce_buffer_start_extalign(struct bounce_buffer *state, void *data, 79 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/305-common-bouncebuf-Add-arch_addr_aligned-hook-for-rk33.patch: -------------------------------------------------------------------------------- 1 | From 7b108ebc5f9ac82487ad17dea0ae7163285d906f Mon Sep 17 00:00:00 2001 2 | From: hmz007 3 | Date: Wed, 12 Jan 2022 10:59:31 +0800 4 | Subject: [PATCH 305/308] common: bouncebuf: Add arch_addr_aligned() hook for 5 | rk3399 6 | 7 | As described in rk3399-u-boot.dtsi ("mmc to sram can't do dma"), 8 | this restrict can be sorted out by adding a hook and returning 9 | the non-DRAM area as Unaligned (0) in rk3399's implementation. 10 | 11 | Then we can enable DMA mode and save about 200ms of SPL boot. 12 | 13 | Signed-off-by: hmz007 14 | --- 15 | arch/arm/dts/rk3399-u-boot.dtsi | 3 --- 16 | arch/arm/mach-rockchip/rk3399/rk3399.c | 13 +++++++++++++ 17 | common/bouncebuf.c | 9 +++++++-- 18 | 3 files changed, 20 insertions(+), 5 deletions(-) 19 | 20 | --- a/arch/arm/dts/rk3399-u-boot.dtsi 21 | +++ b/arch/arm/dts/rk3399-u-boot.dtsi 22 | @@ -119,9 +119,6 @@ 23 | 24 | &sdmmc { 25 | u-boot,dm-pre-reloc; 26 | - 27 | - /* mmc to sram can't do dma, prevent aborts transferring TF-A parts */ 28 | - u-boot,spl-fifo-mode; 29 | }; 30 | 31 | &spi1 { 32 | --- a/arch/arm/mach-rockchip/rk3399/rk3399.c 33 | +++ b/arch/arm/mach-rockchip/rk3399/rk3399.c 34 | @@ -111,6 +111,19 @@ int arch_cpu_init(void) 35 | return 0; 36 | } 37 | 38 | +int arch_addr_aligned(void *ubuf) 39 | +{ 40 | +#define DRAM_END 0xf8000000 41 | + 42 | + if ((uintptr_t)ubuf < DRAM_END) { 43 | + /* Aligned for DRAM area */ 44 | + return 1; 45 | + } 46 | + 47 | + debug("Unsupported buffer for DMA transfer\n"); 48 | + return 0; 49 | +} 50 | + 51 | #ifdef CONFIG_DEBUG_UART_BOARD_INIT 52 | void board_debug_uart_init(void) 53 | { 54 | --- a/common/bouncebuf.c 55 | +++ b/common/bouncebuf.c 56 | @@ -13,6 +13,12 @@ 57 | #include 58 | #include 59 | 60 | +__weak int arch_addr_aligned(void *ubuf) 61 | +{ 62 | + /* Aligned */ 63 | + return 1; 64 | +} 65 | + 66 | static int addr_aligned(struct bounce_buffer *state) 67 | { 68 | const ulong align_mask = ARCH_DMA_MINALIGN - 1; 69 | @@ -29,8 +35,7 @@ static int addr_aligned(struct bounce_bu 70 | return 0; 71 | } 72 | 73 | - /* Aligned */ 74 | - return 1; 75 | + return arch_addr_aligned(state->user_buffer); 76 | } 77 | 78 | int bounce_buffer_start_extalign(struct bounce_buffer *state, void *data, 79 | -------------------------------------------------------------------------------- /workflow-scripts/free_disk_space.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | # 18 | # The Azure provided machines typically have the following disk allocation: 19 | # Total space: 85GB 20 | # Allocated: 67 GB 21 | # Free: 17 GB 22 | # This script frees up 28 GB of disk space by deleting unneeded packages and 23 | # large directories. 24 | # The Flink end to end tests download and generate more than 17 GB of files, 25 | # causing unpredictable behavior and build failures. 26 | # 27 | echo "==============================================================================" 28 | echo "Freeing up disk space on CI system" 29 | echo "==============================================================================" 30 | 31 | echo "Listing 100 largest packages" 32 | dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 33 | df -h 34 | echo "Removing large packages" 35 | sudo apt-get remove -y '^ghc-8.*' 36 | sudo apt-get remove -y '^dotnet-.*' 37 | sudo apt-get remove -y '^llvm-.*' 38 | sudo apt-get remove -y 'php.*' 39 | sudo apt-get remove -y 'temurin-.*' 40 | sudo apt-get remove -y 'mono-.*' 41 | sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell microsoft-edge-stable 42 | sudo apt-get autoremove -y 43 | sudo apt-get clean 44 | df -h 45 | echo "Removing large directories" 46 | # deleting 15GB 47 | rm -rf /usr/share/dotnet/ 48 | sudo rm -rf /usr/local/lib/android 49 | sudo rm -rf /usr/local/lib/heroku 50 | sudo rm -rf /usr/local/lib/node_modules 51 | sudo rm -rf /opt/az 52 | sudo rm -rf /opt/microsoft/powershell 53 | sudo rm -rf /usr/local/share/powershell 54 | sudo rm -rf /opt/hostedtoolcache/CodeQL 55 | sudo rm -rf /opt/hostedtoolcache/go 56 | sudo rm -rf /opt/hostedtoolcache/node 57 | sudo rm -rf /usr/local/aws-sam-cil /usr/local/julia* 58 | rm -rf /opt/ghc 59 | df -h 60 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/target/linux/rockchip/image/armv8.mk: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2020 Tobias Maedel 4 | 5 | # FIT will be loaded at 0x02080000. Leave 16M for that, align it to 2M and load the kernel after it. 6 | KERNEL_LOADADDR := 0x03200000 7 | 8 | define Device/firefly_roc-rk3328-cc 9 | DEVICE_VENDOR := Firefly 10 | DEVICE_MODEL := ROC-RK3328-CC 11 | SOC := rk3328 12 | DEVICE_DTS := rockchip/rk3328-roc-cc 13 | UBOOT_DEVICE_NAME := roc-cc-rk3328 14 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 15 | endef 16 | TARGET_DEVICES += firefly_roc-rk3328-cc 17 | 18 | define Device/friendlyarm_nanopi-r2c 19 | DEVICE_VENDOR := FriendlyARM 20 | DEVICE_MODEL := NanoPi R2C 21 | SOC := rk3328 22 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 23 | DEVICE_PACKAGES := kmod-usb-net-rtl8152 24 | endef 25 | TARGET_DEVICES += friendlyarm_nanopi-r2c 26 | 27 | define Device/friendlyarm_nanopi-r2s 28 | DEVICE_VENDOR := FriendlyARM 29 | DEVICE_MODEL := NanoPi R2S 30 | SOC := rk3328 31 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 32 | DEVICE_PACKAGES := kmod-usb-net-rtl8152 33 | endef 34 | TARGET_DEVICES += friendlyarm_nanopi-r2s 35 | 36 | define Device/friendlyarm_nanopi-r4s 37 | DEVICE_VENDOR := FriendlyARM 38 | DEVICE_MODEL := NanoPi R4S 39 | SOC := rk3399 40 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 41 | DEVICE_PACKAGES := kmod-r8168 42 | endef 43 | TARGET_DEVICES += friendlyarm_nanopi-r4s 44 | 45 | define Device/pine64_rockpro64 46 | DEVICE_VENDOR := Pine64 47 | DEVICE_MODEL := RockPro64 48 | SOC := rk3399 49 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 50 | endef 51 | TARGET_DEVICES += pine64_rockpro64 52 | 53 | define Device/radxa_rock-pi-4a 54 | DEVICE_VENDOR := Radxa 55 | DEVICE_MODEL := ROCK Pi 4A 56 | SOC := rk3399 57 | SUPPORTED_DEVICES := radxa,rockpi4a radxa,rockpi4 58 | UBOOT_DEVICE_NAME := rock-pi-4-rk3399 59 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 60 | endef 61 | TARGET_DEVICES += radxa_rock-pi-4a 62 | 63 | define Device/xunlong_orangepi-r1-plus 64 | DEVICE_VENDOR := Xunlong 65 | DEVICE_MODEL := Orange Pi R1 Plus 66 | SOC := rk3328 67 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 68 | DEVICE_PACKAGES := kmod-usb-net-rtl8152 69 | endef 70 | TARGET_DEVICES += xunlong_orangepi-r1-plus 71 | 72 | define Device/xunlong_orangepi-r1-plus-lts 73 | DEVICE_VENDOR := Xunlong 74 | DEVICE_MODEL := Orange Pi R1 Plus LTS 75 | SOC := rk3328 76 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 77 | DEVICE_PACKAGES := kmod-usb-net-rtl8152 78 | endef 79 | TARGET_DEVICES += xunlong_orangepi-r1-plus-lts 80 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/target/linux/rockchip/image/armv8.mk: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2020 Tobias Maedel 4 | 5 | # FIT will be loaded at 0x02080000. Leave 16M for that, align it to 2M and load the kernel after it. 6 | KERNEL_LOADADDR := 0x03200000 7 | 8 | define Device/firefly_roc-rk3328-cc 9 | DEVICE_VENDOR := Firefly 10 | DEVICE_MODEL := ROC-RK3328-CC 11 | SOC := rk3328 12 | DEVICE_DTS := rockchip/rk3328-roc-cc 13 | UBOOT_DEVICE_NAME := roc-cc-rk3328 14 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 15 | endef 16 | TARGET_DEVICES += firefly_roc-rk3328-cc 17 | 18 | define Device/friendlyarm_nanopi-r2c 19 | DEVICE_VENDOR := FriendlyARM 20 | DEVICE_MODEL := NanoPi R2C 21 | SOC := rk3328 22 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 23 | DEVICE_PACKAGES := kmod-usb-net-rtl8152 24 | endef 25 | TARGET_DEVICES += friendlyarm_nanopi-r2c 26 | 27 | define Device/friendlyarm_nanopi-r2s 28 | DEVICE_VENDOR := FriendlyARM 29 | DEVICE_MODEL := NanoPi R2S 30 | SOC := rk3328 31 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 32 | DEVICE_PACKAGES := kmod-usb-net-rtl8152 33 | endef 34 | TARGET_DEVICES += friendlyarm_nanopi-r2s 35 | 36 | define Device/friendlyarm_nanopi-r4s 37 | DEVICE_VENDOR := FriendlyARM 38 | DEVICE_MODEL := NanoPi R4S 39 | SOC := rk3399 40 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 41 | DEVICE_PACKAGES := kmod-r8168 42 | endef 43 | TARGET_DEVICES += friendlyarm_nanopi-r4s 44 | 45 | define Device/pine64_rockpro64 46 | DEVICE_VENDOR := Pine64 47 | DEVICE_MODEL := RockPro64 48 | SOC := rk3399 49 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 50 | endef 51 | TARGET_DEVICES += pine64_rockpro64 52 | 53 | define Device/radxa_rock-pi-4a 54 | DEVICE_VENDOR := Radxa 55 | DEVICE_MODEL := ROCK Pi 4A 56 | SOC := rk3399 57 | SUPPORTED_DEVICES := radxa,rockpi4a radxa,rockpi4 58 | UBOOT_DEVICE_NAME := rock-pi-4-rk3399 59 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 60 | endef 61 | TARGET_DEVICES += radxa_rock-pi-4a 62 | 63 | define Device/xunlong_orangepi-r1-plus 64 | DEVICE_VENDOR := Xunlong 65 | DEVICE_MODEL := Orange Pi R1 Plus 66 | SOC := rk3328 67 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 68 | DEVICE_PACKAGES := kmod-usb-net-rtl8152 69 | endef 70 | TARGET_DEVICES += xunlong_orangepi-r1-plus 71 | 72 | define Device/xunlong_orangepi-r1-plus-lts 73 | DEVICE_VENDOR := Xunlong 74 | DEVICE_MODEL := Orange Pi R1 Plus LTS 75 | SOC := rk3328 76 | IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata 77 | DEVICE_PACKAGES := kmod-usb-net-rtl8152 78 | endef 79 | TARGET_DEVICES += xunlong_orangepi-r1-plus-lts 80 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is free software, licensed under the GNU General Public License v2. 3 | # See /LICENSE for more information. 4 | # 5 | include $(TOPDIR)/rules.mk 6 | include $(INCLUDE_DIR)/kernel.mk 7 | 8 | PKG_VERSION:=2022.07 9 | PKG_RELEASE:=$(AUTORELEASE) 10 | 11 | PKG_HASH:=92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e 12 | 13 | PKG_MAINTAINER:=Tobias Maedel 14 | 15 | include $(INCLUDE_DIR)/u-boot.mk 16 | include $(INCLUDE_DIR)/package.mk 17 | 18 | define U-Boot/Default 19 | BUILD_TARGET:=rockchip 20 | UENV:=default 21 | HIDDEN:=1 22 | endef 23 | 24 | 25 | # RK3328 boards 26 | 27 | define U-Boot/nanopi-r2c-rk3328 28 | BUILD_SUBTARGET:=armv8 29 | NAME:=NanoPi R2C 30 | BUILD_DEVICES:= \ 31 | friendlyarm_nanopi-r2c 32 | DEPENDS:=+PACKAGE_u-boot-nanopi-r2c-rk3328:arm-trusted-firmware-rockchip 33 | PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip 34 | ATF:=rk3328_bl31.elf 35 | endef 36 | 37 | define U-Boot/nanopi-r2s-rk3328 38 | BUILD_SUBTARGET:=armv8 39 | NAME:=NanoPi R2S 40 | BUILD_DEVICES:= \ 41 | friendlyarm_nanopi-r2s 42 | DEPENDS:=+PACKAGE_u-boot-nanopi-r2s-rk3328:arm-trusted-firmware-rockchip 43 | PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip 44 | ATF:=rk3328_bl31.elf 45 | endef 46 | 47 | 48 | # RK3399 boards 49 | 50 | define U-Boot/nanopi-r4s-rk3399 51 | BUILD_SUBTARGET:=armv8 52 | NAME:=NanoPi R4S 53 | BUILD_DEVICES:= \ 54 | friendlyarm_nanopi-r4s 55 | DEPENDS:=+PACKAGE_u-boot-nanopi-r4s-rk3399:arm-trusted-firmware-rockchip 56 | PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip 57 | ATF:=rk3399_bl31.elf 58 | endef 59 | 60 | define U-Boot/rock-pi-4-rk3399 61 | BUILD_SUBTARGET:=armv8 62 | NAME:=Rock Pi 4 63 | BUILD_DEVICES:= \ 64 | radxa_rock-pi-4a 65 | DEPENDS:=+PACKAGE_u-boot-rock-pi-4-rk3399:arm-trusted-firmware-rockchip 66 | PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip 67 | ATF:=rk3399_bl31.elf 68 | endef 69 | 70 | define U-Boot/rockpro64-rk3399 71 | BUILD_SUBTARGET:=armv8 72 | NAME:=RockPro64 73 | BUILD_DEVICES:= \ 74 | pine64_rockpro64 75 | DEPENDS:=+PACKAGE_u-boot-rockpro64-rk3399:arm-trusted-firmware-rockchip 76 | PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip 77 | ATF:=rk3399_bl31.elf 78 | endef 79 | 80 | UBOOT_TARGETS := \ 81 | nanopi-r4s-rk3399 \ 82 | rock-pi-4-rk3399 \ 83 | rockpro64-rk3399 \ 84 | nanopi-r2c-rk3328 \ 85 | nanopi-r2s-rk3328 86 | 87 | UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes 88 | 89 | UBOOT_MAKE_FLAGS += \ 90 | BL31=$(STAGING_DIR_IMAGE)/$(ATF) 91 | 92 | define Build/Configure 93 | $(call Build/Configure/U-Boot) 94 | 95 | $(SED) 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR)/.config 96 | $(SED) 's#CONFIG_MKIMAGE_DTC_PATH=.*#CONFIG_MKIMAGE_DTC_PATH="$(PKG_BUILD_DIR)/scripts/dtc/dtc"#g' $(PKG_BUILD_DIR)/.config 97 | echo 'CONFIG_IDENT_STRING=" OpenWrt"' >> $(PKG_BUILD_DIR)/.config 98 | endef 99 | 100 | define Build/InstallDev 101 | $(INSTALL_DIR) $(STAGING_DIR_IMAGE) 102 | $(CP) $(PKG_BUILD_DIR)/idbloader.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-idbloader.img 103 | $(CP) $(PKG_BUILD_DIR)/u-boot.itb $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot.itb 104 | endef 105 | 106 | define Package/u-boot/install/default 107 | endef 108 | 109 | $(eval $(call BuildPackage/U-Boot)) 110 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is free software, licensed under the GNU General Public License v2. 3 | # See /LICENSE for more information. 4 | # 5 | include $(TOPDIR)/rules.mk 6 | include $(INCLUDE_DIR)/kernel.mk 7 | 8 | PKG_VERSION:=2022.07 9 | PKG_RELEASE:=$(AUTORELEASE) 10 | 11 | PKG_HASH:=92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e 12 | 13 | PKG_MAINTAINER:=Tobias Maedel 14 | 15 | UBOOT_USE_BINMAN:=1 16 | #UBOOT_USE_INTREE_DTC:=1 17 | 18 | include $(INCLUDE_DIR)/u-boot.mk 19 | include $(INCLUDE_DIR)/package.mk 20 | 21 | define U-Boot/Default 22 | BUILD_TARGET:=rockchip 23 | UENV:=default 24 | HIDDEN:=1 25 | endef 26 | 27 | 28 | # RK3328 boards 29 | 30 | define U-Boot/nanopi-r2c-rk3328 31 | BUILD_SUBTARGET:=armv8 32 | NAME:=NanoPi R2C 33 | BUILD_DEVICES:= \ 34 | friendlyarm_nanopi-r2c 35 | DEPENDS:=+PACKAGE_u-boot-nanopi-r2c-rk3328:trusted-firmware-a-rk3328 36 | PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip 37 | ATF:=rk3328_bl31.elf 38 | endef 39 | 40 | define U-Boot/nanopi-r2s-rk3328 41 | BUILD_SUBTARGET:=armv8 42 | NAME:=NanoPi R2S 43 | BUILD_DEVICES:= \ 44 | friendlyarm_nanopi-r2s 45 | DEPENDS:=+PACKAGE_u-boot-nanopi-r2s-rk3328:trusted-firmware-a-rk3328 46 | PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip 47 | ATF:=rk3328_bl31.elf 48 | endef 49 | 50 | 51 | # RK3399 boards 52 | 53 | define U-Boot/nanopi-r4s-rk3399 54 | BUILD_SUBTARGET:=armv8 55 | NAME:=NanoPi R4S 56 | BUILD_DEVICES:= \ 57 | friendlyarm_nanopi-r4s 58 | DEPENDS:=+PACKAGE_u-boot-nanopi-r4s-rk3399:trusted-firmware-a-rk3399 59 | PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip 60 | ATF:=rk3399_bl31.elf 61 | endef 62 | 63 | define U-Boot/rock-pi-4-rk3399 64 | BUILD_SUBTARGET:=armv8 65 | NAME:=Rock Pi 4 66 | BUILD_DEVICES:= \ 67 | radxa_rock-pi-4a 68 | DEPENDS:=+PACKAGE_u-boot-rock-pi-4-rk3399:trusted-firmware-a-rk3399 69 | PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip 70 | ATF:=rk3399_bl31.elf 71 | endef 72 | 73 | define U-Boot/rockpro64-rk3399 74 | BUILD_SUBTARGET:=armv8 75 | NAME:=RockPro64 76 | BUILD_DEVICES:= \ 77 | pine64_rockpro64 78 | DEPENDS:=+PACKAGE_u-boot-rockpro64-rk3399:trusted-firmware-a-rk3399 79 | PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip 80 | ATF:=rk3399_bl31.elf 81 | endef 82 | 83 | UBOOT_TARGETS := \ 84 | nanopi-r4s-rk3399 \ 85 | rock-pi-4-rk3399 \ 86 | rockpro64-rk3399 \ 87 | nanopi-r2c-rk3328 \ 88 | nanopi-r2s-rk3328 89 | 90 | UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes 91 | 92 | #UBOOT_CUSTOMIZE_CONFIG := \ 93 | # --disable TOOLS_MKEFICAPSULE \ 94 | # --set-str MKIMAGE_DTC_PATH $(PKG_BUILD_DIR)/scripts/dtc/dtc 95 | 96 | UBOOT_MAKE_FLAGS += \ 97 | BL31=$(STAGING_DIR_IMAGE)/$(ATF) \ 98 | $(if $(TPL),ROCKCHIP_TPL=$(STAGING_DIR_IMAGE)/$(TPL)) 99 | 100 | define Build/Configure 101 | $(call Build/Configure/U-Boot) 102 | 103 | $(SED) 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR)/.config 104 | $(SED) 's#CONFIG_MKIMAGE_DTC_PATH=.*#CONFIG_MKIMAGE_DTC_PATH="$(PKG_BUILD_DIR)/scripts/dtc/dtc"#g' $(PKG_BUILD_DIR)/.config 105 | echo 'CONFIG_IDENT_STRING=" OpenWrt"' >> $(PKG_BUILD_DIR)/.config 106 | endef 107 | 108 | define Build/InstallDev 109 | $(INSTALL_DIR) $(STAGING_DIR_IMAGE) 110 | $(CP) $(PKG_BUILD_DIR)/u-boot-rockchip.bin $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot-rockchip.bin 111 | endef 112 | 113 | define Package/u-boot/install/default 114 | endef 115 | 116 | $(eval $(call BuildPackage/U-Boot)) -------------------------------------------------------------------------------- /openwrt-23.05/steps/create_acl_for_luci.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # [CTCGFW]Project-OpenWrt 3 | # Use it under GPLv3, please. 4 | # -------------------------------------------------------- 5 | # Script for creating ACL file for each LuCI APP 6 | 7 | error_font="\033[31m[Error]$\033[0m " 8 | success_font="\033[32m[Success]\033[0m " 9 | info_font="\033[36m[Info]\033[0m " 10 | 11 | function echo_green_bg(){ 12 | echo -e "\033[42;37m$1\033[0m" 13 | } 14 | 15 | function echo_yellow_bg(){ 16 | echo -e "\033[44;37m$1\033[0m" 17 | } 18 | 19 | function echo_red_bg(){ 20 | echo -e "\033[41;37m$1\033[0m" 21 | } 22 | 23 | function clean_outdated_files(){ 24 | rm -f "create_acl_for_luci.err" "create_acl_for_luci.warn" "create_acl_for_luci.ok" 25 | } 26 | 27 | function check_if_acl_exist(){ 28 | ls "$1"/root/usr/share/rpcd/acl.d/*.json >/dev/null 2>&1 && return 0 || return 1 29 | } 30 | 31 | function check_config_files(){ 32 | [ "$(ls "$1"/root/etc/config/* 2>/dev/null | wc -l)" -ne "1" ] && return 0 || return 1 33 | } 34 | 35 | function get_config_name(){ 36 | ls "$1"/root/etc/config/* 2>/dev/null | awk -F '/' '{print $NF}' 37 | } 38 | 39 | function create_acl_file(){ 40 | mkdir -p "$1" 41 | echo -e "{ 42 | \"$2\": { 43 | \"description\": \"Grant UCI access for $2\", 44 | \"read\": { 45 | \"uci\": [ \"$3\" ] 46 | }, 47 | \"write\": { 48 | \"uci\": [ \"$3\" ] 49 | } 50 | } 51 | }" > "$1/$2.json" 52 | } 53 | 54 | function auto_create_acl(){ 55 | luci_app_list="$(find package -maxdepth 3 | grep -Eo "package/.+/luci-app-[a-zA-Z0-9_-]+" | sort -s)" 56 | echo $(pwd) 57 | echo $luci_app_list 58 | [ "$(echo -e "${luci_app_list}" | wc -l)" -gt "0" ] && for i in ${luci_app_list} 59 | do 60 | if check_if_acl_exist "$i"; then 61 | echo_yellow_bg "$i: has ACL file already, skipping..." | tee -a create_acl_for_luci.warn 62 | elif check_config_files "$i"; then 63 | echo_red_bg "$i: has no/multi config file(s), skipping..." | tee -a create_acl_for_luci.err 64 | else 65 | create_acl_file "$i/root/usr/share/rpcd/acl.d" "${i##*/}" "$(get_config_name "$i")" 66 | echo_green_bg "$i: ACL file has been generated." | tee -a create_acl_for_luci.ok 67 | fi 68 | done 69 | } 70 | 71 | while getopts "achml:n:p:" input_arg 72 | do 73 | case $input_arg in 74 | a) 75 | clean_outdated_files 76 | auto_create_acl 77 | exit 78 | ;; 79 | m) 80 | manual_mode=1 81 | ;; 82 | p) 83 | acl_path="$OPTARG" 84 | ;; 85 | l) 86 | luci_name="$OPTARG" 87 | ;; 88 | n) 89 | conf_name="$OPTARG" 90 | ;; 91 | c) 92 | clean_outdated_files 93 | exit 94 | ;; 95 | h|?|*) 96 | echo -e "${info_font}Usage: $0 [-a|-m (-p ) -l -n |-c]" 97 | exit 2 98 | ;; 99 | esac 100 | done 101 | 102 | [ "$?" -ne "0" ] && exit 103 | 104 | if [ "*${manual_mode}*" == "*1*" ]; then 105 | acl_path="${acl_path:-root/usr/share/rpcd/acl.d}" 106 | if create_acl_file "${acl_path}" "${luci_name}" "${conf_name}"; then 107 | echo -e "${success_font}Output file: $(ls "${acl_path}/${luci_name}.json")" 108 | echo_green_bg "$(cat "${acl_path}/${luci_name}.json")" 109 | echo_green_bg "${luci_name}: ACL file has been generated." >> "create_acl_for_luci.ok" 110 | [ -e "create_acl_for_luci.err" ] && sed -i "/${luci_name}/d" "create_acl_for_luci.err" 111 | else 112 | echo -e "${error_font}Failed to create file ${acl_path}/${luci_name}.json" 113 | echo_red_bg "${luci_name}: Failed to create ACL file." >> "create_acl_for_luci.err" 114 | fi 115 | else 116 | echo -e "${info_font}Usage: $0 [-a|-m -p -l -n |-c]" 117 | exit 2 118 | fi -------------------------------------------------------------------------------- /openwrt-24.10/steps/create_acl_for_luci.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # [CTCGFW]Project-OpenWrt 3 | # Use it under GPLv3, please. 4 | # -------------------------------------------------------- 5 | # Script for creating ACL file for each LuCI APP 6 | 7 | error_font="\033[31m[Error]$\033[0m " 8 | success_font="\033[32m[Success]\033[0m " 9 | info_font="\033[36m[Info]\033[0m " 10 | 11 | function echo_green_bg(){ 12 | echo -e "\033[42;37m$1\033[0m" 13 | } 14 | 15 | function echo_yellow_bg(){ 16 | echo -e "\033[44;37m$1\033[0m" 17 | } 18 | 19 | function echo_red_bg(){ 20 | echo -e "\033[41;37m$1\033[0m" 21 | } 22 | 23 | function clean_outdated_files(){ 24 | rm -f "create_acl_for_luci.err" "create_acl_for_luci.warn" "create_acl_for_luci.ok" 25 | } 26 | 27 | function check_if_acl_exist(){ 28 | ls "$1"/root/usr/share/rpcd/acl.d/*.json >/dev/null 2>&1 && return 0 || return 1 29 | } 30 | 31 | function check_config_files(){ 32 | [ "$(ls "$1"/root/etc/config/* 2>/dev/null | wc -l)" -ne "1" ] && return 0 || return 1 33 | } 34 | 35 | function get_config_name(){ 36 | ls "$1"/root/etc/config/* 2>/dev/null | awk -F '/' '{print $NF}' 37 | } 38 | 39 | function create_acl_file(){ 40 | mkdir -p "$1" 41 | echo -e "{ 42 | \"$2\": { 43 | \"description\": \"Grant UCI access for $2\", 44 | \"read\": { 45 | \"uci\": [ \"$3\" ] 46 | }, 47 | \"write\": { 48 | \"uci\": [ \"$3\" ] 49 | } 50 | } 51 | }" > "$1/$2.json" 52 | } 53 | 54 | function auto_create_acl(){ 55 | luci_app_list="$(find package -maxdepth 3 | grep -Eo "package/.+/luci-app-[a-zA-Z0-9_-]+" | sort -s)" 56 | echo $(pwd) 57 | echo $luci_app_list 58 | [ "$(echo -e "${luci_app_list}" | wc -l)" -gt "0" ] && for i in ${luci_app_list} 59 | do 60 | if check_if_acl_exist "$i"; then 61 | echo_yellow_bg "$i: has ACL file already, skipping..." | tee -a create_acl_for_luci.warn 62 | elif check_config_files "$i"; then 63 | echo_red_bg "$i: has no/multi config file(s), skipping..." | tee -a create_acl_for_luci.err 64 | else 65 | create_acl_file "$i/root/usr/share/rpcd/acl.d" "${i##*/}" "$(get_config_name "$i")" 66 | echo_green_bg "$i: ACL file has been generated." | tee -a create_acl_for_luci.ok 67 | fi 68 | done 69 | } 70 | 71 | while getopts "achml:n:p:" input_arg 72 | do 73 | case $input_arg in 74 | a) 75 | clean_outdated_files 76 | auto_create_acl 77 | exit 78 | ;; 79 | m) 80 | manual_mode=1 81 | ;; 82 | p) 83 | acl_path="$OPTARG" 84 | ;; 85 | l) 86 | luci_name="$OPTARG" 87 | ;; 88 | n) 89 | conf_name="$OPTARG" 90 | ;; 91 | c) 92 | clean_outdated_files 93 | exit 94 | ;; 95 | h|?|*) 96 | echo -e "${info_font}Usage: $0 [-a|-m (-p ) -l -n |-c]" 97 | exit 2 98 | ;; 99 | esac 100 | done 101 | 102 | [ "$?" -ne "0" ] && exit 103 | 104 | if [ "*${manual_mode}*" == "*1*" ]; then 105 | acl_path="${acl_path:-root/usr/share/rpcd/acl.d}" 106 | if create_acl_file "${acl_path}" "${luci_name}" "${conf_name}"; then 107 | echo -e "${success_font}Output file: $(ls "${acl_path}/${luci_name}.json")" 108 | echo_green_bg "$(cat "${acl_path}/${luci_name}.json")" 109 | echo_green_bg "${luci_name}: ACL file has been generated." >> "create_acl_for_luci.ok" 110 | [ -e "create_acl_for_luci.err" ] && sed -i "/${luci_name}/d" "create_acl_for_luci.err" 111 | else 112 | echo -e "${error_font}Failed to create file ${acl_path}/${luci_name}.json" 113 | echo_red_bg "${luci_name}: Failed to create ACL file." >> "create_acl_for_luci.err" 114 | fi 115 | else 116 | echo -e "${info_font}Usage: $0 [-a|-m -p -l -n |-c]" 117 | exit 2 118 | fi -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/003-Revert-Makefile-Only-build-dtc-if-needed.patch: -------------------------------------------------------------------------------- 1 | --- a/Makefile 2 | +++ b/Makefile 3 | @@ -413,13 +413,7 @@ PERL = perl 4 | PYTHON ?= python 5 | PYTHON2 = python2 6 | PYTHON3 ?= python3 7 | - 8 | -# The devicetree compiler and pylibfdt are automatically built unless DTC is 9 | -# provided. If DTC is provided, it is assumed the pylibfdt is available too. 10 | -DTC_INTREE := $(objtree)/scripts/dtc/dtc 11 | -DTC ?= $(DTC_INTREE) 12 | -DTC_MIN_VERSION := 010406 13 | - 14 | +DTC ?= $(objtree)/scripts/dtc/dtc 15 | CHECK = sparse 16 | 17 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ 18 | @@ -2060,29 +2054,9 @@ endif 19 | 20 | endif 21 | 22 | -# Check dtc and pylibfdt, if DTC is provided, else build them 23 | PHONY += scripts_dtc 24 | scripts_dtc: scripts_basic 25 | - $(Q)if test "$(DTC)" = "$(DTC_INTREE)"; then \ 26 | - $(MAKE) $(build)=scripts/dtc; \ 27 | - else \ 28 | - if ! $(DTC) -v >/dev/null; then \ 29 | - echo '*** Failed to check dtc version: $(DTC)'; \ 30 | - false; \ 31 | - else \ 32 | - if test "$(call dtc-version)" -lt $(DTC_MIN_VERSION); then \ 33 | - echo '*** Your dtc is too old, please upgrade to dtc $(DTC_MIN_VERSION) or newer'; \ 34 | - false; \ 35 | - else \ 36 | - if [ -n "$(CONFIG_PYLIBFDT)" ]; then \ 37 | - if ! echo "import libfdt" | $(PYTHON3) 2>/dev/null; then \ 38 | - echo '*** pylibfdt does not seem to be available with $(PYTHON3)'; \ 39 | - false; \ 40 | - fi; \ 41 | - fi; \ 42 | - fi; \ 43 | - fi; \ 44 | - fi 45 | + $(Q)$(MAKE) $(build)=scripts/dtc 46 | 47 | # --------------------------------------------------------------------------- 48 | quiet_cmd_cpp_lds = LDS $@ 49 | --- a/doc/build/gcc.rst 50 | +++ b/doc/build/gcc.rst 51 | @@ -131,27 +131,6 @@ Further important build parameters are 52 | * O= - generate all output files in directory , including .config 53 | * V=1 - verbose build 54 | 55 | -Devicetree compiler 56 | -~~~~~~~~~~~~~~~~~~~ 57 | - 58 | -Boards that use `CONFIG_OF_CONTROL` (i.e. almost all of them) need the 59 | -devicetree compiler (dtc). Those with `CONFIG_PYLIBFDT` need pylibfdt, a Python 60 | -library for accessing devicetree data. Suitable versions of these are included 61 | -in the U-Boot tree in `scripts/dtc` and built automatically as needed. 62 | - 63 | -To use the system versions of these, use the DTC parameter, for example 64 | - 65 | -.. code-block:: bash 66 | - 67 | - DTC=/usr/bin/dtc make 68 | - 69 | -In this case, dtc and pylibfdt are not built. The build checks that the version 70 | -of dtc is new enough. It also makes sure that pylibfdt is present, if needed 71 | -(see `scripts_dtc` in the Makefile). 72 | - 73 | -Note that the :doc:`tools` are always built with the included version of libfdt 74 | -so it is not possible to build U-Boot tools with a system libfdt, at present. 75 | - 76 | Other build targets 77 | ~~~~~~~~~~~~~~~~~~~ 78 | 79 | --- a/dts/Kconfig 80 | +++ b/dts/Kconfig 81 | @@ -5,6 +5,9 @@ 82 | config SUPPORT_OF_CONTROL 83 | bool 84 | 85 | +config DTC 86 | + bool 87 | + 88 | config PYLIBFDT 89 | bool 90 | 91 | @@ -21,6 +24,7 @@ menu "Device Tree Control" 92 | 93 | config OF_CONTROL 94 | bool "Run-time configuration via Device Tree" 95 | + select DTC 96 | select OF_LIBFDT if !OF_PLATDATA 97 | select OF_REAL if !OF_PLATDATA 98 | help 99 | --- a/scripts/Makefile 100 | +++ b/scripts/Makefile 101 | @@ -9,4 +9,6 @@ hostprogs-$(CONFIG_BUILD_BIN2C) += bin2 102 | always := $(hostprogs-y) 103 | 104 | # Let clean descend into subdirs 105 | -subdir- += basic kconfig dtc 106 | +subdir- += basic kconfig 107 | +subdir-$(CONFIG_DTC) += dtc 108 | + 109 | --- a/scripts/dtc-version.sh 110 | +++ b/scripts/dtc-version.sh 111 | @@ -10,16 +10,11 @@ 112 | dtc="$*" 113 | 114 | if [ ${#dtc} -eq 0 ]; then 115 | - echo "Error: No dtc command specified" 116 | + echo "Error: No dtc command specified." 117 | printf "Usage:\n\t$0 \n" 118 | exit 1 119 | fi 120 | 121 | -if ! which $dtc >/dev/null ; then 122 | - echo "Error: Cannot find dtc: $dtc" 123 | - exit 1 124 | -fi 125 | - 126 | MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1) 127 | MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2) 128 | PATCH=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 3 | cut -d - -f 1) 129 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/003-Revert-Makefile-Only-build-dtc-if-needed.patch: -------------------------------------------------------------------------------- 1 | --- a/Makefile 2 | +++ b/Makefile 3 | @@ -413,13 +413,7 @@ PERL = perl 4 | PYTHON ?= python 5 | PYTHON2 = python2 6 | PYTHON3 ?= python3 7 | - 8 | -# The devicetree compiler and pylibfdt are automatically built unless DTC is 9 | -# provided. If DTC is provided, it is assumed the pylibfdt is available too. 10 | -DTC_INTREE := $(objtree)/scripts/dtc/dtc 11 | -DTC ?= $(DTC_INTREE) 12 | -DTC_MIN_VERSION := 010406 13 | - 14 | +DTC ?= $(objtree)/scripts/dtc/dtc 15 | CHECK = sparse 16 | 17 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ 18 | @@ -2060,29 +2054,9 @@ endif 19 | 20 | endif 21 | 22 | -# Check dtc and pylibfdt, if DTC is provided, else build them 23 | PHONY += scripts_dtc 24 | scripts_dtc: scripts_basic 25 | - $(Q)if test "$(DTC)" = "$(DTC_INTREE)"; then \ 26 | - $(MAKE) $(build)=scripts/dtc; \ 27 | - else \ 28 | - if ! $(DTC) -v >/dev/null; then \ 29 | - echo '*** Failed to check dtc version: $(DTC)'; \ 30 | - false; \ 31 | - else \ 32 | - if test "$(call dtc-version)" -lt $(DTC_MIN_VERSION); then \ 33 | - echo '*** Your dtc is too old, please upgrade to dtc $(DTC_MIN_VERSION) or newer'; \ 34 | - false; \ 35 | - else \ 36 | - if [ -n "$(CONFIG_PYLIBFDT)" ]; then \ 37 | - if ! echo "import libfdt" | $(PYTHON3) 2>/dev/null; then \ 38 | - echo '*** pylibfdt does not seem to be available with $(PYTHON3)'; \ 39 | - false; \ 40 | - fi; \ 41 | - fi; \ 42 | - fi; \ 43 | - fi; \ 44 | - fi 45 | + $(Q)$(MAKE) $(build)=scripts/dtc 46 | 47 | # --------------------------------------------------------------------------- 48 | quiet_cmd_cpp_lds = LDS $@ 49 | --- a/doc/build/gcc.rst 50 | +++ b/doc/build/gcc.rst 51 | @@ -131,27 +131,6 @@ Further important build parameters are 52 | * O= - generate all output files in directory , including .config 53 | * V=1 - verbose build 54 | 55 | -Devicetree compiler 56 | -~~~~~~~~~~~~~~~~~~~ 57 | - 58 | -Boards that use `CONFIG_OF_CONTROL` (i.e. almost all of them) need the 59 | -devicetree compiler (dtc). Those with `CONFIG_PYLIBFDT` need pylibfdt, a Python 60 | -library for accessing devicetree data. Suitable versions of these are included 61 | -in the U-Boot tree in `scripts/dtc` and built automatically as needed. 62 | - 63 | -To use the system versions of these, use the DTC parameter, for example 64 | - 65 | -.. code-block:: bash 66 | - 67 | - DTC=/usr/bin/dtc make 68 | - 69 | -In this case, dtc and pylibfdt are not built. The build checks that the version 70 | -of dtc is new enough. It also makes sure that pylibfdt is present, if needed 71 | -(see `scripts_dtc` in the Makefile). 72 | - 73 | -Note that the :doc:`tools` are always built with the included version of libfdt 74 | -so it is not possible to build U-Boot tools with a system libfdt, at present. 75 | - 76 | Other build targets 77 | ~~~~~~~~~~~~~~~~~~~ 78 | 79 | --- a/dts/Kconfig 80 | +++ b/dts/Kconfig 81 | @@ -5,6 +5,9 @@ 82 | config SUPPORT_OF_CONTROL 83 | bool 84 | 85 | +config DTC 86 | + bool 87 | + 88 | config PYLIBFDT 89 | bool 90 | 91 | @@ -21,6 +24,7 @@ menu "Device Tree Control" 92 | 93 | config OF_CONTROL 94 | bool "Run-time configuration via Device Tree" 95 | + select DTC 96 | select OF_LIBFDT if !OF_PLATDATA 97 | select OF_REAL if !OF_PLATDATA 98 | help 99 | --- a/scripts/Makefile 100 | +++ b/scripts/Makefile 101 | @@ -9,4 +9,6 @@ hostprogs-$(CONFIG_BUILD_BIN2C) += bin2 102 | always := $(hostprogs-y) 103 | 104 | # Let clean descend into subdirs 105 | -subdir- += basic kconfig dtc 106 | +subdir- += basic kconfig 107 | +subdir-$(CONFIG_DTC) += dtc 108 | + 109 | --- a/scripts/dtc-version.sh 110 | +++ b/scripts/dtc-version.sh 111 | @@ -10,16 +10,11 @@ 112 | dtc="$*" 113 | 114 | if [ ${#dtc} -eq 0 ]; then 115 | - echo "Error: No dtc command specified" 116 | + echo "Error: No dtc command specified." 117 | printf "Usage:\n\t$0 \n" 118 | exit 1 119 | fi 120 | 121 | -if ! which $dtc >/dev/null ; then 122 | - echo "Error: Cannot find dtc: $dtc" 123 | - exit 1 124 | -fi 125 | - 126 | MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1) 127 | MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2) 128 | PATCH=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 3 | cut -d - -f 1) 129 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/201-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/arm/dts/Makefile 2 | +++ b/arch/arm/dts/Makefile 3 | @@ -124,6 +124,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \ 4 | 5 | dtb-$(CONFIG_ROCKCHIP_RK3328) += \ 6 | rk3328-evb.dtb \ 7 | + rk3328-nanopi-r2c.dtb \ 8 | rk3328-nanopi-r2s.dtb \ 9 | rk3328-orangepi-r1-plus.dtb \ 10 | rk3328-roc-cc.dtb \ 11 | --- /dev/null 12 | +++ b/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi 13 | @@ -0,0 +1,7 @@ 14 | +// SPDX-License-Identifier: GPL-2.0+ 15 | +/* 16 | + * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd 17 | + * (C) Copyright 2021 Tianling Shen 18 | + */ 19 | + 20 | +#include "rk3328-nanopi-r2s-u-boot.dtsi" 21 | --- /dev/null 22 | +++ b/arch/arm/dts/rk3328-nanopi-r2c.dts 23 | @@ -0,0 +1,47 @@ 24 | +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 25 | +/* 26 | + * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd. 27 | + * (http://www.friendlyarm.com) 28 | + * 29 | + * Copyright (c) 2021 Tianling Shen 30 | + */ 31 | + 32 | +/dts-v1/; 33 | + 34 | +#include "rk3328-nanopi-r2s.dts" 35 | + 36 | +/ { 37 | + model = "FriendlyElec NanoPi R2C"; 38 | + compatible = "friendlyarm,nanopi-r2c", "rockchip,rk3328"; 39 | +}; 40 | + 41 | +&gmac2io { 42 | + phy-handle = <&yt8521s>; 43 | + 44 | + mdio { 45 | + /delete-node/ ethernet-phy@1; 46 | + 47 | + yt8521s: ethernet-phy@3 { 48 | + compatible = "ethernet-phy-id0000.011a", 49 | + "ethernet-phy-ieee802.3-c22"; 50 | + reg = <3>; 51 | + pinctrl-0 = <ð_phy_reset_pin>; 52 | + pinctrl-names = "default"; 53 | + reset-assert-us = <10000>; 54 | + reset-deassert-us = <50000>; 55 | + reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; 56 | + }; 57 | + }; 58 | +}; 59 | + 60 | +&lan_led { 61 | + label = "nanopi-r2c:green:lan"; 62 | +}; 63 | + 64 | +&sys_led { 65 | + label = "nanopi-r2c:red:sys"; 66 | +}; 67 | + 68 | +&wan_led { 69 | + label = "nanopi-r2c:green:wan"; 70 | +}; 71 | --- /dev/null 72 | +++ b/configs/nanopi-r2c-rk3328_defconfig 73 | @@ -0,0 +1,103 @@ 74 | +CONFIG_ARM=y 75 | +CONFIG_SKIP_LOWLEVEL_INIT=y 76 | +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y 77 | +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 78 | +CONFIG_ARCH_ROCKCHIP=y 79 | +CONFIG_COUNTER_FREQUENCY=24000000 80 | +CONFIG_SYS_TEXT_BASE=0x00200000 81 | +CONFIG_SPL_GPIO_SUPPORT=y 82 | +CONFIG_NR_DRAM_BANKS=1 83 | +CONFIG_ENV_OFFSET=0x3F8000 84 | +CONFIG_DEFAULT_DEVICE_TREE="rk3328-nanopi-r2c" 85 | +CONFIG_ROCKCHIP_RK3328=y 86 | +CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y 87 | +CONFIG_TPL_LIBCOMMON_SUPPORT=y 88 | +CONFIG_TPL_LIBGENERIC_SUPPORT=y 89 | +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y 90 | +CONFIG_SPL_STACK_R_ADDR=0x600000 91 | +CONFIG_DEBUG_UART_BASE=0xFF130000 92 | +CONFIG_DEBUG_UART_CLOCK=24000000 93 | +CONFIG_DEBUG_UART=y 94 | +CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 95 | +CONFIG_SYS_LOAD_ADDR=0x800800 96 | +# CONFIG_ANDROID_BOOT_IMAGE is not set 97 | +CONFIG_FIT=y 98 | +CONFIG_FIT_VERBOSE=y 99 | +CONFIG_SPL_LOAD_FIT=y 100 | +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-nanopi-r2c.dtb" 101 | +# CONFIG_DISPLAY_CPUINFO is not set 102 | +CONFIG_DISPLAY_BOARDINFO_LATE=y 103 | +CONFIG_MISC_INIT_R=y 104 | +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set 105 | +CONFIG_TPL_SYS_MALLOC_SIMPLE=y 106 | +CONFIG_SPL_STACK_R=y 107 | +CONFIG_SPL_I2C_SUPPORT=y 108 | +CONFIG_SPL_POWER_SUPPORT=y 109 | +CONFIG_SPL_ATF=y 110 | +CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y 111 | +CONFIG_CMD_BOOTZ=y 112 | +CONFIG_CMD_GPT=y 113 | +CONFIG_CMD_MMC=y 114 | +CONFIG_CMD_USB=y 115 | +# CONFIG_CMD_SETEXPR is not set 116 | +CONFIG_CMD_TIME=y 117 | +CONFIG_SPL_OF_CONTROL=y 118 | +CONFIG_TPL_OF_CONTROL=y 119 | +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" 120 | +CONFIG_TPL_OF_PLATDATA=y 121 | +CONFIG_ENV_IS_IN_MMC=y 122 | +CONFIG_SYS_RELOC_GD_ENV_ADDR=y 123 | +CONFIG_NET_RANDOM_ETHADDR=y 124 | +CONFIG_TPL_DM=y 125 | +CONFIG_REGMAP=y 126 | +CONFIG_SPL_REGMAP=y 127 | +CONFIG_TPL_REGMAP=y 128 | +CONFIG_SYSCON=y 129 | +CONFIG_SPL_SYSCON=y 130 | +CONFIG_TPL_SYSCON=y 131 | +CONFIG_CLK=y 132 | +CONFIG_SPL_CLK=y 133 | +CONFIG_FASTBOOT_BUF_ADDR=0x800800 134 | +CONFIG_FASTBOOT_CMD_OEM_FORMAT=y 135 | +CONFIG_ROCKCHIP_GPIO=y 136 | +CONFIG_SYS_I2C_ROCKCHIP=y 137 | +CONFIG_MMC_DW=y 138 | +CONFIG_MMC_DW_ROCKCHIP=y 139 | +CONFIG_SF_DEFAULT_SPEED=20000000 140 | +CONFIG_DM_ETH=y 141 | +CONFIG_ETH_DESIGNWARE=y 142 | +CONFIG_GMAC_ROCKCHIP=y 143 | +CONFIG_PINCTRL=y 144 | +CONFIG_SPL_PINCTRL=y 145 | +CONFIG_DM_PMIC=y 146 | +CONFIG_PMIC_RK8XX=y 147 | +CONFIG_SPL_DM_REGULATOR=y 148 | +CONFIG_REGULATOR_PWM=y 149 | +CONFIG_DM_REGULATOR_FIXED=y 150 | +CONFIG_SPL_DM_REGULATOR_FIXED=y 151 | +CONFIG_REGULATOR_RK8XX=y 152 | +CONFIG_PWM_ROCKCHIP=y 153 | +CONFIG_RAM=y 154 | +CONFIG_SPL_RAM=y 155 | +CONFIG_TPL_RAM=y 156 | +CONFIG_DM_RESET=y 157 | +CONFIG_BAUDRATE=1500000 158 | +CONFIG_DEBUG_UART_SHIFT=2 159 | +CONFIG_SYSINFO=y 160 | +CONFIG_SYSRESET=y 161 | +# CONFIG_TPL_SYSRESET is not set 162 | +CONFIG_USB=y 163 | +CONFIG_USB_XHCI_HCD=y 164 | +CONFIG_USB_XHCI_DWC3=y 165 | +CONFIG_USB_EHCI_HCD=y 166 | +CONFIG_USB_EHCI_GENERIC=y 167 | +CONFIG_USB_OHCI_HCD=y 168 | +CONFIG_USB_OHCI_GENERIC=y 169 | +CONFIG_USB_DWC2=y 170 | +CONFIG_USB_DWC3=y 171 | +# CONFIG_USB_DWC3_GADGET is not set 172 | +CONFIG_USB_GADGET=y 173 | +CONFIG_USB_GADGET_DWC2_OTG=y 174 | +CONFIG_SPL_TINY_MEMSET=y 175 | +CONFIG_TPL_TINY_MEMSET=y 176 | +CONFIG_ERRNO_STR=y 177 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/201-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/arm/dts/Makefile 2 | +++ b/arch/arm/dts/Makefile 3 | @@ -124,6 +124,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \ 4 | 5 | dtb-$(CONFIG_ROCKCHIP_RK3328) += \ 6 | rk3328-evb.dtb \ 7 | + rk3328-nanopi-r2c.dtb \ 8 | rk3328-nanopi-r2s.dtb \ 9 | rk3328-orangepi-r1-plus.dtb \ 10 | rk3328-roc-cc.dtb \ 11 | --- /dev/null 12 | +++ b/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi 13 | @@ -0,0 +1,7 @@ 14 | +// SPDX-License-Identifier: GPL-2.0+ 15 | +/* 16 | + * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd 17 | + * (C) Copyright 2021 Tianling Shen 18 | + */ 19 | + 20 | +#include "rk3328-nanopi-r2s-u-boot.dtsi" 21 | --- /dev/null 22 | +++ b/arch/arm/dts/rk3328-nanopi-r2c.dts 23 | @@ -0,0 +1,47 @@ 24 | +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 25 | +/* 26 | + * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd. 27 | + * (http://www.friendlyarm.com) 28 | + * 29 | + * Copyright (c) 2021 Tianling Shen 30 | + */ 31 | + 32 | +/dts-v1/; 33 | + 34 | +#include "rk3328-nanopi-r2s.dts" 35 | + 36 | +/ { 37 | + model = "FriendlyElec NanoPi R2C"; 38 | + compatible = "friendlyarm,nanopi-r2c", "rockchip,rk3328"; 39 | +}; 40 | + 41 | +&gmac2io { 42 | + phy-handle = <&yt8521s>; 43 | + 44 | + mdio { 45 | + /delete-node/ ethernet-phy@1; 46 | + 47 | + yt8521s: ethernet-phy@3 { 48 | + compatible = "ethernet-phy-id0000.011a", 49 | + "ethernet-phy-ieee802.3-c22"; 50 | + reg = <3>; 51 | + pinctrl-0 = <ð_phy_reset_pin>; 52 | + pinctrl-names = "default"; 53 | + reset-assert-us = <10000>; 54 | + reset-deassert-us = <50000>; 55 | + reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; 56 | + }; 57 | + }; 58 | +}; 59 | + 60 | +&lan_led { 61 | + label = "nanopi-r2c:green:lan"; 62 | +}; 63 | + 64 | +&sys_led { 65 | + label = "nanopi-r2c:red:sys"; 66 | +}; 67 | + 68 | +&wan_led { 69 | + label = "nanopi-r2c:green:wan"; 70 | +}; 71 | --- /dev/null 72 | +++ b/configs/nanopi-r2c-rk3328_defconfig 73 | @@ -0,0 +1,103 @@ 74 | +CONFIG_ARM=y 75 | +CONFIG_SKIP_LOWLEVEL_INIT=y 76 | +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y 77 | +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 78 | +CONFIG_ARCH_ROCKCHIP=y 79 | +CONFIG_COUNTER_FREQUENCY=24000000 80 | +CONFIG_SYS_TEXT_BASE=0x00200000 81 | +CONFIG_SPL_GPIO_SUPPORT=y 82 | +CONFIG_NR_DRAM_BANKS=1 83 | +CONFIG_ENV_OFFSET=0x3F8000 84 | +CONFIG_DEFAULT_DEVICE_TREE="rk3328-nanopi-r2c" 85 | +CONFIG_ROCKCHIP_RK3328=y 86 | +CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y 87 | +CONFIG_TPL_LIBCOMMON_SUPPORT=y 88 | +CONFIG_TPL_LIBGENERIC_SUPPORT=y 89 | +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y 90 | +CONFIG_SPL_STACK_R_ADDR=0x600000 91 | +CONFIG_DEBUG_UART_BASE=0xFF130000 92 | +CONFIG_DEBUG_UART_CLOCK=24000000 93 | +CONFIG_DEBUG_UART=y 94 | +CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 95 | +CONFIG_SYS_LOAD_ADDR=0x800800 96 | +# CONFIG_ANDROID_BOOT_IMAGE is not set 97 | +CONFIG_FIT=y 98 | +CONFIG_FIT_VERBOSE=y 99 | +CONFIG_SPL_LOAD_FIT=y 100 | +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-nanopi-r2c.dtb" 101 | +# CONFIG_DISPLAY_CPUINFO is not set 102 | +CONFIG_DISPLAY_BOARDINFO_LATE=y 103 | +CONFIG_MISC_INIT_R=y 104 | +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set 105 | +CONFIG_TPL_SYS_MALLOC_SIMPLE=y 106 | +CONFIG_SPL_STACK_R=y 107 | +CONFIG_SPL_I2C_SUPPORT=y 108 | +CONFIG_SPL_POWER_SUPPORT=y 109 | +CONFIG_SPL_ATF=y 110 | +CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y 111 | +CONFIG_CMD_BOOTZ=y 112 | +CONFIG_CMD_GPT=y 113 | +CONFIG_CMD_MMC=y 114 | +CONFIG_CMD_USB=y 115 | +# CONFIG_CMD_SETEXPR is not set 116 | +CONFIG_CMD_TIME=y 117 | +CONFIG_SPL_OF_CONTROL=y 118 | +CONFIG_TPL_OF_CONTROL=y 119 | +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" 120 | +CONFIG_TPL_OF_PLATDATA=y 121 | +CONFIG_ENV_IS_IN_MMC=y 122 | +CONFIG_SYS_RELOC_GD_ENV_ADDR=y 123 | +CONFIG_NET_RANDOM_ETHADDR=y 124 | +CONFIG_TPL_DM=y 125 | +CONFIG_REGMAP=y 126 | +CONFIG_SPL_REGMAP=y 127 | +CONFIG_TPL_REGMAP=y 128 | +CONFIG_SYSCON=y 129 | +CONFIG_SPL_SYSCON=y 130 | +CONFIG_TPL_SYSCON=y 131 | +CONFIG_CLK=y 132 | +CONFIG_SPL_CLK=y 133 | +CONFIG_FASTBOOT_BUF_ADDR=0x800800 134 | +CONFIG_FASTBOOT_CMD_OEM_FORMAT=y 135 | +CONFIG_ROCKCHIP_GPIO=y 136 | +CONFIG_SYS_I2C_ROCKCHIP=y 137 | +CONFIG_MMC_DW=y 138 | +CONFIG_MMC_DW_ROCKCHIP=y 139 | +CONFIG_SF_DEFAULT_SPEED=20000000 140 | +CONFIG_DM_ETH=y 141 | +CONFIG_ETH_DESIGNWARE=y 142 | +CONFIG_GMAC_ROCKCHIP=y 143 | +CONFIG_PINCTRL=y 144 | +CONFIG_SPL_PINCTRL=y 145 | +CONFIG_DM_PMIC=y 146 | +CONFIG_PMIC_RK8XX=y 147 | +CONFIG_SPL_DM_REGULATOR=y 148 | +CONFIG_REGULATOR_PWM=y 149 | +CONFIG_DM_REGULATOR_FIXED=y 150 | +CONFIG_SPL_DM_REGULATOR_FIXED=y 151 | +CONFIG_REGULATOR_RK8XX=y 152 | +CONFIG_PWM_ROCKCHIP=y 153 | +CONFIG_RAM=y 154 | +CONFIG_SPL_RAM=y 155 | +CONFIG_TPL_RAM=y 156 | +CONFIG_DM_RESET=y 157 | +CONFIG_BAUDRATE=1500000 158 | +CONFIG_DEBUG_UART_SHIFT=2 159 | +CONFIG_SYSINFO=y 160 | +CONFIG_SYSRESET=y 161 | +# CONFIG_TPL_SYSRESET is not set 162 | +CONFIG_USB=y 163 | +CONFIG_USB_XHCI_HCD=y 164 | +CONFIG_USB_XHCI_DWC3=y 165 | +CONFIG_USB_EHCI_HCD=y 166 | +CONFIG_USB_EHCI_GENERIC=y 167 | +CONFIG_USB_OHCI_HCD=y 168 | +CONFIG_USB_OHCI_GENERIC=y 169 | +CONFIG_USB_DWC2=y 170 | +CONFIG_USB_DWC3=y 171 | +# CONFIG_USB_DWC3_GADGET is not set 172 | +CONFIG_USB_GADGET=y 173 | +CONFIG_USB_GADGET_DWC2_OTG=y 174 | +CONFIG_SPL_TINY_MEMSET=y 175 | +CONFIG_TPL_TINY_MEMSET=y 176 | +CONFIG_ERRNO_STR=y 177 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/uboot-rockchip/patches/309-ram-rk3399-Add-support-for-multiple-DDR-types-v2.patch: -------------------------------------------------------------------------------- 1 | From c82588ad68829f74ed1f411b58999ab11e849634 Mon Sep 17 00:00:00 2001 2 | From: Jensen Huang 3 | Date: Fri, 26 Aug 2022 13:39:20 +0800 4 | Subject: [PATCH 1/2] ram: rk3399: Add support for multiple DDR types (v2) 5 | 6 | Move rockchip,sdram-params to named subnode to include 7 | multiple sdram parameters, and then read the parameters 8 | (by subnode name, first subnode or current node) before 9 | rk3399_dmc_init(). 10 | 11 | Signed-off-by: Jensen Huang 12 | --- 13 | arch/arm/dts/rk3399-sdram-ddr3-1333.dtsi | 6 ++- 14 | arch/arm/dts/rk3399-sdram-ddr3-1600.dtsi | 5 +- 15 | arch/arm/dts/rk3399-sdram-ddr3-1866.dtsi | 6 ++- 16 | .../arm/dts/rk3399-sdram-lpddr3-2GB-1600.dtsi | 3 ++ 17 | .../arm/dts/rk3399-sdram-lpddr3-4GB-1600.dtsi | 3 ++ 18 | .../rk3399-sdram-lpddr3-samsung-4GB-1866.dtsi | 3 ++ 19 | arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi | 3 ++ 20 | drivers/ram/rockchip/sdram_common.c | 2 + 21 | drivers/ram/rockchip/sdram_rk3399.c | 49 +++++++++++++++---- 22 | 9 files changed, 66 insertions(+), 14 deletions(-) 23 | 24 | --- a/arch/arm/dts/rk3399-sdram-ddr3-1333.dtsi 25 | +++ b/arch/arm/dts/rk3399-sdram-ddr3-1333.dtsi 26 | @@ -4,7 +4,9 @@ 27 | */ 28 | 29 | &dmc { 30 | - rockchip,sdram-params = < 31 | + ddr3-1333 { 32 | + u-boot,dm-pre-reloc; 33 | + rockchip,sdram-params = < 34 | 0x1 35 | 0xa 36 | 0x3 37 | @@ -1536,5 +1538,5 @@ 38 | 0x01010000 39 | 0x00000000 40 | >; 41 | + }; 42 | }; 43 | - 44 | --- a/arch/arm/dts/rk3399-sdram-ddr3-1600.dtsi 45 | +++ b/arch/arm/dts/rk3399-sdram-ddr3-1600.dtsi 46 | @@ -4,7 +4,9 @@ 47 | */ 48 | 49 | &dmc { 50 | - rockchip,sdram-params = < 51 | + ddr3-1600 { 52 | + u-boot,dm-pre-reloc; 53 | + rockchip,sdram-params = < 54 | 0x1 55 | 0xa 56 | 0x3 57 | @@ -1536,4 +1538,5 @@ 58 | 0x01010000 59 | 0x00000000 60 | >; 61 | + }; 62 | }; 63 | --- a/arch/arm/dts/rk3399-sdram-ddr3-1866.dtsi 64 | +++ b/arch/arm/dts/rk3399-sdram-ddr3-1866.dtsi 65 | @@ -4,7 +4,9 @@ 66 | */ 67 | 68 | &dmc { 69 | - rockchip,sdram-params = < 70 | + ddr3-1866 { 71 | + u-boot,dm-pre-reloc; 72 | + rockchip,sdram-params = < 73 | 0x1 74 | 0xa 75 | 0x3 76 | @@ -1536,5 +1538,5 @@ 77 | 0x01010000 78 | 0x00000000 79 | >; 80 | + }; 81 | }; 82 | - 83 | --- a/arch/arm/dts/rk3399-sdram-lpddr3-2GB-1600.dtsi 84 | +++ b/arch/arm/dts/rk3399-sdram-lpddr3-2GB-1600.dtsi 85 | @@ -5,6 +5,8 @@ 86 | */ 87 | 88 | &dmc { 89 | + lpddr3-2GB-1600 { 90 | + u-boot,dm-pre-reloc; 91 | rockchip,sdram-params = < 92 | 0x1 93 | 0xa 94 | @@ -1537,4 +1539,5 @@ 95 | 0x01010000 96 | 0x00000000 97 | >; 98 | + }; 99 | }; 100 | --- a/arch/arm/dts/rk3399-sdram-lpddr3-4GB-1600.dtsi 101 | +++ b/arch/arm/dts/rk3399-sdram-lpddr3-4GB-1600.dtsi 102 | @@ -4,6 +4,8 @@ 103 | */ 104 | 105 | &dmc { 106 | + lpddr3-4GB-1600 { 107 | + u-boot,dm-pre-reloc; 108 | rockchip,sdram-params = < 109 | 0x2 110 | 0xa 111 | @@ -1536,4 +1538,5 @@ 112 | 0x01010000 113 | 0x00000000 114 | >; 115 | + }; 116 | }; 117 | --- a/arch/arm/dts/rk3399-sdram-lpddr3-samsung-4GB-1866.dtsi 118 | +++ b/arch/arm/dts/rk3399-sdram-lpddr3-samsung-4GB-1866.dtsi 119 | @@ -4,6 +4,8 @@ 120 | */ 121 | 122 | &dmc { 123 | + lpddr3-samsung-4GB-1866 { 124 | + u-boot,dm-pre-reloc; 125 | rockchip,sdram-params = < 126 | 0x2 127 | 0xa 128 | @@ -1543,4 +1545,5 @@ 129 | 0x01010000 /* DENALI_PHY_957_DATA */ 130 | 0x00000000 /* DENALI_PHY_958_DATA */ 131 | >; 132 | + }; 133 | }; 134 | --- a/arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi 135 | +++ b/arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi 136 | @@ -6,6 +6,8 @@ 137 | */ 138 | 139 | &dmc { 140 | + lpddr4-100 { 141 | + u-boot,dm-pre-reloc; 142 | rockchip,sdram-params = < 143 | 0x2 144 | 0xa 145 | @@ -1538,4 +1540,5 @@ 146 | 0x01010000 147 | 0x00000000 148 | >; 149 | + }; 150 | }; 151 | --- a/drivers/ram/rockchip/sdram_common.c 152 | +++ b/drivers/ram/rockchip/sdram_common.c 153 | @@ -396,6 +396,8 @@ int sdram_detect_cs1_row(struct sdram_ca 154 | 155 | if (cap_info->rank == 2) { 156 | cs0_cap = sdram_get_cs_cap(cap_info, 0, dram_type); 157 | + if (cap_info->row_3_4) 158 | + cs0_cap = cs0_cap * 3 / 4; 159 | 160 | if (dram_type == DDR4) { 161 | if (cap_info->dbw == 0) 162 | --- a/drivers/ram/rockchip/sdram_rk3399.c 163 | +++ b/drivers/ram/rockchip/sdram_rk3399.c 164 | @@ -1625,7 +1625,6 @@ static void set_ddr_stride(struct rk3399 165 | rk_clrsetreg(&pmusgrf->soc_con4, 0x1f << 10, stride << 10); 166 | } 167 | 168 | -#if !defined(CONFIG_RAM_RK3399_LPDDR4) 169 | static int data_training_first(struct dram_info *dram, u32 channel, u8 rank, 170 | struct rk3399_sdram_params *params) 171 | { 172 | @@ -1715,8 +1714,8 @@ void modify_param(const struct chan_info 173 | clrsetbits_le32(&denali_pi_params[76], 0x1 << 24, 0x1 << 24); 174 | clrsetbits_le32(&denali_pi_params[77], 0x1, 0x1); 175 | } 176 | -#else 177 | 178 | +#if defined(CONFIG_RAM_RK3399_LPDDR4) 179 | struct rk3399_sdram_params dfs_cfgs_lpddr4[] = { 180 | #include "sdram-rk3399-lpddr4-400.inc" 181 | #include "sdram-rk3399-lpddr4-800.inc" 182 | @@ -3011,22 +3010,42 @@ static int sdram_init(struct dram_info * 183 | return 0; 184 | } 185 | 186 | +__weak const char *rk3399_get_ddrtype(void) 187 | +{ 188 | + return NULL; 189 | +} 190 | + 191 | static int rk3399_dmc_of_to_plat(struct udevice *dev) 192 | { 193 | struct rockchip_dmc_plat *plat = dev_get_plat(dev); 194 | + ofnode node = ofnode_null(); 195 | + const char *name; 196 | int ret; 197 | 198 | if (!CONFIG_IS_ENABLED(OF_REAL)) 199 | return 0; 200 | 201 | - ret = dev_read_u32_array(dev, "rockchip,sdram-params", 202 | - (u32 *)&plat->sdram_params, 203 | - sizeof(plat->sdram_params) / sizeof(u32)); 204 | + name = rk3399_get_ddrtype(); printf("DDR type: %s\n", name); 205 | + if (name) 206 | + node = dev_read_subnode(dev, name); 207 | + if (!ofnode_valid(node)) { 208 | + debug("Failed to read subnode %s\n", name ? : ""); 209 | + node = dev_read_first_subnode(dev); 210 | + } 211 | + 212 | + /* fallback to current node */ 213 | + if (!ofnode_valid(node)) 214 | + node = dev_ofnode(dev); 215 | + 216 | + ret = ofnode_read_u32_array(node, "rockchip,sdram-params", 217 | + (u32 *)&plat->sdram_params, 218 | + sizeof(plat->sdram_params) / sizeof(u32)); 219 | if (ret) { 220 | printf("%s: Cannot read rockchip,sdram-params %d\n", 221 | __func__, ret); 222 | return ret; 223 | } 224 | + 225 | ret = regmap_init_mem(dev_ofnode(dev), &plat->map); 226 | if (ret) 227 | printf("%s: regmap failed %d\n", __func__, ret); 228 | @@ -3051,18 +3070,20 @@ static int conv_of_plat(struct udevice * 229 | #endif 230 | 231 | static const struct sdram_rk3399_ops rk3399_ops = { 232 | -#if !defined(CONFIG_RAM_RK3399_LPDDR4) 233 | .data_training_first = data_training_first, 234 | .set_rate_index = switch_to_phy_index1, 235 | .modify_param = modify_param, 236 | .get_phy_index_params = get_phy_index_params, 237 | -#else 238 | +}; 239 | + 240 | +#if defined(CONFIG_RAM_RK3399_LPDDR4) 241 | +static const struct sdram_rk3399_ops lpddr4_ops = { 242 | .data_training_first = lpddr4_mr_detect, 243 | .set_rate_index = lpddr4_set_rate, 244 | .modify_param = lpddr4_modify_param, 245 | .get_phy_index_params = lpddr4_get_phy_index_params, 246 | -#endif 247 | }; 248 | +#endif 249 | 250 | static int rk3399_dmc_init(struct udevice *dev) 251 | { 252 | @@ -3081,7 +3102,17 @@ static int rk3399_dmc_init(struct udevic 253 | return ret; 254 | #endif 255 | 256 | - priv->ops = &rk3399_ops; 257 | + if (params->base.dramtype == LPDDR4) { 258 | +#if defined(CONFIG_RAM_RK3399_LPDDR4) 259 | + priv->ops = &lpddr4_ops; 260 | +#else 261 | + printf("LPDDR4 support is disable\n"); 262 | + return -EINVAL; 263 | +#endif 264 | + } else { 265 | + priv->ops = &rk3399_ops; 266 | + } 267 | + 268 | priv->cic = syscon_get_first_range(ROCKCHIP_SYSCON_CIC); 269 | priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF); 270 | priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU); 271 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/uboot-rockchip/patches/309-ram-rk3399-Add-support-for-multiple-DDR-types-v2.patch: -------------------------------------------------------------------------------- 1 | From c82588ad68829f74ed1f411b58999ab11e849634 Mon Sep 17 00:00:00 2001 2 | From: Jensen Huang 3 | Date: Fri, 26 Aug 2022 13:39:20 +0800 4 | Subject: [PATCH 1/2] ram: rk3399: Add support for multiple DDR types (v2) 5 | 6 | Move rockchip,sdram-params to named subnode to include 7 | multiple sdram parameters, and then read the parameters 8 | (by subnode name, first subnode or current node) before 9 | rk3399_dmc_init(). 10 | 11 | Signed-off-by: Jensen Huang 12 | --- 13 | arch/arm/dts/rk3399-sdram-ddr3-1333.dtsi | 6 ++- 14 | arch/arm/dts/rk3399-sdram-ddr3-1600.dtsi | 5 +- 15 | arch/arm/dts/rk3399-sdram-ddr3-1866.dtsi | 6 ++- 16 | .../arm/dts/rk3399-sdram-lpddr3-2GB-1600.dtsi | 3 ++ 17 | .../arm/dts/rk3399-sdram-lpddr3-4GB-1600.dtsi | 3 ++ 18 | .../rk3399-sdram-lpddr3-samsung-4GB-1866.dtsi | 3 ++ 19 | arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi | 3 ++ 20 | drivers/ram/rockchip/sdram_common.c | 2 + 21 | drivers/ram/rockchip/sdram_rk3399.c | 49 +++++++++++++++---- 22 | 9 files changed, 66 insertions(+), 14 deletions(-) 23 | 24 | --- a/arch/arm/dts/rk3399-sdram-ddr3-1333.dtsi 25 | +++ b/arch/arm/dts/rk3399-sdram-ddr3-1333.dtsi 26 | @@ -4,7 +4,9 @@ 27 | */ 28 | 29 | &dmc { 30 | - rockchip,sdram-params = < 31 | + ddr3-1333 { 32 | + u-boot,dm-pre-reloc; 33 | + rockchip,sdram-params = < 34 | 0x1 35 | 0xa 36 | 0x3 37 | @@ -1536,5 +1538,5 @@ 38 | 0x01010000 39 | 0x00000000 40 | >; 41 | + }; 42 | }; 43 | - 44 | --- a/arch/arm/dts/rk3399-sdram-ddr3-1600.dtsi 45 | +++ b/arch/arm/dts/rk3399-sdram-ddr3-1600.dtsi 46 | @@ -4,7 +4,9 @@ 47 | */ 48 | 49 | &dmc { 50 | - rockchip,sdram-params = < 51 | + ddr3-1600 { 52 | + u-boot,dm-pre-reloc; 53 | + rockchip,sdram-params = < 54 | 0x1 55 | 0xa 56 | 0x3 57 | @@ -1536,4 +1538,5 @@ 58 | 0x01010000 59 | 0x00000000 60 | >; 61 | + }; 62 | }; 63 | --- a/arch/arm/dts/rk3399-sdram-ddr3-1866.dtsi 64 | +++ b/arch/arm/dts/rk3399-sdram-ddr3-1866.dtsi 65 | @@ -4,7 +4,9 @@ 66 | */ 67 | 68 | &dmc { 69 | - rockchip,sdram-params = < 70 | + ddr3-1866 { 71 | + u-boot,dm-pre-reloc; 72 | + rockchip,sdram-params = < 73 | 0x1 74 | 0xa 75 | 0x3 76 | @@ -1536,5 +1538,5 @@ 77 | 0x01010000 78 | 0x00000000 79 | >; 80 | + }; 81 | }; 82 | - 83 | --- a/arch/arm/dts/rk3399-sdram-lpddr3-2GB-1600.dtsi 84 | +++ b/arch/arm/dts/rk3399-sdram-lpddr3-2GB-1600.dtsi 85 | @@ -5,6 +5,8 @@ 86 | */ 87 | 88 | &dmc { 89 | + lpddr3-2GB-1600 { 90 | + u-boot,dm-pre-reloc; 91 | rockchip,sdram-params = < 92 | 0x1 93 | 0xa 94 | @@ -1537,4 +1539,5 @@ 95 | 0x01010000 96 | 0x00000000 97 | >; 98 | + }; 99 | }; 100 | --- a/arch/arm/dts/rk3399-sdram-lpddr3-4GB-1600.dtsi 101 | +++ b/arch/arm/dts/rk3399-sdram-lpddr3-4GB-1600.dtsi 102 | @@ -4,6 +4,8 @@ 103 | */ 104 | 105 | &dmc { 106 | + lpddr3-4GB-1600 { 107 | + u-boot,dm-pre-reloc; 108 | rockchip,sdram-params = < 109 | 0x2 110 | 0xa 111 | @@ -1536,4 +1538,5 @@ 112 | 0x01010000 113 | 0x00000000 114 | >; 115 | + }; 116 | }; 117 | --- a/arch/arm/dts/rk3399-sdram-lpddr3-samsung-4GB-1866.dtsi 118 | +++ b/arch/arm/dts/rk3399-sdram-lpddr3-samsung-4GB-1866.dtsi 119 | @@ -4,6 +4,8 @@ 120 | */ 121 | 122 | &dmc { 123 | + lpddr3-samsung-4GB-1866 { 124 | + u-boot,dm-pre-reloc; 125 | rockchip,sdram-params = < 126 | 0x2 127 | 0xa 128 | @@ -1543,4 +1545,5 @@ 129 | 0x01010000 /* DENALI_PHY_957_DATA */ 130 | 0x00000000 /* DENALI_PHY_958_DATA */ 131 | >; 132 | + }; 133 | }; 134 | --- a/arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi 135 | +++ b/arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi 136 | @@ -6,6 +6,8 @@ 137 | */ 138 | 139 | &dmc { 140 | + lpddr4-100 { 141 | + u-boot,dm-pre-reloc; 142 | rockchip,sdram-params = < 143 | 0x2 144 | 0xa 145 | @@ -1538,4 +1540,5 @@ 146 | 0x01010000 147 | 0x00000000 148 | >; 149 | + }; 150 | }; 151 | --- a/drivers/ram/rockchip/sdram_common.c 152 | +++ b/drivers/ram/rockchip/sdram_common.c 153 | @@ -396,6 +396,8 @@ int sdram_detect_cs1_row(struct sdram_ca 154 | 155 | if (cap_info->rank == 2) { 156 | cs0_cap = sdram_get_cs_cap(cap_info, 0, dram_type); 157 | + if (cap_info->row_3_4) 158 | + cs0_cap = cs0_cap * 3 / 4; 159 | 160 | if (dram_type == DDR4) { 161 | if (cap_info->dbw == 0) 162 | --- a/drivers/ram/rockchip/sdram_rk3399.c 163 | +++ b/drivers/ram/rockchip/sdram_rk3399.c 164 | @@ -1625,7 +1625,6 @@ static void set_ddr_stride(struct rk3399 165 | rk_clrsetreg(&pmusgrf->soc_con4, 0x1f << 10, stride << 10); 166 | } 167 | 168 | -#if !defined(CONFIG_RAM_RK3399_LPDDR4) 169 | static int data_training_first(struct dram_info *dram, u32 channel, u8 rank, 170 | struct rk3399_sdram_params *params) 171 | { 172 | @@ -1715,8 +1714,8 @@ void modify_param(const struct chan_info 173 | clrsetbits_le32(&denali_pi_params[76], 0x1 << 24, 0x1 << 24); 174 | clrsetbits_le32(&denali_pi_params[77], 0x1, 0x1); 175 | } 176 | -#else 177 | 178 | +#if defined(CONFIG_RAM_RK3399_LPDDR4) 179 | struct rk3399_sdram_params dfs_cfgs_lpddr4[] = { 180 | #include "sdram-rk3399-lpddr4-400.inc" 181 | #include "sdram-rk3399-lpddr4-800.inc" 182 | @@ -3011,22 +3010,42 @@ static int sdram_init(struct dram_info * 183 | return 0; 184 | } 185 | 186 | +__weak const char *rk3399_get_ddrtype(void) 187 | +{ 188 | + return NULL; 189 | +} 190 | + 191 | static int rk3399_dmc_of_to_plat(struct udevice *dev) 192 | { 193 | struct rockchip_dmc_plat *plat = dev_get_plat(dev); 194 | + ofnode node = ofnode_null(); 195 | + const char *name; 196 | int ret; 197 | 198 | if (!CONFIG_IS_ENABLED(OF_REAL)) 199 | return 0; 200 | 201 | - ret = dev_read_u32_array(dev, "rockchip,sdram-params", 202 | - (u32 *)&plat->sdram_params, 203 | - sizeof(plat->sdram_params) / sizeof(u32)); 204 | + name = rk3399_get_ddrtype(); printf("DDR type: %s\n", name); 205 | + if (name) 206 | + node = dev_read_subnode(dev, name); 207 | + if (!ofnode_valid(node)) { 208 | + debug("Failed to read subnode %s\n", name ? : ""); 209 | + node = dev_read_first_subnode(dev); 210 | + } 211 | + 212 | + /* fallback to current node */ 213 | + if (!ofnode_valid(node)) 214 | + node = dev_ofnode(dev); 215 | + 216 | + ret = ofnode_read_u32_array(node, "rockchip,sdram-params", 217 | + (u32 *)&plat->sdram_params, 218 | + sizeof(plat->sdram_params) / sizeof(u32)); 219 | if (ret) { 220 | printf("%s: Cannot read rockchip,sdram-params %d\n", 221 | __func__, ret); 222 | return ret; 223 | } 224 | + 225 | ret = regmap_init_mem(dev_ofnode(dev), &plat->map); 226 | if (ret) 227 | printf("%s: regmap failed %d\n", __func__, ret); 228 | @@ -3051,18 +3070,20 @@ static int conv_of_plat(struct udevice * 229 | #endif 230 | 231 | static const struct sdram_rk3399_ops rk3399_ops = { 232 | -#if !defined(CONFIG_RAM_RK3399_LPDDR4) 233 | .data_training_first = data_training_first, 234 | .set_rate_index = switch_to_phy_index1, 235 | .modify_param = modify_param, 236 | .get_phy_index_params = get_phy_index_params, 237 | -#else 238 | +}; 239 | + 240 | +#if defined(CONFIG_RAM_RK3399_LPDDR4) 241 | +static const struct sdram_rk3399_ops lpddr4_ops = { 242 | .data_training_first = lpddr4_mr_detect, 243 | .set_rate_index = lpddr4_set_rate, 244 | .modify_param = lpddr4_modify_param, 245 | .get_phy_index_params = lpddr4_get_phy_index_params, 246 | -#endif 247 | }; 248 | +#endif 249 | 250 | static int rk3399_dmc_init(struct udevice *dev) 251 | { 252 | @@ -3081,7 +3102,17 @@ static int rk3399_dmc_init(struct udevic 253 | return ret; 254 | #endif 255 | 256 | - priv->ops = &rk3399_ops; 257 | + if (params->base.dramtype == LPDDR4) { 258 | +#if defined(CONFIG_RAM_RK3399_LPDDR4) 259 | + priv->ops = &lpddr4_ops; 260 | +#else 261 | + printf("LPDDR4 support is disable\n"); 262 | + return -EINVAL; 263 | +#endif 264 | + } else { 265 | + priv->ops = &rk3399_ops; 266 | + } 267 | + 268 | priv->cic = syscon_get_first_range(ROCKCHIP_SYSCON_CIC); 269 | priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF); 270 | priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU); 271 | -------------------------------------------------------------------------------- /.github/workflows/NanoPi-Build.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # Description: Build OpenWrt using GitHub Actions 3 | # Lisence: MIT 4 | 5 | name: NanoPi Build 6 | 7 | on: 8 | # release: 9 | # types: published 10 | #push: 11 | # branches: 12 | # - 21.02 13 | # paths: 14 | # - '.github/workflows/openwrt-rockchip-2102.yml' 15 | # - 'step/00-prepare_openwrt.sh' 16 | # - 'step/01-prepare_package.sh' 17 | # - 'seed/rockchip.seed' 18 | #schedule: 19 | # - cron: 30 21 * * * 20 | #watch: 21 | # types: started 22 | workflow_dispatch: 23 | inputs: 24 | openwrt_branch: 25 | description: 'OpenWrt Branch to build' 26 | required: true 27 | default: '24.10' 28 | type: choice 29 | options: 30 | - '23.05' 31 | - '24.10' 32 | model_R4S: 33 | description: 'Build R4S' 34 | type: boolean 35 | default: true 36 | model_R2S: 37 | description: 'Build R2S' 38 | type: boolean 39 | default: true 40 | model_R2C: 41 | description: 'Build R2C' 42 | type: boolean 43 | default: false 44 | build_mini: 45 | description: 'Build mini seed' 46 | type: boolean 47 | default: false 48 | build_full: 49 | description: 'Build full seed' 50 | type: boolean 51 | default: true 52 | jobs: 53 | init: 54 | runs-on: ubuntu-22.04 55 | if: github.event.repository.owner.id == github.event.sender.id 56 | 57 | # Map a step output to a job output 58 | outputs: 59 | build_string: ${{ steps.gen_build_string.outputs.build_string }} 60 | release_tag: ${{ steps.gen_release_tag.outputs.release_tag }} 61 | matrix: ${{ steps.build_matrix.outputs.matrix }} 62 | steps: 63 | - id: gen_build_string 64 | run: echo "build_string=$(date +%Y.%m.%d)" >> $GITHUB_OUTPUT 65 | - id: gen_release_tag 66 | run: echo "release_tag=$(date +%Y%m%d)" >> $GITHUB_OUTPUT 67 | - id: build_matrix 68 | run: | 69 | model_R4S="${{ fromJSON('["", "R4S"]')[github.event.inputs.model_R4S == 'true'] }}" 70 | model_R2S="${{ fromJSON('["", "R2S"]')[github.event.inputs.model_R2S == 'true'] }}" 71 | model_R2C="${{ fromJSON('["", "R2C"]')[github.event.inputs.model_R2C == 'true'] }}" 72 | models="$model_R4S $model_R2S $model_R2C" 73 | modelsJson=$(echo -n "$models" | jq -R -s -c 'split(" ") | map(select(length>0))') 74 | matrix="{\"nanopi_model\":$modelsJson}" 75 | echo "matrix=$matrix" >> $GITHUB_OUTPUT 76 | 77 | build: 78 | needs: init 79 | strategy: 80 | matrix: ${{ fromJson(needs.init.outputs.matrix) }} 81 | 82 | runs-on: ubuntu-22.04 83 | if: github.event.repository.owner.id == github.event.sender.id 84 | 85 | steps: 86 | - name: Checkout repository 87 | uses: actions/checkout@main 88 | 89 | - name: Free Space Action 90 | uses: endersonmenezes/free-disk-space@v3 91 | with: 92 | remove_android: true 93 | rm_cmd: "rmz" # NEW: Faster deletion 94 | rmz_version: "3.1.1" # NEW: Specify rmz version 95 | remove_dotnet: true 96 | remove_haskell: true 97 | remove_tool_cache: true 98 | remove_swap: true 99 | remove_packages: "azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox postgresql* temurin-* *llvm* mysql* dotnet-sdk-*" 100 | remove_packages_one_command: true 101 | remove_folders: "/usr/share/swift /usr/share/miniconda /usr/share/az* /usr/local/lib/node_modules /usr/local/share/chromium /usr/local/share/powershell /usr/local/julia /usr/local/aws-cli /usr/local/aws-sam-cli /usr/share/gradle" 102 | testing: false 103 | - name: Free space Old 104 | run: ./workflow-scripts/free_disk_space.sh 105 | 106 | - name: Setup Linux Requirements 107 | uses: ./.github/actions/setup-devenv 108 | 109 | - name: Set GITHUB_ENV 110 | run: | 111 | echo "TZ=Europe/Paris" >>$GITHUB_ENV 112 | echo "BUILD_STRING=${{ needs.init.outputs.build_string }}" >> $GITHUB_ENV 113 | echo "RELTAG=${{ needs.init.outputs.release_tag }}" >> $GITHUB_ENV 114 | echo "OPENWRT_BRANCH=${{ github.event.inputs.openwrt_branch }}" >> $GITHUB_ENV 115 | echo "NANOPI_MODEL=${{ matrix.nanopi_model }}" >> $GITHUB_ENV 116 | echo "BUILD_MINI=${{ github.event.inputs.build_mini }}" >> $GITHUB_ENV 117 | echo "BUILD_FULL=${{ github.event.inputs.build_full }}" >> $GITHUB_ENV 118 | 119 | - name: Show GITHUB_ENV 120 | run: echo $GITHUB_ENV 121 | 122 | - name: Clone OpenWrt source 123 | run: ./openwrt-$OPENWRT_BRANCH/steps/01_clone_openwrt.sh 124 | 125 | - name: Make working copy of OpenWrt source 126 | run: ./openwrt-$OPENWRT_BRANCH/steps/02_prepare_openwrt_folder.sh 127 | 128 | - name: Patch OpenWrt Source 129 | run: ./openwrt-$OPENWRT_BRANCH/steps/03_patch_openwrt.sh 130 | 131 | - name: Prepare package 132 | run: ./openwrt-$OPENWRT_BRANCH/steps/04-prepare_package.sh 133 | 134 | - name: Add ACL 135 | run: ./openwrt-$OPENWRT_BRANCH/steps/05-create_luci_acl.sh 136 | 137 | - name: Load toolchain seed 138 | run: ./openwrt-$OPENWRT_BRANCH/steps/06-create_config_from_seed.sh $NANOPI_MODEL full 139 | 140 | - name: Download package 141 | id: package 142 | run: | 143 | cd build/openwrt 144 | make download -j10 145 | find dl -size -1024c -exec ls -l {} \; 146 | find dl -size -1024c -exec rm -f {} \; 147 | 148 | - name: Make toolchain-aarch64 149 | id: compiletoolchain 150 | continue-on-error: true 151 | run: | 152 | cd build/openwrt 153 | let make_process=$(nproc)+1 154 | make toolchain/install -j${make_process} 155 | 156 | - name: If toolchain Error 157 | if: steps.compiletoolchain.outcome == 'failure' 158 | run: | 159 | echo '================================================================' 160 | cd build/openwrt && make toolchain/install -j1 V=s 161 | 162 | - name: Dump github context 163 | run: echo "$GITHUB_CONTEXT" 164 | shell: bash 165 | env: 166 | GITHUB_CONTEXT: ${{ toJson(github) }} 167 | 168 | - name: Load AO seed (mini) 169 | if: github.event.inputs.build_mini == 'true' 170 | run: ./openwrt-$OPENWRT_BRANCH/steps/06-create_config_from_seed.sh $NANOPI_MODEL mini 171 | 172 | - name: Build kmods (mini) 173 | if: github.event.inputs.build_mini == 'true' 174 | run: ./openwrt-$OPENWRT_BRANCH/steps/07-all_kmods.sh 175 | 176 | - name: Compile OpenWRT (mini) 177 | id: compileopenwrtmini 178 | if: github.event.inputs.build_mini == 'true' 179 | continue-on-error: true 180 | run: | 181 | cd build/openwrt 182 | let make_process=$(nproc)+1 183 | make -j${make_process} || make -j${make_process} 184 | 185 | - name: If compile openwrt Error 186 | if: github.event.inputs.build_mini == 'true' && steps.compileopenwrtmini.outcome == 'failure' 187 | run: | 188 | cat build/openwrt/.config 189 | echo '================================================================' 190 | cd build/openwrt && make -j1 V=s 191 | 192 | - name: Organize files (mini) 193 | id: organizemini 194 | if: github.event.inputs.build_mini == 'true' 195 | run: ./openwrt-$OPENWRT_BRANCH/steps/organize_files.sh $NANOPI_MODEL mini $OPENWRT_BRANCH $RELTAG 196 | 197 | - name: Load AO seed (full) 198 | if: github.event.inputs.build_full == 'true' 199 | run: ./openwrt-$OPENWRT_BRANCH/steps/06-create_config_from_seed.sh $NANOPI_MODEL full 200 | 201 | - name: Build kmods (full) 202 | if: github.event.inputs.build_full == 'true' 203 | run: ./openwrt-$OPENWRT_BRANCH/steps/07-all_kmods.sh 204 | 205 | - name: Compile OpenWRT (full) 206 | id: compileopenwrtfull 207 | if: github.event.inputs.build_full == 'true' 208 | continue-on-error: true 209 | run: | 210 | cd build/openwrt 211 | let make_process=$(nproc)+1 212 | make -j${make_process} || make -j${make_process} 213 | 214 | - name: If compile openwrt Error 215 | if: github.event.inputs.build_full == 'true' && steps.compileopenwrtfull.outcome == 'failure' 216 | run: | 217 | cat build/openwrt/.config 218 | echo '================================================================' 219 | cd build/openwrt && make -j1 V=s 220 | 221 | - name: Organize files (full) 222 | id: organizefull 223 | if: github.event.inputs.build_full == 'true' 224 | run: ./openwrt-$OPENWRT_BRANCH/steps/organize_files.sh $NANOPI_MODEL full $OPENWRT_BRANCH $RELTAG 225 | 226 | - name: Create release 227 | id: create_release 228 | uses: ncipollo/release-action@v1.11.1 229 | if: ${{ !cancelled() }} 230 | with: 231 | name: OpenWrt ${{ env.OPENWRT_BRANCH }} ${{ env.BUILD_STRING }} 232 | allowUpdates: true 233 | tag: OpenWrtAO-${{ env.OPENWRT_BRANCH }}-${{ env.RELTAG }} 234 | commit: main 235 | replacesArtifacts: true 236 | token: ${{ secrets.GITHUB_TOKEN }} 237 | bodyFile: "openwrt-${{ env.OPENWRT_BRANCH }}/release-info.md" 238 | artifacts: ./artifact/*.img.gz 239 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/target/linux/rockchip/patches-6.6/610-arm64-rockchip-add-OF-node-for-eth.patch: -------------------------------------------------------------------------------- 1 | From 2795c8b31a686bdb8338f9404d18ef7a154f0d75 Mon Sep 17 00:00:00 2001 2 | From: David Bauer 3 | Date: Sun, 26 Jul 2020 13:32:59 +0200 4 | Subject: [PATCH] arm64: rockchip: add OF node for USB eth on NanoPi R2S 5 | 6 | This adds the OF node for the USB3 ethernet adapter on the FriendlyARM 7 | NanoPi R2S. Add the correct value for the RTL8153 LED configuration 8 | register to match the blink behavior of the other port on the device. 9 | 10 | Signed-off-by: David Bauer 11 | --- 12 | arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 7 +++++++ 13 | 1 file changed, 7 insertions(+) 14 | 15 | --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts 16 | +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts 17 | @@ -29,6 +29,7 @@ 18 | motorcomm,clk-out-frequency-hz = <125000000>; 19 | motorcomm,keep-pll-enabled; 20 | motorcomm,auto-sleep-disabled; 21 | + motorcomm,led-data = <0xe004 0x0 0x2600 0x0070 0x000a>; 22 | 23 | pinctrl-0 = <ð_phy_reset_pin>; 24 | pinctrl-names = "default"; 25 | @@ -38,3 +39,7 @@ 26 | }; 27 | }; 28 | }; 29 | + 30 | +&rtl8153 { 31 | + realtek,led-data = <0x78>; 32 | +}; 33 | 34 | --- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts 35 | +++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts 36 | @@ -33,6 +33,7 @@ 37 | motorcomm,keep-pll-enabled; 38 | motorcomm,rx-clk-drv-microamp = <5020>; 39 | motorcomm,rx-data-drv-microamp = <5020>; 40 | + motorcomm,led-data = <0xe004 0x0 0x2600 0x0070 0x000a>; 41 | 42 | pinctrl-0 = <ð_phy_reset_pin>; 43 | pinctrl-names = "default"; 44 | @@ -42,3 +43,7 @@ 45 | }; 46 | }; 47 | }; 48 | + 49 | +&rtl8153 { 50 | + realtek,led-data = <0x78>; 51 | +}; 52 | --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts 53 | +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts 54 | @@ -83,6 +83,19 @@ 55 | max-link-speed = <1>; 56 | num-lanes = <1>; 57 | vpcie3v3-supply = <&vcc3v3_sys>; 58 | + 59 | + pcie@0 { 60 | + reg = <0x00000000 0 0 0 0>; 61 | + #address-cells = <3>; 62 | + #size-cells = <2>; 63 | + 64 | + pcie-eth@0,0 { 65 | + compatible = "pci10ec,8168"; 66 | + reg = <0x000000 0 0 0 0>; 67 | + 68 | + realtek,led-data = <0x870>; 69 | + }; 70 | + }; 71 | }; 72 | 73 | &pinctrl { 74 | --- a/arch/arm64/boot/dts/rockchip/rk3568-fastrhino-r66s.dtsi 75 | +++ b/arch/arm64/boot/dts/rockchip/rk3568-fastrhino-r66s.dtsi 76 | @@ -369,6 +369,19 @@ 77 | reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>; 78 | vpcie3v3-supply = <&vcc3v3_pcie>; 79 | status = "okay"; 80 | + 81 | + pcie@0,0 { 82 | + reg = <0x00100000 0 0 0 0>; 83 | + #address-cells = <3>; 84 | + #size-cells = <2>; 85 | + 86 | + rtl8125_1: pcie-eth@10,0 { 87 | + compatible = "pci10ec,8125"; 88 | + reg = <0x000000 0 0 0 0>; 89 | + 90 | + realtek,led-data = <0x200 0x2b 0x0 0x0>; 91 | + }; 92 | + }; 93 | }; 94 | 95 | &pcie3x2 { 96 | @@ -376,6 +389,19 @@ 97 | reset-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; 98 | vpcie3v3-supply = <&vcc3v3_pcie>; 99 | status = "okay"; 100 | + 101 | + pcie@0,0 { 102 | + reg = <0x00200000 0 0 0 0>; 103 | + #address-cells = <3>; 104 | + #size-cells = <2>; 105 | + 106 | + rtl8125_2: pcie-eth@20,0 { 107 | + compatible = "pci10ec,8125"; 108 | + reg = <0x000000 0 0 0 0>; 109 | + 110 | + realtek,led-data = <0x200 0x2b 0x0 0x0>; 111 | + }; 112 | + }; 113 | }; 114 | 115 | &pinctrl { 116 | --- a/arch/arm64/boot/dts/rockchip/rk3568-fastrhino-r68s.dts 117 | +++ b/arch/arm64/boot/dts/rockchip/rk3568-fastrhino-r68s.dts 118 | @@ -31,6 +31,7 @@ 119 | assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>; 120 | assigned-clock-rates = <0>, <125000000>; 121 | clock_in_out = "output"; 122 | + label = "eth0"; 123 | phy-handle = <&rgmii_phy0>; 124 | phy-mode = "rgmii-id"; 125 | pinctrl-names = "default"; 126 | @@ -53,6 +54,7 @@ 127 | assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>; 128 | assigned-clock-rates = <0>, <125000000>; 129 | clock_in_out = "output"; 130 | + label = "eth1"; 131 | phy-handle = <&rgmii_phy1>; 132 | phy-mode = "rgmii-id"; 133 | pinctrl-names = "default"; 134 | @@ -76,6 +78,7 @@ 135 | reg = <0x1>; 136 | pinctrl-0 = <ð_phy0_reset_pin>; 137 | pinctrl-names = "default"; 138 | + realtek,led-data = <0x6d60>; 139 | }; 140 | }; 141 | 142 | @@ -85,6 +88,7 @@ 143 | reg = <0x1>; 144 | pinctrl-0 = <ð_phy1_reset_pin>; 145 | pinctrl-names = "default"; 146 | + realtek,led-data = <0x6d60>; 147 | }; 148 | }; 149 | 150 | @@ -106,6 +110,14 @@ 151 | vccio3-supply = <&vcc_3v3>; 152 | }; 153 | 154 | +&rtl8125_1 { 155 | + label = "eth3"; 156 | +}; 157 | + 158 | +&rtl8125_2 { 159 | + label = "eth2"; 160 | +}; 161 | + 162 | &sdhci { 163 | bus-width = <8>; 164 | max-frequency = <200000000>; 165 | --- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts 166 | +++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts 167 | @@ -69,6 +69,19 @@ 168 | reset-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; 169 | vpcie3v3-supply = <&vcc3v3_pcie>; 170 | status = "okay"; 171 | + 172 | + pcie@0,0 { 173 | + reg = <0x00100000 0 0 0 0>; 174 | + #address-cells = <3>; 175 | + #size-cells = <2>; 176 | + 177 | + rtl8125_1: pcie-eth@10,0 { 178 | + compatible = "pci10ec,8125"; 179 | + reg = <0x000000 0 0 0 0>; 180 | + 181 | + realtek,led-data = <0x0 0x0 0x2b 0x200>; 182 | + }; 183 | + }; 184 | }; 185 | 186 | &pcie3x2 { 187 | @@ -76,6 +89,19 @@ 188 | reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; 189 | vpcie3v3-supply = <&vcc3v3_pcie>; 190 | status = "okay"; 191 | + 192 | + pcie@0,0 { 193 | + reg = <0x00200000 0 0 0 0>; 194 | + #address-cells = <3>; 195 | + #size-cells = <2>; 196 | + 197 | + rtl8125_2: pcie-eth@20,0 { 198 | + compatible = "pci10ec,8125"; 199 | + reg = <0x000000 0 0 0 0>; 200 | + 201 | + realtek,led-data = <0x0 0x0 0x2b 0x200>; 202 | + }; 203 | + }; 204 | }; 205 | 206 | &pinctrl { 207 | --- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts 208 | +++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts 209 | @@ -78,6 +78,7 @@ 210 | reg = <1>; 211 | pinctrl-0 = <ð_phy0_reset_pin>; 212 | pinctrl-names = "default"; 213 | + realtek,led-data = <0x6d60>; 214 | }; 215 | }; 216 | 217 | @@ -85,6 +86,19 @@ 218 | num-lanes = <1>; 219 | reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; 220 | status = "okay"; 221 | + 222 | + pcie@0,0 { 223 | + reg = <0x00000000 0 0 0 0>; 224 | + #address-cells = <3>; 225 | + #size-cells = <2>; 226 | + 227 | + rtl8125_1: pcie@1,0 { 228 | + compatible = "pci10ec,8125"; 229 | + reg = <0x000000 0 0 0 0>; 230 | + 231 | + realtek,led-data = <0x0 0x0 0x2b 0x200>; 232 | + }; 233 | + }; 234 | }; 235 | 236 | &pcie30phy { 237 | @@ -97,6 +111,19 @@ 238 | reset-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; 239 | vpcie3v3-supply = <&vcc3v3_pcie>; 240 | status = "okay"; 241 | + 242 | + pcie@0,0 { 243 | + reg = <0x00100000 0 0 0 0>; 244 | + #address-cells = <3>; 245 | + #size-cells = <2>; 246 | + 247 | + rtl8125_2: pcie@10,0 { 248 | + compatible = "pci10ec,8125"; 249 | + reg = <0x000000 0 0 0 0>; 250 | + 251 | + realtek,led-data = <0x0 0x0 0x2b 0x200>; 252 | + }; 253 | + }; 254 | }; 255 | 256 | &pcie3x2 { 257 | --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts 258 | +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts 259 | @@ -273,6 +273,10 @@ 260 | &gmac1m1_rgmii_clk 261 | &gmac1m1_clkinout 262 | &gmac1m1_rgmii_bus>; 263 | + snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; 264 | + snps,reset-active-low; 265 | + /* Reset time is 20ms, 100ms for rtl8211f */ 266 | + snps,reset-delays-us = <0 20000 100000>; 267 | status = "okay"; 268 | }; 269 | 270 | @@ -588,9 +592,7 @@ 271 | reg = <0x0>; 272 | pinctrl-names = "default"; 273 | pinctrl-0 = <ð_phy_rst>; 274 | - reset-assert-us = <20000>; 275 | - reset-deassert-us = <100000>; 276 | - reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; 277 | + realtek,led-data = <0x6d60>; 278 | }; 279 | }; 280 | 281 | --- a/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts 282 | +++ b/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts 283 | @@ -267,6 +267,19 @@ 284 | &pcie2x1l0 { 285 | reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>; 286 | status = "okay"; 287 | + 288 | + pcie@0,0 { 289 | + reg = <0x00200000 0 0 0 0>; 290 | + #address-cells = <3>; 291 | + #size-cells = <2>; 292 | + 293 | + rtl8125_1: pcie@20,0 { 294 | + compatible = "pci10ec,8125"; 295 | + reg = <0x000000 0 0 0 0>; 296 | + 297 | + realtek,led-data = <0x0 0x2b 0x200 0x0>; 298 | + }; 299 | + }; 300 | }; 301 | 302 | /* phy2 - WiFi */ 303 | @@ -297,6 +310,19 @@ 304 | &pcie2x1l2 { 305 | reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>; 306 | status = "okay"; 307 | + 308 | + pcie@0,0 { 309 | + reg = <0x00400000 0 0 0 0>; 310 | + #address-cells = <3>; 311 | + #size-cells = <2>; 312 | + 313 | + rtl8125_2: pcie@40,0 { 314 | + compatible = "pci10ec,8125"; 315 | + reg = <0x000000 0 0 0 0>; 316 | + 317 | + realtek,led-data = <0x0 0x2b 0x200 0x0>; 318 | + }; 319 | + }; 320 | }; 321 | 322 | &pcie30phy { 323 | --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi 324 | +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi 325 | @@ -510,6 +510,20 @@ 326 | pinctrl-names = "default"; 327 | pinctrl-0 = <&pcie2_0_rst>; 328 | status = "okay"; 329 | + 330 | + pcie@0,0 { 331 | + reg = <0x00200000 0 0 0 0>; 332 | + #address-cells = <3>; 333 | + #size-cells = <2>; 334 | + 335 | + rtl8125_1: pcie@20,0 { 336 | + compatible = "pci10ec,8125"; 337 | + reg = <0x000000 0 0 0 0>; 338 | + 339 | + realtek,led-data = <0x0 0x0 0x2b 0x200>; 340 | + label = "eth2"; 341 | + }; 342 | + }; 343 | }; 344 | 345 | &pcie2x1l1 { 346 | @@ -526,6 +540,20 @@ 347 | pinctrl-names = "default"; 348 | pinctrl-0 = <&pcie2_2_rst>; 349 | status = "okay"; 350 | + 351 | + pcie@0,0 { 352 | + reg = <0x00400000 0 0 0 0>; 353 | + #address-cells = <3>; 354 | + #size-cells = <2>; 355 | + 356 | + rtl8125_2: pcie@40,0 { 357 | + compatible = "pci10ec,8125"; 358 | + reg = <0x000000 0 0 0 0>; 359 | + 360 | + realtek,led-data = <0x0 0x0 0x2b 0x200>; 361 | + label = "eth1"; 362 | + }; 363 | + }; 364 | }; 365 | 366 | &pcie30phy { 367 | -------------------------------------------------------------------------------- /openwrt-23.05/patches/package/mbedtls/patches/200-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch: -------------------------------------------------------------------------------- 1 | From dfb6015ca79a9fee28f7fcb0af7e350a83574b83 Mon Sep 17 00:00:00 2001 2 | From: "Markku-Juhani O. Saarinen" 3 | Date: Mon, 20 Nov 2017 14:58:41 +0000 4 | Subject: Implements AES and GCM with ARMv8 Crypto Extensions 5 | 6 | A compact patch that provides AES and GCM implementations that utilize the 7 | ARMv8 Crypto Extensions. The config flag is MBEDTLS_ARMV8CE_AES_C, which 8 | is disabled by default as we don't do runtime checking for the feature. 9 | The new implementation lives in armv8ce_aes.c. 10 | 11 | Provides similar functionality to https://github.com/ARMmbed/mbedtls/pull/432 12 | Thanks to Barry O'Rourke and others for that contribtion. 13 | 14 | Tested on a Cortex A53 device and QEMU. On a midrange phone the real AES-GCM 15 | throughput increases about 4x, while raw AES speed is up to 10x faster. 16 | 17 | When cross-compiling, you want to set something like: 18 | 19 | export CC='aarch64-linux-gnu-gcc' 20 | export CFLAGS='-Ofast -march=armv8-a+crypto' 21 | scripts/config.pl set MBEDTLS_ARMV8CE_AES_C 22 | 23 | QEMU seems to also need 24 | 25 | export LDFLAGS='-static' 26 | 27 | Then run normal make or cmake etc. 28 | --- 29 | 30 | --- /dev/null 31 | +++ b/ChangeLog.d/armv8_crypto_extensions.txt 32 | @@ -0,0 +1,2 @@ 33 | +Features 34 | + * Support ARMv8 Cryptography Extensions for AES and GCM. 35 | --- /dev/null 36 | +++ b/include/mbedtls/armv8ce_aes.h 37 | @@ -0,0 +1,63 @@ 38 | +/** 39 | + * \file armv8ce_aes.h 40 | + * 41 | + * \brief ARMv8 Cryptography Extensions -- Optimized code for AES and GCM 42 | + */ 43 | + 44 | +/* 45 | + * 46 | + * Copyright (C) 2006-2017, ARM Limited, All Rights Reserved 47 | + * SPDX-License-Identifier: Apache-2.0 48 | + * 49 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may 50 | + * not use this file except in compliance with the License. 51 | + * You may obtain a copy of the License at 52 | + * 53 | + * http://www.apache.org/licenses/LICENSE-2.0 54 | + * 55 | + * Unless required by applicable law or agreed to in writing, software 56 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 57 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 58 | + * See the License for the specific language governing permissions and 59 | + * limitations under the License. 60 | + * 61 | + * This file is part of mbed TLS (https://tls.mbed.org) 62 | + */ 63 | + 64 | +#ifndef MBEDTLS_ARMV8CE_AES_H 65 | +#define MBEDTLS_ARMV8CE_AES_H 66 | + 67 | +#include "aes.h" 68 | + 69 | +/** 70 | + * \brief [ARMv8 Crypto Extensions] AES-ECB block en(de)cryption 71 | + * 72 | + * \param ctx AES context 73 | + * \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT 74 | + * \param input 16-byte input block 75 | + * \param output 16-byte output block 76 | + * 77 | + * \return 0 on success (cannot fail) 78 | + */ 79 | + 80 | +int mbedtls_armv8ce_aes_crypt_ecb( mbedtls_aes_context *ctx, 81 | + int mode, 82 | + const unsigned char input[16], 83 | + unsigned char output[16] ); 84 | + 85 | +/** 86 | + * \brief [ARMv8 Crypto Extensions] Multiply in GF(2^128) for GCM 87 | + * 88 | + * \param c Result 89 | + * \param a First operand 90 | + * \param b Second operand 91 | + * 92 | + * \note Both operands and result are bit strings interpreted as 93 | + * elements of GF(2^128) as per the GCM spec. 94 | + */ 95 | + 96 | +void mbedtls_armv8ce_gcm_mult( unsigned char c[16], 97 | + const unsigned char a[16], 98 | + const unsigned char b[16] ); 99 | + 100 | +#endif /* MBEDTLS_ARMV8CE_AES_H */ 101 | --- a/include/mbedtls/check_config.h 102 | +++ b/include/mbedtls/check_config.h 103 | @@ -69,6 +69,10 @@ 104 | #error "MBEDTLS_HAVE_TIME_DATE without MBEDTLS_HAVE_TIME does not make sense" 105 | #endif 106 | 107 | +#if defined(MBEDTLS_ARMV8CE_AES_C) && !defined(MBEDTLS_HAVE_ASM) 108 | +#error "MBEDTLS_ARMV8CE_AES_C defined, but not all prerequisites" 109 | +#endif 110 | + 111 | #if defined(MBEDTLS_CTR_DRBG_C) && !defined(MBEDTLS_AES_C) 112 | #error "MBEDTLS_CTR_DRBG_C defined, but not all prerequisites" 113 | #endif 114 | @@ -959,3 +963,4 @@ typedef int mbedtls_iso_c_forbids_empty_ 115 | 116 | /* *INDENT-ON* */ 117 | #endif /* MBEDTLS_CHECK_CONFIG_H */ 118 | + 119 | --- a/include/mbedtls/config.h 120 | +++ b/include/mbedtls/config.h 121 | @@ -46,6 +46,7 @@ 122 | * Requires support for asm() in compiler. 123 | * 124 | * Used in: 125 | + * library/armv8ce_aes.c 126 | * library/aria.c 127 | * library/timing.c 128 | * include/mbedtls/bn_mul.h 129 | @@ -2471,6 +2472,21 @@ 130 | #define MBEDTLS_AESNI_C 131 | 132 | /** 133 | + * \def MBEDTLS_ARMV8CE_AES_C 134 | + * 135 | + * Enable ARMv8 Crypto Extensions for AES and GCM 136 | + * 137 | + * Module: library/armv8ce_aes.c 138 | + * Caller: library/aes.c 139 | + * library/gcm.c 140 | + * 141 | + * Requires: MBEDTLS_HAVE_ASM 142 | + * 143 | + * This module adds support for Armv8 Cryptography Extensions for AES and GCM. 144 | + */ 145 | +//#define MBEDTLS_ARMV8CE_AES_C 146 | + 147 | +/** 148 | * \def MBEDTLS_AES_C 149 | * 150 | * Enable the AES block cipher. 151 | --- a/library/aes.c 152 | +++ b/library/aes.c 153 | @@ -39,7 +39,9 @@ 154 | #if defined(MBEDTLS_AESNI_C) 155 | #include "mbedtls/aesni.h" 156 | #endif 157 | - 158 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 159 | +#include "mbedtls/armv8ce_aes.h" 160 | +#endif 161 | #include "mbedtls/platform.h" 162 | 163 | #if !defined(MBEDTLS_AES_ALT) 164 | @@ -1076,6 +1078,11 @@ int mbedtls_aes_crypt_ecb(mbedtls_aes_co 165 | } 166 | #endif 167 | 168 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 169 | + // We don't do runtime checking for ARMv8 Crypto Extensions 170 | + return mbedtls_armv8ce_aes_crypt_ecb( ctx, mode, input, output ); 171 | +#endif 172 | + 173 | #if defined(MBEDTLS_VIA_PADLOCK_HAVE_CODE) 174 | if (aes_padlock_ace) { 175 | return mbedtls_padlock_xcryptecb(ctx, mode, input, output); 176 | --- /dev/null 177 | +++ b/library/armv8ce_aes.c 178 | @@ -0,0 +1,142 @@ 179 | +/* 180 | + * ARMv8 Cryptography Extensions -- Optimized code for AES and GCM 181 | + * 182 | + * Copyright (C) 2006-2017, ARM Limited, All Rights Reserved 183 | + * SPDX-License-Identifier: Apache-2.0 184 | + * 185 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may 186 | + * not use this file except in compliance with the License. 187 | + * You may obtain a copy of the License at 188 | + * 189 | + * http://www.apache.org/licenses/LICENSE-2.0 190 | + * 191 | + * Unless required by applicable law or agreed to in writing, software 192 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 193 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 194 | + * See the License for the specific language governing permissions and 195 | + * limitations under the License. 196 | + * 197 | + * This file is part of mbed TLS (https://tls.mbed.org) 198 | + */ 199 | + 200 | +#if !defined(MBEDTLS_CONFIG_FILE) 201 | +#include "mbedtls/config.h" 202 | +#else 203 | +#include MBEDTLS_CONFIG_FILE 204 | +#endif 205 | + 206 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 207 | + 208 | +#include 209 | +#include "mbedtls/armv8ce_aes.h" 210 | + 211 | +#ifndef asm 212 | +#define asm __asm 213 | +#endif 214 | + 215 | +/* 216 | + * [Armv8 Cryptography Extensions] AES-ECB block en(de)cryption 217 | + */ 218 | + 219 | +#if defined(MBEDTLS_AES_C) 220 | + 221 | +int mbedtls_armv8ce_aes_crypt_ecb( mbedtls_aes_context *ctx, 222 | + int mode, 223 | + const unsigned char input[16], 224 | + unsigned char output[16] ) 225 | +{ 226 | + unsigned int i; 227 | + const uint8_t *rk; 228 | + uint8x16_t x, k; 229 | + 230 | + x = vld1q_u8( input ); /* input block */ 231 | + rk = (const uint8_t *) ctx->rk; /* round keys */ 232 | + 233 | + if( mode == MBEDTLS_AES_ENCRYPT ) 234 | + { 235 | + for( i = ctx->nr - 1; i != 0; i-- ) /* encryption loop */ 236 | + { 237 | + k = vld1q_u8( rk ); 238 | + rk += 16; 239 | + x = vaeseq_u8( x, k ); 240 | + x = vaesmcq_u8( x ); 241 | + } 242 | + k = vld1q_u8( rk ); 243 | + rk += 16; 244 | + x = vaeseq_u8( x, k ); 245 | + } 246 | + else 247 | + { 248 | + for( i = ctx->nr - 1; i != 0 ; i-- ) /* decryption loop */ 249 | + { 250 | + k = vld1q_u8( rk ); 251 | + rk += 16; 252 | + x = vaesdq_u8( x, k ); 253 | + x = vaesimcq_u8( x ); 254 | + } 255 | + k = vld1q_u8( rk ); 256 | + rk += 16; 257 | + x = vaesdq_u8( x, k ); 258 | + } 259 | + 260 | + k = vld1q_u8( rk ); /* final key just XORed */ 261 | + x = veorq_u8( x, k ); 262 | + vst1q_u8( output, x ); /* write out */ 263 | + 264 | + return ( 0 ); 265 | +} 266 | + 267 | +#endif /* MBEDTLS_AES_C */ 268 | + 269 | + 270 | +/* 271 | + * [Armv8 Cryptography Extensions] Multiply in GF(2^128) for GCM 272 | + */ 273 | + 274 | +#if defined(MBEDTLS_GCM_C) 275 | + 276 | +void mbedtls_armv8ce_gcm_mult( unsigned char c[16], 277 | + const unsigned char a[16], 278 | + const unsigned char b[16] ) 279 | +{ 280 | + /* GCM's GF(2^128) polynomial basis is x^128 + x^7 + x^2 + x + 1 */ 281 | + const uint64x2_t base = { 0, 0x86 }; /* note missing LS bit */ 282 | + 283 | + register uint8x16_t vc asm( "v0" ); /* named registers */ 284 | + register uint8x16_t va asm( "v1" ); /* (to avoid conflict) */ 285 | + register uint8x16_t vb asm( "v2" ); 286 | + register uint64x2_t vp asm( "v3" ); 287 | + 288 | + va = vld1q_u8( a ); /* load inputs */ 289 | + vb = vld1q_u8( b ); 290 | + vp = base; 291 | + 292 | + asm ( 293 | + "rbit %1.16b, %1.16b \n\t" /* reverse bit order */ 294 | + "rbit %2.16b, %2.16b \n\t" 295 | + "pmull2 %0.1q, %1.2d, %2.2d \n\t" /* v0 = a.hi * b.hi */ 296 | + "pmull2 v4.1q, %0.2d, %3.2d \n\t" /* mul v0 by x^64, reduce */ 297 | + "ext %0.16b, %0.16b, %0.16b, #8 \n\t" 298 | + "eor %0.16b, %0.16b, v4.16b \n\t" 299 | + "ext v5.16b, %2.16b, %2.16b, #8 \n\t" /* (swap hi and lo in b) */ 300 | + "pmull v4.1q, %1.1d, v5.1d \n\t" /* v0 ^= a.lo * b.hi */ 301 | + "eor %0.16b, %0.16b, v4.16b \n\t" 302 | + "pmull2 v4.1q, %1.2d, v5.2d \n\t" /* v0 ^= a.hi * b.lo */ 303 | + "eor %0.16b, %0.16b, v4.16b \n\t" 304 | + "pmull2 v4.1q, %0.2d, %3.2d \n\t" /* mul v0 by x^64, reduce */ 305 | + "ext %0.16b, %0.16b, %0.16b, #8 \n\t" 306 | + "eor %0.16b, %0.16b, v4.16b \n\t" 307 | + "pmull v4.1q, %1.1d, %2.1d \n\t" /* v0 ^= a.lo * b.lo */ 308 | + "eor %0.16b, %0.16b, v4.16b \n\t" 309 | + "rbit %0.16b, %0.16b \n\t" /* reverse bits for output */ 310 | + : "=w" (vc) /* q0: output */ 311 | + : "w" (va), "w" (vb), "w" (vp) /* q1, q2: input */ 312 | + : "v4", "v5" /* q4, q5: clobbered */ 313 | + ); 314 | + 315 | + vst1q_u8( c, vc ); /* write out */ 316 | +} 317 | + 318 | +#endif /* MBEDTLS_GCM_C */ 319 | + 320 | +#endif /* MBEDTLS_ARMV8CE_AES_C */ 321 | --- a/library/CMakeLists.txt 322 | +++ b/library/CMakeLists.txt 323 | @@ -15,6 +15,7 @@ set(src_crypto 324 | aesni.c 325 | arc4.c 326 | aria.c 327 | + armv8ce_aes.c 328 | asn1parse.c 329 | asn1write.c 330 | base64.c 331 | --- a/library/gcm.c 332 | +++ b/library/gcm.c 333 | @@ -43,6 +43,10 @@ 334 | #include "mbedtls/aesni.h" 335 | #endif 336 | 337 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 338 | +#include "mbedtls/armv8ce_aes.h" 339 | +#endif 340 | + 341 | #if !defined(MBEDTLS_GCM_ALT) 342 | 343 | /* Parameter validation macros */ 344 | @@ -81,6 +85,12 @@ static int gcm_gen_table(mbedtls_gcm_con 345 | return ret; 346 | } 347 | 348 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 349 | + // we don't do feature testing with ARMv8 cryptography extensions 350 | + memcpy( ctx ->HL, h, 16 ); // put H at the beginning of buffer 351 | + return( 0 ); // that's all we need 352 | +#endif 353 | + 354 | /* pack h as two 64-bits ints, big-endian */ 355 | hi = MBEDTLS_GET_UINT32_BE(h, 0); 356 | lo = MBEDTLS_GET_UINT32_BE(h, 4); 357 | @@ -191,6 +201,11 @@ static void gcm_mult(mbedtls_gcm_context 358 | unsigned char lo, hi, rem; 359 | uint64_t zh, zl; 360 | 361 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 362 | + mbedtls_armv8ce_gcm_mult( output, x, (const unsigned char *) ctx->HL ); 363 | + return; 364 | +#endif 365 | + 366 | #if defined(MBEDTLS_AESNI_HAVE_CODE) 367 | if (mbedtls_aesni_has_support(MBEDTLS_AESNI_CLMUL)) { 368 | unsigned char h[16]; 369 | --- a/library/Makefile 370 | +++ b/library/Makefile 371 | @@ -74,6 +74,7 @@ OBJS_CRYPTO= \ 372 | aria.o \ 373 | asn1parse.o \ 374 | asn1write.o \ 375 | + armv8ce_aes.o \ 376 | base64.o \ 377 | bignum.o \ 378 | blowfish.o \ 379 | --- a/library/version_features.c 380 | +++ b/library/version_features.c 381 | @@ -636,6 +636,9 @@ static const char * const features[] = { 382 | #if defined(MBEDTLS_AESNI_C) 383 | "MBEDTLS_AESNI_C", 384 | #endif /* MBEDTLS_AESNI_C */ 385 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 386 | + "MBEDTLS_ARMV8CE_AES_C", 387 | +#endif /* MBEDTLS_ARMV8CE_AES_C */ 388 | #if defined(MBEDTLS_AES_C) 389 | "MBEDTLS_AES_C", 390 | #endif /* MBEDTLS_AES_C */ 391 | -------------------------------------------------------------------------------- /openwrt-24.10/patches/package/mbedtls/patches/200-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch: -------------------------------------------------------------------------------- 1 | From dfb6015ca79a9fee28f7fcb0af7e350a83574b83 Mon Sep 17 00:00:00 2001 2 | From: "Markku-Juhani O. Saarinen" 3 | Date: Mon, 20 Nov 2017 14:58:41 +0000 4 | Subject: Implements AES and GCM with ARMv8 Crypto Extensions 5 | 6 | A compact patch that provides AES and GCM implementations that utilize the 7 | ARMv8 Crypto Extensions. The config flag is MBEDTLS_ARMV8CE_AES_C, which 8 | is disabled by default as we don't do runtime checking for the feature. 9 | The new implementation lives in armv8ce_aes.c. 10 | 11 | Provides similar functionality to https://github.com/ARMmbed/mbedtls/pull/432 12 | Thanks to Barry O'Rourke and others for that contribtion. 13 | 14 | Tested on a Cortex A53 device and QEMU. On a midrange phone the real AES-GCM 15 | throughput increases about 4x, while raw AES speed is up to 10x faster. 16 | 17 | When cross-compiling, you want to set something like: 18 | 19 | export CC='aarch64-linux-gnu-gcc' 20 | export CFLAGS='-Ofast -march=armv8-a+crypto' 21 | scripts/config.pl set MBEDTLS_ARMV8CE_AES_C 22 | 23 | QEMU seems to also need 24 | 25 | export LDFLAGS='-static' 26 | 27 | Then run normal make or cmake etc. 28 | --- 29 | 30 | --- /dev/null 31 | +++ b/ChangeLog.d/armv8_crypto_extensions.txt 32 | @@ -0,0 +1,2 @@ 33 | +Features 34 | + * Support ARMv8 Cryptography Extensions for AES and GCM. 35 | --- /dev/null 36 | +++ b/include/mbedtls/armv8ce_aes.h 37 | @@ -0,0 +1,63 @@ 38 | +/** 39 | + * \file armv8ce_aes.h 40 | + * 41 | + * \brief ARMv8 Cryptography Extensions -- Optimized code for AES and GCM 42 | + */ 43 | + 44 | +/* 45 | + * 46 | + * Copyright (C) 2006-2017, ARM Limited, All Rights Reserved 47 | + * SPDX-License-Identifier: Apache-2.0 48 | + * 49 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may 50 | + * not use this file except in compliance with the License. 51 | + * You may obtain a copy of the License at 52 | + * 53 | + * http://www.apache.org/licenses/LICENSE-2.0 54 | + * 55 | + * Unless required by applicable law or agreed to in writing, software 56 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 57 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 58 | + * See the License for the specific language governing permissions and 59 | + * limitations under the License. 60 | + * 61 | + * This file is part of mbed TLS (https://tls.mbed.org) 62 | + */ 63 | + 64 | +#ifndef MBEDTLS_ARMV8CE_AES_H 65 | +#define MBEDTLS_ARMV8CE_AES_H 66 | + 67 | +#include "aes.h" 68 | + 69 | +/** 70 | + * \brief [ARMv8 Crypto Extensions] AES-ECB block en(de)cryption 71 | + * 72 | + * \param ctx AES context 73 | + * \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT 74 | + * \param input 16-byte input block 75 | + * \param output 16-byte output block 76 | + * 77 | + * \return 0 on success (cannot fail) 78 | + */ 79 | + 80 | +int mbedtls_armv8ce_aes_crypt_ecb( mbedtls_aes_context *ctx, 81 | + int mode, 82 | + const unsigned char input[16], 83 | + unsigned char output[16] ); 84 | + 85 | +/** 86 | + * \brief [ARMv8 Crypto Extensions] Multiply in GF(2^128) for GCM 87 | + * 88 | + * \param c Result 89 | + * \param a First operand 90 | + * \param b Second operand 91 | + * 92 | + * \note Both operands and result are bit strings interpreted as 93 | + * elements of GF(2^128) as per the GCM spec. 94 | + */ 95 | + 96 | +void mbedtls_armv8ce_gcm_mult( unsigned char c[16], 97 | + const unsigned char a[16], 98 | + const unsigned char b[16] ); 99 | + 100 | +#endif /* MBEDTLS_ARMV8CE_AES_H */ 101 | --- a/include/mbedtls/check_config.h 102 | +++ b/include/mbedtls/check_config.h 103 | @@ -69,6 +69,10 @@ 104 | #error "MBEDTLS_HAVE_TIME_DATE without MBEDTLS_HAVE_TIME does not make sense" 105 | #endif 106 | 107 | +#if defined(MBEDTLS_ARMV8CE_AES_C) && !defined(MBEDTLS_HAVE_ASM) 108 | +#error "MBEDTLS_ARMV8CE_AES_C defined, but not all prerequisites" 109 | +#endif 110 | + 111 | #if defined(MBEDTLS_CTR_DRBG_C) && !defined(MBEDTLS_AES_C) 112 | #error "MBEDTLS_CTR_DRBG_C defined, but not all prerequisites" 113 | #endif 114 | @@ -959,3 +963,4 @@ typedef int mbedtls_iso_c_forbids_empty_ 115 | 116 | /* *INDENT-ON* */ 117 | #endif /* MBEDTLS_CHECK_CONFIG_H */ 118 | + 119 | --- a/include/mbedtls/config.h 120 | +++ b/include/mbedtls/config.h 121 | @@ -46,6 +46,7 @@ 122 | * Requires support for asm() in compiler. 123 | * 124 | * Used in: 125 | + * library/armv8ce_aes.c 126 | * library/aria.c 127 | * library/timing.c 128 | * include/mbedtls/bn_mul.h 129 | @@ -2471,6 +2472,21 @@ 130 | #define MBEDTLS_AESNI_C 131 | 132 | /** 133 | + * \def MBEDTLS_ARMV8CE_AES_C 134 | + * 135 | + * Enable ARMv8 Crypto Extensions for AES and GCM 136 | + * 137 | + * Module: library/armv8ce_aes.c 138 | + * Caller: library/aes.c 139 | + * library/gcm.c 140 | + * 141 | + * Requires: MBEDTLS_HAVE_ASM 142 | + * 143 | + * This module adds support for Armv8 Cryptography Extensions for AES and GCM. 144 | + */ 145 | +//#define MBEDTLS_ARMV8CE_AES_C 146 | + 147 | +/** 148 | * \def MBEDTLS_AES_C 149 | * 150 | * Enable the AES block cipher. 151 | --- a/library/aes.c 152 | +++ b/library/aes.c 153 | @@ -39,7 +39,9 @@ 154 | #if defined(MBEDTLS_AESNI_C) 155 | #include "mbedtls/aesni.h" 156 | #endif 157 | - 158 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 159 | +#include "mbedtls/armv8ce_aes.h" 160 | +#endif 161 | #include "mbedtls/platform.h" 162 | 163 | #if !defined(MBEDTLS_AES_ALT) 164 | @@ -1076,6 +1078,11 @@ int mbedtls_aes_crypt_ecb(mbedtls_aes_co 165 | } 166 | #endif 167 | 168 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 169 | + // We don't do runtime checking for ARMv8 Crypto Extensions 170 | + return mbedtls_armv8ce_aes_crypt_ecb( ctx, mode, input, output ); 171 | +#endif 172 | + 173 | #if defined(MBEDTLS_VIA_PADLOCK_HAVE_CODE) 174 | if (aes_padlock_ace) { 175 | return mbedtls_padlock_xcryptecb(ctx, mode, input, output); 176 | --- /dev/null 177 | +++ b/library/armv8ce_aes.c 178 | @@ -0,0 +1,142 @@ 179 | +/* 180 | + * ARMv8 Cryptography Extensions -- Optimized code for AES and GCM 181 | + * 182 | + * Copyright (C) 2006-2017, ARM Limited, All Rights Reserved 183 | + * SPDX-License-Identifier: Apache-2.0 184 | + * 185 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may 186 | + * not use this file except in compliance with the License. 187 | + * You may obtain a copy of the License at 188 | + * 189 | + * http://www.apache.org/licenses/LICENSE-2.0 190 | + * 191 | + * Unless required by applicable law or agreed to in writing, software 192 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 193 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 194 | + * See the License for the specific language governing permissions and 195 | + * limitations under the License. 196 | + * 197 | + * This file is part of mbed TLS (https://tls.mbed.org) 198 | + */ 199 | + 200 | +#if !defined(MBEDTLS_CONFIG_FILE) 201 | +#include "mbedtls/config.h" 202 | +#else 203 | +#include MBEDTLS_CONFIG_FILE 204 | +#endif 205 | + 206 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 207 | + 208 | +#include 209 | +#include "mbedtls/armv8ce_aes.h" 210 | + 211 | +#ifndef asm 212 | +#define asm __asm 213 | +#endif 214 | + 215 | +/* 216 | + * [Armv8 Cryptography Extensions] AES-ECB block en(de)cryption 217 | + */ 218 | + 219 | +#if defined(MBEDTLS_AES_C) 220 | + 221 | +int mbedtls_armv8ce_aes_crypt_ecb( mbedtls_aes_context *ctx, 222 | + int mode, 223 | + const unsigned char input[16], 224 | + unsigned char output[16] ) 225 | +{ 226 | + unsigned int i; 227 | + const uint8_t *rk; 228 | + uint8x16_t x, k; 229 | + 230 | + x = vld1q_u8( input ); /* input block */ 231 | + rk = (const uint8_t *) ctx->rk; /* round keys */ 232 | + 233 | + if( mode == MBEDTLS_AES_ENCRYPT ) 234 | + { 235 | + for( i = ctx->nr - 1; i != 0; i-- ) /* encryption loop */ 236 | + { 237 | + k = vld1q_u8( rk ); 238 | + rk += 16; 239 | + x = vaeseq_u8( x, k ); 240 | + x = vaesmcq_u8( x ); 241 | + } 242 | + k = vld1q_u8( rk ); 243 | + rk += 16; 244 | + x = vaeseq_u8( x, k ); 245 | + } 246 | + else 247 | + { 248 | + for( i = ctx->nr - 1; i != 0 ; i-- ) /* decryption loop */ 249 | + { 250 | + k = vld1q_u8( rk ); 251 | + rk += 16; 252 | + x = vaesdq_u8( x, k ); 253 | + x = vaesimcq_u8( x ); 254 | + } 255 | + k = vld1q_u8( rk ); 256 | + rk += 16; 257 | + x = vaesdq_u8( x, k ); 258 | + } 259 | + 260 | + k = vld1q_u8( rk ); /* final key just XORed */ 261 | + x = veorq_u8( x, k ); 262 | + vst1q_u8( output, x ); /* write out */ 263 | + 264 | + return ( 0 ); 265 | +} 266 | + 267 | +#endif /* MBEDTLS_AES_C */ 268 | + 269 | + 270 | +/* 271 | + * [Armv8 Cryptography Extensions] Multiply in GF(2^128) for GCM 272 | + */ 273 | + 274 | +#if defined(MBEDTLS_GCM_C) 275 | + 276 | +void mbedtls_armv8ce_gcm_mult( unsigned char c[16], 277 | + const unsigned char a[16], 278 | + const unsigned char b[16] ) 279 | +{ 280 | + /* GCM's GF(2^128) polynomial basis is x^128 + x^7 + x^2 + x + 1 */ 281 | + const uint64x2_t base = { 0, 0x86 }; /* note missing LS bit */ 282 | + 283 | + register uint8x16_t vc asm( "v0" ); /* named registers */ 284 | + register uint8x16_t va asm( "v1" ); /* (to avoid conflict) */ 285 | + register uint8x16_t vb asm( "v2" ); 286 | + register uint64x2_t vp asm( "v3" ); 287 | + 288 | + va = vld1q_u8( a ); /* load inputs */ 289 | + vb = vld1q_u8( b ); 290 | + vp = base; 291 | + 292 | + asm ( 293 | + "rbit %1.16b, %1.16b \n\t" /* reverse bit order */ 294 | + "rbit %2.16b, %2.16b \n\t" 295 | + "pmull2 %0.1q, %1.2d, %2.2d \n\t" /* v0 = a.hi * b.hi */ 296 | + "pmull2 v4.1q, %0.2d, %3.2d \n\t" /* mul v0 by x^64, reduce */ 297 | + "ext %0.16b, %0.16b, %0.16b, #8 \n\t" 298 | + "eor %0.16b, %0.16b, v4.16b \n\t" 299 | + "ext v5.16b, %2.16b, %2.16b, #8 \n\t" /* (swap hi and lo in b) */ 300 | + "pmull v4.1q, %1.1d, v5.1d \n\t" /* v0 ^= a.lo * b.hi */ 301 | + "eor %0.16b, %0.16b, v4.16b \n\t" 302 | + "pmull2 v4.1q, %1.2d, v5.2d \n\t" /* v0 ^= a.hi * b.lo */ 303 | + "eor %0.16b, %0.16b, v4.16b \n\t" 304 | + "pmull2 v4.1q, %0.2d, %3.2d \n\t" /* mul v0 by x^64, reduce */ 305 | + "ext %0.16b, %0.16b, %0.16b, #8 \n\t" 306 | + "eor %0.16b, %0.16b, v4.16b \n\t" 307 | + "pmull v4.1q, %1.1d, %2.1d \n\t" /* v0 ^= a.lo * b.lo */ 308 | + "eor %0.16b, %0.16b, v4.16b \n\t" 309 | + "rbit %0.16b, %0.16b \n\t" /* reverse bits for output */ 310 | + : "=w" (vc) /* q0: output */ 311 | + : "w" (va), "w" (vb), "w" (vp) /* q1, q2: input */ 312 | + : "v4", "v5" /* q4, q5: clobbered */ 313 | + ); 314 | + 315 | + vst1q_u8( c, vc ); /* write out */ 316 | +} 317 | + 318 | +#endif /* MBEDTLS_GCM_C */ 319 | + 320 | +#endif /* MBEDTLS_ARMV8CE_AES_C */ 321 | --- a/library/CMakeLists.txt 322 | +++ b/library/CMakeLists.txt 323 | @@ -15,6 +15,7 @@ set(src_crypto 324 | aesni.c 325 | arc4.c 326 | aria.c 327 | + armv8ce_aes.c 328 | asn1parse.c 329 | asn1write.c 330 | base64.c 331 | --- a/library/gcm.c 332 | +++ b/library/gcm.c 333 | @@ -43,6 +43,10 @@ 334 | #include "mbedtls/aesni.h" 335 | #endif 336 | 337 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 338 | +#include "mbedtls/armv8ce_aes.h" 339 | +#endif 340 | + 341 | #if !defined(MBEDTLS_GCM_ALT) 342 | 343 | /* Parameter validation macros */ 344 | @@ -81,6 +85,12 @@ static int gcm_gen_table(mbedtls_gcm_con 345 | return ret; 346 | } 347 | 348 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 349 | + // we don't do feature testing with ARMv8 cryptography extensions 350 | + memcpy( ctx ->HL, h, 16 ); // put H at the beginning of buffer 351 | + return( 0 ); // that's all we need 352 | +#endif 353 | + 354 | /* pack h as two 64-bits ints, big-endian */ 355 | hi = MBEDTLS_GET_UINT32_BE(h, 0); 356 | lo = MBEDTLS_GET_UINT32_BE(h, 4); 357 | @@ -191,6 +201,11 @@ static void gcm_mult(mbedtls_gcm_context 358 | unsigned char lo, hi, rem; 359 | uint64_t zh, zl; 360 | 361 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 362 | + mbedtls_armv8ce_gcm_mult( output, x, (const unsigned char *) ctx->HL ); 363 | + return; 364 | +#endif 365 | + 366 | #if defined(MBEDTLS_AESNI_HAVE_CODE) 367 | if (mbedtls_aesni_has_support(MBEDTLS_AESNI_CLMUL)) { 368 | unsigned char h[16]; 369 | --- a/library/Makefile 370 | +++ b/library/Makefile 371 | @@ -74,6 +74,7 @@ OBJS_CRYPTO= \ 372 | aria.o \ 373 | asn1parse.o \ 374 | asn1write.o \ 375 | + armv8ce_aes.o \ 376 | base64.o \ 377 | bignum.o \ 378 | blowfish.o \ 379 | --- a/library/version_features.c 380 | +++ b/library/version_features.c 381 | @@ -636,6 +636,9 @@ static const char * const features[] = { 382 | #if defined(MBEDTLS_AESNI_C) 383 | "MBEDTLS_AESNI_C", 384 | #endif /* MBEDTLS_AESNI_C */ 385 | +#if defined(MBEDTLS_ARMV8CE_AES_C) 386 | + "MBEDTLS_ARMV8CE_AES_C", 387 | +#endif /* MBEDTLS_ARMV8CE_AES_C */ 388 | #if defined(MBEDTLS_AES_C) 389 | "MBEDTLS_AES_C", 390 | #endif /* MBEDTLS_AES_C */ 391 | -------------------------------------------------------------------------------- /openwrt-23.05/seed/ao-R4S-mini.seed: -------------------------------------------------------------------------------- 1 | CONFIG_TARGET_rockchip=y 2 | CONFIG_TARGET_rockchip_armv8=y 3 | CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r4s=y 4 | CONFIG_DEVEL=y 5 | CONFIG_TOOLCHAINOPTS=y 6 | CONFIG_BIND_ENABLE_DOH=y 7 | CONFIG_BPF_TOOLCHAIN_HOST=y 8 | CONFIG_BPF_TOOLCHAIN_HOST_PATH="" 9 | # CONFIG_BPF_TOOLCHAIN_NONE is not set 10 | CONFIG_COREMARK_ENABLE_MULTITHREADING=y 11 | CONFIG_COREMARK_NUMBER_OF_THREADS=16 12 | CONFIG_COREMARK_OPTIMIZE_O3=y 13 | CONFIG_EXPERIMENTAL=y 14 | CONFIG_HAS_BPF_TOOLCHAIN=y 15 | CONFIG_IFSTAT_SNMP=y 16 | CONFIG_IPERF_ENABLE_MULTICAST=y 17 | CONFIG_KERNEL_ARM_PMU=y 18 | CONFIG_KERNEL_BLK_DEV_THROTTLING_LOW=y 19 | CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y 20 | CONFIG_KERNEL_BUILD_DOMAIN="openwrt" 21 | CONFIG_KERNEL_BUILD_USER="ao" 22 | CONFIG_KERNEL_CFQ_GROUP_IOSCHED=y 23 | CONFIG_KERNEL_CGROUP_DEVICE=y 24 | CONFIG_KERNEL_CGROUP_FREEZER=y 25 | CONFIG_KERNEL_CGROUP_HUGETLB=y 26 | CONFIG_KERNEL_CGROUP_NET_PRIO=y 27 | CONFIG_KERNEL_CGROUP_PERF=y 28 | CONFIG_KERNEL_DEBUG_BLK_CGROUP=y 29 | CONFIG_KERNEL_EXT4_FS_POSIX_ACL=y 30 | CONFIG_KERNEL_EXT4_FS_SECURITY=y 31 | CONFIG_KERNEL_FS_POSIX_ACL=y 32 | CONFIG_KERNEL_HUGETLBFS=y 33 | CONFIG_KERNEL_HUGETLB_PAGE=y 34 | CONFIG_KERNEL_MEMCG_SWAP_ENABLED=y 35 | CONFIG_KERNEL_NET_CLS_CGROUP=y 36 | CONFIG_KERNEL_PERF_EVENTS=y 37 | CONFIG_KERNEL_PROC_PID_CPUSET=y 38 | CONFIG_KERNEL_TRANSPARENT_HUGEPAGE=y 39 | CONFIG_KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS=y 40 | CONFIG_LIBCURL_COOKIES=y 41 | CONFIG_LIBCURL_FILE=y 42 | CONFIG_LIBCURL_FTP=y 43 | CONFIG_LIBCURL_HTTP=y 44 | CONFIG_LIBCURL_NGHTTP2=y 45 | CONFIG_LIBCURL_NO_SMB="!" 46 | CONFIG_LIBCURL_OPENSSL=y 47 | CONFIG_LIBCURL_PROXY=y 48 | CONFIG_LIBCURL_UNIX_SOCKETS=y 49 | CONFIG_OPENSSL_ENGINE=y 50 | CONFIG_OPENSSL_OPTIMIZE_SPEED=y 51 | CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=y 52 | CONFIG_OPENSSL_WITH_ASM=y 53 | CONFIG_OPENSSL_WITH_CHACHA_POLY1305=y 54 | CONFIG_OPENSSL_WITH_CMS=y 55 | CONFIG_OPENSSL_WITH_DEPRECATED=y 56 | CONFIG_OPENSSL_WITH_ERROR_MESSAGES=y 57 | CONFIG_OPENSSL_WITH_IDEA=y 58 | CONFIG_OPENSSL_WITH_MDC2=y 59 | CONFIG_OPENSSL_WITH_PSK=y 60 | CONFIG_OPENSSL_WITH_SEED=y 61 | CONFIG_OPENSSL_WITH_SRP=y 62 | CONFIG_OPENSSL_WITH_TLS13=y 63 | CONFIG_OPENSSL_WITH_WHIRLPOOL=y 64 | CONFIG_OPENVPN_openssl_ENABLE_DEF_AUTH=y 65 | CONFIG_OPENVPN_openssl_ENABLE_FRAGMENT=y 66 | CONFIG_OPENVPN_openssl_ENABLE_IPROUTE2=y 67 | CONFIG_OPENVPN_openssl_ENABLE_LZ4=y 68 | CONFIG_OPENVPN_openssl_ENABLE_LZO=y 69 | CONFIG_OPENVPN_openssl_ENABLE_MULTIHOME=y 70 | CONFIG_OPENVPN_openssl_ENABLE_PF=y 71 | CONFIG_OPENVPN_openssl_ENABLE_PORT_SHARE=y 72 | CONFIG_OPENVPN_openssl_ENABLE_SMALL=y 73 | CONFIG_PACKAGE_acme=y 74 | CONFIG_PACKAGE_acme-acmesh=y 75 | CONFIG_PACKAGE_acme-acmesh-dnsapi=y 76 | CONFIG_PACKAGE_acme-common=y 77 | CONFIG_PACKAGE_adguardhome=y 78 | CONFIG_PACKAGE_alsa-lib=y 79 | CONFIG_PACKAGE_alsa-ucm-conf=y 80 | CONFIG_PACKAGE_alsa-utils=y 81 | CONFIG_PACKAGE_arptables-nft=y 82 | CONFIG_PACKAGE_avahi-dbus-daemon=y 83 | CONFIG_PACKAGE_bind-check=y 84 | CONFIG_PACKAGE_bind-client=y 85 | CONFIG_PACKAGE_bind-ddns-confgen=y 86 | CONFIG_PACKAGE_bind-dig=y 87 | CONFIG_PACKAGE_bind-dnssec=y 88 | CONFIG_PACKAGE_bind-host=y 89 | CONFIG_PACKAGE_bind-libs=y 90 | CONFIG_PACKAGE_bind-nslookup=y 91 | CONFIG_PACKAGE_bind-rndc=y 92 | CONFIG_PACKAGE_bind-tools=y 93 | CONFIG_PACKAGE_blkid=y 94 | CONFIG_PACKAGE_bmon=y 95 | CONFIG_PACKAGE_bridge=y 96 | CONFIG_PACKAGE_ca-certificates=y 97 | CONFIG_PACKAGE_cfdisk=y 98 | CONFIG_PACKAGE_cgi-io=y 99 | CONFIG_PACKAGE_collectd=y 100 | CONFIG_PACKAGE_collectd-mod-cpu=y 101 | CONFIG_PACKAGE_collectd-mod-interface=y 102 | CONFIG_PACKAGE_collectd-mod-iwinfo=y 103 | CONFIG_PACKAGE_collectd-mod-load=y 104 | CONFIG_PACKAGE_collectd-mod-memory=y 105 | CONFIG_PACKAGE_collectd-mod-network=y 106 | CONFIG_PACKAGE_collectd-mod-rrdtool=y 107 | CONFIG_PACKAGE_confuse=y 108 | CONFIG_PACKAGE_conntrack=y 109 | CONFIG_PACKAGE_conntrackd=y 110 | CONFIG_PACKAGE_coremark=y 111 | CONFIG_PACKAGE_coreutils=y 112 | CONFIG_PACKAGE_coreutils-sort=y 113 | CONFIG_PACKAGE_curl=y 114 | CONFIG_PACKAGE_dbus=y 115 | CONFIG_PACKAGE_dbus-utils=y 116 | CONFIG_PACKAGE_ddns-scripts=y 117 | CONFIG_PACKAGE_ddns-scripts-cloudflare=y 118 | CONFIG_PACKAGE_ddns-scripts-cnkuai=y 119 | CONFIG_PACKAGE_ddns-scripts-digitalocean=y 120 | CONFIG_PACKAGE_ddns-scripts-freedns=y 121 | CONFIG_PACKAGE_ddns-scripts-gandi=y 122 | CONFIG_PACKAGE_ddns-scripts-godaddy=y 123 | CONFIG_PACKAGE_ddns-scripts-noip=y 124 | CONFIG_PACKAGE_ddns-scripts-nsupdate=y 125 | CONFIG_PACKAGE_ddns-scripts-route53=y 126 | CONFIG_PACKAGE_ddns-scripts-services=y 127 | CONFIG_PACKAGE_diffutils=y 128 | # CONFIG_PACKAGE_dnsmasq is not set 129 | CONFIG_PACKAGE_dnsmasq-full=y 130 | CONFIG_PACKAGE_dnsmasq_full_auth=y 131 | CONFIG_PACKAGE_dnsmasq_full_conntrack=y 132 | CONFIG_PACKAGE_dnsmasq_full_dhcp=y 133 | CONFIG_PACKAGE_dnsmasq_full_dhcpv6=y 134 | CONFIG_PACKAGE_dnsmasq_full_dnssec=y 135 | CONFIG_PACKAGE_dnsmasq_full_nftset=y 136 | CONFIG_PACKAGE_dnsmasq_full_noid=y 137 | CONFIG_PACKAGE_dnsmasq_full_tftp=y 138 | CONFIG_PACKAGE_ds-lite=y 139 | CONFIG_PACKAGE_ebtables-nft=y 140 | CONFIG_PACKAGE_etherwake=y 141 | CONFIG_PACKAGE_f2fs-tools=y 142 | CONFIG_PACKAGE_f2fsck=y 143 | CONFIG_PACKAGE_giflib-utils=y 144 | CONFIG_PACKAGE_halog=y 145 | CONFIG_PACKAGE_haproxy=y 146 | CONFIG_PACKAGE_ifstat=y 147 | CONFIG_PACKAGE_iftop=y 148 | CONFIG_PACKAGE_igmpproxy=y 149 | CONFIG_PACKAGE_ip-full=y 150 | CONFIG_PACKAGE_ip6tables-nft=y 151 | CONFIG_PACKAGE_iperf=y 152 | CONFIG_PACKAGE_iperf3=y 153 | CONFIG_PACKAGE_ipset=y 154 | CONFIG_PACKAGE_iptables-mod-conntrack-extra=y 155 | CONFIG_PACKAGE_iptables-mod-ipopt=y 156 | CONFIG_PACKAGE_iptables-nft=y 157 | CONFIG_PACKAGE_jq=y 158 | CONFIG_PACKAGE_kmod-arptables=y 159 | CONFIG_PACKAGE_kmod-asn1-decoder=y 160 | CONFIG_PACKAGE_kmod-asn1-encoder=y 161 | CONFIG_PACKAGE_kmod-br-netfilter=y 162 | CONFIG_PACKAGE_kmod-crypto-aead=y 163 | CONFIG_PACKAGE_kmod-crypto-arc4=y 164 | CONFIG_PACKAGE_kmod-crypto-authenc=y 165 | CONFIG_PACKAGE_kmod-crypto-cbc=y 166 | CONFIG_PACKAGE_kmod-crypto-ccm=y 167 | CONFIG_PACKAGE_kmod-crypto-cmac=y 168 | CONFIG_PACKAGE_kmod-crypto-crc32=y 169 | CONFIG_PACKAGE_kmod-crypto-ctr=y 170 | CONFIG_PACKAGE_kmod-crypto-deflate=y 171 | CONFIG_PACKAGE_kmod-crypto-des=y 172 | CONFIG_PACKAGE_kmod-crypto-ecb=y 173 | CONFIG_PACKAGE_kmod-crypto-echainiv=y 174 | CONFIG_PACKAGE_kmod-crypto-gcm=y 175 | CONFIG_PACKAGE_kmod-crypto-gf128=y 176 | CONFIG_PACKAGE_kmod-crypto-ghash=y 177 | CONFIG_PACKAGE_kmod-crypto-hmac=y 178 | CONFIG_PACKAGE_kmod-crypto-kpp=y 179 | CONFIG_PACKAGE_kmod-crypto-lib-chacha20=y 180 | CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=y 181 | CONFIG_PACKAGE_kmod-crypto-lib-curve25519=y 182 | CONFIG_PACKAGE_kmod-crypto-lib-poly1305=y 183 | CONFIG_PACKAGE_kmod-crypto-manager=y 184 | CONFIG_PACKAGE_kmod-crypto-md4=y 185 | CONFIG_PACKAGE_kmod-crypto-md5=y 186 | CONFIG_PACKAGE_kmod-crypto-null=y 187 | CONFIG_PACKAGE_kmod-crypto-rng=y 188 | CONFIG_PACKAGE_kmod-crypto-seqiv=y 189 | CONFIG_PACKAGE_kmod-crypto-sha1=y 190 | CONFIG_PACKAGE_kmod-crypto-sha256=y 191 | CONFIG_PACKAGE_kmod-crypto-sha512=y 192 | CONFIG_PACKAGE_kmod-crypto-user=y 193 | CONFIG_PACKAGE_kmod-cryptodev=y 194 | CONFIG_PACKAGE_kmod-dax=y 195 | CONFIG_PACKAGE_kmod-dm=y 196 | CONFIG_PACKAGE_kmod-dummy=y 197 | CONFIG_PACKAGE_kmod-ebtables=y 198 | CONFIG_PACKAGE_kmod-fs-ext4=y 199 | CONFIG_PACKAGE_kmod-fs-f2fs=y 200 | CONFIG_PACKAGE_kmod-fs-squashfs=y 201 | CONFIG_PACKAGE_kmod-fs-vfat=y 202 | CONFIG_PACKAGE_kmod-hwmon-core=y 203 | CONFIG_PACKAGE_kmod-i2c-core=y 204 | CONFIG_PACKAGE_kmod-ifb=y 205 | CONFIG_PACKAGE_kmod-ikconfig=y 206 | CONFIG_PACKAGE_kmod-input-core=y 207 | CONFIG_PACKAGE_kmod-ip6-tunnel=y 208 | CONFIG_PACKAGE_kmod-ip6tables=y 209 | CONFIG_PACKAGE_kmod-ipsec=y 210 | CONFIG_PACKAGE_kmod-ipt-conntrack=y 211 | CONFIG_PACKAGE_kmod-ipt-conntrack-extra=y 212 | CONFIG_PACKAGE_kmod-ipt-core=y 213 | CONFIG_PACKAGE_kmod-ipt-ipopt=y 214 | CONFIG_PACKAGE_kmod-ipt-ipset=y 215 | CONFIG_PACKAGE_kmod-ipt-raw=y 216 | CONFIG_PACKAGE_kmod-iptunnel=y 217 | CONFIG_PACKAGE_kmod-iptunnel6=y 218 | CONFIG_PACKAGE_kmod-keys-encrypted=y 219 | CONFIG_PACKAGE_kmod-keys-trusted=y 220 | CONFIG_PACKAGE_kmod-lib-crc16=y 221 | CONFIG_PACKAGE_kmod-lib-textsearch=y 222 | CONFIG_PACKAGE_kmod-lib-zlib-deflate=y 223 | CONFIG_PACKAGE_kmod-lib-zlib-inflate=y 224 | CONFIG_PACKAGE_kmod-lib-zstd=y 225 | CONFIG_PACKAGE_kmod-libphy=y 226 | CONFIG_PACKAGE_kmod-mii=y 227 | CONFIG_PACKAGE_kmod-nf-conncount=y 228 | CONFIG_PACKAGE_kmod-nf-conntrack-netlink=y 229 | CONFIG_PACKAGE_kmod-nf-ipt=y 230 | CONFIG_PACKAGE_kmod-nf-ipt6=y 231 | CONFIG_PACKAGE_kmod-nf-ipvs=y 232 | CONFIG_PACKAGE_kmod-nf-nathelper=y 233 | CONFIG_PACKAGE_kmod-nf-tproxy=y 234 | CONFIG_PACKAGE_kmod-nfnetlink-log=y 235 | CONFIG_PACKAGE_kmod-nfnetlink-queue=y 236 | CONFIG_PACKAGE_kmod-nft-arp=y 237 | CONFIG_PACKAGE_kmod-nft-bridge=y 238 | CONFIG_PACKAGE_kmod-nft-compat=y 239 | CONFIG_PACKAGE_kmod-nft-queue=y 240 | CONFIG_PACKAGE_kmod-nls-base=y 241 | CONFIG_PACKAGE_kmod-nls-cp437=y 242 | CONFIG_PACKAGE_kmod-nls-iso8859-1=y 243 | CONFIG_PACKAGE_kmod-nls-utf8=y 244 | CONFIG_PACKAGE_kmod-oid-registry=y 245 | CONFIG_PACKAGE_kmod-phy-realtek=y 246 | # CONFIG_PACKAGE_kmod-ppp is not set 247 | CONFIG_PACKAGE_kmod-random-core=y 248 | CONFIG_PACKAGE_kmod-sched=y 249 | CONFIG_PACKAGE_kmod-sched-bpf=y 250 | CONFIG_PACKAGE_kmod-sched-cake=y 251 | CONFIG_PACKAGE_kmod-sched-connmark=y 252 | CONFIG_PACKAGE_kmod-sched-core=y 253 | CONFIG_PACKAGE_kmod-sound-core=y 254 | CONFIG_PACKAGE_kmod-sound-usb-caiaq=y 255 | CONFIG_PACKAGE_kmod-tcp-bbr=y 256 | CONFIG_PACKAGE_kmod-tpm=y 257 | CONFIG_PACKAGE_kmod-tun=y 258 | CONFIG_PACKAGE_kmod-udptunnel4=y 259 | CONFIG_PACKAGE_kmod-udptunnel6=y 260 | CONFIG_PACKAGE_kmod-usb-audio=y 261 | CONFIG_PACKAGE_kmod-usb-core=y 262 | CONFIG_PACKAGE_kmod-usb-dwc2=y 263 | CONFIG_PACKAGE_kmod-usb-dwc3=y 264 | CONFIG_PACKAGE_kmod-usb-ehci=y 265 | CONFIG_PACKAGE_kmod-usb-gadget=y 266 | CONFIG_PACKAGE_kmod-usb-net=y 267 | CONFIG_PACKAGE_kmod-usb-net-cdc-ether=y 268 | CONFIG_PACKAGE_kmod-usb-net-cdc-ncm=y 269 | CONFIG_PACKAGE_kmod-usb-net-rtl8152=y 270 | CONFIG_PACKAGE_kmod-usb-roles=y 271 | CONFIG_PACKAGE_kmod-usb-xhci-hcd=y 272 | CONFIG_PACKAGE_kmod-usb2=y 273 | CONFIG_PACKAGE_kmod-usb3=y 274 | CONFIG_PACKAGE_kmod-veth=y 275 | CONFIG_PACKAGE_kmod-vxlan=y 276 | CONFIG_PACKAGE_kmod-wireguard=y 277 | CONFIG_PACKAGE_libatomic=y 278 | CONFIG_PACKAGE_libattr=y 279 | CONFIG_PACKAGE_libavahi-client=y 280 | CONFIG_PACKAGE_libavahi-dbus-support=y 281 | CONFIG_PACKAGE_libbpf=y 282 | CONFIG_PACKAGE_libconfig=y 283 | CONFIG_PACKAGE_libcurl=y 284 | CONFIG_PACKAGE_libdaemon=y 285 | CONFIG_PACKAGE_libdbus=y 286 | CONFIG_PACKAGE_libelf=y 287 | CONFIG_PACKAGE_libexpat=y 288 | CONFIG_PACKAGE_libfdisk=y 289 | CONFIG_PACKAGE_libgmp=y 290 | CONFIG_PACKAGE_libi2c=y 291 | CONFIG_PACKAGE_libip4tc=y 292 | CONFIG_PACKAGE_libip6tc=y 293 | CONFIG_PACKAGE_libiperf3=y 294 | CONFIG_PACKAGE_libipset=y 295 | CONFIG_PACKAGE_libiptext=y 296 | CONFIG_PACKAGE_libiptext-nft=y 297 | CONFIG_PACKAGE_libiptext6=y 298 | CONFIG_PACKAGE_libiwinfo=y 299 | CONFIG_PACKAGE_libiwinfo-data=y 300 | CONFIG_PACKAGE_libiwinfo-lua=y 301 | CONFIG_PACKAGE_libltdl=y 302 | CONFIG_PACKAGE_liblua=y 303 | CONFIG_PACKAGE_liblua5.3=y 304 | CONFIG_PACKAGE_liblucihttp=y 305 | CONFIG_PACKAGE_liblucihttp-lua=y 306 | CONFIG_PACKAGE_liblzo=y 307 | CONFIG_PACKAGE_libmbedtls=m 308 | CONFIG_PACKAGE_libmount=y 309 | CONFIG_PACKAGE_libncurses=y 310 | CONFIG_PACKAGE_libnetfilter-conntrack=y 311 | CONFIG_PACKAGE_libnetfilter-cthelper=y 312 | CONFIG_PACKAGE_libnetfilter-cttimeout=y 313 | CONFIG_PACKAGE_libnetfilter-queue=y 314 | CONFIG_PACKAGE_libnetsnmp=y 315 | CONFIG_PACKAGE_libnettle=y 316 | CONFIG_PACKAGE_libnfnetlink=y 317 | CONFIG_PACKAGE_libnghttp2=y 318 | CONFIG_PACKAGE_libnl-core=y 319 | CONFIG_PACKAGE_libnl-route=y 320 | CONFIG_PACKAGE_libopenssl=y 321 | CONFIG_PACKAGE_libopenssl-conf=y 322 | CONFIG_PACKAGE_libopenssl-devcrypto=y 323 | CONFIG_PACKAGE_libpcap=y 324 | CONFIG_PACKAGE_libpci=y 325 | CONFIG_PACKAGE_libpcre=y 326 | CONFIG_PACKAGE_libpopt=y 327 | CONFIG_PACKAGE_libreadline=y 328 | CONFIG_PACKAGE_librrd1=y 329 | CONFIG_PACKAGE_libseccomp=y 330 | CONFIG_PACKAGE_libsensors=y 331 | CONFIG_PACKAGE_libsoxr=y 332 | CONFIG_PACKAGE_libstdcpp=y 333 | CONFIG_PACKAGE_libsysfs=y 334 | CONFIG_PACKAGE_libubus-lua=y 335 | # CONFIG_PACKAGE_libustream-mbedtls is not set 336 | CONFIG_PACKAGE_libustream-openssl=y 337 | CONFIG_PACKAGE_libuv=y 338 | CONFIG_PACKAGE_libxtables=y 339 | CONFIG_PACKAGE_losetup=y 340 | CONFIG_PACKAGE_lua=y 341 | CONFIG_PACKAGE_mount-utils=y 342 | CONFIG_PACKAGE_mt7601u-firmware=y 343 | CONFIG_PACKAGE_nano=y 344 | CONFIG_PACKAGE_netcat=y 345 | CONFIG_PACKAGE_netperf=y 346 | CONFIG_PACKAGE_nlbwmon=y 347 | CONFIG_PACKAGE_nstat=y 348 | CONFIG_PACKAGE_ntpclient=y 349 | CONFIG_PACKAGE_openssl-util=y 350 | CONFIG_PACKAGE_openvpn-openssl=y 351 | CONFIG_PACKAGE_pbr=y 352 | CONFIG_PACKAGE_picocom=y 353 | # CONFIG_PACKAGE_ppp is not set 354 | CONFIG_PACKAGE_qos-scripts=y 355 | CONFIG_PACKAGE_qosify=y 356 | CONFIG_PACKAGE_r8152-firmware=y 357 | CONFIG_PACKAGE_r8169-firmware=y 358 | CONFIG_PACKAGE_resolveip=y 359 | CONFIG_PACKAGE_rng-tools=y 360 | CONFIG_PACKAGE_rpcd=y 361 | CONFIG_PACKAGE_rpcd-mod-file=y 362 | CONFIG_PACKAGE_rpcd-mod-iwinfo=y 363 | CONFIG_PACKAGE_rpcd-mod-luci=y 364 | CONFIG_PACKAGE_rpcd-mod-rrdns=y 365 | CONFIG_PACKAGE_rrdtool1=y 366 | CONFIG_PACKAGE_shairport-sync-openssl=y 367 | CONFIG_PACKAGE_socat=y 368 | CONFIG_PACKAGE_speedtest-netperf=y 369 | CONFIG_PACKAGE_sqm-scripts=y 370 | CONFIG_PACKAGE_sqm-scripts-extra=y 371 | CONFIG_PACKAGE_sysfsutils=y 372 | CONFIG_PACKAGE_tc-full=y 373 | CONFIG_PACKAGE_tc-mod-iptables=y 374 | CONFIG_PACKAGE_tcpdump=y 375 | CONFIG_PACKAGE_terminfo=y 376 | CONFIG_PACKAGE_tinyproxy=y 377 | CONFIG_PACKAGE_uhttpd=y 378 | CONFIG_PACKAGE_uhttpd-mod-ubus=y 379 | CONFIG_PACKAGE_watchcat=y 380 | CONFIG_PACKAGE_wget-ssl=y 381 | CONFIG_PACKAGE_wireguard-tools=y 382 | CONFIG_PACKAGE_wireless-regdb=y 383 | CONFIG_PACKAGE_xtables-nft=y 384 | CONFIG_PACKAGE_zlib=y 385 | CONFIG_PACKAGE_zoneinfo-core=y 386 | CONFIG_PACKAGE_zoneinfo-europe=y 387 | CONFIG_SOCAT_SSL=y 388 | # CONFIG_TARGET_IMAGES_GZIP is not set 389 | CONFIG_TARGET_KERNEL_PARTSIZE=20 390 | CONFIG_TARGET_OPTIMIZATION="-O3 -pipe -mcpu=cortex-a72.cortex-a53+crypto+crc" 391 | CONFIG_TARGET_OPTIONS=y 392 | CONFIG_TARGET_ROOTFS_PARTSIZE=1024 393 | CONFIG_USE_LLVM_HOST=y 394 | CONFIG_PACKAGE_kmod-lib-crc-ccitt=y 395 | -------------------------------------------------------------------------------- /openwrt-23.05/seed/ao-R4S-mini.seed.orig: -------------------------------------------------------------------------------- 1 | CONFIG_TARGET_rockchip=y 2 | CONFIG_TARGET_rockchip_armv8=y 3 | CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r4s=y 4 | CONFIG_DEVEL=y 5 | CONFIG_TOOLCHAINOPTS=y 6 | CONFIG_BIND_ENABLE_DOH=y 7 | CONFIG_COREMARK_ENABLE_MULTITHREADING=y 8 | CONFIG_COREMARK_NUMBER_OF_THREADS=16 9 | CONFIG_COREMARK_OPTIMIZE_O3=y 10 | CONFIG_EXPERIMENTAL=y 11 | CONFIG_GCC_USE_VERSION_10=y 12 | # CONFIG_GCC_USE_VERSION_11 is not set 13 | CONFIG_GCC_VERSION="10.3.0" 14 | CONFIG_GCC_VERSION_10=y 15 | CONFIG_IFSTAT_SNMP=y 16 | CONFIG_IPERF_ENABLE_MULTICAST=y 17 | CONFIG_KERNEL_ARM_PMU=y 18 | CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y 19 | CONFIG_KERNEL_BUILD_DOMAIN="openwrt" 20 | CONFIG_KERNEL_BUILD_USER="ao" 21 | # CONFIG_KERNEL_CGROUPS is not set 22 | CONFIG_KERNEL_EXT4_FS_POSIX_ACL=y 23 | CONFIG_KERNEL_EXT4_FS_SECURITY=y 24 | CONFIG_KERNEL_FS_POSIX_ACL=y 25 | CONFIG_KERNEL_HUGETLBFS=y 26 | CONFIG_KERNEL_HUGETLB_PAGE=y 27 | # CONFIG_KERNEL_NAMESPACES is not set 28 | CONFIG_KERNEL_PERF_EVENTS=y 29 | CONFIG_KERNEL_TRANSPARENT_HUGEPAGE=y 30 | CONFIG_KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS=y 31 | CONFIG_LIBCURL_COOKIES=y 32 | CONFIG_LIBCURL_FILE=y 33 | CONFIG_LIBCURL_FTP=y 34 | CONFIG_LIBCURL_HTTP=y 35 | CONFIG_LIBCURL_NGHTTP2=y 36 | CONFIG_LIBCURL_NO_SMB="!" 37 | CONFIG_LIBCURL_PROXY=y 38 | CONFIG_LIBCURL_WOLFSSL=y 39 | CONFIG_LUCI_LANG_en=y 40 | CONFIG_OPENSSL_ENGINE=y 41 | CONFIG_OPENSSL_OPTIMIZE_SPEED=y 42 | CONFIG_OPENSSL_WITH_ASM=y 43 | CONFIG_OPENSSL_WITH_CHACHA_POLY1305=y 44 | CONFIG_OPENSSL_WITH_CMS=y 45 | CONFIG_OPENSSL_WITH_DEPRECATED=y 46 | CONFIG_OPENSSL_WITH_ERROR_MESSAGES=y 47 | CONFIG_OPENSSL_WITH_PSK=y 48 | CONFIG_OPENSSL_WITH_SRP=y 49 | CONFIG_OPENSSL_WITH_TLS13=y 50 | CONFIG_OPENVPN_openssl_ENABLE_DEF_AUTH=y 51 | CONFIG_OPENVPN_openssl_ENABLE_FRAGMENT=y 52 | CONFIG_OPENVPN_openssl_ENABLE_IPROUTE2=y 53 | CONFIG_OPENVPN_openssl_ENABLE_LZ4=y 54 | CONFIG_OPENVPN_openssl_ENABLE_LZO=y 55 | CONFIG_OPENVPN_openssl_ENABLE_MULTIHOME=y 56 | CONFIG_OPENVPN_openssl_ENABLE_PF=y 57 | CONFIG_OPENVPN_openssl_ENABLE_PORT_SHARE=y 58 | CONFIG_OPENVPN_openssl_ENABLE_SMALL=y 59 | CONFIG_PACKAGE_acme=y 60 | CONFIG_PACKAGE_acme-dnsapi=y 61 | CONFIG_PACKAGE_adblock=y 62 | CONFIG_PACKAGE_alsa-lib=y 63 | CONFIG_PACKAGE_alsa-ucm-conf=y 64 | CONFIG_PACKAGE_alsa-utils=y 65 | CONFIG_PACKAGE_avahi-dbus-daemon=y 66 | CONFIG_PACKAGE_banip=y 67 | CONFIG_PACKAGE_bind-check=y 68 | CONFIG_PACKAGE_bind-client=y 69 | CONFIG_PACKAGE_bind-dig=y 70 | CONFIG_PACKAGE_bind-dnssec=y 71 | CONFIG_PACKAGE_bind-host=y 72 | CONFIG_PACKAGE_bind-libs=y 73 | CONFIG_PACKAGE_bind-nslookup=y 74 | CONFIG_PACKAGE_bind-rndc=y 75 | CONFIG_PACKAGE_bind-tools=y 76 | CONFIG_PACKAGE_blkid=y 77 | CONFIG_PACKAGE_bmon=y 78 | CONFIG_PACKAGE_bridge=y 79 | CONFIG_PACKAGE_ca-certificates=y 80 | CONFIG_PACKAGE_cfdisk=y 81 | CONFIG_PACKAGE_cgi-io=y 82 | CONFIG_PACKAGE_collectd=y 83 | CONFIG_PACKAGE_collectd-mod-cpu=y 84 | CONFIG_PACKAGE_collectd-mod-interface=y 85 | CONFIG_PACKAGE_collectd-mod-iwinfo=y 86 | CONFIG_PACKAGE_collectd-mod-load=y 87 | CONFIG_PACKAGE_collectd-mod-memory=y 88 | CONFIG_PACKAGE_collectd-mod-network=y 89 | CONFIG_PACKAGE_collectd-mod-rrdtool=y 90 | CONFIG_PACKAGE_confuse=y 91 | CONFIG_PACKAGE_conntrack=y 92 | CONFIG_PACKAGE_conntrackd=y 93 | CONFIG_PACKAGE_coremark=y 94 | CONFIG_PACKAGE_coreutils=y 95 | CONFIG_PACKAGE_coreutils-sort=y 96 | CONFIG_PACKAGE_curl=y 97 | CONFIG_PACKAGE_dbus=y 98 | CONFIG_PACKAGE_dbus-utils=y 99 | CONFIG_PACKAGE_ddns-scripts=y 100 | CONFIG_PACKAGE_ddns-scripts-cloudflare=y 101 | CONFIG_PACKAGE_ddns-scripts-cnkuai=y 102 | CONFIG_PACKAGE_ddns-scripts-digitalocean=y 103 | CONFIG_PACKAGE_ddns-scripts-freedns=y 104 | CONFIG_PACKAGE_ddns-scripts-gandi=y 105 | CONFIG_PACKAGE_ddns-scripts-godaddy=y 106 | CONFIG_PACKAGE_ddns-scripts-noip=y 107 | CONFIG_PACKAGE_ddns-scripts-nsupdate=y 108 | CONFIG_PACKAGE_ddns-scripts-route53=y 109 | CONFIG_PACKAGE_ddns-scripts-services=y 110 | CONFIG_PACKAGE_diffutils=y 111 | # CONFIG_PACKAGE_dnsmasq is not set 112 | CONFIG_PACKAGE_dnsmasq-full=y 113 | CONFIG_PACKAGE_dnsmasq_full_auth=y 114 | CONFIG_PACKAGE_dnsmasq_full_conntrack=y 115 | CONFIG_PACKAGE_dnsmasq_full_dhcp=y 116 | CONFIG_PACKAGE_dnsmasq_full_dhcpv6=y 117 | CONFIG_PACKAGE_dnsmasq_full_dnssec=y 118 | CONFIG_PACKAGE_dnsmasq_full_ipset=y 119 | CONFIG_PACKAGE_dnsmasq_full_noid=y 120 | CONFIG_PACKAGE_dnsmasq_full_tftp=y 121 | CONFIG_PACKAGE_ds-lite=y 122 | CONFIG_PACKAGE_etherwake=y 123 | CONFIG_PACKAGE_f2fs-tools=y 124 | CONFIG_PACKAGE_f2fsck=y 125 | CONFIG_PACKAGE_giflib-utils=y 126 | CONFIG_PACKAGE_halog=y 127 | CONFIG_PACKAGE_haproxy=y 128 | CONFIG_PACKAGE_ifstat=y 129 | CONFIG_PACKAGE_iftop=y 130 | CONFIG_PACKAGE_igmpproxy=y 131 | CONFIG_PACKAGE_ip-full=y 132 | CONFIG_PACKAGE_ip-tiny=y 133 | CONFIG_PACKAGE_ip6tables-extra=y 134 | CONFIG_PACKAGE_ip6tables-legacy=y 135 | CONFIG_PACKAGE_ip6tables-mod-nat=y 136 | CONFIG_PACKAGE_ip6tables-nft=y 137 | CONFIG_PACKAGE_iperf=y 138 | CONFIG_PACKAGE_iperf3=y 139 | CONFIG_PACKAGE_ipset=y 140 | CONFIG_PACKAGE_iptables-legacy=y 141 | CONFIG_PACKAGE_iptables-mod-conntrack-extra=y 142 | CONFIG_PACKAGE_iptables-mod-iface=y 143 | CONFIG_PACKAGE_iptables-mod-ipmark=y 144 | CONFIG_PACKAGE_iptables-mod-ipopt=y 145 | CONFIG_PACKAGE_iptables-mod-physdev=y 146 | CONFIG_PACKAGE_iptables-mod-proto=y 147 | CONFIG_PACKAGE_iptables-mod-rpfilter=y 148 | CONFIG_PACKAGE_jq=y 149 | CONFIG_PACKAGE_kmod-backlight=y 150 | CONFIG_PACKAGE_kmod-backlight-pwm=y 151 | CONFIG_PACKAGE_kmod-br-netfilter=y 152 | CONFIG_PACKAGE_kmod-crypto-acompress=y 153 | CONFIG_PACKAGE_kmod-crypto-aead=y 154 | CONFIG_PACKAGE_kmod-crypto-arc4=y 155 | CONFIG_PACKAGE_kmod-crypto-authenc=y 156 | CONFIG_PACKAGE_kmod-crypto-cbc=y 157 | CONFIG_PACKAGE_kmod-crypto-ccm=y 158 | CONFIG_PACKAGE_kmod-crypto-cmac=y 159 | CONFIG_PACKAGE_kmod-crypto-crc32=y 160 | CONFIG_PACKAGE_kmod-crypto-ctr=y 161 | CONFIG_PACKAGE_kmod-crypto-deflate=y 162 | CONFIG_PACKAGE_kmod-crypto-des=y 163 | CONFIG_PACKAGE_kmod-crypto-ecb=y 164 | CONFIG_PACKAGE_kmod-crypto-echainiv=y 165 | CONFIG_PACKAGE_kmod-crypto-gcm=y 166 | CONFIG_PACKAGE_kmod-crypto-gf128=y 167 | CONFIG_PACKAGE_kmod-crypto-ghash=y 168 | CONFIG_PACKAGE_kmod-crypto-hmac=y 169 | CONFIG_PACKAGE_kmod-crypto-kpp=y 170 | CONFIG_PACKAGE_kmod-crypto-lib-blake2s=y 171 | CONFIG_PACKAGE_kmod-crypto-lib-chacha20=y 172 | CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=y 173 | CONFIG_PACKAGE_kmod-crypto-lib-curve25519=y 174 | CONFIG_PACKAGE_kmod-crypto-lib-poly1305=y 175 | CONFIG_PACKAGE_kmod-crypto-manager=y 176 | CONFIG_PACKAGE_kmod-crypto-md4=y 177 | CONFIG_PACKAGE_kmod-crypto-md5=y 178 | CONFIG_PACKAGE_kmod-crypto-null=y 179 | CONFIG_PACKAGE_kmod-crypto-rng=y 180 | CONFIG_PACKAGE_kmod-crypto-seqiv=y 181 | CONFIG_PACKAGE_kmod-crypto-sha1=y 182 | CONFIG_PACKAGE_kmod-crypto-sha256=y 183 | CONFIG_PACKAGE_kmod-crypto-sha512=y 184 | CONFIG_PACKAGE_kmod-crypto-user=y 185 | CONFIG_PACKAGE_kmod-cryptodev=y 186 | CONFIG_PACKAGE_kmod-dax=y 187 | CONFIG_PACKAGE_kmod-dm=y 188 | CONFIG_PACKAGE_kmod-dma-buf=y 189 | CONFIG_PACKAGE_kmod-drm=y 190 | CONFIG_PACKAGE_kmod-drm-kms-helper=y 191 | CONFIG_PACKAGE_kmod-drm-rockchip=y 192 | CONFIG_PACKAGE_kmod-dummy=y 193 | CONFIG_PACKAGE_kmod-fb=y 194 | CONFIG_PACKAGE_kmod-fb-cfb-copyarea=y 195 | CONFIG_PACKAGE_kmod-fb-cfb-fillrect=y 196 | CONFIG_PACKAGE_kmod-fb-cfb-imgblt=y 197 | CONFIG_PACKAGE_kmod-fb-sys-fops=y 198 | CONFIG_PACKAGE_kmod-fb-sys-ram=y 199 | CONFIG_PACKAGE_kmod-fs-ext4=y 200 | CONFIG_PACKAGE_kmod-fs-f2fs=y 201 | CONFIG_PACKAGE_kmod-fs-squashfs=y 202 | CONFIG_PACKAGE_kmod-fs-vfat=y 203 | CONFIG_PACKAGE_kmod-hwmon-core=y 204 | CONFIG_PACKAGE_kmod-i2c-core=y 205 | CONFIG_PACKAGE_kmod-ifb=y 206 | CONFIG_PACKAGE_kmod-ikconfig=y 207 | CONFIG_PACKAGE_kmod-input-core=y 208 | CONFIG_PACKAGE_kmod-ip6-tunnel=y 209 | CONFIG_PACKAGE_kmod-ip6tables=y 210 | CONFIG_PACKAGE_kmod-ip6tables-extra=y 211 | CONFIG_PACKAGE_kmod-ipsec=y 212 | CONFIG_PACKAGE_kmod-ipt-compat-xtables=y 213 | CONFIG_PACKAGE_kmod-ipt-conntrack=y 214 | CONFIG_PACKAGE_kmod-ipt-conntrack-extra=y 215 | CONFIG_PACKAGE_kmod-ipt-core=y 216 | CONFIG_PACKAGE_kmod-ipt-iface=y 217 | CONFIG_PACKAGE_kmod-ipt-ipmark=y 218 | CONFIG_PACKAGE_kmod-ipt-ipopt=y 219 | CONFIG_PACKAGE_kmod-ipt-ipset=y 220 | CONFIG_PACKAGE_kmod-ipt-nat=y 221 | CONFIG_PACKAGE_kmod-ipt-nat-extra=y 222 | CONFIG_PACKAGE_kmod-ipt-nat6=y 223 | CONFIG_PACKAGE_kmod-ipt-physdev=y 224 | CONFIG_PACKAGE_kmod-ipt-proto=y 225 | CONFIG_PACKAGE_kmod-ipt-raw=y 226 | CONFIG_PACKAGE_kmod-ipt-raw6=y 227 | CONFIG_PACKAGE_kmod-ipt-rpfilter=y 228 | CONFIG_PACKAGE_kmod-iptunnel=y 229 | CONFIG_PACKAGE_kmod-iptunnel6=y 230 | CONFIG_PACKAGE_kmod-keys-encrypted=y 231 | CONFIG_PACKAGE_kmod-keys-trusted=y 232 | # CONFIG_PACKAGE_kmod-lib-crc-ccitt is not set 233 | CONFIG_PACKAGE_kmod-lib-crc16=y 234 | CONFIG_PACKAGE_kmod-lib-zlib-deflate=y 235 | CONFIG_PACKAGE_kmod-lib-zlib-inflate=y 236 | CONFIG_PACKAGE_kmod-lib-zstd=y 237 | CONFIG_PACKAGE_kmod-libphy=y 238 | CONFIG_PACKAGE_kmod-mii=y 239 | CONFIG_PACKAGE_kmod-multimedia-input=y 240 | CONFIG_PACKAGE_kmod-nf-conntrack-netlink=y 241 | CONFIG_PACKAGE_kmod-nf-ipt=y 242 | CONFIG_PACKAGE_kmod-nf-ipt6=y 243 | CONFIG_PACKAGE_kmod-nf-ipvs=y 244 | CONFIG_PACKAGE_kmod-nf-nathelper=y 245 | CONFIG_PACKAGE_kmod-nf-tproxy=y 246 | CONFIG_PACKAGE_kmod-nfnetlink-log=y 247 | CONFIG_PACKAGE_kmod-nfnetlink-queue=y 248 | CONFIG_PACKAGE_kmod-nft-bridge=y 249 | CONFIG_PACKAGE_kmod-nft-compat=y 250 | CONFIG_PACKAGE_kmod-nft-queue=y 251 | CONFIG_PACKAGE_kmod-nls-base=y 252 | CONFIG_PACKAGE_kmod-nls-cp437=y 253 | CONFIG_PACKAGE_kmod-nls-iso8859-1=y 254 | CONFIG_PACKAGE_kmod-nls-utf8=y 255 | CONFIG_PACKAGE_kmod-phy-realtek=y 256 | # CONFIG_PACKAGE_kmod-ppp is not set 257 | CONFIG_PACKAGE_kmod-random-core=y 258 | CONFIG_PACKAGE_kmod-sched-cake=y 259 | CONFIG_PACKAGE_kmod-sched-connmark=y 260 | CONFIG_PACKAGE_kmod-sched-core=y 261 | CONFIG_PACKAGE_kmod-sound-core=y 262 | CONFIG_PACKAGE_kmod-sound-usb-caiaq=y 263 | CONFIG_PACKAGE_kmod-tpm=y 264 | CONFIG_PACKAGE_kmod-tun=y 265 | CONFIG_PACKAGE_kmod-udptunnel4=y 266 | CONFIG_PACKAGE_kmod-udptunnel6=y 267 | CONFIG_PACKAGE_kmod-usb-audio=y 268 | CONFIG_PACKAGE_kmod-usb-core=y 269 | CONFIG_PACKAGE_kmod-usb-dwc2=y 270 | CONFIG_PACKAGE_kmod-usb-dwc3=y 271 | CONFIG_PACKAGE_kmod-usb-ehci=y 272 | CONFIG_PACKAGE_kmod-usb-gadget=y 273 | CONFIG_PACKAGE_kmod-usb-net=y 274 | CONFIG_PACKAGE_kmod-usb-net-cdc-ether=y 275 | CONFIG_PACKAGE_kmod-usb-net-cdc-ncm=y 276 | CONFIG_PACKAGE_kmod-usb-net-rtl8152=y 277 | CONFIG_PACKAGE_kmod-usb-roles=y 278 | CONFIG_PACKAGE_kmod-usb-xhci-hcd=y 279 | CONFIG_PACKAGE_kmod-usb2=y 280 | CONFIG_PACKAGE_kmod-usb3=y 281 | CONFIG_PACKAGE_kmod-veth=y 282 | CONFIG_PACKAGE_kmod-vxlan=y 283 | CONFIG_PACKAGE_kmod-wireguard=y 284 | CONFIG_PACKAGE_libatomic=y 285 | CONFIG_PACKAGE_libattr=y 286 | CONFIG_PACKAGE_libavahi-client=y 287 | CONFIG_PACKAGE_libavahi-dbus-support=y 288 | CONFIG_PACKAGE_libbpf=y 289 | CONFIG_PACKAGE_libconfig=y 290 | CONFIG_PACKAGE_libcurl=y 291 | CONFIG_PACKAGE_libdaemon=y 292 | CONFIG_PACKAGE_libdbus=y 293 | CONFIG_PACKAGE_libelf=y 294 | CONFIG_PACKAGE_libexpat=y 295 | CONFIG_PACKAGE_libgmp=y 296 | CONFIG_PACKAGE_libi2c=y 297 | CONFIG_PACKAGE_libip4tc=y 298 | CONFIG_PACKAGE_libip6tc=y 299 | CONFIG_PACKAGE_libipset=y 300 | CONFIG_PACKAGE_libiptext=y 301 | CONFIG_PACKAGE_libiptext-nft=y 302 | CONFIG_PACKAGE_libiptext6=y 303 | CONFIG_PACKAGE_libiwinfo=y 304 | CONFIG_PACKAGE_libiwinfo-data=y 305 | CONFIG_PACKAGE_libiwinfo-lua=y 306 | CONFIG_PACKAGE_libltdl=y 307 | CONFIG_PACKAGE_liblua=y 308 | CONFIG_PACKAGE_liblua5.3=y 309 | CONFIG_PACKAGE_liblucihttp=y 310 | CONFIG_PACKAGE_liblucihttp-lua=y 311 | CONFIG_PACKAGE_liblzo=y 312 | CONFIG_PACKAGE_libmount=y 313 | CONFIG_PACKAGE_libnetfilter-conntrack=y 314 | CONFIG_PACKAGE_libnetfilter-cthelper=y 315 | CONFIG_PACKAGE_libnetfilter-cttimeout=y 316 | CONFIG_PACKAGE_libnetfilter-queue=y 317 | CONFIG_PACKAGE_libnetsnmp=y 318 | CONFIG_PACKAGE_libnettle=y 319 | CONFIG_PACKAGE_libnfnetlink=y 320 | CONFIG_PACKAGE_libnghttp2=y 321 | CONFIG_PACKAGE_libnl-core=y 322 | CONFIG_PACKAGE_libnl-route=y 323 | CONFIG_PACKAGE_libopenssl=y 324 | CONFIG_PACKAGE_libopenssl-conf=y 325 | CONFIG_PACKAGE_libopenssl-devcrypto=y 326 | CONFIG_PACKAGE_libpcap=y 327 | CONFIG_PACKAGE_libpci=y 328 | CONFIG_PACKAGE_libpcre=y 329 | CONFIG_PACKAGE_libpopt=y 330 | CONFIG_PACKAGE_libreadline=y 331 | CONFIG_PACKAGE_librrd1=y 332 | CONFIG_PACKAGE_libseccomp=y 333 | CONFIG_PACKAGE_libsensors=y 334 | CONFIG_PACKAGE_libsoxr=y 335 | CONFIG_PACKAGE_libstdcpp=y 336 | CONFIG_PACKAGE_libsysfs=y 337 | CONFIG_PACKAGE_libubus-lua=y 338 | CONFIG_PACKAGE_libuv=y 339 | CONFIG_PACKAGE_libxtables=y 340 | CONFIG_PACKAGE_losetup=y 341 | CONFIG_PACKAGE_lua=y 342 | CONFIG_PACKAGE_mount-utils=y 343 | CONFIG_PACKAGE_mt7601u-firmware=y 344 | CONFIG_PACKAGE_nano=y 345 | CONFIG_PACKAGE_netcat=y 346 | CONFIG_PACKAGE_netperf=y 347 | CONFIG_PACKAGE_nlbwmon=y 348 | CONFIG_PACKAGE_nstat=y 349 | CONFIG_PACKAGE_ntpclient=y 350 | CONFIG_PACKAGE_openssl-util=y 351 | CONFIG_PACKAGE_openvpn-openssl=y 352 | CONFIG_PACKAGE_pbr-ipt=y 353 | CONFIG_PACKAGE_picocom=y 354 | # CONFIG_PACKAGE_ppp is not set 355 | CONFIG_PACKAGE_qos-scripts=y 356 | CONFIG_PACKAGE_r8152-firmware=y 357 | CONFIG_PACKAGE_r8169-firmware=y 358 | CONFIG_PACKAGE_resolveip=y 359 | CONFIG_PACKAGE_rng-tools=y 360 | CONFIG_PACKAGE_rpcd=y 361 | CONFIG_PACKAGE_rpcd-mod-file=y 362 | CONFIG_PACKAGE_rpcd-mod-iwinfo=y 363 | CONFIG_PACKAGE_rpcd-mod-luci=y 364 | CONFIG_PACKAGE_rpcd-mod-rrdns=y 365 | CONFIG_PACKAGE_rrdtool1=y 366 | CONFIG_PACKAGE_shairport-sync-openssl=y 367 | CONFIG_PACKAGE_socat=y 368 | CONFIG_PACKAGE_speedtest-netperf=y 369 | CONFIG_PACKAGE_sqm-scripts=y 370 | CONFIG_PACKAGE_sqm-scripts-extra=y 371 | CONFIG_PACKAGE_sysfsutils=y 372 | CONFIG_PACKAGE_tc-mod-iptables=y 373 | CONFIG_PACKAGE_tc-tiny=y 374 | CONFIG_PACKAGE_tcpdump=y 375 | CONFIG_PACKAGE_tinyproxy=y 376 | CONFIG_PACKAGE_uhttpd=y 377 | CONFIG_PACKAGE_uhttpd-mod-ubus=y 378 | CONFIG_PACKAGE_urngd=y 379 | CONFIG_PACKAGE_wget-ssl=y 380 | CONFIG_PACKAGE_wireguard-tools=y 381 | CONFIG_PACKAGE_wireless-regdb=y 382 | CONFIG_PACKAGE_xtables-legacy=y 383 | CONFIG_PACKAGE_xtables-nft=y 384 | CONFIG_PACKAGE_zlib=y 385 | CONFIG_PACKAGE_zoneinfo-core=y 386 | CONFIG_PACKAGE_zoneinfo-europe=y 387 | CONFIG_SOCAT_SSL=y 388 | # CONFIG_TARGET_IMAGES_GZIP is not set 389 | CONFIG_TARGET_KERNEL_PARTSIZE=20 390 | CONFIG_TARGET_OPTIMIZATION="-O3 -pipe -mcpu=cortex-a72.cortex-a53+crypto+crc" 391 | CONFIG_TARGET_OPTIONS=y 392 | CONFIG_TARGET_ROOTFS_PARTSIZE=1024 393 | -------------------------------------------------------------------------------- /openwrt-24.10/seed/ao-R4S-mini.seed: -------------------------------------------------------------------------------- 1 | CONFIG_TARGET_rockchip=y 2 | CONFIG_TARGET_rockchip_armv8=y 3 | CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r4s=y 4 | CONFIG_DEVEL=y 5 | CONFIG_TOOLCHAINOPTS=y 6 | CONFIG_BIND_ENABLE_DOH=y 7 | CONFIG_BPF_TOOLCHAIN_HOST=y 8 | CONFIG_BPF_TOOLCHAIN_HOST_PATH="" 9 | # CONFIG_BPF_TOOLCHAIN_NONE is not set 10 | CONFIG_COREMARK_ENABLE_MULTITHREADING=y 11 | CONFIG_COREMARK_NUMBER_OF_THREADS=16 12 | CONFIG_COREMARK_OPTIMIZE_O3=y 13 | CONFIG_EXPERIMENTAL=y 14 | CONFIG_GNUTLS_ALPN=y 15 | CONFIG_GNUTLS_ANON=y 16 | CONFIG_GNUTLS_DTLS_SRTP=y 17 | CONFIG_GNUTLS_HEARTBEAT=y 18 | CONFIG_GNUTLS_OCSP=y 19 | CONFIG_GNUTLS_PSK=y 20 | CONFIG_HAS_BPF_TOOLCHAIN=y 21 | CONFIG_IFSTAT_SNMP=y 22 | CONFIG_IPERF_ENABLE_MULTICAST=y 23 | CONFIG_KERNEL_ARM_PMU=y 24 | CONFIG_KERNEL_ARM_PMUV3=y 25 | CONFIG_KERNEL_BLK_DEV_THROTTLING_LOW=y 26 | CONFIG_KERNEL_BUILD_DOMAIN="openwrt" 27 | CONFIG_KERNEL_BUILD_USER="ao" 28 | CONFIG_KERNEL_CFQ_GROUP_IOSCHED=y 29 | CONFIG_KERNEL_CGROUP_DEVICE=y 30 | CONFIG_KERNEL_CGROUP_FREEZER=y 31 | CONFIG_KERNEL_CGROUP_HUGETLB=y 32 | CONFIG_KERNEL_CGROUP_NET_PRIO=y 33 | CONFIG_KERNEL_CGROUP_PERF=y 34 | CONFIG_KERNEL_DEBUG_BLK_CGROUP=y 35 | CONFIG_KERNEL_HUGETLBFS=y 36 | CONFIG_KERNEL_HUGETLB_PAGE=y 37 | CONFIG_KERNEL_MEMCG_SWAP_ENABLED=y 38 | CONFIG_KERNEL_NET_CLS_CGROUP=y 39 | CONFIG_KERNEL_PERF_EVENTS=y 40 | CONFIG_KERNEL_PROC_PID_CPUSET=y 41 | CONFIG_KERNEL_TRANSPARENT_HUGEPAGE=y 42 | CONFIG_KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS=y 43 | CONFIG_LIBCURL_COOKIES=y 44 | CONFIG_LIBCURL_FILE=y 45 | CONFIG_LIBCURL_FTP=y 46 | CONFIG_LIBCURL_HTTP=y 47 | CONFIG_LIBCURL_NGHTTP2=y 48 | CONFIG_LIBCURL_NO_SMB="!" 49 | CONFIG_LIBCURL_OPENSSL=y 50 | CONFIG_LIBCURL_PROXY=y 51 | CONFIG_LIBCURL_UNIX_SOCKETS=y 52 | CONFIG_LIBSODIUM_MINIMAL=y 53 | CONFIG_OPENSSL_ENGINE=y 54 | CONFIG_OPENSSL_OPTIMIZE_SPEED=y 55 | CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=y 56 | CONFIG_OPENSSL_WITH_ASM=y 57 | CONFIG_OPENSSL_WITH_CHACHA_POLY1305=y 58 | CONFIG_OPENSSL_WITH_CMS=y 59 | CONFIG_OPENSSL_WITH_DEPRECATED=y 60 | CONFIG_OPENSSL_WITH_ERROR_MESSAGES=y 61 | CONFIG_OPENSSL_WITH_IDEA=y 62 | CONFIG_OPENSSL_WITH_MDC2=y 63 | CONFIG_OPENSSL_WITH_PSK=y 64 | CONFIG_OPENSSL_WITH_SEED=y 65 | CONFIG_OPENSSL_WITH_SRP=y 66 | CONFIG_OPENSSL_WITH_TLS13=y 67 | CONFIG_OPENSSL_WITH_WHIRLPOOL=y 68 | CONFIG_OPENVPN_openssl_ENABLE_FRAGMENT=y 69 | CONFIG_OPENVPN_openssl_ENABLE_IPROUTE2=y 70 | CONFIG_OPENVPN_openssl_ENABLE_LZ4=y 71 | CONFIG_OPENVPN_openssl_ENABLE_LZO=y 72 | CONFIG_OPENVPN_openssl_ENABLE_PORT_SHARE=y 73 | CONFIG_OPENVPN_openssl_ENABLE_SMALL=y 74 | CONFIG_PACKAGE_acme=y 75 | CONFIG_PACKAGE_acme-acmesh=y 76 | CONFIG_PACKAGE_acme-acmesh-dnsapi=y 77 | CONFIG_PACKAGE_acme-common=y 78 | CONFIG_PACKAGE_adguardhome=y 79 | CONFIG_PACKAGE_alsa-lib=y 80 | CONFIG_PACKAGE_alsa-ucm-conf=y 81 | CONFIG_PACKAGE_alsa-utils=y 82 | CONFIG_PACKAGE_arptables-nft=y 83 | CONFIG_PACKAGE_avahi-dbus-daemon=y 84 | CONFIG_PACKAGE_bind-check=y 85 | CONFIG_PACKAGE_bind-client=y 86 | CONFIG_PACKAGE_bind-ddns-confgen=y 87 | CONFIG_PACKAGE_bind-dig=y 88 | CONFIG_PACKAGE_bind-dnssec=y 89 | CONFIG_PACKAGE_bind-host=y 90 | CONFIG_PACKAGE_bind-libs=y 91 | CONFIG_PACKAGE_bind-nslookup=y 92 | CONFIG_PACKAGE_bind-rndc=y 93 | CONFIG_PACKAGE_bind-tools=y 94 | CONFIG_PACKAGE_blkid=y 95 | CONFIG_PACKAGE_bmon=y 96 | CONFIG_PACKAGE_bridge=y 97 | CONFIG_PACKAGE_ca-certificates=y 98 | CONFIG_PACKAGE_cfdisk=y 99 | CONFIG_PACKAGE_cgi-io=y 100 | CONFIG_PACKAGE_collectd=y 101 | CONFIG_PACKAGE_collectd-mod-cpu=y 102 | CONFIG_PACKAGE_collectd-mod-interface=y 103 | CONFIG_PACKAGE_collectd-mod-iwinfo=y 104 | CONFIG_PACKAGE_collectd-mod-load=y 105 | CONFIG_PACKAGE_collectd-mod-memory=y 106 | CONFIG_PACKAGE_collectd-mod-network=y 107 | CONFIG_PACKAGE_collectd-mod-rrdtool=y 108 | CONFIG_PACKAGE_confuse=y 109 | CONFIG_PACKAGE_conntrack=y 110 | CONFIG_PACKAGE_conntrackd=y 111 | CONFIG_PACKAGE_coremark=y 112 | CONFIG_PACKAGE_coreutils=y 113 | CONFIG_PACKAGE_coreutils-sort=y 114 | CONFIG_PACKAGE_curl=y 115 | CONFIG_PACKAGE_dbus=y 116 | CONFIG_PACKAGE_dbus-utils=y 117 | CONFIG_PACKAGE_ddns-scripts=y 118 | CONFIG_PACKAGE_ddns-scripts-cloudflare=y 119 | CONFIG_PACKAGE_ddns-scripts-cnkuai=y 120 | CONFIG_PACKAGE_ddns-scripts-digitalocean=y 121 | CONFIG_PACKAGE_ddns-scripts-freedns=y 122 | CONFIG_PACKAGE_ddns-scripts-gandi=y 123 | CONFIG_PACKAGE_ddns-scripts-godaddy=y 124 | CONFIG_PACKAGE_ddns-scripts-noip=y 125 | CONFIG_PACKAGE_ddns-scripts-nsupdate=y 126 | CONFIG_PACKAGE_ddns-scripts-route53=y 127 | CONFIG_PACKAGE_ddns-scripts-services=y 128 | CONFIG_PACKAGE_diffutils=y 129 | # CONFIG_PACKAGE_dnsmasq is not set 130 | CONFIG_PACKAGE_dnsmasq-full=y 131 | CONFIG_PACKAGE_dnsmasq_full_auth=y 132 | CONFIG_PACKAGE_dnsmasq_full_conntrack=y 133 | CONFIG_PACKAGE_dnsmasq_full_dhcp=y 134 | CONFIG_PACKAGE_dnsmasq_full_dhcpv6=y 135 | CONFIG_PACKAGE_dnsmasq_full_dnssec=y 136 | CONFIG_PACKAGE_dnsmasq_full_nftset=y 137 | CONFIG_PACKAGE_dnsmasq_full_noid=y 138 | CONFIG_PACKAGE_dnsmasq_full_tftp=y 139 | CONFIG_PACKAGE_ds-lite=y 140 | CONFIG_PACKAGE_ebtables-nft=y 141 | CONFIG_PACKAGE_etherwake=y 142 | CONFIG_PACKAGE_f2fs-tools=y 143 | CONFIG_PACKAGE_f2fsck=y 144 | CONFIG_PACKAGE_fdk-aac=y 145 | CONFIG_PACKAGE_giflib-utils=y 146 | CONFIG_PACKAGE_halog=y 147 | CONFIG_PACKAGE_haproxy=y 148 | CONFIG_PACKAGE_ifstat=y 149 | CONFIG_PACKAGE_iftop=y 150 | CONFIG_PACKAGE_igmpproxy=y 151 | CONFIG_PACKAGE_ip-full=y 152 | CONFIG_PACKAGE_ip6tables-nft=y 153 | CONFIG_PACKAGE_iperf=y 154 | CONFIG_PACKAGE_iperf3=y 155 | CONFIG_PACKAGE_ipset=y 156 | CONFIG_PACKAGE_iptables-mod-conntrack-extra=y 157 | CONFIG_PACKAGE_iptables-mod-ipopt=y 158 | CONFIG_PACKAGE_iptables-nft=y 159 | CONFIG_PACKAGE_jq=y 160 | CONFIG_PACKAGE_kmod-arptables=y 161 | CONFIG_PACKAGE_kmod-asn1-decoder=y 162 | CONFIG_PACKAGE_kmod-asn1-encoder=y 163 | CONFIG_PACKAGE_kmod-br-netfilter=y 164 | CONFIG_PACKAGE_kmod-crypto-acompress=y 165 | CONFIG_PACKAGE_kmod-crypto-aead=y 166 | CONFIG_PACKAGE_kmod-crypto-arc4=y 167 | CONFIG_PACKAGE_kmod-crypto-authenc=y 168 | CONFIG_PACKAGE_kmod-crypto-cbc=y 169 | CONFIG_PACKAGE_kmod-crypto-ccm=y 170 | CONFIG_PACKAGE_kmod-crypto-cmac=y 171 | CONFIG_PACKAGE_kmod-crypto-crc32=y 172 | CONFIG_PACKAGE_kmod-crypto-ctr=y 173 | CONFIG_PACKAGE_kmod-crypto-deflate=y 174 | CONFIG_PACKAGE_kmod-crypto-des=y 175 | CONFIG_PACKAGE_kmod-crypto-ecb=y 176 | CONFIG_PACKAGE_kmod-crypto-echainiv=y 177 | CONFIG_PACKAGE_kmod-crypto-gcm=y 178 | CONFIG_PACKAGE_kmod-crypto-geniv=y 179 | CONFIG_PACKAGE_kmod-crypto-gf128=y 180 | CONFIG_PACKAGE_kmod-crypto-ghash=y 181 | CONFIG_PACKAGE_kmod-crypto-hmac=y 182 | CONFIG_PACKAGE_kmod-crypto-kpp=y 183 | CONFIG_PACKAGE_kmod-crypto-lib-chacha20=y 184 | CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=y 185 | CONFIG_PACKAGE_kmod-crypto-lib-curve25519=y 186 | CONFIG_PACKAGE_kmod-crypto-lib-poly1305=y 187 | CONFIG_PACKAGE_kmod-crypto-manager=y 188 | CONFIG_PACKAGE_kmod-crypto-md4=y 189 | CONFIG_PACKAGE_kmod-crypto-md5=y 190 | CONFIG_PACKAGE_kmod-crypto-null=y 191 | CONFIG_PACKAGE_kmod-crypto-rng=y 192 | CONFIG_PACKAGE_kmod-crypto-seqiv=y 193 | CONFIG_PACKAGE_kmod-crypto-sha1=y 194 | CONFIG_PACKAGE_kmod-crypto-sha256=y 195 | CONFIG_PACKAGE_kmod-crypto-sha3=y 196 | CONFIG_PACKAGE_kmod-crypto-sha512=y 197 | CONFIG_PACKAGE_kmod-crypto-user=y 198 | CONFIG_PACKAGE_kmod-cryptodev=y 199 | CONFIG_PACKAGE_kmod-dax=y 200 | CONFIG_PACKAGE_kmod-dm=y 201 | CONFIG_PACKAGE_kmod-dummy=y 202 | CONFIG_PACKAGE_kmod-ebtables=y 203 | CONFIG_PACKAGE_kmod-fs-ext4=y 204 | CONFIG_PACKAGE_kmod-fs-f2fs=y 205 | CONFIG_PACKAGE_kmod-fs-squashfs=y 206 | CONFIG_PACKAGE_kmod-fs-vfat=y 207 | CONFIG_PACKAGE_kmod-hwmon-core=y 208 | CONFIG_PACKAGE_kmod-i2c-core=y 209 | CONFIG_PACKAGE_kmod-ifb=y 210 | CONFIG_PACKAGE_kmod-ikconfig=y 211 | CONFIG_PACKAGE_kmod-input-core=y 212 | CONFIG_PACKAGE_kmod-ip6-tunnel=y 213 | CONFIG_PACKAGE_kmod-ip6tables=y 214 | CONFIG_PACKAGE_kmod-ipsec=y 215 | CONFIG_PACKAGE_kmod-ipt-conntrack=y 216 | CONFIG_PACKAGE_kmod-ipt-conntrack-extra=y 217 | CONFIG_PACKAGE_kmod-ipt-core=y 218 | CONFIG_PACKAGE_kmod-ipt-ipopt=y 219 | CONFIG_PACKAGE_kmod-ipt-ipset=y 220 | CONFIG_PACKAGE_kmod-ipt-raw=y 221 | CONFIG_PACKAGE_kmod-iptunnel=y 222 | CONFIG_PACKAGE_kmod-iptunnel6=y 223 | CONFIG_PACKAGE_kmod-keys-encrypted=y 224 | CONFIG_PACKAGE_kmod-keys-trusted=y 225 | CONFIG_PACKAGE_kmod-lib-crc16=y 226 | CONFIG_PACKAGE_kmod-lib-textsearch=y 227 | CONFIG_PACKAGE_kmod-lib-xxhash=y 228 | CONFIG_PACKAGE_kmod-lib-zlib-deflate=y 229 | CONFIG_PACKAGE_kmod-lib-zlib-inflate=y 230 | CONFIG_PACKAGE_kmod-lib-zstd=y 231 | CONFIG_PACKAGE_kmod-media-controller=y 232 | CONFIG_PACKAGE_kmod-mii=y 233 | CONFIG_PACKAGE_kmod-nf-conncount=y 234 | CONFIG_PACKAGE_kmod-nf-conntrack-netlink=y 235 | CONFIG_PACKAGE_kmod-nf-ipt=y 236 | CONFIG_PACKAGE_kmod-nf-ipt6=y 237 | CONFIG_PACKAGE_kmod-nf-ipvs=y 238 | CONFIG_PACKAGE_kmod-nf-nathelper=y 239 | CONFIG_PACKAGE_kmod-nf-tproxy=y 240 | CONFIG_PACKAGE_kmod-nfnetlink-log=y 241 | CONFIG_PACKAGE_kmod-nfnetlink-queue=y 242 | CONFIG_PACKAGE_kmod-nft-arp=y 243 | CONFIG_PACKAGE_kmod-nft-bridge=y 244 | CONFIG_PACKAGE_kmod-nft-compat=y 245 | CONFIG_PACKAGE_kmod-nft-queue=y 246 | CONFIG_PACKAGE_kmod-nls-base=y 247 | CONFIG_PACKAGE_kmod-nls-cp437=y 248 | CONFIG_PACKAGE_kmod-nls-iso8859-1=y 249 | CONFIG_PACKAGE_kmod-nls-utf8=y 250 | CONFIG_PACKAGE_kmod-oid-registry=y 251 | CONFIG_PACKAGE_kmod-phy-realtek=y 252 | # CONFIG_PACKAGE_kmod-ppp is not set 253 | CONFIG_PACKAGE_kmod-random-core=y 254 | CONFIG_PACKAGE_kmod-sched=y 255 | CONFIG_PACKAGE_kmod-sched-bpf=y 256 | CONFIG_PACKAGE_kmod-sched-cake=y 257 | CONFIG_PACKAGE_kmod-sched-connmark=y 258 | CONFIG_PACKAGE_kmod-sched-core=y 259 | CONFIG_PACKAGE_kmod-sound-core=y 260 | CONFIG_PACKAGE_kmod-sound-usb-caiaq=y 261 | CONFIG_PACKAGE_kmod-tcp-bbr=y 262 | CONFIG_PACKAGE_kmod-tpm=y 263 | CONFIG_PACKAGE_kmod-tun=y 264 | CONFIG_PACKAGE_kmod-udptunnel4=y 265 | CONFIG_PACKAGE_kmod-udptunnel6=y 266 | CONFIG_PACKAGE_kmod-usb-audio=y 267 | CONFIG_PACKAGE_kmod-usb-core=y 268 | CONFIG_PACKAGE_kmod-usb-dwc2=y 269 | CONFIG_PACKAGE_kmod-usb-dwc3=y 270 | CONFIG_PACKAGE_kmod-usb-ehci=y 271 | CONFIG_PACKAGE_kmod-usb-gadget=y 272 | CONFIG_PACKAGE_kmod-usb-net=y 273 | CONFIG_PACKAGE_kmod-usb-net-cdc-ether=y 274 | CONFIG_PACKAGE_kmod-usb-net-cdc-ncm=y 275 | CONFIG_PACKAGE_kmod-usb-net-rtl8152=y 276 | CONFIG_PACKAGE_kmod-usb-roles=y 277 | CONFIG_PACKAGE_kmod-usb-xhci-hcd=y 278 | CONFIG_PACKAGE_kmod-usb2=y 279 | CONFIG_PACKAGE_kmod-usb3=y 280 | CONFIG_PACKAGE_kmod-veth=y 281 | CONFIG_PACKAGE_kmod-vxlan=y 282 | CONFIG_PACKAGE_kmod-wireguard=y 283 | CONFIG_PACKAGE_lame-lib=y 284 | CONFIG_PACKAGE_libatomic=y 285 | CONFIG_PACKAGE_libattr=y 286 | CONFIG_PACKAGE_libavahi-client=y 287 | CONFIG_PACKAGE_libavahi-dbus-support=y 288 | CONFIG_PACKAGE_libbpf=y 289 | CONFIG_PACKAGE_libbz2=y 290 | CONFIG_PACKAGE_libcap-ng=y 291 | CONFIG_PACKAGE_libcares=y 292 | CONFIG_PACKAGE_libconfig=y 293 | CONFIG_PACKAGE_libcurl=y 294 | CONFIG_PACKAGE_libdaemon=y 295 | CONFIG_PACKAGE_libdbus=y 296 | CONFIG_PACKAGE_libelf=y 297 | CONFIG_PACKAGE_libexpat=y 298 | CONFIG_PACKAGE_libfdisk=y 299 | CONFIG_PACKAGE_libffmpeg-full=y 300 | CONFIG_PACKAGE_libgcrypt=y 301 | CONFIG_PACKAGE_libgmp=y 302 | CONFIG_PACKAGE_libgnutls=y 303 | CONFIG_PACKAGE_libgpg-error=y 304 | CONFIG_PACKAGE_libi2c=y 305 | CONFIG_PACKAGE_libip4tc=y 306 | CONFIG_PACKAGE_libip6tc=y 307 | CONFIG_PACKAGE_libiperf3=y 308 | CONFIG_PACKAGE_libipset=y 309 | CONFIG_PACKAGE_libiptext=y 310 | CONFIG_PACKAGE_libiptext-nft=y 311 | CONFIG_PACKAGE_libiptext6=y 312 | CONFIG_PACKAGE_libiwinfo=y 313 | CONFIG_PACKAGE_libiwinfo-data=y 314 | CONFIG_PACKAGE_libiwinfo-lua=y 315 | CONFIG_PACKAGE_libltdl=y 316 | CONFIG_PACKAGE_liblua=y 317 | CONFIG_PACKAGE_liblua5.3=y 318 | CONFIG_PACKAGE_liblucihttp=y 319 | CONFIG_PACKAGE_liblucihttp-lua=y 320 | CONFIG_PACKAGE_liblz4=y 321 | CONFIG_PACKAGE_liblzo=y 322 | CONFIG_PACKAGE_libmbedtls=m 323 | CONFIG_PACKAGE_libmosquitto-ssl=y 324 | CONFIG_PACKAGE_libmount=y 325 | CONFIG_PACKAGE_libncurses=y 326 | CONFIG_PACKAGE_libnetfilter-conntrack=y 327 | CONFIG_PACKAGE_libnetfilter-cthelper=y 328 | CONFIG_PACKAGE_libnetfilter-cttimeout=y 329 | CONFIG_PACKAGE_libnetfilter-queue=y 330 | CONFIG_PACKAGE_libnetsnmp=y 331 | CONFIG_PACKAGE_libnettle=y 332 | CONFIG_PACKAGE_libnfnetlink=y 333 | CONFIG_PACKAGE_libnghttp2=y 334 | CONFIG_PACKAGE_libnl-core=y 335 | CONFIG_PACKAGE_libnl-route=y 336 | CONFIG_PACKAGE_libopenssl=y 337 | CONFIG_PACKAGE_libopenssl-conf=y 338 | CONFIG_PACKAGE_libopenssl-devcrypto=y 339 | CONFIG_PACKAGE_libpcap=y 340 | CONFIG_PACKAGE_libpci=y 341 | CONFIG_PACKAGE_libpcre2=y 342 | CONFIG_PACKAGE_libplist=y 343 | CONFIG_PACKAGE_libpopt=y 344 | CONFIG_PACKAGE_libreadline=y 345 | CONFIG_PACKAGE_librrd1=y 346 | CONFIG_PACKAGE_libseccomp=y 347 | CONFIG_PACKAGE_libsensors=y 348 | CONFIG_PACKAGE_libsodium=y 349 | CONFIG_PACKAGE_libsoxr=y 350 | CONFIG_PACKAGE_libstdcpp=y 351 | CONFIG_PACKAGE_libsysfs=y 352 | CONFIG_PACKAGE_libubus-lua=y 353 | CONFIG_PACKAGE_liburcu=y 354 | # CONFIG_PACKAGE_libustream-mbedtls is not set 355 | CONFIG_PACKAGE_libustream-openssl=y 356 | CONFIG_PACKAGE_libuv=y 357 | CONFIG_PACKAGE_libxml2=y 358 | CONFIG_PACKAGE_libxtables=y 359 | CONFIG_PACKAGE_losetup=y 360 | CONFIG_PACKAGE_lua=y 361 | CONFIG_PACKAGE_mount-utils=y 362 | CONFIG_PACKAGE_mt7601u-firmware=y 363 | CONFIG_PACKAGE_nano=y 364 | CONFIG_PACKAGE_netcat=y 365 | CONFIG_PACKAGE_netperf=y 366 | CONFIG_PACKAGE_nlbwmon=y 367 | CONFIG_PACKAGE_nqptp=y 368 | CONFIG_PACKAGE_nstat=y 369 | CONFIG_PACKAGE_openssl-util=y 370 | CONFIG_PACKAGE_openvpn-openssl=y 371 | CONFIG_PACKAGE_pbr=y 372 | CONFIG_PACKAGE_picocom=y 373 | # CONFIG_PACKAGE_ppp is not set 374 | CONFIG_PACKAGE_qos-scripts=y 375 | CONFIG_PACKAGE_qosify=y 376 | CONFIG_PACKAGE_r8152-firmware=y 377 | CONFIG_PACKAGE_r8169-firmware=y 378 | CONFIG_PACKAGE_resolveip=y 379 | CONFIG_PACKAGE_rng-tools=y 380 | CONFIG_PACKAGE_rpcd=y 381 | CONFIG_PACKAGE_rpcd-mod-file=y 382 | CONFIG_PACKAGE_rpcd-mod-iwinfo=y 383 | CONFIG_PACKAGE_rpcd-mod-luci=y 384 | CONFIG_PACKAGE_rpcd-mod-rrdns=y 385 | CONFIG_PACKAGE_rrdtool1=y 386 | CONFIG_PACKAGE_shairport-sync-openssl=y 387 | CONFIG_PACKAGE_socat=y 388 | CONFIG_PACKAGE_speedtest-netperf=y 389 | CONFIG_PACKAGE_sqm-scripts=y 390 | CONFIG_PACKAGE_sysfsutils=y 391 | CONFIG_PACKAGE_tc-full=y 392 | CONFIG_PACKAGE_tcpdump=y 393 | CONFIG_PACKAGE_terminfo=y 394 | CONFIG_PACKAGE_tinyproxy=y 395 | CONFIG_PACKAGE_uhttpd=y 396 | CONFIG_PACKAGE_uhttpd-mod-ubus=y 397 | CONFIG_PACKAGE_watchcat=y 398 | CONFIG_PACKAGE_wget-ssl=y 399 | CONFIG_PACKAGE_wireguard-tools=y 400 | CONFIG_PACKAGE_wireless-regdb=y 401 | CONFIG_PACKAGE_xtables-nft=y 402 | CONFIG_PACKAGE_zlib=y 403 | CONFIG_PACKAGE_zoneinfo-core=y 404 | CONFIG_PACKAGE_zoneinfo-europe=y 405 | CONFIG_SOCAT_SSL=y 406 | # CONFIG_TARGET_IMAGES_GZIP is not set 407 | CONFIG_TARGET_KERNEL_PARTSIZE=20 408 | CONFIG_TARGET_OPTIMIZATION="-O3 -pipe -mcpu=cortex-a72.cortex-a53+crypto+crc" 409 | CONFIG_TARGET_OPTIONS=y 410 | CONFIG_TARGET_ROOTFS_PARTSIZE=1024 411 | CONFIG_USE_LLVM_HOST=y 412 | CONFIG_PACKAGE_kmod-lib-crc-ccitt=y 413 | --------------------------------------------------------------------------------