diff --git a/OLVASSEL.md b/OLVASSEL.md index bd221d1..043cb15 100644 --- a/OLVASSEL.md +++ b/OLVASSEL.md @@ -18,7 +18,7 @@ Előre lefordított binárisok mellékelve, egyből használhatók. 5. *mykernel-rust* egy példa BOOTBOOT [kompatíbilis kernel](https://gitlab.com/bztsrc/bootboot/tree/master/mykernel) Rust-ban -6. *mkbootimg* minden az egyben, multiplatform [bootolható lemezkép készítő](https://gitlab.com/bztsrc/bootboot/tree/master/mkbootimg) (Windows, MacOSX, Linux). +6. *mkbootimg* minden az egyben, multiplatform [bootolható lemezkép készítő](https://gitlab.com/bztsrc/bootboot/tree/binaries) (Windows, MacOSX, Linux). BOOTBOOT lefordítható [coreboot](https://gitlab.com/bztsrc/bootboot/tree/master/x86_64-cb) payloadként is, lásd *x86_64-cb* és *aarch64-cb*, de mivel ezek szorosan kapcsolódnak a libpayload-hoz, nincs belőlük előre fordított bináris. @@ -26,7 +26,7 @@ BOOTBOOT lefordítható [coreboot](https://gitlab.com/bztsrc/bootboot/tree/maste Vedd figyelembe, hogy nem minden referencia implementáció támogatja a teljes 2-es protokollt, az x86_64-bios csak statikus memórialeképezéseket kezel, ami az 1-es protokoll szintnek felel meg. -Gyors kipróbáláshoz találsz bootolható képfájlokat az [images](https://gitlab.com/bztsrc/bootboot/tree/master/images) mappában. +Gyors kipróbáláshoz találsz bootolható képfájlokat az [images](https://gitlab.com/bztsrc/bootboot/tree/binaries/images) mappában. BOOTBOOT Protokoll ================== diff --git a/README.md b/README.md index 47a1058..6cc7c07 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ I provide pre-compiled images ready for use. 5. *mykernel-rust* an example BOOTBOOT [compatible kernel](https://gitlab.com/bztsrc/bootboot/tree/master/mykernel-rust) in Rust -6. *mkbootimg* an all-in-one multiplatform [bootable disk image creator](https://gitlab.com/bztsrc/bootboot/tree/master/mkbootimg) (Windows, MacOSX, Linux). +6. *mkbootimg* an all-in-one multiplatform [bootable disk image creator](https://gitlab.com/bztsrc/bootboot/tree/binaries/) (Windows, MacOSX, Linux). BOOTBOOT can also be compiled as a [coreboot](https://gitlab.com/bztsrc/bootboot/tree/master/x86_64-cb) payload, see *x86_64-cb* and *aarch64-cb*, but since they are tied strongly with libpayload, I do not provide binaries for those. @@ -26,7 +26,7 @@ see *x86_64-cb* and *aarch64-cb*, but since they are tied strongly with libpaylo Please note that not all the reference implementations do support the full protocol at level 2, x86_64-bios only handles static mappings which makes it a level 1 loader. -For a quick test, you can find example bootable disk [images](https://gitlab.com/bztsrc/bootboot/tree/master/images) too. +For a quick test, you can find example bootable disk [images](https://gitlab.com/bztsrc/bootboot/tree/binaries/images) too. BOOTBOOT Protocol ================= diff --git a/images/Makefile b/images/Makefile deleted file mode 100644 index 90cf8cf..0000000 --- a/images/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# platform, either x86 or rpi -PLATFORM=x86 -#PLATFORM=rpi -# the path to OVMF.fd (for testing with EFI) -OVMF=/usr/share/qemu/bios-TianoCoreEFI.bin - -all: ../mkbootimg/mkbootimg initdir disk - -# compile the image creator -../mkbootimg/mkbootimg: - @make -C ../mkbootimg all - -# create an initial ram disk image with the kernel inside -initdir: - @mkdir initrd initrd/sys 2>/dev/null | true -ifeq ($(PLATFORM),x86) - cp ../mykernel/mykernel.x86_64.elf initrd/sys/core -else - cp ../mykernel/mykernel.aarch64.elf initrd/sys/core -endif - -# create hybrid disk / cdrom image or ROM image -disk: ../mkbootimg/mkbootimg initdir mkbootimg.json - ../mkbootimg/mkbootimg mkbootimg.json disk-$(PLATFORM).img - @rm -rf initrd - -initrd.rom: ../mkbootimg/mkbootimg initdir mkbootimg.json - ../mkbootimg/mkbootimg mkbootimg.json initrd.rom - @rm -rf initrd - -# create a GRUB cdrom -grub.iso: ../mkbootimg/mkbootimg initdir mkbootimg.json - @../mkbootimg/mkbootimg mkbootimg.json initrd.bin - @rm -rf initrd - @mkdir iso iso/bootboot iso/boot iso/boot/grub 2>/dev/null || true - @cp ../bootboot.bin iso/bootboot/loader || true - @cp config iso/bootboot/config || true - @cp initrd.bin iso/bootboot/initrd || true - @printf "menuentry \"BOOTBOOT test\" {\n multiboot /bootboot/loader\n module /bootboot/initrd\n module /bootboot/config\n boot\n}" >iso/boot/grub/grub.cfg || true - grub-mkrescue -o grub.iso iso - @rm -r iso 2>/dev/null || true - -# test the disk image -rom: initrd.rom - qemu-system-x86_64 -option-rom ../dist/bootboot.bin -option-rom initrd.rom -serial stdio - -bios: - qemu-system-x86_64 -drive file=disk-x86.img,format=raw -serial stdio - -cdrom: - qemu-system-x86_64 -cdrom disk-x86.img -serial stdio - -grubcdrom: grub.iso - qemu-system-x86_64 -cdrom grub.iso -serial stdio - -efi: - qemu-system-x86_64 -bios $(OVMF) -m 64 -drive file=disk-x86.img,format=raw -serial stdio - -eficdrom: - qemu-system-x86_64 -bios $(OVMF) -m 64 -cdrom disk-x86.img -serial stdio - -linux: - qemu-system-x86_64 -kernel ../dist/bootboot.bin -drive file=disk-x86.img,format=raw -serial stdio - -sdcard: - qemu-system-aarch64 -M raspi3 -kernel ../dist/bootboot.img -drive file=disk-rpi.img,if=sd,format=raw -serial stdio - -coreboot: -ifeq ($(PLATFORM),x86) - qemu-system-x86_64 -bios coreboot-x86.rom -drive file=disk-x86.img,format=raw -serial stdio -else - qemu-system-aarch64 -bios coreboot-arm.rom -M virt,secure=on,virtualization=on -cpu cortex-a53 -m 1024M -drive file=disk-rpi.img,format=raw -serial stdio -endif - -# clean up -clean: - rm -rf initrd *.bin *.img *.rom *.iso 2>/dev/null || true diff --git a/images/OLVASSEL.md b/images/OLVASSEL.md deleted file mode 100644 index f79dccf..0000000 --- a/images/OLVASSEL.md +++ /dev/null @@ -1,74 +0,0 @@ -BOOTBOOT Minta Bootolható Lemezkép Fájlok -========================================= - -Általános leírásért lásd a [BOOTBOOT Protokoll](https://gitlab.com/bztsrc/bootboot)t. - -- disk-rpi.img.gz: minta lemezkép AArch64-hez RaspberryPi 3-on és 4-en -- disk-x86.img.gz: minta lemezkép x86_64-hez (CDROM, BIOS, UEFI) -- initrd.rom.gz: minta initrd ROM kép (beágyazott BIOS rendszerekhez) -- coreboot-x86.rom.gz: minta coreboot ROM kép BOOTBOOT payload-al PC-re - -Mielőtt használhatnád a lemezképeket, ki kell csomagolni őket a `gzip -d` paranccsal. A lemezképeket az [mkbootimg](https://gitlab.com/bztsrc/bootboot/tree/master/mkbootimg) -paranccsal hoztam létre, és a kiírásukhoz fizikai lemezre az [USBImager](https://gitlab.com/bztsrc/usbimager)-t vagy a `dd` parancsot javaslom. - -A disk-x86.img egy speciális hibrid lemezkép, amit átnevezhetsz disk-x86.iso-ra és kiégetheted egy CDROM-ra; vagy bebootolhatod -USB pendrávjról is BIOS valamint UEFI gépeken egyaránt. - -A disk-rpi.img egy (Class 10) SD kártyára írható, és Raspberry Pi 3-on és 4-en bootolható. - -A lemezképekben mindössze egy boot partíció található. Az `fdisk` paranccsal szabadon hozzáadhatsz még partíciókat az izlésednek -megfelelően, vagy csak módosítsd az mkbootimg.json fájlt és adj hozzá rekordokat a `partitions` tömbhöz. - -Fordítás --------- - -Lásd mkbootimg.json. Nézz bele a Makefile-ba is, az elején fogsz látni konfigurálható változókat. - -- PLATFORM: vagy "x86" vagy "rpi", ez választja ki, melyik lemezképet generálja -- OVMF: a EFI firmware elérési útja - -Aztán csak futtasd a `make` parancsot. - -A coreboot-*.rom fordításához [coreboot fordító környezet](https://gitlab.com/bztsrc/bootboot/tree/master/x86_64-cb) szükséges. - -Tesztelés ---------- - -Hogy kipróbáld a BOOTBOOT-ot qemu-ban, használd a következő parancsokat: -``` -make rom -``` -Ez betölti a minta kernelt ROM-ból (lemez nélküli boot tesztelése BIOS Boot Spec alapján). -``` -make bios -``` -Ez betölti a minta kernelt lemezről (BIOS-al). -``` -make cdrom -``` -Ez El Torito "nem emulált" CDROM-ról tölti be a minta kernelt (BIOS-al). -``` -make efi -``` -Ez betölti a kernelt lemezről, UEFI használatával. Kell hozzá a TianoCode BIOS képfájl, amit a Makefile elején kell megadni. -``` -make eficdrom -``` -Ez betölti a kernelt CDROM-ról, UEFI használatával. -``` -make grubcdrom -``` -Ez grub-mkrescue hívásával hoz létre egy cdrom lemezképet, majd Multiboot-al betölti a BOOTBOOT-ot. -``` -make linux -``` -Ez betölti a minta kernelt úgy, hogy a BOOTBOOT-ot [Linux/x86 Boot Protocol](https://www.kernel.org/doc/html/latest/x86/boot.html)-al -indítja. -``` -make sdcard -``` -Ez "raspi3" gépet emulálva tölti be a minta kernelt SD kártya meghajtóról (kell hozzá a qemu-system-aarch64). -``` -make coreboot -``` -BOOTBOOT tesztelése mint coreboot payload (nincs BIOS se UEFI). PLATFORM=x86 esetén PC-t emulál, egyébként ARM64-et. diff --git a/images/README.md b/images/README.md deleted file mode 100644 index be56a47..0000000 --- a/images/README.md +++ /dev/null @@ -1,73 +0,0 @@ -BOOTBOOT Example Bootable Disk Images -===================================== - -See [BOOTBOOT Protocol](https://gitlab.com/bztsrc/bootboot) for common details. - -- disk-rpi.img.gz: an example image for AArch64 and RaspberryPi 3 and 4 -- disk-x86.img.gz: an example image for x86_64 (CDROM, BIOS, UEFI) -- initrd.rom.gz: an example initrd ROM image (for embedded BIOS systems) -- coreboot-x86.rom.gz: an example coreboot ROM image with BOOTBOOT payload for PC - -Before you can use the images, uncompress them with `gzip -d`. I've used [mkbootimg](https://gitlab.com/bztsrc/bootboot/tree/master/mkbootimg) -to generate these images, and I recommend [USBImager](https://gitlab.com/bztsrc/usbimager) or `dd` to write them to physical disks. - -The disk-x86.img is a special hybrid image, which can be renamed to disk-x86.iso and then burnt to a CDROM; it can also be -booted from an USB stick in a BIOS machine as well as in an UEFI machine. - -The disk-rpi.img can be written to an SDCard (Class 10) and booted on a Raspberry Pi 3 and 4. - -The disk images contain only one boot partition. Feel free to use `fdisk` and add more partitions to your needs, or -modify mkbootimg.json and add more elements to the `partitions` array. - -Compilation ------------ - -See mkbootimg.json. Look at the beginning of the Makefile too, you'll find configurable variables there. - -- PLATFORM: either "x86" or "rpi", this selects which disk image to create -- OVMF: path to the EFI firmware image - -Then just run `make`. - -Compiling coreboot-*.rom requires a [coreboot build environment](https://gitlab.com/bztsrc/bootboot/tree/master/x86_64-cb). - -Testing -------- - -To test BOOTBOOT in qemu, you can use: -``` -make rom -``` -Will boot the example kernel from ROM (via BIOS Boot Spec, diskless test). -``` -make bios -``` -Will boot the example kernel from disk (using BIOS). -``` -make cdrom -``` -Will boot the example kernel in El Torito "no emulation" mode (BIOS). -``` -make efi -``` -Will boot the example kernel from disk using UEFI. You must provide your own TianoCore image, and set the path for it in the Makefile. -``` -make eficdrom -``` -Will boot the example kernel under UEFI from CDROM. -``` -make grubcdrom -``` -Will create a cdrom image using grub-mkrescue and boot BOOTBOOT using Multiboot. -``` -make linux -``` -Will boot the example kernel by booting BOOTBOOT via the [Linux/x86 Boot Protocol](https://www.kernel.org/doc/html/latest/x86/boot.html). -``` -make sdcard -``` -Will boot the example kernel from SDCard emulating "raspi3" machine under qemu (requires qemu-system-aarch64). -``` -make coreboot -``` -To test BOOTBOOT as a coreboot payload (no BIOS, no UEFI). With PLATFORM=x86 emulates a PC, and ARM64 otherwise. diff --git a/images/config b/images/config deleted file mode 100644 index cda09ca..0000000 --- a/images/config +++ /dev/null @@ -1,4 +0,0 @@ -// BOOTBOOT loader configuration - -screen=800x600 -kernel=sys/core diff --git a/images/coreboot-x86.rom.gz b/images/coreboot-x86.rom.gz deleted file mode 100644 index 758bf6c..0000000 Binary files a/images/coreboot-x86.rom.gz and /dev/null differ diff --git a/images/disk-rpi.img.gz b/images/disk-rpi.img.gz deleted file mode 100644 index dbf87d7..0000000 Binary files a/images/disk-rpi.img.gz and /dev/null differ diff --git a/images/disk-x86.img.gz b/images/disk-x86.img.gz deleted file mode 100644 index 6af237e..0000000 Binary files a/images/disk-x86.img.gz and /dev/null differ diff --git a/images/initrd.rom.gz b/images/initrd.rom.gz deleted file mode 100644 index 11a1a65..0000000 Binary files a/images/initrd.rom.gz and /dev/null differ diff --git a/images/mkbootimg.json b/images/mkbootimg.json deleted file mode 100644 index 5907540..0000000 --- a/images/mkbootimg.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "disksize": 128, - "config": "./config", - "initrd": { "type": "cpio", "gzip": true, "directory": "initrd" }, - "iso9660": true, - "partitions": [ - { "type": "boot", "size": 16 } - ] -} diff --git a/mkbootimg-Linux.zip b/mkbootimg-Linux.zip deleted file mode 100644 index 8e2b2a7..0000000 Binary files a/mkbootimg-Linux.zip and /dev/null differ diff --git a/mkbootimg-MacOSX.zip b/mkbootimg-MacOSX.zip deleted file mode 100644 index f31303b..0000000 Binary files a/mkbootimg-MacOSX.zip and /dev/null differ diff --git a/mkbootimg-Win.zip b/mkbootimg-Win.zip deleted file mode 100644 index 1024bfb..0000000 Binary files a/mkbootimg-Win.zip and /dev/null differ diff --git a/x86_64-cb/OLVASSEL.md b/x86_64-cb/OLVASSEL.md index 5619a15..72c4460 100644 --- a/x86_64-cb/OLVASSEL.md +++ b/x86_64-cb/OLVASSEL.md @@ -64,7 +64,7 @@ $ make ### 6. lépés - A frissen fordított ROM tesztelése QEMU-n Bővebb információért lásd a [coreboot dokumentáció](https://doc.coreboot.org/mainboard/emulation/qemu-i440fx.html)t. Az -[images](https://gitlab.com/bztsrc/bootboot/tree/master/images) mappában találsz lefordított coreboot-x86.rom binárist. +[images](https://gitlab.com/bztsrc/bootboot/tree/binaries/images) mappában találsz lefordított coreboot-x86.rom binárist. ```sh $ qemu-system-x86_64 -bios build/coreboot.rom -drive file=$(BOOTBOOT)/images/disk-x86.img,format=raw -serial stdio ``` diff --git a/x86_64-cb/README.md b/x86_64-cb/README.md index 742cac0..68d4435 100644 --- a/x86_64-cb/README.md +++ b/x86_64-cb/README.md @@ -64,7 +64,7 @@ $ make ### Step 6 - Test the newly compiled ROM in QEMU For more information, read the [coreboot docs](https://doc.coreboot.org/mainboard/emulation/qemu-i440fx.html). In the -[images](https://gitlab.com/bztsrc/bootboot/tree/master/images) directory you can find a precompiled coreboot-x86.rom binary. +[images](https://gitlab.com/bztsrc/bootboot/tree/binaries/images) directory you can find a precompiled coreboot-x86.rom binary. ```sh $ qemu-system-x86_64 -bios build/coreboot.rom -drive file=$(BOOTBOOT)/images/disk-x86.img,format=raw -serial stdio ```