DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: distrokit@pengutronix.de
Subject: Re: [DistroKit] [PATCH] v7a: barebox: am335x: make script hush-compatible
Date: Thu, 24 Apr 2025 15:23:35 +0200	[thread overview]
Message-ID: <aAo7V6bDxly-hxVQ@pengutronix.de> (raw)
In-Reply-To: <20250424113122.4141867-1-a.fatoum@pengutronix.de>

On Thu, Apr 24, 2025 at 01:31:22PM +0200, Ahmad Fatoum wrote:
> Apparently, barebox' hush does support negation only in the test command
> and not as part of the language. Invert the condition and remove the
> early exit to fix the syntax error.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Applied to next.

> ---
>  .../barebox-defaultenv/init/usb-limit-1300             | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/configs/platform-v7a/barebox-defaultenv/init/usb-limit-1300 b/configs/platform-v7a/barebox-defaultenv/init/usb-limit-1300
> index 9801dd56c7e6..704b4452d5e3 100644
> --- a/configs/platform-v7a/barebox-defaultenv/init/usb-limit-1300
> +++ b/configs/platform-v7a/barebox-defaultenv/init/usb-limit-1300
> @@ -1,9 +1,7 @@
>  #!/bin/sh
>  
> -if ! of_compatible -k ti,am33xx; then
> -	exit
> +if of_compatible -k ti,am33xx; then
> +	echo -n "changing USB current limit to 1300 mA... "
> +	i2c_write -b 0 -a 0x24 -r 0x01 0x3e
> +	echo "done"
>  fi
> -
> -echo -n "changing USB current limit to 1300 mA... "
> -i2c_write -b 0 -a 0x24 -r 0x01 0x3e
> -echo "done"
> -- 
> 2.39.5
> 
> 
> 

-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



      reply	other threads:[~2025-04-24 13:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 11:31 Ahmad Fatoum
2025-04-24 13:23 ` Robert Schwebel [this message]

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=aAo7V6bDxly-hxVQ@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    /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