From 38d33aa1241e44a22997e595bf650e5c42f09101 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 14 Aug 2024 16:09:16 +0800 Subject: [PATCH 1/6] rockchip: add FriendlyARM NanoPi R6S support --- target/linux/rockchip/image/rk35xx.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/linux/rockchip/image/rk35xx.mk b/target/linux/rockchip/image/rk35xx.mk index 35016188e152dc..0c150dfb292ea6 100644 --- a/target/linux/rockchip/image/rk35xx.mk +++ b/target/linux/rockchip/image/rk35xx.mk @@ -35,6 +35,14 @@ $(call Device/rk3588) endef TARGET_DEVICES += armsom_sige7 +define Device/friendlyarm_nanopi-r6s +$(call Device/rk3588) + DEVICE_VENDOR := FriendlyARM + DEVICE_MODEL := NanoPi R6S + DEVICE_PACKAGES := kmod-r8125 kmod-nvme kmod-thermal +endef +TARGET_DEVICES += friendlyarm_nanopi-r6s + define Device/mangopi_m28k $(call Device/rk3528) DEVICE_VENDOR := MangoPi From 31eb14b9f2f5064204ec3fc5900e85b656cc7406 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 14 Aug 2024 16:11:06 +0800 Subject: [PATCH 2/6] rockchip: add FriendlyARM NanoPi R6C support --- target/linux/rockchip/image/rk35xx.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/linux/rockchip/image/rk35xx.mk b/target/linux/rockchip/image/rk35xx.mk index 0c150dfb292ea6..e1ea7767dcbe99 100644 --- a/target/linux/rockchip/image/rk35xx.mk +++ b/target/linux/rockchip/image/rk35xx.mk @@ -43,6 +43,14 @@ $(call Device/rk3588) endef TARGET_DEVICES += friendlyarm_nanopi-r6s +define Device/friendlyarm_nanopi-r6c +$(call Device/rk3588) + DEVICE_VENDOR := FriendlyARM + DEVICE_MODEL := NanoPi R6C + DEVICE_PACKAGES := kmod-r8125 kmod-nvme kmod-thermal +endef +TARGET_DEVICES += friendlyarm_nanopi-r6c + define Device/mangopi_m28k $(call Device/rk3528) DEVICE_VENDOR := MangoPi From 9e04f29d4c5a90855002f16654d0ed8ac245b8a5 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 14 Aug 2024 16:13:42 +0800 Subject: [PATCH 3/6] rockchip: add FriendlyARM NanoPC T6 support --- target/linux/rockchip/image/rk35xx.mk | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/target/linux/rockchip/image/rk35xx.mk b/target/linux/rockchip/image/rk35xx.mk index e1ea7767dcbe99..932afe88491c64 100644 --- a/target/linux/rockchip/image/rk35xx.mk +++ b/target/linux/rockchip/image/rk35xx.mk @@ -35,6 +35,14 @@ $(call Device/rk3588) endef TARGET_DEVICES += armsom_sige7 +define Device/friendlyarm_nanopi-r6c +$(call Device/rk3588) + DEVICE_VENDOR := FriendlyARM + DEVICE_MODEL := NanoPi R6C + DEVICE_PACKAGES := kmod-r8125 kmod-nvme kmod-thermal +endef +TARGET_DEVICES += friendlyarm_nanopi-r6c + define Device/friendlyarm_nanopi-r6s $(call Device/rk3588) DEVICE_VENDOR := FriendlyARM @@ -43,13 +51,13 @@ $(call Device/rk3588) endef TARGET_DEVICES += friendlyarm_nanopi-r6s -define Device/friendlyarm_nanopi-r6c +define Device/friendlyarm_nanopi-r6t $(call Device/rk3588) DEVICE_VENDOR := FriendlyARM - DEVICE_MODEL := NanoPi R6C + DEVICE_MODEL := NanoPC T6 DEVICE_PACKAGES := kmod-r8125 kmod-nvme kmod-thermal endef -TARGET_DEVICES += friendlyarm_nanopi-r6c +TARGET_DEVICES += friendlyarm_nanopi-r6t define Device/mangopi_m28k $(call Device/rk3528) From ae07efbcc1c03b727d46980e928698aaf7aaa06e Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 14 Aug 2024 16:21:17 +0800 Subject: [PATCH 4/6] rockchip: add Radxa ROCK 5C / 5C Lite support --- target/linux/rockchip/image/rk35xx.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/target/linux/rockchip/image/rk35xx.mk b/target/linux/rockchip/image/rk35xx.mk index 932afe88491c64..dfd568f204cb29 100644 --- a/target/linux/rockchip/image/rk35xx.mk +++ b/target/linux/rockchip/image/rk35xx.mk @@ -77,3 +77,12 @@ $(call Device/rk3528) DEVICE_PACKAGES := kmod-r8168 kmod-r8125 kmod-thermal endef TARGET_DEVICES += radxa_e20c + +define Device/radxa_rock-5c +$(call Device/rk3588) + DEVICE_VENDOR := Radxa + DEVICE_MODEL := ROCK 5C / 5C Lite + DEVICE_DTS := rk3588-rock-5c + DEVICE_PACKAGES := kmod-r8125 kmod-nvme kmod-thermal +endef +TARGET_DEVICES += radxa_rock-5c From 230b94f012f769a1765835d4838514ba6b903b8b Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 14 Aug 2024 18:28:11 +0800 Subject: [PATCH 5/6] armbian-firmware: add new package --- package/firmware/armbian-firmware/Makefile | 131 +++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 package/firmware/armbian-firmware/Makefile diff --git a/package/firmware/armbian-firmware/Makefile b/package/firmware/armbian-firmware/Makefile new file mode 100644 index 00000000000000..c6cd47bb2cc76d --- /dev/null +++ b/package/firmware/armbian-firmware/Makefile @@ -0,0 +1,131 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=armbian-firmware +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_DATE:=2024-06-26 +PKG_SOURCE_URL:=https://github.com/armbian/firmware.git +PKG_SOURCE_VERSION:=7f2e18ecac75d50acb843395ad07a0f2b9a12a50 +PKG_MIRROR_HASH:=9967883add1587fb178e3b1a9aecec8e03b67f3554af63b294b771f67b88c934 + +include $(INCLUDE_DIR)/package.mk + +RSTRIP:=: +STRIP:=: + +define Package/armbian-firmware-default + SECTION:=firmware + CATEGORY:=Firmware + URL:=https://github.com/armbian/firmware + TITLE:=$(1) + DEPENDS:=$(2) +endef + +define Build/Compile +endef + +Package/brcmfmac-firmware-4356-sdio = $(call Package/armbian-firmware-default,Broadcom BCM4356 FullMac SDIO firmware) +define Package/brcmfmac-firmware-4356-sdio/install + $(INSTALL_DIR) $(1)/lib/firmware/brcm + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/BCM4356A2.hcd \ + $(1)/lib/firmware/brcm/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac4356-sdio.bin \ + $(1)/lib/firmware/brcm/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac4356-sdio.clm_blob \ + $(1)/lib/firmware/brcm/ +endef +$(eval $(call BuildPackage,brcmfmac-firmware-4356-sdio)) + +Package/brcmfmac-firmware-43456-sdio = $(call Package/armbian-firmware-default,Broadcom BCM43456 FullMac SDIO firmware) +define Package/brcmfmac-firmware-43456-sdio/install + $(INSTALL_DIR) $(1)/lib/firmware/brcm + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac43456-sdio.bin \ + $(1)/lib/firmware/brcm/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac43456-sdio.clm_blob \ + $(1)/lib/firmware/brcm/ +endef +$(eval $(call BuildPackage,brcmfmac-firmware-43456-sdio)) + +Package/brcmfmac-firmware-43752-pcie = $(call Package/armbian-firmware-default,Broadcom BCM43752 FullMac PCIe firmware) +define Package/brcmfmac-firmware-43752-pcie/install + $(INSTALL_DIR) $(1)/lib/firmware/brcm + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/BCM4362A2.hcd \ + $(1)/lib/firmware/brcm/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac43752-pcie.bin \ + $(1)/lib/firmware/brcm/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac43752-pcie.clm_blob \ + $(1)/lib/firmware/brcm/ +endef +$(eval $(call BuildPackage,brcmfmac-firmware-43752-pcie)) + +Package/brcmfmac-firmware-43752-sdio = $(call Package/armbian-firmware-default,Broadcom BCM43752 FullMac SDIO firmware) +define Package/brcmfmac-firmware-43752-sdio/install + $(INSTALL_DIR) $(1)/lib/firmware/brcm + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/BCM4362A2.hcd \ + $(1)/lib/firmware/brcm/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac43752-sdio.bin \ + $(1)/lib/firmware/brcm/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac43752-sdio.clm_blob \ + $(1)/lib/firmware/brcm/ +endef +$(eval $(call BuildPackage,brcmfmac-firmware-43752-sdio)) + +Package/brcmfmac-nvram-4356-sdio = $(call Package/armbian-firmware-default,Broadcom BCM4356 SDIO NVRAM firmware) +define Package/brcmfmac-nvram-4356-sdio/install + $(INSTALL_DIR) $(1)/lib/firmware/brcm + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac4356-sdio.txt \ + $(1)/lib/firmware/brcm/ + $(LN) \ + brcmfmac4356-sdio.txt \ + $(1)/lib/firmware/brcm/brcmfmac4356-sdio.friendlyarm,nanopc-t4.txt +endef +$(eval $(call BuildPackage,brcmfmac-nvram-4356-sdio)) + +Package/brcmfmac-nvram-43456-sdio = $(call Package/armbian-firmware-default,Broadcom BCM43456 SDIO NVRAM firmware) +define Package/brcmfmac-nvram-43456-sdio/install + $(INSTALL_DIR) $(1)/lib/firmware/brcm + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac43456-sdio.txt \ + $(1)/lib/firmware/brcm/ + $(LN) \ + brcmfmac43456-sdio.txt \ + $(1)/lib/firmware/brcm/brcmfmac43456-sdio.radxa,rockpi4a.txt +endef +$(eval $(call BuildPackage,brcmfmac-nvram-43456-sdio)) + +Package/brcmfmac-nvram-43752-pcie = $(call Package/armbian-firmware-default,Broadcom BCM43752 PCIe NVRAM firmware) +define Package/brcmfmac-nvram-43752-pcie/install + $(INSTALL_DIR) $(1)/lib/firmware/brcm + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac43752-pcie.txt \ + $(1)/lib/firmware/brcm/ + $(LN) \ + brcmfmac43752-pcie.txt \ + $(1)/lib/firmware/brcm/brcmfmac43752-pcie.armsom,sige7.txt +endef +$(eval $(call BuildPackage,brcmfmac-nvram-43752-pcie)) + +Package/brcmfmac-nvram-43752-sdio = $(call Package/armbian-firmware-default,Broadcom BCM43752 SDIO NVRAM firmware) +define Package/brcmfmac-nvram-43752-sdio/install + $(INSTALL_DIR) $(1)/lib/firmware/brcm + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/brcm/brcmfmac43752-sdio.txt \ + $(1)/lib/firmware/brcm/ + $(LN) \ + brcmfmac43752-sdio.txt \ + $(1)/lib/firmware/brcm/brcmfmac43752-sdio.firefly,rk3568-roc-pc.txt +endef +$(eval $(call BuildPackage,brcmfmac-nvram-43752-sdio)) From 2995b9209eff334e41775f754625b60e9fd0dc16 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 14 Aug 2024 18:41:43 +0800 Subject: [PATCH 6/6] rockchip: switch to use armbian fw for Armsom Sige1 --- package/firmware/armbian-firmware/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/firmware/armbian-firmware/Makefile b/package/firmware/armbian-firmware/Makefile index c6cd47bb2cc76d..186c18d06b25a7 100644 --- a/package/firmware/armbian-firmware/Makefile +++ b/package/firmware/armbian-firmware/Makefile @@ -124,6 +124,9 @@ define Package/brcmfmac-nvram-43752-sdio/install $(INSTALL_DATA) \ $(PKG_BUILD_DIR)/brcm/brcmfmac43752-sdio.txt \ $(1)/lib/firmware/brcm/ + $(LN) \ + brcmfmac43752-sdio.txt \ + $(1)/lib/firmware/brcm/brcmfmac43752-sdio.armsom,sige1-v1.txt $(LN) \ brcmfmac43752-sdio.txt \ $(1)/lib/firmware/brcm/brcmfmac43752-sdio.firefly,rk3568-roc-pc.txt