Documentation: efi: add example how to create EFI partition
PATCH 1/1 Documentation: efi: add example how to create EFI partition
From: Oleksij Rempel <[email protected]>
Signed-off-by Oleksij Rempel <[email protected]>
--- Documentation/boards/efi.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
Documentation/boards/efi.rst +25 -0
@@ -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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 6 lines · Oleksij Rempel
From: Oleksij Rempel <[email protected]>
Signed-off-by Oleksij Rempel <[email protected]>--- Documentation/boards/efi.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
Applied, thanks
Sascha
Quoted 46 lines
Documentation/boards/efi.rst +25
-0@@ -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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox