From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chaiken, Alison Date: Thu, 01 Jun 2017 08:06:22 -0700 Subject: [U-Boot] [PATCH v2 5/6] rename GPT partitions to detect boot failure In-Reply-To: <20170601102145.10d96592@jawa> References: <20170526123845.GI10782@bill-the-cat> <1496076573-14495-1-git-send-email-alison@peloton-tech.com> <1496076573-14495-6-git-send-email-alison@peloton-tech.com> <20170531101246.7e51b038@jawa> <8e8e37eb178dc8501a00b4139a95e19e@she-devel.com> <20170601102145.10d96592@jawa> Message-ID: <080df5158b30ff0e86f63ba00eca6132@she-devel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Lukasz Majewski wrote: > Maybe it would be better to have > > gpt flip mmc 0 > > (By default we have "primary" and "backup") > > In that way we could set other names to GPT partitions without the > need to modify the code. I answered: >> Another possibility is to support >> >> gpt flip mmc 0 >> >> where two names are required, with defaults 'primary' and 'backup'. >> Perhaps I should rework patch 5 that way? Lukasz responded: > Please correct my understanding if I'm wrong. > > You parse GPT partitions to a list and there are only two names > possible: > > "primary" and "backup". > > When we call gpt filp we rename those names ("primary" -> "backup" and > the other way). > > Ahhh..... so your patch would allow to rename "primary" to and > "backup" to for all names. > > My idea was rather to have a gpt call to set name of a GPT partition.... > I can image that somebody would like to change on the fly single GPT > partition name (when having/care about 2 partitions for his/her project > specific data). > > But, I don't know how much effort it would take to implement it (and if > others would see it beneficial). I would propose then two options: gpt rename mmc 0 which renames all the 1's to 2's, and gpt flip mmc 0 which swaps the two name strings for all partitions where they're found. These two operations together with 'gpt write' then cover all the common use cases I can imagine. I'm open to any other suggestions, of course. I just posted what I already had to get started. -- Alison --- Alison Chaiken alison at she-devel.com, 650-279-5600 http://{ she-devel.com, exerciseforthereader.org } "We are giving up our privacy, one convenience at a time." -- Evangelos Simoudis