From 2d471182214b2b772d2bc5ec2a019f829b3da08d Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 5 Nov 2024 19:48:52 +0100 Subject: [PATCH] Add bpi-r4 config --- 6.6/target/linux/mediatek/image/filogic.mk | 61 +++++++++++++++------- build.sh | 5 ++ config-bpi-r4 | 16 ++++++ config-bpi-r4-poe | 16 ++++++ 4 files changed, 80 insertions(+), 18 deletions(-) create mode 100644 config-bpi-r4 create mode 100644 config-bpi-r4-poe diff --git a/6.6/target/linux/mediatek/image/filogic.mk b/6.6/target/linux/mediatek/image/filogic.mk index ef2ab429..08b57d40 100644 --- a/6.6/target/linux/mediatek/image/filogic.mk +++ b/6.6/target/linux/mediatek/image/filogic.mk @@ -83,6 +83,10 @@ define Build/append-gl-metadata } endef +define Build/append-openwrt-one-eeprom + dd if=$(STAGING_DIR_IMAGE)/mt7981_eeprom_mt7976_dbdc.bin >> $@ +endef + define Build/zyxel-nwa-fit-filogic $(TOPDIR)/scripts/mkits-zyxel-fit-filogic.sh \ $@.its $@ "80 e1 ff ff ff ff ff ff ff ff" @@ -204,23 +208,23 @@ define Device/smartrg_sdg-8733 $(call Device/adtran_smartrg) DEVICE_MODEL := SDG-8733 DEVICE_DTS := mt7988a-smartrg-SDG-8733 - DEVICE_PACKAGES += kmod-mt7996-firmware kmod-phy-aquantia kmod-usb3 + DEVICE_PACKAGES += kmod-mt7996-firmware kmod-phy-aquantia kmod-usb3 mt7988-wo-firmware endef TARGET_DEVICES += smartrg_sdg-8733 -#define Device/smartrg_sdg-8733a -#$(call Device/adtran_smartrg) -# DEVICE_MODEL := SDG-8733A -# DEVICE_DTS := mt7988d-smartrg-SDG-8733A -# DEVICE_PACKAGES += mt7988-2p5g-phy-firmware kmod-mt7996-firmware kmod-phy-aquantia -#endef -#TARGET_DEVICES += smartrg_sdg-8733a +define Device/smartrg_sdg-8733a +$(call Device/adtran_smartrg) + DEVICE_MODEL := SDG-8733A + DEVICE_DTS := mt7988d-smartrg-SDG-8733A + DEVICE_PACKAGES += mt7988-2p5g-phy-firmware kmod-mt7996-233-firmware kmod-phy-aquantia mt7988-wo-firmware +endef +TARGET_DEVICES += smartrg_sdg-8733a define Device/smartrg_sdg-8734 $(call Device/adtran_smartrg) DEVICE_MODEL := SDG-8734 DEVICE_DTS := mt7988a-smartrg-SDG-8734 - DEVICE_PACKAGES += kmod-mt7996-firmware kmod-phy-aquantia kmod-sfp kmod-usb3 + DEVICE_PACKAGES += kmod-mt7996-firmware kmod-phy-aquantia kmod-sfp kmod-usb3 mt7988-wo-firmware endef TARGET_DEVICES += smartrg_sdg-8734 @@ -250,6 +254,30 @@ define Device/asus_tuf-ax4200 endef TARGET_DEVICES += asus_tuf-ax4200 +define Device/arcadyan_mozart + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := Mozart + DEVICE_DTS := mt7988a-arcadyan-mozart + DEVICE_DTS_DIR := ../dts + DEVICE_DTC_FLAGS := --pad 4096 + DEVICE_DTS_LOADADDR := 0x45f00000 + DEVICE_PACKAGES := kmod-hwmon-pwmfan e2fsprogs f2fsck mkf2fs kmod-mt7996-firmware + KERNEL_LOADADDR := 0x46000000 + KERNEL := kernel-bin | gzip + KERNEL_INITRAMFS := kernel-bin | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k + KERNEL_INITRAMFS_SUFFIX := .itb + IMAGE_SIZE := $$(shell expr 64 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m + IMAGES := sysupgrade.itb + IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-with-rootfs | pad-rootfs | append-metadata + ARTIFACTS := emmc-preloader.bin emmc-bl31-uboot.fip emmc-gpt.bin + ARTIFACT/emmc-gpt.bin := mt798x-gpt emmc + ARTIFACT/emmc-preloader.bin := mt7988-bl2 emmc-comb + ARTIFACT/emmc-bl31-uboot.fip := mt7988-bl31-uboot arcadyan_mozart + SUPPORTED_DEVICES += arcadyan,mozart +endef +TARGET_DEVICES += arcadyan_mozart + define Device/asus_tuf-ax6000 DEVICE_VENDOR := ASUS DEVICE_MODEL := TUF-AX6000 @@ -373,8 +401,8 @@ define Device/bananapi_bpi-r4-common DEVICE_DTS_LOADADDR := 0x45f00000 DEVICE_DTS_OVERLAY:= mt7988a-bananapi-bpi-r4-emmc mt7988a-bananapi-bpi-r4-rtc mt7988a-bananapi-bpi-r4-sd mt7988a-bananapi-bpi-r4-wifi-mt7996a DEVICE_DTC_FLAGS := --pad 4096 - DEVICE_PACKAGES := kmod-hwmon-pwmfan kmod-i2c-mux-pca954x kmod-eeprom-at24 kmod-mt7996-firmware \ - kmod-rtc-pcf8563 kmod-sfp kmod-usb3 e2fsprogs f2fsck mkf2fs + DEVICE_PACKAGES := kmod-hwmon-pwmfan kmod-i2c-mux-pca954x kmod-eeprom-at24 kmod-mt7996-firmware kmod-mt7996-233-firmware \ + kmod-rtc-pcf8563 kmod-sfp kmod-usb3 e2fsprogs f2fsck mkf2fs mt7988-wo-firmware IMAGES := sysupgrade.itb KERNEL_LOADADDR := 0x46000000 KERNEL_INITRAMFS_SUFFIX := -recovery.itb @@ -1047,10 +1075,6 @@ define Device/openembed_som7981 endef TARGET_DEVICES += openembed_som7981 -define Build/append-openwrt-one-eeprom - dd if=$(STAGING_DIR_IMAGE)/mt7981_eeprom_mt7976_dbdc.bin >> $@ -endef - define Device/openwrt_one DEVICE_VENDOR := OpenWrt DEVICE_MODEL := One @@ -1090,7 +1114,9 @@ define Device/openwrt_one UBINIZE_OPTS := -E 5 BLOCKSIZE := 128k PAGESIZE := 2048 - UBINIZE_PARTS := fip=:$(STAGING_DIR_IMAGE)/mt7981_openwrt_one-snand-u-boot.fip recovery=:$(KDIR)/tmp/openwrt-mediatek-filogic-openwrt_one-initramfs.itb \ + UBINIZE_PARTS := fip=:$(STAGING_DIR_IMAGE)/mt7981_openwrt_one-snand-u-boot.fip \ + $(if $(IB),recovery=:$(STAGING_DIR_IMAGE)/mediatek-filogic-openwrt_one-initramfs.itb,\ + recovery=:$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)) \ $(if $(wildcard $(TOPDIR)/openwrt-mediatek-filogic-openwrt_one-calibration.itb), calibration=:$(TOPDIR)/openwrt-mediatek-filogic-openwrt_one-calibration.itb) endef TARGET_DEVICES += openwrt_one @@ -1404,7 +1430,6 @@ define Device/yuncore_ax835 endef TARGET_DEVICES += yuncore_ax835 - define Device/zbtlink_zbt-z8102ax DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-Z8102AX @@ -1554,4 +1579,4 @@ define Device/z8102ax-128m DEVICE_DTS := mt7981b-zbt-z8102ax-128m IMAGE_SIZE := 131072k endef -TARGET_DEVICES += z8102ax-128m \ No newline at end of file +TARGET_DEVICES += z8102ax-128m diff --git a/build.sh b/build.sh index 95a23df1..b18b6a44 100755 --- a/build.sh +++ b/build.sh @@ -638,6 +638,11 @@ if [ "$OMR_KERNEL" = "5.4" ]; then NOT_SUPPORTED="1" exit 1 fi + if ([ "$OMR_TARGET" = "bpi-r4" ] || [ "$OMR_TARGET" = "bpi-r4-poe" ]); then + echo "Sorry but kernel 5.4 is not supported on your arch" + NOT_SUPPORTED="1" + exit 1 + fi if ([ "$OMR_TARGET" = "z8102ax_128m" ] || [ "$OMR_TARGET" = "z8102ax_64m" ]); then echo "Sorry but kernel 5.4 is not supported on your arch yet" NOT_SUPPORTED="1" diff --git a/config-bpi-r4 b/config-bpi-r4 new file mode 100644 index 00000000..f05c712e --- /dev/null +++ b/config-bpi-r4 @@ -0,0 +1,16 @@ +CONFIG_TARGET_mediatek=y +CONFIG_TARGET_mediatek_filogic=y +CONFIG_TARGET_mediatek_filogic_DEVICE_bananapi_bpi-r4=y +CONFIG_KERNEL_ARM64_MODULE_PLTS=y +CONFIG_KERNEL_TCP_CONG_BBR2=y +CONFIG_PACKAGE_z8102=y +CONFIG_PACKAGE_kmod-mt76=y +CONFIG_TARGET_ROOTFS_PARTSIZE=128 +CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE=y +# CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2 is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4 is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD is not set diff --git a/config-bpi-r4-poe b/config-bpi-r4-poe new file mode 100644 index 00000000..5cf941b2 --- /dev/null +++ b/config-bpi-r4-poe @@ -0,0 +1,16 @@ +CONFIG_TARGET_mediatek=y +CONFIG_TARGET_mediatek_filogic=y +CONFIG_TARGET_mediatek_filogic_DEVICE_bananapi_bpi-r4-poe=y +CONFIG_KERNEL_ARM64_MODULE_PLTS=y +CONFIG_KERNEL_TCP_CONG_BBR2=y +CONFIG_PACKAGE_z8102=y +CONFIG_PACKAGE_kmod-mt76=y +CONFIG_TARGET_ROOTFS_PARTSIZE=128 +CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE=y +# CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2 is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4 is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD is not set