lfd / jailv-testbed Goto Github PK
View Code? Open in Web Editor NEWJail-V Testbed
Jail-V Testbed
# Clone all subrepos $ git submodule init $ git submodule update 1. Build qemu $ ./do.sh qemu 2. Build Linux Image. The same Image will be used for both, root and non-root cell $ ./do.sh prepare_linux # Create output directory, applied configuration $ ./do.sh linux # Compiles the kernel 3. Build OpenSBI # Apply compiler fixup $ git -C srcs/opensbi am ../../res/0001-compiler-fixup.patch $ ./do.sh opensbi Now, the file build/opensbi/platform/generic/firmware/fw_payload.elf will hold the bootable Linux kernel Image. 4. Build Jailhouse $ ./do.sh jailhouse 5. Build buildroot. This will build both: non-root and root buildroot. $ ./do.sh prepare_buildroot $ ./do.sh buildroot 6. Compile Device Trees $ ./do.sh dts Everything required for booting on the NOEL-V is prepared now: - DTBs: build/dtb - OpenSBI/Linux Binary: build/opensbi/platform/generic/firmware/fw_payload.elf - Initrd: build/buildroot_root/images/rootfs.cpio.gz Those binaries can be loaded with grmon3: grmon3> reset; cpu en 0; cpu en 1; cpu en 2; cpu en 3; cpu en 4; cpu en 5 grmon3> forward enable uart2 grmon3> load fw_payload.elf grmon3> load -binary rootfs.cpio.gz 0x3000000 grmon3> dtb noel-mc-eth.dtb grmon3> run Alternatively, boot those binaries with QEMU: $ ./do.sh start uc # single core variant $ ./do.sh start mc # multicore variant To attach the debugger to QEMU, type in another terminal: $ ./do.sh debugger 5. Starting Jailhouse Next, you must ssh into your target and start jailhouse $ ssh noelv(qemu) Inside your target, load the Jailhouse Kernel module: $ insmod jailhouse.ko Enable the hypervisor with the helper script jh-en: $ jh-en 6. Loading bare-metal inmates To load a timer-demo bare-metal inmate, first create a jailhouse cell: On NOEL-V: $ jailhouse cell create /etc/jailhouse/noelv-tiny-demo.cell On Qemu: $ jailhouse cell create /etc/jailhouse/qemu-riscv64-tiny-demo.cell And load the inmate binary (same for both platforms): $ jailhouse cell load tiny-demo /etc/jailhouse/timer-demo.bin The last step is to start the cell: $ jailhouse cell start tiny-demo You should see the cell's output on the grmon interface. To destroy the cell, type: $ jailhouse cell destroy tiny-demo Finally, you can also disable the hypervisor: $ jailhouse disable 7. Starting Non-Root Linux Inmates After enabling the hypervisor, simply type: $ jh-linux This tiny helper script will perform all steps that are required for booting Linux. Please refer to the script for more details. The non-root cell's output will be the forwarded uart and is accessible via grmon. 6.1 Inter-Cell communication Both cell contain a virtual ethernet device (ivshmem). On the root cell (via ssh) type: $ ifconfig enp0s16 192.168.178.1 On the non-root cell (via grmon), type: $ ifconfig eth0 192.168.178.2 The virtual connection between both cells is now established and can be tested via standard ethernet tooling (e.g., ping).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.