From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Message-ID: <1576239835.1482.15.camel@googlemail.com> From: Christoph Fritz Date: Fri, 13 Dec 2019 13:23:55 +0100 In-Reply-To: <20191212120752.vzdhfvp2up6d735h@pengutronix.de> References: <1573908272.2548.2.camel@googlemail.com> <9c217e15-b649-0457-3001-ad49e1461004@pengutronix.de> <20191212115019.kyt76nf4vm5wa432@pengutronix.de> <20191212120752.vzdhfvp2up6d735h@pengutronix.de> Mime-Version: 1.0 Subject: Re: [OSS-Tools] [PATCH dt-utils] barebox-mark-successful-boot: adopt naming from barebox List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: chf.fritz@googlemail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: oss-tools-bounces@pengutronix.de Sender: "OSS-Tools" To: Roland Hieber Cc: oss-tools@pengutronix.de On Thu, 2019-12-12 at 13:07 +0100, Roland Hieber wrote: > On Thu, Dec 12, 2019 at 12:50:19PM +0100, Roland Hieber wrote: > > On Wed, Dec 11, 2019 at 12:25:11PM +0100, Enrico Joerns wrote: > > > On 11/16/19 1:44 PM, Christoph Fritz wrote: > > > > This patch is adopting current barebox default naming scheme. > > > > > > > > Signed-off-by: Christoph Fritz > > > > --- > > > > scripts/barebox-mark-successful-boot.sh | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/scripts/barebox-mark-successful-boot.sh b/scripts/barebox-mark-successful-boot.sh > > > > index 3120f57..9286a63 100644 > > > > --- a/scripts/barebox-mark-successful-boot.sh > > > > +++ b/scripts/barebox-mark-successful-boot.sh > > > > @@ -3,12 +3,12 @@ > > > > DEFAULT_REMAINING_ATTEMPTS=3 > > > > DEFAULT_PRIORITY=20 > > > > -system=$(sed /proc/cmdline -ne "s/\(^\|.* \)bootstate.active=\([^ ]*\).*/\2/p") > > > > +system=$(sed /proc/cmdline -ne "s/\(^\|.* \)bootchooser.active=\([^ ]*\).*/\2/p") > > > > if [ -z "${system}" ]; then > > > > echo "unable to detect system partition" >&2 > > > > exit 1 > > > > fi > > > > -barebox-state -n /state \ > > > > +barebox-state -n state \ > > > > -s "bootstate.${system}.remaining_attempts=${DEFAULT_REMAINING_ATTEMPTS}" \ > > > > -s "bootstate.${system}.priority=${DEFAULT_PRIORITY}" > > > > > > > > > > Thanks for your patch, I didn't even remember that we have a script for this ;) > > > > > > For me, the changes look reasonable. Any concerns? Roland? > > > > Hmm. My barebox 2019.06.0 here still passes the parameter as > > "bootstate.active=system0", and I cannot find any commit in barebox > > since then that changes this. Can you point me to a commit? > > Sorry, that was a barebox version which was heavily patched for > backwards compatibility with old kernels and userlands :-/ > > > In any case, we should be compatible to old barebox versions, so both > > versions of the parameter name should be accepted. > > However this is still the best option I think. So in the script you want to check the return value of barebox-state and call it with the old parameters to be backward compatible? bye -- Christoph _______________________________________________ OSS-Tools mailing list OSS-Tools@pengutronix.de