diff --git a/Documentation/boards/efi.rst b/Documentation/boards/efi.rst index 8f78a80..f59bb1d 100644 --- a/Documentation/boards/efi.rst +++ b/Documentation/boards/efi.rst @@ -1,3 +1,5 @@ +.. _barebox_on_uefi: + barebox on (U)EFI ================= @@ -47,6 +49,31 @@ Supported backends for EFI are raw partitions that can be discovered via a partition UUID. +With this sample script you can create bootable image and transfer it to the +flash driver: + +.. code-block:: sh + + truncate --size 128M barebox-boot.img + echo 'start=2048, type=ef' | sfdisk barebox-boot.img + + LOOPDEV=$(losetup --find --show barebox-boot.img) + partprobe ${LOOPDEV} + + # Create filesystems + mkfs.fat -F32 ${LOOPDEV}p1 + MOUNTDIR=$(mktemp -d -t demoXXXXXX) + mount ${LOOPDEV}p1 $MOUNTDIR + mkdir -p ${MOUNTDIR}/EFI/BOOT/ + cp barebox.efi ${MOUNTDIR}/EFI/BOOT/BOOTx64.EFI + if [ -d network-drivers ]; then + cp -r network-drivers ${MOUNTDIR}/ + fi + umount ${MOUNTDIR} + losetup -d ${LOOPDEV} + + dd if=barebox-boot.img of=/dev/sdX + Running EFI barebox on qemu ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/Documentation/boards/ibase-mi991af.rst b/Documentation/boards/ibase-mi991af.rst new file mode 100644 index 0000000..a22e5fc --- /dev/null +++ b/Documentation/boards/ibase-mi991af.rst @@ -0,0 +1,43 @@ +iBASE MI991AF +============= + +The iBASE MI991AF Mini-ITX motherboard has + + * 7th/6th Generation Intel® Xeon® E3 / Core™ i7 / i5 /i3 / Pentium® / Celeron® QC/DC processors, up to 4GHz + * 2x DDR4 SO-DIMM, Max. 32GB, ECC compatible + * Intel® Processor integrated graphics device, supports DVI-D, HDMI and DisplayPort + * Dual Intel® Gigabit LAN + * 2x USB 2.0, 6x USB 3.0, 4x COM, 4x SATAIII + * 2x Mini PCI-E slots, 1x mSATA, 1x PCI-E(x16) + * Watchdog timer, Digital I/O, iAMT (11.0), TPM (1.2), iSMART + +Running barebox +--------------- + +Building the barebox image for this target is covered by the ``efi_defconfig`` + +BIOS should be configured as follow: + + * When you turn on the computer, the BIOS is immediately activated. Pressing + the key immediately allows you to enter the BIOS Setup utility. If you are + a little bit late pressing the key, POST (Power On Self Test) will + continue with its test routines, thus preventing you from invoking the Setup. + In this case restart the system by pressing the ”Reset” button or simultaneously + pressing the , and keys. You can also restart by turning the + system Off and back On again. + * Reset BIOS settings. With this step we wont to make sure BIOS has defined common state to avoid + undocumented issues. Switch to "Save & Exit" tab, choice "Restore Defaults" + and press Enter. Answer "Yes" and press Enter again. Then choice "Save Changes and Exit" + and press Enter. + * Enable UEFI support. Switch to "Boot" tab. Choice "Boot mode select" and set it to "UEFI". + Switch in the "Save & Exit" tab to "Save Changes and Exit" and press Enter. + +To make network work in barebox you will need to prepare efi binary network drivers and put them in to +"network-drivers" directory. + +To continue please proceed with barebox :ref:`barebox_on_uefi` documentation. + +Links +----- + + * https://www.ibase.com.tw/english/ProductDetail/EmbeddedComputing/MI991 diff --git a/fs/efi.c b/fs/efi.c index 85ff914..692556b 100644 --- a/fs/efi.c +++ b/fs/efi.c @@ -558,4 +558,4 @@ .probe = efi_fs_probe, .guid = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID, }; -device_efi_driver(efi_fs_driver); +fs_efi_driver(efi_fs_driver); diff --git a/include/efi/efi-device.h b/include/efi/efi-device.h index 8f5f1f3..15c293b 100644 --- a/include/efi/efi-device.h +++ b/include/efi/efi-device.h @@ -33,6 +33,8 @@ #define device_efi_driver(drv) \ register_driver_macro(device, efi, drv) +#define fs_efi_driver(drv) \ + register_driver_macro(fs, efi, drv) static inline int efi_driver_register(struct efi_driver *efidrv) { efidrv->driver.bus = &efi_bus;