ArchARM on Jetson TK1

This forum is for supported devices using an ARMv7 nVidia SoC.

ArchARM on Jetson TK1

Postby falstaff » Sun Jul 13, 2014 12:11 am

Hi,

I would like to contribute support for Jetson TK1 to ArchLinux ARM. On my board, I have ArchLinux ARM already running. There are several steps which now need to be automated/prebuilt or documented. This thread is now a mix of question to ArchLinux ARM developers and a preliminary documentation.

Bootloader
U-Boot need to be flashed along with a BCT (boot configuration table). The mainline developers created scripts on GitHub which compile U-Boot, then this BCT and allow to flash the whole package. Should I document all these steps or make shortcuts by providing prebuilt binaries? Currently these steps look like this:

Requirements:
From AUR:
  • cbootimage-git
  • tegrarcm-git
  • dtc
  • uboot-mkimage

From Arch Linux ARM:

Next clone the following repositories (all the repositories need to be in the same directory):

Now use the script to build U-Boot along with BCT and generate an image:
$this->bbcode_second_pass_code('', '
$ cd tegra-uboot-flasher-scripts
$ export CROSS_COMPILE=~/x-tools7h/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-
$ ./build --socs tegra124 --boards jetson-tk1 build
')

Put the Board into Recovery Mode by pressing the Recovery Mode and Reset button. You should see a USB device. In order to have access to the device, you need to be root:
$this->bbcode_second_pass_code('', '
$ lsusb
...
Bus 002 Device 026: ID 0955:7140 NVidia Corp.
...
# ./tegra-uboot-flasher flash jetson-tk1
')

Kernel
NVIDIA Jetson TK1 gets mainline support in 3.16, hence I tried to use the linux-armv7-rc package. However, the configuration file misses some configs. I now build a Kernel which makes use of the tegra_defconfig, which works flawless. Should I create a new package (linux-jetson) or submit a patch to alter the config in linux-armv7-rc? The header states "Automatically generated file;" I think this comes from the kernel build system itself.... Should I just send a patch/pull request with a modified config?

Root filesystem
This is quite easy since Jetson TK1 supports USB Client and "User Mass Storage". Enter U-Boot (on serial console) and type this command:
$this->bbcode_second_pass_code('', '
Tegra124 (Jetson TK1) # ums 0 mmc 0
')

You should get a mass storage device on your computer now.
$this->bbcode_second_pass_code('', '
# fdisk /dev/sd[x]
')

Use g to create a new GPT partition table, then n for a new partition. Format the partition with ext4 (btrfs is not supported by the boot loader which needs to read the kernel from the partition).
$this->bbcode_second_pass_code('', '
mkfs.ext4 /dev/sd[x]1
')

Now you can mount this directory and unpack the root filesystem.

A boot script can be created using https://github.com/NVIDIA/tegra-uboot-scripts.git. Altough it needs a small modification since it expects the dtbs directly in /boot (rather than /boot/dtbs). I guess it would be the easiest way to just include a premade boot.scr in the root filesystem. I will post a patch to extend the script to choose where to get the dtb file from.

Any advice welcome!

Update 23-07-2014: Make use of ArchLinuxARM toolchain
--
Stefan
Last edited by falstaff on Wed Jul 23, 2014 8:31 pm, edited 1 time in total.
--
falstaff
falstaff
 
Posts: 10
Joined: Mon Jun 24, 2013 8:08 am

Re: ArchARM on Jetson TK1

Postby kmihelich » Sun Jul 13, 2014 1:28 am

In addition to "Automatically generated file," the config also states a far more important piece of information: DO NOT EDIT.

Any submitted pull request for changes must be done through one of the various kernel configuration modes available to you.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: ArchARM on Jetson TK1

Postby WarheadsSE » Sun Jul 13, 2014 5:38 am

We would also suggest using our official chains for compilation.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: ArchARM on Jetson TK1

Postby falstaff » Sun Jul 13, 2014 6:39 pm

@kmihelich:

Of course I would do it through make nconfig or something. I first thought its generated by some Arch specific tools. So you would prefer to have Jetson TK1 in linux-armv7-rc (and linux-armv7 later on)? Right now mainline really seems to work flawless. I guess it would still be possible to add a Jetson TK1 specific patch or two if necessary wouldn't it?

@WarheadsSE, ok, will do this.

But in general what do you think? Should I provide a binary (containing U-Boot and the BCT, compiled with the official toolchain) or document the whole process?
--
falstaff
falstaff
 
Posts: 10
Joined: Mon Jun 24, 2013 8:08 am

Re: ArchARM on Jetson TK1

Postby WarheadsSE » Sun Jul 13, 2014 7:25 pm

If you document the whole process well, we'll work on replicating all the binaries and image bits into an image/series of images you can test for us. Until we can get a TK1, that's as close to official as we'll be able to get.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: ArchARM on Jetson TK1

Postby falstaff » Wed Jul 23, 2014 8:32 pm

Ok, I updated the documentation a bit and sent out a pull request which contains the extended config for Jetson TK1, see https://github.com/archlinuxarm/PKGBUILDs/pull/915

--
Stefan
--
falstaff
falstaff
 
Posts: 10
Joined: Mon Jun 24, 2013 8:08 am

Re: ArchARM on Jetson TK1

Postby vostok4 » Tue Sep 02, 2014 11:38 am

Any update on the uboot script patch?

Also do you have any luck getting the binary driver to work for GPU support?

I'm trying to find some time to hack on my TK1 to get this up and running, there is a XBMC port for TK1 that should take advantage of hardware acceleration as well, I'd love to get that going.
vostok4
 
Posts: 2
Joined: Sun Jan 29, 2012 1:08 am

Re: ArchARM on Jetson TK1

Postby joe1l » Wed Sep 03, 2014 3:39 pm

Hi Stephan,
Thank you very much for the write up. i finally was able to get my TK1 going using Arch the other day. Unfortunately i wasn't able to get 3.16 to display anything over hdmi so i downloaded the armv7rc kernel which is 3.17. that worked, i was able to get my display up but it wont recognize my ethernet. i ended up using an old usb wifi adapter and manually copied some packages over for install to get the wifi up.. i have ordered a usb ethernet dongle for the future.

so far i have tested xfce, kde,razorqt, gnome and openbox all are working. gnome is a bit slow... which is odd considering kde seems to be working smoother. xfce is what i will be mainly using but i was happy to test.. I have installed xbmc as well as mythtv and will be playing with them tonight.
joe1l
 
Posts: 3
Joined: Wed Sep 03, 2014 1:59 pm

Re: ArchARM on Jetson TK1

Postby WarheadsSE » Wed Sep 03, 2014 6:29 pm

Try flipping KDE into kwin_gles if you have EGL working.

Start KDE, then from a console --- kwin_gles --replace
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: ArchARM on Jetson TK1

Postby joe1l » Thu Sep 04, 2014 2:32 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'T')ry flipping KDE into kwin_gles if you have EGL working.

Start KDE, then from a console --- kwin_gles --replace


I actually have enabled native Opengl 3.1 under kde desktop effects settings but, i will try using kwin_gles tonight. i like KDE and use it on my desktop. one key reason i installed it was for its gui utilities. The default gnome utilities and settings console didnt work properly on the stock Ubuntu 14.04 using nvidias kernel. the KDE utilities and settings though all work properly.

i was able to get mythtv up and running last night on my tk1. i am going to need to figure out how to get hw acceleration to work using openmax. I decided to try mythtv first since it allows for config of external video player.. does anyone know of any packages worth trying.
joe1l
 
Posts: 3
Joined: Wed Sep 03, 2014 1:59 pm

Next

Return to nVidia

Who is online

Users browsing this forum: No registered users and 5 guests