diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 2bb04997f9..7941c106e4 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -54,6 +54,7 @@ linksys,ea7300-v1|\ linksys,ea7300-v2|\ linksys,ea7500-v2|\ linksys,ea8100-v1|\ +linksys,ea8100-v2|\ xiaomi,mi-router-3g|\ xiaomi,mi-router-3-pro|\ xiaomi,mi-router-4|\ diff --git a/package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch b/package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch new file mode 100644 index 0000000000..8432053ea0 --- /dev/null +++ b/package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch @@ -0,0 +1,26 @@ +From c7d1b1890880ee64786b92a1b95ba9ecb4694997 Mon Sep 17 00:00:00 2001 +From: Christian Melki +Date: Mon, 7 Jun 2021 11:21:15 +0200 +Subject: [PATCH] disk/part_dos.c: Fix a variable typo in + write_mbr_partitions() + +This function is passed *dev not *dev_desc, so pass the right name to +part_init(). + +Fixes: f14c5ee5ab8b ("disk: part_dos: update partition table entries after write") +Signed-off-by: Christian Melki +--- + disk/part_dos.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/disk/part_dos.c ++++ b/disk/part_dos.c +@@ -424,7 +424,7 @@ int write_mbr_partitions(struct blk_desc + } + + /* Update the partition table entries*/ +- part_init(dev_desc); ++ part_init(dev); + + return 0; + } diff --git a/package/boot/uboot-mediatek/patches/404-add-bananapi_bpi-r64_defconfigs.patch b/package/boot/uboot-mediatek/patches/404-add-bananapi_bpi-r64_defconfigs.patch index 72913e4d2f..9e694c9c8b 100644 --- a/package/boot/uboot-mediatek/patches/404-add-bananapi_bpi-r64_defconfigs.patch +++ b/package/boot/uboot-mediatek/patches/404-add-bananapi_bpi-r64_defconfigs.patch @@ -161,10 +161,10 @@ +CONFIG_USB_STORAGE=y --- /dev/null +++ b/bananapi_bpi-r64-sdmmc_env -@@ -0,0 +1,81 @@ +@@ -0,0 +1,82 @@ +ipaddr=192.168.1.1 +serverip=192.168.1.254 -+loadaddr=0x4007ff28 ++loadaddr=0x48000000 +bootargs=root=/dev/mmcblk1p65 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_sdmmc ; fi +bootconf=config-mt7622-bananapi-bpi-r64-pcie1 @@ -172,9 +172,11 @@ +bootconf_sata=config-mt7622-bananapi-bpi-r64-sata +bootdelay=0 +bootfile=openwrt-mediatek-mt7622-bananapi_bpi-r64-initramfs-recovery.itb -+bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb -+bootfile_emmcbl3=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-bl31-uboot.fip +bootfile_emmcbl2=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-preloader.bin ++bootfile_emmcbl3=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-bl31-uboot.fip ++bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb ++bootled_pwr=bpi-r64:pio:green ++bootled_rec=bpi-r64:pio:blue +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60 +bootmenu_default=0 +bootmenu_delay=0 @@ -184,34 +186,33 @@ +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return +bootmenu_2=Boot production system from SD card.=run boot_production ; run bootmenu_confirm_return +bootmenu_3=Boot recovery system from SD card.=run boot_recovery ; run bootmenu_confirm_return -+bootmenu_4=Load production system via TFTP then write to SD card.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return -+bootmenu_5=Load recovery system via TFTP then write to SD card.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to SD card.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to SD card.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return +bootmenu_6=Install bootloader, recovery and production to eMMC.=run emmc_init ; run bootmenu_confirm_return +bootmenu_7=Install bootloader, recovery and production to NAND.=run ubi_init ; run bootmenu_confirm_return +bootmenu_8=Reboot.=reset +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset -+boot_default=run bootcmd ; run boot_recovery ; run boot_tftp_forever -+boot_first=if button reset ; then run boot_tftp_forever ; fi ; bootmenu -+boot_production=led bpi-r64:pio:green on ; run sdmmc_read_production && bootm $loadaddr#$bootconf -+boot_recovery=led bpi-r64:pio:green off ; run sdmmc_read_recovery && bootm $loadaddr#$bootconf ++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever ++boot_production=led $bootled_pwr on ; run sdmmc_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off ++boot_recovery=led $bootled_rec on ; run sdmmc_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off +boot_sdmmc=run boot_production ; run boot_recovery -+boot_tftp_forever=led bpi-r64:pio:blue on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done -+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run sdmmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi -+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run sdmmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run sdmmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run sdmmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr -+boot_ubi=ubi part ubi && setenv bootargs && run boot_ubi_production ; run check_recovery -+boot_ubi_production=led bpi-r64:pio:green on ; run ubi_read_production && bootm $loadaddr -+boot_ubi_recovery=led bpi-r64:pio:green off ; run check_recovery -+check_recovery=run ubi_read_recovery ; if iminfo $loadaddr ; then bootm $loadaddr ; else ubi remove recovery ; fi ++boot_ubi=ubi part ubi && setenv bootargs && run boot_ubi_production ; run boot_ubi_recovery ++boot_ubi_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr ; led $bootled_pwr off ++boot_ubi_recovery=led $bootled_rec on ; run ubi_read_recovery ; bootm $loadaddr#$bootconf ; ubi remove recovery ; led $bootled_rec off +check_ubi=ubi part ubi || run ubi_format +emmc_init=run emmc_init_bl && run emmc_init_openwrt ; env default bootcmd ; saveenv ; saveenv +emmc_init_bl=run sdmmc_read_emmc_bl2 && run emmc_write_bl2 && run sdmmc_read_emmc_hdr && run emmc_write_hdr && run sdmmc_read_emmc_fip && run emmc_write_fip -+emmc_init_openwrt=run sdmmc_read_recovery && run emmc_write_recovery ; run sdmmc_read_production && run emmc_write_production ++emmc_init_openwrt=run sdmmc_read_recovery && iminfo $loadaddr && run emmc_write_recovery ; run sdmmc_read_production && iminfo $loadaddr && run emmc_write_production +emmc_write_bl2=mmc dev 0 1 && mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $loadaddr 0x0 0x100 ; mmc partconf 0 1 1 0 +emmc_write_fip=mmc dev 0 0 && mmc erase 0x1000 0x1000 && mmc write $loadaddr 0x1000 0x1000 && mmc erase 0x2000 0x800 +emmc_write_hdr=mmc dev 0 0 && mmc erase 0x0 0x40 && mmc write $loadaddr 0x0 0x40 -+emmc_write_production=iminfo $loadaddr && mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol -+emmc_write_recovery=iminfo $loadaddr && mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol ++emmc_write_production=mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol ++emmc_write_recovery=mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol +mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$part_size && mmc write $loadaddr 0x$part_addr 0x$image_size +mmc_read_vol=mmc read $loadaddr $part_addr 0x8 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200 +part_default=production @@ -224,8 +225,8 @@ +sdmmc_read_recovery=mmc dev 1 && part start mmc 1 $part_recovery part_addr && part size mmc 1 $part_recovery part_size && run mmc_read_vol +sdmmc_read_snand_bl2=mmc dev 1 && part start mmc 1 install part_addr && setexpr offset $part_addr + 0x2000 && mmc read $loadaddr $offset 0x400 +sdmmc_read_snand_fip=mmc dev 1 && part start mmc 1 install part_addr && setexpr offset $part_addr + 0x2400 && mmc read $loadaddr $offset 0x1000 -+sdmmc_write_production=iminfo $fileaddr && mmc dev 1 && part start mmc 1 $part_default part_addr && part size mmc 1 $part_default part_size && run mmc_write_vol -+sdmmc_write_recovery=iminfo $fileaddr && mmc dev 1 && part start mmc 1 $part_recovery part_addr && part size mmc 1 $part_recovery part_size && run mmc_write_vol ++sdmmc_write_production=mmc dev 1 && part start mmc 1 $part_default part_addr && part size mmc 1 $part_default part_size && run mmc_write_vol ++sdmmc_write_recovery=mmc dev 1 && part start mmc 1 $part_recovery part_addr && part size mmc 1 $part_recovery part_size && run mmc_write_vol +snand_write_fip=mtd erase fip && mtd write fip $loadaddr +snand_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr +ubi_create_env=ubi create ubootenv 0x100000 dynamic 0 ; ubi create ubootenv2 0x100000 dynamic 1 ; ubi create fit 0x100000 dynamic 2 ; ubi create recovery 0x100000 dynamic 3 @@ -240,7 +241,7 @@ +ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize +ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize +_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv -+_firstboot=setenv _firstboot ; led bpi-r64:pio:blue on ; run _switch_to_menu ; run _init_env ; run boot_first ++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver" --- /dev/null @@ -393,10 +394,10 @@ +CONFIG_USB_STORAGE=y --- /dev/null +++ b/bananapi_bpi-r64-emmc_env -@@ -0,0 +1,54 @@ +@@ -0,0 +1,56 @@ +ipaddr=192.168.1.1 +serverip=192.168.1.254 -+loadaddr=0x4007ff28 ++loadaddr=0x48000000 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi +bootargs=root=/dev/mmcblk0p65 +bootconf=config-mt7622-bananapi-bpi-r64-pcie1 @@ -405,8 +406,10 @@ +bootdelay=0 +bootfile=openwrt-mediatek-mt7622-bananapi_bpi-r64-initramfs-recovery.itb +bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb -+bootfile_fip=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-bl31-uboot.fip +bootfile_bl2=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-preloader.bin ++bootfile_fip=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-bl31-uboot.fip ++bootled_pwr=bpi-r64:pio:green ++bootled_rec=bpi-r64:pio:blue +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60 +bootmenu_default=0 +bootmenu_delay=0 @@ -416,25 +419,25 @@ +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return +bootmenu_2=Boot production system from eMMC.=run boot_production ; run bootmenu_confirm_return +bootmenu_3=Boot recovery system from eMMC.=run boot_recovery ; run bootmenu_confirm_return -+bootmenu_4=Load production system via TFTP then write to eMMC.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return -+bootmenu_5=Load recovery system via TFTP then write to eMMC.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return +bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to eMMC.=run boot_tftp_write_fip ; run bootmenu_confirm_return +bootmenu_7=Load BL2 preloader via TFTP then write to eMMC.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return +bootmenu_8=Reboot.=reset +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset -+boot_default=run bootcmd ; run boot_recovery ; run boot_tftp_forever -+boot_first=if button reset ; then run boot_tftp_forever ; fi ; bootmenu -+boot_production=led bpi-r64:pio:green on ; run emmc_read_production && bootm $loadaddr#$bootconf -+boot_recovery=led bpi-r64:pio:green off ; run emmc_read_recovery && bootm $loadaddr#$bootconf ++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever ++boot_production=led $bootled_pwr on ; run emmc_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off ++boot_recovery=led $bootled_rec on ; run emmc_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off +boot_emmc=run boot_production ; run boot_recovery -+boot_tftp_forever=led bpi-r64:pio:blue on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done -+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi -+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run emmc_write_bl2 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run emmc_write_fip +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr -+emmc_write_production=iminfo $fileaddr && mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol -+emmc_write_recovery=iminfo $fileaddr && mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol ++emmc_write_production=mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol ++emmc_write_recovery=mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol +emmc_write_bl2=mmc dev 0 1 && mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $loadaddr 0x0 0x100 ; mmc partconf 0 1 1 0 +emmc_write_fip=mmc dev 0 0 && mmc erase 0x1000 0x1000 && mmc write $loadaddr 0x1000 0x1000 && mmc erase 0x2000 0x800 +emmc_read_production=mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol @@ -445,7 +448,7 @@ +part_recovery=recovery +reset_factory=eraseenv && reset +_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv -+_firstboot=setenv _firstboot ; led bpi-r64:pio:blue on ; run _switch_to_menu ; run _init_env ; run boot_first ++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver" --- /dev/null @@ -595,7 +598,7 @@ @@ -0,0 +1,57 @@ +ipaddr=192.168.1.1 +serverip=192.168.1.254 -+loadaddr=0x4007ff28 ++loadaddr=0x48000000 +bootargs=root=/dev/ubiblock0_2p1 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi +bootconf=config-mt7622-bananapi-bpi-r64-pcie1 @@ -603,9 +606,11 @@ +bootconf_sata=config-mt7622-bananapi-bpi-r64-sata +bootdelay=0 +bootfile=openwrt-mediatek-mt7622-bananapi_bpi-r64-initramfs-recovery.itb -+bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb +bootfile_fip=openwrt-mediatek-mt7622-bananapi_bpi-r64-snand-bl31-uboot.fip +bootfile_bl2=openwrt-mediatek-mt7622-bananapi_bpi-r64-snand-preloader.bin ++bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb ++bootled_pwr=bpi-r64:pio:green ++bootled_rec=bpi-r64:pio:blue +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60 +bootmenu_default=0 +bootmenu_delay=0 @@ -615,38 +620,36 @@ +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return +bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return +bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return -+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return -+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return +bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return +bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return +bootmenu_8=Reboot.=reset +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset -+boot_default=run bootcmd ; run boot_recovery ; run boot_tftp_forever -+boot_first=if button reset ; then run boot_tftp_forever ; fi ; bootmenu -+boot_production=led bpi-r64:pio:green on ; run ubi_read_production && bootm $loadaddr#$bootconf -+boot_recovery=led bpi-r64:pio:green off ; run check_recovery ++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever ++boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off ++boot_recovery=led $bootled_rec on ; run ubi_read_recovery ; bootm $loadaddr#$bootconf ; ubi remove recovery ; led $bootled_rec off +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf -+boot_tftp_forever=led bpi-r64:pio:blue on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done -+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi -+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && iminfo $loadaddr && ubi part ubi && run ubi_write_production ubi_prepare_rootfs ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && ubi part ubi && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run boot_write_bl2 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run boot_write_fip +boot_ubi=ubi part ubi && run boot_production ; run boot_recovery ++boot_write_bl2=mtd erase bl2 && mtd write spi-nand0 $loadaddr 0x0 0x20000 && mtd write spi-nand0 $loadaddr 0x20000 0x20000 && mtd write spi-nand0 $loadaddr 0x40000 0x20000 && mtd write spi-nand0 $loadaddr 0x60000 0x20000 +boot_write_fip=mtd erase fip && mtd write fip $loadaddr -+boot_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr -+check_recovery=run ubi_read_recovery ; if iminfo $loadaddr ; then bootm $loadaddr#$bootconf; else ubi remove recovery ; fi +check_ubi=ubi part ubi || run ubi_format -+part_default=production -+part_recovery=recovery +reset_factory=ubi part ubi ; ubi write 0x0 ubootenv 0x0 ; ubi write 0x0 ubootenv2 0x0 ; ubi remove rootfs_data +ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset +ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data -+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize -+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize ++ubi_write_production=ubi check fit && env exists replacevol && ubi remove fit ; if ubi check fit ; then else run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize ; fi ++ubi_write_recovery=ubi check recovery && env exists replacevol && ubi remove recovery ; if ubi check recovery ; then else run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize ; fi +_create_env=ubi create ubootenv 0x100000 dynamic 0 ; ubi create ubootenv2 0x100000 dynamic 1 ; ubi create fit 0x100000 dynamic 2 ; ubi create recovery 0x100000 dynamic 3 +_init_env=setenv _init_env ; if ubi check ubootenv && ubi check ubootenv2 ; then else run _create_env ; fi ; setenv _create_env ; saveenv || run ubi_format ; saveenv || run ubi_format -+_firstboot=setenv _firstboot ; led bpi-r64:pio:blue on ; run _switch_to_menu ; run check_ubi ; run _init_env ; run boot_first -+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ++_firstboot=setenv _firstboot ; run _switch_to_menu ; run check_ubi ; run _init_env ; run boot_first ++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title ++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver" diff --git a/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch b/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch index f09a7db137..5b52206e1c 100644 --- a/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch +++ b/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch @@ -1,6 +1,6 @@ --- /dev/null +++ b/configs/mt7622_linksys_e8450_defconfig -@@ -0,0 +1,134 @@ +@@ -0,0 +1,135 @@ +CONFIG_ARM=y +CONFIG_POSITION_INDEPENDENT=y +CONFIG_ARCH_MEDIATEK=y @@ -16,6 +16,7 @@ +CONFIG_DEBUG_UART_CLOCK=25000000 +CONFIG_DEFAULT_DEVICE_TREE="mt7622-linksys-e8450-ubi" +CONFIG_DEBUG_UART=y ++CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-nand0:512k(bl2),1280k(fip),1024k(factory),256k(reserved),-(ubi)" +CONFIG_SMBIOS_PRODUCT_NAME="" +CONFIG_AUTOBOOT_KEYED=y +CONFIG_BOOTDELAY=30 @@ -346,17 +347,19 @@ --- /dev/null +++ b/linksys_e8450_env @@ -0,0 +1,57 @@ -+mtdparts=spi-nand0:512k(bl2),1280k(fip),1024k(factory),256k(reserved),-(ubi) +ethaddr_factory=mtd read spi-nand0 0x40080000 0x220000 0x20000 && env readmem -b ethaddr 0x4009fff4 0x6 ; setenv ethaddr_factory +ipaddr=192.168.1.1 +serverip=192.168.1.254 -+loadaddr=0x4007ff28 ++loadaddr=0x48000000 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi ++bootconf=config-1 +bootdelay=0 +bootfile=openwrt-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery.itb +bootfile_bl2=openwrt-mediatek-mt7622-linksys_e8450-ubi-preloader.bin +bootfile_fip=openwrt-mediatek-mt7622-linksys_e8450-ubi-bl31-uboot.fip +bootfile_upg=openwrt-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade.itb ++bootled_pwr=power:blue ++bootled_rec=inet:orange on +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60 +bootmenu_default=0 +bootmenu_delay=0 @@ -366,40 +369,38 @@ +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return +bootmenu_2=Boot production system from flash.=run boot_production ; run bootmenu_confirm_return +bootmenu_3=Boot recovery system from flash.=run boot_recovery ; run bootmenu_confirm_return -+bootmenu_4=Load production system via TFTP then write to flash.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return -+bootmenu_5=Load recovery system via TFTP then write to flash.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to flash.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to flash.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return +bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to flash.=run boot_tftp_write_fip ; run bootmenu_confirm_return -+bootmenu_7=Load BL2 preloader via TFTP then write to flash.=run boot_tftp_write_preloader ; run bootmenu_confirm_return ++bootmenu_7=Load BL2 preloader via TFTP then write to flash.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return +bootmenu_8=Reboot.=reset +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset -+boot_first=if button reset ; then run boot_tftp_forever ; fi ; setenv flag_recover 1 ; bootmenu -+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; run boot_tftp_forever -+boot_production=led power:blue on ; run ubi_read_production && bootm $loadaddr -+boot_production_or_recovery=run boot_production ; run boot_recovery -+boot_recovery=led power:blue off ; led power:orange on ; run check_recovery ++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever ++boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off ++boot_recovery=led $bootled_rec on ; run ubi_read_recovery ; bootm $loadaddr#$bootconf ; ubi remove recovery ; led $bootled_rec off ++boot_serial_write_bl2=loadx $loadaddr 115200 && run boot_write_bl2 +boot_serial_write_fip=loadx $loadaddr 115200 && run boot_write_fip -+boot_serial_write_preloader=loadx $loadaddr 115200 && run boot_write_preloader -+boot_tftp_forever=led inet:blue on ; while true ; do run boot_tftp_recovery ; led inet:blue off ; led inet:orange on ; sleep 1 ; done -+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && iminfo $loadaddr && ubi part ubi && run ubi_write_production ubi_prepare_rootfs ; if env exists noboot ; then else bootm $loadaddr ; fi -+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && ubi part ubi && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi -+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr ++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf ++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && iminfo $loadaddr && ubi part ubi && run ubi_write_production ubi_prepare_rootfs ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && ubi part ubi && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run boot_write_bl2 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run boot_write_fip -+boot_tftp_write_preloader=tftpboot $loadaddr $bootfile_bl2 && run boot_write_preloader -+boot_ubi=ubi part ubi && run boot_production_or_recovery -+boot_write_fip=mtd erase spi-nand0 0x80000 0x140000 && mtd write spi-nand0 $loadaddr 0x80000 0x140000 -+boot_write_preloader=mtd erase spi-nand0 0x0 0x80000 && mtd write spi-nand0 $loadaddr 0x0 0x20000 && mtd write spi-nand0 $loadaddr 0x20000 0x20000 && mtd write spi-nand0 $loadaddr 0x40000 0x20000 && mtd write spi-nand0 $loadaddr 0x60000 0x20000 -+check_recovery=run ubi_read_recovery ; if iminfo $loadaddr ; then bootm $loadaddr ; else ubi remove recovery ; fi ++boot_ubi=ubi part ubi && run boot_production ; run boot_recovery ++boot_write_bl2=mtd erase bl2 && mtd write spi-nand0 $loadaddr 0x0 0x20000 && mtd write spi-nand0 $loadaddr 0x20000 0x20000 && mtd write spi-nand0 $loadaddr 0x40000 0x20000 && mtd write spi-nand0 $loadaddr 0x60000 0x20000 ++boot_write_fip=mtd erase fip && mtd write fip $loadaddr +check_ubi=ubi part ubi || run ubi_format +reset_factory=ubi part ubi ; ubi write 0x0 ubootenv 0x0 ; ubi write 0x0 ubootenv2 0x0 ; ubi remove rootfs_data -+ubi_format=ubi detach ; mtd erase spi-nand0 0x300000 0x7D00000 && ubi part ubi ; reset ++ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset +ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data -+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize -+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize ++ubi_write_production=ubi check fit && env exists replacevol && ubi remove fit ; if ubi check fit ; then else run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize ; fi ++ubi_write_recovery=ubi check recovery && env exists replacevol && ubi remove recovery ; if ubi check recovery ; then else run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize ; fi +_create_env=ubi create ubootenv 0x100000 dynamic ; ubi create ubootenv2 0x100000 dynamic +_init_env=setenv _init_env ; if ubi check ubootenv && ubi check ubootenv2 ; then else run _create_env ; fi ; setenv _create_env ; saveenv || run ubi_format ; saveenv || run ubi_format -+_firstboot=setenv _firstboot ; led power:orange on ; run _switch_to_menu ; run ethaddr_factory ; run check_ubi ; run _init_env ; run boot_first ++_firstboot=setenv _firstboot ; run _switch_to_menu ; run ethaddr_factory ; run check_ubi ; run _init_env ; run boot_first +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver" diff --git a/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch b/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch index d9b8a01f73..bac4a86d05 100644 --- a/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch +++ b/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch @@ -1,6 +1,6 @@ --- /dev/null +++ b/configs/mt7622_ubnt_unifi-6-lr_defconfig -@@ -0,0 +1,139 @@ +@@ -0,0 +1,140 @@ +CONFIG_ARM=y +CONFIG_POSITION_INDEPENDENT=y +CONFIG_ARCH_MEDIATEK=y @@ -8,6 +8,7 @@ +CONFIG_SYS_TEXT_BASE=0x41e00000 +CONFIG_SYS_MALLOC_F_LEN=0x4000 +CONFIG_USE_DEFAULT_ENV_FILE=y ++CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:128k(bl2),640k(fip),64k(u-boot-env),256k(factory),64k(eeprom),15232k(recovery),-(firmware)" +CONFIG_ENV_IS_IN_MTD=y +CONFIG_ENV_MTD_NAME="nor0" +CONFIG_ENV_SIZE_REDUND=0x4000 @@ -357,12 +358,11 @@ mt8512-bm1-emmc.dtb \ --- /dev/null +++ b/ubnt_unifi-6-lr_env -@@ -0,0 +1,52 @@ -+mtdparts=nor0:128k(bl2),640k(fip),64k(u-boot-env),256k(factory),64k(eeprom),15232k(recovery),-(firmware) +@@ -0,0 +1,50 @@ +ethaddr_factory=mtd read nor0 $loadaddr 0x110000 0x10000 && env readmem -b ethaddr $loadaddr 0x6 ; setenv ethaddr_factory +ipaddr=192.168.1.1 +serverip=192.168.1.254 -+loadaddr=0x40080000 ++loadaddr=0x48000000 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_nor ; fi +bootdelay=0 +bootfile=openwrt-mediatek-mt7622-ubnt_unifi-6-lr-ubootmod-initramfs-recovery.itb @@ -378,26 +378,25 @@ +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return +bootmenu_2=Boot production system from flash.=run boot_production ; run bootmenu_confirm_return +bootmenu_3=Boot recovery system from flash.=run boot_recovery ; run bootmenu_confirm_return -+bootmenu_4=Load production system via TFTP then write to flash.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return -+bootmenu_5=Load recovery system via TFTP then write to flash.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to flash.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to flash.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return +bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to flash.=run boot_tftp_write_fip ; run bootmenu_confirm_return +bootmenu_7=Load BL2 preloader via TFTP then write to flash.=run boot_tftp_write_preloader ; run bootmenu_confirm_return +bootmenu_8=Reboot.=reset +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset -+boot_first=if button reset ; then run boot_tftp_forever ; fi ; bootmenu -+boot_default=run bootcmd ; run boot_recovery ; run boot_tftp_forever ++boot_first=if button reset ; then run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever +boot_production=run nor_read_production && bootm $loadaddr -+boot_production_or_recovery=run boot_production ; run boot_recovery +boot_recovery=run nor_read_recovery ; bootm $loadaddr +boot_serial_write_fip=loadx $loadaddr 115200 && run boot_write_fip +boot_serial_write_preloader=loadx $loadaddr 115200 && run boot_write_preloader +boot_tftp_forever=while true ; do run boot_tftp_recovery ; sleep 1 ; done -+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && iminfo $loadaddr && run nor_write_production ; if env exists noboot ; then else bootm $loadaddr ; fi -+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run nor_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run nor_write_production ; if env exists noboot ; then else bootm $loadaddr ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run nor_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run boot_write_fip +boot_tftp_write_preloader=tftpboot $loadaddr $bootfile_bl2 && run boot_write_preloader -+boot_nor=run boot_production_or_recovery ++boot_nor=run boot_production ; run boot_recovery +boot_write_fip=mtd erase nor0 0x20000 0x80000 && mtd write nor0 $loadaddr 0x20000 0x80000 +boot_write_preloader=mtd erase nor0 0x0 0x20000 && mtd write nor0 $loadaddr 0x0 0x20000 +reset_factory=mtd erase nor0 0xc0000 0x10000 && reset diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index fb0e470995..ebc601fa4a 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2021-06-04 -PKG_SOURCE_VERSION:=50381d0a2998f6c0fc4823f0c2aa4206063d549e -PKG_MIRROR_HASH:=2718df3d3538c93ac77accf55716fb341741df3d231aac59e04dd1f80f558889 +PKG_SOURCE_DATE:=2021-07-13 +PKG_SOURCE_VERSION:=1f283c654aeb1f8983e0a81b7a81cc4784fffe3f +PKG_MIRROR_HASH:=a65bb00f376eec5006c6efa1bc3298687054c3936de9c61997496969c93f9ccc PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 diff --git a/package/network/services/hostapd/patches/022-hostapd-fix-use-of-uninitialized-stack-variables.patch b/package/network/services/hostapd/patches/022-hostapd-fix-use-of-uninitialized-stack-variables.patch new file mode 100644 index 0000000000..c7da33f029 --- /dev/null +++ b/package/network/services/hostapd/patches/022-hostapd-fix-use-of-uninitialized-stack-variables.patch @@ -0,0 +1,25 @@ +From: Felix Fietkau +Date: Thu, 8 Jul 2021 16:33:03 +0200 +Subject: [PATCH] hostapd: fix use of uninitialized stack variables + +When a CSA is performed on an 80 MHz channel, hostapd_change_config_freq +unconditionally calls hostapd_set_oper_centr_freq_seg0/1_idx with seg0/1 +filled by ieee80211_freq_to_chan. +However, if ieee80211_freq_to_chan fails (because the freq is 0 or invalid), +seg0/1 remains uninitialized and filled with stack garbage, causing errors +such as "hostapd: 80 MHz: center segment 1 configured" + +Signed-off-by: Felix Fietkau +--- + +--- a/src/ap/hostapd.c ++++ b/src/ap/hostapd.c +@@ -3431,7 +3431,7 @@ static int hostapd_change_config_freq(st + struct hostapd_freq_params *old_params) + { + int channel; +- u8 seg0, seg1; ++ u8 seg0 = 0, seg1 = 0; + struct hostapd_hw_modes *mode; + + if (!params->channel) { diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index 71537c9ec6..005ed54e0c 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -473,3 +473,44 @@ /* Proceed only if DFS is not offloaded to the driver */ if (iface->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD) return 0; +--- a/src/ap/airtime_policy.c ++++ b/src/ap/airtime_policy.c +@@ -112,8 +112,14 @@ static void set_sta_weights(struct hosta + { + struct sta_info *sta; + +- for (sta = hapd->sta_list; sta; sta = sta->next) +- sta_set_airtime_weight(hapd, sta, weight); ++ for (sta = hapd->sta_list; sta; sta = sta->next) { ++ unsigned int sta_weight = weight; ++ ++ if (sta->dyn_airtime_weight) ++ sta_weight = (weight * sta->dyn_airtime_weight) / 256; ++ ++ sta_set_airtime_weight(hapd, sta, sta_weight); ++ } + } + + +@@ -244,7 +250,10 @@ int airtime_policy_new_sta(struct hostap + unsigned int weight; + + if (hapd->iconf->airtime_mode == AIRTIME_MODE_STATIC) { +- weight = get_weight_for_sta(hapd, sta->addr); ++ if (sta->dyn_airtime_weight) ++ weight = sta->dyn_airtime_weight; ++ else ++ weight = get_weight_for_sta(hapd, sta->addr); + if (weight) + return sta_set_airtime_weight(hapd, sta, weight); + } +--- a/src/ap/sta_info.h ++++ b/src/ap/sta_info.h +@@ -324,6 +324,7 @@ struct sta_info { + #endif /* CONFIG_TESTING_OPTIONS */ + #ifdef CONFIG_AIRTIME_POLICY + unsigned int airtime_weight; ++ unsigned int dyn_airtime_weight; + struct os_reltime backlogged_until; + #endif /* CONFIG_AIRTIME_POLICY */ + diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index 6201dfd524..9918f17d67 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -21,6 +21,7 @@ #include "rrm.h" #include "wnm_ap.h" #include "taxonomy.h" +#include "airtime_policy.h" static struct ubus_context *ctx; static struct blob_buf b; @@ -741,6 +742,7 @@ enum { CSA_SEC_CHANNEL_OFFSET, CSA_HT, CSA_VHT, + CSA_HE, CSA_BLOCK_TX, __CSA_MAX }; @@ -754,6 +756,7 @@ static const struct blobmsg_policy csa_policy[__CSA_MAX] = { [CSA_SEC_CHANNEL_OFFSET] = { "sec_channel_offset", BLOBMSG_TYPE_INT32 }, [CSA_HT] = { "ht", BLOBMSG_TYPE_BOOL }, [CSA_VHT] = { "vht", BLOBMSG_TYPE_BOOL }, + [CSA_HE] = { "he", BLOBMSG_TYPE_BOOL }, [CSA_BLOCK_TX] = { "block_tx", BLOBMSG_TYPE_BOOL }, }; @@ -765,7 +768,15 @@ hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj, { struct blob_attr *tb[__CSA_MAX]; struct hostapd_data *hapd = get_hapd_from_object(obj); - struct csa_settings css; + struct hostapd_config *iconf = hapd->iface->conf; + struct csa_settings css = { + .freq_params = { + .ht_enabled = iconf->ieee80211n, + .vht_enabled = iconf->ieee80211ac, + .he_enabled = iconf->ieee80211ax, + .sec_channel_offset = iconf->secondary_channel, + } + }; int ret = UBUS_STATUS_OK; int i; @@ -774,7 +785,21 @@ hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj, if (!tb[CSA_FREQ]) return UBUS_STATUS_INVALID_ARGUMENT; - memset(&css, 0, sizeof(css)); + switch (iconf->vht_oper_chwidth) { + case CHANWIDTH_USE_HT: + if (iconf->secondary_channel) + css.freq_params.bandwidth = 40; + else + css.freq_params.bandwidth = 20; + break; + case CHANWIDTH_160MHZ: + css.freq_params.bandwidth = 160; + break; + default: + css.freq_params.bandwidth = 80; + break; + } + css.freq_params.freq = blobmsg_get_u32(tb[CSA_FREQ]); #define SET_CSA_SETTING(name, field, type) \ @@ -790,6 +815,7 @@ hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj, SET_CSA_SETTING(CSA_SEC_CHANNEL_OFFSET, freq_params.sec_channel_offset, u32); SET_CSA_SETTING(CSA_HT, freq_params.ht_enabled, bool); SET_CSA_SETTING(CSA_VHT, freq_params.vht_enabled, bool); + SET_CSA_SETTING(CSA_HE, freq_params.he_enabled, bool); SET_CSA_SETTING(CSA_BLOCK_TX, block_tx, bool); for (i = 0; i < hapd->iface->num_bss; i++) { @@ -1326,11 +1352,68 @@ hostapd_wnm_disassoc_imminent(struct ubus_context *ctx, struct ubus_object *obj, } #endif +#ifdef CONFIG_AIRTIME_POLICY +enum { + UPDATE_AIRTIME_STA, + UPDATE_AIRTIME_WEIGHT, + __UPDATE_AIRTIME_MAX, +}; + + +static const struct blobmsg_policy airtime_policy[__UPDATE_AIRTIME_MAX] = { + [UPDATE_AIRTIME_STA] = { "sta", BLOBMSG_TYPE_STRING }, + [UPDATE_AIRTIME_WEIGHT] = { "weight", BLOBMSG_TYPE_INT32 }, +}; + +static int +hostapd_bss_update_airtime(struct ubus_context *ctx, struct ubus_object *obj, + struct ubus_request_data *ureq, const char *method, + struct blob_attr *msg) +{ + struct hostapd_data *hapd = container_of(obj, struct hostapd_data, ubus.obj); + struct blob_attr *tb[__UPDATE_AIRTIME_MAX]; + struct sta_info *sta = NULL; + u8 addr[ETH_ALEN]; + int weight; + + blobmsg_parse(airtime_policy, __UPDATE_AIRTIME_MAX, tb, blob_data(msg), blob_len(msg)); + + if (!tb[UPDATE_AIRTIME_WEIGHT]) + return UBUS_STATUS_INVALID_ARGUMENT; + + weight = blobmsg_get_u32(tb[UPDATE_AIRTIME_WEIGHT]); + + if (!tb[UPDATE_AIRTIME_STA]) { + if (!weight) + return UBUS_STATUS_INVALID_ARGUMENT; + + hapd->conf->airtime_weight = weight; + return 0; + } + + if (hwaddr_aton(blobmsg_data(tb[UPDATE_AIRTIME_STA]), addr)) + return UBUS_STATUS_INVALID_ARGUMENT; + + sta = ap_get_sta(hapd, addr); + if (!sta) + return UBUS_STATUS_NOT_FOUND; + + sta->dyn_airtime_weight = weight; + airtime_policy_new_sta(hapd, sta); + + return 0; +} +#endif + + static const struct ubus_method bss_methods[] = { UBUS_METHOD_NOARG("reload", hostapd_bss_reload), UBUS_METHOD_NOARG("get_clients", hostapd_bss_get_clients), UBUS_METHOD_NOARG("get_status", hostapd_bss_get_status), UBUS_METHOD("del_client", hostapd_bss_del_client, del_policy), +#ifdef CONFIG_AIRTIME_POLICY + UBUS_METHOD("update_airtime", hostapd_bss_update_airtime, airtime_policy), +#endif UBUS_METHOD_NOARG("list_bans", hostapd_bss_list_bans), #ifdef CONFIG_WPS UBUS_METHOD_NOARG("wps_start", hostapd_bss_wps_start), diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile index 3802d8d614..9dbf91efe9 100644 --- a/package/network/utils/iwinfo/Makefile +++ b/package/network/utils/iwinfo/Makefile @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libiwinfo -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git -PKG_SOURCE_DATE:=2021-06-28 -PKG_SOURCE_VERSION:=c9b1672f5a83c8dcb14fdbaee651f775a7defe52 -PKG_MIRROR_HASH:=f33779035153da6bd0b2f100f402f62f1554ab87ed6fbbd938d41df6b9947a1f +PKG_SOURCE_DATE:=2021-07-11 +PKG_SOURCE_VERSION:=a0a0e02dd91d14a50155390d5fd3b95d6ec87bf4 +PKG_MIRROR_HASH:=7b4f745c2cace836e57bd116399973d9ac32cee7f98d4628a17395caa3d0cebc PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 @@ -26,7 +26,7 @@ define Package/libiwinfo SECTION:=libs CATEGORY:=Libraries TITLE:=Generalized Wireless Information Library (iwinfo) - DEPENDS:=+libnl-tiny +libuci +libubus + DEPENDS:=+libnl-tiny +libuci +libubus +libiwinfo-data ABI_VERSION:=$(IWINFO_ABI_VERSION) endef @@ -50,6 +50,12 @@ define Package/libiwinfo-lua/description endef +define Package/libiwinfo-data + TITLE:=libiwinfo Lua binding + HIDDEN:=1 +endef + + define Package/iwinfo SECTION:=utils CATEGORY:=Utilities @@ -90,8 +96,6 @@ endef define Package/libiwinfo/install $(INSTALL_DIR) $(1)/usr/lib $(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so.$(IWINFO_ABI_VERSION) $(1)/usr/lib/libiwinfo.so.$(IWINFO_ABI_VERSION) - $(INSTALL_DIR) $(1)/usr/share/libiwinfo - $(INSTALL_DATA) $(PKG_BUILD_DIR)/hardware.txt $(1)/usr/share/libiwinfo/hardware.txt endef define Package/libiwinfo-lua/install @@ -99,6 +103,11 @@ define Package/libiwinfo-lua/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so endef +define Package/libiwinfo-data/install + $(INSTALL_DIR) $(1)/usr/share/libiwinfo + $(INSTALL_DATA) $(PKG_BUILD_DIR)/devices.txt $(1)/usr/share/libiwinfo/devices.txt +endef + define Package/iwinfo/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo $(1)/usr/bin/iwinfo @@ -106,4 +115,5 @@ endef $(eval $(call BuildPackage,libiwinfo)) $(eval $(call BuildPackage,libiwinfo-lua)) +$(eval $(call BuildPackage,libiwinfo-data)) $(eval $(call BuildPackage,iwinfo)) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 2b0ea6d119..36e7f11c29 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2021-05-05 -PKG_SOURCE_VERSION:=021ece84de430fca988acd6934f6046ea59d8c37 -PKG_MIRROR_HASH:=edbe464cadbae000f4a48a6f1e6a0f5d27ae3ad521e308205252ad89639b6f9d +PKG_SOURCE_DATE:=2021-07-10 +PKG_SOURCE_VERSION:=2dcefbd6094681dcbd2d7ff608590e74425a9220 +PKG_MIRROR_HASH:=6f2615230a1db09740e8125517488a53b62baef0731b9adbd377765cad130289 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile index d262d1e1fc..e15142d8d2 100644 --- a/package/utils/lua/Makefile +++ b/package/utils/lua/Makefile @@ -134,8 +134,12 @@ define Host/Install INSTALL_TOP="$(STAGING_DIR_HOSTPKG)" \ install - $(LN) $(STAGING_DIR_HOSTPKG)/bin/lua5.1 $(STAGING_DIR_HOSTPKG)/bin/lua - $(LN) $(STAGING_DIR_HOSTPKG)/bin/luac5.1 $(STAGING_DIR_HOSTPKG)/bin/luac + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/pkgconfig + $(CP) $(HOST_BUILD_DIR)/etc/lua.pc $(STAGING_DIR_HOSTPKG)/lib/pkgconfig/lua5.1.pc + + $(LN) lua5.1 $(STAGING_DIR_HOSTPKG)/bin/lua + $(LN) luac5.1 $(STAGING_DIR_HOSTPKG)/bin/luac + $(LN) lua5.1.pc $(STAGING_DIR_HOSTPKG)/lib/pkgconfig/lua.pc endef define Build/InstallDev diff --git a/target/linux/ath79/config-5.4 b/target/linux/ath79/config-5.4 index 9c5520775d..e37b728554 100644 --- a/target/linux/ath79/config-5.4 +++ b/target/linux/ath79/config-5.4 @@ -173,6 +173,7 @@ CONFIG_MTD_CFI_GEOMETRY=y CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set # CONFIG_MTD_MAP_BANK_WIDTH_4 is not set +# CONFIG_MTD_NAND_RB91X is not set CONFIG_MTD_PARSER_CYBERTAN=y CONFIG_MTD_PHYSMAP=y CONFIG_MTD_SPI_NOR=y diff --git a/target/linux/ath79/dts/qca9563_tplink_re455-v1.dts b/target/linux/ath79/dts/qca9563_tplink_re455-v1.dts new file mode 100644 index 0000000000..b6c1efb846 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_re455-v1.dts @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9563_tplink_re450.dtsi" + +/ { + compatible = "tplink,re455-v1", "qca,qca9563"; + model = "TP-Link RE455 v1"; +}; + +&partitions { + partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + info: partition@20000 { + label = "info"; + reg = <0x020000 0x002000>; + read-only; + }; + + partition@22000 { + label = "partition-table"; + reg = <0x022000 0x002000>; + read-only; + }; + + partition@24000 { + label = "info2"; + reg = <0x024000 0x00a000>; + read-only; + }; + + partition@2e000 { + label = "config"; + reg = <0x02e000 0x022000>; + read-only; + }; + + partition@50000 { + compatible = "tplink,firmware"; + label = "firmware"; + reg = <0x050000 0x7a0000>; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x010000>; + read-only; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index a28709ba16..5bcae9cabe 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -352,7 +352,8 @@ tplink,tl-wr902ac-v1) tplink,re355-v1|\ tplink,re450-v1|\ tplink,re450-v2|\ -tplink,re450-v3) +tplink,re450-v3|\ +tplink,re455-v1) ucidef_set_led_netdev "lan_data" "LAN Data" "green:lan_data" "eth0" "tx rx" ucidef_set_led_netdev "lan_link" "LAN Link" "green:lan_link" "eth0" "link" ;; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 1f66da28e6..28a8264cce 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -70,6 +70,7 @@ ath79_setup_interfaces() tplink,re450-v1|\ tplink,re450-v2|\ tplink,re450-v3|\ + tplink,re455-v1|\ tplink,tl-wr902ac-v1|\ ubnt,bullet-ac|\ ubnt,bullet-m-ar7240|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 5282ae4999..fcb422be78 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -141,7 +141,8 @@ case "$FIRMWARE" in ;; tplink,eap245-v1|\ tplink,re450-v2|\ - tplink,re450-v3) + tplink,re450-v3|\ + tplink,re455-v1) caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 1) ;; diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index aa8665fbb2..aee4ddf963 100644 --- a/target/linux/ath79/image/Makefile +++ b/target/linux/ath79/image/Makefile @@ -81,7 +81,7 @@ define Device/Default COMPILE := IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | append-metadata | check-size + append-rootfs | pad-rootfs | check-size | append-metadata endef include $(SUBTARGET).mk diff --git a/target/linux/ath79/image/common-mikrotik.mk b/target/linux/ath79/image/common-mikrotik.mk index 6e739f2d85..5f5fa7899a 100644 --- a/target/linux/ath79/image/common-mikrotik.mk +++ b/target/linux/ath79/image/common-mikrotik.mk @@ -9,7 +9,7 @@ define Device/mikrotik_nor $(Device/mikrotik) IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | \ pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata endef define Device/mikrotik_nand diff --git a/target/linux/ath79/image/common-netgear.mk b/target/linux/ath79/image/common-netgear.mk index 8a74fdc0c9..5a61caf1f6 100644 --- a/target/linux/ath79/image/common-netgear.mk +++ b/target/linux/ath79/image/common-netgear.mk @@ -32,10 +32,8 @@ define Device/netgear_generic KERNEL := kernel-bin | append-dtb | lzma -d20 | uImage lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | uImage lzma IMAGES += factory.img - IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | \ - append-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size - IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | \ - check-size + IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | \ + netgear-squashfs | append-rootfs | pad-rootfs + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata + IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size endef diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk index 0b7b0e1935..f1d5614aa7 100644 --- a/target/linux/ath79/image/common-tp-link.mk +++ b/target/linux/ath79/image/common-tp-link.mk @@ -22,8 +22,7 @@ define Device/tplink-v2 TPLINK_HVERSION := 3 KERNEL := kernel-bin | append-dtb | lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-v2-header - IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := tplink-v2-image -s | check-size | append-metadata endef define Device/tplink-nolzma @@ -74,7 +73,7 @@ define Device/tplink-safeloader KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O KERNEL_INITRAMFS := $$(KERNEL) IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \ - append-metadata | check-size + check-size | append-metadata IMAGE/factory.bin := append-rootfs | tplink-safeloader factory endef diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index daeac8341f..16494b111f 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -486,6 +486,18 @@ define Device/tplink_re450-v3 endef TARGET_DEVICES += tplink_re450-v3 +define Device/tplink_re455-v1 + $(Device/tplink-safeloader) + SOC := qca9563 + IMAGE_SIZE := 7808k + DEVICE_MODEL := RE455 + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct + TPLINK_BOARD_ID := RE455-V1 + LOADER_TYPE := elf +endef +TARGET_DEVICES += tplink_re455-v1 + define Device/tplink_tl-mr6400-v1 $(Device/tplink-8mlzma) SOC := qca9531 @@ -692,7 +704,7 @@ define Device/tplink_tl-wr2543-v1 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport TPLINK_HWID := 0x25430001 IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade -v 3.13.99 | \ - append-metadata | check-size + check-size | append-metadata IMAGE/factory.bin := tplink-v1-image factory -v 3.13.99 SUPPORTED_DEVICES += tl-wr2543n endef diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index e8ea06a07a..01e8533fd6 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -128,7 +128,7 @@ define Device/ubnt-unifi-jffs2 KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | jffs2 kernel0 IMAGES := sysupgrade.bin factory.bin IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs |\ - pad-rootfs | append-metadata | check-size + pad-rootfs | check-size | append-metadata IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage2 endef @@ -373,7 +373,7 @@ define Device/ubnt_routerstation_common IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | \ check-size IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | \ - append-metadata | check-size + check-size | append-metadata KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE) KERNEL_INITRAMFS := kernel-bin | append-dtb endef diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index d9a9d7785d..32c9c333e9 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -199,7 +199,7 @@ define Device/seama # - 36 bytes of META data (4-bytes aligned) IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ seama-seal | check-size SEAMA_SIGNATURE := @@ -363,7 +363,7 @@ define Device/avm KERNEL_INITRAMFS := $$(KERNEL) IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \ append-squashfs-fakeroot-be | pad-to 256 | append-rootfs | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_PACKAGES := fritz-tffs endef @@ -804,7 +804,7 @@ define Device/dlink_dap-2xxx IMAGE/factory.img := append-kernel | pad-offset 6144k 160 | \ append-rootfs | wrgg-pad-rootfs | mkwrggimg | check-size IMAGE/sysupgrade.bin := append-kernel | mkwrggimg | \ - pad-to $$$$(BLOCKSIZE) | append-rootfs | append-metadata | check-size + pad-to $$$$(BLOCKSIZE) | append-rootfs | check-size | append-metadata KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg endef @@ -856,7 +856,7 @@ define Device/dlink_dap-2695-a1 IMAGE/factory.img := $$(IMAGE/default) | append-rootfs | wrgg-pad-rootfs | \ mkwrggimg | check-size IMAGE/sysupgrade.bin := $$(IMAGE/default) | mkwrggimg | append-rootfs | \ - wrgg-pad-rootfs | append-metadata | check-size + wrgg-pad-rootfs | check-size | append-metadata KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg DAP_SIGNATURE := wapac02_dkbs_dap2695 @@ -918,7 +918,7 @@ define Device/dlink_dir-825-b1 DEVICE_VARIANT := B1 IMAGE_SIZE := 6208k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ kmod-leds-reset kmod-owl-loader SUPPORTED_DEVICES += dir-825-b1 @@ -939,8 +939,7 @@ define Device/dlink_dir-825-c1 pad-rootfs IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \ append-string 00DB120AR9344-RT-101214-00 | check-size - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata endef TARGET_DEVICES += dlink_dir-825-c1 @@ -957,8 +956,7 @@ define Device/dlink_dir-835-a1 pad-rootfs IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \ append-string 00DB120AR9344-RT-101214-00 | check-size - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata endef TARGET_DEVICES += dlink_dir-835-a1 @@ -977,7 +975,7 @@ define Device/dlink_dir-842-c IMAGE/default := append-kernel | uImage lzma | \ pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ seama-seal | check-size IMAGE_SIZE := 15680k @@ -1390,7 +1388,7 @@ define Device/jjplus_ja76pf2 IMAGE/kernel.bin := append-kernel IMAGE/rootfs.bin := append-rootfs | pad-rootfs IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | \ - append-metadata | check-size + check-size | append-metadata KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE) KERNEL_INITRAMFS := kernel-bin | append-dtb IMAGE_SIZE := 16000k @@ -1457,7 +1455,7 @@ define Device/nec_wx1200cr DEVICE_VENDOR := NEC IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct endef @@ -1509,10 +1507,8 @@ define Device/netgear_ex6400_ex7300 IMAGE_SIZE := 15552k IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \ netgear-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size - IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | \ - check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata + IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca99x0-ct endef @@ -1895,7 +1891,7 @@ define Device/phicomm_k2t DEVICE_MODEL := K2T IMAGE_SIZE := 15744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct endef TARGET_DEVICES += phicomm_k2t @@ -2257,8 +2253,7 @@ define Device/teltonika_rut955 pad-rootfs | teltonika-fw-fake-checksum 20 | append-string master |\ append-md5sum-bin | check-size IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\ - append-rootfs | pad-rootfs | append-metadata |\ - check-size + append-rootfs | pad-rootfs | check-size | append-metadata endef TARGET_DEVICES += teltonika_rut955 @@ -2281,8 +2276,7 @@ define Device/trendnet_tew-823dru pad-rootfs IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \ append-string 00AP135AR9558-RT-131129-00 | check-size - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata endef TARGET_DEVICES += trendnet_tew-823dru diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index caaa01c92d..20cb2f60fa 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -166,8 +166,7 @@ define Device/netgear_ath79_nand IMAGES := sysupgrade.bin factory.img IMAGE/factory.img := append-kernel | append-ubi | netgear-dni | \ check-size - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata UBINIZE_OPTS := -E 5 endef diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk index 29e411c058..f4a03e2840 100644 --- a/target/linux/ath79/image/tiny.mk +++ b/target/linux/ath79/image/tiny.mk @@ -21,8 +21,7 @@ define Device/dlink_dir-615-e4 FACTORY_IMAGE_SIZE := 3456k IMAGES += factory.bin IMAGE/default := append-kernel | append-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata IMAGE/factory.bin := $$(IMAGE/default) | \ check-size $$$$(FACTORY_IMAGE_SIZE) | pad-to $$$$(FACTORY_IMAGE_SIZE) | \ append-string "AP99-AR7240-RT-091105-05" diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts index 4d17325c8d..caafc1beb4 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts @@ -210,10 +210,10 @@ status = "okay"; cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>; - mx25l25635f@0 { - compatible = "mx25l25635f", "jedec,spi-nor"; + flash@0 { + compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <24000000>; + spi-max-frequency = <50000000>; status = "okay"; m25p,fast-read; diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index 8ad3a9cf1a..7054f7465d 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -35,7 +35,7 @@ define Device/DniImage IMAGES += factory.img IMAGE/factory.img := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | netgear-dni IMAGE/sysupgrade.bin := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ - append-rootfs | pad-rootfs | append-metadata | check-size + append-rootfs | pad-rootfs | check-size | append-metadata endef define Build/append-rootfshdr @@ -106,7 +106,7 @@ define Device/8dev_habanero-dvk IMAGE_SIZE := 30976k SOC := qcom-ipq4019 DEVICE_PACKAGES := ipq-wifi-8dev_habanero-dvk - IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | check-size | append-metadata endef TARGET_DEVICES += 8dev_habanero-dvk @@ -207,7 +207,7 @@ define Device/avm_fritzbox-4040 UBOOT_PARTITION_SIZE := 524288 IMAGES += eva.bin IMAGE/eva.bin := append-uboot | pad-to $$$$(UBOOT_PARTITION_SIZE) | append-kernel | append-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata DEVICE_PACKAGES := fritz-tffs fritz-caldata endef TARGET_DEVICES += avm_fritzbox-4040 @@ -851,7 +851,7 @@ define Device/zyxel_wre6606 DEVICE_DTS_CONFIG := config@4 SOC := qcom-ipq4018 IMAGE_SIZE := 13184k - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers endef TARGET_DEVICES += zyxel_wre6606 diff --git a/target/linux/ipq40xx/image/mikrotik.mk b/target/linux/ipq40xx/image/mikrotik.mk index 7c2fa52738..31497608be 100644 --- a/target/linux/ipq40xx/image/mikrotik.mk +++ b/target/linux/ipq40xx/image/mikrotik.mk @@ -7,7 +7,7 @@ define Device/mikrotik_nor IMAGES = sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \ pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata endef define Device/mikrotik_hap-ac2 diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 43dbff722d..f07e625030 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -401,7 +401,7 @@ define Device/ubnt_unifi-ac-hd BLOCKSIZE := 64k IMAGE_SIZE := 14784k DEVICE_PACKAGES := ath10k-firmware-qca9984-ct - IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata endef TARGET_DEVICES += ubnt_unifi-ac-hd diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index c90975d098..ec10cd882a 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -63,7 +63,7 @@ define Device/Default SOC := $(DEFAULT_SOC) DEVICE_DTS = $$(SOC)_$(1) IMAGES := sysupgrade.bin - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata endef define Device/NAND/xway @@ -102,7 +102,7 @@ define Device/AVM KERNEL := kernel-bin | append-dtb | lzma | eva-image KERNEL_INITRAMFS := $$(KERNEL) IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-avm-fakeroot | \ - append-rootfs | pad-rootfs | append-metadata | check-size + append-rootfs | pad-rootfs | check-size | append-metadata endef ifeq ($(SUBTARGET),ase) diff --git a/target/linux/lantiq/image/ar9.mk b/target/linux/lantiq/image/ar9.mk index ea3836ea9d..a68868f0d9 100644 --- a/target/linux/lantiq/image/ar9.mk +++ b/target/linux/lantiq/image/ar9.mk @@ -90,10 +90,10 @@ define Device/netgear_dgn3500 factory-na.img factory.img IMAGE/sysupgrade-na.bin := \ append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "NA" | \ - pad-rootfs | append-metadata | check-size + pad-rootfs | check-size | append-metadata IMAGE/sysupgrade.bin := \ append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "WW" | \ - pad-rootfs | append-metadata | check-size + pad-rootfs | check-size | append-metadata IMAGE/factory-na.img := \ pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "NA" | pad-rootfs | \ @@ -119,7 +119,7 @@ define Device/netgear_dgn3500b IMAGES += factory.img IMAGE/sysupgrade.bin := \ append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "DE" | \ - pad-rootfs | append-metadata | check-size + pad-rootfs | check-size | append-metadata IMAGE/factory.img := \ pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "DE" | pad-rootfs | \ diff --git a/target/linux/lantiq/image/tp-link.mk b/target/linux/lantiq/image/tp-link.mk index e269aacd02..756105b94c 100644 --- a/target/linux/lantiq/image/tp-link.mk +++ b/target/linux/lantiq/image/tp-link.mk @@ -14,7 +14,7 @@ define Device/lantiqTpLink tplink-v2-header -s -V "ver. 1.0" IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := tplink-v2-image -s -V "ver. 1.0" | \ - append-metadata | check-size + check-size | append-metadata endef define Device/tplink_tdw8970 diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index 5bc31314f8..d997866568 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -253,7 +253,7 @@ define Device/netgear_dm200 IMAGE/sysupgrade.bin := append-kernel | \ pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ - append-rootfs | pad-rootfs | append-metadata | check-size + append-rootfs | pad-rootfs | check-size | append-metadata IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni IMAGE_SIZE := 7872k NETGEAR_BOARD_ID := DM200 diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts new file mode 100644 index 0000000000..738bcdc7d6 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts @@ -0,0 +1,204 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "dlink,dir-853-a3", "mediatek,mt7621-soc"; + model = "D-Link DIR-853 A3"; + + aliases { + label-mac-device = &gmac0; + led-boot = &led_power_orange; + led-failsafe = &led_power_blue; + led-running = &led_power_blue; + led-upgrade = &led_net_orange; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wifi { + label = "wifi"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power_orange: power_orange { + label = "orange:power"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + led_power_blue: power_blue { + label = "blue:power"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + led_net_orange: net_orange { + label = "orange:net"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + net_blue { + label = "blue:net"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + usb_blue { + label = "blue:usb"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + trigger-sources = <&xhci_ehci_port1>; + linux,default-trigger = "usbport"; + }; + + wlan2g { + label = "blue:wlan2g"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0radio"; + }; + + wlan5g { + label = "blue:wlan5g"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1radio"; + }; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "config"; + reg = <0x80000 0x80000>; + read-only; + }; + + factory: partition@100000 { + label = "factory"; + reg = <0x100000 0x40000>; + read-only; + }; + + partition@140000 { + label = "config2"; + reg = <0x140000 0x40000>; + read-only; + }; + + partition@180000 { + label = "firmware"; + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,padding = <96>; + reg = <0x180000 0x2800000>; + }; + + partition@2980000 { + label = "private"; + reg = <0x2980000 0x2000000>; + read-only; + }; + + partition@4980000 { + label = "firmware2"; + reg = <0x4980000 0x2800000>; + }; + + partition@7180000 { + label = "mydlink"; + reg = <0x7180000 0x600000>; + read-only; + }; + + partition@7780000 { + label = "reserved"; + reg = <0x7780000 0x880000>; + read-only; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + /* 5 GHz (phy1) does not take the address from calibration data, + but setting it manually here works */ + mtd-mac-address = <&factory 0x4>; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0xe000>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan4"; + }; + + port@1 { + status = "okay"; + label = "lan3"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan1"; + }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uart2", "uart3", "jtag", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts new file mode 100644 index 0000000000..09e46b011e --- /dev/null +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts @@ -0,0 +1,144 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include "mt7621_dlink_flash-16m-r1.dtsi" + +#include +#include + +/ { + compatible = "dlink,dir-853-r1", "mediatek,mt7621-soc"; + model = "D-Link DIR-853 R1"; + + aliases { + label-mac-device = &wan; + led-boot = &led_power_orange; + led-failsafe = &led_power_blue; + led-running = &led_power_blue; + led-upgrade = &led_net_orange; + }; + + leds { + compatible = "gpio-leds"; + + led_power_orange: power_orange { + label = "orange:power"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + led_power_blue: power_blue { + label = "blue:power"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + led_net_orange: net_orange { + label = "orange:net"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + net_blue { + label = "blue:net"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + usb_blue { + label = "blue:usb"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + trigger-sources = <&xhci_ehci_port1>; + linux,default-trigger = "usbport"; + }; + + wlan2g { + label = "blue:wlan2g"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0radio"; + }; + + wlan5g { + label = "blue:wlan5g"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1radio"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wifi { + label = "wifi"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + /* 5 GHz (phy1) does not take the address from calibration data, + but setting it manually here works */ + mtd-mac-address = <&factory 0x4>; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0x4>; + mtd-mac-address-increment = <(-1)>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan4"; + }; + + port@1 { + status = "okay"; + label = "lan3"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan1"; + }; + + wan: port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x4>; + mtd-mac-address-increment = <(-2)>; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uart3", "uart2", "jtag", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_linksys_ea8100-v2.dts b/target/linux/ramips/dts/mt7621_linksys_ea8100-v2.dts new file mode 100644 index 0000000000..db1429ea10 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_linksys_ea8100-v2.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_linksys_ea7xxx.dtsi" + +/ { + compatible = "linksys,ea8100-v2", "mediatek,mt7621-soc"; + model = "Linksys EA8100 v2"; +}; diff --git a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts index 74ea47aee0..12cf47f5a7 100644 --- a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts +++ b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts @@ -16,10 +16,6 @@ led-upgrade = &led_system; }; - chosen { - bootargs = "console=ttyS0,57600"; - }; - memory@0 { device_type = "memory"; reg = <0x0 0x8000000>; diff --git a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts index 6962651e1b..859568b1c1 100644 --- a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts +++ b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts @@ -16,10 +16,6 @@ led-upgrade = &led_globe; }; - chosen { - bootargs = "console=ttyS0,57600"; - }; - leds { compatible = "gpio-leds"; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index fc5223f3a4..cd2c425cef 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -166,7 +166,7 @@ define Device/Default IMAGES := sysupgrade.bin COMPILE := sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata endef define Device/netgear_sercomm_nor @@ -175,7 +175,7 @@ define Device/netgear_sercomm_nor IMAGES += factory.img IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ pad-rootfs - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata IMAGE/factory.img := pad-extra $$$$(SERCOMM_PAD) | $$(IMAGE/default) | \ pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \ zip $$$$(SERCOMM_HWNAME).bin | sercom-seal @@ -190,7 +190,7 @@ define Device/seama # - 36 bytes of META data (4-bytes aligned) IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs IMAGE/sysupgrade.bin := \ - $$(IMAGE/default) | seama | pad-rootfs | append-metadata | check-size + $$(IMAGE/default) | seama | pad-rootfs | check-size | append-metadata IMAGE/factory.bin := \ $$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size SEAMA_SIGNATURE := diff --git a/target/linux/ramips/image/common-tp-link.mk b/target/linux/ramips/image/common-tp-link.mk index 07ad1ea250..915a086f98 100644 --- a/target/linux/ramips/image/common-tp-link.mk +++ b/target/linux/ramips/image/common-tp-link.mk @@ -11,8 +11,8 @@ define Device/tplink-v1 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v1-header -e -O IMAGES += factory.bin IMAGE/factory.bin := tplink-v1-image factory -e -O - IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade -e -O | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade -e -O | check-size | \ + append-metadata endef define Device/tplink-v2 @@ -26,8 +26,8 @@ define Device/tplink-v2 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e IMAGES += factory.bin IMAGE/factory.bin := tplink-v2-image -e - IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := tplink-v2-image -s -e | check-size | \ + append-metadata endef define Device/tplink-safeloader @@ -39,6 +39,6 @@ define Device/tplink-safeloader KERNEL := $(KERNEL_DTB) | tplink-v1-header -e -O IMAGES += factory.bin IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \ - append-metadata | check-size + check-size | append-metadata IMAGE/factory.bin := append-rootfs | tplink-safeloader factory endef diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 849bd31ef8..c3b9bc9f6b 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -327,7 +327,7 @@ define Device/edimax_br-6478ac-v2 IMAGE_SIZE := 7744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN68 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci \ kmod-usb-ledtrig-usbport endef @@ -341,7 +341,7 @@ define Device/edimax_ew-7476rpc IMAGE_SIZE := 7744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN79 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_PACKAGES := kmod-mt76x2 kmod-phy-realtek endef TARGET_DEVICES += edimax_ew-7476rpc @@ -354,7 +354,7 @@ define Device/edimax_ew-7478ac IMAGE_SIZE := 7744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN70 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_PACKAGES := kmod-mt76x2 kmod-phy-realtek endef TARGET_DEVICES += edimax_ew-7478ac @@ -367,7 +367,7 @@ define Device/edimax_ew-7478apc IMAGE_SIZE := 7744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN75 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci \ kmod-usb-ledtrig-usbport endef @@ -407,7 +407,7 @@ define Device/fon_fon2601 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci KERNEL_INITRAMFS := $$(KERNEL) | uimage-padhdr IMAGE/sysupgrade.bin := append-kernel | append-rootfs | uimage-padhdr | \ - pad-rootfs | append-metadata | check-size + pad-rootfs | check-size | append-metadata endef TARGET_DEVICES += fon_fon2601 diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 5b24c771b9..1c43973e5d 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -289,7 +289,7 @@ define Device/dlink_dir-8xx-a1 KERNEL_INITRAMFS := $$(KERNEL) | uimage-padhdr 96 IMAGES += factory.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\ - pad-rootfs | append-metadata | check-size + pad-rootfs | check-size | append-metadata IMAGE/factory.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\ check-size endef @@ -342,6 +342,21 @@ define Device/dlink_dir-2660-a1 endef TARGET_DEVICES += dlink_dir-2660-a1 +define Device/dlink_dir-853-a3 + $(Device/dlink_dir-xx60-a1) + DEVICE_MODEL := DIR-853 + DEVICE_VARIANT := A3 +endef +TARGET_DEVICES += dlink_dir-853-a3 + +define Device/dlink_dir-853-r1 + $(Device/dlink_dir-8xx-r1) + DEVICE_MODEL := DIR-853 + DEVICE_VARIANT := R1 + DEVICE_PACKAGES += kmod-usb3 kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += dlink_dir-853-r1 + define Device/dlink_dir-860l-b1 $(Device/dsa-migration) $(Device/seama) @@ -440,7 +455,7 @@ define Device/edimax_re23s DEVICE_ALT0_MODEL := Gemini RE23S IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata IMAGES += factory.bin IMAGE/factory.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \ @@ -824,7 +839,7 @@ define Device/linksys_ea7xxx uboot-envtools UBINIZE_OPTS := -E 5 IMAGES := sysupgrade.bin factory.bin - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | check-size + IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \ append-ubi | check-size | linksys-image type=$$$$(LINKSYS_HWNAME) endef @@ -862,6 +877,14 @@ define Device/linksys_ea8100-v1 endef TARGET_DEVICES += linksys_ea8100-v1 +define Device/linksys_ea8100-v2 + $(Device/linksys_ea7xxx) + DEVICE_MODEL := EA8100 + DEVICE_VARIANT := v2 + LINKSYS_HWNAME := EA8100v2 +endef +TARGET_DEVICES += linksys_ea8100-v2 + define Device/linksys_re6500 $(Device/dsa-migration) IMAGE_SIZE := 7872k @@ -901,8 +924,8 @@ define Device/MikroTik KERNEL_NAME := vmlinuz KERNEL := kernel-bin | append-dtb-elf IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \ - pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | \ - check-size + pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | \ + append-metadata endef define Device/mikrotik_routerboard-750gr3 diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index 4edc2eb3c4..6c339dcba1 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -500,7 +500,7 @@ define Device/edimax_3g-6200n IMAGE_SIZE := 3648k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m 3G62 -f 0x50000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_VENDOR := Edimax DEVICE_MODEL := 3g-6200n SUPPORTED_DEVICES += 3g-6200n @@ -513,7 +513,7 @@ define Device/edimax_3g-6200nl IMAGE_SIZE := 3648k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m 3G62 -f 0x50000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_VENDOR := Edimax DEVICE_MODEL := 3g-6200nl SUPPORTED_DEVICES += 3g-6200nl @@ -1047,7 +1047,7 @@ define Device/trendnet_tew-638apb-v2 BLOCKSIZE := 64k IMAGE_SIZE := 3776k IMAGE/sysupgrade.bin := $$(sysupgrade_bin) | umedia-header 0x026382 | \ - append-metadata | check-size + check-size | append-metadata DEVICE_VENDOR := TRENDnet DEVICE_MODEL := TEW-638APB DEVICE_VARIANT := v2 diff --git a/target/linux/ramips/image/rt3883.mk b/target/linux/ramips/image/rt3883.mk index 1b46d570fd..148bfbbe44 100644 --- a/target/linux/ramips/image/rt3883.mk +++ b/target/linux/ramips/image/rt3883.mk @@ -52,7 +52,7 @@ define Device/edimax_br-6475nd IMAGE_SIZE := 7744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN54 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_VENDOR := Edimax DEVICE_MODEL := BR-6475nD SUPPORTED_DEVICES += br-6475nd diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index c04dae4f0d..d01ba53568 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -34,6 +34,12 @@ dlink,dir-2640-a1|\ dlink,dir-2660-a1) ucidef_set_led_netdev "wan" "wan" "white:net" "wan" ;; +dlink,dir-853-a3) + ucidef_set_led_netdev "wan" "wan" "blue:net" "wan" + ;; +dlink,dir-853-r1) + ucidef_set_led_netdev "internet" "internet" "blue:net" "wan" + ;; dlink,dir-860l-b1|\ dlink,dir-867-a1|\ dlink,dir-878-a1|\ @@ -52,7 +58,8 @@ linksys,e5600) linksys,ea7300-v1|\ linksys,ea7300-v2|\ linksys,ea7500-v2|\ -linksys,ea8100-v1) +linksys,ea8100-v1|\ +linksys,ea8100-v2) ucidef_set_led_netdev "lan1" "lan1 link" "green:lan1" "lan1" "link" ucidef_set_led_netdev "lan2" "lan2 link" "green:lan2" "lan2" "link" ucidef_set_led_netdev "lan3" "lan3 link" "green:lan3" "lan3" "link" diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index aa1d644938..16148547f7 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -143,7 +143,8 @@ ramips_setup_macs() linksys,ea7300-v1|\ linksys,ea7300-v2|\ linksys,ea7500-v2|\ - linksys,ea8100-v1) + linksys,ea8100-v1|\ + linksys,ea8100-v2) lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) wan_mac=$lan_mac label_mac=$lan_mac diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index bd0f0254c6..711af4e3af 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -10,6 +10,17 @@ PHYNBR=${DEVPATH##*/phy} board=$(board_name) case "$board" in + dlink,dir-853-a3) + [ "$PHYNBR" = "0" ] && \ + macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \ + > /sys${DEVPATH}/macaddress + ;; + dlink,dir-853-r1) + if [ "$PHYNBR" = "0" ]; then + base_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" -1) + macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress + fi + ;; glinet,gl-mt1300) [ "$PHYNBR" = "1" ] && \ macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress @@ -22,7 +33,8 @@ case "$board" in linksys,ea7300-v1|\ linksys,ea7300-v2|\ linksys,ea7500-v2|\ - linksys,ea8100-v1) + linksys,ea8100-v1|\ + linksys,ea8100-v2) hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr) [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress diff --git a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount index d3525ea0c9..7b4a63d663 100755 --- a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount +++ b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount @@ -12,7 +12,8 @@ boot() { linksys,ea7300-v1|\ linksys,ea7300-v2|\ linksys,ea7500-v2|\ - linksys,ea8100-v1) + linksys,ea8100-v1|\ + linksys,ea8100-v2) mtd resetbc s_env || true ;; samknows,whitebox-v8) diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index c2ad4d3ed6..ef9b680f32 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -56,6 +56,7 @@ platform_do_upgrade() { dlink,dir-1960-a1|\ dlink,dir-2640-a1|\ dlink,dir-2660-a1|\ + dlink,dir-853-a3|\ hiwifi,hc5962|\ jcg,q20|\ linksys,e5600|\ @@ -63,6 +64,7 @@ platform_do_upgrade() { linksys,ea7300-v2|\ linksys,ea7500-v2|\ linksys,ea8100-v1|\ + linksys,ea8100-v2|\ netgear,r6220|\ netgear,r6260|\ netgear,r6350|\ diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index ebc0c0a784..cf0d588851 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -24,7 +24,7 @@ define Device/Default DEVICE_DTS = $$(SOC)_$(1) IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata endef # "NGE" refers to the uImage magic diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 432044882c..4e7549d5e6 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -2431,6 +2431,46 @@ static struct device_info boards[] = { .last_sysupgrade_partition = "file-system" }, + /** Firmware layout for the RE455 v1 */ + { + .id = "RE455-V1", + .vendor = "", + .support_list = + "SupportList:\r\n" + "{product_name:RE455,product_ver:1.0.0,special_id:00000000}\r\n" + "{product_name:RE455,product_ver:1.0.0,special_id:55530000}\r\n" + "{product_name:RE455,product_ver:1.0.0,special_id:45550000}\r\n" + "{product_name:RE455,product_ver:1.0.0,special_id:4A500000}\r\n" + "{product_name:RE455,product_ver:1.0.0,special_id:43410000}\r\n" + "{product_name:RE455,product_ver:1.0.0,special_id:41550000}\r\n" + "{product_name:RE455,product_ver:1.0.0,special_id:41530000}\r\n" + "{product_name:RE455,product_ver:1.0.0,special_id:4B520000}\r\n" + "{product_name:RE455,product_ver:1.0.0,special_id:42520000}\r\n", + .part_trail = 0x00, + .soft_ver = NULL, + + /* We're using a dynamic kernel/rootfs split here */ + .partitions = { + {"fs-uboot", 0x00000, 0x20000}, + {"default-mac", 0x20000, 0x00020}, + {"pin", 0x20020, 0x00020}, + {"product-info", 0x21000, 0x01000}, + {"partition-table", 0x22000, 0x02000}, + {"soft-version", 0x24000, 0x01000}, + {"support-list", 0x25000, 0x01000}, + {"profile", 0x26000, 0x08000}, + {"user-config", 0x2e000, 0x10000}, + {"default-config", 0x3e000, 0x10000}, + {"config-info", 0x4e000, 0x00400}, + {"firmware", 0x50000, 0x7a0000}, + {"radio", 0x7f0000, 0x10000}, + {NULL, 0, 0} + }, + + .first_sysupgrade_partition = "os-image", + .last_sysupgrade_partition = "file-system" + }, + /** Firmware layout for the RE500 */ { .id = "RE500-V1",