[CustomKernel] The Grinch 19.3.8 for Jetson TK1 / developed

Jetson TK1 “The Grinch” Custom Kernel 19.3.8 (19 December 2014)

  • Fastboot & u-boot packages
  • Added IEEE 1394 (FireWire) support
  • Added ALSA Sequencer support
  • Added Generic loopback driver (PCM)
  • Added backported driver for XBOX One controller
  • Added backported driver for Dualshock 4 controller
  • Added backported driver for Logitech F310 and F710 controller

Jetson TK1 “The Grinch” Custom Kernel 19.3.7 (1 November 2014)

  • Adding Apple Macintosh file system support
  • Adding Apple Extended HFS file system support
  • Adding support for TEGRA AES hw engine
  • Adding AES cipher algorithms (ARM-asm)
  • Adding XTS support
  • Adding native exFat and VFat support
  • Adding support for lxc: namespaces support (device/memory/cpuset/user)
  • Adding support for lxc: MAC-VLAN support
  • Adding support for lxc: 802.1Q/802.1ad VLAN Support
  • Adding support for lxc: Virtual ethernet pair device
  • Removing XFS module (required to get user namespaces)

Jetson TK1 “The Grinch” Custom Kernel 19.3.6 (31 August 2014)

  • Adding support for MISC binaries
  • Adding SquashFS 4.0 file system support
  • Adding RAM block device support
  • Adding Tegra CEC support
  • Adding support for modems (untested)

Jetson TK1 “The Grinch” Custom Kernel 19.3.5 (22 August 2014)

  • Adding various USB Serial Converter modules
  • Backport driver for RTL8188EU (USB tested)
  • Backport driver for RTL8187SE (mini-PCIe tested)
  • Enable IIO subsystem with GPIO/SYSFS triggers, also popular drivers: - Magnetometer: HMC5843/5883/5883L, STMicroelectronics devices - Pressure: BMP180 - Accelerometer: STMicroelectronics devices, InvenSense MPU3050 - Gyroscope: STMicroelectronics devices, InvenSense ITG3200, MPU3050 - Light: VCNL4000
  • Increase DMA_COHERENT_POOL_SIZE from 256k to 1M (required by RTL8187SE)
  • Fixed tegra-otg to get as3722-extcon device (missing as3722-adc-extcon)

Jetson TK1 “The Grinch” Custom Kernel 19.3.4 (22 August 2014)

  • Adding backported various RTC modules for I2C and SPI bus
  • Adding various I2C and SPI device drivers: - Pressure: BMP085, BMP180 - Gyroscope: MPU3050, ITG3200 - Accelerometer: ADX34x, KXTJ9, MMA8540, BMA150 - Proximity: GP2AP002A00F
  • Better USB serial converters support
  • Better support I2C bus with SMBus & Stub
  • Fixed /dev/video0 device issue claimed by vi driver
  • Moving lots kernel options to modules

Example: Battery Backup RTC
Example: more I2C / SPI examples soon

Jetson TK1 “The Grinch” Custom Kernel 19.3.3 (17 August 2014)

  • Added USB Printers support
  • Added FTDI serial-to-USB driver (Arduino)
  • Added Quota support
  • Added AutoFS support
  • Backported DVB USB drivers: rtl28xxu
  • Backported tuners drivers: e4000, r820t
  • Default setting high level for GPIO 191
  • Enabled PWM controller in DTB file

Note: If you want autoset GPIO 191 during boot and enable PWM controller, you must flash whole system. DTB update is needed. Look at 1d)

Note 2: Check md5sum for tegra124-pm375.dtb. Is fixed version for PWM outputs on PU3, PU5, PU6. Sorry.

Jetson TK1 “The Grinch” Custom Kernel 19.3.2 (10 August 2014)

  • Added Parallel port support
  • Added Broadcom 43xx wireless drivers
  • Added new firmware: bcmdhd.cal, fw_bcmdhd.bin
  • Added IrDA subsystem support
  • Added support for various USB DVB devices
  • Added support for AM/FM radio receivers
  • Added support Remote Controllers
  • Added Kinect and Playstation Eye drivers
  • Added X-Box gamepad driver
  • Added ISO 9660 CDROM and UDF file system support
  • Added lots filters support for Netfilter
  • Added 802.1d Ethernet Bridging support
  • Added QoS fair queueing support
  • Enabling CONFIG_FHANDLE
  • Moving lots kernel options to modules

Jetson TK1 “The Grinch” Custom Kernel 19.3.1 (07 August 2014)

  • Added Bluetooth subsystem support (USB Devices)
  • Added ReiserFS, XFS, NFS server support
  • Added Wireless LAN modules for Atheros, Intel, Ralink, Realtek devices
  • Added misc firmwares
  • Added NFSv3 ACL protocol extension
  • Added /dev/hidraw & /dev/hiddev device support
  • Added Device mapper support for crypt, snapshot, mirror targets
  • Added PWM_SYSFS
  • Added Cryptoloop support
  • Disabling default USB autosuspend
  • Moving lots kernel options to modules
  • Based on mainline 3.10.24 kernel

1) Fresh installation (fastboot way)

All steps must be performed on the host computer

a) Download NVIDIA L4T and Sample Root Filesystem

wget https://developer.nvidia.com/sites/default/files/akamai/mobile/files/L4T/Tegra124_Linux_R19.3.0_armhf.tbz2
wget https://developer.nvidia.com/sites/default/files/akamai/mobile/files/L4T/Tegra_Linux_Sample-Root-Filesystem_R19.3.0_armhf.tbz2

b) Extract files

tar -xvf Tegra124_Linux_R19.3.0_armhf.tbz2
cd Linux_for_Tegra/rootfs
sudo tar xpf <path_to>/Tegra_Linux_Sample-Root-Filesystem_R19.3.0_armhf.tbz2

c) Download Grinch Custom Kernel

cd ..
wget http://www.jarzebski.pl/files/jetsontk1/grinch-19.3.8/zImage -O kernel/zImage
wget http://www.jarzebski.pl/files/jetsontk1/grinch-19.3.8/kernel_supplements.tbz2 -O kernel/kernel_supplements.tbz2

d) Download DTB file (optional, if you want autoset GPIO 191 and enable PWM0, PWM2, PWM3)

wget http://www.jarzebski.pl/files/jetsontk1/grinch-19.3.8/tegra124-pm375.dtb -O kernel/dtb/tegra124-pm375.dtb

e) Verify files

md5sum kernel/zImage
8d3136b52169e87d21fc06d21835c5c4
md5sum kernel/kernel_supplements.tbz2
55e148b3ef404539903494e6e9693f83
md5sum kernel/dtb/tegra124-pm375.dtb
ba5ca54e06e65ba29b886661077ef45d

f) Apply binaries

sudo ./apply_binaries.sh

g) Turn off Jetson TK1 and connect USB cable to PC-host. Turn on Jetson in RECOVERY mode. On PC-Host you should look device 0955:7140:

lsusb
Bus 006 Device 010: ID 0955:7140 NVidia Corp

h) Flash board

./flash.sh -S 14580MiB jetson-tk1 mmcblk0p1

If flash is failed and message is: loop device failed, look to HINT #1

2) Installation (u-boot way)

All steps must be performed on the Jetson TK1

a) Download Grinch Custom Kernel

wget http://www.jarzebski.pl/files/jetsontk1/grinch-19.3.8/zImage
wget http://www.jarzebski.pl/files/jetsontk1/grinch-19.3.8/jetson-tk1-grinch-19.3.8-modules.tar.bz2
wget http://www.jarzebski.pl/files/jetsontk1/grinch-19.3.8/jetson-tk1-grinch-19.3.8-firmware.tar.bz2

b) Verify

md5sum zImage 
8d3136b52169e87d21fc06d21835c5c4  zImage
md5sum jetson-tk1-grinch-19.3.8-modules.tar.bz2 
c5fd6d2dc252db49691e890d654cb88e  jetson-tk1-grinch-19.3.8-modules.tar.bz2
md5sum jetson-tk1-grinch-21.2.1-firmware.tar.bz2
5cc575bb13765e4db4cf0ca9c2029cd4  jetson-tk1-grinch-19.3.8-firmware.tar.bz2

b) Update

sudo tar -C /lib/modules -vxjf jetson-tk1-grinch-19.3.8-modules.tar.bz2
sudo tar -C /lib -vxjf jetson-tk1-grinch-19.3.8-firmware.tar.bz2
sudo cp zImage /boot/zImage

c) Update DTB file

wget http://www.jarzebski.pl/files/jetsontk1/grinch-19.3.8/tegra124-pm375.dtb -O /boot/dtb/tegra124-pm375.dtb

HINT #1 - IF FLASH FAILED

edit flash.sh on line 284:

losetup /dev/loop0 system.img > /dev/null 2>&1

replace to:

losetup --find --show system.img

HINT #2 - WiFi mini-PCIe is hardblocked by rfkill

Note: If you update DTB file, you don’t need this.

sudo su
echo 191 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio191/direction
echo 1 > /sys/class/gpio/gpio191/value

HINT #3 - Update currently system (fastboot)

Note: if you update kernel to 19.3.3 from earlier versions, and you want enable PWM0, you need flash whole system :( sorry, dtb update is required now.

a) On Jetson TK1 download kernel_supplements.tbz2 from 1c) and unpack to / directory

b) Turn off Jetson TK1 and connect USB cable to PC-host and turn Jetson in RECOVERY mode.

c) Download Grinch zImage from 1c) and replace Linux_for_Tegra/kernel/zImage file

d) Flash Kernel

sudo ./flash.sh -k 6 jetson-tk1 mmcblk0p1

HINT #4 - Use of PWM0 on PU3 pin (Pin 49 on J3A2)

PWM0 is assigned to PU3 pin (Pin 49 on J3A2)
PWM2 is assigned to PU5 pin (Pin 55 on J3A2)
PWM3 is assigned to PU6 pin (Pin 58 on J3A2)

sudo su
cd /sys/class/pwm/pwmchip0
echo 0 > export
cd pwm0
echo 1000000 > period
echo 500000 > duty
echo 1 > enable

ToDo

  • fix VFP flushing regression on sigreturn path
  • support for Oculus Rift DK2
  • support for Nintendo Nunchuck (i2c devices)
  • user mode SPI device driver support
  • Tegra CEC support
  • high-speed modes for the PS3 Eye camera (QVGA capture at higher frame rates: 187, 150, and 137 FPS)

If you like my work, you can donate me on paypal: paypal@jarzebski.pl

Thanks to: Peter Bauer, David Cofer, Dustin Franklin, Todd Stellanova

How-To - Cook with The Grinch!

Build own kernel for Jetson TK1
DS3231 Battery Backup RTC

echo

Awesome!

Nice Santyago!

Let me ask you, since you based your build on L4T 19.3 3.10.24 kernel, how did you enabled PWM_SYSFS?

thanks :) i backport module from 3.11

Thanks, this is great for so many people! I will discuss with people at NVIDIA whether to add some of these settings to our official L4T kernel, but of course that might take weeks or months before it is ready, so your Grinch kernel looks great for now!

THANK YOU santyago, very useful!..

I haven’t downloaded and viewed the actual config file (so maybe this already has been added), but something else that would likely be useful for future releases, and which I compiled my own kernels with: ISO9660 filesystem (CDROM) and Joliet extension (CONFIG_ISO9660_FS and CONFIG_JOLIET). I happen to use this with an external USB CD/DVD.

I am happy that someone in handy. Any day should appear in version 19.3.2

linuxdev: good idea, i add to next release :)

Thanks so much for this.
It dropped right in, using your excellent instructions.

I notice someone already mentioned the config file you used to build the kernel.
It is available on your web site (e.g. via wget)?

OOPS, my bad, I just realized I could pull it off the board via /proc/config.gz.

Thanks again!

Please also enable CONFIG_FHANDLE=y, it’s required for systemd to work properly.

Questions

Do you still have to replug usb after boot to get the suspend to properly disable?

What about the hdmi log out issue?

Thanks

Hi Santyago, nice one ;)
I didn’t try the nvidia 19.3 before, so I don’t know if this is only a problem in your release. I have an
Bus 002 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
to which I try to connect a magic mouse. the problem isn’t the pairing or setup, but after I set it up as an input device, it still does not work, or sometimes it ends up with a nasty hardware freeze. any idea why this happens? maybe someone else experiences the same behaviour?
thanks.

At Hint #1 I have the following problem

(trusty)root@localhost:/home/ubuntu/Downloads/Linux_for_Tegra# ./flash.sh -S 14580MiB jetson-tk1 mmcblk0p1
copying dtbfile(/home/ubuntu/Downloads/Linux_for_Tegra/kernel/dtb/tegra124-pm375.dtb) to tegra124-pm375.dtb… done.
Making system.img… /home/ubuntu/Downloads/Linux_for_Tegra/rootfs 15288238080
/dev/loop1
formating filesystem on system.img failed.

Anyone know what I might do to fix this? It looks like the bit just after losetup is failing in the flash.sh script

mkfs -t ${rootfs_type} /dev/loop0 > /dev/null 2>&1;

@netphantm: i tested bt with paired my phone - it’s working. but i don’t testing with mouse or keyboard devices. i will check this soon.

@Ramsey: hmm, do you replace to “losetup --find --show system.img” ?

@beowulfs: no, autosupend is default disabled

Hello everyone. Here’s another version of the my custom kernel. What’s new in 19.3.2:

  • Added Parallel port support
  • Added Broadcom 43xx wireless drivers
  • Added new firmware: bcmdhd.cal, fw_bcmdhd.bin
  • Added IrDA subsystem support
  • Added support for various USB DVB devices
  • Added support for AM/FM radio receivers
  • Added support Remote Controllers
  • Added Kinect and Playstation Eye drivers
  • Added X-Box gamepad driver
  • Added ISO 9660 CDROM and UDF file system support
  • Added lots filters support for Netfilter
  • Added 802.1d Ethernet Bridging support
  • Added QoS fair queueing support
  • Enabling CONFIG_FHANDLE
  • Moving lots kernel options to modules

Unfortunately, going to be a moment for a week’s vacation. After returning back to work on the next version. There is still much to do! See you there!

I would suggest to also include autofs. I built the module for myself, but I think there are more that would benefit from this ;)
have a nice vacation

Yes. It fails at line 284 if I do not. I also have to sudo su first. /sbin/ is not in my path. I wonder if maybe I am missing support for the filesystem format being used by the flash.sh script.

Thank you very much!
i have driven my bluetooth dogle via this kernel, and I can connect my phone with it.
I also need help about which Pcie-mini card contains wifi and BT can be used with this kernel?
Thank you !

At the top of the script I included

set -x

To get debug output. The line that fails is

  • mkfs -t ext4 /dev/loop0
  • ‘[’ 1 -ne 0 ‘]’
  • echo ‘formating filesystem on system.img failed.’
    formating filesystem on system.img failed.

If I run that myself, the output is

(trusty)root@localhost:/home/ubuntu/Downloads/Linux_for_Tegra# mkfs -t ext4 /dev/loop0
mke2fs 1.42.9 (4-Feb-2014)
/dev/loop0 is apparently in use by the system; will not make a filesystem here!

I suspect this is due to the fact that I’m running linux using crouton on a chromebook.