summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-09-08 08:41:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-09-08 08:41:17 +0200
commit72c13c6bc70a288af075068a5fd5093cc2e73fa7 (patch)
treeac44e276b83d6dd031fc56dfddb2fe01c1a04812
parent762ba1cd6c7006561e43af06c027ecf79e60b454 (diff)
parentf3bd17ef124ba6630ae515905d0731a354f908e8 (diff)
downloadbarebox-72c13c6bc70a288af075068a5fd5093cc2e73fa7.tar.gz
barebox-72c13c6bc70a288af075068a5fd5093cc2e73fa7.tar.xz
Merge branch 'for-next/efi'
-rw-r--r--Documentation/boards/efi.rst27
-rw-r--r--Documentation/boards/ibase-mi991af.rst43
-rw-r--r--fs/efi.c2
-rw-r--r--include/efi/efi-device.h2
4 files changed, 73 insertions, 1 deletions
diff --git a/Documentation/boards/efi.rst b/Documentation/boards/efi.rst
index 8f78a800ef..f59bb1d5ba 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 @@ 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
^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 <Del> key immediately allows you to enter the BIOS Setup utility. If you are
+ a little bit late pressing the <Del> 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 <Ctrl>, <Alt> and <Delete> 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 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;