The difference between single image and factory.bin?

Hi all,

I have BPI-R3 board, I follow R3 wiki page to flash single image to NAND, it is okay. Then, I start working on this, https://github.com/BPI-SINOVOIP/BPI-R3-OPENWRT-V21.02.3.git

From this git, I can build sysupgrade.bin and factory.bin and I can do sysupgrade from WebUI or command line. But, does anyone can talk me what is the difference between mtk-bpi-r3-NAND-WAN1-RJ45-20220601-single-image.bin and openwrt-mtk-mediatek-mt7986-BPI-R3-NAND-WAN1-SFP1-squashfs-factory.bin?

Why I will ask this question? Because I try to flash factory.bin to NAND, just following the same steps from wiki, but device can not boot up(always show System Halt!). I want to fix this issue for R3. Thanks.

[root@Ubuntu18 openwrt-github-devel]# ls BPI-R3-OPENWRT-V21.02.3_built/bin/targets/mediatek/mt7986/ -la
total 513656
drwxr-xr-x 3 linux linux     4096 7月   3 13:38 .
drwxr-xr-x 3 linux linux     4096 7月   3 13:13 ..
-rw-r--r-- 1 linux linux    10305 11月  4 21:44 config.buildinfo
-rw-r--r-- 1 linux linux      473 11月  4 21:44 feeds.buildinfo
-rw-r--r-- 1 linux linux 26463356 11月  4 21:51 openwrt-mediatek-mt7986-BPI-R3-EMMC-WAN1-RJ45-initramfs-kernel.bin
-rw-r--r-- 1 linux linux 30956327 11月  4 21:50 openwrt-mediatek-mt7986-BPI-R3-EMMC-WAN1-RJ45-squashfs-sysupgrade.bin
-rw-r--r-- 1 linux linux 26463356 11月  4 21:51 openwrt-mediatek-mt7986-BPI-R3-EMMC-WAN1-SFP1-initramfs-kernel.bin
-rw-r--r-- 1 linux linux 30956327 11月  4 21:50 openwrt-mediatek-mt7986-BPI-R3-EMMC-WAN1-SFP1-squashfs-sysupgrade.bin
-rw-r--r-- 1 linux linux 26463244 11月  4 21:51 openwrt-mediatek-mt7986-BPI-R3-NAND-WAN1-RJ45-initramfs-kernel.bin
-rw-r--r-- 1 linux linux 33030144 11月  4 21:50 openwrt-mediatek-mt7986-BPI-R3-NAND-WAN1-RJ45-squashfs-factory.bin
-rw-r--r-- 1 linux linux 30956327 11月  4 21:50 openwrt-mediatek-mt7986-BPI-R3-NAND-WAN1-RJ45-squashfs-sysupgrade.bin
-rw-r--r-- 1 linux linux 26463244 11月  4 21:51 openwrt-mediatek-mt7986-BPI-R3-NAND-WAN1-SFP1-initramfs-kernel.bin
-rw-r--r-- 1 linux linux 33030144 11月  4 21:50 openwrt-mediatek-mt7986-BPI-R3-NAND-WAN1-SFP1-squashfs-factory.bin
-rw-r--r-- 1 linux linux 30956327 11月  4 21:50 openwrt-mediatek-mt7986-BPI-R3-NAND-WAN1-SFP1-squashfs-sysupgrade.bin
-rw-r--r-- 1 linux linux 26462924 11月  4 21:51 openwrt-mediatek-mt7986-BPI-R3-NOR-WAN1-RJ45-initramfs-kernel.bin
-rw-r--r-- 1 linux linux 31195946 11月  4 21:50 openwrt-mediatek-mt7986-BPI-R3-NOR-WAN1-RJ45-squashfs-sysupgrade.bin
-rw-r--r-- 1 linux linux 26462924 11月  4 21:51 openwrt-mediatek-mt7986-BPI-R3-NOR-WAN1-SFP1-initramfs-kernel.bin
-rw-r--r-- 1 linux linux 31195946 11月  4 21:50 openwrt-mediatek-mt7986-BPI-R3-NOR-WAN1-SFP1-squashfs-sysupgrade.bin
-rw-r--r-- 1 linux linux 26463208 11月  4 21:51 openwrt-mediatek-mt7986-BPI-R3-SD-WAN1-RJ45-initramfs-kernel.bin
-rw-r--r-- 1 linux linux 30956325 11月  4 21:50 openwrt-mediatek-mt7986-BPI-R3-SD-WAN1-RJ45-squashfs-sysupgrade.bin
-rw-r--r-- 1 linux linux 26463208 11月  4 21:51 openwrt-mediatek-mt7986-BPI-R3-SD-WAN1-SFP1-initramfs-kernel.bin
-rw-r--r-- 1 linux linux 30956325 11月  4 21:50 openwrt-mediatek-mt7986-BPI-R3-SD-WAN1-SFP1-squashfs-sysupgrade.bin
-rw-r--r-- 1 linux linux     9812 11月  4 21:51 openwrt-mediatek-mt7986.manifest
drwxr-xr-x 2 linux linux    20480 11月  4 21:46 packages
-rw-r--r-- 1 linux linux     2754 11月  4 21:51 sha256sums
-rw-r--r-- 1 linux linux       18 11月  4 21:44 version.buildinfo
[root@Ubuntu18 openwrt-github-devel]# 

openwrt-mediatek-mt7986-BPI-R3-NAND-WAN1-SFP1-squashfs-sysupgrade.bin, you can use it to upgrade the R3 online from uboot boot shell. openwrt-mediatek-mt7986-BPI-R3-NAND-WAN1-SFP1-squashfs-factory.bin, you may ignore it, we make one whole nand falsh image with it. mtk-bpi-r3-NAND-WAN1-RJ45-20220601-single-image.bin, we release one whole image. I think that you should use mtk-bpi-r3-NAND-WAN1-SFP-20220601-single-image.bin

Because the two image don’t include GPT parttiotn table, ATF, uboot , you must flash the whole image, then you compile yourself image openwrt-mediatek-mt7986-BPI-R3-NAND-WAN1-SFP1-squashfs-sysupgrade.bin, upgrade the board’s nand flash from uboot’s boot menu.

Hi @zuowei8

Is it possible to build single-image.bin at my local building machine? I think maybe I need special tool to create it. Thanks.

you may use the attachment file to create one single-image.bin with the below command.

single_img_wrapper_nand.tgz (434.5 KB)

cd single_img_wrapper

./mk_image.sh -p mt7986a -d spim-nand -b bl2.img -f fip.bin -k openwrt-mediatek-mt7986-BPI-R3-NAND-WAN1-SFP1-squashfs-factory.bin

Hi @zuowei8

It works, thank you very much. ^^

By the way, is there a doc to explain how to create fip.bin, bl2.img and yml? I would like to learn how to create it. Thanks.