Initial Commit
- initial default booting image
This commit is contained in:
30
board/loongarch64-efi/genimage-efi.cfg
Normal file
30
board/loongarch64-efi/genimage-efi.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/loongarch64-efi/grub.cfg
Normal file
6
board/loongarch64-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,115200
|
||||
}
|
||||
1
board/loongarch64-efi/patches/linux-headers/linux-headers.hash
Symbolic link
1
board/loongarch64-efi/patches/linux-headers/linux-headers.hash
Symbolic link
@@ -0,0 +1 @@
|
||||
../linux/linux.hash
|
||||
2
board/loongarch64-efi/patches/linux/linux.hash
Normal file
2
board/loongarch64-efi/patches/linux/linux.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# From https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
|
||||
sha256 a9b020721778384507010177d3929e7d4058f7f6120f05a99d56b5c5c0346a70 linux-6.12.32.tar.xz
|
||||
5
board/loongarch64-efi/post-image.sh
Executable file
5
board/loongarch64-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"
|
||||
38
board/loongarch64-efi/readme.txt
Normal file
38
board/loongarch64-efi/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
The loongarch64_efi_defconfig allows to build a minimal Linux system that
|
||||
can boot on all loongarch64 systems providing an New World [1] EFI firmware.
|
||||
|
||||
This includes almost all LoongArch Loongson-3 series workstations and servers,
|
||||
see [2] for hardware and firmware information.
|
||||
|
||||
Building and booting
|
||||
====================
|
||||
|
||||
$ make loongarch64_efi_defconfig
|
||||
$ make
|
||||
|
||||
The file output/images/disk.img is a complete disk image that can be
|
||||
booted, it includes the grub2 bootloader, Linux kernel and root
|
||||
filesystem.
|
||||
|
||||
Testing under Qemu
|
||||
==================
|
||||
|
||||
This image can also be tested using Qemu:
|
||||
|
||||
qemu-system-loongarch64 \
|
||||
-M virt \
|
||||
-cpu la464 \
|
||||
-nographic \
|
||||
-bios </path/to/QEMU_EFI.fd> \
|
||||
-drive file=output/images/disk.img,if=none,format=raw,id=hd0 \
|
||||
-device virtio-blk-pci,drive=hd0 \
|
||||
-netdev user,id=eth0 \
|
||||
-device virtio-net-pci,netdev=eth0
|
||||
|
||||
Note that </path/to/QEMU_EFI.fd> needs to point to a valid loongarch64 UEFI
|
||||
firmware image for qemu.
|
||||
It may be provided by your distribution as a edk2-loongarch64 package,
|
||||
in path such as /usr/share/edk2/loongarch64/QEMU_EFI.fd .
|
||||
|
||||
[1]: https://areweloongyet.com/en/docs/old-and-new-worlds/
|
||||
[2]: https://github.com/loongson/Firmware
|
||||
Reference in New Issue
Block a user