[BananaPi BPI-R3] - There is a way to use ext4?

Hi,

I'm trying to compile a custom image for BPI-R3, but cant get a ext4 image. Even if i Select Ext4 on "target images" its not build. And the partition size is not working too. Always getting a 24Mb build..
Any clues?

It would help if you posted your build error message along with the steps you undertook to compile the image...

I'm not getting error if i select Squashfs and Ext4...But the Ext4 image is not builded, even if selected on "Target Images", it only build squasfs images, The compile error comes when only ext4 is selected.

And the Root "filesystem partition size", is not working as well, the image is build with 24 Mb (i selected 1024)

When i select only Ext4 on "target images", i get:

 Default Configuration: 'config-mt7986a-bananapi-bpi-r3'
 Configuration 0 (config-mt7986a-bananapi-bpi-r3)
  Description:  OpenWrt bananapi_bpi-r3
  Kernel:       kernel-1
  Init Ramdisk: initrd-1
  FDT:          fdt-1
 Configuration 1 (config-mt7986a-bananapi-bpi-r3-nor)
  Description:  OpenWrt bananapi_bpi-r3 with mt7986a-bananapi-bpi-r3-nor
  Kernel:       kernel-1
  Init Ramdisk: initrd-1
  FDT:          fdt-1
                fdt-mt7986a-bananapi-bpi-r3-nor
 Configuration 2 (config-mt7986a-bananapi-bpi-r3-emmc-nor)
  Description:  OpenWrt bananapi_bpi-r3 with mt7986a-bananapi-bpi-r3-emmc-nor
  Kernel:       kernel-1
  Init Ramdisk: initrd-1
  FDT:          fdt-1
                fdt-mt7986a-bananapi-bpi-r3-emmc-nor
 Configuration 3 (config-mt7986a-bananapi-bpi-r3-emmc-snand)
  Description:  OpenWrt bananapi_bpi-r3 with mt7986a-bananapi-bpi-r3-emmc-snand
  Kernel:       kernel-1
  Init Ramdisk: initrd-1
  FDT:          fdt-1
                fdt-mt7986a-bananapi-bpi-r3-emmc-snand
 Configuration 4 (config-mt7986a-bananapi-bpi-r3-snand)
  Description:  OpenWrt bananapi_bpi-r3 with mt7986a-bananapi-bpi-r3-snand
  Kernel:       kernel-1
  Init Ramdisk: initrd-1
  FDT:          fdt-1
                fdt-mt7986a-bananapi-bpi-r3-snand
dd if=/home/piradopirata/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb of=/home/piradopirata/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb.new bs=64k conv=sync
156+1 records in
157+0 records out
10289152 bytes (10 MB, 9.8 MiB) copied, 0.0059346 s, 1.7 GB/s
mv /home/piradopirata/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb.new /home/piradopirata/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb
cp /home/piradopirata/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb /home/piradopirata/openwrt/bin/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb
DEVICE_ID="bananapi_bpi-r3" SOURCE_DATE_EPOCH=1674298523 FILE_NAME="openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb" FILE_DIR="/home/piradopirata/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp" FILE_TYPE="kernel" FILE_FILESYSTEM="initramfs" 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_TITLE="Bananapi BPi-R3" DEVICE_PACKAGES="kmod-hwmon-pwmfan kmod-i2c-gpio kmod-sfp kmod-usb3 e2fsprogs f2fsck mkf2fs" TARGET="mediatek" SUBTARGET="filogic" VERSION_NUMBER="SNAPSHOT" VERSION_CODE="r21878-6e3acebe35" SUPPORTED_DEVICES="bananapi,bpi-r3" /home/piradopirata/openwrt/scripts/json_add_image_info.py /home/piradopirata/openwrt/build_dir/target-aarch64_cortex-a53_musl/json_info_files/openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb.json
cat /home/piradopirata/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/mt7986-emmc-ddr4-bl2.img >> /home/piradopirata/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-emmc-preloader.bin
cat /home/piradopirata/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/mt7986_bananapi_bpi-r3-emmc-u-boot.fip >> /home/piradopirata/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-emmc-bl31-uboot.fip
cat /home/piradopirata/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/mt7986-nor-ddr4-bl2.img >> /home/piradopirata/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-nor-preloader.bin
cat /home/piradopirata/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/mt7986_bananapi_bpi-r3-nor-u-boot.fip >> /home/piradopirata/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-nor-bl31-uboot.fip
Makefile:31: *** Missing Build/.  Stop.
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory '/home/piradopirata/openwrt/target/linux/mediatek/image'
make[4]: *** [Makefile:17: install] Error 2
make[4]: Leaving directory '/home/piradopirata/openwrt/target/linux/mediatek'
make[3]: *** [Makefile:11: install] Error 2
make[3]: Leaving directory '/home/piradopirata/openwrt/target/linux'
time: target/linux/install#25.26#67.21#65.09
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:30: target/linux/install] Error 1
make[2]: Leaving directory '/home/piradopirata/openwrt'
make[1]: *** [target/Makefile:24: /home/piradopirata/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.target_install] Error 2
make[1]: Leaving directory '/home/piradopirata/openwrt'
make: *** [/home/piradopirata/openwrt/include/toplevel.mk:231: world] Error 2

The kernel failed to compile, but you didn't copy enough output to see the actual error message.

Edit: OK, you edited your post to contain the error. Sorry, I can't help you with this, looks like a missing Build setting or maybe a change to the Makefile for your device is required.

1 Like

Images with ext4 rootfs are supported in OpenWrt mostly for development purposes. Normal users as well as device makers will usually use a read-only rootfs. Pre-boot image validation, reset-to-factory-settings and failsafe mode are essential features of OpenWrt which can only work with a read-only rootfs.

The only case in which ext4 (or jffs2 or ubifs) read-write rootfs should be used is when working on development of pre-init userland in OpenWrt.

As this board supports many different boot devices and not all of them support ext4, only squashfs + overlay is supported (as ext4 anyway cannot work on SPI-NAND or SPI-NOR flash).

1 Like

I would be surprised if this works, as the partition size is determined by the installation medium. Ie. this should be step 1 and you should be using the resulting SD card image to install to NAND, and then from NAND to eMMC. Only in this way the changed partition size will be applied to the partitions on the eMMC. sysupgrade image does not contain a partition table, so it will not change the partition size.

You are right, forgot something. From a NAND install i did a 'dd' copy sdcard img to emmc with a bigger partition size. Srry.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.