[question] how to boot linux in cell linux

88 views
Skip to first unread message

Zhangjun (V)

unread,
Jul 14, 2015, 4:55:26 AM7/14/15
to jailho...@googlegroups.com

Hi All,

 

I found there is a linux-loader demo in inmates. How can I use that to boot a linux?

 

Do you have any instruction?

 

 

Jan Kiszka

unread,
Jul 14, 2015, 6:32:21 AM7/14/15
to Zhangjun (V), jailho...@googlegroups.com
Yes, check Documentation/non-root-linux.txt in git. Please let us know
if something is unclear or missing.

Jan

--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

Zhangjun (V)

unread,
Jul 14, 2015, 8:24:45 AM7/14/15
to Jan Kiszka, jailho...@googlegroups.com
>Yes, check Documentation/non-root-linux.txt in git. Please let us know if something is unclear or missing.

The documentation is not easily to understand. The following description means we can create, load and start a linux cell only through just one command?

------------------------------------------------------------------------------------------------------------------
To create, load and start a Linxu cell and use the first UART as console, issue

jailhouse cell linux /path/to/linux.cell /path/to/bzImage \
-i /path/to/initrd -c "console=ttyS0,1152000"

-----邮件原件-----
发件人: jailho...@googlegroups.com [mailto:jailho...@googlegroups.com] 代表 Jan Kiszka
发送时间: 2015年7月14日 18:32
收件人: Zhangjun (V); jailho...@googlegroups.com
主题: Re: [question] how to boot linux in cell linux
--
You received this message because you are subscribed to the Google Groups "Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jailhouse-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jan Kiszka

unread,
Jul 14, 2015, 8:25:12 AM7/14/15
to Zhangjun (V), jailho...@googlegroups.com
On 2015-07-14 14:21, Zhangjun (V) wrote:
>> Yes, check Documentation/non-root-linux.txt in git. Please let us know if something is unclear or missing.
>
> The documentation is not easily to understand. The following description means we can create, load and start a linux cell only through just one command?
>
> ------------------------------------------------------------------------------------------------------------------
> To create, load and start a Linxu cell and use the first UART as console, issue
>
> jailhouse cell linux /path/to/linux.cell /path/to/bzImage \
> -i /path/to/initrd -c "console=ttyS0,1152000"

Yes, it's only a single command.

Jan

Zhangjun (V)

unread,
Jul 14, 2015, 8:35:32 AM7/14/15
to Jan Kiszka, jailho...@googlegroups.com

RiverForest:/home/jailhouse-master/tools # ./jailhouse enable ../configs/a.cell

RiverForest:/home/jailhouse-master/tools # ./jailhouse cell linux ../configs/linux-x86-demo.cell ../bzImage -i ../initrd -c "console=ttyS0,115200"
execvp: Permission denied

Is there any suggestion?

-----邮件原件-----
发件人: Jan Kiszka [mailto:jan.k...@siemens.com]
发送时间: 2015年7月14日 20:25
收件人: Zhangjun (V); jailho...@googlegroups.com
主题: Re: 答复: [question] how to boot linux in cell linux

Jan Kiszka

unread,
Jul 14, 2015, 8:37:05 AM7/14/15
to Zhangjun (V), jailho...@googlegroups.com
On 2015-07-14 14:35, Zhangjun (V) wrote:
>
> RiverForest:/home/jailhouse-master/tools # ./jailhouse enable ../configs/a.cell
>
> RiverForest:/home/jailhouse-master/tools # ./jailhouse cell linux ../configs/linux-x86-demo.cell ../bzImage -i ../initrd -c "console=ttyS0,115200"
> execvp: Permission denied
>
> Is there any suggestion?

Make sile that jailhouse-cell-linux was properly installed and can be
found by the jailhouse tool. "make install" should suffice.

Zhangjun (V)

unread,
Jul 14, 2015, 8:43:39 AM7/14/15
to Jan Kiszka, jailho...@googlegroups.com
After make install, the result is the same.

-----邮件原件-----
发件人: jailho...@googlegroups.com [mailto:jailho...@googlegroups.com] 代表 Jan Kiszka
发送时间: 2015年7月14日 20:37
收件人: Zhangjun (V); jailho...@googlegroups.com
主题: Re: 答复: 答复: [question] how to boot linux in cell linux

Jan Kiszka

unread,
Jul 14, 2015, 8:50:22 AM7/14/15
to Zhangjun (V), jailho...@googlegroups.com
On 2015-07-14 14:40, Zhangjun (V) wrote:
> After make install, the result is the same.

Ah, sorry, missed that you are already running from the source
directory. Is ./jailhouse-cell-linux executable? Does "./jailhouse cell
linux" dump the usage messages for you?

Jan

Zhangjun (V)

unread,
Jul 14, 2015, 8:50:33 PM7/14/15
to Jan Kiszka, jailho...@googlegroups.com

>Ah, sorry, missed that you are already running from the source directory. Is ./jailhouse-cell-linux executable? Does "./jailhouse cell linux" dump the usage messages for you?

There isn't any usage messages.

RiverForest:/home/jailhouse-master/tools # ./jailhouse cell linux
execvp: Permission denied

-----邮件原件-----
发件人: jailho...@googlegroups.com [mailto:jailho...@googlegroups.com] 代表 Jan Kiszka
发送时间: 2015年7月14日 20:50
收件人: Zhangjun (V); jailho...@googlegroups.com
主题: Re: 答复: [question] how to boot linux in cell linux

Zhangjun (V)

unread,
Jul 14, 2015, 9:34:58 PM7/14/15
to Jan Kiszka, jailho...@googlegroups.com
Sorry, After change the jailhouse-cell-linux file to the executable file. The error message change to:


RiverForest:/home/jailhouse-master/tools # ./jailhouse cell linux
execvp: No such file or directory
RiverForest:/home/jailhouse-master/tools # ./jailhouse cell linux ../configs/linux-x86-demo.cell ../bzImage -i ../initrd -c "console=ttyS0,115200"
execvp: No such file or directory

-----邮件原件-----
发件人: Zhangjun (V)
发送时间: 2015年7月15日 8:50
收件人: 'Jan Kiszka'; jailho...@googlegroups.com
主题: 答复: [question] how to boot linux in cell linux


>Ah, sorry, missed that you are already running from the source directory. Is ./jailhouse-cell-linux executable? Does "./jailhouse cell linux" dump the usage messages for you?

There isn't any usage messages.

RiverForest:/home/jailhouse-master/tools # ./jailhouse cell linux
execvp: Permission denied

-----邮件原件-----
发件人: jailho...@googlegroups.com [mailto:jailho...@googlegroups.com] 代表 Jan Kiszka
发送时间: 2015年7月14日 20:50
收件人: Zhangjun (V); jailho...@googlegroups.com
主题: Re: 答复: [question] how to boot linux in cell linux

Zhangjun (V)

unread,
Jul 14, 2015, 10:29:28 PM7/14/15
to Jan Kiszka, jailho...@googlegroups.com
It is solved.

There is no python under /usr/bin. We rename python2.7.10 to python, and solve this issue.

-----邮件原件-----
发件人: jailho...@googlegroups.com [mailto:jailho...@googlegroups.com] 代表 Zhangjun (V)
发送时间: 2015年7月15日 9:01

Zhangjun (V)

unread,
Jul 14, 2015, 11:23:49 PM7/14/15
to jailho...@googlegroups.com, Jan Kiszka
I print the PATH, the script is actually existed in the directory.

RiverForest:/home/jailhouse-master/tools # ls
1.txt jailhouse jailhouse-config-collect
12.txt jailhouse-cell-linux jailhouse-config-collect.tmpl
2.txt jailhouse-cell-list jailhouse-config-create
3.txt jailhouse-cell-stats jailhouse.c
Makefile jailhouse-completion.bash root-cell-config.c.tmpl


RiverForest:/home/jailhouse-master/tools # ./jailhouse cell linux
kevin>> PATH=.:/usr/local/libexec/jailhouse:/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/local/libexec/jailhouse
kevin>>0 script jailhouse-cell-linux linux
execvp: No such file or directory

RiverForest:/home/jailhouse-master/tools # ls /usr/local/libexec/jailhouse/
jailhouse-cell-linux jailhouse-cell-stats jailhouse-config-create
jailhouse-cell-list jailhouse-config-collect linux-loader.bin
RiverForest:/home/jailhouse-master/tools #
RiverForest:/home/jailhouse-master/tools #

-----邮件原件-----
发件人: Zhangjun (V)
发送时间: 2015年7月15日 9:01
收件人: 'Jan Kiszka'; 'jailho...@googlegroups.com'
主题: 答复: [question] how to boot linux in cell linux

Sorry, After change the jailhouse-cell-linux file to the executable file. The error message change to:


RiverForest:/home/jailhouse-master/tools # ./jailhouse cell linux
execvp: No such file or directory
RiverForest:/home/jailhouse-master/tools # ./jailhouse cell linux ../configs/linux-x86-demo.cell ../bzImage -i ../initrd -c "console=ttyS0,115200"
execvp: No such file or directory

-----邮件原件-----
发件人: Zhangjun (V)
发送时间: 2015年7月15日 8:50
收件人: 'Jan Kiszka'; jailho...@googlegroups.com
主题: 答复: [question] how to boot linux in cell linux


>Ah, sorry, missed that you are already running from the source directory. Is ./jailhouse-cell-linux executable? Does "./jailhouse cell linux" dump the usage messages for you?

There isn't any usage messages.

RiverForest:/home/jailhouse-master/tools # ./jailhouse cell linux
execvp: Permission denied

-----邮件原件-----
发件人: jailho...@googlegroups.com [mailto:jailho...@googlegroups.com] 代表 Jan Kiszka
发送时间: 2015年7月14日 20:50
收件人: Zhangjun (V); jailho...@googlegroups.com
主题: Re: 答复: [question] how to boot linux in cell linux

Jan Kiszka

unread,
Jul 15, 2015, 1:46:48 AM7/15/15
to Zhangjun (V), jailho...@googlegroups.com
On 2015-07-15 04:25, Zhangjun (V) wrote:
> It is solved.
>
> There is no python under /usr/bin. We rename python2.7.10 to python, and solve this issue.

Were there a "python" under a different path? Then I guess we need this
change:

diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux
index 245ba13..4a125f1 100755
--- a/tools/jailhouse-cell-linux
+++ b/tools/jailhouse-cell-linux
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python

# Jailhouse, a Linux-based partitioning hypervisor
#

Zhangjun (V)

unread,
Jul 15, 2015, 2:05:49 AM7/15/15
to Jan Kiszka, jailho...@googlegroups.com
>Were there a "python" under a different path? Then I guess we need this
>change:

>diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux index 245ba13..4a125f1 100755
>--- a/tools/jailhouse-cell-linux
>+++ b/tools/jailhouse-cell-linux
>@@ -1,4 +1,4 @@
>-#!/usr/bin/python
>+#!/usr/bin/env python

># Jailhouse, a Linux-based partitioning hypervisor #

Yes, I agree with you.

-----邮件原件-----
发件人: jailho...@googlegroups.com [mailto:jailho...@googlegroups.com] 代表 Jan Kiszka
发送时间: 2015年7月15日 13:47
收件人: Zhangjun (V); jailho...@googlegroups.com
主题: Re: 答复: 答复: [question] how to boot linux in cell linux

Valentine Sinitsyn

unread,
Jul 15, 2015, 3:17:15 AM7/15/15
to Zhangjun (V), Jan Kiszka, jailho...@googlegroups.com
Hi all,

On 15.07.2015 10:50, Zhangjun (V) wrote:
>> Were there a "python" under a different path? Then I guess we need this
>> change:
>
>> diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux index 245ba13..4a125f1 100755
>> --- a/tools/jailhouse-cell-linux
>> +++ b/tools/jailhouse-cell-linux
>> @@ -1,4 +1,4 @@
>> -#!/usr/bin/python
>> +#!/usr/bin/env python
>
> ># Jailhouse, a Linux-based partitioning hypervisor #
>
> Yes, I agree with you.
Also keep in mind this would be Python 3 on many systems. Although as we
strive for the version-agnostic code in config tool, this shouldn't be
an issue.

Valentine

Jan Kiszka

unread,
Jul 15, 2015, 3:59:16 AM7/15/15
to Valentine Sinitsyn, Zhangjun (V), jailho...@googlegroups.com
Yes, the script worked fine in my tests over Python 3.
Reply all
Reply to author
Forward
0 new messages