Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp749401ybv; Wed, 19 Feb 2020 08:28:29 -0800 (PST) X-Google-Smtp-Source: APXvYqwJ313ajnVIpjmAQ3gRkd+BEucPtwLa8JcjeXml6YhvwYUa7qZ1isxNJ1w2+ZD3Ds6diWO+ X-Received: by 2002:a9d:7509:: with SMTP id r9mr19323485otk.270.1582129709566; Wed, 19 Feb 2020 08:28:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582129709; cv=none; d=google.com; s=arc-20160816; b=PIpFYiVy0fAx5phBih+X9l0uartssDpancGite7dRLwCtbcHyDP10lXUueubGibRtG 5CbvCPn52WB/pJZ4FvgjgI1uyd1pUe5h7H7jcWLO2Hd+aGThM0m3sl70xSzEMSmZ/QYT gCi4pj2DHilENCYeD+PCByQ0FCFDBlLHQV0mWYnG2vJ7EpBfXtDDsk99dgHfmSfKXzzX yRUs+UEXcm8bL2u3cIv3lIzx7jk92G8QVJypiK2xvamKyS/JEllKaQU+TX4LqUcs38oQ mIxX7OgY7u0R7MdrTOHHXKLoaS8aVvPX/YbnQr7o4DDGTgpmu6omYM4Irvt92wVWldjY NOgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=+CojvMx93xsodiDvTtV8/VrGBaV6zZUC2VstkM1u1l4=; b=mwiszMn8R0CxvU+o+jIp6v97jKiVxnhTL5ojdChbDhQPFfiwvn6NYyZ6gcleGcto0y GAwkI9cVDFg/M7bs3VsETsqg308Nnn1U5Mt0w0MryXBI1JqL1gBzwVX25DFP+IZdjDc6 iyavtXxcHPRdReb2EDaX+Y0M5z0QGkI45lqk+GKvI98cCcXjsDUkMBodmMIFcygQp9eC 87ILQs9vrN5WfHZNLL+F2vbO7DAFp3vB1osN2IhGvTTuznSCtQ4i0CXPt0HD9GFux+C7 OV2Kp4aUZ/eKt5SOL/OB98HNyOA3nTWuY/O4h8M7sM6ghU3GNG4LnOqF/+cWVqkT0Wm5 i8Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=MjkW87BV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si10043088oib.152.2020.02.19.08.28.17; Wed, 19 Feb 2020 08:28:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=MjkW87BV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727001AbgBSQ1x (ORCPT + 99 others); Wed, 19 Feb 2020 11:27:53 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:60162 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726514AbgBSQ1v (ORCPT ); Wed, 19 Feb 2020 11:27:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+CojvMx93xsodiDvTtV8/VrGBaV6zZUC2VstkM1u1l4=; b=MjkW87BVQNY2tB0+8h16ljneX5 hvtTluLOHHUfLC/dX/YPRFHXtmiZhwcCvDndhqME9bbd7LrfHXdOxvEqcY6zTbuQDftls28L4iATG uQ80SplXnwJ+VyJN/vbPrIStB9Qlopf+NUovvu0r91zcG6z+L5LHOZ9sHM/fnfm+An5Fvq5OLASn9 RHakAxi18QNh9YlhSkm0qGy+/1Diq11nU5wrk/W1APzhp+vQT88P7AtvVcxxopYf6qR4fueaKexJm u8f34hRz8qFCwj+kwcRxMtypfZBZQ75fcNBAcHNdoStX4ZhR5tDdid67P9vIckdkv/1Z3DtdMRKss cOvT7kZw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4SCI-0002si-55; Wed, 19 Feb 2020 16:27:38 +0000 Date: Wed, 19 Feb 2020 08:27:38 -0800 From: Christoph Hellwig To: Dmitry Osipenko Cc: Jens Axboe , Davidlohr Bueso , Colin Cross , Thierry Reding , Jonathan Hunter , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , David Heidelberg , Peter Geis , linux-efi@vger.kernel.org, linux-tegra@vger.kernel.org, linux-block@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] partitions/efi: Add 'gpt_sector' kernel cmdline parameter Message-ID: <20200219162738.GA10644@infradead.org> References: <20200219162339.16192-1-digetx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200219162339.16192-1-digetx@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 19, 2020 at 07:23:39PM +0300, Dmitry Osipenko wrote: > The gpt_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=" 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.