mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Documentation: i.MX: Document how to use GPT
@ 2018-12-07  8:13 Andrey Smirnov
  2018-12-10  9:05 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Smirnov @ 2018-12-07  8:13 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Document a way to avoid clashes between i.MX boot info/Barebox and
GPT's Partition Entry Array.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 Documentation/boards/imx.rst | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/Documentation/boards/imx.rst b/Documentation/boards/imx.rst
index 99ca10b7c..a87acbee2 100644
--- a/Documentation/boards/imx.rst
+++ b/Documentation/boards/imx.rst
@@ -60,6 +60,25 @@ The images can also always be started second stage::
 
   bootm /mnt/tftp/barebox-freescale-imx51-babbage.img
 
+Using GPT on i.MX
+^^^^^^^^^^^^^^^^^
+
+For i.MX SoCs that place vendor specific header at +1KiB mark of a
+boot medium, special care needs to be taken when parition that medium
+with GPT. In order to make room for i.MX boot headr GPT Partition
+Entry Array needs to be moved from its typical location, LBA 2, to an
+offset past vendor specific information. One way to do this would be
+to use ``-j`` or ``--adjust-main-table`` option of ``sgdisk``. For
+example, the following sequence:
+
+  sgdisk -Z <block device>
+  sgdisk -o -j 2048 -n 1:8192:+100M <block device>
+
+will create a single GPT partition starting at LBA 8192 and would
+place Partition Entry Array starting at LBA 2048 which should leave
+enough room for Barebox/i.MX boot header. Once that is done ``dd``
+command above can be used to place Barebox on the same medium.
+
 Information about the ``imx-image`` tool
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-- 
2.19.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Documentation: i.MX: Document how to use GPT
  2018-12-07  8:13 [PATCH] Documentation: i.MX: Document how to use GPT Andrey Smirnov
@ 2018-12-10  9:05 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2018-12-10  9:05 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: barebox

On Fri, Dec 07, 2018 at 12:13:22AM -0800, Andrey Smirnov wrote:
> Document a way to avoid clashes between i.MX boot info/Barebox and
> GPT's Partition Entry Array.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  Documentation/boards/imx.rst | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/Documentation/boards/imx.rst b/Documentation/boards/imx.rst
> index 99ca10b7c..a87acbee2 100644
> --- a/Documentation/boards/imx.rst
> +++ b/Documentation/boards/imx.rst
> @@ -60,6 +60,25 @@ The images can also always be started second stage::
>  
>    bootm /mnt/tftp/barebox-freescale-imx51-babbage.img
>  
> +Using GPT on i.MX
> +^^^^^^^^^^^^^^^^^
> +
> +For i.MX SoCs that place vendor specific header at +1KiB mark of a
> +boot medium, special care needs to be taken when parition that medium
> +with GPT. In order to make room for i.MX boot headr GPT Partition

s/headr/header/ and applied, thanks

Sascha

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-10  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07  8:13 [PATCH] Documentation: i.MX: Document how to use GPT Andrey Smirnov
2018-12-10  9:05 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox