Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real-time kernel and ipvlan support #27

Open
nvasudevan opened this issue Feb 5, 2025 · 1 comment
Open

Real-time kernel and ipvlan support #27

nvasudevan opened this issue Feb 5, 2025 · 1 comment
Assignees
Labels
Linux_for_Tegra Label for Linux_for_Tegra UAY Unassigned yet

Comments

@nvasudevan
Copy link

nvasudevan commented Feb 5, 2025

...
I raised this issue (#21) few weeks back, unfortunately I didn't respond in time. Apologies. But we have found a set of instructions that will enable real-time and ipvlan on seed studio boards. We just wanted to share it here for other users.

@alanmillard was able to enable real-time kernel and ipvlan kernel module for seeed studio board. Below are the details.

My setup:

Jetson Orin Nano 8GB - reComputer J3011 (J401 carrier board)
Host PC: Ubuntu 22.
Jetpack 6.1 (R36.4.0)

Please find below the instructions to enable RT and IPVLAN:

The instructions to prepare the host computer is what is outlined in the README (steps 1 - 6).

<Linux_for_Tegra>$ export ARCH=arm64
# set up cross compile path
<Linux_for_Tegra>$ export CROSS_COMPILE=~/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
cd <install-path>/Linux_for_Tegra/source

Enable real-time kernel

<Linux_for_Tegra>$ cd source/
<Linux_for_Tegra/source>$ ./generic_rt_build.sh "enable"
Enable RT kernel
PREEMPT RT config is set successfully!

Enable IPVLAN

<Linux_for_Tegra/source>$ cd kernel/kernel-jammy-src/
<Linux_for_Tegra/source/kernel/kernel-jammy-src>$ ./scripts/config --file "arch/arm64/configs/defconfig" --module CONFIG_IPVLAN

Build kernel

<Linux_for_Tegra/source>$ make -C kernel
<Linux_for_Tegra/source>$ export INSTALL_MOD_PATH=`realpath ../rootfs/`
<Linux_for_Tegra/source>$ sudo -E make install -C kernel
<Linux_for_Tegra/source>$ cp kernel/kernel-jammy-src/arch/arm64/boot/Image ../kernel/Image

Build OOT modules

<Linux_for_Tegra/source>$ export IGNORE_PREEMPT_RT_PRESENCE=1
<Linux_for_Tegra/source>$ export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src/
<Linux_for_Tegra/source>$ make modules
<Linux_for_Tegra/source>$ sudo -E make modules_install

Update initrd and build device tree binaries

<Linux_for_Tegra/source>$ cd ..
<Linux_for_Tegra>$ sudo ./tools/l4t_update_initrd.sh
<Linux_for_Tegra>$ cd source/
<Linux_for_Tegra/source>$ make dtbs
<Linux_for_Tegra/source>$ cp kernel-devicetree/generic-dts/dtbs/* ../kernel/dtb/

Now we are good to flash, we run step 9 from the README (https://github.com/Seeed-Studio/Linux_for_Tegra/blob/r36.4.0/README.md)

We were also able to get this working on Ubuntu 20 as our host PC, however we
found that post flashing jetson wouldn't come up clean, and we get a blank
screen. Using UART and serial console, we worked out that the default user was
missing. So here are the additional steps to resolve that:

<Linux_for_Tegra>$ sudo ./tools/l4t_create_default_user.sh 
Creating: Username - nvidia, Password - ..., Autologin - false
...

Now re-run the flash command.


N.B. We tried to follow the nvidia script and use ./nvbuild.sh -r to build real-time kernel but it didn't work for us (i.e. created an image that wouldn't boot). Perhaps there is some difference between nvbuild.sh and the official NVIDIA documentation steps.

@bigbearishappy
Copy link
Member

Thank you for sharing this detail steps.
I believe this can help someone who is in trouble with it.

@Lesords Lesords added UAY Unassigned yet Linux_for_Tegra Label for Linux_for_Tegra labels Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linux_for_Tegra Label for Linux_for_Tegra UAY Unassigned yet
Projects
Status: No status
Development

No branches or pull requests

3 participants