Crosscompiling for TX1 - Cannot start jailhouse

56 views
Skip to first unread message

florian

unread,
Jun 21, 2017, 11:14:09 AM6/21/17
to Jailhouse
Hi,
I want to run jailhouse on the TX1 (like I described you Ralf).
Because we use the TX1 for several other projects I want to cross compile all the things (also the kernel, so kernel objects are available). I used the description of https://github.com/evidence/linux-jailhouse-tx1 and from the main github page and did following:

- After compiling on my laptop I moved the whole jailhouse directory to the TX1
- I manually inserted the kernel module with insmod driver/jailhouse.ko
- I also changed the firmware search path in /sys/module/firmware_class/parameters/path (pointing to the tools/jailhouse file.)
- After that I want to start jailhouse with 'tools/jailhouse enable configs/jetson-tx1.cell' but I always getting the error 'JAILHOUSE_ENABLE: No such file or directory'.

/dev/jailhouse also exists!

I do not know why this error occurs or why. It looks like failing in jailhouse.c enable function, that was the only place I found the string 'JAILHOUSE ENABLE'

Best regards!

Ralf Ramsauer

unread,
Jun 21, 2017, 11:39:14 AM6/21/17
to florian, Jailhouse
Hi,

On 06/21/2017 05:14 PM, 'florian' via Jailhouse wrote:
> Hi,
> I want to run jailhouse on the TX1 (like I described you Ralf).> Because we use the TX1 for several other projects I want to cross
compile all the things (also the kernel, so kernel objects are
available). I used the description of
https://github.com/evidence/linux-jailhouse-tx1 and from the main github
page and did following:
>
> - After compiling on my laptop I moved the whole jailhouse directory to the TX1
> - I manually inserted the kernel module with insmod driver/jailhouse.ko
> - I also changed the firmware search path in /sys/module/firmware_class/parameters/path (pointing to the tools/jailhouse file.)
Did you use an absolute path?
> - After that I want to start jailhouse with 'tools/jailhouse enable configs/jetson-tx1.cell' but I always getting the error 'JAILHOUSE_ENABLE: No such file or directory'.
Look at your kernel ring buffer (dmesg). I bet it's unable to locate the
firmware for some reason.

Ralf

florian

unread,
Jun 21, 2017, 11:45:04 AM6/21/17
to Jailhouse, flol...@googlemail.com, ralf.r...@oth-regensburg.de

root@tegra-ubuntu:~/linux-jailhouse-tx1# cat /sys/module/firmware_class/parameters/path
/home/ubuntu/linux-jailhouse-tx1/tools/jailhouse
So, yes its an absolute path.

Yes, you're right. I found this error
jailhouse: Missing hypervisor image jailhouse.bin
So the path must point to the jailhouse.bin file?

Claudio Scordino

unread,
Jun 21, 2017, 11:56:52 AM6/21/17
to florian, Jailhouse

Hi Florian,

Il 21/giu/2017 17:14, "'florian' via Jailhouse" <jailho...@googlegroups.com> ha scritto:
>
> Hi,
> I want to run jailhouse on the TX1 (like I described you Ralf).
> Because we use the TX1 for several other projects I want to cross compile all the things (also the kernel, so kernel objects are available). I used the description of https://github.com/evidence/linux-jailhouse-tx1

Note that this tree is meant for the Linux kernel 3.10 shipped by Nvidia.

If you instead have a newer kernel (4.7+) you must use the mainline Jailhouse tree.

Best regards,

      Claudio


florian

unread,
Jun 21, 2017, 11:58:54 AM6/21/17
to Jailhouse, flol...@googlemail.com
Yes I know, thanks for the hint.
At the moment I'm working with the Nvidia Kernel, just let all run one time before like describe in tutorials before changing something :)

Henning Schild

unread,
Jun 21, 2017, 11:59:07 AM6/21/17
to 'florian' via Jailhouse, flol...@googlemail.com, ralf.r...@oth-regensburg.de
Am Wed, 21 Jun 2017 08:45:04 -0700
schrieb 'florian' via Jailhouse <jailho...@googlegroups.com>:
You need to write to /sys/module/firmware_class/parameters/path with
"echo -n", no newline at the end. If that does not help copy or symlink
the firmware image to /lib/firmware/ or just use "make install".

Henning

Ralf Ramsauer

unread,
Jun 21, 2017, 12:00:42 PM6/21/17
to florian, Jailhouse


On 06/21/2017 05:45 PM, 'florian' via Jailhouse wrote:
> Am Mittwoch, 21. Juni 2017 17:39:14 UTC+2 schrieb Ralf Ramsauer:
>> Hi,
>>
>> On 06/21/2017 05:14 PM, 'florian' via Jailhouse wrote:
>>> Hi,
>>> I want to run jailhouse on the TX1 (like I described you Ralf).> Because we use the TX1 for several other projects I want to cross
>> compile all the things (also the kernel, so kernel objects are
>> available). I used the description of
>> https://github.com/evidence/linux-jailhouse-tx1 and from the main github
>> page and did following:
>>>
>>> - After compiling on my laptop I moved the whole jailhouse directory to the TX1
>>> - I manually inserted the kernel module with insmod driver/jailhouse.ko
>>> - I also changed the firmware search path in /sys/module/firmware_class/parameters/path (pointing to the tools/jailhouse file.)
>> Did you use an absolute path?
>>> - After that I want to start jailhouse with 'tools/jailhouse enable configs/jetson-tx1.cell' but I always getting the error 'JAILHOUSE_ENABLE: No such file or directory'.
>> Look at your kernel ring buffer (dmesg). I bet it's unable to locate the
>> firmware for some reason.
>>
>> Ralf
>>>
>>> /dev/jailhouse also exists!
>>>
>>> I do not know why this error occurs or why. It looks like failing in jailhouse.c enable function, that was the only place I found the string 'JAILHOUSE ENABLE'
>>>
>>> Best regards!
>>>
>
> root@tegra-ubuntu:~/linux-jailhouse-tx1# cat /sys/module/firmware_class/parameters/path
> /home/ubuntu/linux-jailhouse-tx1/tools/jailhouse
That's the wrong path. You're pointing to the userspace tool and not to
the hypervisor firmware binary, which is, in case of ARM and ARM64,
located at hypervisor/jailhouse.bin .

Besides that, I recommend to stick to the upstream repository, we're
already some patches ahead, especially if you're using a kernel >4.7.

There's a patch on top of the evidence repo that reverts some older
patch for compatibility with kernels <4.7. Evidence sticks to a pretty
old kernel version because they need official Nvidia binary blobs for
graphics support that are only available for bloody old kernel versions.

Ralf

Ralf Ramsauer

unread,
Jun 21, 2017, 12:04:59 PM6/21/17
to florian, Jailhouse
If you have no serious reasons (like Evidence does: graphics support) I
really recommend to use latest mainline jailhouse and a more recent kernel.

3.10 is more than outdated (released in 2013!), and it's hard for us to
support you if weird things happen.

Ralf

florian

unread,
Jun 22, 2017, 2:29:01 AM6/22/17
to Jailhouse, flol...@googlemail.com, ralf.r...@oth-regensburg.de
After pointing to the right directory it works for me. Thanks!

>
> Besides that, I recommend to stick to the upstream repository, we're
> already some patches ahead, especially if you're using a kernel >4.7.
>
> There's a patch on top of the evidence repo that reverts some older
> patch for compatibility with kernels <4.7. Evidence sticks to a pretty
> old kernel version because they need official Nvidia binary blobs for
> graphics support that are only available for bloody old kernel versions.
>
> Ralf

I know about this. I try to use it with a 4.9 kernel. One step at a time (for me)

Reply all
Reply to author
Forward
0 new messages