Use the new fitblk driver.
Tested-by: Yangyu Chen <cyy@cyyself.name>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
bananapi,bpi-r3-mini|\
bananapi,bpi-r4|\
bananapi,bpi-r4-poe|\
+cmcc,rax3000m|\
jdcloud,re-cp-03)
. /lib/upgrade/fit.sh
export_fitblk_bootdev
;;
esac
;;
-cmcc,rax3000m)
- case "$(cmdline_get_var root)" in
- /dev/mmc*)
- ubootenv_add_mmc_default
- ;;
- *)
- ubootenv_add_ubi_default
- ;;
- esac
- ;;
comfast,cf-e393ax)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x80000"
;;
+serverip=192.168.1.254
+loadaddr=0x46000000
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
-+bootargs=root=/dev/mmcblk0p65
++bootargs=root=/dev/fit0 rootwait
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi
+bootconf=config-1#mt7981b-cmcc-rax3000m-emmc
+bootdelay=0
compatible = "cmcc,rax3000m", "mediatek,mt7981";
fragment@0 {
+ target = <&chosen>;
+ __overlay__ {
+ rootdisk = <&emmc_rootdisk>;
+ };
+ };
+
+ fragment@1 {
target = <&gmac0>;
__overlay__ {
nvmem-cells = <&macaddr_factory_2a 0>;
};
};
- fragment@1 {
+ fragment@2 {
target = <&gmac1>;
__overlay__ {
nvmem-cells = <&macaddr_factory_24 0>;
};
};
- fragment@2 {
+ fragment@3 {
target = <&mmc0>;
__overlay__ {
bus-width = <8>;
};
};
};
+
+ emmc_rootdisk: block-partition-production {
+ partname = "production";
+ };
};
};
};
};
};
- fragment@3 {
+ fragment@4 {
target = <&pio>;
__overlay__ {
mmc0_pins_default: mmc0-pins {
};
};
- fragment@4 {
+ fragment@5 {
target = <&wifi>;
__overlay__ {
nvmem-cells = <&eeprom_factory_0>;
compatible = "cmcc,rax3000m", "mediatek,mt7981";
fragment@0 {
+ target = <&chosen>;
+ __overlay__ {
+ rootdisk = <&ubi_rootdisk>;
+ };
+ };
+
+ fragment@1 {
target = <&gmac0>;
__overlay__ {
nvmem-cells = <&macaddr_factory_2a 0>;
};
};
- fragment@1 {
+ fragment@2 {
target = <&gmac1>;
__overlay__ {
nvmem-cells = <&macaddr_factory_24 0>;
};
};
- fragment@2 {
+ fragment@3 {
target = <&pio>;
__overlay__ {
spi0_flash_pins: spi0-pins {
};
};
- fragment@3 {
+ fragment@4 {
target = <&spi0>;
__overlay__ {
pinctrl-names = "default";
};
partition@580000 {
+ compatible = "linux,ubi";
label = "ubi";
reg = <0x580000 0x7200000>;
+
+ volumes {
+ ubi_rootdisk: ubi-volume-fit {
+ volname = "fit";
+ };
+ };
};
};
};
};
};
- fragment@4 {
+ fragment@5 {
target = <&wifi>;
__overlay__ {
nvmem-cells = <&eeprom_factory_0>;
serial0 = &uart0;
};
- chosen {
+ chosen: chosen {
+ bootargs-override = "root=/dev/fit0 rootwait";
stdout-path = "serial0:115200n8";
};
bananapi,bpi-r3-mini|\
bananapi,bpi-r4|\
bananapi,bpi-r4-poe|\
+ cmcc,rax3000m|\
jdcloud,re-cp-03|\
mediatek,mt7988a-rfb|\
nokia,ea0326gmp|\
xiaomi,redmi-router-ax6000-ubootmod)
fit_do_upgrade "$1"
;;
- cmcc,rax3000m)
- case "$(cmdline_get_var root)" in
- /dev/mmc*)
- CI_KERNPART="production"
- emmc_do_upgrade "$1"
- ;;
- *)
- CI_KERNPART="fit"
- nand_do_upgrade "$1"
- ;;
- esac
- ;;
cudy,re3000-v1|\
cudy,wr3000-v1|\
yuncore,ax835)
platform_copy_config() {
case "$(board_name)" in
- cmcc,rax3000m)
- case "$(cmdline_get_var root)" in
- /dev/mmc*)
- emmc_copy_config
- ;;
- esac
- ;;
bananapi,bpi-r3|\
bananapi,bpi-r3-mini|\
bananapi,bpi-r4|\
- bananapi,bpi-r4-poe)
+ bananapi,bpi-r4-poe|\
+ cmcc,rax3000m)
if [ "$CI_METHOD" = "emmc" ]; then
emmc_copy_config
fi