Failed to build firmware for BANANA PI R3P on LEDE coode(branch:master)

I clone https://github.com/coolsnowwolf/lede and started to build. No errors occurred while code is building. But in final step towards making firmware , there was a error, looking at the log:


 dd if=/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=6656k conv=sync
0+1 records in
1+0 records out
6815744 bytes (6.8 MB, 6.5 MiB) copied, 0.00754685 s, 903 MB/s
mv /home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new /home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
cat /home/yoki/lede/staging_dir/target-aarch64_cortex-a53_musl/image/mt7986_bananapi_bpi-r3-sdmmc-u-boot.fip >> /home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
dd if=/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=12M conv=sync
0+1 records in
1+0 records out
12582912 bytes (13 MB, 12 MiB) copied, 0.0151384 s, 831 MB/s
mv /home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new /home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
cp "/home/yoki/lede/bin/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb" "/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta"
fwtool -s /dev/null -t "/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" || :
Data not found
fwtool -i /dev/null -t "/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" || :
Data not found
mkdir -p "/home/yoki/lede/staging_dir/target-aarch64_cortex-a53_musl/image"
dd if="/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" of="/home/yoki/lede/staging_dir/target-aarch64_cortex-a53_musl/image/mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb"
438912+0 records in
438912+0 records out
224722944 bytes (225 MB, 214 MiB) copied, 1.5279 s, 147 MB/s
dd if="/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" >> "/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz"
438912+0 records in
438912+0 records out
224722944 bytes (225 MB, 214 MiB) copied, 1.44158 s, 156 MB/s
rm "/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta"
bash: line 1: 8: Bad file descriptor
dd if=/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=44M conv=sync
dd: failed to open '/home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz': No such file or directory
make[5]: *** [Makefile:37: /home/yoki/lede/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz] Error 1
make[5]: Leaving directory '/home/yoki/lede/target/linux/mediatek/image'
make[4]: *** [Makefile:17: install] Error 2
make[4]: Leaving directory '/home/yoki/lede/target/linux/mediatek'
make[3]: *** [Makefile:11: install] Error 2
make[3]: Leaving directory '/home/yoki/lede/target/linux'
time: target/linux/install#1587.67#49.26#1199.10
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:30: target/linux/install] Error 1
make[2]: Leaving directory '/home/yoki/lede'
make[1]: *** [target/Makefile:24: /home/yoki/lede/staging_dir/target-aarch64_cortex-a53_musl/stamp/.target_install] Error 2
make[1]: Leaving directory '/home/yoki/lede'
make: *** [/home/yoki/lede/include/toplevel.mk:231: world] Error 2

So any way to fix it?

I do not know R3P…do you mean different board? I guess R3 (without P). Are you sure your referenced repo supports this board? I see the reference,but it seems that build is broken

yes,it is r3.In china,the banana pi r3 is also called r3p.

make-info.log (4.7 KB)

Look at the log, some errors occurred while building firmware. Any way to fix it?

PS: Host & building envirnonment: Ubuntu 20.04 lts with kernel 5.15 @lede code source (https://github.com/coolsnowwolf/lede)

This looks strange…dd output should not be piped into another file…basicly this looks like a basic file copy,so why not use cp? You should open an issue on the github page for the creator of the build script

This source code link (https://github.com/coolsnowwolf/lede) is owned by @Lean who is one of the core contributors to the OPENWRT project.

Now I use the official OPENWRT code to build, but this problem still keeps. log:

...
fwtool -i /dev/null -t "/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" || :
Data not found
mkdir -p "/home/yoki/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image"
dd if="/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" of="/home/yoki/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb"
531712+0 records in
531712+0 records out
272236544 bytes (272 MB, 260 MiB) copied, 12.6579 s, 21.5 MB/s
dd if="/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" >> "/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz"
531712+0 records in
531712+0 records out
272236544 bytes (272 MB, 260 MiB) copied, 12.6856 s, 21.5 MB/s
rm "/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta"
bash: line 1: 8: Bad file descriptor
dd if=/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=44M conv=sync
dd: failed to open '/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz': No such file or directory
make[5]: *** [Makefile:43: /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz] Error 1
make[5]: Leaving directory '/home/yoki/openwrt/target/linux/mediatek/image'
make[4]: *** [Makefile:18: install] Error 2
make[4]: Leaving directory '/home/yoki/openwrt/target/linux/mediatek'
make[3]: *** [Makefile:11: install] Error 2
make[3]: Leaving directory '/home/yoki/openwrt/target/linux'
time: target/linux/install#1665.89#73.99#1270.89
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:30: target/linux/install] Error 1
make[2]: Leaving directory '/home/yoki/openwrt'
make[1]: *** [target/Makefile:24: /home/yoki/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.target_install] Error 2
make[1]: Leaving directory '/home/yoki/openwrt'
make: *** [/home/yoki/openwrt/include/toplevel.mk:232: world] Error 2

I think the most basic reason is " ‘/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz’: No such file or directory ". No such file.

This file should be created by the dd command above,but this does not use of= but output redirection…maybe this does not work somehow

I would be interesting to know a bit more about the build host: Is it running Linux? Which exact distribution and version?

If I want to reproduce your problem, can you name steps one by one (incl. URLs to repositories, etc.)?

the build host info: Ubuntu20.04 lts x64 with kernel 5.19, one of the building source code is https://github.com/openwrt/openwrt.git and another is https://github.com/coolsnowwolf/lede.git.(I tried all of them.)

Now I find firmware would be successfully built if I used make menuconfig to disable or cancelled ramdisk. It seems that this is caused by the build script because it solidified the firmware partition table.(in the previous building firmware process, I tried to set the size of the firmware root partition to 512M, to 1G, to 2G, to 4G,all attempts failed)

It needs to modify the code from line 17 to line 37 in the build script (target/linux/mediatek/image/filogic.mk)

 17	define Build/mt7986-gpt
    18		cp $@ [email protected] 2>/dev/null || true
    19		ptgen -g -o [email protected] -a 1 -l 1024 \
    20			$(if $(findstring sdmmc,$1), \
    21				-H \
    22				-t 0x83	-N bl2		-r	-p 4079k@17k \
    23			) \
    24				-t 0x83	-N ubootenv	-r	-p 512k@4M \
    25				-t 0x83	-N factory	-r	-p 2M@4608k \
    26				-t 0xef	-N fip		-r	-p 4M@6656k \
    27					-N recovery	-r	-p 32M@12M \
    28			$(if $(findstring sdmmc,$1), \
    29					-N install	-r	-p 20M@44M \
    30				-t 0x2e -N production		-p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M@64M \
    31			) \
    32			$(if $(findstring emmc,$1), \
    33				-t 0x2e -N production		-p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M@64M \
    34			)
    35		cat [email protected] >> $@
    36		rm [email protected]
    37	endef

It also needs to modify the codefrom line 56to line 101 in the build script (target/linux/mediatek/image/filogic.mk)

56	define Device/bananapi_bpi-r3
   57	  DEVICE_VENDOR := Bananapi
   58	  DEVICE_MODEL := BPi-R3
   59	  DEVICE_DTS := mt7986a-bananapi-bpi-r3
   60	  DEVICE_DTS_CONFIG := config-mt7986a-bananapi-bpi-r3
   61	  DEVICE_DTS_OVERLAY:= mt7986a-bananapi-bpi-r3-nor mt7986a-bananapi-bpi-r3-emmc-nor mt7986a-bananapi-bpi-r3-emmc-snand mt7986a-bananapi-bpi-r3-snand
   62	  DEVICE_DTS_DIR := ../dts
   63	  DEVICE_PACKAGES := kmod-hwmon-pwmfan kmod-i2c-gpio kmod-mt7986-firmware kmod-sfp kmod-usb3 e2fsprogs f2fsck mkf2fs mt7986-wo-firmware
   64	  IMAGES := sysupgrade.itb
   65	  KERNEL_LOADADDR := 0x44000000
   66	  KERNEL_INITRAMFS_SUFFIX := -recovery.itb
   67	  ARTIFACTS := \
   68		       emmc-preloader.bin emmc-bl31-uboot.fip \
   69		       nor-preloader.bin nor-bl31-uboot.fip \
   70		       sdcard.img.gz \
   71		       snand-preloader.bin snand-bl31-uboot.fip
   72	  ARTIFACT/emmc-preloader.bin	:= bl2 emmc-ddr4
   73	  ARTIFACT/emmc-bl31-uboot.fip	:= bl31-uboot bananapi_bpi-r3-emmc
   74	  ARTIFACT/nor-preloader.bin	:= bl2 nor-ddr4
   75	  ARTIFACT/nor-bl31-uboot.fip	:= bl31-uboot bananapi_bpi-r3-nor
   76	  ARTIFACT/snand-preloader.bin	:= bl2 spim-nand-ddr4
   77	  ARTIFACT/snand-bl31-uboot.fip	:= bl31-uboot bananapi_bpi-r3-snand
   78	  ARTIFACT/sdcard.img.gz	:= mt7986-gpt sdmmc |\
   79					   pad-to 17k | bl2 sdmmc-ddr4 |\
   80					   pad-to 6656k | bl31-uboot bananapi_bpi-r3-sdmmc |\
   81					$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),\
   82					   pad-to 12M | append-image-stage initramfs-recovery.itb | check-size 44m |\
   83					) \
   84					   pad-to 44M | bl2 spim-nand-ddr4 |\
   85					   pad-to 45M | bl31-uboot bananapi_bpi-r3-snand |\
   86					   pad-to 49M | bl2 nor-ddr4 |\
   87					   pad-to 50M | bl31-uboot bananapi_bpi-r3-nor |\
   88					   pad-to 51M | bl2 emmc-ddr4 |\
   89					   pad-to 52M | bl31-uboot bananapi_bpi-r3-emmc |\
   90					   pad-to 56M | mt7986-gpt emmc |\
   91					$(if $(CONFIG_TARGET_ROOTFS_SQUASHFS),\
   92					   pad-to 64M | append-image squashfs-sysupgrade.itb | check-size | gzip \
   93					)
   94	  IMAGE_SIZE := $$(shell expr 64 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m
   95	  KERNEL			:= kernel-bin | gzip
   96	  KERNEL_INITRAMFS := kernel-bin | lzma | \
   97		fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
   98	  IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | pad-rootfs | append-metadata
   99	  DTC_FLAGS += -@ --space 32768
  100	endef
  101	TARGET_DEVICES += bananapi_bpi-r3

All code for partition should be modified.( According to issus #11760 in https://github.com/openwrt/openwrt/issues/11760 @sinovip).

Do you compile in docker ubuntu host (the issue above points to it)? Sinovoip does not fix any problems in upstream openwrt…

No, my host system is ubuntu20.04lts x64 with kernel 5.19.

Yes, he doesn’t fix up. I just followed the community suggestion in this issue, cancelled ‘ramdisk’ configuration in ‘make menuconfig’.

What the issue talk about is similar to the trouble I met.

I used the official openwrt source code, but failed to make.

DEVICE_ID="bananapi_bpi-r3" SOURCE_DATE_EPOCH=1691851547 FILE_NAME="openwrt-mediatek-filogic-bananapi_bpi-r3-nor-bl31-uboot.fip" FILE_DIR="/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp" FILE_TYPE="nor-bl31-uboot.fip" DEVICE_IMG_PREFIX="openwrt-mediatek-filogic-bananapi_bpi-r3" DEVICE_VENDOR="Bananapi" DEVICE_MODEL="BPi-R3" DEVICE_VARIANT="" DEVICE_ALT0_VENDOR="" DEVICE_ALT0_MODEL="" DEVICE_ALT0_VARIANT="" DEVICE_ALT1_VENDOR="" DEVICE_ALT1_MODEL="" DEVICE_ALT1_VARIANT="" DEVICE_ALT2_VENDOR="" DEVICE_ALT2_MODEL="" DEVICE_ALT2_VARIANT="" DEVICE_ALT3_VENDOR="" DEVICE_ALT3_MODEL="" DEVICE_ALT3_VARIANT="" DEVICE_ALT4_VENDOR="" DEVICE_ALT4_MODEL="" DEVICE_ALT4_VARIANT="" DEVICE_ALT5_VENDOR="" DEVICE_ALT5_MODEL="" DEVICE_ALT5_VARIANT="" DEVICE_TITLE="Bananapi BPi-R3" DEVICE_PACKAGES="kmod-hwmon-pwmfan kmod-i2c-gpio kmod-mt7986-firmware kmod-sfp kmod-usb3 e2fsprogs f2fsck mkf2fs mt7986-wo-firmware" TARGET="mediatek" SUBTARGET="filogic" VERSION_NUMBER="SNAPSHOT" VERSION_CODE="r23721-16c37ba913" SUPPORTED_DEVICES="bananapi,bpi-r3" /home/yoki/openwrt/scripts/json_add_image_info.py /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/json_info_files/openwrt-mediatek-filogic-bananapi_bpi-r3-nor-bl31-uboot.fip.json
cp /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.tmp 2>/dev/null || true
ptgen -g -o /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.tmp -a 1 -l 1024  -H -t 0x83	-N bl2		-r	-p 4079k@17k  -t 0x83	-N ubootenv	-r	-p 512k@4M -t 0x83	-N factory	-r	-p 2M@4608k -t 0xef	-N fip		-r	-p 4M@6656k -N recovery	-r	-p 32M@12M  -N install	-r	-p 20M@44M -t 0x2e -N production		-p 1024M@64M  
part 17 4079
part 4096 512
part 4608 2048
part 6656 4096
part 12288 32768
part 45056 20480
part 65536 1048576
17408
4176896
4194304
524288
4718592
2097152
6815744
4194304
12582912
33554432
46137344
20971520
67108864
1073741824
cat /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.tmp >> /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
rm /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.tmp
dd if=/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=17k conv=sync
1+0 records in
1+0 records out
17408 bytes (17 kB, 17 KiB) copied, 0.000141462 s, 123 MB/s
mv /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
cat /home/yoki/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/mt7986-sdmmc-ddr4-bl2.img >> /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
dd if=/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=6656k conv=sync
0+1 records in
1+0 records out
6815744 bytes (6.8 MB, 6.5 MiB) copied, 0.00738853 s, 922 MB/s
mv /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
cat /home/yoki/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/mt7986_bananapi_bpi-r3-sdmmc-u-boot.fip >> /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
dd if=/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=12M conv=sync
0+1 records in
1+0 records out
12582912 bytes (13 MB, 12 MiB) copied, 0.0130452 s, 965 MB/s
mv /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
cp "/home/yoki/openwrt/bin/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb" "/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta"
fwtool -s /dev/null -t "/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" || :
Data not found
fwtool -i /dev/null -t "/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" || :
Data not found
mkdir -p "/home/yoki/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image"
dd if="/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" of="/home/yoki/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb"
487168+0 records in
487168+0 records out
249430016 bytes (249 MB, 238 MiB) copied, 1.5453 s, 161 MB/s
dd if="/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" >> "/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz"
487168+0 records in
487168+0 records out
249430016 bytes (249 MB, 238 MiB) copied, 1.35503 s, 184 MB/s
rm "/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta"
bash: line 1: 8: Bad file descriptor
dd if=/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=44M conv=sync
dd: failed to open '/home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz': No such file or directory
make[5]: *** [Makefile:43: /home/yoki/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz] Error 1
make[5]: Leaving directory '/home/yoki/openwrt/target/linux/mediatek/image'
make[4]: *** [Makefile:18: install] Error 2
make[4]: Leaving directory '/home/yoki/openwrt/target/linux/mediatek'
make[3]: *** [Makefile:11: install] Error 2
make[3]: Leaving directory '/home/yoki/openwrt/target/linux'
time: target/linux/install#1387.23#55.20#1154.86
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:30: target/linux/install] Error 1
make[2]: Leaving directory '/home/yoki/openwrt'
make[1]: *** [target/Makefile:24: /home/yoki/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.target_install] Error 2
make[1]: Leaving directory '/home/yoki/openwrt'
make: *** [/home/yoki/openwrt/include/toplevel.mk:232:world] 错误 2

It will be fine if I run make menuconfig and cancel ramdisk in target image.