Is it possible to build the GK20a package static instead of a module in my kernel?
This contains the nvgpu module.
If i build it, not as a module, in my kernel, the CPU does not want to boot.
I use the kernel provided by NVidia and the build instructions make -C kernel-4.9/ O=../$TEGRA_KERNEL_OUT ARCH=arm64 LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} tegra_defconfig make -C kernel-4.9/ O=../$TEGRA_KERNEL_OUT ARCH=arm64 LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} image
The ‘new’ kernel is placed under ‘/boot/Image’
Please see below terminal output of booting.
[0006.931] I> L4T boot options [0006.931] I> [1]: "primary kernel" [0006.931] I> [2]: "backup kernel" [0006.931] I> Enter choice: [0009.933] I> Continuing with default option: 1 [0009.933] I> Loading kernel sig file from rootfs ... [0009.933] I> rootfs path: /sdmmc_user/boot/Image.sig [0009.952] I> Loading kernel binary from rootfs ... [0009.952] I> rootfs path: /sdmmc_user/boot/Image [0010.208] I> overload load_size to 34338824 (from 35850248) [0010.232] I> Validate kernel ... [0010.232] I> T19x: Authenticate kernel (bin_type: 37), max size 0x5000000 [0010.545] E> digest on binary did not match!! [0010.545] C> OEM authentication of kernel payload failed! [0010.546] W> Failed to validate kernel binary (err=1077936152, fail=0) [0010.546] W> Security fuse not burned, ignore validation failure [0010.556] I> No kernel-dtb binary path [0010.557] W> No valid slot number is found in scratch register [0010.557] W> Return default slot: _a [0010.557] I> A/B: bin_type (38) slot 0 [0010.558] I> Loading kernel-dtb from partition [0010.562] I> Loading partition kernel-dtb at 0x91000000 from device(0x1) [0010.577] I> Validate kernel-dtb ... [0010.577] I> T19x: Authenticate kernel-dtb (bin_type: 38), max size 0x400000 [0010.582] I> Encryption fuse is not ON [0010.584] I> Loading ramdisk from rootfs ... [0010.587] I> Loading initrd sig file from rootfs ... [0010.592] I> rootfs path: /sdmmc_user/boot/initrd.sig [0010.621] I> Loading initrd binary from rootfs ... [0010.621] I> rootfs path: /sdmmc_user/boot/initrd [0010.685] I> overload load_size to 7236840 (from 7236848) [0010.688] I> Validate initrd ... [0010.688] I> T19x: Authenticate initrd (bin_type: 49), max size 0x4000000 [0010.754] I> Encryption fuse is not ON [0010.768] I> Kernel hdr @0xa4ad0000 [0010.768] I> Kernel dtb @0x90000000 [0010.768] I> decompressor handler not found [0010.769] I> Copying kernel image (34338824 bytes) from 0xa4ad0000 to 0x80080000 ... [0010.779] I> Done [0010.780] I> Updated bpmp info to DTB [0010.781] I> Ramdisk: Base: 0x92000000; Size: 0x6e6ce8 [0010.782] I> Updated initrd info to DTB [0010.782] W> WARN: Fail to override "console=none" in commandline [0010.783] I> Active rootfs suffix: [0010.784] E> tegrabl_linuxboot_add_disp_param, du 1 failed to get display params [0010.791] E> tegrabl_linuxboot_add_disp_param, du 1 failed to get display params [0010.799] W> No valid slot number is found in scratch register [0010.804] W> Return default slot: _a [0010.808] I> Active slot suffix: [0010.811] I> add_boot_slot_suffix: slot_suffix = [0010.815] I> Linux Cmdline: console=ttyTCU0,115200 video=tegrafb no_console_suspend=1 earlycon=tegra_comb_uart,mmio32,0x0c168000 gpt rootfs.slot_suffix= tegra_fbmem=0x800000@0xa06a0000 lut_mem=0x2008@0xa069b000 usbcore.old_scheme_first=1 tegraid=19.1.2.0.0 maxcpus=8 boot.slot_suffix= boot.ratchetvalues=0.4.2 vpr_resize sdhci_tegra.en_boot_part_access=1 [0010.847] I> Updated bootarg info to DTB [0010.851] W> MAC addr invalid! [0010.853] E> Failed to get WIFI MAC address [0010.857] W> MAC addr invalid! [0010.860] E> Failed to get Bluetooth MAC address [0010.865] I> eeprom_get_mac_addr: MAC (type: 2): 48:b0:2d:3c:80:52 [0010.872] W> "plugin-manager" doesn't exist, creating [0010.876] I> Adding /chosen/plugin-manager/cvm [0010.880] W> "chip-id" doesn't exist, creating [0010.884] I> Adding /chosen/plugin-manager/chip-id [0010.889] W> "configs" doesn't exist, creating [0010.893] I> Adding /chosen/plugin-manager/configs [0010.898] W> "ids" doesn't exist, creating [0010.902] I> Adding /chosen/plugin-manager/ids [0010.906] W> "odm-data" doesn't exist, creating [0010.911] I> Adding /chosen/plugin-manager/odm-data [0010.919] W> "memory" doesn't exist, creating [0010.920] I> [0] START: 0x80000000, END: 0xac000000 [0010.924] I> [1] START: 0xac004000, END: 0xf0ad0000 [0010.929] I> [2] START: 0xf0adc000, END: 0xf0ae0000 [0010.934] I> dram_block larger than 80000000 [0010.938] I> [3] START: 0x100000000, END: 0x880000000 [0010.943] I> added [base:0x80000000, size:0x2c000000] to /memory [0010.948] I> added [base:0xac200000, size:0x44800000] to /memory [0010.954] I> added [base:0x100000000, size:0x780000000] to /memory [0010.962] I> Updated memory info to DTB [0010.964] E> add_disp_param: failed to get display params for du=1 [0010.971] W> "reset" doesn't exist, creating [0010.975] I> Adding ecid(0000000164017147000000000e0281c0) to DT [0010.980] I> NVG: Logical CPU: 0; MPIDR: 0x80000000 [0010.985] I> NVG: Logical CPU: 1; MPIDR: 0x80000001 [0010.989] I> NVG: Logical CPU: 2; MPIDR: 0x80000100 [0010.994] I> NVG: Logical CPU: 3; MPIDR: 0x80000101 [0010.999] I> NVG: Logical CPU: 4; MPIDR: 0x80000200 [0011.004] I> NVG: Logical CPU: 5; MPIDR: 0x80000201 [0011.008] I> NVG: Logical CPU: 6; MPIDR: 0x80000300 [0011.013] I> NVG: Logical CPU: 7; MPIDR: 0x80000301 [0011.019] W> "misc-data" doesn't exist, creating [0011.022] I> Boot-device: eMMC [0011.025] I> Add boot-sdmmc to plugin-manager/misc-data [0011.030] I> Add storage-sdmmc to plugin-manager/misc-data [0011.036] W> Unknown storage device [0011.039] I> Add serial number:1420921056410 as DT property [0011.045] I> Plugin-manager override starting [0011.049] I> node /plugin-manager/fragement-tegra-wdt-en matches [0011.056] I> node /plugin-manager/fragement-soft-wdt matches [0011.064] I> node /plugin-manager/fragment-pcie-c5-rp matches [0011.068] I> node /plugin-manager/fragment-tegra-ufs-lane10 matches [0011.080] I> Disable plugin-manager status in FDT [0011.081] I> Plugin-manager override finished successfully [0011.082] I> tegrabl_load_kernel_and_dtb: Done [0011.104] I> Kernel EP: 0x80080000, DTB: 0x90000000 [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] invalid cgroup_subsys 7:net_cls css_alloc=ffffff8008e9cc38 css_free=ffffff8008e9cc08 id:name=7:net_cls [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: CPU: 0 PID: 0 at /home/esterline/envision/kernel-4.9/kernel/cgroup.c:5630 cgroup_init_early+0xa8/0x120 [ 0.000000] Modules linked in: [ 0.000000] [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.9.253-tegra #1 [ 0.000000] task: ffffff8009fd13c0 task.stack: ffffff8009fc0000 [ 0.000000] PC is at cgroup_init_early+0xa8/0x120 [ 0.000000] LR is at cgroup_init_early+0xa8/0x120 [ 0.000000] pc : [<ffffff800972f988>] lr : [<ffffff800972f988>] pstate: 604000c5 [ 0.000000] sp : ffffff8009fc3f60 [ 0.000000] x29: ffffff8009fc3f60 x28: 0000000081720018 [ 0.000000] x27: 0000000000000000 x26: 0000000000000000 [ 0.000000] x25: 0000000000000000 x24: 0000000000000007 [ 0.000000] x23: ffffff800904bd10 x22: 0000000000000038 [ 0.000000] x21: 0000000000000007 x20: ffffff800904bde0 [ 0.000000] x19: ffffff800a1e7b60 x18: 0000000000000001 [ 0.000000] x17: 0000000000000001 x16: 0000000000000000 [ 0.000000] x15: ffffffffffffffff x14: 666666663d656572 [ 0.000000] x13: 665f737363203833 x12: 6363396538303038 [ 0.000000] x11: 6666666666663d63 x10: 6f6c6c615f737363 [ 0.000000] x9 : 20736c635f74656e x8 : ffffff800a2bdf0c [ 0.000000] x7 : 0000000000000000 x6 : 0000000000000000 [ 0.000000] x5 : 0000000000000000 x4 : 0000000000000000 [ 0.000000] x3 : ffffffffffffffff x2 : 0000000000000000 [ 0.000000] x1 : ffffff8009fd13c0 x0 : 0000000000000066 [ 0.000000] [ 0.000000] ---[ end trace 0000000000000000 ]--- [ 0.000000] Call trace: [ 0.000000] [<ffffff800972f988>] cgroup_init_early+0xa8/0x120 [ 0.000000] [<ffffff800972081c>] start_kernel+0x28/0x38c [ 0.000000] [<ffffff8009720204>] __primary_switched+0x80/0x94 [ 0.000000] invalid cgroup_subsys 9:net_prio css_alloc=ffffff8008e9c420 css_free=ffffff8008e9c658 id:name=9:net_prio [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: CPU: 0 PID: 0 at /home/esterline/envision/kernel-4.9/kernel/cgroup.c:5630 cgroup_init_early+0xa8/0x120 [ 0.000000] Modules linked in: [ 0.000000] [ 0.000000] CPU: 0 PID: 0 Comm: swapper Tainted: G W 4.9.253-tegra #1 [ 0.000000] task: ffffff8009fd13c0 task.stack: ffffff8009fc0000 [ 0.000000] PC is at cgroup_init_early+0xa8/0x120 [ 0.000000] LR is at cgroup_init_early+0xa8/0x120 [ 0.000000] pc : [<ffffff800972f988>] lr : [<ffffff800972f988>] pstate: 604000c5 [ 0.000000] sp : ffffff8009fc3f60 [ 0.000000] x29: ffffff8009fc3f60 x28: 0000000081720018 [ 0.000000] x27: 0000000000000000 x26: 0000000000000000 [ 0.000000] x25: 0000000000000000 x24: 0000000000000009 [ 0.000000] x23: ffffff800904bd10 x22: 0000000000000048 [ 0.000000] x21: 0000000000000009 x20: ffffff800904bde0 [ 0.000000] x19: ffffff800a1e7830 x18: 0000000000000001 [ 0.000000] x17: 0000000000000001 x16: 0000000000000000 [ 0.000000] x15: ffffffffffffffff x14: 6666663d65657266 [ 0.000000] x13: 5f73736320303234 x12: 6339653830303866 [ 0.000000] x11: 66666666663d636f x10: 6c6c615f73736320 [ 0.000000] x9 : 6f6972705f74656e x8 : ffffff800a2be68c [ 0.000000] x7 : 0000000000000000 x6 : 0000000000000000 [ 0.000000] x5 : 0000000000000000 x4 : 0000000000000000 [ 0.000000] x3 : ffffffffffffffff x2 : 0000000000000000 [ 0.000000] x1 : ffffff8009fd13c0 x0 : 0000000000000068 [ 0.000000] [ 0.000000] ---[ end trace f68728a0d3053b52 ]--- [ 0.000000] Call trace: [ 0.000000] [<ffffff800972f988>] cgroup_init_early+0xa8/0x120 [ 0.000000] [<ffffff800972081c>] start_kernel+0x28/0x38c [ 0.000000] [<ffffff8009720204>] __primary_switched+0x80/0x94 [ 0.000000] Linux version 4.9.253-tegra (esterline@bionic) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #1 SMP PREEMPT Fri Dec 2 13:19:50 CET 2022 [ 0.000000] Boot CPU: AArch64 Processor [4e0f0040] [ 0.000000] OF: fdt:memory scan node memory, reg size 48, [ 0.000000] OF: fdt: - 80000000 , 2c000000 [ 0.000000] OF: fdt: - ac200000 , 44800000 [ 0.000000] OF: fdt: - 100000000 , 780000000 [ 0.000000] earlycon: tegra_comb_uart0 at MMIO32 0x000000000c168000 (options '') [ 0.000000] bootconsole [tegra_comb_uart0] enabled [ 0.000000] Found tegra_fbmem: 00800000@a06a0000 [ 0.000000] Found lut_mem: 00002008@a069b000 [ 0.000000] Unable to handle kernel read from unreadable memory at virtual address ffffff80094d1708 [ 0.000000] Mem abort info: [ 0.000000] ESR = 0x8600000e [ 0.000000] Exception class = IABT (current EL), IL = 32 bits [ 0.000000] SET = 0, FnV = 0 [ 0.000000] EA = 0, S1PTW = 0 [ 0.000000] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff800a34d000 [ 0.000000] [ffffff80094d1708] *pgd=000000087fffe003, *pud=000000087fffe003, *pmd=00e8000081400711 [ 0.000000] Internal error: Oops: 8600000e [#1] PREEMPT SMP [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 4.9.253-tegra #1 [ 0.000000] Hardware name: Jetson-AGX (DT) [ 0.000000] task: ffffff8009fd13c0 task.stack: ffffff8009fc0000 [ 0.000000] PC is at __func__.18385+0x24f1a0/0x325670 [ 0.000000] LR is at event_init+0x34/0x90 [ 0.000000] pc : [<ffffff80094d1708>] lr : [<ffffff800819eda4>] pstate: 804000c5 [ 0.000000] sp : ffffff8009fc3f00 [ 0.000000] x29: ffffff8009fc3f00 x28: 0000000081720018 [ 0.000000] x27: 0000000000000000 x26: 0000000000000000 [ 0.000000] x25: 0000000000000000 x24: ffffff8009fec428 [ 0.000000] x23: ffffff8009946688 x22: ffffff8009febb80 [ 0.000000] x21: ffffff8009fec590 x20: ffffff80094d0e40 [ 0.000000] x19: ffffff80099449f0 x18: 0000000000000000 [ 0.000000] x17: 0000000000000000 x16: 0000000000000000 [ 0.000000] x15: 000000000000002e x14: 00000000000006e0 [ 0.000000] x13: 00000000000002bf x12: 0000000000000014 [ 0.000000] x11: 0000000000000010 x10: 0000000000001000 [ 0.000000] x9 : 0000000000000002 x8 : 0000000000003ff0 [ 0.000000] x7 : 0000000000003fff x6 : ffffffc7ffc4f050 [ 0.000000] x5 : ffffff8009fe9c38 x4 : ffffff8009febd38 [ 0.000000] x3 : ffffff8009fc85a0 x2 : ffffff8009fc8918 [ 0.000000] x1 : ffffff80094d1708 x0 : ffffff8009fec590 [ 0.000000] [ 0.000000] Process swapper/0 (pid: 0, stack limit = 0xffffff8009fc0000) [ 0.000000] Call trace: [ 0.000000] [<ffffff80094d1708>] __func__.18385+0x24f1a0/0x325670 [ 0.000000] [<ffffff8009731ba0>] trace_event_init+0xb8/0x1b0 [ 0.000000] [<ffffff800973151c>] trace_init+0x26c/0x280 [ 0.000000] [<ffffff8009720a1c>] start_kernel+0x228/0x38c [ 0.000000] [<ffffff8009720204>] __primary_switched+0x80/0x94 [ 0.000000] ---[ end trace f68728a0d3053b54 ]--- [ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task! [ 0.000000] Rebooting in 5 seconds..