Hi all,
I have been at this for some days and am quite stuck. I have read all of the documentation I can get my hands on and cannot figure out a configuration that works or if it’s even possible. The documentation is a bit ambiguous at times.
I have an Orin Agx that I want to boot from USB for kernel development. Getting it to boot from USB has not been a problem and I have come up with multiple configurations that work for achieving this with both my own partition configurations as well as default ones. My problem is that I cannot seem to get the system to use the kernel in /boot on my rootfs device, ie. I want to boot the kernel in /dev/sda1/boot/, setting of extlinux.conf naturally is done but not matter what I do I cannot get the device to boot my kernel with an identifiable LOCALVERSION. As it seems that the kernel is always booted from a kernel partition (either on the eMMC or on the USB, ie. sda2). If I remove all kernel partitions from my spi and external device configurations then the device fails to boot. I was hoping that in such a situation the bootloader would default to /boot on the rootfs.
A minimal example of what I ideally would like to work where there is only a single kernel and that is located on the root disk in /boot would be using the two commands for creating a boot USB from the host machine and then flashing the board.
sudo BOARDID=3701 BOARDSKU=0000 FAB=TS4 ./tools/kernel_flash/l4t_initrd_flash.sh --external-only -c rootdisk/rootfs_1_partition.xml --external-device sda1 --direct sdd jetson-agx-orin-devkit external
With the partition configuration being
<partition_layout version=“01.00.0000”>
<!-- IMPORTANT!!! --> <partition name="master_boot_record" type="protective_master_boot_record"> <allocation_policy> sequential </allocation_policy> <filesystem_type> basic </filesystem_type> <size> 512 </size> <file_system_attribute> 0 </file_system_attribute> <allocation_attribute> 8 </allocation_attribute> <percent_reserved> 0 </percent_reserved> <description> **Required.** Contains protective MBR. </description> </partition> <partition name="primary_gpt" type="primary_gpt"> <allocation_policy> sequential </allocation_policy> <filesystem_type> basic </filesystem_type> <size> 19968 </size> <file_system_attribute> 0 </file_system_attribute> <allocation_attribute> 8 </allocation_attribute> <percent_reserved> 0 </percent_reserved> <description> **Required.** Contains primary GPT of the `external` device. All partitions defined after this entry are configured in the kernel, and are accessible by standard partition tools such as gdisk and parted. </description> </partition> <!-- Root Filesystem Partition (APP) --> <partition name="APP" id="1" type="data"> <allocation_policy> sequential </allocation_policy> <filesystem_type> basic </filesystem_type> <size> APPSIZE </size> <file_system_attribute> 0 </file_system_attribute> <allocation_attribute> 0x8 </allocation_attribute> <align_boundary> 4096 </align_boundary> <percent_reserved> 0 </percent_reserved> <filename> APPFILE </filename> <unique_guid> APPUUID </unique_guid> <description> Contains the root filesystem with kernel and initrd in /boot. </description> </partition> <!-- Secondary GPT (optional but recommended) --> <partition name="secondary_gpt" type="secondary_gpt"> <allocation_policy> sequential </allocation_policy> <filesystem_type> basic </filesystem_type> <size> 0xFFFFFFFFFFFFFFFF </size> <file_system_attribute> 0 </file_system_attribute> <allocation_attribute> 8 </allocation_attribute> <percent_reserved> 0 </percent_reserved> <description> **Required.** Contains secondary GPT of the `external` device. </description> </partition> </device>
</partition_layout>
Then flashing the device using the default qspi configuration “flash_t234_qspi.xml”
./flash.sh -r -c flash_t234_qspi.xml --no-systemimg jetson-agx-orin-devkit sda1
This leads to a non-bootable configuration, adding a kernel, kernel-dtb alongside the APP in the rootfs partition configuration will make the system boot but running the kernel from the kernel partition. Thus far this is my best solution, although being a basic partition I cannot mount it to adjust the kernel Image.
Any help would be greatly appreciated!
Cheers,
Alex