{"id":759,"date":"2026-06-01T20:34:33","date_gmt":"2026-06-01T12:34:33","guid":{"rendered":"https:\/\/blog.xmb505.top\/?p=759"},"modified":"2026-06-01T20:34:37","modified_gmt":"2026-06-01T12:34:37","slug":"%e5%b0%8f%e7%b1%b3ax3000t-openwrt-uboot%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/blog.xmb505.top\/index.php\/2026\/06\/01\/%e5%b0%8f%e7%b1%b3ax3000t-openwrt-uboot%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f%e8%ae%b0%e5%bd%95\/","title":{"rendered":"\u5c0f\u7c73AX3000T OpenWRT Uboot\u73af\u5883\u53d8\u91cf\u8bb0\u5f55"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>MT7981> env print\nboot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever\nboot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu\nboot_production=led $bootled_pwr on ; run ubi_read_production &amp;&amp; bootm $loadaddr#$bootconf ; led $bootled_pwr off\nboot_recovery=led $bootled_rec on ; run ubi_read_recovery &amp;&amp; bootm $loadaddr#$bootconf ; led $bootled_rec off\nboot_tftp=tftpboot $loadaddr $bootfile &amp;&amp; bootm $loadaddr#$bootconf\nboot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done\nboot_tftp_production=tftpboot $loadaddr $bootfile_upg &amp;&amp; env exists replacevol &amp;&amp; iminfo $loadaddr &amp;&amp; run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi\nboot_tftp_recovery=tftpboot $loadaddr $bootfile &amp;&amp; env exists replacevol &amp;&amp; iminfo $loadaddr &amp;&amp; run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi\nboot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 &amp;&amp; run mtd_write_bl2\nboot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip &amp;&amp; run mtd_write_fip &amp;&amp; run reset_factory\nboot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever\nbootargs=console=ttyS0,115200n8 console_msg_format=syslog\nbootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi\nbootconf=config-1\nbootdelay=3\nbootfile=immortalwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb\nbootfile_bl2=immortalwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-preloader.bin\nbootfile_fip=immortalwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-bl31-uboot.fip\nbootfile_upg=immortalwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-squashfs-sysupgrade.itb\nbootled_pwr=yellow:status\nbootled_rec=blue:status\nbootmenu_0=Run default boot command.=run boot_default\nbootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return\nbootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return\nbootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return\nbootmenu_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\nbootmenu_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\nbootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return\nbootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return\nbootmenu_8=Reboot.=reset\nbootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset\nbootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60\nbootmenu_default=0\nbootmenu_delay=3\nbootmenu_title=      ( ( ( OpenWrt ) ) )       U-Boot 2025.10-ImmortalWrt-r37854-4b24da3b4c5c (May 25 2026 - 02:36:00 +0000)\nconsole=earlycon=uart8250,mmio32,0x11002000 console=ttyS0\nethaddr=06:26:4e:80:71:39\nipaddr=192.168.1.1\nloadaddr=0x46000000\nmtd_write_bl2=mtd erase bl2 &amp;&amp; mtd write bl2 $loadaddr\nmtd_write_fip=mtd erase fip &amp;&amp; mtd write fip $loadaddr\nreset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800\nserverip=192.168.1.254\nubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format\nubi_format=ubi detach ; mtd erase ubi &amp;&amp; ubi part ubi ; reset\nubi_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\nubi_read_production=ubi read $loadaddr fit &amp;&amp; iminfo $loadaddr &amp;&amp; run ubi_prepare_rootfs\nubi_read_recovery=ubi check recovery &amp;&amp; ubi read $loadaddr recovery\nubi_remove_rootfs=ubi check rootfs_data &amp;&amp; ubi remove rootfs_data\nubi_write_production=ubi check fit &amp;&amp; ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic &amp;&amp; ubi write $loadaddr fit $filesize\nubi_write_recovery=ubi check recovery &amp;&amp; ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic &amp;&amp; ubi write $loadaddr recovery $filesize\nver=U-Boot 2025.10-ImmortalWrt-r37854-4b24da3b4c5c (May 25 2026 - 02:36:00 +0000)\n\nEnvironment size: 4653\/126971 bytes\nMT7981> <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[6,35,30],"class_list":["post-759","post","type-post","status-publish","format-standard","hentry","category-10","tag-linux","tag-35","tag-30"],"_links":{"self":[{"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/posts\/759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/comments?post=759"}],"version-history":[{"count":1,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/posts\/759\/revisions"}],"predecessor-version":[{"id":760,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/posts\/759\/revisions\/760"}],"wp:attachment":[{"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/media?parent=759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/categories?post=759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/tags?post=759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}