Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Karel Zak <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: "Christoph Hellwig" <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	"Jens Axboe" <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>,
	"Davidlohr Bueso" <dave-h16yJtLeMjHk1uMJSBkQmQ@public.gmane.org>,
	"Colin Cross" <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
	"Thierry Reding"
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Jonathan Hunter"
	<jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"Michał Mirosław"
	<mirq-linux-CoA6ZxLDdyEEUmgCuDUIdw@public.gmane.org>,
	"David Heidelberg" <david-W22tF5X+A20@public.gmane.org>,
	"Peter Geis" <pgwipeout-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v1] partitions/efi: Add 'gpt_sector' kernel cmdline parameter
Date: Mon, 24 Feb 2020 20:23:54 +0300	[thread overview]
Message-ID: <9c7343eb-1b09-ffcf-cba0-11d6a26dfd77@gmail.com> (raw)
In-Reply-To: <20200224163342.d4acf224b56celup-xkT7n84Rsxv/9pzu0YdTqQ@public.gmane.org>

24.02.2020 19:33, Karel Zak пишет:
> On Wed, Feb 19, 2020 at 09:59:54AM -0700, Stephen Warren wrote:
>> On 2/19/20 9:27 AM, Christoph Hellwig wrote:
>>> On Wed, Feb 19, 2020 at 07:23:39PM +0300, Dmitry Osipenko wrote:
>>>> The gpt_sector=<sector> causes the GPT partition search to look at the
>>>> specified sector for a valid GPT header if the GPT is not found at the
>>>> beginning or the end of block device.
>>>>
>>>> In particular this is needed for NVIDIA Tegra consumer-grade Android
>>>> devices in order to make them usable with the upstream kernel because
>>>> these devices use a proprietary / closed-source partition table format
>>>> for the EMMC and it's impossible to change the partition's format. Luckily
>>>> there is a GPT table in addition to the proprietary table, which is placed
>>>> in uncommon location of the EMMC storage and bootloader passes the
>>>> location to kernel using "gpt gpt_sector=<sector>" cmdline parameters.
>>>>
>>>> This patch is based on the original work done by Colin Cross for the
>>>> downstream Android kernel.
>>>
>>> I don't think a magic command line is the way to go.  The best would be
>>> to reverse-engineer the proprietary partition table format.  If that is
>>> too hard we can at least key off the odd GPT location based of it's
>>> magic number.
> 
>  +1
> 
>> I thought that the backup GPT was always present in the standard location;
> 
> If they have proprietary stuff on begin of the device and valid backup
> GPT at the end of the device then designer of this junk is crazy, because
> many GPT fdisk-like tools will try to recover from the backup header and 
> overwrite the unknown (invalid) stuff at the begin of the device...

It's a problem created by vendor, but these devices are assumed to run
Android-only. So it's not really that bad :)

  parent reply	other threads:[~2020-02-24 17:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 16:23 [PATCH v1] partitions/efi: Add 'gpt_sector' kernel cmdline parameter Dmitry Osipenko
     [not found] ` <20200219162339.16192-1-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-19 16:26   ` Ard Biesheuvel
2020-02-19 16:36     ` Dmitry Osipenko
2020-02-19 16:27 ` Christoph Hellwig
2020-02-19 16:38   ` Dmitry Osipenko
2020-02-19 16:59   ` Stephen Warren
2020-02-19 17:44     ` Dmitry Osipenko
     [not found]     ` <f9e41108-7811-0deb-6977-be0f60e23b52-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2020-02-24 16:33       ` Karel Zak
     [not found]         ` <20200224163342.d4acf224b56celup-xkT7n84Rsxv/9pzu0YdTqQ@public.gmane.org>
2020-02-24 17:23           ` Dmitry Osipenko [this message]
     [not found]             ` <9c7343eb-1b09-ffcf-cba0-11d6a26dfd77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-24 18:22               ` Dmitry Osipenko

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=9c7343eb-1b09-ffcf-cba0-11d6a26dfd77@gmail.com \
    --to=digetx-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=dave-h16yJtLeMjHk1uMJSBkQmQ@public.gmane.org \
    --cc=david-W22tF5X+A20@public.gmane.org \
    --cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mirq-linux-CoA6ZxLDdyEEUmgCuDUIdw@public.gmane.org \
    --cc=pgwipeout-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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