Lines Matching +full:build +full:- +full:in +full:- +full:qemu
4 serve as a guide through the sea of scripts in this directory and elsewhere in
8 in the `ci` directory how we run CI now.
12 First up, let's talk about the files in this directory:
14 * `run-docker.sh` - a shell script run by most builders, it will execute
17 * `run.sh` - the actual script which runs tests for a particular architecture.
19 * `dox.sh` - build the documentation of the crate and publish it to gh-pages.
24 for running tests. You can find tested triples in [Actions config] or [Cirrus config].
28 the right installer). The Intel Linux/OSX builds are similar in that we just
34 * Android runs in a [docker image][android-docker] with an emulator, the NDK,
35 and the SDK already set up. The entire build happens within the docker image.
36 * The MIPS, ARM, and AArch64 builds all use the QEMU userspace emulator to run
38 * The MUSL build just has to download a MUSL compiler and target libraries and
42 * The BSD builds, currently OpenBSD and FreeBSD, use QEMU to boot up a system
45 [Actions config]: https://github.com/rust-lang/libc/tree/HEAD/.github/workflows
46 [Cirrus config]: https://github.com/rust-lang/libc/blob/HEAD/.cirrus.yml
47 [android-docker]: https://github.com/rust-lang/libc/blob/HEAD/ci/docker/x86_64-linux-android/Docker…
49 ## QEMU section in CI Systems
51 Lots of the architectures tested here use QEMU in the tests, so it's worth going
52 over all the crazy capabilities QEMU has and the various flavors in which we use
55 First up, QEMU has userspace emulation where it doesn't boot a full kernel, it
56 just runs a binary from another architecture (using the `qemu-<arch>` wrappers).
59 Note that one downside of this QEMU system is that threads are barely
65 * Cross compiling from Linux to any of the BSDs seems to be quite non-standard.
69 * We resort to userspace emulation (QEMU).
71 With all that in mind, the way BSD is tested looks like:
73 1. Download a pre-prepared image for the OS being tested.
80 4. The kernel is booted in QEMU, and it is configured to detect the libc-test
82 5. Look for whether the tests passed in the serial console output of the kernel.
86 inside of the `libc-test` directory (which is what it's intended for) because
95 console, log in automatically at the serial console, detect if a second drive in
96 QEMU is available, and if so mount it, run a script (it'll specifically be
97 `run-qemu.sh` in this folder which is copied into the generated image talked
100 ### QEMU Setup - FreeBSD argument
102 1. [Download the latest stable amd64-bootonly release ISO](https://www.freebsd.org/where.html).
103 E.g. FreeBSD-11.1-RELEASE-amd64-bootonly.iso
104 2. Create the disk image: `qemu-img create -f qcow2 FreeBSD-11.1-RELEASE-amd64.qcow2 2G`
105 …e: `qemu-system-x86_64 -cdrom FreeBSD-11.1-RELEASE-amd64-bootonly.iso -drive if=virtio,file=FreeBS…
109 1. Set Hostname: freebsd-ci
143 prepend `:al=root` to the line beneath to have the machine auto-login as
153 1. Edit `/root/.login` and put this in it:
155 [ -e /dev/vtbd1 ] || exit 0
156 mount -t ext2fs /dev/vtbd1 /mnt
161 1. Back in in the installer choose Reboot
163 If you switch to the serial console by choosing View > serial0 in
164 the qemu menu, you should be logged in as root.
165 1. Shutdown the machine: `shutdown -p now`
169 * https://en.wikibooks.org/wiki/QEMU/Images
170 * https://blog.nekoconeko.nl/blog/2015/06/04/creating-an-openstack-freebsd-image.html
171 * https://www.freebsd.org/doc/handbook/serialconsole-setup.html
173 ### QEMU setup - OpenBSD argument
176 2. `qemu-img create -f qcow2 foo.qcow2 2G`
177 3. `qemu -cdrom foo.iso -drive if=virtio,file=foo.qcow2 -net nic,model=virtio -net user`
183 8. Modify same line in /etc/ttys to have `"/root/foo.sh"` as the shell
191 if mount -t ext2fs /dev/sd1c /mnt; then
193 shutdown -ph now
204 * https://en.wikibooks.org/wiki/QEMU/Images