Patchwork [1/4] linux-firmware: Use the included Makefile for install

login
register
mail settings
Submitter Otavio Salvador
Date March 23, 2013, 8:30 p.m.
Message ID <1364070660-13157-1-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/46795/
State New
Headers show

Comments

Otavio Salvador - March 23, 2013, 8:30 p.m.
This uses the install procedure included in the Makefile which avoids
code dupplication.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../linux-firmware/linux-firmware/makefile-fix.patch  | 19 +++++++++++++++++++
 .../linux-firmware/linux-firmware_git.bb              |  6 +++---
 2 files changed, 22 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch
Khem Raj - March 23, 2013, 9:21 p.m.
On Saturday, March 23, 2013, Otavio Salvador <otavio@ossystems.com.br>
wrote:
> This uses the install procedure included in the Makefile which avoids
> code dupplication.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  .../linux-firmware/linux-firmware/makefile-fix.patch  | 19
+++++++++++++++++++
>  .../linux-firmware/linux-firmware_git.bb              |  6 +++---
>  2 files changed, 22 insertions(+), 3 deletions(-)
>  create mode 100644
meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch
>
> diff --git
a/meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch
b/meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch
> new file mode 100644
> index 0000000..8a23284
> --- /dev/null
> +++ b/meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch
> @@ -0,0 +1,19 @@
> +build: Avoid use of bashism and Makefile deployment
> +
> +Upstream-Status: Submitted
> +
> +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> +
> +diff --git a/Makefile b/Makefile
> +index 321a4e2..9bdeef0 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -9,4 +9,7 @@ install:
> +       mkdir -p $(DESTDIR)$(FIRMWAREDIR)
> +       cp -r * $(DESTDIR)$(FIRMWAREDIR)
> +       rm -f $(DESTDIR)/usbdux/*dux $(DESTDIR)/*/*.asm
> +-      rm $(DESTDIR)$(FIRMWAREDIR)/{WHENCE,LICENSE.*,LICENCE.*}
> ++      rm $(DESTDIR)$(FIRMWAREDIR)/Makefile
> ++      rm $(DESTDIR)$(FIRMWAREDIR)/WHENCE
> ++      rm $(DESTDIR)$(FIRMWAREDIR)/LICENSE.*
> ++      rm $(DESTDIR)$(FIRMWAREDIR)/LICENCE.*

Can you explain this change ?

> diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bbb/meta/recipes-kernel/linux-firmware/
linux-firmware_git.bb
> index b9e00fc..6842738 100644
> --- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
> +++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
> @@ -24,7 +24,8 @@ SRCREV = "c530a75c1e6a472b0eb9558310b518f0dfcd8860"
>  PE = "1"
>  PV = "0.0+git${SRCPV}"
>
> -SRC_URI = "git://
git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git;protocol=git
"
> +SRC_URI = "git://
git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git;protocol=git\
> +           file://makefile-fix.patch"
>
>  S = "${WORKDIR}/git"
>
> @@ -35,8 +36,7 @@ do_compile() {
>  }
>
>  do_install() {
> -       install -d  ${D}/lib/firmware/
> -       cp -r * ${D}/lib/firmware/
> +       oe_runmake install DESTDIR=${D}
>
>         # Libertas sd8686
>         ln -sf libertas/sd8686_v9.bin ${D}/lib/firmware/sd8686.bin
> --
> 1.8.1
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Otavio Salvador - March 23, 2013, 10:12 p.m.
On Sat, Mar 23, 2013 at 6:21 PM, Khem Raj <raj.khem@gmail.com> wrote:
>
>
> On Saturday, March 23, 2013, Otavio Salvador <otavio@ossystems.com.br>
> wrote:
>> This uses the install procedure included in the Makefile which avoids
>> code dupplication.
>>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>>  .../linux-firmware/linux-firmware/makefile-fix.patch  | 19
>> +++++++++++++++++++
>>  .../linux-firmware/linux-firmware_git.bb              |  6 +++---
>>  2 files changed, 22 insertions(+), 3 deletions(-)
>>  create mode 100644
>> meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch
>>
>> diff --git
>> a/meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch
>> b/meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch
>> new file mode 100644
>> index 0000000..8a23284
>> --- /dev/null
>> +++ b/meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch
>> @@ -0,0 +1,19 @@
>> +build: Avoid use of bashism and Makefile deployment
>> +
>> +Upstream-Status: Submitted
>> +
>> +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> +
>> +diff --git a/Makefile b/Makefile
>> +index 321a4e2..9bdeef0 100644
>> +--- a/Makefile
>> ++++ b/Makefile
>> +@@ -9,4 +9,7 @@ install:
>> +       mkdir -p $(DESTDIR)$(FIRMWAREDIR)
>> +       cp -r * $(DESTDIR)$(FIRMWAREDIR)
>> +       rm -f $(DESTDIR)/usbdux/*dux $(DESTDIR)/*/*.asm
>> +-      rm $(DESTDIR)$(FIRMWAREDIR)/{WHENCE,LICENSE.*,LICENCE.*}
>> ++      rm $(DESTDIR)$(FIRMWAREDIR)/Makefile
>> ++      rm $(DESTDIR)$(FIRMWAREDIR)/WHENCE
>> ++      rm $(DESTDIR)$(FIRMWAREDIR)/LICENSE.*
>> ++      rm $(DESTDIR)$(FIRMWAREDIR)/LICENCE.*
>
> Can you explain this change ?

From the patch file; I sent it to upstream already

+build: Avoid use of bashism and Makefile deployment


--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

Patch

diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch b/meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch
new file mode 100644
index 0000000..8a23284
--- /dev/null
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware/makefile-fix.patch
@@ -0,0 +1,19 @@ 
+build: Avoid use of bashism and Makefile deployment
+
+Upstream-Status: Submitted
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+diff --git a/Makefile b/Makefile
+index 321a4e2..9bdeef0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,4 +9,7 @@ install:
+ 	mkdir -p $(DESTDIR)$(FIRMWAREDIR)
+ 	cp -r * $(DESTDIR)$(FIRMWAREDIR)
+ 	rm -f $(DESTDIR)/usbdux/*dux $(DESTDIR)/*/*.asm
+-	rm $(DESTDIR)$(FIRMWAREDIR)/{WHENCE,LICENSE.*,LICENCE.*}
++	rm $(DESTDIR)$(FIRMWAREDIR)/Makefile
++	rm $(DESTDIR)$(FIRMWAREDIR)/WHENCE
++	rm $(DESTDIR)$(FIRMWAREDIR)/LICENSE.*
++	rm $(DESTDIR)$(FIRMWAREDIR)/LICENCE.*
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index b9e00fc..6842738 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -24,7 +24,8 @@  SRCREV = "c530a75c1e6a472b0eb9558310b518f0dfcd8860"
 PE = "1"
 PV = "0.0+git${SRCPV}"
 
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git;protocol=git"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git;protocol=git \
+           file://makefile-fix.patch"
 
 S = "${WORKDIR}/git"
 
@@ -35,8 +36,7 @@  do_compile() {
 }
 
 do_install() {
-	install -d  ${D}/lib/firmware/
-	cp -r * ${D}/lib/firmware/
+	oe_runmake install DESTDIR=${D}
 
 	# Libertas sd8686
 	ln -sf libertas/sd8686_v9.bin ${D}/lib/firmware/sd8686.bin