尝试使用官方jailhouse-images仓库运行jailhouse

jailhouse 的官方 demo 演示仓库

Demo and testing images: https://github.com/siemens/jailhouse-images
通过jailhouse 的官方 demo 演示仓库,可以直接编译出带有部署有jailhouse程序的Linux镜像,有多个目标平台的Linux镜像可选,也有在qemu下的镜像。

参考文档:https://bbs.csdn.net/topics/615164494

运行环境准备

操作系统:Ubuntu22.04
运行主机:PVE 虚拟机

安装git 和 docker

sudo apt install git
sudo apt install docker.io

配置docker

运行 docker 本身需要 root 权限,而执行脚本时又不允许使用 sudo 命令。所以需要配置 docker 无 sudo 运行。
docker守护程序以root用户身份运行,如果不想以sudo作为docker命令的开头,创建一个名为docker的unix组并将用户添加到其中
创建docker组

sudo groupadd docker

把自己的用户添加到docker组

sudo usermod -aG docker $USER

激活对组的更改

newgrp docker

检测不用sudo能否运行docker指令

docker run hello-world

运行记录如下:

scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$ sudo groupadd docker
[sudo] password for scilogyhunter:
groupadd: group 'docker' already exists
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$ sudo usermod -aG docker $USER
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$ newgrp docker
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete
Digest: sha256:a26bff933ddc26d5cdf7faa98b4ae1e3ec20c4985e6f87ac0973052224d24302
Status: Downloaded newer image for hello-world:latestHello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/

下载jailhouse-images

git clone https://github.com/siemens/jailhouse-images.git

编译 demo 镜像

进入jailhouse-images 文件夹,执行./kas-container menu 命令。期间要下载 docker 镜像会比较耗时,约 1 个小时。
下载结束后会弹出选择窗口,选择要编译的镜像
在这里插入图片描述

运行过程打印信息。

scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$ ./kas-container menu
Unable to find image 'ghcr.io/siemens/kas/kas-isar:2.6.2' locally
2.6.2: Pulling from siemens/kas/kas-isar
b380bbd43752: Pull complete
d1bed1a2c34e: Pull complete
560c30a1ba9b: Pull complete
d50a6cc4bf45: Pull complete
34feb3868092: Pull complete
6815c7d4b9d8: Pull complete
3481406e04ed: Pull complete
2c8c2fa9ca93: Pull complete
7065e04db92d: Pull complete
26adc2492566: Pull complete
a060224959b1: Pull complete
Digest: sha256:3ac77685623872c2c6461a7f77ed4694aa8647e44314ed4ad47539078426a904
Status: Downloaded newer image for ghcr.io/siemens/kas/kas-isar:2.6.2
2024-05-08 08:53:53 - INFO     - kas 2.6.2 started
2024-05-08 08:56:15 - INFO     - Saving configuration as /work/.config.yaml
2024-05-08 08:56:15 - INFO     - Saving configuration as /work/.config.yaml
2024-05-08 08:56:15 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-08 08:56:15 - INFO     - Using /repo as root for repository jailhouse
2024-05-08 08:56:15 - INFO     - /work$ git clone -q https://github.com/ilbers/isar /work/isar
2024-05-08 08:57:33 - INFO     - Repository isar cloned
2024-05-08 08:57:33 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-08 08:57:33 - INFO     - Using /repo as root for repository jailhouse
2024-05-08 08:57:33 - INFO     - /work/isar$ git status -s
2024-05-08 08:57:33 - INFO     - /work/isar$ git rev-parse --verify -q origin/5f87d48f279761c2fefef1db16b4ccb5b955a364
2024-05-08 08:57:33 - INFO     - /work/isar$ git checkout -q 5f87d48f279761c2fefef1db16b4ccb5b955a364
2024-05-08 08:57:33 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-08 08:57:33 - INFO     - Using /repo as root for repository jailhouse
2024-05-08 08:57:33 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-08 08:57:33 - INFO     - Using /repo as root for repository jailhouse
2024-05-08 08:57:33 - INFO     - /work/isar$ /tmp/tmpodpia85r/get_bb_env /build
2024-05-08 08:57:33 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-08 08:57:33 - INFO     - Using /repo as root for repository jailhouse
2024-05-08 08:57:33 - INFO     - /build$ /work/isar/bitbake/bin/bitbake -c build mc:qemu-amd64-jailhouse-demo:demo-image
Parsing recipes: 100% |######################################################################################################################################| Time: 0:00:00
Parsing of 38 .bb files complete (0 cached, 38 parsed). 76 targets, 0 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |###################################################################################################################################| Time: 0:00:00
NOTE: No setscene tasks
NOTE: Executing Tasks
WARNING: mc:qemu-amd64-jailhouse-demo:linux-jailhouse-5.15.86-r0 do_fetch: Failed to fetch URL https://github.com/siemens/linux/archive/9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz;downloadfilename=linux-9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz, attempting MIRRORS if available
ERROR: mc:qemu-amd64-jailhouse-demo:linux-jailhouse-5.15.86-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export GIT_PROXY_COMMAND="oe-git-proxy"; export NO_PROXY="*"; export PATH="/work/isar/scripts:/work/isar/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin"; export HOME="/tmp/tmpjyf8u5av"; /usr/bin/env wget -t 2 -T 30 --passive-ftp --no-check-certificate -O /build/downloads/linux-9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz -P /build/downloads 'https://github.com/siemens/linux/archive/9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz' --progress=dot -v failed with exit code 4, output:
--2024-05-08 08:57:35--  https://github.com/siemens/linux/archive/9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... Read error (Success.) in headers.
Retrying.--2024-05-08 08:57:46--  (try: 2)  https://github.com/siemens/linux/archive/9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz
Connecting to github.com (github.com)|20.205.243.166|:443... failed: Connection timed out.
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... failed: Connection timed out.
Giving up.ERROR: mc:qemu-amd64-jailhouse-demo:linux-jailhouse-5.15.86-r0 do_fetch: Fetcher failure for URL: 'https://github.com/siemens/linux/archive/9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz;downloadfilename=linux-9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /build/tmp/work/jailhouse-demo-amd64/linux-jailhouse/5.15.86-r0/temp/log.do_fetch.255
ERROR: Task (mc:qemu-amd64-jailhouse-demo:/repo/recipes-kernel/linux/linux-jailhouse_5.15.86.bb:do_fetch) failed with exit code '1'
ERROR: mc:qemu-amd64-jailhouse-demo:jailhouse-jailhouse-0.9999-next-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export GIT_PROXY_COMMAND="oe-git-proxy"; export NO_PROXY="*"; export PATH="/work/isar/scripts:/work/isar/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin"; export HOME="/tmp/tmpjyf8u5av"; git -c core.fsyncobjectfiles=0 ls-remote https://github.com/siemens/jailhouse  failed with exit code 128, output:
fatal: unable to access 'https://github.com/siemens/jailhouse/': Operation timed out after 300028 milliseconds with 0 out of 0 bytes receivedERROR: Logfile of failure stored in: /build/tmp/work/jailhouse-demo-amd64/jailhouse-jailhouse/0.9999-next-r0/temp/log.do_fetch.305
ERROR: Task (mc:qemu-amd64-jailhouse-demo:/repo/recipes-jailhouse/jailhouse/jailhouse_latest.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 21 tasks of which 0 didn't need to be rerun and 2 failed.Summary: 2 tasks failed:mc:qemu-amd64-jailhouse-demo:/repo/recipes-kernel/linux/linux-jailhouse_5.15.86.bb:do_fetchmc:qemu-amd64-jailhouse-demo:/repo/recipes-jailhouse/jailhouse/jailhouse_latest.bb:do_fetch
Summary: There was 1 WARNING message shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
2024-05-08 09:04:02 - ERROR    - Command returned non-zero exit status 1
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$

运行报错,下载
https://github.com/siemens/linux/archive/9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz;downloadfilename=linux-9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz失败。

ERROR: mc:qemu-amd64-jailhouse-demo:linux-jailhouse-5.15.86-r0 do_fetch: Fetcher failure for URL: 'https://github.com/siemens/linux/archive/9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz;downloadfilename=linux-9f943ff23cec02b0b2db9e777197fb298ca2c4aa.tar.gz'. Unable to fetch URL from any source.

尝试再次运行,编译成功。
之前的报错可能是因为需要境外下载,速度太慢,总是超时的原因。可以考虑翻墙加速。

scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$ ./kas-container menu
2024-05-08 09:24:13 - INFO     - kas 2.6.2 started
2024-05-08 09:27:13 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-08 09:27:13 - INFO     - Using /repo as root for repository jailhouse
2024-05-08 09:27:13 - INFO     - /work/isar$ git remote set-url origin https://github.com/ilbers/isar
2024-05-08 09:27:13 - INFO     - /work/isar$ git cat-file -t 5f87d48f279761c2fefef1db16b4ccb5b955a364
2024-05-08 09:27:13 - INFO     - Repository isar already contains 5f87d48f279761c2fefef1db16b4ccb5b955a364 as commit
2024-05-08 09:27:13 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-08 09:27:13 - INFO     - Using /repo as root for repository jailhouse
2024-05-08 09:27:13 - INFO     - /work/isar$ git status -s
2024-05-08 09:27:14 - INFO     - /work/isar$ git rev-parse --verify -q origin/5f87d48f279761c2fefef1db16b4ccb5b955a364
2024-05-08 09:27:14 - INFO     - /work/isar$ git checkout -q 5f87d48f279761c2fefef1db16b4ccb5b955a364
2024-05-08 09:27:14 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-08 09:27:14 - INFO     - Using /repo as root for repository jailhouse
2024-05-08 09:27:14 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-08 09:27:14 - INFO     - Using /repo as root for repository jailhouse
2024-05-08 09:27:14 - INFO     - /work/isar$ /tmp/tmpitjgwfjl/get_bb_env /build
2024-05-08 09:27:14 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-08 09:27:14 - INFO     - Using /repo as root for repository jailhouse
2024-05-08 09:27:14 - INFO     - /build$ /work/isar/bitbake/bin/bitbake -c build mc:qemu-amd64-jailhouse-demo:demo-image
Loading cache: 100% |########################################################################################################################################| Time: 0:00:00
Loaded 76 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |###################################################################################################################################| Time: 0:00:00
NOTE: No setscene tasks
NOTE: Executing Tasks
jailhouse-latest: Building revision d6e64f901e6d
NOTE: Tasks Summary: Attempted 89 tasks of which 19 didn't need to be rerun and all succeeded.
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$

编译出的镜像在build/tmp/deploy/images/qemu-amd64/路径下

scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$ ls build/tmp/deploy/images/qemu-amd64/
demo-image-1.0-r0.dpkg_status  demo-image-jailhouse-demo-qemu-amd64.ext4.img    demo-image-jailhouse-demo-qemu-amd64-vmlinuz
demo-image-1.0-r0.manifest     demo-image-jailhouse-demo-qemu-amd64-initrd.img
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$

安装 qemu

scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$ sudo apt install qemu qemu-kvm virt-manager bridge-utils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'qemu-system-x86' instead of 'qemu-kvm'
。
。scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$ qemu-system-x86_64 -version
QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.19)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$ uname -a
Linux scilogyhunter-Standard-PC-i440FX-PIIX-1996 6.5.0-27-generic #28~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 15 10:51:06 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$

在qemu 中运行 jailhouse 镜像

执行./start-qemu.sh x86 命令,让编译出的 x86-qemu-jailhouse 镜像在 qemu 中运行。
在这里插入图片描述

执行命令行,命令行会停止,在图形界面是上会出现启动的 qemu 系统窗口。
登录系统,用户名密码都是 root
在这里插入图片描述

接下来在qemu 系统窗口中运行 jailhouse。

jailhouse 运行

  1. 安装 内核模块
sudo  insmod  /lib/modules/5.10.153-phytium-embeded-v2.0/jailhouse/driver/jailhouse.ko 
sudo  insmod  /lib/modules/4.19.246-phytium-embeded-v2.0/jailhouse/driver/jailhouse.ko
  1. 启动 jailhouse
sudo jailhouse enable /etc/jailhouse/e2000q.cell
  1. 查看 cell 列表
jailhouse  cell list
  1. 创建非 root cell
sudo jailhouse cell create /etc/jailhouse/e2000q-inmate-demo.cell
sudo jailhouse cell create /etc/jailhouse/e2000q-inmate-rtos64.cell;
  1. 加载非 root cell 镜像
sudo jailhouse cell load 1 /usr/local/libexec/jailhouse/demos/gic-demo.bin
sudo jailhouse cell load 1 /usr/local/libexec/jailhouse/demos/ivshmem-demo.bin
sudo jailhouse cell load 1 /usr/local/libexec/jailhouse/demos/uart-demo.bin
sudo jailhouse cell load 1 freertos64.bin --address 0x80100000;
  1. 启动非 root cell
sudo jailhouse cell start 1;

当前运行环境是 inter x86 安装 PVE,PVE 下安装 Ubuntu2204 虚拟机,Ubuntu2204 虚拟机下安装qemu,qemu 里跑编译出的 jailhouse 系统镜像,启动jailhouse 系统会卡死。

下面换到inter x86 直接安装Ubuntu2204,Ubuntu2204 下安装qemu,qemu 里跑编译出的 jailhouse 系统镜像。执行效果和在 PVE 虚拟机里的情况一样,在使能 jailhouse 时,完全卡死。

scilogyhunter@ubuntu2204:~/jailhouse-images$ ./start-qemu.sh x86Initializing Jailhouse hypervisor v0.12 (342-gd6e64f90) on CPU 1
Code location: 0xfffffffff0000050
Using x2APIC
Page pool usage after early setup: mem 47/975, remap 0/131072
Initializing processors:CPU 1... (APIC ID 1) OKCPU 3... (APIC ID 3) OKCPU 0... (APIC ID 0) OKCPU 2... (APIC ID 2) OK
Initializing unit: VT-d
DMAR unit @0xfed90000/0x1000
Reserving 24 interrupt(s) for device ff:00.0 at index 0
Initializing unit: IOAPIC
Initializing unit: Cache Allocation Technology
Initializing unit: PCI
Adding PCI device 00:01.0 to cell "QEMU-VM"
Adding PCI device 00:02.0 to cell "QEMU-VM"
Reserving 5 interrupt(s) for device 00:02.0 at index 24
Adding PCI device 00:03.0 to cell "QEMU-VM"
Reserving 1 interrupt(s) for device 00:03.0 at index 29
Adding PCI device 00:1b.0 to cell "QEMU-VM"
Reserving 1 interrupt(s) for device 00:1b.0 at index 30
Adding PCI device 00:1f.0 to cell "QEMU-VM"
Adding PCI device 00:1f.2 to cell "QEMU-VM"
Reserving 1 interrupt(s) for device 00:1f.2 at index 31
Adding PCI device 00:1f.3 to cell "QEMU-VM"
Adding PCI device 00:1f.7 to cell "QEMU-VM"
Reserving 2 interrupt(s) for device 00:1f.7 at index 32
Adding virtual PCI device 01:0c.0 to cell "QEMU-VM"
Adding virtual PCI device 01:0d.0 to cell "QEMU-VM"
Adding virtual PCI device 01:0e.0 to cell "QEMU-VM"
Adding virtual PCI device 01:0f.0 to cell "QEMU-VM"
Page pool usage after late setup: mem 271/975, remap 65543/131072
Activating hypervisor
FATAL: Invalid MMIO/RAM read, addr: 0x00000000fead4024 size: 4
RIP: 0xffffffffa01a37ab RSP: 0xffffc90000124ef8 FLAGS: 10046
RAX: 0xffffc900003dc000 RBX: 0xffff8880033f4828 RCX: 0x000000000000080b
RDX: 0x0000000000000001 RSI: 0xffff8880033f4828 RDI: 0xffff8880033f4cc0
CS: 10 BASE: 0x0000000000000000 AR-BYTES: a09b EFER.LMA 1
CR0: 0x0000000080050033 CR3: 0x00000000052ce005 CR4: 0x0000000000372ea0
EFER: 0x0000000000000d01
Parking CPU 3 (Cell: "QEMU-VM")
FATAL: Invalid MMIO/RAM read, addr: 0x00000000fea84000 size: 4
RIP: 0xffffffffa00107af RSP: 0xffffc90000143e18 FLAGS: 10246
RAX: 0xffffc90000360000 RBX: 0xffff88803f3c88c0 RCX: 0x0001020304050608
RDX: 0x0000000000000001 RSI: 0x0000000000000000 RDI: 0xffff88803f3c88c0
CS: 10 BASE: 0x0000000000000000 AR-BYTES: a09b EFER.LMA 1
CR0: 0x0000000080050033 CR3: 0x000000000200a003 CR4: 0x0000000000372eb0
EFER: 0x0000000000000d01
Parking CPU 0 (Cell: "QEMU-VM")
FATAL: Invalid MMIO/RAM write, addr: 0x00000000feada3b8 size: 4
RIP: 0xffffffff815a294e RSP: 0xffffc90000333bc8 FLAGS: 10006
RAX: 0xffffc90000039380 RBX: 0xffff8880037fc8b0 RCX: 0x0000000000000008
RDX: 0x0000000000000100 RSI: 0xffff8880050ac028 RDI: 0xffff8880037fc000
CS: 10 BASE: 0x0000000000000000 AR-BYTES: a09b EFER.LMA 1
CR0: 0x0000000080050033 CR3: 0x0000000005008005 CR4: 0x0000000000372ea0
EFER: 0x0000000000000d01
Parking CPU 1 (Cell: "QEMU-VM")

尝试编译一个 x86 物理机里运行的 jailhouse 镜像,然后安装到 x86 物理机上运行。
在这里插入图片描述

编译报错

scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$ ./kas-container menu
2024-05-10 07:43:58 - INFO     - kas 2.6.2 started
2024-05-10 07:44:15 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-10 07:44:15 - INFO     - Using /repo as root for repository jailhouse
2024-05-10 07:44:15 - INFO     - /work/isar$ git remote set-url origin https://github.com/ilbers/isar
2024-05-10 07:44:15 - INFO     - /work/isar$ git cat-file -t 5f87d48f279761c2fefef1db16b4ccb5b955a364
2024-05-10 07:44:15 - INFO     - Repository isar already contains 5f87d48f279761c2fefef1db16b4ccb5b955a364 as commit
2024-05-10 07:44:15 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-10 07:44:15 - INFO     - Using /repo as root for repository jailhouse
2024-05-10 07:44:15 - INFO     - /work/isar$ git status -s
2024-05-10 07:44:15 - INFO     - /work/isar$ git rev-parse --verify -q origin/5f87d48f279761c2fefef1db16b4ccb5b955a364
2024-05-10 07:44:15 - INFO     - /work/isar$ git checkout -q 5f87d48f279761c2fefef1db16b4ccb5b955a364
2024-05-10 07:44:15 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-10 07:44:15 - INFO     - Using /repo as root for repository jailhouse
2024-05-10 07:44:15 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-10 07:44:15 - INFO     - Using /repo as root for repository jailhouse
2024-05-10 07:44:15 - INFO     - /work/isar$ /tmp/tmpt2naj7ei/get_bb_env /build
2024-05-10 07:44:15 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-10 07:44:15 - INFO     - Using /repo as root for repository jailhouse
2024-05-10 07:44:15 - INFO     - /build$ /work/isar/bitbake/bin/bitbake -c build mc:nuc6cay-jailhouse-demo:demo-image
Loading cache: 100% |########################################################################################################################################| Time: 0:00:00
Loaded 76 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |###################################################################################################################################| Time: 0:00:00
NOTE: No setscene tasks
NOTE: Executing Tasks
ERROR: mc:nuc6cay-jailhouse-demo:expand-on-first-boot-1.1-r0 do_dpkg_build: Error executing a python function in exec_python_func() autogenerated:The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>0001:*** 0002:do_dpkg_build(d)0003:
File: '/work/isar/meta/classes/dpkg-base.bbclass', lineno: 209, function: do_dpkg_build0205:    lock = bb.utils.lockfile(d.getVar("REPO_ISAR_DIR") + "/isar.lock",0206:                             shared=True)0207:    bb.build.exec_func("dpkg_do_mounts", d)0208:    try:*** 0209:        bb.build.exec_func("dpkg_runbuild", d)0210:    finally:0211:        bb.build.exec_func("dpkg_undo_mounts", d)0212:        bb.utils.unlockfile(lock)0213:}
File: '/work/isar/bitbake/lib/bb/build.py', lineno: 251, function: exec_func0247:    with bb.utils.fileslocked(lockfiles):0248:        if ispython:0249:            exec_func_python(func, d, runfile, cwd=adir)0250:        else:*** 0251:            exec_func_shell(func, d, runfile, cwd=adir)0252:0253:    try:0254:        curcwd = os.getcwd()0255:    except:
File: '/work/isar/bitbake/lib/bb/build.py', lineno: 452, function: exec_func_shell0448:    with open(fifopath, 'r+b', buffering=0) as fifo:0449:        try:0450:            bb.debug(2, "Executing shell function %s" % func)0451:            with open(os.devnull, 'r+') as stdin, logfile:*** 0452:                bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])0453:        finally:0454:            os.unlink(fifopath)0455:0456:    bb.debug(2, "Shell function %s finished" % func)
File: '/work/isar/bitbake/lib/bb/process.py', lineno: 182, function: run0178:        if not stderr is None:0179:            stderr = stderr.decode("utf-8")0180:0181:    if pipe.returncode != 0:*** 0182:        raise ExecutionError(cmd, pipe.returncode, stdout, stderr)0183:    return stdout, stderr
Exception: bb.process.ExecutionError: Execution of '/build/tmp/work/jailhouse-demo-amd64/expand-on-first-boot/1.1-r0/temp/run.dpkg_runbuild.72' failed with exit code 1:
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
This script can only be run as root:root or builder:<gid of builder>!
id: cannot find name for group ID 1000
(Currently running as builder(1000):1000(1000))
WARNING: exit code 1 from a shell command.ERROR: Logfile of failure stored in: /build/tmp/work/jailhouse-demo-amd64/expand-on-first-boot/1.1-r0/temp/log.do_dpkg_build.72
ERROR: mc:nuc6cay-jailhouse-demo:customizations-nuc6cay-1.0-r0 do_dpkg_build: Error executing a python function in exec_python_func() autogenerated:The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>0001:*** 0002:do_dpkg_build(d)0003:
File: '/work/isar/meta/classes/dpkg-base.bbclass', lineno: 209, function: do_dpkg_build0205:    lock = bb.utils.lockfile(d.getVar("REPO_ISAR_DIR") + "/isar.lock",0206:                             shared=True)0207:    bb.build.exec_func("dpkg_do_mounts", d)0208:    try:*** 0209:        bb.build.exec_func("dpkg_runbuild", d)0210:    finally:0211:        bb.build.exec_func("dpkg_undo_mounts", d)0212:        bb.utils.unlockfile(lock)0213:}
File: '/work/isar/bitbake/lib/bb/build.py', lineno: 251, function: exec_func0247:    with bb.utils.fileslocked(lockfiles):0248:        if ispython:0249:            exec_func_python(func, d, runfile, cwd=adir)0250:        else:*** 0251:            exec_func_shell(func, d, runfile, cwd=adir)0252:0253:    try:0254:        curcwd = os.getcwd()0255:    except:
File: '/work/isar/bitbake/lib/bb/build.py', lineno: 452, function: exec_func_shell0448:    with open(fifopath, 'r+b', buffering=0) as fifo:0449:        try:0450:            bb.debug(2, "Executing shell function %s" % func)0451:            with open(os.devnull, 'r+') as stdin, logfile:*** 0452:                bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])0453:        finally:0454:            os.unlink(fifopath)0455:0456:    bb.debug(2, "Shell function %s finished" % func)
File: '/work/isar/bitbake/lib/bb/process.py', lineno: 182, function: run0178:        if not stderr is None:0179:            stderr = stderr.decode("utf-8")0180:0181:    if pipe.returncode != 0:*** 0182:        raise ExecutionError(cmd, pipe.returncode, stdout, stderr)0183:    return stdout, stderr
Exception: bb.process.ExecutionError: Execution of '/build/tmp/work/jailhouse-demo-amd64/customizations-nuc6cay/1.0-r0/temp/run.dpkg_runbuild.71' failed with exit code 1:
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
This script can only be run as root:root or builder:<gid of builder>!
id: cannot find name for group ID 1000
(Currently running as builder(1000):1000(1000))
WARNING: exit code 1 from a shell command.ERROR: Logfile of failure stored in: /build/tmp/work/jailhouse-demo-amd64/customizations-nuc6cay/1.0-r0/temp/log.do_dpkg_build.71
ERROR: Task (mc:nuc6cay-jailhouse-demo:/work/isar/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.1.bb:do_dpkg_build) failed with exit code '1'
ERROR: Task (mc:nuc6cay-jailhouse-demo:/repo/recipes-core/customizations/customizations.bb:do_dpkg_build) failed with exit code '1'
NOTE: Tasks Summary: Attempted 88 tasks of which 86 didn't need to be rerun and 2 failed.Summary: 2 tasks failed:mc:nuc6cay-jailhouse-demo:/work/isar/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.1.bb:do_dpkg_buildmc:nuc6cay-jailhouse-demo:/repo/recipes-core/customizations/customizations.bb:do_dpkg_build
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
2024-05-10 07:44:18 - ERROR    - Command returned non-zero exit status 1
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images$

尝试 v0.12 版 jailhouse-images

git clone -b v0.12 https://github.com/siemens/jailhouse-images.git
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~$ mkdir jailhouse-images-v0.12
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~$ ls
Desktop  Documents  Downloads  jailhouse-images  jailhouse-images-v0.12  Music  Pictures  Public  snap  Templates  Videos
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~$ cd jailhouse-images-v0.12/
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images-v0.12$ git clone -b v0.12 https://github.com/siemens/jailhouse-images.git
Cloning into 'jailhouse-images'...
remote: Enumerating objects: 2545, done.
remote: Counting objects: 100% (231/231), done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 2545 (delta 203), reused 191 (delta 191), pack-reused 2314
Receiving objects: 100% (2545/2545), 808.10 KiB | 156.00 KiB/s, done.
Resolving deltas: 100% (1393/1393), done.
Note: switching to '9e57d07c806a4e80ddd0913d894c1c54bb9223fe'.You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:git switch -c <new-branch-name>Or undo this operation with:git switch -Turn off this advice by setting config variable advice.detachedHead to falsescilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images-v0.12$ ls
jailhouse-images
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images-v0.12$ cd jailhouse-images/
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images-v0.12/jailhouse-images$ ls
build-images.sh  CONTRIBUTING.md  images.list  opt-latest.yml  README.md    recipes-core      recipes-jailhouse  scripts        wic
conf             COPYING          kas.yml      opt-rt.yml      recipes-bsp  recipes-devtools  recipes-kernel     start-qemu.sh
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images-v0.12/jailhouse-images$
这里运行 ./build-images.sh 命令
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images-v0.12/jailhouse-images$ ./build-images.sh
Available images demo images:1: QEMU/KVM Intel-x86 virtual target2: QEMU ARM64 virtual target3: Orange Pi Zero (256 MB edition)4: Intel NUC (NUC6CAY, 8 GB RAM)5: Marvell ESPRESSObin (1 GB edition)6: Marvell MACCHIATObin7: LeMaker HiKey (Kirin 620 SoC, 2 GB edition)8: Avnet Ultra969: Raspberry Pi 4 (1 GB edition)0: all (may take hours...)Select images to build (space-separated index list):

最后运行还是报错。

scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images-v0.12/jailhouse-images$ ./build-images.sh
Available images demo images:1: QEMU/KVM Intel-x86 virtual target2: QEMU ARM64 virtual target3: Orange Pi Zero (256 MB edition)4: Intel NUC (NUC6CAY, 8 GB RAM)5: Marvell ESPRESSObin (1 GB edition)6: Marvell MACCHIATObin7: LeMaker HiKey (Kirin 620 SoC, 2 GB edition)8: Avnet Ultra969: Raspberry Pi 4 (1 GB edition)0: all (may take hours...)Select images to build (space-separated index list): 1
./kas-docker                               100%[========================================================================================>]   6.36K  15.2KB/s    in 0.4s
Unable to find image 'kasproject/kas-isar:2.0' locally
2.0: Pulling from kasproject/kas-isar
8d691f585fa8: Pull complete
62ad463f507f: Pull complete
920ec0e0896c: Pull complete
006bc8e40609: Pull complete                                                                                                                                                 86ce1358af8a: Pull complete
fc5c466deaad: Pull complete
25ffe6e5147c: Pull complete
aa6087619282: Pull complete
a1f37ac00437: Pull complete                                                                                                                                                 3cb4a1d166c8: Pull complete
8f349537ba7d: Pull complete
Digest: sha256:ccfe3090d86746d94753f9a07fb23770355e51f1abf56e071b03316b5301bbf9
Status: Downloaded newer image for kasproject/kas-isar:2.0
2024-05-10 08:58:49 - INFO     - kas 2.0 started
2024-05-10 08:58:49 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-10 08:58:49 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-10 08:58:49 - INFO     - Using /repo as root for repository jailhouse
2024-05-10 08:58:49 - INFO     - /work$ git clone -q https://github.com/ilbers/isar /work/isar
2024-05-10 08:58:56 - INFO     - Repository isar cloned
2024-05-10 08:58:56 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-10 08:58:56 - INFO     - Using /repo as root for repository jailhouse
2024-05-10 08:58:56 - INFO     - /work/isar$ git status -s
2024-05-10 08:58:56 - INFO     - /work/isar$ git rev-parse --verify HEAD
2024-05-10 08:58:56 - INFO     - b106e0ebcb935c7993cc88c6c49d45928793c9c2
2024-05-10 08:58:56 - INFO     - /work/isar$ git checkout -q 619d6d88ac8c745282fd16773d50a466567615b6
2024-05-10 08:58:56 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-10 08:58:56 - INFO     - Using /repo as root for repository jailhouse
2024-05-10 08:58:56 - INFO     - /work/isar$ /tmp/tmpryomrhkc /work/build
2024-05-10 08:58:56 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-10 08:58:56 - INFO     - Using /repo as root for repository jailhouse
2024-05-10 08:58:56 - INFO     - /repo$ git rev-parse --show-toplevel
2024-05-10 08:58:56 - INFO     - Using /repo as root for repository jailhouse
2024-05-10 08:58:56 - INFO     - /work/build$ /work/isar/bitbake/bin/bitbake -k -c build mc:qemu-amd64-jailhouse-demo:demo-image
Parsing recipes: 100% |######################################################################################################################################| Time: 0:00:00
Parsing of 31 .bb files complete (0 cached, 31 parsed). 62 targets, 0 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |###################################################################################################################################| Time: 0:00:00
NOTE: No setscene tasks
NOTE: Executing Tasks
WARNING: mc:qemu-amd64-jailhouse-demo:jailhouse-jailhouse-0.12-r0 do_fetch: Failed to fetch URL git://github.com/siemens/jailhouse;branch=next, attempting MIRRORS if available
ERROR: mc:qemu-amd64-jailhouse-demo:jailhouse-jailhouse-0.12-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export GIT_PROXY_COMMAND="oe-git-proxy"; export NO_PROXY="*"; export PATH="/work/isar/scripts:/work/isar/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin"; export HOME="/tmp/tmpjicxrpvo"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror git://github.com/siemens/jailhouse /work/build/downloads/git/github.com.siemens.jailhouse --progress failed with exit code 128, output:
Cloning into bare repository '/work/build/downloads/git/github.com.siemens.jailhouse'...
2024/05/10 09:01:12 socat[404] E connect(5, AF=2 20.205.243.166:9418, 16): Connection timed out
fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.ERROR: mc:qemu-amd64-jailhouse-demo:jailhouse-jailhouse-0.12-r0 do_fetch: Error executing a python function in exec_python_func() autogenerated:The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>0001:*** 0002:do_fetch(d)0003:
File: '/work/isar/meta/classes/base.bbclass', lineno: 174, function: do_fetch0170:    try:0171:        fetcher = bb.fetch2.Fetch(src_uri, d)0172:        fetcher.download()0173:    except bb.fetch2.BBFetchException as e:*** 0174:        raise bb.build.FuncFailed(e)0175:}0176:0177:addtask fetch before do_build0178:
Exception: AttributeError: module 'bb.build' has no attribute 'FuncFailed'ERROR: Logfile of failure stored in: /work/build/tmp/work/jailhouse-demo-amd64/jailhouse-jailhouse/0.12-r0/temp/log.do_fetch.358
ERROR: Task (mc:qemu-amd64-jailhouse-demo:/repo/recipes-jailhouse/jailhouse/jailhouse_0.12.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 61 tasks of which 0 didn't need to be rerun and 1 failed.Summary: 1 task failed:mc:qemu-amd64-jailhouse-demo:/repo/recipes-jailhouse/jailhouse/jailhouse_0.12.bb:do_fetch
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
scilogyhunter@scilogyhunter-Standard-PC-i440FX-PIIX-1996:~/jailhouse-images-v0.12/jailhouse-images$

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/702404.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

C语言实训项目源码-02餐厅饭卡管理系统-C语言实训C语言大作业小项目

C语言餐厅饭卡管理系统 一、主要功能 主要功能模块 页面名称 实现功能 负责人 进入页面 进入程序 主函数 系统主要功能 修改密码函数 修改密码 充值&#xff0c;显示函数 饭卡充值与信息显示 购买饭菜…

SpringBoot:缓存

点击查看SpringBoot缓存demo&#xff1a;LearnSpringBoot09Cache-Redis 技术摘要 注解版的 mybatisCacheConfigCacheableCachePut&#xff1a;既调用方法&#xff0c;又更新缓存数据&#xff1b;同步更新缓存CacheEvict&#xff1a;缓存清除Caching&#xff1a;定义复杂的缓存…

Python-VBA函数之旅-vars函数

目录 一、vars函数的常见应用场景 二、vars函数使用注意事项 三、如何用好vars函数&#xff1f; 1、vars函数&#xff1a; 1-1、Python&#xff1a; 1-2、VBA&#xff1a; 2、推荐阅读&#xff1a; 个人主页&#xff1a;https://myelsa1024.blog.csdn.net/ 一、vars函数…

业务系统加固和安全设备加固

业务系统加固 业务系统包含哪些系统? 业务系统漏洞面临的风险 1web风险 2漏洞扫描&#xff0c;端口扫描 3系统漏洞 4逻辑漏洞 5 信息泄露 6拒绝服务 7口令爆破 加固方式&#xff1a; 在风险加上修复 1web漏洞&#xff1a; 包括csrf,xss&#xff0c;口令破解等等 修…

走进Java接口测试之多数据源切换示例

文章目录 一、前言二、demo实现2.1、开发环境2.2、构建项目2.3、配置数据源2.4、编写配置文件2.5、编写Dao层的mapper2.6、编写实体成层2.7、编写测试类2.8、验证结果 三、多数据源 demo 实现3.1、配置数据源3.2、增加pom文件3.3、修改数据源读取方式&#xff1a;3.4、增加动态…

图片转base64【Vue + 纯Html】

1.template <el-form-item label"图片"><div class"image-upload-container"><input type"file" id"imageUpload" class"image-upload" change"convertToBase64" /><label for"imageU…

如何配置测试环境?(非常详细)零基础入门到精通,收藏这一篇就够了

测试环境配置是一个关键的步骤&#xff0c;用于确保软件在开发过程中能够得到全面的测试&#xff0c;以提高软件的质量、性能和安全性。 测试环境配置的详细步骤&#xff1a; **确定测试环境需求&#xff1a;**在开始测试环境搭建之前&#xff0c;首先需要明确测试环境的需求…

Markdown 高级表格控制 ∈ Markdown 使用笔记

文章目录 Part.I IntroductionPart.II 表格样式控制Chap.I 对齐方式Chap.II 表格中文本控制Chap.III 单元格合并Chap.IV 颜色控制 Part.III 实用技巧Chap.I Excel 转 HTML Reference Part.I Introduction 本文是 Markdown 使用笔记 的子博客&#xff0c;将介绍如何优雅地使用 …

【Redis】Redis 主从集群(二)

1.哨兵机制原理 1.1.三个定时任务 Sentinel 维护着三个定时任务以监测 Redis 节点及其它 Sentinel 节点的状态 1&#xff09;info 任务&#xff1a;每个 Sentinel 节点每 10 秒就会向 Redis 集群中的每个节点发送 info 命令&#xff0c;以获得最新的 Redis 拓扑结构 2&#xff…

HOJ 修改首页 和后端logo图片 网页收藏标识ico 小白也会的方法

HOJ 是一款优雅知性的在线评测系统&#xff0c;像一位温文尔雅的女性&#xff0c;你会慢慢喜欢上她的。 制作图片素材 用图像编辑软件 比如 **光影魔术手4.0** 制作以下素材 logo.a0924d7d.png 为前台导航栏左边的logo&#xff0c; 600*200 backstage.8bce8c6e.png 为后台侧…

2024 年 4 月公链研报:比特币减半、市场回调以及关键进展

作者&#xff1a;stellafootprint.network 数据来源&#xff1a;Footprint Analytics 公链研究页面 四月&#xff0c;加密市场在经济环境变化中取得了重要进展。4 月 20 日的比特币完成减半&#xff0c;但市场整体低迷导致比特币及前 25 大公链加密货币价格下跌。与此同时&am…

在 Django 中获取已渲染的 HTML 文本

在Django中&#xff0c;你可以通过多种方式获取已渲染的HTML文本。这通常取决于你希望在哪个阶段获取HTML文本。下面就是我在实际操作中遇到的问题&#xff0c;并且通过我日夜奋斗终于找到解决方案。 1、问题背景 在 Django 中&#xff0c;您可能需要将已渲染的 HTML 文本存储…