How to update kernel on jetpack 4.4 DP?

Hello all,
My board is NX module(emmc)+P3449 and use jetpack 4.4 DP. As the way on Xavier( jetpack4.3), I update the dtb succesfully and work normally. But the kernel updated succesfully and can not boot.
If I copy the new dtb and kernel to jetpack and use flash.sh to flash the whole rootfs, it is work fine. So the dtb and kernel files is Ok.

Hi,

Don’t know what is your old method to update kernel image.
Please just directly copy the Image to device with path /boot/Image.

Yes, I had tested two ways, copy Image to /boot/Image and ./flash.sh -k kerenl p3449-0000+p3668-0001-qspi-emmc mmcblk0p1

Hi,

After jetpack4.4, even Xavier supports to read the kernel image from rootfs and it is enabled by default.

I don’t think the method to use -r -k kernel would still work.

Here is the boot log.

fmon_debugfs_init_one: no clock debugfs node to attach FMON_NAFLL_CLUSTER1
fmon_debugfs initialized
vmon_debugfs initialized
pg_debugfs initialized
profile_fs initialized
debugfs_cons initialized
mail_fs initialized
profile initialized
cvc_debugfs initialized
dmce_debugfs initialized
ec_debugfs initialized
rm_rail_debugfs_init: /rm/vdd_cpu: failed
rm_rail_debugfs_init: /rm/vdd_cpu: failed
rm_debugfs initialized
soctherm_debug initialized
gr_reader initialized
mods initialized
dt_fs initialized
debugfs_mrq initialized
debug_mrq initialized
debug_safereg initialized
initializing target
calling apps_init()
starting app shell
entering main console loop
] ��[0001.345] I> 4) Base:0xf1000000 Size:0x00100000
[0001.490] I> 5) Base:0xf0f00000 Size:0x00100000
[0001.494] I> 6) Base:0xf3800000 Size:0x00400000
[0001.498] I> 7) Base:0xf1c00000 Size:0x00400000
[0001.503] I> 8) Base:0xf0e00000 Size:0x00100000
[0001.507] I> 9) Base:0xf0d00000 Size:0x00100000
[0001.512] I> 10) Base:0xf3000000 Size:0x00800000
[0001.516] I> 11) Base:0x40000000 Size:0x00040000
[0001.521] I> 12) Base:0xf0c00000 Size:0x00100000
[0001.525] I> 13) Base:0x40046000 Size:0x00002000
[0001.530] I> 14) Base:0x40048000 Size:0x00002000
[0001.534] I> 15) Base:0xac000000 Size:0x00004000
[0001.539] I> 16) Base:0x4004a000 Size:0x00002000
[0001.543] I> 17) Base:0xf0b00000 Size:0x00100000
[0001.548] I> 18) Base:0x4004c000 Size:0x00002000
[0001.552] I> 19) Base:0xf2200000 Size:0x00600000
[0001.556] I> 20) Base:0x4004e000 Size:0x00002000
[0001.561] I> 21) Base:0xf09d0000 Size:0x0000c000
[0001.565] I> 22) Base:0x00000000 Size:0x00000000
[0001.570] I> 23) Base:0xf09e0000 Size:0x00020000
[0001.574] I> 24) Base:0xf6000000 Size:0x02000000
[0001.579] I> 25) Base:0x40050000 Size:0x00002000
[0001.583] I> 26) Base:0x40040000 Size:0x00006000
[0001.588] I> 27) Base:0xf1800000 Size:0x00400000
[0001.592] I> 28) Base:0xf4c00000 Size:0x01400000
[0001.597] I> 29) Base:0xf1400000 Size:0x00400000
[0001.601] I> 30) Base:0xf0a00000 Size:0x00100000
[0001.606] I> 31) Base:0x00000000 Size:0x00000000
[0001.610] I> 32) Base:0xf8000000 Size:0x08000000
[0001.614] I> 33) Base:0x00000000 Size:0x00000000
[0001.619] I> 34) Base:0xf3c00000 Size:0x01000000
[0001.623] I> 35) Base:0xab000000 Size:0x01000000
[0001.628] I> 36) Base:0xa0000000 Size:0x0b000000
[0001.632] I> 37) Base:0xf2800000 Size:0x00800000
[0001.637] I> 38) Base:0x80000000 Size:0x20000000
[0001.641] I> 39) Base:0xb0000000 Size:0x08000000
[0001.646] I> 40) Base:0x00000000 Size:0x00000000
[0001.650] I> 41) Base:0x00000000 Size:0x00000000
[0001.655] I> 42) Base:0x00000000 Size:0x00000000
[0001.659] I> 43) Base:0x00000000 Size:0x00000000
[0001.664] I> 44) Base:0x00000000 Size:0x00000000
[0001.668] I> 45) Base:0x00000000 Size:0x00000000
[0001.672] GIC-SPI Target CPU: 0
[0001.675] Interrupts Init done
[0001.678] calling constructors
[0001.681] initializing heap
[0001.684] I> Heap: [0xa06905a8 … 0xab000000]
[0001.688] initializing threads
[0001.691] initializing timers
[0001.694] creating bootstrap completion thread
[0001.698] top of bootstrap2()
[0001.701] CPU: MIDR: 0x4E0F0040, MPIDR: 0x80000000
[0001.706] initializing platform
[0001.709] E> DEVICE_PROD: Invalid value data = 0, size = 0.
[0001.714] W> device prod register failed
[0001.718] I> Bl_dtb @0xaaf00000
[0001.723] E> “plugin-manager” doesn’t exist, creating
[0001.726] E> “ids” doesn’t exist, creating
[0001.730] E> “connection” doesn’t exist, creating
[0001.734] E> “configs” doesn’t exist, creating
[0001.742] I> Find /i2c@3160000’s alias i2c0
[0001.743] I> Reading eeprom i2c=0 address=0x50
[0001.772] I> Device at /i2c@3160000:0x50
[0001.772] I> Reading eeprom i2c=0 address=0x57
[0001.797] I> Device at /i2c@3160000:0x57
[0001.798] I> Find /i2c@c240000’s alias i2c1
[0001.799] I> Reading eeprom i2c=1 address=0x50
[0001.800] E> I2C: slave not found in slaves.
[0001.801] E> I2C: Could not write 0 bytes to slave: 0x00a0 with repeat start true.
[0001.802] E> I2C_DEV: Failed to send register address 0x00000000.
[0001.802] E> I2C_DEV: Could not read 256 registers of size 1 from slave 0xa0 at 0x00000000 via instance 1.
[0001.811] E> eeprom: Retry to read I2C slave device.
[0001.816] E> I2C: slave not found in slaves.
[0001.820] E> I2C: Could not write 0 bytes to slave: 0x00a0 with repeat start true.
[0001.828] E> I2C_DEV: Failed to send register address 0x00000000.
[0001.833] E> I2C_DEV: Could not read 256 registers of size 1 from slave 0xa0 at 0x00000000 via instance 1.
[0001.843] E> eeprom: Failed to read I2C slave device
[0001.847] I> Eeprom read failed 0x3526070d
[0001.851] I> create_pm_ids: id: 3668-0001-200-G, len: 15
[0001.857] I> config: mem-type:00,power-config:00,misc-config:00,modem-config:00,touch-config:00,display-config:00, len: 93
[0001.868] I> create_pm_ids: id: XXXX-XXXX-XXX-X, len: 15
[0001.873] I> config: mem-type:ff,power-config:ff,misc-config:ff,modem-config:ff,touch-config:ff,display-config:ff, len: 93
[0001.884] I> Adding plugin-manager/ids/3668-0001-200=/i2c@3160000:module@0x50
[0001.891] E> “i2c@3160000” doesn’t exist, creating
[0001.895] E> “module@0x50” doesn’t exist, creating
[0001.900] I> Adding plugin-manager/ids/XXXX-XXXX-XXX=/i2c@3160000:module@0x57
[0001.907] E> “module@0x57” doesn’t exist, creating
[0001.913] I> Adding plugin-manager/cvm
[0001.915] E> “chip-id” doesn’t exist, creating
[0001.920] I> Adding plugin-manager/chip-id/A02P
[0001.924] I> Plugin-manager override starting
[0001.929] I> node /plugin-manager/fragment-pcie-c5-rp matches
[0001.937] I> node /plugin-manager/fragement-tegra-wdt-en matches
[0001.942] I> node /plugin-manager/fragement-tegra-sdhci-sd-dis matches
[0001.950] I> Disable plugin-manager status in FDT
[0001.950] I> Plugin-manager override finished successfully
[0001.956] I> gpio framework initialized
[0001.961] I> tegrabl_gpio_driver_register: register ‘nvidia,tegra194-gpio’ driver
[0001.968] I> tegrabl_gpio_driver_register: register ‘nvidia,tegra194-gpio-aon’ driver
[0001.975] I> tegrabl_tca9539_init: i2c bus: 1, slave addr: 0x46
[0001.981] E> fetch_driver_phandle_from_dt: failed to get node with compatible ti,tca9539
[0001.989] E> fetch_driver_phandle_from_dt: failed to get node with compatible nxp,tca9539
[0001.996] W> tegrabl_tca9539_init: failed to fetch phandle from dt
[0002.002] I> tegrabl_tca9539_init: i2c bus: 1, slave addr: 0x44
[0002.009] E> fetch_driver_phandle_from_dt: failed to get node with compatible ti,tca9539
[0002.017] E> fetch_driver_phandle_from_dt: failed to get node with compatible nxp,tca9539
[0002.024] W> tegrabl_tca9539_init: failed to fetch phandle from dt
[0002.031] I> fixed regulator driver initialized
[0002.039] I> register ‘maxim’ power off handle
[0002.040] I> virtual i2c enabled
[0002.042] I> registered ‘maxim,max20024’ pmic
[0002.046] I> tegrabl_gpio_driver_register: register ‘max20024-gpio’ driver
[0002.053] I> Boot-device: QSPI
[0002.056] I> Boot_device: QSPI_FLASH instance: 0
[0002.061] I> QSPI source rate = 204000 Khz
[0002.064] I> Requested rate for QSPI clock = 34000 Khz
[0002.069] I> BPMP-set rate for QSPI clk = 34000 Khz
[0002.074] I> QSPI Flash Size = 32 MB
[0002.077] I> Qspi initialized successfully
[0002.081] I> qspi flash-0 params source = boot args
[0002.086] I> create_pm_ids: id: 3668-0001-200-G, len: 15
[0002.091] I> config: mem-type:00,power-config:00,misc-config:00,modem-config:00,touch-config:00,display-config:00, len: 93
[0002.102] I> create_pm_ids: id: XXXX-XXXX-XXX-X, len: 15
[0002.107] I> config: mem-type:ff,power-config:ff,misc-config:ff,modem-config:ff,touch-config:ff,display-config:ff, len: 93
[0002.122] I> sdmmc-3 params source = safe params
[0002.124] I> Found 47 partitions in QSPI_FLASH (instance 0)
[0002.144] W> Cannot find any partition table for 00000003
[0002.157] I> Found 11 partitions in SDMMC_USER (instance 3)
[0002.164] I> regulator ‘vdd-hdmi-5v0’ already enabled
[0002.168] I> regulator ‘vdd-hdmi-5v0’ already enabled
[0002.168] I> hdmi cable connected
[0002.170] E> set volts not configured for ‘vdd-1v0’
[0002.171] E> set volts not configured for ‘vdd-1v8-hs’
[0002.174] E> invalid display type
[0002.175] E> cannot find any other nvdisp nodes
[0002.190] I> edid read success
[0002.190] I> width = 640, height = 480, frequency = 25174825
[0002.191] I> width = 640, height = 480, frequency = 25174825
[0002.191] I> width = 640, height = 480, frequency = 25174825
[0002.192] I> width = 640, height = 480, frequency = 25174825
[0002.194] I> width = 1920, height = 1080, frequency = 148500000
[0002.200] I> Best mode Width = 640, Height = 480, freq = 25174825
[0002.210] I> hdmi_enable, starting HDMI initialisation
[0002.215] I> hdmi_enable, HDMI initialisation complete
[0002.218] I> Load in CBoot Boot Options partition and parse it
[0002.223] E> Error -9 when finding node with path /boot-configuration
[0002.228] E> tegrabl_cbo_parse_info: “boot-configuration” not found in CBO file.
[0002.235] I> Hit any key to stop autoboot: 4 3 2 1
[0004.243] initializing target
[0004.243] calling apps_init()
[0004.244] starting app kernel_boot_app
[0004.250] I> found decompressor handler: lz4-legacy
[0004.250] I> decompressing BMP blob …
[0004.254] I> Kernel type = Normal
[0004.254] I> Loading kernel-bootctrl from partition
[0004.254] I> Loading partition kernel-bootctrl at 0xa4400000 from device(0x1)
[0004.265] W> tegrabl_get_kernel_bootctrl: magic number(0x00000000) is invalid
[0004.265] W> tegrabl_get_kernel_bootctrl: use default dummy boot control data
[0004.266] I> ########## SD boot ##########
[0004.268] W> Error: failed to get sd-card params
[0004.273] I> -0 params source =
[0004.276] E> Failed to initialize device 6-0
[0004.280] E> SD boot failed, err: 252641293
[0004.284] I> ########## USB boot ##########
[0004.293] W> No valid slot number is found in scratch register
[0004.294] W> Return default slot: _a
[0004.305] I> USB Firmware Version: 60.06 release
[0004.359] I> regulator of usb2-0 already enabled
[0004.363] I> regulator of usb2-1 already enabled
[0004.368] I> enabling ‘vdd-usb2-5v’ regulator
[0005.368] E> failed to initialize xhci controller
[0005.368] E> Error in init of XUSB host driver, err: 79790026
[0005.369] E> Failed to initialize device 5-0
[0005.369] E> USB boot failed, err: 2037973030
[0005.369] I> ########## Fixed storage boot ##########
[0005.370] I> Already published: 00010003
[0005.370] I> Look for boot partition
[0005.373] I> Fallback: assuming 0th partition is boot partition
[0005.379] I> Detect filesystem
[0005.406] I> Loading extlinux.conf …
[0005.407] I> rootfs path: /sdmmc_user/boot/extlinux/extlinux.conf
[0005.449] I> L4T boot options
[0005.450] I> [1]: “primary kernel”
[0005.450] I> [2]: “ncb kernel”
[0005.450] I> Enter choice:
[0006.451] I> Continuing with default option: 2
[0006.451] I> Loading kernel sig file from rootfs …
[0006.451] I> rootfs path: /sdmmc_user/boot/Image_ncb.sig
[0012.646] I> lookup_linear_dir:441: Invalid file block num
[0012.647] I> ext2_walk:142: ‘Image_ncb.sig’ lookup failed
[0012.647] I> ext4_open_file:647: ‘/boot/Image_ncb.sig’ lookup failed
[0012.648] E> file /sdmmc_user/boot/Image_ncb.sig open failed!!
[0012.648] W> Failed to load kernel sig file (err=202113041)
[0012.649] I> Loading kernel binary from rootfs …
[0012.654] I> rootfs path: /sdmmc_user/boot/Image_ncb
[0013.213] I> Validate kernel …
[0013.213] I> T19x: Authenticate kernel (bin_type: 37), max size 0x5000000
[0013.214] E> Stage2Signature validation failed with SHA2!!
[0013.214] C> OEM authentication of kernel header failed!
[0013.215] W> Failed to validate kernel binary (err=1077936152, fail=1)
[0013.215] W> Security fuse not burned, ignore validation failure
[0013.227] I> No kernel-dtb binary path
[0013.227] W> No valid slot number is found in scratch register
[0013.230] W> Return default slot: _a
[0013.233] I> A/B: bin_type (38) slot 0
[0013.237] I> Loading kernel-dtb from partition
[0013.241] I> Loading partition kernel-dtb at 0x91000000 from device(0x1)
[0013.258] I> Validate kernel-dtb …
[0013.258] I> T19x: Authenticate kernel-dtb (bin_type: 38), max size 0x400000
[0013.261] I> Loading ramdisk from rootfs …
[0013.262] I> rootfs path: /sdmmc_user/boot/initrd
[0013.343] I> Kernel hdr @0xa4400000
[0013.344] I> Kernel dtb @0x90000000
[0013.344] I> decompressor handler not found
[0013.344] I> Copying kernel image (34400264 bytes) from 0xa4400000 to 0x80080000 … [0013.355] I> Done
[0013.355] I> Updated bpmp info to DTB
[0013.356] I> Ramdisk: Base: 0x92000000; Size: 0x54ec8f
[0013.357] I> Updated initrd info to DTB
[0013.357] W> WARN: Fail to override “console=none” in commandline
[0013.357] E> tegrabl_linuxboot_add_disp_param, du 1 failed to get display params
[0013.364] E> tegrabl_linuxboot_add_disp_param, du 1 failed to get display params
[0013.371] W> No valid slot number is found in scratch register
[0013.377] W> Return default slot: _a
[0013.380] I> Active slot suffix:
[0013.383] I> add_boot_slot_suffix: slot_suffix =
[0013.388] I> Linux Cmdline: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 earlycon=tegra_comb_uart,mmio32
[0013.425] I> Updated bootarg info to DTB
[0013.429] W> MAC addr invalid!
[0013.432] E> Failed to get WIFI MAC address
[0013.436] W> MAC addr invalid!
[0013.439] E> Failed to get Bluetooth MAC address
[0013.443] I> eeprom_get_mac_addr: MAC (type: 2): 48:b0:2d:07:67:16
[0013.450] E> “plugin-manager” doesn’t exist, creating
[0013.454] I> Adding /chosen/plugin-manager/cvm
[0013.458] E> “chip-id” doesn’t exist, creating
[0013.463] I> Adding /chosen/plugin-manager/chip-id
[0013.467] E> “configs” doesn’t exist, creating
[0013.472] I> Adding /chosen/plugin-manager/configs
[0013.476] E> “ids” doesn’t exist, creating
[0013.480] I> Adding /chosen/plugin-manager/ids
[0013.485] E> “odm-data” doesn’t exist, creating
[0013.489] I> Adding /chosen/plugin-manager/odm-data
[0013.496] E> “memory” doesn’t exist, creating
[0013.498] I> [0] START: 0x80000000, END: 0xac000000
[0013.502] I> [1] START: 0xac004000, END: 0xf09d0000
[0013.507] I> [2] START: 0xf09dc000, END: 0xf09e0000
[0013.512] I> dram_block larger than 80000000
[0013.516] I> [3] START: 0x100000000, END: 0x280000000
[0013.521] I> added [base:0x80000000, size:0x2c000000] to /memory
[0013.527] I> added [base:0xac200000, size:0x44600000] to /memory
[0013.533] I> added [base:0x100000000, size:0x180000000] to /memory
[0013.539] I> Updated memory info to DTB
[0013.543] E> add_disp_param: failed to get display params for du=1
[0013.549] E> “reset” doesn’t exist, creating
[0013.553] I> NVG: Logical CPU: 0; MPIDR: 0x80000000
[0013.557] I> NVG: Logical CPU: 1; MPIDR: 0x80000001
[0013.562] I> NVG: Logical CPU: 2; MPIDR: 0x80000100
[0013.567] I> NVG: Logical CPU: 3; MPIDR: 0x80000101
[0013.571] I> NVG: Logical CPU: 4; MPIDR: 0x80000200
[0013.576] I> NVG: Logical CPU: 5; MPIDR: 0x80000201
[0013.581] I> Deleted cpu@6 node in DT
[0013.584] I> Deleted cpu@7 node in DT
[0013.588] I> Deleted cluster3 node in FDT
[0013.592] I> Update arm-pmu in FDT
[0013.595] I> - update property: interrupts
[0013.599] I> - update property: interrupt-affinity
[0013.604] E> “misc-data” doesn’t exist, creating
[0013.608] I> Boot-device: QSPI
[0013.611] W> Unknown boot device
[0013.614] I> Add storage-qspi to plugin-manager/misc-data
[0013.619] W> Unknown storage device
[0013.623] I> Add serial number:1421420051616 as DT property
[0013.629] I> Plugin-manager override starting
[0013.633] I> node /plugin-manager/fragment-pcie-c5-rp matches
[0013.639] I> node /plugin-manager/fragement-tegra-wdt-en matches
[0013.645] I> node /plugin-manager/fragement-tegra-sdhci-sd-dis matches
[0013.653] I> Disable plugin-manager status in FDT
[0013.655] I> Plugin-manager override finished successfully
[0013.660] I> tegrabl_load_kernel_and_dtb: Done
[0013.670] I> Kernel EP: 0x80080000, DTB: 0x90000000

Hi,

You still didn’t tell us which method would cause the error.

As your said , I copy the Image to device with path /boot/Image_ncb and add a lable to exlinux.conf as on TX2

Then I guess this is due to your kernel image which has some problem.

But if I copy the new dtb and kernel to jetpack directory and use" flash.sh p3449-0000+p3668-0001-qspi-emmc mmcblk0p1" to flash the whole rootfs, it is work fine.

What is your “uname -r”? If this differs from the previous “uname -r”, then you have to also install modules in a new location. Modules should be at:
/lib/modules/$(uname -r)/kernel

If the above location does not exist, or if it is empty, then you probably did not correctly set CONFIG_LOCALVERSION during your custom kernel build. Should that be the case, then everything based on a module format will fail.

add a lable to exlinux.conf as on TX2

What if you don’t use new label? Is that making any difference?

Thanks for reply! I had confirm it, it is not the version issure. The version of original kernel is the same as my kernel, it is 4.9.140-tegra.
From the log We can see my kernel stop at “[0013.670] I> Kernel EP: 0x80080000, DTB: 0x90000000”.

Hi,

Could you compare the boot up log of working case and non-working case?

According to below log, the non-working case is indeed reading the kernel from rootfs.

[0006.451] I> Loading kernel sig file from rootfs …
[0006.451] I> rootfs path: /sdmmc_user/boot/Image_ncb.sig
[0012.646] I> lookup_linear_dir:441: Invalid file block num
[0012.647] I> ext2_walk:142: ‘Image_ncb.sig’ lookup failed
[0012.647] I> ext4_open_file:647: ‘/boot/Image_ncb.sig’ lookup failed
[0012.648] E> file /sdmmc_user/boot/Image_ncb.sig open failed!!
[0012.648] W> Failed to load kernel sig file (err=202113041)
[0012.649] I> Loading kernel binary from rootfs …
[0012.654] I> rootfs path: /sdmmc_user/boot/Image_ncb
[0013.213] I> Validate kernel …
[0013.213] I> T19x: Authenticate kernel (bin_type: 37), max size 0x5000000
[0013.214] E> Stage2Signature validation failed with SHA2!!
[0013.214] C> OEM authentication of kernel header failed!
[0013.215] W> Failed to validate kernel binary (err=1077936152, fail=1)
[0013.215] W> Security fuse not burned, ignore validation failure

No difference.
Let Linux_for_tegra as home directory. I found that the kernel in kernel/Image is deferent from rootfs/boot/Image. The file size is 34400264 and 34400272. Replace NX ‘s /boot/Image_ncb. with “rootfs/boot/Image” will be work fine.

I think the flash.sh add something to the Image when make rootfs!

Hi,

I think you could conduct some tests.
Your case still has some uncertain causes that might affect your judgement.

Test 1

  1. Please build the kernel image from pure source code. Pure code means fresh codes from our server and you don’t apply any patch to it.
  2. Use scp or any method to put this Image to /boot/Image and reboot device.
  3. Check if device can boot or not. -> result 1/log 1

Test 2

  1. Go to Linux_for_Tegra. Please note that this is also pure one. Means we don’t use any Image_ncb.
  2. Remove rootfs/boot/Image or move it to somewhere else
  3. Run full flash and see if it can boot up. Full flash means sudo ./flash board-name mmcblk0p1. I don’t want any “-r” or “-k” here. -> result2/log2

Test 3

According to result 1 and 2, you could then try your kernel image.