Hello,
i am currently investigating why the very first boot processes after flashing a new firmware take much longer than the boots afterwards and why a firstboot sometimes takes different lengths of time on the same device.
I am using a 8devices Carambola2 DVK and flashing OpenWrt 23.05.2.
Firstboot: 150 seconds
Secondboot: 70 seconds
The times are measured from connecting the power supply to the first ping answer.
The update is made via the luci webinterface.
When i compare the bootlog of the first and the following boot processes i notice a difference regarding jffs2.
Firstboot:
[ 0.000000] Kernel command line: console=ttyATH0,115200 rootfstype=squashfs,jffs2
[ 0.337794] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 14.053569] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[ 105.677955] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[ 105.683434] jffs2_build_filesystem(): unlocking the mtd device...
[ 105.691453] jffs2_build_filesystem(): erasing all blocks after the end marker...
[ 148.574577] jffs2: notice: (1829) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
Secondboot:
[ 0.000000] Kernel command line: console=ttyATH0,115200 rootfstype=squashfs,jffs2
[ 0.337794] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 14.119342] jffs2: notice: (600) jffs2_build_xattr_subsystem: complete building xattr subsystem, 7 of xdatum (0 unchecked, 1 orphan) and 8 of xref (1 dead, 0 orphan) found.
[ 14.136240] mount_root: switching to jffs2 overlay
Is jffs2 the reason for the difference as the flash memory is scanned?
Is there anything i could do to speed up the firstboot?