Nvidia Jetson SDK on Debian 8

This shit doesn’t work. Lets see what it does look like from miles above:
I’m trying it on a virtualized debian machine.


x230 iker ~/Descargas $ file JetPackTK1-1.1-cuda6.5-linux-x64.run
JetPackTK1-1.1-cuda6.5-linux-x64.run: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, stripped


x230 iker ~/Descargas $ strings JetPackTK1-1.1-cuda6.5-linux-x64.run | head
)}UPX!h
,m?A
.T}-
vNb{
1Uhh
8@/;
&*]QN
#LqV
!D|h
<2aig

Ok it seems compressed/packed using UPX


x230 iker ~/Descargas $ sudo apt-get install upx-ucl

x230 iker ~/Descargas/reversing $ upx --file-info JetPackTK1-1.1-cuda6.5-linux-x64.run
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2013
UPX 3.91 Markus Oberhumer, Laszlo Molnar & John Reiser Sep 30th 2013

JetPackTK1-1.1-cuda6.5-linux-x64.run [amd64-linux.elf, linux/ElfAMD]
14895249 bytes, not compressed by UPX

I still think it is a upx file and I’ve many options now but I am a bit upset with NVidia, ¿WHY?

Option 1) manually unpack the upx file
cons: This is like going back 15 years to the past and I am lazy now.
http://www.iosrjournals.org/iosr-jce/papers/Vol16-issue1/Version-1/L016117177.pdf
note: That pdf seems to be a uncredited rip off from other public sources but it is easier to link.

Option 2)
Give a quick look using strace and lsof
open(“/tmp/.bitrock_iker/.tmp_6743_9666236/wmImage.png”, O_RDONLY) = 10
Went there and saw the nvidia logo. They don’t even delete de file afterwards.
ok it seems they’re using a commercial packer called bitrock that probably uses an upx variant.

Option X) I’m lazy now.

========================

Option 2 is much faster now, let’s try it first.


x230 iker /tmp/.bitrock_iker $ ls -la
drwxr-xr-x 2 iker iker 20480 jur 0 16:12 .tmp_6657_50973
drwxr-xr-x 2 iker iker 20480 jur 0 16:13 .tmp_6743_9666236
drwxr-xr-x 2 iker iker 20480 jur 0 16:15 .tmp_6788_5332916

The tmp numbers increase as time increases. It does not pretend to be random.

Ok it does leave a log here:

x230 iker /tmp $ ls -l bitrock_installer*
-rw------- 1 iker iker 1893 jur 0 16:12 bitrock_installer_6657.log
-rw------- 1 iker iker 1893 jur 0 16:13 bitrock_installer_6743.log
-rw------- 1 iker iker 1893 jur 0 16:15 bitrock_installer_6788.log

And the log explains what it is doing to check the version:


Setting variable ubuntu_version from /bin/bash -c " awk 'NF {print \$2}' /etc/issue | cut -b 1-5 "
Script exit code: 0

Script output:
GNU/L

So let’s see:

x230 iker /tmp $ cat /etc/issue
Debian GNU/Linux 8 \n \l

Let’s see what ubuntu says to common OS questions (taken from the web, I didn’t check them, just to get an idea)


ubuntu $ cat /etc/issue
Ubuntu 12.04.2 LTS \n \l

ubuntu $ cat /etc/issue.net
Ubuntu 12.04.2 LTS

ubuntu $ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"

ubuntu $ cat /etc/os-release
NAME="Ubuntu"
VERSION="12.04.2 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.2 LTS)"
VERSION_ID="12.04"

ubuntu $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise

We’ll I don’t have enough space on the hard disk to install it yet but the install GUI appears as on Ubuntu if I change /etc/issue

Update1:

It begins well until it gives an error with:

Failed to install one or more of the following packages:

g++-arm-linux-gnueabihf
gcc-arm-linux-gnueabihf
cuda-toolkit-6-5 cuda-cross-armhf-6-5
libgomp1-armhf-cross.

Please make sure they are correctly installed with apt-get command before continuing installation.


x230 iker ~ $ apt-cache search cuda-toolkit-6-5
cuda-toolkit-6-5 - CUDA Toolkit 6.5 meta-package

x230 iker ~ $ apt-cache search cuda-cross-armhf-6-5
cuda-cross-armhf-6-5 - CUDA 6.5 cross-platform meta-package

The compilers and the libgomp are missing.
The installer finishes and leaves that error to be handled later so I did this:


ref: https://wiki.debian.org/CrossToolchains

x230 iker ~ $ curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -

x230 iker ~ $ sudo vim /etc/apt/sources.list.d/crosstools.list
deb http://emdebian.org/tools/debian/ jessie main

x230 iker ~ $ sudo dpkg --add-architecture armhf
x230 iker ~ $ sudo apt-get update
x230 iker ~ $ sudo apt-get install crossbuild-essential-armhf

Output...
Configurando libgomp1:armhf (4.9.2-10) ...
Configurando gcc-arm-linux-gnueabihf (4.9.2-10.1) ...
Configurando g++-arm-linux-gnueabihf (4.9.2-10.1) ...
...

x230 iker ~ $ ls -l /usr/bin/arm-linux-gnueabihf-g++
lrwxrwxrwx 1 root root 27 ene 17 06:10 /usr/bin/arm-linux-gnueabihf-g++ -> arm-linux-gnueabihf-g++-4.9

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s