[Solved] ImageBuilder x86_64 skip creating unnecessary files

ouch! vm io bottlenecks mostly... smaller rootfs size (or faster disks) will help you most...

try this on for size...

sed -i 's/CONFIG_TARGET_ROOTFS_SQUASHFS=y//g' ./.config
mkdir -p packages
cp -a ./dl/*.ipk ./packages/
no-sudo

note: you shouldn't be using sudo here...

build@d07b9eb1cf0d:~/openwrt$ sudo make clean
rm -rf /home/build/openwrt/tmp /home/build/openwrt/dl /home/build/openwrt/build_dir/target-x86_64_musl/root-x86 /home/build/openwrt/bin/targets/x86/64
build@d07b9eb1cf0d:~/openwrt$ time sudo make image ...

next time you unpack a fresh image builder don't use it... ( but your current ib will likely be broken if you don't )

i think your disk is failing or you hypervisor is panicking because this aint right...

3221225472 bytes (3.2 GB, 3.0 GiB) copied, 162.673 s, 19.8 MB/s

your typical 200MB/s+ is massively constrained here...

this is the end stage from my community build with 300+ packages added no-squashfs and pre-downloaded ipks copied to packages, 1GB rootfs;

Disabling nft-qos
Enabling nlbwmon
Enabling ntop
Disabling nut-server
Enabling odhcpd
Disabling open-iscsi
Enabling openvpn
Enabling persistentdata
Enabling persistentlucistatistics
imagebuilder
Enabling persistentnlbwmon
Disabling pservice
Disabling quagga
Enabling rngd
Enabling rpcd
Disabling rssileds
Disabling simple-adblock
Disabling snmpd
Disabling socat
Disabling sqm
Enabling sysctl
Enabling sysfixtime
Enabling sysntpd
Enabling system
Disabling travelmate
Enabling ucitrack
Enabling uhttpd
Enabling umount
Enabling urandom_seed
Enabling usbmode
Disabling vpn-policy-routing
Disabling watchcat
Enabling wpad
Disabling xinetd
Disabling zerotier

Building images...
Creating filesystem with parameters:
    Size: 1006632960
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7680
    Inode size: 256
    Journal blocks: 0
    Label: rootfs
    Blocks: 245760
    Block groups: 8
    Reserved blocks: 0
    Reserved block group size: 63
Created filesystem with 11906/61440 inodes and 58180/245760 blocks
mkfs.fat: Warning: lowercase labels might not work properly on some systems
mkfs.fat 4.2 (2021-01-31)
+ [ 5 -eq 5 ]
+ OUTPUT=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz
+ BOOTFS=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz.boot
+ ROOTFS=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/root.ext4
+ BOOTFSSIZE=384
+ ROOTFSSIZE=960
+ head=4
+ sect=63
+ ptgen -o /fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz -h 4 -s 63 -l 4096 -t c -p 384M -t 83 -p 960M -S 0x10022301
part 0 393216
part 0 983040
+ set 4194304 402653184 411041792 1006632960
+ BOOTOFFSET=8192
+ BOOTSIZE=786432
+ ROOTFSOFFSET=802816
+ ROOTFSSIZE=1966080
+ dd bs=512 if=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz.boot of=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz seek=8192 conv=notrunc
786432+0 records in
786432+0 records out
402653184 bytes (403 MB, 384 MiB) copied, 1.39888 s, 288 MB/s
+ dd bs=512 if=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/root.ext4 of=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz seek=802816 conv=notrunc
1966080+0 records in
1966080+0 records out
1006632960 bytes (1.0 GB, 960 MiB) copied, 3.74176 s, 269 MB/s
mkfs.fat: Warning: lowercase labels might not work properly on some systems
mkfs.fat 4.2 (2021-01-31)
+ [ 5 -eq 5 ]
+ OUTPUT=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-sysupgrade.img.gz
+ BOOTFS=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-sysupgrade.img.gz.boot
+ ROOTFS=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/root.ext4
+ BOOTFSSIZE=384
+ ROOTFSSIZE=960
+ head=4
+ sect=63
+ ptgen -o /fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-sysupgrade.img.gz -h 4 -s 63 -l 4096 -t c -p 384M -t 83 -p 960M -S 0x10022301
part 0 393216
part 0 983040
+ set 4194304 402653184 411041792 1006632960
+ BOOTOFFSET=8192
+ BOOTSIZE=786432
+ ROOTFSOFFSET=802816
+ ROOTFSSIZE=1966080
+ dd bs=512 if=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-sysupgrade.img.gz.boot of=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-sysupgrade.img.gz seek=8192 conv=notrunc
786432+0 records in
786432+0 records out
402653184 bytes (403 MB, 384 MiB) copied, 1.39779 s, 288 MB/s
+ dd bs=512 if=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/root.ext4 of=/fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-sysupgrade.img.gz seek=802816 conv=notrunc
1966080+0 records in
1966080+0 records out
1006632960 bytes (1.0 GB, 960 MiB) copied, 3.85762 s, 261 MB/s
cp /fs/sdd1/openwrt/RTNGext/ibminiSINGLE/rpi-4/binout/rpi-4_snapshot_20211001-1204-5/bootfiles.tar.gz /fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-special.tar.gz-fw
cp /fs/sdd1/openwrt/RTNGext/ibminiSINGLE/rpi-4/binout/rpi-4_snapshot_20211001-1204-5/*-rpi-4-rootfs.tar.gz /fs/sdd1/openwrt/RTNGext/ibminiSINGLE/r17637_somesmallstufflast5.10.64/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-ext4-special.tar.gz-fw

Calculating checksums...

###############  build success  ############## 173

173 seconds = 3mins... notice the io around 200MB/s +

3 Likes