{"id":20713298,"url":"https://github.com/linaro/lite-jailhouse","last_synced_at":"2026-04-24T10:05:02.846Z","repository":{"id":81128151,"uuid":"592423115","full_name":"Linaro/lite-jailhouse","owner":"Linaro","description":"Example of using Jailhouse as a hypervisor with Zephyr RTOS and QEMU","archived":false,"fork":false,"pushed_at":"2023-04-10T02:48:24.000Z","size":18,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-04-02T05:29:26.693Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Linaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-23T17:45:52.000Z","updated_at":"2026-03-09T00:51:49.000Z","dependencies_parsed_at":"2023-07-27T11:31:15.627Z","dependency_job_id":null,"html_url":"https://github.com/Linaro/lite-jailhouse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Linaro/lite-jailhouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linaro%2Flite-jailhouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linaro%2Flite-jailhouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linaro%2Flite-jailhouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linaro%2Flite-jailhouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Linaro","download_url":"https://codeload.github.com/Linaro/lite-jailhouse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linaro%2Flite-jailhouse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32218295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T09:47:08.147Z","status":"ssl_error","status_checked_at":"2026-04-24T09:46:41.165Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T02:24:23.224Z","updated_at":"2026-04-24T10:05:02.810Z","avatar_url":"https://github.com/Linaro.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lite-jailhouse\nExample using Jailhouse as a hypervisor with Zephyr RTOS and QEMU on\nARM64 archutecture.\n\n## Requirements\nThe sample was tested using a Intel based machine running Ubuntu 22.04 LTS,\nbesides that you may need some extra resources:\n \n* QEMU System with ARM64 support: `$ sudo apt install qemu-system `\n* QEMU ARM64 test image provided in: https://github.com/siemens/jailhouse-images\n* Also you'll need to install Zephyr RTOS: https://docs.zephyrproject.org/3.2.0/develop/getting_started/index.html\n\n## Getting started\nCreate an directory to be used as workspace:\n\n```\n$ mkdir jailhouse_ws \u0026\u0026 cd jailhouse_ws\n```\n\nClone this repository and the jailhouse-images repository:\n\n```\n$ git clone git@github.com:Linaro/lite-jailhouse.git\n$ git clone git@github.com:siemens/jailhouse-images.git\n\n```\n\nYou should need to build the QEMU test image:\n\n```\n$ cd jailhouse-images\n$ ./kas_container.sh\n```\n\nIt will open a menu, select QEMU ARM64 as build target, save and exit, then type:\n\n```\n$ ./kas_container.sh build\n```\n\nAfter that you just need to map the port 5555 to the 22 in order to enable\nssh to the Virtual Machine image, add the following line below here\ninside of the following file of jailhose-images repository:\n\nhttps://github.com/siemens/jailhouse-images/blob/0a01dd4ca08e9e2163c76bf043a06e8a2fa88bec/start-qemu.sh#L60\n\nEdit the line to looks like below:\n\n```\n    -device virtio-net-device,netdev=net0 \\\n    -netdev user,id=net0,hostfwd=tcp::5555-:22\"\n```\n\nSave the file, the current test image already comes with jailhouse installed and support\nto the zephyr cell, creating one from sources is outside of this document scope since the\nmainline jailhouse already provides a decent support for zephyr cell.\n\n## Starting QEMU\n\nTo start QEMU, just go back to the jailhouse-images repository (after building the image),\nand invoke it:\n\n```\n$ cd jailhouse-images\n$ ./start_qemu.sh arm64\n```\n\nThis will starts the Virtual Machine with the built image, also will directs \nthe user to the termina, the default user is: root, and the password is: root\n\nThe further acces to this VM will be done in other terminal windows through SSH\nwhich is enabled, this one will be reserved to see the output of jailhouse console\njust start to intercept its messages by:\n\n```\n# cat /dev/ttyAMA0\n```\n\nEvery interaction with Jailhouse will be displayed in this terminal tab.\n\nOn another terminal, access the VM by using ssh:\n\n```\n$ ssh -p 5555 root@localhost\n```\n\nThe password is root, once acessed, create the jailhouse workspace folder:\n\n```\n# mkdir jailhouse_ws\n```\n\nThe folder above will be used to store zephyr images, we will call this tab\nfrom here, as jailhouse work tab.\n\n## Build and Deploy Zephyr APP to QEMU\n\nIn another terminal tab, let's build and deploy the Zephyr demonstration app,\nit used the QEMU Cortex A53 board, currently there is support only to console\nand GIC, interrupt controller, here is how to build the app, assuming Zephyr\nRTOS is already set in the host machine :\n\n```\n$ cd lite-jailhouse\n$ west build -p auto -bqemu_cortex_a53 zephyr_app\n```\n\nPlease mind due to the Jailhouse configuration, the application should be \nloaded from the address 0x70000000, an overlay file creates this memory \narea and overrides default zephyr sram-chosen symbol to select this area instead\nof the default pointed by 0x40000000.\n\nTo deploy the firmware to the target QEMU instance, assuming it is already set,\nand running (with port 5555 mapped to the 22 ssh port), just type in the current\nsame directory:\n\n```\n$ scp -r -P 5555 build/zephyr/zephyr.bin  root@localhost://root/jailhouse_ws\n```\n\nThe password is the same as mentioned before, root.\n\n## Starting the Jailhouse Cell\n\nNow the VM has everything needed to start the Jailhouse application in the Zephyr side,\nto launch the application, go back to the jailhouse workspace tab, or otherwise ssh to \nthe VM again.\n\nNow follow the step by step below:\n\n* First, enable the jailhouse passing the root cell configuration:\n\n```\n# jailhouse enable /etc/jailhouse/qemu-arm64.cell\n```\n\n* Then creates the Zephyr cell:\n\n```\n# jailhouse cell create /etc/jailhouse/qemu-arm64-zephyr-demo.cell\n```\n\n* Now load the firmware to the target execution area:\n\n```\n# jailhouse cell load qemu-arm64-zephyr-demo jailhouse_ws/zephyr.bin -a 0x70000000\n```\n\n* And, finally start the application:\n\n```\n# jailhouse cell start qemu-arm64-zephyr-demo\n```\n\nThe application should start immediately, additionally it is possible to suspend\nthe cell, in case of updating the zephyr application:\n\n```\n# jailhouse cell shutdown qemu-arm64-zephyr-demo\n```\n\nWith the step above, just repeat the deploy firmware step again and, after that, \nrepeat the loading and start jailhouse steps to update the firmware.\n\n## Expected results into the Jailhouse console\n\nTo see the results on console, just go back to the window where the start_qemu.sh\nscript was started, after the jailhouse cell was started you may see something similar\nto this:\n\n```\nCell \"qemu-arm64-zephyr-demo\" can be loaded\nStarted cell \"qemu-arm64-zephyr-demo\"\n*** Booting Zephyr OS build v3.3.0-rc1-58-g156c7cd21759 ***\n[0]: Hello Jailhouse, I'm: qemu_cortex_a53 \n[510]: Hello Jailhouse, I'm: qemu_cortex_a53 \n[1020]: Hello Jailhouse, I'm: qemu_cortex_a53 \n[1530]: Hello Jailhouse, I'm: qemu_cortex_a53 \n[2040]: Hello Jailhouse, I'm: qemu_cortex_a53 \n[2550]: Hello Jailhouse, I'm: qemu_cortex_a53 \n[3060]: Hello Jailhouse, I'm: qemu_cortex_a53 \n[3570]: Hello Jailhouse, I'm: qemu_cortex_a53 \n[4080]: Hello Jailhouse, I'm: qemu_cortex_a53 \n[4590]: Hello Jailhouse, I'm: qemu_cortex_a53 \n[5100]: Hello Jailhouse, I'm: qemu_cortex_a53 \n\n```\n\n## TODO's\n* Implement the communication between Linux and Zephyr Cell (IVSHMEM, RPMsg);\n* Describe steps to build jailhouse from sources adding a new configuration;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinaro%2Flite-jailhouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinaro%2Flite-jailhouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinaro%2Flite-jailhouse/lists"}