From 3f5d439693bee191564030daef762f149f565b8b Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Wed, 6 Sep 2017 14:11:06 +0200 Subject: Documentation: efi: add example how to create EFI partition Signed-off-by: Oleksij Rempel Signed-off-by: Sascha Hauer --- Documentation/boards/efi.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Documentation/boards/efi.rst b/Documentation/boards/efi.rst index 8f78a800ef..6c90e6cdf0 100644 --- a/Documentation/boards/efi.rst +++ b/Documentation/boards/efi.rst @@ -47,6 +47,31 @@ has to be put into the ``EFI/barebox/`` directory. 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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- cgit v1.2.3 From fc7c42ff3c889ccc993061ee183b0cf1621e3f1c Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Wed, 6 Sep 2017 14:40:08 +0200 Subject: efi: make sure efi-fs is started in the right order with this parch, EFI System partition will be mounted to /boot instead of /mnt/diskXX. Signed-off-by: Michael Olbrich Signed-off-by: Oleksij Rempel Signed-off-by: Sascha Hauer --- fs/efi.c | 2 +- include/efi/efi-device.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/efi.c b/fs/efi.c index 85ff914291..692556b260 100644 --- a/fs/efi.c +++ b/fs/efi.c @@ -558,4 +558,4 @@ static struct efi_driver efi_fs_driver = { .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 8f5f1f3f13..15c293bb1b 100644 --- a/include/efi/efi-device.h +++ b/include/efi/efi-device.h @@ -33,6 +33,8 @@ static inline struct efi_driver *to_efi_driver(struct driver_d *drv) #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; -- cgit v1.2.3 From f3bd17ef124ba6630ae515905d0731a354f908e8 Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Wed, 6 Sep 2017 16:27:37 +0200 Subject: efi: add iBASE MI991AF documentation. Signed-off-by: Oleksij Rempel Signed-off-by: Sascha Hauer --- Documentation/boards/efi.rst | 2 ++ Documentation/boards/ibase-mi991af.rst | 43 ++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 Documentation/boards/ibase-mi991af.rst diff --git a/Documentation/boards/efi.rst b/Documentation/boards/efi.rst index 6c90e6cdf0..f59bb1d5ba 100644 --- a/Documentation/boards/efi.rst +++ b/Documentation/boards/efi.rst @@ -1,3 +1,5 @@ +.. _barebox_on_uefi: + barebox on (U)EFI ================= diff --git a/Documentation/boards/ibase-mi991af.rst b/Documentation/boards/ibase-mi991af.rst new file mode 100644 index 0000000000..a22e5fcf79 --- /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 -- cgit v1.2.3