L4t_initrd_flash.sh --network option doubles size of massflash package

The massflash package contains a redundant copy of the rootfs when the --network flag is passed, in addition to the system.img which is a tarball containing the rootfs contents. This effectively doubles the size of the package to over 7 GB with the sample filesystem.

(Only system.img contains the DTB and extlinux.conf, but otherwise the two are identical.)

During the flashing process, the rootfs directory is exported over NFS, and the system.img tarball is also accessed over an NFS mountpoint.

It seems unnecessary to have two copies: The device could simply extract whatever files it needs from system.img. Alternatively, a purely host-side improvement is to have the flash script expand the tarball temporarily before flashing.

The rootfs directory is created in l4t_initrd_flash_internal.sh, here:

package()
{
    ...
    cp -a "${L4T_INITRD_FLASH_DIR}"/* "${temp_kernelflash}"
    cp "${LINUX_BASE_DIR}/${target_board}.conf" "${workdir}/"
    cp "${LINUX_BASE_DIR}/"*.common "${workdir}/"
    if [ -n "${network}" ]; then
        cp -a "${LINUX_BASE_DIR}/rootfs" "${workdir}/"
    fi
}

This report is based off of r35.6.2.

Thank you! We will make change to improve in the future.

1 Like