Create custom bootable system.img
  • 20 Apr 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Create custom bootable system.img

  • Dark
    Light
  • PDF

Article Summary

Demo image (system.img)

There are two step to do:

  1. Prepare files
  2. create system.img

1. Prepare files

  • kernel Image
  • kernel modules
  • kernel dts
  • u-boot.bin (Nano only)
  • cboot.bin (Xavier-NX only)
  • pinmux (Xavier NX only)
  • change boot config for custom device-tree(overlay)



kernel Image

Copy from:

<nvidia_folder>/Linux_for_Tegra/sources/kernel/kernel-4.9/arch/arm64/boot/Image

to here

<nvidia_folder>/Linux_for_Tegra/kernel/

kernel modules

Copy from

<nvidia_folder>/Linux_for_Tegra/sources/kernel/modules/lib/

to here

<nvidia_folder>/Linux_for_Tegra/rootfs/

device-tree

Copy from

<nvidia_folder>/Linux_for_Tegra/sources/kernel/kernel-4.9/arch/arm64/boot/dts/<target>.dtb 

to here

<nvidia_folder>/Linux_for_Tegra/rootfs/boot/<target>.dtb

u-boot.bin (Nano only)

Copy from

<nvidia_folder>/Linux_for_Tegra/sources/u-boot/u-boot.bin

to here

<nvidia_folder>/Linux_for_Tegra/bootloader/t210ref/p3450-0000/u-boot.bin

cboot.bin (Xavier-NX only)

Copy from

<nvidia_folder>/Linux_for_Tegra/sources/cboot/out/build-t194/lk.bin

to here

<nvidia_folder>/Linux_for_Tegra/bootloader/cboot_t194.bin

pinmux (Xavier NX only)

Copy

tegra19x-mb1-pinmux-p3668-a01.cfg

to here

<nvidia_folder>/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-pinmux-p3668-a01.cfg

boot config for custom device-tree

<nvidia_folder>/Linux_for_Tegra/rootfs/boot/extlinux/extlinux.conf
LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
+     FDT /boot/<target>.dtb
-     APPEND ${cbootargs} quiet
+     APPEND ${cbootargs} 
Only Nano support device-tree overlay(FDTOVERLAYS)
LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      FDT /boot/<target>.dtb
+     FDTOVERLAYS /boot/<target_overlay>.dtbo
      APPEND ${cbootargs} 

2. create system.img

$ sudo ./flash.sh --no-flash <board> mmcblk0p1

or flashing into device using

$ sudo ./flash.sh <board> mmcblk0p1

Was this article helpful?