diff --git a/make-openwrt/openwrt-files/common-files/etc/model_database.conf b/make-openwrt/openwrt-files/common-files/etc/model_database.conf index 0364fb2c8b..3feb7d8715 100644 --- a/make-openwrt/openwrt-files/common-files/etc/model_database.conf +++ b/make-openwrt/openwrt-files/common-files/etc/model_database.conf @@ -248,6 +248,7 @@ r214 :Alark35-3500 :rk3568 :rk3568-alark35 r215 :MMBox-Anas3035 :rk3568 :rk3568-mmbox-anas3035.dtb :NA :NA :u-boot-rockchip.bin :4GB-LPDDR4,32G-eMMC,3xSATA,2x2.5Gb-Nic :stable/6.12.y :rockchip :rk3568 :armbianEnv.txt :ritech :anas3035 :yes #-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+---------- r216 :Wocyber-A3 :rk3568 :rk3568-wocyber-a3.dtb :NA :u-boot.itb :idbloader.img :4GB-LPDDR4,128G-eMMC,1xSATA,1Gb-Nic :stable/6.12.y :rockchip :rk3568 :armbianEnv.txt :Arthur97172 :wocyber-a3 :yes +r217 :photonicat :rk3568 :rk3568-photonicat.dtb :NA :u-boot.itb :idbloader.img :4GB-LPDDR4,256G-eMMC,wifi,1Gb-Nic :stable/6.12.y :rockchip :rk3568 :armbianEnv.txt :sibondt :photonicat :yes # Rockchip RK3566 Family diff --git a/make-openwrt/openwrt-files/different-files/photonicat/boot/armbianEnv.txt b/make-openwrt/openwrt-files/different-files/photonicat/boot/armbianEnv.txt new file mode 100644 index 0000000000..57f95cfda9 --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/boot/armbianEnv.txt @@ -0,0 +1,11 @@ +verbosity=1 +bootlogo=false +fdtfile=rockchip/rk3568-photonicat.dtb +rootdev=/dev/mmcblk0p2 +rootfstype=ext4 +rootflags=rw,errors=remount-ro +overlay_prefix=rk3568 +overlays= +extraargs=rw rootwait +extraboardargs=net.ifnames=0 max_loop=128 +docker_optimizations=on diff --git a/make-openwrt/openwrt-files/different-files/photonicat/boot/boot.cmd b/make-openwrt/openwrt-files/different-files/photonicat/boot/boot.cmd new file mode 100644 index 0000000000..abc6720760 --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/boot/boot.cmd @@ -0,0 +1,78 @@ +# DO NOT EDIT THIS FILE +# +# Please edit /boot/armbianEnv.txt to set supported parameters +# + +setenv load_addr "0x9000000" +setenv overlay_error "false" +# default values +setenv rootdev "/dev/mmcblk0p1" +setenv verbosity "1" +setenv console "both" +setenv bootlogo "false" +setenv rootfstype "ext4" +setenv docker_optimizations "on" +setenv earlycon "off" + +echo "Boot script loaded from ${devtype} ${devnum}" + +if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then + load ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt + env import -t ${load_addr} ${filesize} +fi + +if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi + +if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi +if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS2,1500000 ${consoleargs}"; fi +if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi +if test "${bootlogo}" = "true"; then + setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}" +else + setenv consoleargs "splash=verbose ${consoleargs}" +fi + +# get PARTUUID of first partition on SD/eMMC the boot script was loaded from +if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:1 partuuid; fi + +setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs} net.ifnames=0 biosdevname=0" + +if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1"; fi + +load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd +load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image + +load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile} +fdt addr ${fdt_addr_r} +fdt resize 65536 +for overlay_file in ${overlays}; do + if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then + echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo" + fdt apply ${load_addr} || setenv overlay_error "true" + fi +done +for overlay_file in ${user_overlays}; do + if load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then + echo "Applying user provided DT overlay ${overlay_file}.dtbo" + fdt apply ${load_addr} || setenv overlay_error "true" + fi +done +if test "${overlay_error}" = "true"; then + echo "Error applying DT overlays, restoring original DT" + load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile} +else + if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then + echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)" + source ${load_addr} + fi + if test -e ${devtype} ${devnum} ${prefix}fixup.scr; then + load ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr + echo "Applying user provided fixup script (fixup.scr)" + source ${load_addr} + fi +fi +kaslrseed +booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} + +# Recompile with: +# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr diff --git a/make-openwrt/openwrt-files/different-files/photonicat/boot/boot.scr b/make-openwrt/openwrt-files/different-files/photonicat/boot/boot.scr new file mode 100644 index 0000000000..7c22890286 Binary files /dev/null and b/make-openwrt/openwrt-files/different-files/photonicat/boot/boot.scr differ diff --git a/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/balance_irq b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/balance_irq new file mode 100644 index 0000000000..263e5cf654 --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/balance_irq @@ -0,0 +1,2 @@ +xhci-hcd:usb5 5 +xhci-hcd:usb7 6 diff --git a/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/board.d/00_model b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/board.d/00_model new file mode 100644 index 0000000000..1f1a5da1ed --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/board.d/00_model @@ -0,0 +1,12 @@ +# Copyright (C) 2015 OpenWrt.org + +. /lib/functions/uci-defaults.sh + +board_config_update + +ucidef_set_board_id "Photonicat" +ucidef_set_model_name "Photonicat" + +board_config_flush + +exit 0 diff --git a/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/board.d/01_led b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/board.d/01_led new file mode 100644 index 0000000000..227d5c7d3e --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/board.d/01_led @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Copyright (C) 2015 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh + +board_config_update + +ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0" + +board_config_flush + +exit 0 diff --git a/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/board.d/99-default_network b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/board.d/99-default_network new file mode 100644 index 0000000000..f764641969 --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/board.d/99-default_network @@ -0,0 +1,65 @@ +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh + +board_config_update + +generate_mac() { + # https://gist.githubusercontent.com/aallan/b4bb86db86079509e6159810ae9bd3e4/raw/846ae1b646ab0f4d646af9115e47365f4118e5f6/mac-vendor.txt + # The MAC address range registered by realtek manufacturers is as follows: + local mac_grp_0="00:20:18:" + local mac_grp_1="00:4f:49:" + local mac_grp_2="00:60:52:" + local mac_grp_3="00:e0:4c:" + local mac_grp_4="52:54:00:" + local mac_grp_5="52:54:ab:" + local mac_grp_cnt=6 + + # get the cpu/emmc/sd unique id + local sd_hash + if [ -f "/sys/class/block/mmcblk1/device/cid" ]; then + sd_hash=$(sha256sum /sys/class/block/mmcblk1/device/cid | cut -f1) + elif [ -f "/sys/class/block/mmcblk0/device/cid" ]; then + sd_hash=$(sha256sum /sys/class/block/mmcblk0/device/cid | cut -f1) + else + sd_hash=$(dd if=/dev/zero bs=1 count=68 | sha256sum | cut -f1) + fi + + # get mac address head + local dice=${mac_grp_cnt}$(echo $sd_hash | tr -d '[a-f]' | cut -b 1-6) + local idx=$((dice % mac_grp_cnt)) + eval local mac_head="\$mac_grp_${idx}" + + # get mac address tail + # sd_hash length: max 64 + local mac_tail=$(echo $sd_hash | cut -b 16-17)":"$(echo $sd_hash | cut -b 26-27)":"$(echo $sd_hash | cut -b 42-43) + + echo "${mac_head}${mac_tail}" +} + +swap_interface() { + local eth_a=$1 + local eth_b=$2 + ip link set dev $eth_a down + ip link set dev $eth_b down + ip link set $eth_a name eth-rename-tmp + ip link set $eth_b name $eth_a + ip link set eth-rename-tmp name $eth_b + ip link set dev $eth_a up + ip link set dev $eth_b up +} + +json_is_a network object && exit 0 + +# Init LAN and WAN +LAN_MAC=$(generate_mac) +WAN_MAC=$(macaddr_add $LAN_MAC +1) +ucidef_set_interface_lan 'eth0' +ucidef_set_interface_macaddr "lan" $LAN_MAC +if [ -d "/sys/class/net/eth1" ]; then + ucidef_set_interface_wan 'eth1' + ucidef_set_interface_macaddr "wan" $WAN_MAC +fi + +board_config_flush + +exit 0 diff --git a/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/inittab b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/inittab new file mode 100644 index 0000000000..bfd352ea5a --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/inittab @@ -0,0 +1,5 @@ +::sysinit:/etc/init.d/rcS S boot +::shutdown:/etc/init.d/rcS K shutdown +tty1::askfirst:/usr/libexec/login.sh +ttyS2::askfirst:/usr/libexec/login.sh +ttyFIQ0::askfirst:/usr/libexec/login.sh diff --git a/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/ath10k b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/ath10k new file mode 100644 index 0000000000..63b3348e39 --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/ath10k @@ -0,0 +1,2 @@ +ath10k_core +ath10k_pci diff --git a/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/mt7921e b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/mt7921e new file mode 100644 index 0000000000..e1de0bdd16 --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/mt7921e @@ -0,0 +1 @@ +mt7921e diff --git a/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/pwm_fan b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/pwm_fan new file mode 100644 index 0000000000..a4833bf4ac --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/pwm_fan @@ -0,0 +1 @@ +pwm_fan diff --git a/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/rk_gpu b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/rk_gpu new file mode 100644 index 0000000000..e86c38dd2a --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/rk_gpu @@ -0,0 +1 @@ +bifrost_kbase diff --git a/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/rk_npu b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/rk_npu new file mode 100644 index 0000000000..3628612207 --- /dev/null +++ b/make-openwrt/openwrt-files/different-files/photonicat/rootfs/etc/modules.d/rk_npu @@ -0,0 +1 @@ +rknpu diff --git a/remake b/remake index a54f23eaf5..a27ed82db4 100755 --- a/remake +++ b/remake @@ -1015,7 +1015,7 @@ refactor_rootfs() { # Realtek RTL8188FU Wireless LAN Driver echo "rtl8188fu" >etc/modules.d/rtl8188fu # Realtek RTL8822CS Wireless LAN Driver - echo "88x2cs" >etc/modules.d/88x2cs + echo "rtw88_8822cs" >etc/modules.d/rtw88_8822cs # USB Ralink Wireless LAN Driver echo "rt2500usb" >etc/modules.d/rt2500-usb echo "rt2800usb" >etc/modules.d/rt2800-usb