mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH] Documentation: i.MX: Document how to use GPT
Date: Fri,  7 Dec 2018 00:13:22 -0800	[thread overview]
Message-ID: <20181207081322.15539-1-andrew.smirnov@gmail.com> (raw)

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

             reply	other threads:[~2018-12-07  8:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07  8:13 Andrey Smirnov [this message]
2018-12-10  9:05 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181207081322.15539-1-andrew.smirnov@gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox