Initial Commit
- initial default booting image
This commit is contained in:
30
board/qemu/loongarch64-virt-efi/genimage.cfg
Normal file
30
board/qemu/loongarch64-virt-efi/genimage.cfg
Normal file
@@ -0,0 +1,30 @@
|
||||
image efi-part.vfat {
|
||||
vfat {
|
||||
file EFI {
|
||||
image = "efi-part/EFI"
|
||||
}
|
||||
file vmlinux.efi {
|
||||
image = "vmlinux.efi"
|
||||
}
|
||||
}
|
||||
|
||||
size = 64M
|
||||
}
|
||||
|
||||
image disk.img {
|
||||
hdimage {
|
||||
partition-table-type = "gpt"
|
||||
}
|
||||
|
||||
partition boot {
|
||||
image = "efi-part.vfat"
|
||||
partition-type-uuid = U
|
||||
offset = 32K
|
||||
bootable = true
|
||||
}
|
||||
|
||||
partition root {
|
||||
partition-type-uuid = root-loongarch64
|
||||
image = "rootfs.ext2"
|
||||
}
|
||||
}
|
||||
6
board/qemu/loongarch64-virt-efi/grub.cfg
Normal file
6
board/qemu/loongarch64-virt-efi/grub.cfg
Normal file
@@ -0,0 +1,6 @@
|
||||
set default="0"
|
||||
set timeout="5"
|
||||
|
||||
menuentry "Buildroot" {
|
||||
linux /vmlinux.efi root=PARTLABEL=root rootwait console=ttyS0
|
||||
}
|
||||
5
board/qemu/loongarch64-virt-efi/post-image.sh
Executable file
5
board/qemu/loongarch64-virt-efi/post-image.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname "$0")"
|
||||
|
||||
cp -f "${BOARD_DIR}/grub.cfg" "${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg"
|
||||
31
board/qemu/loongarch64-virt-efi/readme.txt
Normal file
31
board/qemu/loongarch64-virt-efi/readme.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
Intro
|
||||
=====
|
||||
|
||||
This is a LoongArch 64bit UEFI Linux boot demo in QEMU virt machine.
|
||||
|
||||
Build
|
||||
=====
|
||||
|
||||
make qemu_loongarch64_virt-efi_defconfig
|
||||
make
|
||||
|
||||
Emulation
|
||||
=========
|
||||
|
||||
Run the emulation with:
|
||||
|
||||
qemu-system-loongarch64 \
|
||||
-M virt \
|
||||
-smp 2 \
|
||||
-m 1024 \
|
||||
-nographic \
|
||||
-bios output/images/QEMU_EFI.fd \
|
||||
-drive file=output/images/disk.img,format=raw \
|
||||
-netdev user,id=net0 \
|
||||
-device virtio-net-pci,netdev=net0 # qemu_loongarch64_virt_efi_defconfig
|
||||
|
||||
Note: for information, qemu version >= 9.0.0 is needed for this UEFI
|
||||
Linux demo. The host-qemu package in Buildroot (enabled in this
|
||||
defconfig) is sufficient to run this demo. In case another qemu is
|
||||
used (for example, from the host OS), make sure to check the version
|
||||
requirement.
|
||||
Reference in New Issue
Block a user