Skip to content

Complete JetPack 7.2.1 migration and port Orin fast boot - #109

Open
AlexKlimaj wants to merge 10 commits into
mainfrom
pr-jetpack-7.2
Open

AlexKlimaj wants to merge 10 commits into
mainfrom
pr-jetpack-7.2

Conversation

@AlexKlimaj

@AlexKlimaj AlexKlimaj commented Jul 20, 2026

Copy link
Copy Markdown
Member

Completes the JetPack 7.2.1 / L4T R39.2.1 migration and ports the opt-in Orin fast-boot workflow from #137 to JAJ, PAB and PAB_V3. The image uses Ubuntu 24.04, the 6.8.12-1021-tegra kernel and a native Noble/Python 3.12 ARK-OS package.

Changes

  • Add an independently pinned R39 reduced UEFI profile, release-matched firmware staging, and a guarded fix that selects its embedded launcher ahead of preserved stock boot entries. TPM, Secure Boot support, persistent OP-TEE variables and ESRT/FMP remain enabled. Linux retains JAJ's FFC PCIe port.
  • Port guarded initrd indexing/polling, optional BPMP debugfs scheduling, headless startup, early ARK API startup, and the audited USB/coldplug/logging options to R39/Noble. Preserve R39 GPU initialization and release-specific R36 checks.
  • Build the pinned ARK-OS source for Noble instead of installing a Jammy Python environment; install native R39 camera packages without rewriting their ABI dependencies.
  • Build/check both NVIDIA GPU backends, install the matching Image/modules/DTBs/initrd, and synchronize prepared kernel headers/config/export CRCs while preserving native ARM build tools.
  • Fix R39 first-boot service/updater paths, restore the original resolver after chroot provisioning, validate camera plugins against the staged GPU backend, and require an SSH identification banner after flashing. Protect cleanup from leaked mounts and gate CI builds/releases on helper validation.
  • Enable compressed Zstandard firmware loading for Noble’s radio firmware, and retain Realtek-first loading while allowing generic btusb to bind the Qualcomm controller. Apply NVIDIA’s configured GPU power policy before DRM and early ARK GPU probes; preserve the selected mode and fail visibly with bounded startup calls.
  • Fix cold-boot races found on hardware: order USB runtime setup after gadget/bridge creation without blocking udev, and pin nginx upstreams to the IPv4 addresses where the ARK services listen.
  • Build the Noble application natively for release images and validate its provenance before provisioning. Support CI’s external staging mount and generate device header links relative to the canonical rootfs.

Validation

The connected JAJ (Orin NX 16GB/NVMe) was fully flashed with the corrected R39 image, then bootloader slot A was updated with the corrected reduced UEFI. Stock slot B and the working NVMe OS were preserved during the A-only firmware tests. Three final cold boots passed, with these power-on times:

Endpoint Earlier stock R39 UEFI baseline Final reduced UEFI + corrected OS (3 runs)
UART terminal 22.636 s 15.808–16.184 s
Local ARK HTTP/JSON 20.318 s 13.541–14.066 s
Populated ARK Jetson metadata 25.282 s 18.771–19.006 s
Host SSH banner 22.512 s 12.441–15.856 s
Host HTTP/JSON 22.405 s 13.579–16.418 s

The under-10-second target is not achieved. The app's first jtop connection is gated until kernel uptime 10 seconds; populated metadata therefore follows generic HTTP. No camera is connected.

Timing starts at the Rigol power-on command and includes approximately two seconds of board POR; the electrical edge was not scoped. An SSH banner is not an authenticated terminal. “Populated metadata” is the ARK-OS stand-in check, not camera/inference qualification. The earlier stock-UEFI capture used the same corrected kernel and fast profile before the final USB/nginx race fixes, so the comparison is a measured total change rather than an isolated per-patch attribution.

The first reduced firmware stalled before Linux. Physical recovery, a guarded embedded-launcher boot-order correction and an A-only reflash recovered it. A later repeat exposed USB runtime starting before its bridge and nginx resolving localhost to an IPv6 address without a listener; both were fixed in source and on the device before the final repeat set. Failed captures are retained in the R39 validation record.

Actual hardware checks passed for CUDA integer-kernel execution, native external-module compile/load/unload against the prepared headers, configured GPU power policy, NVIDIA boot validation, WiFi firmware loading, Qualcomm Bluetooth registration, and camera-plugin loading. JAJ's Linux FFC controller is enabled and bound; the connector is empty. Temporary timing probes, diagnostic helpers and the shutdown hook were removed; ARK HTTP and populated metadata remain healthy. Kernel logging persists through rsyslog. The only failed service is MAVLink router, whose external FMU is absent.

  • Full JAJ kernel, IMX708/OOT drivers, both GPU backends, DTBs and optimized initrd build passed.
  • All 282 helper regressions passed in Ubuntu 22.04 with systemd 249 and no skips. The dependency-ordering check also passed with systemd 255, rejects an intentional cycle on both versions, and the generated units passed native verification on the JAJ.
  • Target kmod 31 resolves the generated storage/camera module indexes; final prepared headers and staged firmware pass integrity checks.
  • PAB/PAB_V3: all 20 normal/Super SKU DTBs built in isolated trees; default and alternative camera overlays merge and C7 remains disabled. These are DT checks, not PAB hardware/camera qualification.
  • No camera or external ARK FMU is attached to the JAJ fixture. Camera capture/inference and telemetry transport are untested; software availability and the independent CUDA compute check are recorded separately.

Original startup time and measured improvement breakdown (R36 history)

The customer initially reported over 50 seconds. The first instrumented R36 cold baseline was 33.371 seconds to SSH. HTTP was not captured on that baseline. The following comparisons explain the earlier 13.885–14.071-second local ARK-OS API result; they are historical R36 observations, not R39 measurements. Times start at the Rigol power-on command and include the approximately two-second board POR delay.

Improvement/comparison Same endpoint before → after Observed saving
Reduced NVMe UEFI + quiet early firmware Cold SSH 33.371 → 23.216 s 10.155 s combined
Kernel quiet + precomputed initrd + utmp/headless/no-LVM changes Cold SSH 23.216 → 17.952 s; host API 23.356 → 18.711 s 5.264 s SSH; 4.645 s API combined
Native USB runtime calls + confirmed non-LVM configuration Cold SSH 16.896 → 15.163 s; host API 16.948 → 15.277 s ~1.73 s SSH; ~1.67 s API combined
Explicitly approved temporary no-TPM experiment UART ExitBootServices 6.989 → 6.501 s ~0.488 s firmware stage only; TPM restored
Asynchronous BPMP debugfs, matched kernel/initrd and temporary no-TPM firmware Cold local API 15.045 → 13.885 / 14.071 s ~1.16 / ~0.97 s
Logging + ESP automount diagnostic Cold local API 14.071 → 13.890 s; host API 16.897 → 13.947 s ~0.18 s local; 2.950 s host combined

The firmware's ESRT/FMP correctness repair and subsequent repeat captures moved SSH from 17.952 → 17.592 → 16.896 s; no optimization saving is assigned to that repair. The initial reduced firmware was superseded by the corrected implementation.

The individual OS changes were also explored with warm reboot-command-to-SSH observations (including shutdown and host network recovery):

Cumulative warm step SSH time Change from previous warm observation
Baseline 37.235 s
Kernel quiet + UEFI timeout 5 → 0 30.976 s 6.259 s
Known utmp delay + LVM wait experiment 29.233 s ~1.74 s
Precomputed initrd 25.607 s 3.626 s
Headless default target 25.201 s ~0.41 s

These rows are not additive independent savings and warm results must not be mixed with cold results. Later R36 tuning reached generic local API availability around 11.2–11.4 s and final UART shells in 12.582–12.618 s. A stronger ARK-OS metadata criterion took 17.636 s because the installed application's jtop connection was delayed until kernel uptime 10 s. The historical sub-10-second target was not achieved. Full methods, caveats and later comparisons are in the R36 validation record.

Port the tree from L4T R36.5.0 / JetPack 6.2.2 to L4T R39.2.1 / JetPack 7.2.1
(kernel 6.8, Ubuntu 24.04 rootfs, Crosstool-NG gcc 13.2). Rebased onto current
main. Camera/multimedia debs moved from the t234 pool to som on R39; the
Argus 36.4.4 pin is JP6-only and is replaced with the matching 39.2.1 stamp.
JetPack 7 / kernel-noble dropped gpio_cansleep, changed i2c_driver.probe
to take only the client, and made i2c_driver.remove return void. Match
NVIDIA's nv_imx219 compat macros so the overlay still builds on 5.15 and 6.8.
R39 public_sources adds nvidia_unified_gpu_display_driver_source.tbz2
(unifiedgpudisp). Skipping it makes `make modules` fail, which also
skipped `make dtbs`. R39 writes DTBs to
build/nvidia-public/devicetree/generic-dtbs, not the R36
kernel-devicetree path — so kernel/dtb never received the ARK camera
overlays and flash.sh aborted.
@AlexKlimaj

Copy link
Copy Markdown
Member Author

Flashed and smoke-tested PAB_V3 from 7c820d5 on an Orin Nano 4GB (3767-300-0004) in recovery.

BSP: L4T R39.2.1 / JetPack 7.2.1, Ubuntu 24.04.4, kernel 6.8.12-1021-tegra

Flash: ./flash.sh PAB_V3 (NVMe + QSPI) succeeded; default IMX219 dual overlay baked in.

USB gadget (0955:7020):

  • RNDIS + ACM + UMS + NCM all present (enable_acm=1)
  • Host /dev/ttyACM0 → on-device serial-getty@ttyGS0
  • Login as jetson on the ACM console works (CONSOLE_OK, tty=/dev/ttyGS0)
  • USB net 192.168.55.1 SSH works

Build notes that were required to get here (already on this branch):

  • IMX708 RidgeRun driver ported to Linux 6.8 I2C/GPIO APIs
  • Extract R39 nvidia_unified_gpu_display_driver_source.tbz2 and install DTBs from devicetree/generic-dtbs

Not provisioned: ARK-OS (no noble package yet). Camera stack is the 39.2.1 stamp, not the JP6 Argus 36.4.4 pin.

@AlexKlimaj AlexKlimaj changed the title Jetpack 7.2 first pass Jetpack 7.2.1 first pass Aug 14, 2026
Port guarded boot firmware, initrd and userspace optimizations to R39/Noble
for JAJ, PAB and PAB_V3. Build a native Noble ARK-OS package, retain native
camera ABI dependencies, and install matched kernel artifacts and headers.

Fix hardware-discovered compressed-firmware, GPU power-order, Bluetooth,
UEFI boot-entry, USB gadget ordering and nginx loopback regressions. Preserve
Linux FFC PCIe support and firmware security/boot-validation components.

Record three successful final JAJ cold boots, remaining readiness limits,
and the historical per-improvement timing breakdown. Under-ten-second boot
has not been achieved; camera and PAB hardware qualification remain open.
@AlexKlimaj AlexKlimaj changed the title Jetpack 7.2.1 first pass Complete JetPack 7.2.1 migration and port Orin fast boot Sep 17, 2026
@AlexKlimaj
AlexKlimaj marked this pull request as ready for review September 17, 2026 23:23
@AlexKlimaj
AlexKlimaj requested a review from dakejahl September 17, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant