Could you see if
apply patch
defconf
build kernel
give you different result?
Could you see if
apply patch
defconf
build kernel
give you different result?
To try multiple options I tried below sequence>
root@Prasanna:/home/Build/sources/kernel/kernel-4.9# make clean
root@Prasanna:/home/Build/sources/kernel/kernel-4.9# make mrproper
root@Prasanna:/home/Build/sources/kernel/kernel-4.9# ./scripts/rt-patch.sh revert-patches
The PREEMPT RT patches have been successfully reverted!
root@Prasanna:/home/Build/sources/kernel/kernel-4.9# make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
make[1]: Entering directory ‘/home/prasanna/GRL_C2V/Build/sources/kernel/kernel-4.9/tegra_image’
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/bin2c
GEN ./Makefile
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
make[1]: Leaving directory ‘/home/Build/sources/kernel/kernel-4.9/tegra_image’
root@Prasanna:/home/Build/sources/kernel/kernel-4.9# ./scripts/rt-patch.sh apply-patches
PREEMPT RT patches successfully applied for Auto!
PREEMPT RT patches successfully applied for L4T!
root@Prasanna:/home/Build/sources/kernel/kernel-4.9#
root@Prasanna:/home/Build/sources/kernel/kernel-4.9# make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j24
after this I used to get the below log and select option 5
make[1]: Entering directory ‘/home/Build/sources/kernel/kernel-4.9/tegra_image’
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
*
Page size
- 4KB (ARM64_4K_PAGES)
- 39-bit (ARM64_VA_BITS_39)
- No Forced Preemption (Server) (PREEMPT_NONE)
choice[1-5]: 5
Timer frequency
- 250 HZ (HZ_250)
- Sparse Memory (SPARSEMEM_MANUAL)
choice[1]: 1
Sparse Memory virtual memmap (SPARSEMEM_VMEMMAP) [Y/n/?] y
Allow for memory hot-add (MEMORY_HOTPLUG) [Y/n] y
Online the newly added memory blocks by default (MEMORY_HOTPLUG_DEFAULT_ONLINE) [Y/n/?] y
Allow for memory hot remove (MEMORY_HOTREMOVE) [Y/n] y
Allow for balloon memory compaction/migration (BALLOON_COMPACTION) [Y/n/?] y
Allow for memory compaction (COMPACTION) [Y/n/?] y
Page migration (MIGRATION) [Y/?] y
HMM mirror CPU page table into a device page table (HMM_MIRROR) [Y/n/?] y
Enable bounce buffers (BOUNCE) [Y/n/?] y
Enable KSM for page merging (KSM) [Y/n/?] y
Low address space to protect from user allocation (DEFAULT_MMAP_MIN_ADDR) [4096] 4096
Enable cleancache driver to cache clean pages if tmem is present (CLEANCACHE) [N/y/?] n
Enable frontswap to cache swap pages if tmem is present (FRONTSWAP) [N/y/?] n
Contiguous Memory Allocator (CMA) [Y/n/?] y
CMA debug messages (DEVELOPMENT) (CMA_DEBUG) [N/y/?] n
CMA debugfs interface (CMA_DEBUGFS) [N/y/?] n
Maximum count of the CMA areas (CMA_AREAS) [7] 7
Common API for compressed memory storage (ZPOOL) [N/m/y/?] n
Low (Up to 2x) density storage for compressed pages (ZBUD) [N/m/y/?] n
Memory allocator for compressed pages (ZSMALLOC) [Y/n/m/?] y
Use page table mapping to access object in zsmalloc (PGTABLE_MAPPING) [N/y/?] n
Export zsmalloc statistics (ZSMALLOC_STAT) [N/y/?] n
Enable idle page tracking (IDLE_PAGE_TRACKING) [N/y/?] n
Device memory (pmem, etc…) hotplug support (ZONE_DEVICE) [Y/n/?] y
Unaddressable device memory (GPU memory, …) (DEVICE_PRIVATE) [Y/n/?] y
Addressable device memory (like GPU memory) (DEVICE_PUBLIC) [N/y/?] n
Enable seccomp to safely compute untrusted bytecode (SECCOMP) [Y/n/?] y
Enable paravirtualization code (PARAVIRT) [N/y/?] n
Paravirtual steal time accounting (PARAVIRT_TIME_ACCOUNTING) [N/y/?] n
kexec system call (KEXEC) [Y/n/?] y
Harden the branch predictor against aliasing attacks (HARDEN_BRANCH_PREDICTOR) [Y/n/?] y
Unmap kernel when running in userspace (aka “KAISER”) (UNMAP_KERNEL_AT_EL0) [N/y/?] n
Harden the branch predictor against aliasing attacks (HARDEN_BRANCH_PREDICTOR) [Y/n/?] y
Speculative Store Bypass Disable (ARM64_SSBD) [Y/n/?] y
Emulate Privileged Access Never using TTBR0_EL1 switching (ARM64_SW_TTBR0_PAN) [Y/n/?] y
Randomize the address of the kernel image (RANDOMIZE_BASE) [Y/n/?] y
Tegra Early Boot Partition (TEGRA_EBP) [N/y/?] n
Tracers (FTRACE) [Y/n/?] y
Kernel Function Tracer (FUNCTION_TRACER) [Y/n/?] y
Kernel Function Graph Tracer (FUNCTION_GRAPH_TRACER) [N/y/?] n
Enable trace events for preempt and irq disable/enable (PREEMPTIRQ_EVENTS) [N/y/?] n
Interrupts-off Latency Tracer (IRQSOFF_TRACER) [N/y/?] n
Preemption-off Latency Tracer (PREEMPT_TRACER) [N/y/?] n
Scheduling Latency Tracer (SCHED_TRACER) [N/y/?] n
Tracer to detect hardware latencies (like SMIs) (HWLAT_TRACER) [N/y/?] n
Missed Timer Offsets Histogram (MISSED_TIMER_OFFSETS_HIST) [N/y/?] (NEW) n
Ok. I will try the sequnce as mentioned and update you.
Thanks
If the make is always asking you to enter which feature/function needs to be enabled each time, it means tegra_defconfig does not get read.
Tegra_defconfig has the necessary config the system needs for enabling tegra. During building kernel, you don’t need to choose functions one by one.
Thanks. I followed the sequence:
apply patch
defconf
build kernel
It didn’t asked for options. Once build complete I will test and update.
For flashing I am using sudo ./flash.sh jetson-xavier mmcblk0p1.
Since flashing takes time. Do we have any option like Copying the image into SD card from Host PC directly. and to boot from SD ?
Thanks for quick responses and support.
Finally with above sequence. GUI is up with RT patch.
root@jetson:~# uname -a
Linux jetson 4.9.140-rt93-tegra #6 SMP PREEMPT RT Tue Jan 26 17:41:01 IST 2021 aarch64 aarch64 aarch64 GNU/Linux
It will select. Fully Preemptible Kernel (RT) (PREEMPT_RT_FULL) By default ?
Hi Wayne,
I have a query. After successful flashing of RT patch applied kernel. System booting is fine.
How to prepare linux-headers-4.9.140-rt93-tegra-ubuntu-18.04_aarch64 ?
Actually.
Now I just tried to build a a kernel module on Jetson.
If I choose kernel directory as “/lib/modules/$(shell uname -r)/build” or
/usr/src/linux-headers-$(uname -r)-ubuntu18.04_aarch64
It is not able to build since now kernel is “4.9.140-rt93-tegra”.
So I just tried to select the kernel src as “/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9”. and the module built using above source gives as insmod: ERROR: could not insert module phy_intr.ko: Invalid module format.
dmesg : disagrees about version of symbol module_layout
If I cross compile the module from Linux Host PC. I am able to insert the module in Jetson.
Linux_for_Tegra/kernel/kernel_headers.tbz2 has only
linux-headers-4.9.140-tegra-linux_x86_64
linux-headers-4.9.140-tegra-ubuntu18.04_aarch64
. How to prepare for RT. ?
Thanks,
Prasanna