Initrd flash single partition issue

Hi everyone.

I am trying to reflash the kernel device-tree partition on the external NVMe device after some updates for my Jetson NX. I am using Jetpack 4.6. I am on the module that has an internal eMMC, which I am not using right now (not for booting nor storage).

While booting after initially flashing works fine, I wanted to update just the kernel dtb partition and using initrd flash to add some devices. The problem is that when I follow Workflow 8 of the README. The device is unable to boot afterwards, as it is not able to find a partition to mount (by uuid).

If I put the actual NVMe partition as argument (unlike Workflow 8 suggests), then (all) my partition(s) get reset. Most hurtfully the rootfs and I have to reinitialize everything.

So executing

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1 -c flash_nvme_GP-GSM2NE3512GNTD_512gb.xml -S 128GiB --external-only --showlogs -k kernel-dtb jetson-nx-customdtb mmcblk0p1

makes the PART UUID error appear-

and

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1 -c flash_nvme_GP-GSM2NE3512GNTD_512gb.xml -S 128GiB --external-only --showlogs -k kernel-dtb jetson-nx-customdtb nvme0p1

will reflash everything. The customdtb config is just the same as the base eMMC config with the new device-tree.

Any ideas or workarounds?

Thanks

Hi,

There is a bug in initrd_flash individual partition. You will need to add below into tools/kernel_flash/l4t_flash_from_kernel.sh

function do_write_APP
{
                local item="${1}"
                local external="${2}"
                local count="${3}"
                local file_image
                local sha1_file
                local sha1_chksum=
                local APP_partition=
                local device_type=
                local disk=
                local part_name
                local tool=mkfs.ext4
                local location=""
                local name=
                local ext=
 
                device_type=$(echo "$item" | cut -d, -f 2 | sed 's/^ //g' - | cut -d: -f 1)
 
                part_name=$(echo "${item}" | cut -d, -f 2 | sed 's/^ //g' - | cut -d: -f 3)
 
                if [ -n "${target_partname}" ] && [ "${target_partname}" != "${part_name}" ]; then
                                echo "Skip writing ${part_name}"
                                return
                fi

In particular, you will need to add the below lines into do_write_APP function

1 Like

Thank you very much. I’ll add the fix later. :)

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