Adapt Docker environment and minor fixes

This commit is contained in:
Zhang Junyang
2023-07-19 15:38:47 +08:00
committed by Tate, Hongliang Tian
parent 47a51eb423
commit d407d85e70
4 changed files with 10 additions and 4 deletions

View File

@ -1,5 +1,8 @@
set timeout_style=menu
set timeout=1
menuentry 'jinux' {
multiboot2 /jinux
module2 --nounzip /ramdisk.cpio.gz
multiboot2 /boot/jinux
module2 --nounzip /boot/ramdisk.cpio.gz
boot
}

View File

@ -1,16 +1,17 @@
#! /bin/sh
set -eux
# Cargo passes the path to the built executable as the first argument.
KERNEL=$1
# Copy the needed files into an ISO image.
mkdir -p target/iso_root
cp $KERNEL target/iso_root/jinux
cp $KERNEL target/iso_root/boot/jinux
mkdir -p target/iso_root/boot/grub
cp build/grub/conf/grub.cfg target/iso_root/boot/grub
# Copy ramdisk
cp regression/build/ramdisk.cpio.gz target/iso_root
cp regression/build/ramdisk.cpio.gz target/iso_root/boot
# Make boot device .iso image
grub-mkrescue -o $KERNEL.iso target/iso_root

View File

@ -101,6 +101,7 @@ fn main() -> anyhow::Result<()> {
qemu_args.push("-drive");
let binding = create_fs_image(kernel_binary_path.as_path())?;
qemu_args.push(binding.as_str());
qemu_cmd.arg("-cdrom");
qemu_cmd.arg(kernel_iso_path.to_str().unwrap());
if binary_kind.is_test() {
qemu_args.append(&mut TEST_ARGS.to_vec());

View File

@ -15,6 +15,7 @@ RUN apt update && apt-get install -y --no-install-recommends \
git-core \
gnupg \
grub-common \
grub-pc \
libssl-dev \
net-tools \
openssh-server \