Ariaboard NX kernel update

From Ariaboard Wiki
Revision as of 01:52, 8 February 2023 by C2h2 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

NVIDIA SDK Manager

You can get NVIDIA SDK Manager from URL below (need a development account):

https://developer.nvidia.com/nvsdk-manager

For the version of kernel source, JetPack 4.4.1 is needed.

Build Kernel

Extract kernel source package, then:

source env.sh
./nvbuild.sh

Deploy Kernel

Copy the files below to the running system of Jetson Xavier NX board:

deploy/Image
deploy/tegra194-p3668-all-p3509-0000.dtb
deploy/modules.tar.gz

On the system of the board:

cp Image /boot/
cp tegra194-p3668-all-p3509-0000.dtb /boot/
cp modules.tar.gz /boot/
tar -xf modules.tar.gz -C /

Run 40-pin IO configuration tool:

sudo /opt/nvidia/jetson-io/jetson-io.py

Configure 40-pin expansion header -> Select aud_mclk, i2s5 -> Back -> Save and reboot to reconfigure pins.

If aud_mclk and i2s5 is already selected, toggle any unused pinmux like pwm1 to force the tool re-create device tree files.

Configure ALSA Mixer

Only need to run the commands below once:

sudo -s

amixer -c jetsonxaviernxa sset 'ADMAIF1 Mux' 'I2S5'
amixer -c jetsonxaviernxa sset 'I2S5 Mux' 'ADMAIF1'

amixer -c jetsonxaviernxa cset name="x HP Playback Switch" on
amixer -c jetsonxaviernxa cset name="x HPO MIX DAC1 Switch" on
amixer -c jetsonxaviernxa cset name="x Stereo DAC MIXL DAC L1 Switch" on
amixer -c jetsonxaviernxa cset name="x Stereo DAC MIXR DAC R1 Switch" on
amixer -c jetsonxaviernxa cset name="x DAC MIXL INF1 Switch" on
amixer -c jetsonxaviernxa cset name="x DAC MIXR INF1 Switch" on
amixer -c jetsonxaviernxa cset name="x DAC MIXL Stereo ADC Switch" off
amixer -c jetsonxaviernxa cset name="x DAC MIXR Stereo ADC Switch" off

amixer -c jetsonxaviernxa cset name="x ADC Capture Switch" on
amixer -c jetsonxaviernxa cset name="x Stereo1 ADC MIXL ADC1 Switch" on
amixer -c jetsonxaviernxa cset name="x Stereo1 ADC MIXR ADC1 Switch" on

amixer -c jetsonxaviernxa sset 'I2S5 BCLK Ratio' 256
amixer -c jetsonxaviernxa sset 'I2S5 Channels' 2
amixer -c jetsonxaviernxa sset 'I2S5 Sample Rate' 44100
amixer -c jetsonxaviernxa sset 'I2S5 codec bit format' 16
amixer -c jetsonxaviernxa sset 'I2S5 codec frame mode' 'dsp-a'
amixer -c jetsonxaviernxa sset 'I2S5 input bit format' 16
amixer -c jetsonxaviernxa sset 'ADMAIF1 Channels' 2

amixer -c jetsonxaviernxa cset name="x RECMIXL INL1 Switch" on
amixer -c jetsonxaviernxa cset name="x RECMIXR INR1 Switch" on
amixer -c jetsonxaviernxa cset name="x RECMIXL BST1 Switch" on
amixer -c jetsonxaviernxa cset name="x RECMIXR BST1 Switch" on

alsactl store

Dump eMMC

Need JetPack package from NVIDIA Jetson SDK. Set board to recovery mode, use commands below on PC (use JetPack 4.5.1 as example):

cd JetPack_4.5.1_Linux_JETSON_XAVIER_NX/Linux_for_Tegra
sudo ./flash.sh -r -k APP -G system2.img jetson-xavier-nx-devkit-emmc mmcblk0p1
sudo mv -v system2.img bootloader/system.img
sudo mv -v system2.img.raw bootloader/system.img.raw

Restore eMMC

Need JetPack package from NVIDIA Jetson SDK. Set board to recovery mode, use commands below on PC (use JetPack 4.5.1 as example):

cd JetPack_4.5.1_Linux_JETSON_XAVIER_NX/Linux_for_Tegra
sudo ./flash.sh -r jetson-xavier-nx-devkit-emmc mmcblk0p1