forked from Rust-for-Linux/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Steps
Clemens Tiedt edited this page Dec 5, 2024
·
60 revisions
apt install qemu qemu-system
pacman -S qemu-full
-
Create the virtual disk image
qemu-img create -f qcow2 void.img 10G
-
Download the image from https://voidlinux.org/download/ (base live glibc)
-
Run the VM
qemu-system-x86_64 -m 1024 -hda void.img -cdrom void-live-x86_64-20210930.iso -boot d
- Depending on output, you might need to use a VNC viewer
- Hint: when the display works without VNC, you can release the mouse grab with CtrlAltG
-
Default credentials are username:
root
, password:voidlinux
-
Run the Void Linux installer (on the default US keymap, the
-
is the key to the right of the0
)void-installer
-
Configuration
- Keyboard:
de-latin1
- RootPassword:
root
- Partition (using
cfdisk
):dos
(MBR), 7.5G primary Linux, 2.5G Free space - BootLoader: /dev/sda
- Filesystems: 7.5G ext4,
/
- Keyboard:
-
Install (ignore
sed
error) -
Reboot
-
Pick "Boot first HD found by BIOS"
-
You can shutdown using
poweroff
-
Run the VM without the live ISO
qemu-system-x86_64 -m 1024 -hda void.img
- Update the system
xbps-install -Su
-
Install the necessary dependencies
-
Arch Linux
pacman -S lld
-
Ubuntu
apt install flex bison lld libssl-dev libelf-dev
-
Download clang
-
Extract & switch to archive
tar -xf clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04.tar.xz && cd clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04
-
Copy files
sudo cp -r bin/* /usr/bin/ sudo cp -r include/* /usr/include/ sudo cp -r share/* /usr/bin/share/ sudo apt install libncurses5
-
-
-
Follow the quickstart
-
Configure the kernel
make LLVM=1 menuconfig
-
/
for search; typeRUST
and ensure "Depends on:" is met
-
-
Build the kernel
make LLVM=1
qemu-system-x86_64\
-m 1024\
-hda void.img\
-append "root=/dev/sda1"\
-kernel ../Rust-for-Linux/arch/x86/boot/bzImage\
-nic user,hostfwd=tcp::2222-:22
- Create mount point and mount
mkdir /mnt/bs2 mount -t bs2ramfs_name -o size=10m bs2ramfs /mnt/bs2