From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 24 Apr 2025 13:31:28 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u7ung-004s7Z-0P for lore@lore.pengutronix.de; Thu, 24 Apr 2025 13:31:28 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1u7unf-0001MS-Nc; Thu, 24 Apr 2025 13:31:27 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1u7unc-0001MC-95; Thu, 24 Apr 2025 13:31:24 +0200 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u7unc-001sE6-0J; Thu, 24 Apr 2025 13:31:24 +0200 Received: from localhost ([::1] helo=dude05.red.stw.pengutronix.de) by dude05.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1u7unb-00HNUw-3C; Thu, 24 Apr 2025 13:31:24 +0200 From: Ahmad Fatoum To: distrokit@pengutronix.de Date: Thu, 24 Apr 2025 13:31:22 +0200 Message-Id: <20250424113122.4141867-1-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH] v7a: barebox: am335x: make script hush-compatible X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ahmad Fatoum Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false 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 --- .../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