2020-05-04 14:31:19 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
2024-07-05 05:52:06 +00:00
|
|
|
PKG_VERSION:=2024.07
|
|
|
|
PKG_HASH:=f591da9ab90ef3d6b3d173766d0ddff90c4ed7330680897486117df390d83c8f
|
2023-01-13 03:13:24 +00:00
|
|
|
PKG_BUILD_DEPENDS:=!(TARGET_ramips||TARGET_mediatek_mt7623):arm-trusted-firmware-tools/host
|
2020-05-04 14:31:19 +00:00
|
|
|
|
2023-11-25 15:21:22 +00:00
|
|
|
UBOOT_USE_INTREE_DTC:=1
|
|
|
|
|
2020-05-04 14:31:19 +00:00
|
|
|
include $(INCLUDE_DIR)/u-boot.mk
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
|
2022-08-09 23:23:34 +00:00
|
|
|
MT7621_LOWLEVEL_PRELOADER_URL:=https://raw.githubusercontent.com/mtk-openwrt/mt7621-lowlevel-preloader/a03b07c60bf1ba4add9b671d32caa102fe948180/
|
2022-07-11 20:15:32 +00:00
|
|
|
|
|
|
|
define Download/mt7621-stage-sram
|
|
|
|
FILE:=mt7621_stage_sram.bin
|
|
|
|
URL:=$(MT7621_LOWLEVEL_PRELOADER_URL)
|
|
|
|
HASH:=1dda68aa089f0ff262e01539b990dea478952e9fb68bcc0a8cd6f76f0135c62e
|
|
|
|
endef
|
|
|
|
|
2022-08-09 23:23:34 +00:00
|
|
|
define Download/mt7621-stage-sram-noprint
|
|
|
|
FILE:=mt7621_stage_sram_noprint.bin
|
|
|
|
URL:=$(MT7621_LOWLEVEL_PRELOADER_URL)
|
|
|
|
HASH:=8ee419275144fc298e9444d413d98e965a55d283152a74ea6a1f8de79eb516b6
|
|
|
|
endef
|
|
|
|
|
2022-07-11 20:15:32 +00:00
|
|
|
ifdef CONFIG_TARGET_ramips_mt7621
|
2022-08-09 23:23:34 +00:00
|
|
|
ifdef CONFIG_DEBUG
|
2022-07-11 20:15:32 +00:00
|
|
|
$(eval $(call Download,mt7621-stage-sram))
|
2022-08-09 23:23:34 +00:00
|
|
|
else
|
|
|
|
$(eval $(call Download,mt7621-stage-sram-noprint))
|
|
|
|
endif
|
2022-07-11 20:15:32 +00:00
|
|
|
endif
|
|
|
|
|
2020-05-04 14:31:19 +00:00
|
|
|
define U-Boot/Default
|
|
|
|
BUILD_TARGET:=mediatek
|
|
|
|
UBOOT_IMAGE:=u-boot-mtk.bin
|
2023-03-04 15:26:54 +00:00
|
|
|
HIDDEN:=1
|
2020-05-04 14:31:19 +00:00
|
|
|
endef
|
|
|
|
|
2022-07-11 20:15:32 +00:00
|
|
|
define U-Boot/mt7620_rfb
|
|
|
|
NAME:=MT7620 Reference Board
|
|
|
|
UBOOT_CONFIG:=mt7620_rfb
|
|
|
|
BUILD_DEVICES:=ralink_mt7620a-evb
|
|
|
|
BUILD_TARGET:=ramips
|
|
|
|
BUILD_SUBTARGET:=mt7620
|
|
|
|
UBOOT_IMAGE:=u-boot-with-spl.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7620_mt7530_rfb
|
|
|
|
NAME:=MT7620+MT7530 Reference Board
|
|
|
|
UBOOT_CONFIG:=mt7620_mt7530_rfb
|
|
|
|
BUILD_DEVICES:=ralink_mt7620a-mt7530-evb
|
|
|
|
BUILD_TARGET:=ramips
|
|
|
|
BUILD_SUBTARGET:=mt7620
|
|
|
|
UBOOT_IMAGE:=u-boot-with-spl.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7621_rfb
|
|
|
|
NAME:=MT7621 Reference Board
|
|
|
|
UBOOT_CONFIG:=mt7621_rfb
|
|
|
|
BUILD_DEVICES:=mediatek_mt7621-eval-board
|
|
|
|
BUILD_TARGET:=ramips
|
|
|
|
BUILD_SUBTARGET:=mt7621
|
|
|
|
UBOOT_IMAGE:=u-boot-mt7621.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7621_nand_rfb
|
|
|
|
NAME:=MT7621 Reference Board (NAND)
|
|
|
|
UBOOT_CONFIG:=mt7621_nand_rfb
|
|
|
|
BUILD_DEVICES:=mediatek_mt7621-eval-board
|
|
|
|
BUILD_TARGET:=ramips
|
|
|
|
BUILD_SUBTARGET:=mt7621
|
|
|
|
UBOOT_IMAGE:=u-boot-mt7621.bin
|
|
|
|
endef
|
|
|
|
|
2022-08-09 22:59:50 +00:00
|
|
|
define U-Boot/mt7621_zbtlink_zbt-wg3526-16m
|
|
|
|
NAME:=Zbtlink ZBT-WG3526-16m
|
|
|
|
UBOOT_CONFIG:=mt7621_zbtlink_zbt-wg3526-16m
|
|
|
|
BUILD_DEVICES:=zbtlink_zbt-wg3526-16m
|
|
|
|
BUILD_TARGET:=ramips
|
|
|
|
BUILD_SUBTARGET:=mt7621
|
|
|
|
UBOOT_IMAGE:=u-boot-mt7621.bin
|
|
|
|
endef
|
|
|
|
|
2021-02-27 15:14:02 +00:00
|
|
|
define U-Boot/mt7622_rfb1
|
|
|
|
NAME:=MT7622 Reference Board 1
|
2020-05-04 14:31:19 +00:00
|
|
|
UBOOT_CONFIG:=mt7622_rfb
|
2021-03-14 19:07:00 +00:00
|
|
|
BUILD_DEVICES:=mediatek_mt7622-rfb1 mediatek_mt7622-rfb1-ubi
|
|
|
|
BUILD_SUBTARGET:=mt7622
|
2020-05-04 14:31:19 +00:00
|
|
|
endef
|
|
|
|
|
2021-01-30 13:58:16 +00:00
|
|
|
define U-Boot/mt7622_linksys_e8450
|
|
|
|
NAME:=Linksys E8450
|
|
|
|
UBOOT_CONFIG:=mt7622_linksys_e8450
|
2021-03-14 19:07:00 +00:00
|
|
|
BUILD_DEVICES:=linksys_e8450-ubi
|
|
|
|
BUILD_SUBTARGET:=mt7622
|
2021-01-30 13:58:16 +00:00
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
2024-01-22 19:12:40 +00:00
|
|
|
BL2_BOOTDEV:=snand-ubi
|
2021-01-30 13:58:16 +00:00
|
|
|
BL2_DDRBLOB:=1
|
2024-01-22 19:12:40 +00:00
|
|
|
DEPENDS:=+trusted-firmware-a-mt7622-snand-ubi-1ddr
|
2021-01-30 13:58:16 +00:00
|
|
|
endef
|
|
|
|
|
2021-02-27 15:14:02 +00:00
|
|
|
define U-Boot/mt7622_bananapi_bpi-r64-emmc
|
|
|
|
NAME:=BananaPi R64 (eMMC)
|
|
|
|
UBOOT_CONFIG:=mt7622_bananapi_bpi-r64-emmc
|
2021-03-14 19:07:00 +00:00
|
|
|
BUILD_DEVICES:=bananapi_bpi-r64
|
|
|
|
BUILD_SUBTARGET:=mt7622
|
2021-02-27 15:14:02 +00:00
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=emmc
|
|
|
|
BL2_DDRBLOB:=2
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7622-emmc-2ddr
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7622_bananapi_bpi-r64-sdmmc
|
|
|
|
NAME:=BananaPi R64 (SDMMC)
|
|
|
|
UBOOT_CONFIG:=mt7622_bananapi_bpi-r64-sdmmc
|
2021-03-14 19:07:00 +00:00
|
|
|
BUILD_DEVICES:=bananapi_bpi-r64
|
|
|
|
BUILD_SUBTARGET:=mt7622
|
2021-02-27 15:14:02 +00:00
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=sdmmc
|
|
|
|
BL2_DDRBLOB:=2
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7622-sdmmc-2ddr
|
|
|
|
endef
|
|
|
|
|
2021-04-11 15:59:09 +00:00
|
|
|
define U-Boot/mt7622_bananapi_bpi-r64-snand
|
|
|
|
NAME:=BananaPi R64 (SNAND)
|
|
|
|
UBOOT_CONFIG:=mt7622_bananapi_bpi-r64-snand
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r64
|
|
|
|
BUILD_SUBTARGET:=mt7622
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
2024-01-21 23:50:02 +00:00
|
|
|
BL2_BOOTDEV:=snand-ubi
|
2021-04-11 15:59:09 +00:00
|
|
|
BL2_DDRBLOB:=2
|
2024-01-21 23:50:02 +00:00
|
|
|
DEPENDS:=+trusted-firmware-a-mt7622-snand-ubi-2ddr
|
2021-04-11 15:59:09 +00:00
|
|
|
endef
|
|
|
|
|
2023-08-27 23:13:05 +00:00
|
|
|
define U-Boot/mt7622_ubnt_unifi-6-lr-v1
|
2021-04-02 11:05:15 +00:00
|
|
|
NAME:=Ubiquiti UniFi 6 LR
|
2023-08-27 23:13:05 +00:00
|
|
|
UBOOT_CONFIG:=mt7622_ubnt_unifi-6-lr-v1
|
|
|
|
BUILD_DEVICES:=ubnt_unifi-6-lr-v1-ubootmod
|
|
|
|
BUILD_SUBTARGET:=mt7622
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=nor
|
|
|
|
BL2_DDRBLOB:=2
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7622-nor-2ddr
|
|
|
|
FIP_COMPRESS:=1
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7622_ubnt_unifi-6-lr-v2
|
|
|
|
NAME:=Ubiquiti UniFi 6 LR v2
|
|
|
|
UBOOT_CONFIG:=mt7622_ubnt_unifi-6-lr-v2
|
|
|
|
BUILD_DEVICES:=ubnt_unifi-6-lr-v2-ubootmod
|
|
|
|
BUILD_SUBTARGET:=mt7622
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=nor
|
|
|
|
BL2_DDRBLOB:=2
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7622-nor-2ddr
|
|
|
|
FIP_COMPRESS:=1
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7622_ubnt_unifi-6-lr-v3
|
|
|
|
NAME:=Ubiquiti UniFi 6 LR v3
|
|
|
|
UBOOT_CONFIG:=mt7622_ubnt_unifi-6-lr-v3
|
|
|
|
BUILD_DEVICES:=ubnt_unifi-6-lr-v3-ubootmod
|
2021-04-02 11:05:15 +00:00
|
|
|
BUILD_SUBTARGET:=mt7622
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=nor
|
|
|
|
BL2_DDRBLOB:=2
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7622-nor-2ddr
|
2022-07-13 20:06:36 +00:00
|
|
|
FIP_COMPRESS:=1
|
2021-04-02 11:05:15 +00:00
|
|
|
endef
|
|
|
|
|
2024-03-02 13:07:37 +00:00
|
|
|
define U-Boot/mt7622_xiaomi_redmi-router-ax6s-ubi-loader
|
|
|
|
NAME:=Xiaomi Redmi Router AX6S (as UBI loader)
|
|
|
|
UBOOT_CONFIG:=mt7622_xiaomi_redmi-router-ax6s-ubi-loader
|
|
|
|
BUILD_DEVICES:=xiaomi_redmi-router-ax6s
|
|
|
|
BUILD_SUBTARGET:=mt7622
|
|
|
|
UBOOT_IMAGE:=u-boot.bin
|
|
|
|
endef
|
|
|
|
|
2020-07-13 09:37:28 +00:00
|
|
|
define U-Boot/mt7623a_unielec_u7623
|
|
|
|
NAME:=UniElec U7623 (mt7623)
|
2021-08-20 20:12:28 +00:00
|
|
|
BUILD_DEVICES:=unielec_u7623-02
|
2020-07-13 09:37:28 +00:00
|
|
|
BUILD_SUBTARGET:=mt7623
|
|
|
|
UBOOT_CONFIG:=mt7623a_unielec_u7623_02
|
|
|
|
endef
|
|
|
|
|
2020-06-11 18:32:12 +00:00
|
|
|
define U-Boot/mt7623n_bpir2
|
|
|
|
NAME:=Banana Pi R2 (mt7623)
|
2021-07-20 15:58:50 +00:00
|
|
|
BUILD_DEVICES:=bananapi_bpi-r2
|
2020-06-11 18:32:12 +00:00
|
|
|
BUILD_SUBTARGET:=mt7623
|
|
|
|
UBOOT_IMAGE:=u-boot.bin
|
|
|
|
UBOOT_CONFIG:=mt7623n_bpir2
|
|
|
|
endef
|
|
|
|
|
2022-07-11 20:15:32 +00:00
|
|
|
define U-Boot/mt7628_rfb
|
|
|
|
NAME:=MT7628 Reference Board
|
|
|
|
BUILD_DEVICES:=mediatek_mt7628an-eval-board
|
|
|
|
BUILD_TARGET:=ramips
|
|
|
|
BUILD_SUBTARGET:=mt76x8
|
|
|
|
UBOOT_CONFIG:=mt7628_rfb
|
|
|
|
UBOOT_IMAGE:=u-boot-with-spl.bin
|
|
|
|
endef
|
|
|
|
|
2022-08-09 22:59:50 +00:00
|
|
|
define U-Boot/mt7628_ravpower_rp-wd009
|
2022-07-11 20:15:32 +00:00
|
|
|
NAME:=RAVPower RP-WD009
|
|
|
|
BUILD_TARGET:=ramips
|
|
|
|
BUILD_DEVICES:=ravpower_rp-wd009
|
|
|
|
BUILD_SUBTARGET:=mt76x8
|
|
|
|
UBOOT_CONFIG:=ravpower-rp-wd009-ram
|
|
|
|
UBOOT_IMAGE:=u-boot.bin
|
|
|
|
endef
|
|
|
|
|
2021-03-14 19:07:00 +00:00
|
|
|
define U-Boot/mt7629_rfb
|
|
|
|
NAME:=MT7629 Reference Board
|
2020-07-13 09:37:28 +00:00
|
|
|
BUILD_SUBTARGET:=mt7629
|
2021-03-14 19:07:00 +00:00
|
|
|
BUILD_DEVICES:=mediatek_mt7629-rfb
|
2020-07-13 09:37:28 +00:00
|
|
|
UBOOT_CONFIG:=mt7629_rfb
|
|
|
|
endef
|
|
|
|
|
mediatek: add ABT ASR3000 support
Hardware specification:
SoC: MediaTek MT7981B 2x A53
Flash: 128 MB SPI-NAND
RAM: 256MB
Ethernet: 4x 10/100/1000 Mbps
Switch: MediaTek MT7531AE
WiFi: MediaTek MT7976C
Button: Reset, Mesh
Power: DC 12V 1A
Gain telnet access:
1. Login into web interface, and download the configuration.
2. Decode and uncompress the configuration:
* Enter fakeroot if you are not login as root.
base64 -d e-xxxxxxxxxxxx-cfg.tar.gz | tar -zx
3. Edit 'etc/passwd', remove root password: 'root::1:0:99999:7:::'.
4. Edit 'etc/rc.local', insert telnetd command before 'exit 0':
( sleep 3s; /usr/sbin/telnetd; ) &
5. Repack the configuration:
tar -zc etc/ | base64 > e-xxxxxxxxxxxx-cfg.tar.gz
6. Upload new configuration via web interface, now you can connect to
ASR3000 via telnet.
Flash instructions:
1. Connect to ASR3000, backup everything, especially 'Factory' part.
2. Write new BL2:
mtd write openwrt-mediatek-filogic-abt_asr3000-preloader.bin BL2
3. Write new FIP:
mtd write openwrt-mediatek-filogic-abt_asr3000-bl31-uboot.fip FIP
4. Set static IP on your PC:
IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, perform sysupgrade.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/15887
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-06 07:30:31 +00:00
|
|
|
define U-Boot/mt7981_abt_asr3000
|
|
|
|
NAME:=ABT ASR3000
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=abt_asr3000
|
|
|
|
UBOOT_CONFIG:=mt7981_abt_asr3000
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
2023-09-23 07:02:32 +00:00
|
|
|
define U-Boot/mt7981_cmcc_rax3000m-emmc
|
|
|
|
NAME:=CMCC RAX3000M
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=cmcc_rax3000m
|
|
|
|
UBOOT_CONFIG:=mt7981_cmcc_rax3000m-emmc
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=emmc
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-emmc-ddr4
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7981_cmcc_rax3000m-nand
|
|
|
|
NAME:=CMCC RAX3000M
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=cmcc_rax3000m
|
|
|
|
UBOOT_CONFIG:=mt7981_cmcc_rax3000m-nand
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr4
|
|
|
|
endef
|
|
|
|
|
2023-05-20 15:03:06 +00:00
|
|
|
define U-Boot/mt7981_h3c_magic-nx30-pro
|
|
|
|
NAME:=H3C Magic NX30 Pro
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=h3c_magic-nx30-pro
|
|
|
|
UBOOT_CONFIG:=mt7981_h3c_magic-nx30-pro
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
2023-06-15 15:21:40 +00:00
|
|
|
define U-Boot/mt7981_jcg_q30-pro
|
|
|
|
NAME:=JCG Q30 PRO
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=jcg_q30-pro
|
|
|
|
UBOOT_CONFIG:=mt7981_jcg_q30-pro
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
mediatek: add Nokia EA0326GMP support
Hardware specification:
SoC: MediaTek MT7981B 2x A53
Flash: 128 MB SPI-NAND
RAM: 256MB
Ethernet: 4x 10/100/1000 Mbps
Switch: MediaTek MT7531AE
WiFi: MediaTek MT7976C
Button: Reset, WPS/Mesh
Power: DC 12V 1A
Gain SSH access:
1. Login into web interface, and download the configuration.
2. Download the configration utilities:
https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz
These binaries are extraced from the factory firmware, which are
dynamically linked with aarch64 musl 1.1.24. To use them, you
must run them under the same runtime environment, otherwise the
binaries will not work properly!
3. Upload the configuration and utilities to a suitable environment.
4. Uncompress the utilities, move them to '/bin' and give them executable permisison:
tar -zxf openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz
mv mkconfig seama /bin
chmod +x /bin/mkconfig
chmod +x /bin/seama
5. Decrypt and uncompress the configuration:
Enter fakeroot if you are not login as root.
mkconfig -a de-enca -m EA0326GMP_3FE79221BAAA -i EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz -o backup.tar.gz
tar -zxf backup.tar.gz
6. Edit 'etc/config/dropbear', set 'enable' to '1'.
7. Edit 'etc/passwd', remove root password: 'root::1:0:99999:7:::'.
8. Repack the configuration:
tar -zcf backup.tar.gz etc/
mkconfig -a enca -m EA0326GMP_3FE79221BAAA -i backup.tar.gz -o EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz
9. Upload new configuration via web interface, now you can SSH to EA0326GMP.
A minimum configuration which enabled SSH access is also provided
to simplify the process:
https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-enable-ssh.tar.gz
Flash instructions:
1. SSH to EA0326GMP, backup everything, especially 'Factory' part.
2. Write new BL2:
mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-preloader.bin BL2
3. Write new FIP:
mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-bl31-uboot.fip FIP
4. Set static IP on your PC:
IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, perform sysupgrade.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-24 13:26:07 +00:00
|
|
|
define U-Boot/mt7981_nokia_ea0326gmp
|
|
|
|
NAME:=Nokia EA0326GMP
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=nokia_ea0326gmp
|
|
|
|
UBOOT_CONFIG:=mt7981_nokia_ea0326gmp
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
2024-04-06 10:14:47 +00:00
|
|
|
define U-Boot/mt7981_openwrt_one-snand
|
|
|
|
NAME:=OpenWrt One NAND
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=openwrt_one
|
|
|
|
UBOOT_CONFIG:=mt7981_openwrt-one-spi-nand
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand-ubi
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ubi-ddr4
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7981_openwrt_one-nor
|
|
|
|
NAME:=OpenWrt One NOR
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=openwrt_one
|
|
|
|
UBOOT_CONFIG:=mt7981_openwrt-one-nor
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=nor
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
FIP_COMPRESS:=1
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-nor-ddr4
|
|
|
|
endef
|
|
|
|
|
2023-09-12 23:57:23 +00:00
|
|
|
define U-Boot/mt7981_rfb-spim-nand
|
|
|
|
NAME:=MT7981 Reference Board
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=mediatek_mt7981-rfb
|
|
|
|
UBOOT_CONFIG:=mt7981_rfb
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7981_rfb-emmc
|
|
|
|
NAME:=MT7981 Reference Board
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=mediatek_mt7981-rfb
|
|
|
|
UBOOT_CONFIG:=mt7981_emmc_rfb
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=emmc
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-emmc-ddr3
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7981_rfb-nor
|
|
|
|
NAME:=MT7981 Reference Board
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=mediatek_mt7981-rfb
|
|
|
|
UBOOT_CONFIG:=mt7981_nor_rfb
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-nor-ddr3
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7981_rfb-sd
|
|
|
|
NAME:=MT7981 Reference Board
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=mediatek_mt7981-rfb
|
|
|
|
UBOOT_CONFIG:=mt7981_sd_rfb
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=sdmmc
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-sdmmc-ddr3
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7981_rfb-snfi
|
|
|
|
NAME:=MT7981 Reference Board
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=mediatek_mt7981-rfb
|
|
|
|
UBOOT_CONFIG:=mt7981_snfi_nand_rfb
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=snand
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-snand-ddr3
|
|
|
|
endef
|
|
|
|
|
2023-04-28 15:36:17 +00:00
|
|
|
define U-Boot/mt7981_qihoo_360t7
|
|
|
|
NAME:=Qihoo 360T7
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=qihoo_360t7
|
|
|
|
UBOOT_CONFIG:=mt7981_qihoo-360t7
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
2023-11-27 09:01:34 +00:00
|
|
|
define U-Boot/mt7981_xiaomi_mi-router-ax3000t
|
|
|
|
NAME:=Xiaomi Router AX3000T
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=xiaomi_mi-router-ax3000t-ubootmod
|
|
|
|
UBOOT_CONFIG:=mt7981_xiaomi_mi-router-ax3000t
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
2023-07-20 17:42:58 +00:00
|
|
|
define U-Boot/mt7981_xiaomi_mi-router-wr30u
|
|
|
|
NAME:=Xiaomi Router WR30U
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=xiaomi_mi-router-wr30u-ubootmod
|
|
|
|
UBOOT_CONFIG:=mt7981_xiaomi_mi-router-wr30u
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7981
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
2022-07-12 02:41:30 +00:00
|
|
|
define U-Boot/mt7986_rfb
|
|
|
|
NAME:=MT7986 Reference Board
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=mediatek_mt7986-rfb
|
|
|
|
UBOOT_CONFIG:=mt7986_rfb
|
2022-07-13 03:29:34 +00:00
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=sdmmc
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-sdmmc-ddr4
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7986_bananapi_bpi-r3-emmc
|
|
|
|
NAME:=BananaPi BPi-R3
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r3
|
|
|
|
UBOOT_CONFIG:=mt7986a_bpi-r3-emmc
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=emmc
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-emmc-ddr4
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7986_bananapi_bpi-r3-sdmmc
|
|
|
|
NAME:=BananaPi BPi-R3
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r3
|
|
|
|
UBOOT_CONFIG:=mt7986a_bpi-r3-sd
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=sdmmc
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-sdmmc-ddr4
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7986_bananapi_bpi-r3-snand
|
|
|
|
NAME:=BananaPi BPi-R3
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r3
|
|
|
|
UBOOT_CONFIG:=mt7986a_bpi-r3-snand
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
2024-01-18 22:12:08 +00:00
|
|
|
BL2_BOOTDEV:=spim-nand-ubi
|
2022-07-13 03:29:34 +00:00
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
2024-01-18 22:12:08 +00:00
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ubi-ddr4
|
2022-07-13 03:29:34 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7986_bananapi_bpi-r3-nor
|
|
|
|
NAME:=BananaPi BPi-R3
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r3
|
|
|
|
UBOOT_CONFIG:=mt7986a_bpi-r3-nor
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=nor
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-nor-ddr4
|
|
|
|
FIP_COMPRESS:=1
|
2022-07-12 02:41:30 +00:00
|
|
|
endef
|
|
|
|
|
2024-01-26 17:26:39 +00:00
|
|
|
define U-Boot/mt7986_bananapi_bpi-r3-mini-emmc
|
2024-02-25 12:21:40 +00:00
|
|
|
NAME:=BananaPi BPi-R3 Mini
|
2024-01-26 17:26:39 +00:00
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r3-mini
|
|
|
|
UBOOT_CONFIG:=mt7986a_bpi-r3-mini-emmc
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=emmc
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-emmc-ddr4
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7986_bananapi_bpi-r3-mini-snand
|
2024-02-25 12:21:40 +00:00
|
|
|
NAME:=BananaPi BPi-R3 Mini
|
2024-01-26 17:26:39 +00:00
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r3-mini
|
|
|
|
UBOOT_CONFIG:=mt7986a_bpi-r3-mini-snand
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand-ubi
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ubi-ddr4
|
|
|
|
endef
|
|
|
|
|
2023-09-24 14:34:12 +00:00
|
|
|
define U-Boot/mt7986_glinet_gl-mt6000
|
|
|
|
NAME:=GL.iNet GL-MT6000
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=glinet_gl-mt6000
|
|
|
|
UBOOT_CONFIG:=mt7986a_glinet_gl-mt6000
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=emmc
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-emmc-ddr4
|
|
|
|
endef
|
|
|
|
|
2023-11-01 06:44:50 +00:00
|
|
|
define U-Boot/mt7986_jdcloud_re-cp-03
|
|
|
|
NAME:=JDCloud RE-CP-03
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=jdcloud_re-cp-03
|
|
|
|
UBOOT_CONFIG:=mt7986a_jdcloud_re-cp-03
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=emmc
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-emmc-ddr4
|
|
|
|
endef
|
|
|
|
|
2023-11-02 15:16:28 +00:00
|
|
|
define U-Boot/mt7986_netcore_n60
|
|
|
|
NAME:=Netcore N60
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=netcore_n60
|
|
|
|
UBOOT_CONFIG:=mt7986_netcore_n60
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
2022-12-02 04:29:58 +00:00
|
|
|
define U-Boot/mt7986_tplink_tl-xdr4288
|
|
|
|
NAME:=TP-LINK TL-XDR4288
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=tplink_tl-xdr4288
|
|
|
|
UBOOT_CONFIG:=mt7986_tplink_tl-xdr4288
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7986_tplink_tl-xdr6086
|
|
|
|
NAME:=TP-LINK TL-XDR6086
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=tplink_tl-xdr6086
|
|
|
|
UBOOT_CONFIG:=mt7986_tplink_tl-xdr6086
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7986_tplink_tl-xdr6088
|
|
|
|
NAME:=TP-LINK TL-XDR6088
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=tplink_tl-xdr6088
|
|
|
|
UBOOT_CONFIG:=mt7986_tplink_tl-xdr6088
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr3
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr3
|
|
|
|
endef
|
|
|
|
|
2024-06-17 12:10:06 +00:00
|
|
|
define U-Boot/mt7986_tplink_tl-xtr8488
|
|
|
|
NAME:=TP-LINK TL-XTR8488
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=tplink_tl-xtr8488
|
|
|
|
UBOOT_CONFIG:=mt7986_tplink_tl-xtr8488
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr4
|
|
|
|
endef
|
|
|
|
|
uboot-mediatek: add support for Xiaomi Redmi Router AX6000
U-Boot flash instructions:
0. OpenWrt U-Boot does not support stock layout, it comes with recovery
boot support, automatic tftp recovery and never blocks UART.
A new flash layout is introduced, we call it OpenWrt U-Boot layout,
stock flash layout and the old OpenWrt layout are not supported.
During the whole flash procedure, please do not reboot or power off
unless requested explicitly, or you will break your device.
1. Your device should already running OpenWrt.
If not, follow the instructions to flash OpenWrt:
https://github.com/openwrt/openwrt/pull/11115
2. Backup BL2 Nvram Bdata Factory and FIP in case you break something or
in case you want to go back to stock firmware one day.
cat /dev/mtdblock0 > /tmp/BL2.bin
cat /dev/mtdblock1 > /tmp/Nvram.bin
cat /dev/mtdblock2 > /tmp/Bdata.bin
cat /dev/mtdblock3 > /tmp/Factory.bin
cat /dev/mtdblock4 > /tmp/FIP.bin
And save all whose bin files to somewhere safe.
Then backup your configurations, since ubiformat for entire mtd device is
required to create new ubootenv volume for OpenWrt U-Boot.
3. Run the following cmd to boot into an initramfs with the new OpenWrt
U-Boot layout that expand ubi partion to the end of flash:
ubiformat /dev/mtd7 -y -f /tmp/ax6000-ubootmod-initramfs-factory.ubi
4. After boot into initramfs, check mtd partion info.
The ubi partion should be mtd5
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 BL2
mtd1: 00040000 00020000 Nvram
mtd2: 00040000 00020000 Bdata
mtd3: 00200000 00020000 Factory
mtd4: 00200000 00020000 FIP
mtd5: 07a80000 00020000 ubi
5. Load kmod-mtd-rw to temporarily make the bootloader partions writable.
The kmod-mtd-rw is from the feeds, it is not packed in initramfs-factory
by default.
To install kmod-mtd-rw via opkg:
opkg update && opkg install kmod-mtd-rw
Or, download kmod-mtd-rw.ipk from OpenWrt server and install it manually
e.g:
https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/kmods/
Select your OpenWrt release version and kernel version accordingly.
Load kmod-mtd-rw:
insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1
6. Run the following cmd to clean all pending crash dumps in pstore,
or OpenWrt U-Boot may boot into NAND recovery or tftp recovery.
rm -f /sys/fs/pstore/*
7. Format ubi and create new ubootenv volume:
ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
8. This is optional. Skip this if you do not want to have NAND recovery
boot feature offered by OpenWrt U-Boot. Don't worry, you always have
automatic tftp recovery feature enabled.
ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB
ubiupdatevol /dev/ubi0_2 /tmp/ax6000-ubootmod-initramfs-recovery.itb
9. Now, flash new U-Boot. Bye-bye ugly stock U-Boot.
mtd write /tmp/ax6000-ubootmod-preloader.bin BL2
mtd write /tmp/ax6000-ubootmod-bl31-uboot.fip FIP
10. Flash the squashfs-sysupgrade.bin as usual:
sysupgrade -n /tmp/ax6000-ubootmod-squashfs-sysupgrade.itb
Enjoy!
Signed-off-by: Furong Xu <xfr@outlook.com>
2022-12-22 02:40:50 +00:00
|
|
|
define U-Boot/mt7986_xiaomi_redmi-router-ax6000
|
|
|
|
NAME:=Xiaomi Redmi AX6000
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=xiaomi_redmi-router-ax6000-ubootmod
|
|
|
|
UBOOT_CONFIG:=mt7986_xiaomi_redmi-ax6000
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr4
|
|
|
|
endef
|
|
|
|
|
2023-08-26 22:01:58 +00:00
|
|
|
define U-Boot/mt7986_zyxel_ex5601-t0
|
|
|
|
NAME:=Zyxel EX5601-T0
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=zyxel_ex5601-t0-ubootmod
|
|
|
|
UBOOT_CONFIG:=mt7986_zyxel_ex5601-t0
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand-4k
|
|
|
|
BL2_SOC:=mt7986
|
|
|
|
BL2_DDRTYPE:=ddr4
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-4k-ddr4
|
|
|
|
endef
|
|
|
|
|
2023-07-25 01:56:01 +00:00
|
|
|
define U-Boot/mt7988_bananapi_bpi-r4-emmc
|
|
|
|
NAME:=BananaPi BPi-R4
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r4
|
|
|
|
UBOOT_CONFIG:=mt7988a_bananapi_bpi-r4-emmc
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=emmc
|
|
|
|
BL2_SOC:=mt7988
|
|
|
|
BL2_DDRTYPE:=comb
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7988-emmc-comb
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7988_bananapi_bpi-r4-sdmmc
|
|
|
|
NAME:=BananaPi BPi-R4
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r4
|
|
|
|
UBOOT_CONFIG:=mt7988a_bananapi_bpi-r4-sdmmc
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=sdmmc
|
|
|
|
BL2_SOC:=mt7988
|
|
|
|
BL2_DDRTYPE:=comb
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7988-sdmmc-comb
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7988_bananapi_bpi-r4-snand
|
|
|
|
NAME:=BananaPi BPi-R4
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r4
|
|
|
|
UBOOT_CONFIG:=mt7988a_bananapi_bpi-r4-snand
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand-ubi
|
|
|
|
BL2_SOC:=mt7988
|
|
|
|
BL2_DDRTYPE:=comb
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7988-spim-nand-ubi-comb
|
|
|
|
endef
|
|
|
|
|
2024-04-30 12:55:28 +00:00
|
|
|
define U-Boot/mt7988_bananapi_bpi-r4-poe-emmc
|
|
|
|
NAME:=BananaPi BPi-R4 2.5GE
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r4-poe
|
|
|
|
UBOOT_CONFIG:=mt7988a_bananapi_bpi-r4-poe-emmc
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=emmc
|
|
|
|
BL2_SOC:=mt7988
|
|
|
|
BL2_DDRTYPE:=comb
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7988-emmc-comb
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7988_bananapi_bpi-r4-poe-sdmmc
|
|
|
|
NAME:=BananaPi BPi-R4 2.5GE
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r4-poe
|
|
|
|
UBOOT_CONFIG:=mt7988a_bananapi_bpi-r4-poe-sdmmc
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=sdmmc
|
|
|
|
BL2_SOC:=mt7988
|
|
|
|
BL2_DDRTYPE:=comb
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7988-sdmmc-comb
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7988_bananapi_bpi-r4-poe-snand
|
|
|
|
NAME:=BananaPi BPi-R4 2.5GE
|
|
|
|
BUILD_SUBTARGET:=filogic
|
|
|
|
BUILD_DEVICES:=bananapi_bpi-r4-poe
|
|
|
|
UBOOT_CONFIG:=mt7988a_bananapi_bpi-r4-poe-snand
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand-ubi
|
|
|
|
BL2_SOC:=mt7988
|
|
|
|
BL2_DDRTYPE:=comb
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7988-spim-nand-ubi-comb
|
|
|
|
endef
|
|
|
|
|
2023-07-22 17:55:32 +00:00
|
|
|
define U-Boot/mt7988_rfb-spim-nand
|
|
|
|
NAME:=MT7988 Reference Board
|
|
|
|
BUILD_SUBTARGET:=filogic
|
2023-08-25 02:58:33 +00:00
|
|
|
BUILD_DEVICES:=mediatek_mt7988a-rfb
|
2023-07-22 17:55:32 +00:00
|
|
|
UBOOT_CONFIG:=mt7988_rfb
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=spim-nand
|
|
|
|
BL2_SOC:=mt7988
|
2023-08-25 02:58:33 +00:00
|
|
|
BL2_DDRTYPE:=comb
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7988-spim-nand-comb
|
2023-07-22 17:55:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7988_rfb-snand
|
|
|
|
NAME:=MT7988 Reference Board
|
|
|
|
BUILD_SUBTARGET:=filogic
|
2023-08-25 02:58:33 +00:00
|
|
|
BUILD_DEVICES:=mediatek_mt7988a-rfb
|
2023-07-22 17:55:32 +00:00
|
|
|
UBOOT_CONFIG:=mt7988_rfb
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=snand
|
|
|
|
BL2_SOC:=mt7988
|
2023-08-25 02:58:33 +00:00
|
|
|
BL2_DDRTYPE:=comb
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7988-snand-comb
|
2023-07-22 17:55:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7988_rfb-nor
|
|
|
|
NAME:=MT7988 Reference Board
|
|
|
|
BUILD_SUBTARGET:=filogic
|
2023-08-25 02:58:33 +00:00
|
|
|
BUILD_DEVICES:=mediatek_mt7988a-rfb
|
2023-07-22 17:55:32 +00:00
|
|
|
UBOOT_CONFIG:=mt7988_rfb
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=nor
|
|
|
|
BL2_SOC:=mt7988
|
2023-08-25 02:58:33 +00:00
|
|
|
BL2_DDRTYPE:=comb
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7988-nor-comb
|
|
|
|
FIP_COMPRESS:=1
|
2023-07-22 17:55:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7988_rfb-emmc
|
|
|
|
NAME:=MT7988 Reference Board
|
|
|
|
BUILD_SUBTARGET:=filogic
|
2023-08-25 02:58:33 +00:00
|
|
|
BUILD_DEVICES:=mediatek_mt7988a-rfb
|
2023-07-22 17:55:32 +00:00
|
|
|
UBOOT_CONFIG:=mt7988_rfb
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=emmc
|
|
|
|
BL2_SOC:=mt7988
|
2023-08-25 02:58:33 +00:00
|
|
|
BL2_DDRTYPE:=comb
|
|
|
|
DEPENDS:=+trusted-firmware-a-mt7988-emmc-comb
|
2023-07-22 17:55:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/mt7988_rfb-sd
|
|
|
|
NAME:=MT7988 Reference Board
|
|
|
|
BUILD_SUBTARGET:=filogic
|
2023-08-25 02:58:33 +00:00
|
|
|
BUILD_DEVICES:=mediatek_mt7988a-rfb
|
2023-07-22 17:55:32 +00:00
|
|
|
UBOOT_CONFIG:=mt7988_sd_rfb
|
|
|
|
UBOOT_IMAGE:=u-boot.fip
|
|
|
|
BL2_BOOTDEV:=sdmmc
|
|
|
|
BL2_SOC:=mt7988
|
2023-08-25 02:58:33 +00:00
|
|
|
BL2_DDRTYPE:=comb
|
2023-08-28 22:41:43 +00:00
|
|
|
DEPENDS:=+trusted-firmware-a-mt7988-sdmmc-comb
|
2023-07-22 17:55:32 +00:00
|
|
|
endef
|
|
|
|
|
2021-02-27 15:14:02 +00:00
|
|
|
UBOOT_TARGETS := \
|
2022-07-11 20:15:32 +00:00
|
|
|
mt7620_mt7530_rfb \
|
|
|
|
mt7620_rfb \
|
|
|
|
mt7621_nand_rfb \
|
|
|
|
mt7621_rfb \
|
2022-08-09 22:59:50 +00:00
|
|
|
mt7621_zbtlink_zbt-wg3526-16m \
|
2021-02-27 15:14:02 +00:00
|
|
|
mt7622_bananapi_bpi-r64-emmc \
|
|
|
|
mt7622_bananapi_bpi-r64-sdmmc \
|
2021-04-11 15:59:09 +00:00
|
|
|
mt7622_bananapi_bpi-r64-snand \
|
2021-02-27 15:14:02 +00:00
|
|
|
mt7622_linksys_e8450 \
|
|
|
|
mt7622_rfb1 \
|
2023-08-27 23:13:05 +00:00
|
|
|
mt7622_ubnt_unifi-6-lr-v1 \
|
|
|
|
mt7622_ubnt_unifi-6-lr-v2 \
|
|
|
|
mt7622_ubnt_unifi-6-lr-v3 \
|
2024-05-24 21:38:34 +00:00
|
|
|
mt7622_xiaomi_redmi-router-ax6s-ubi-loader \
|
2021-02-27 15:14:02 +00:00
|
|
|
mt7623n_bpir2 \
|
2021-03-14 19:07:00 +00:00
|
|
|
mt7623a_unielec_u7623 \
|
2022-07-11 20:15:32 +00:00
|
|
|
mt7628_rfb \
|
2022-08-09 22:59:50 +00:00
|
|
|
mt7628_ravpower_rp-wd009 \
|
2022-07-12 02:41:30 +00:00
|
|
|
mt7629_rfb \
|
mediatek: add ABT ASR3000 support
Hardware specification:
SoC: MediaTek MT7981B 2x A53
Flash: 128 MB SPI-NAND
RAM: 256MB
Ethernet: 4x 10/100/1000 Mbps
Switch: MediaTek MT7531AE
WiFi: MediaTek MT7976C
Button: Reset, Mesh
Power: DC 12V 1A
Gain telnet access:
1. Login into web interface, and download the configuration.
2. Decode and uncompress the configuration:
* Enter fakeroot if you are not login as root.
base64 -d e-xxxxxxxxxxxx-cfg.tar.gz | tar -zx
3. Edit 'etc/passwd', remove root password: 'root::1:0:99999:7:::'.
4. Edit 'etc/rc.local', insert telnetd command before 'exit 0':
( sleep 3s; /usr/sbin/telnetd; ) &
5. Repack the configuration:
tar -zc etc/ | base64 > e-xxxxxxxxxxxx-cfg.tar.gz
6. Upload new configuration via web interface, now you can connect to
ASR3000 via telnet.
Flash instructions:
1. Connect to ASR3000, backup everything, especially 'Factory' part.
2. Write new BL2:
mtd write openwrt-mediatek-filogic-abt_asr3000-preloader.bin BL2
3. Write new FIP:
mtd write openwrt-mediatek-filogic-abt_asr3000-bl31-uboot.fip FIP
4. Set static IP on your PC:
IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, perform sysupgrade.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/15887
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-06 07:30:31 +00:00
|
|
|
mt7981_abt_asr3000 \
|
2023-09-23 07:02:32 +00:00
|
|
|
mt7981_cmcc_rax3000m-emmc \
|
|
|
|
mt7981_cmcc_rax3000m-nand \
|
2023-05-20 15:03:06 +00:00
|
|
|
mt7981_h3c_magic-nx30-pro \
|
2023-06-15 15:21:40 +00:00
|
|
|
mt7981_jcg_q30-pro \
|
mediatek: add Nokia EA0326GMP support
Hardware specification:
SoC: MediaTek MT7981B 2x A53
Flash: 128 MB SPI-NAND
RAM: 256MB
Ethernet: 4x 10/100/1000 Mbps
Switch: MediaTek MT7531AE
WiFi: MediaTek MT7976C
Button: Reset, WPS/Mesh
Power: DC 12V 1A
Gain SSH access:
1. Login into web interface, and download the configuration.
2. Download the configration utilities:
https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz
These binaries are extraced from the factory firmware, which are
dynamically linked with aarch64 musl 1.1.24. To use them, you
must run them under the same runtime environment, otherwise the
binaries will not work properly!
3. Upload the configuration and utilities to a suitable environment.
4. Uncompress the utilities, move them to '/bin' and give them executable permisison:
tar -zxf openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz
mv mkconfig seama /bin
chmod +x /bin/mkconfig
chmod +x /bin/seama
5. Decrypt and uncompress the configuration:
Enter fakeroot if you are not login as root.
mkconfig -a de-enca -m EA0326GMP_3FE79221BAAA -i EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz -o backup.tar.gz
tar -zxf backup.tar.gz
6. Edit 'etc/config/dropbear', set 'enable' to '1'.
7. Edit 'etc/passwd', remove root password: 'root::1:0:99999:7:::'.
8. Repack the configuration:
tar -zcf backup.tar.gz etc/
mkconfig -a enca -m EA0326GMP_3FE79221BAAA -i backup.tar.gz -o EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz
9. Upload new configuration via web interface, now you can SSH to EA0326GMP.
A minimum configuration which enabled SSH access is also provided
to simplify the process:
https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-enable-ssh.tar.gz
Flash instructions:
1. SSH to EA0326GMP, backup everything, especially 'Factory' part.
2. Write new BL2:
mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-preloader.bin BL2
3. Write new FIP:
mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-bl31-uboot.fip FIP
4. Set static IP on your PC:
IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, perform sysupgrade.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-24 13:26:07 +00:00
|
|
|
mt7981_nokia_ea0326gmp \
|
2024-04-06 10:14:47 +00:00
|
|
|
mt7981_openwrt_one-snand \
|
|
|
|
mt7981_openwrt_one-nor \
|
2023-09-12 23:57:23 +00:00
|
|
|
mt7981_rfb-spim-nand \
|
|
|
|
mt7981_rfb-emmc \
|
|
|
|
mt7981_rfb-nor \
|
|
|
|
mt7981_rfb-sd \
|
|
|
|
mt7981_rfb-snfi \
|
2023-04-28 15:36:17 +00:00
|
|
|
mt7981_qihoo_360t7 \
|
2023-11-27 09:01:34 +00:00
|
|
|
mt7981_xiaomi_mi-router-ax3000t \
|
2023-07-20 17:42:58 +00:00
|
|
|
mt7981_xiaomi_mi-router-wr30u \
|
2022-07-13 03:29:34 +00:00
|
|
|
mt7986_bananapi_bpi-r3-emmc \
|
|
|
|
mt7986_bananapi_bpi-r3-sdmmc \
|
|
|
|
mt7986_bananapi_bpi-r3-snand \
|
|
|
|
mt7986_bananapi_bpi-r3-nor \
|
2024-01-26 17:26:39 +00:00
|
|
|
mt7986_bananapi_bpi-r3-mini-emmc \
|
|
|
|
mt7986_bananapi_bpi-r3-mini-snand \
|
2023-09-24 14:34:12 +00:00
|
|
|
mt7986_glinet_gl-mt6000 \
|
2023-11-01 06:44:50 +00:00
|
|
|
mt7986_jdcloud_re-cp-03 \
|
2023-11-02 15:16:28 +00:00
|
|
|
mt7986_netcore_n60 \
|
2022-12-02 04:29:58 +00:00
|
|
|
mt7986_tplink_tl-xdr4288 \
|
|
|
|
mt7986_tplink_tl-xdr6086 \
|
|
|
|
mt7986_tplink_tl-xdr6088 \
|
2024-06-17 12:10:06 +00:00
|
|
|
mt7986_tplink_tl-xtr8488 \
|
uboot-mediatek: add support for Xiaomi Redmi Router AX6000
U-Boot flash instructions:
0. OpenWrt U-Boot does not support stock layout, it comes with recovery
boot support, automatic tftp recovery and never blocks UART.
A new flash layout is introduced, we call it OpenWrt U-Boot layout,
stock flash layout and the old OpenWrt layout are not supported.
During the whole flash procedure, please do not reboot or power off
unless requested explicitly, or you will break your device.
1. Your device should already running OpenWrt.
If not, follow the instructions to flash OpenWrt:
https://github.com/openwrt/openwrt/pull/11115
2. Backup BL2 Nvram Bdata Factory and FIP in case you break something or
in case you want to go back to stock firmware one day.
cat /dev/mtdblock0 > /tmp/BL2.bin
cat /dev/mtdblock1 > /tmp/Nvram.bin
cat /dev/mtdblock2 > /tmp/Bdata.bin
cat /dev/mtdblock3 > /tmp/Factory.bin
cat /dev/mtdblock4 > /tmp/FIP.bin
And save all whose bin files to somewhere safe.
Then backup your configurations, since ubiformat for entire mtd device is
required to create new ubootenv volume for OpenWrt U-Boot.
3. Run the following cmd to boot into an initramfs with the new OpenWrt
U-Boot layout that expand ubi partion to the end of flash:
ubiformat /dev/mtd7 -y -f /tmp/ax6000-ubootmod-initramfs-factory.ubi
4. After boot into initramfs, check mtd partion info.
The ubi partion should be mtd5
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 BL2
mtd1: 00040000 00020000 Nvram
mtd2: 00040000 00020000 Bdata
mtd3: 00200000 00020000 Factory
mtd4: 00200000 00020000 FIP
mtd5: 07a80000 00020000 ubi
5. Load kmod-mtd-rw to temporarily make the bootloader partions writable.
The kmod-mtd-rw is from the feeds, it is not packed in initramfs-factory
by default.
To install kmod-mtd-rw via opkg:
opkg update && opkg install kmod-mtd-rw
Or, download kmod-mtd-rw.ipk from OpenWrt server and install it manually
e.g:
https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/kmods/
Select your OpenWrt release version and kernel version accordingly.
Load kmod-mtd-rw:
insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1
6. Run the following cmd to clean all pending crash dumps in pstore,
or OpenWrt U-Boot may boot into NAND recovery or tftp recovery.
rm -f /sys/fs/pstore/*
7. Format ubi and create new ubootenv volume:
ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
8. This is optional. Skip this if you do not want to have NAND recovery
boot feature offered by OpenWrt U-Boot. Don't worry, you always have
automatic tftp recovery feature enabled.
ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB
ubiupdatevol /dev/ubi0_2 /tmp/ax6000-ubootmod-initramfs-recovery.itb
9. Now, flash new U-Boot. Bye-bye ugly stock U-Boot.
mtd write /tmp/ax6000-ubootmod-preloader.bin BL2
mtd write /tmp/ax6000-ubootmod-bl31-uboot.fip FIP
10. Flash the squashfs-sysupgrade.bin as usual:
sysupgrade -n /tmp/ax6000-ubootmod-squashfs-sysupgrade.itb
Enjoy!
Signed-off-by: Furong Xu <xfr@outlook.com>
2022-12-22 02:40:50 +00:00
|
|
|
mt7986_xiaomi_redmi-router-ax6000 \
|
2023-08-26 22:01:58 +00:00
|
|
|
mt7986_zyxel_ex5601-t0 \
|
2023-07-22 17:55:32 +00:00
|
|
|
mt7986_rfb \
|
2023-07-25 01:56:01 +00:00
|
|
|
mt7988_bananapi_bpi-r4-emmc \
|
|
|
|
mt7988_bananapi_bpi-r4-sdmmc \
|
|
|
|
mt7988_bananapi_bpi-r4-snand \
|
2024-04-30 12:55:28 +00:00
|
|
|
mt7988_bananapi_bpi-r4-poe-emmc \
|
|
|
|
mt7988_bananapi_bpi-r4-poe-sdmmc \
|
|
|
|
mt7988_bananapi_bpi-r4-poe-snand \
|
2023-07-22 17:55:32 +00:00
|
|
|
mt7988_rfb-spim-nand \
|
|
|
|
mt7988_rfb-snand \
|
|
|
|
mt7988_rfb-nor \
|
|
|
|
mt7988_rfb-emmc \
|
|
|
|
mt7988_rfb-sd
|
2020-05-04 14:31:19 +00:00
|
|
|
|
2024-07-05 05:52:06 +00:00
|
|
|
UBOOT_CUSTOMIZE_CONFIG := \
|
|
|
|
--disable TOOLS_KWBIMAGE \
|
|
|
|
--disable TOOLS_LIBCRYPTO
|
|
|
|
|
2022-07-11 20:15:32 +00:00
|
|
|
ifdef CONFIG_TARGET_mediatek
|
2021-01-30 13:58:16 +00:00
|
|
|
UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE:.fip=.bin)
|
2022-07-11 20:15:32 +00:00
|
|
|
endif
|
2020-05-04 14:31:19 +00:00
|
|
|
|
2021-01-30 13:58:16 +00:00
|
|
|
define Build/fip-image
|
2022-07-13 20:06:36 +00:00
|
|
|
$(if $(FIP_COMPRESS),\
|
2022-07-13 03:29:34 +00:00
|
|
|
xz -f -e -k -9 -C crc32 $(STAGING_DIR_IMAGE)/$(if $(BL2_SOC),$(BL2_SOC),$(BUILD_SUBTARGET))-$(BL2_BOOTDEV)-$(if $(BL2_DDRTYPE),$(BL2_DDRTYPE)-)$(if $(BL2_DDRBLOB),$(BL2_DDRBLOB)ddr-)bl31.bin ;\
|
2022-07-13 20:06:36 +00:00
|
|
|
xz -f -e -k -9 -C crc32 $(PKG_BUILD_DIR)/u-boot.bin \
|
|
|
|
)
|
2021-01-30 13:58:16 +00:00
|
|
|
$(STAGING_DIR_HOST)/bin/fiptool create \
|
2022-07-13 03:29:34 +00:00
|
|
|
--soc-fw $(STAGING_DIR_IMAGE)/$(if $(BL2_SOC),$(BL2_SOC),$(BUILD_SUBTARGET))-$(BL2_BOOTDEV)-$(if $(BL2_DDRTYPE),$(BL2_DDRTYPE)-)$(if $(BL2_DDRBLOB),$(BL2_DDRBLOB)ddr-)bl31.bin$(if $(FIP_COMPRESS),.xz) \
|
2022-07-13 20:06:36 +00:00
|
|
|
--nt-fw $(PKG_BUILD_DIR)/u-boot.bin$(if $(FIP_COMPRESS),.xz) \
|
2021-01-30 13:58:16 +00:00
|
|
|
$(PKG_BUILD_DIR)/u-boot.fip
|
|
|
|
endef
|
|
|
|
|
2022-07-11 20:15:32 +00:00
|
|
|
ifdef CONFIG_TARGET_ramips_mt7621
|
|
|
|
define Build/Prepare
|
|
|
|
$(call Build/Prepare/Default)
|
2022-08-09 23:23:34 +00:00
|
|
|
ifdef CONFIG_DEBUG
|
2022-07-11 20:15:32 +00:00
|
|
|
$(CP) $(DL_DIR)/mt7621_stage_sram.bin $(PKG_BUILD_DIR)/
|
2022-08-09 23:23:34 +00:00
|
|
|
else
|
|
|
|
$(CP) $(DL_DIR)/mt7621_stage_sram_noprint.bin $(PKG_BUILD_DIR)/mt7621_stage_sram.bin
|
|
|
|
endif
|
2022-07-11 20:15:32 +00:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2021-08-19 02:57:00 +00:00
|
|
|
define Build/Configure
|
|
|
|
$(call Build/Configure/U-Boot)
|
|
|
|
sed -i 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR)/.config
|
|
|
|
endef
|
|
|
|
|
2021-01-30 13:58:16 +00:00
|
|
|
define Build/Compile
|
|
|
|
$(call Build/Compile/U-Boot)
|
2022-09-13 07:06:50 +00:00
|
|
|
ifeq ($(UBOOT_IMAGE),u-boot.fip)
|
2021-01-30 13:58:16 +00:00
|
|
|
$(call Build/fip-image)
|
|
|
|
endif
|
|
|
|
endef
|
|
|
|
|
|
|
|
# don't stage files to bindir, let target/linux/mediatek/image/*.mk do that
|
2022-07-11 20:15:32 +00:00
|
|
|
ifdef CONFIG_TARGET_mediatek
|
2021-01-30 13:58:16 +00:00
|
|
|
define Package/u-boot/install
|
|
|
|
endef
|
2022-07-11 20:15:32 +00:00
|
|
|
endif
|
2021-01-30 13:58:16 +00:00
|
|
|
|
2020-05-04 14:31:19 +00:00
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
2021-01-30 13:58:16 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE)
|
2020-05-04 14:31:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage/U-Boot))
|