DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH] v7a: barebox: am335x: make script hush-compatible
@ 2025-04-24 11:31 Ahmad Fatoum
  2025-04-24 13:23 ` Robert Schwebel
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-04-24 11:31 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

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>
---
 .../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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [DistroKit] [PATCH] v7a: barebox: am335x: make script hush-compatible
  2025-04-24 11:31 [DistroKit] [PATCH] v7a: barebox: am335x: make script hush-compatible Ahmad Fatoum
@ 2025-04-24 13:23 ` Robert Schwebel
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Schwebel @ 2025-04-24 13:23 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

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    |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-24 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-24 11:31 [DistroKit] [PATCH] v7a: barebox: am335x: make script hush-compatible Ahmad Fatoum
2025-04-24 13:23 ` Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox