Patchwork [01/18] linux-firmware: de-bash scripts to remove bash dependency

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date Nov. 29, 2013, 12:48 p.m.
Message ID <d19d1002b079e65e04e1efc97e90d49c55f8233b.1385728901.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/62569/
State New
Headers show

Comments

Qi.Chen@windriver.com - Nov. 29, 2013, 12:48 p.m.
From: Chen Qi <Qi.Chen@windriver.com>

De-bash some script in linux-firmware to make it not dependent on
bash.

[YOCTO #5555]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../files/0001-linux-firmware-de-bash.patch        |   47 ++++++++++++++++++++
 .../linux-firmware/linux-firmware_git.bb           |    3 +-
 2 files changed, 49 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch
Richard Purdie - Nov. 29, 2013, 1:23 p.m.
On Fri, 2013-11-29 at 20:48 +0800, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
> 
> De-bash some script in linux-firmware to make it not dependent on
> bash.
> 
> [YOCTO #5555]
> 
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  .../files/0001-linux-firmware-de-bash.patch        |   47 ++++++++++++++++++++
>  .../linux-firmware/linux-firmware_git.bb           |    3 +-
>  2 files changed, 49 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch

We shouldn't even ship these files, its pointless. I have an alternative
patch to propose.

Cheers,

Richard


> diff --git a/meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch b/meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch
> new file mode 100644
> index 0000000..223a45f
> --- /dev/null
> +++ b/meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch
> @@ -0,0 +1,47 @@
> +Upstream-Status: Pending
> +
> +Subject: linux-firmware: de-bash
> +
> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> +
> +---
> + carl9170fw/autogen.sh |    7 ++++---
> + configure             |    2 +-
> + 2 files changed, 5 insertions(+), 4 deletions(-)
> +
> +diff --git a/carl9170fw/autogen.sh b/carl9170fw/autogen.sh
> +index 6843f19..a340427 100755
> +--- a/carl9170fw/autogen.sh
> ++++ b/carl9170fw/autogen.sh
> +@@ -1,14 +1,15 @@
> +-#!/bin/bash
> ++#!/bin/sh
> + 
> + set -e
> + 
> + case "$1" in
> + 	config)
> + 		echo "Configuring..."
> +-		pushd config
> ++		cwd=`pwd`
> ++		cd config
> + 		cmake .
> + 		make
> +-		popd
> ++		cd $cwd
> + 		config/conf Kconfig
> + 		cmake .
> + 	;;
> +diff --git a/configure b/configure
> +index 3260f9a..5e930f1 100644
> +--- a/configure
> ++++ b/configure
> +@@ -1,4 +1,4 @@
> +-#!/bin/bash
> ++#!/bin/sh
> + # -*- mode: sh -*-
> + # Our Makefile doesn't do srcdir != builddir
> + #buildapi-variable-no-builddir
> +-- 
> +1.7.9.5
> +
> diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
> index fe6730a..ec463bf 100644
> --- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
> +++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
> @@ -28,7 +28,8 @@ SRCREV = "600caefd83a406540b2a789be6415e44c9b87add"
>  PE = "1"
>  PV = "0.0+git${SRCPV}"
>  
> -SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
> +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git \
> +           file://0001-linux-firmware-de-bash.patch"
>  
>  S = "${WORKDIR}/git"
>
Qi.Chen@windriver.com - Dec. 2, 2013, 1:55 a.m.
On 11/29/2013 09:23 PM, Richard Purdie wrote:
> On Fri, 2013-11-29 at 20:48 +0800, Qi.Chen@windriver.com wrote:
>> From: Chen Qi <Qi.Chen@windriver.com>
>>
>> De-bash some script in linux-firmware to make it not dependent on
>> bash.
>>
>> [YOCTO #5555]
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>>   .../files/0001-linux-firmware-de-bash.patch        |   47 ++++++++++++++++++++
>>   .../linux-firmware/linux-firmware_git.bb           |    3 +-
>>   2 files changed, 49 insertions(+), 1 deletion(-)
>>   create mode 100644 meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch
> We shouldn't even ship these files, its pointless. I have an alternative
> patch to propose.
>
> Cheers,
>
> Richard
>


I've removed this patch from the patchset. Remote tree has been updated.
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ChenQi/bash-deps


Best Regards,
Chen Qi

>> diff --git a/meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch b/meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch
>> new file mode 100644
>> index 0000000..223a45f
>> --- /dev/null
>> +++ b/meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch
>> @@ -0,0 +1,47 @@
>> +Upstream-Status: Pending
>> +
>> +Subject: linux-firmware: de-bash
>> +
>> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> +
>> +---
>> + carl9170fw/autogen.sh |    7 ++++---
>> + configure             |    2 +-
>> + 2 files changed, 5 insertions(+), 4 deletions(-)
>> +
>> +diff --git a/carl9170fw/autogen.sh b/carl9170fw/autogen.sh
>> +index 6843f19..a340427 100755
>> +--- a/carl9170fw/autogen.sh
>> ++++ b/carl9170fw/autogen.sh
>> +@@ -1,14 +1,15 @@
>> +-#!/bin/bash
>> ++#!/bin/sh
>> +
>> + set -e
>> +
>> + case "$1" in
>> + 	config)
>> + 		echo "Configuring..."
>> +-		pushd config
>> ++		cwd=`pwd`
>> ++		cd config
>> + 		cmake .
>> + 		make
>> +-		popd
>> ++		cd $cwd
>> + 		config/conf Kconfig
>> + 		cmake .
>> + 	;;
>> +diff --git a/configure b/configure
>> +index 3260f9a..5e930f1 100644
>> +--- a/configure
>> ++++ b/configure
>> +@@ -1,4 +1,4 @@
>> +-#!/bin/bash
>> ++#!/bin/sh
>> + # -*- mode: sh -*-
>> + # Our Makefile doesn't do srcdir != builddir
>> + #buildapi-variable-no-builddir
>> +--
>> +1.7.9.5
>> +
>> diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
>> index fe6730a..ec463bf 100644
>> --- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
>> +++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
>> @@ -28,7 +28,8 @@ SRCREV = "600caefd83a406540b2a789be6415e44c9b87add"
>>   PE = "1"
>>   PV = "0.0+git${SRCPV}"
>>   
>> -SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
>> +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git \
>> +           file://0001-linux-firmware-de-bash.patch"
>>   
>>   S = "${WORKDIR}/git"
>>   
>
>
>

Patch

diff --git a/meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch b/meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch
new file mode 100644
index 0000000..223a45f
--- /dev/null
+++ b/meta/recipes-kernel/linux-firmware/files/0001-linux-firmware-de-bash.patch
@@ -0,0 +1,47 @@ 
+Upstream-Status: Pending
+
+Subject: linux-firmware: de-bash
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+
+---
+ carl9170fw/autogen.sh |    7 ++++---
+ configure             |    2 +-
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/carl9170fw/autogen.sh b/carl9170fw/autogen.sh
+index 6843f19..a340427 100755
+--- a/carl9170fw/autogen.sh
++++ b/carl9170fw/autogen.sh
+@@ -1,14 +1,15 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ set -e
+ 
+ case "$1" in
+ 	config)
+ 		echo "Configuring..."
+-		pushd config
++		cwd=`pwd`
++		cd config
+ 		cmake .
+ 		make
+-		popd
++		cd $cwd
+ 		config/conf Kconfig
+ 		cmake .
+ 	;;
+diff --git a/configure b/configure
+index 3260f9a..5e930f1 100644
+--- a/configure
++++ b/configure
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # -*- mode: sh -*-
+ # Our Makefile doesn't do srcdir != builddir
+ #buildapi-variable-no-builddir
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index fe6730a..ec463bf 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -28,7 +28,8 @@  SRCREV = "600caefd83a406540b2a789be6415e44c9b87add"
 PE = "1"
 PV = "0.0+git${SRCPV}"
 
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git \
+           file://0001-linux-firmware-de-bash.patch"
 
 S = "${WORKDIR}/git"