Re: [OE-core] [[PATCH v2] kernel-fitimage.bbclass: only package unique DTBs

2022-08-17 Thread Awais Belal
Do I need to send an update here to align with 
https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/kernel-fitimage.bbclass?h=master-next=f5c128008365e141082c129417eb72d2751e8045
 ?


BR,
Awais

From: openembedded-core@lists.openembedded.org 
 on behalf of Belal, Awais
Sent: Tuesday, August 16, 2022 6:58:55 PM
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [[PATCH v2] kernel-fitimage.bbclass: only package unique DTBs

The KERNEL_DEVICETREE and related variables could potentially have a device
tree listed multiple times and this works okay for most scenarios. However,
when we create FIT entries for these we get duplicate nodes and uboot-mkimage
fails with

fit-image-initramfs-image.its:219.58-229.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-ecspi-slave.dtb: Duplicate node name
fit-image-initramfs-image.its:307.50-317.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-ndm.dtb: Duplicate node name
fit-image-initramfs-image.its:362.54-372.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-rm67199.dtb: Duplicate node name
fit-image-initramfs-image.its:417.56-427.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-usdhc1-m2.dtb: Duplicate node name
fit-image-initramfs-image.its:648.59-658.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-ecspi-slave.dtb: Duplicate node name
fit-image-initramfs-image.its:744.51-754.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-ndm.dtb: Duplicate node name
fit-image-initramfs-image.its:804.55-814.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-rm67199.dtb: Duplicate node name
fit-image-initramfs-image.its:864.57-874.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-usdhc1-m2.dtb: Duplicate node name
ERROR: Input tree has errors, aborting (use -f to force output)
uboot-mkimage: Can't open arch/arm64/boot/fitImage.tmp: No such file or 
directory

We fix this by tracking the DTBs we're compiling in the FIT and only picking
up unique ones.

Signed-off-by: Awais Belal 
---
 meta/classes/kernel-fitimage.bbclass | 8 
 1 file changed, 8 insertions(+)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 7e09b075ff..56d71ba8fa 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -527,6 +527,10 @@ fitimage_assemble() {
 fi

 DTB=$(echo "$DTB" | tr '/' '_')
+
+   # Skip DTB if we've picked it up previously
+   echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue
+
 DTBS="$DTBS $DTB"
 fitimage_emit_section_dtb $1 $DTB $DTB_PATH
 done
@@ -536,6 +540,10 @@ fitimage_assemble() {
 dtbcount=1
 for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name 
'*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do
 DTB=$(echo "$DTB" | tr '/' '_')
+
+   # Skip DTB if we've picked it up previously
+   echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue
+
 DTBS="$DTBS $DTB"
 fitimage_emit_section_dtb $1 $DTB 
"${EXTERNAL_KERNEL_DEVICETREE}/$DTB"
 done
--
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169493): 
https://lists.openembedded.org/g/openembedded-core/message/169493
Mute This Topic: https://lists.openembedded.org/mt/93059092/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [[PATCH v2] kernel-fitimage.bbclass: only package unique DTBs

2022-08-16 Thread Awais Belal
The KERNEL_DEVICETREE and related variables could potentially have a device
tree listed multiple times and this works okay for most scenarios. However,
when we create FIT entries for these we get duplicate nodes and uboot-mkimage
fails with

fit-image-initramfs-image.its:219.58-229.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-ecspi-slave.dtb: Duplicate node name
fit-image-initramfs-image.its:307.50-317.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-ndm.dtb: Duplicate node name
fit-image-initramfs-image.its:362.54-372.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-rm67199.dtb: Duplicate node name
fit-image-initramfs-image.its:417.56-427.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-usdhc1-m2.dtb: Duplicate node name
fit-image-initramfs-image.its:648.59-658.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-ecspi-slave.dtb: Duplicate node name
fit-image-initramfs-image.its:744.51-754.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-ndm.dtb: Duplicate node name
fit-image-initramfs-image.its:804.55-814.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-rm67199.dtb: Duplicate node name
fit-image-initramfs-image.its:864.57-874.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-usdhc1-m2.dtb: Duplicate node name
ERROR: Input tree has errors, aborting (use -f to force output)
uboot-mkimage: Can't open arch/arm64/boot/fitImage.tmp: No such file or 
directory

We fix this by tracking the DTBs we're compiling in the FIT and only picking
up unique ones.

Signed-off-by: Awais Belal 
---
 meta/classes/kernel-fitimage.bbclass | 8 
 1 file changed, 8 insertions(+)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 7e09b075ff..56d71ba8fa 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -527,6 +527,10 @@ fitimage_assemble() {
fi
 
DTB=$(echo "$DTB" | tr '/' '_')
+
+   # Skip DTB if we've picked it up previously
+   echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue
+
DTBS="$DTBS $DTB"
fitimage_emit_section_dtb $1 $DTB $DTB_PATH
done
@@ -536,6 +540,10 @@ fitimage_assemble() {
dtbcount=1
for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name 
'*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do
DTB=$(echo "$DTB" | tr '/' '_')
+
+   # Skip DTB if we've picked it up previously
+   echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue
+
DTBS="$DTBS $DTB"
fitimage_emit_section_dtb $1 $DTB 
"${EXTERNAL_KERNEL_DEVICETREE}/$DTB"
done
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169437): 
https://lists.openembedded.org/g/openembedded-core/message/169437
Mute This Topic: https://lists.openembedded.org/mt/93059092/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] kernel-fitimage.bbclass: only package unique DTBs

2022-08-10 Thread Awais Belal
Hi Quentin,


Thanks for the feedback.


> I think this might be a bit too much. e.g. I could have a DTS/DTB named
> this-is-a.dtb.dtb and another one this-is-a.dtb and this would say it is
> a duplicate whereas it isn't (poor naming choice, though.. yes :) ).

> I believe that:
> for DTB in $(echo "${DTBS}" | tr ' ' '\n' | sort -u); do

> would work and avoid unnecessary loops.


this would definitely avoid unnecessary loops however I don't think sorting 
would be the right thing here as the first dt in the list gets to become the 
default config which is something assumed for the runtime and sorting would 
break that. If we want to cover up the corner case you described above would 
something such fit the bill


echo $DTBS | tr ' ' '\n' | grep -xq $DTB && continue


> I believe using sort -u here should be enough for this second diff?


sort -u wouldn't help here if the same name dt is present in KERNEL_DEVICETREE 
and the EXTERNEL_KERNEL_DEVICETREE as we'll run into the same problem of having 
the same dt being packaged twice. I'd rather use the same technique here if you 
agree.


BR,
Awais

From: openembedded-core@lists.openembedded.org 
 on behalf of Quentin Schulz 

Sent: Monday, August 8, 2022 4:15:15 PM
To: Belal, Awais; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] kernel-fitimage.bbclass: only package unique DTBs

Hi Awais,

On 8/8/22 12:32, Awais Belal wrote:
> The KERNEL_DEVICETREE and related variables could potentially have a device
> tree listed multiple times and this works okay for most scenarios. However,
> when we create FIT entries for these we get duplicate nodes and uboot-mkimage
> fails with
>
> fit-image-initramfs-image.its:219.58-229.19: ERROR (duplicate_node_names): 
> /images/fdt-freescale_imx8mp-evk-ecspi-slave.dtb: Duplicate node name
> fit-image-initramfs-image.its:307.50-317.19: ERROR (duplicate_node_names): 
> /images/fdt-freescale_imx8mp-evk-ndm.dtb: Duplicate node name
> fit-image-initramfs-image.its:362.54-372.19: ERROR (duplicate_node_names): 
> /images/fdt-freescale_imx8mp-evk-rm67199.dtb: Duplicate node name
> fit-image-initramfs-image.its:417.56-427.19: ERROR (duplicate_node_names): 
> /images/fdt-freescale_imx8mp-evk-usdhc1-m2.dtb: Duplicate node name
> fit-image-initramfs-image.its:648.59-658.19: ERROR (duplicate_node_names): 
> /configurations/conf-freescale_imx8mp-evk-ecspi-slave.dtb: Duplicate node name
> fit-image-initramfs-image.its:744.51-754.19: ERROR (duplicate_node_names): 
> /configurations/conf-freescale_imx8mp-evk-ndm.dtb: Duplicate node name
> fit-image-initramfs-image.its:804.55-814.19: ERROR (duplicate_node_names): 
> /configurations/conf-freescale_imx8mp-evk-rm67199.dtb: Duplicate node name
> fit-image-initramfs-image.its:864.57-874.19: ERROR (duplicate_node_names): 
> /configurations/conf-freescale_imx8mp-evk-usdhc1-m2.dtb: Duplicate node name
> ERROR: Input tree has errors, aborting (use -f to force output)
> uboot-mkimage: Can't open arch/arm64/boot/fitImage.tmp: No such file or 
> directory
>
> We fix this by tracking the DTBs we're compiling in the FIT and only picking
> up unique ones.
>
> Signed-off-by: Awais Belal 
> ---
>   meta/classes/kernel-fitimage.bbclass | 16 
>   1 file changed, 16 insertions(+)
>
> diff --git a/meta/classes/kernel-fitimage.bbclass 
> b/meta/classes/kernel-fitimage.bbclass
> index 753164551c..2a07a57d5d 100644
> --- a/meta/classes/kernel-fitimage.bbclass
> +++ b/meta/classes/kernel-fitimage.bbclass
> @@ -529,6 +529,14 @@ fitimage_assemble() {
>fi
>
>DTB=$(echo "$DTB" | tr '/' '_')
> +
> + # Skip DTB if we've picked it up previously
> + case ${DTBS} in
> + *${DTB}*)

I think this might be a bit too much. e.g. I could have a DTS/DTB named
this-is-a.dtb.dtb and another one this-is-a.dtb and this would say it is
a duplicate whereas it isn't (poor naming choice, though.. yes :) ).

I believe that:
for DTB in $(echo "${DTBS}" | tr ' ' '\n' | sort -u); do

would work and avoid unnecessary loops.

> + continue
> + ;;
> + esac
> +
>DTBS="$DTBS $DTB"
>fitimage_emit_section_dtb $1 $DTB $DTB_PATH
>done
> @@ -538,6 +546,14 @@ fitimage_assemble() {
>dtbcount=1
>for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name 
> '*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do

I believe using sort -u here should be enough for this second diff?

Cheers,
Quentin

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all 

[OE-core] [PATCH] kernel-fitimage.bbclass: only package unique DTBs

2022-08-08 Thread Awais Belal
The KERNEL_DEVICETREE and related variables could potentially have a device
tree listed multiple times and this works okay for most scenarios. However,
when we create FIT entries for these we get duplicate nodes and uboot-mkimage
fails with

fit-image-initramfs-image.its:219.58-229.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-ecspi-slave.dtb: Duplicate node name
fit-image-initramfs-image.its:307.50-317.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-ndm.dtb: Duplicate node name
fit-image-initramfs-image.its:362.54-372.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-rm67199.dtb: Duplicate node name
fit-image-initramfs-image.its:417.56-427.19: ERROR (duplicate_node_names): 
/images/fdt-freescale_imx8mp-evk-usdhc1-m2.dtb: Duplicate node name
fit-image-initramfs-image.its:648.59-658.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-ecspi-slave.dtb: Duplicate node name
fit-image-initramfs-image.its:744.51-754.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-ndm.dtb: Duplicate node name
fit-image-initramfs-image.its:804.55-814.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-rm67199.dtb: Duplicate node name
fit-image-initramfs-image.its:864.57-874.19: ERROR (duplicate_node_names): 
/configurations/conf-freescale_imx8mp-evk-usdhc1-m2.dtb: Duplicate node name
ERROR: Input tree has errors, aborting (use -f to force output)
uboot-mkimage: Can't open arch/arm64/boot/fitImage.tmp: No such file or 
directory

We fix this by tracking the DTBs we're compiling in the FIT and only picking
up unique ones.

Signed-off-by: Awais Belal 
---
 meta/classes/kernel-fitimage.bbclass | 16 
 1 file changed, 16 insertions(+)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 753164551c..2a07a57d5d 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -529,6 +529,14 @@ fitimage_assemble() {
fi
 
DTB=$(echo "$DTB" | tr '/' '_')
+
+   # Skip DTB if we've picked it up previously
+   case ${DTBS} in
+   *${DTB}*)
+   continue
+   ;;
+   esac
+
DTBS="$DTBS $DTB"
fitimage_emit_section_dtb $1 $DTB $DTB_PATH
done
@@ -538,6 +546,14 @@ fitimage_assemble() {
dtbcount=1
for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name 
'*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do
DTB=$(echo "$DTB" | tr '/' '_')
+
+   # Skip DTB if we've picked it up previously
+   case ${DTBS} in
+   *${DTB}*)
+   continue
+   ;;
+   esac
+
DTBS="$DTBS $DTB"
fitimage_emit_section_dtb $1 $DTB 
"${EXTERNAL_KERNEL_DEVICETREE}/$DTB"
done
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169080): 
https://lists.openembedded.org/g/openembedded-core/message/169080
Mute This Topic: https://lists.openembedded.org/mt/92888948/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] linux-firmware: discrepancy around the brcmfmac/cyfmac43430

2021-11-20 Thread Awais Belal
Ping!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158528): 
https://lists.openembedded.org/g/openembedded-core/message/158528
Mute This Topic: https://lists.openembedded.org/mt/86989608/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] linux-firmware: discrepancy around the brcmfmac/cyfmac43430

2021-11-14 Thread Awais Belal
Ping!


BR,
Awais

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158274): 
https://lists.openembedded.org/g/openembedded-core/message/158274
Mute This Topic: https://lists.openembedded.org/mt/86989608/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] linux-firmware: discrepancy around the brcmfmac/cyfmac43430

2021-11-11 Thread Awais Belal
Hi all,


It seems like there's a discrepancy regarding the license of the 
brcmfmac/cyfmac43430 firmware or maybe I am misunderstanding something. If I 
look at the original source (kernel git) for the linux-firmware components the 
WHENCE file mentions

File: cypress/cyfmac43430-sdio.bin
Link: brcm/brcmfmac43430-sdio.bin -> ../cypress/cyfmac43430-sdio.bin


under the LICENCE.broadcom_bcm43xx 
(https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/WHENCE#n2830)
 however the OE-core recipe uses a cypress license for these


https://git.openembedded.org/openembedded-core/tree/meta/recipes-kernel/linux-firmware/linux-firmware_20211027.bb#n743
https://git.openembedded.org/openembedded-core/tree/meta/recipes-kernel/linux-firmware/linux-firmware_20211027.bb#n762


Maybe I do not have a clear background on this and someone can explain a 
little. Any comments on this will be appreciated.


BR,
Awais

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158199): 
https://lists.openembedded.org/g/openembedded-core/message/158199
Mute This Topic: https://lists.openembedded.org/mt/86989608/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 1/2] perl: allow empty lines and comments in perl-rdepends.txt

2021-03-30 Thread Awais Belal
With this change the rdepends file can now have empty lines
and comment lines. The perl-rdepends.txt generation will be
fixed with further commits to leverage this change.

Signed-off-by: Awais Belal 
---
 meta/recipes-devtools/perl/perl_5.32.1.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/perl/perl_5.32.1.bb 
b/meta/recipes-devtools/perl/perl_5.32.1.bb
index 1fafc0a8c9..65db6da2b5 100644
--- a/meta/recipes-devtools/perl/perl_5.32.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.32.1.bb
@@ -320,6 +320,9 @@ python split_perl_packages () {
 # Read the pre-generated dependency file, and use it to set module 
dependecies
 for line in open(d.expand("${WORKDIR}") + 
'/perl-rdepends.txt').readlines():
 splitline = line.split()
+# Filter empty lines and comments
+if len(splitline) == 0 or splitline[0].startswith("#"):
+continue
 if bb.data.inherits_class('native', d):
 module = splitline[0] + '-native'
 depends = "perl-native"
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#150070): 
https://lists.openembedded.org/g/openembedded-core/message/150070
Mute This Topic: https://lists.openembedded.org/mt/81716799/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 2/2] perl: fix creation and generate new perl-rdepends.txt

2021-03-30 Thread Awais Belal
The creation of perl-rdepends.txt simply copied over the
generated list (perl-rdepends.generated) to perl-rdepends.txt
while missing out the manual dependencies placed in
perl-rdepends.inc. This caused missing runtime dependencies.
Additionally, the mechanism always appended which then
produced duplicated lines in perl-rdepends.txt if the creation
function is run multiple times.
We now concatenate both the .inc and .generated to the final
.txt so manual and generated both types of dependencies make
it to the final configuration. A new perl-rdepends.txt is then
generated with these fixes.

Signed-off-by: Awais Belal 
---
 meta/recipes-devtools/perl/files/perl-rdepends.txt | 8 
 meta/recipes-devtools/perl/perl_5.32.1.bb  | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/perl/files/perl-rdepends.txt 
b/meta/recipes-devtools/perl/files/perl-rdepends.txt
index e7cd551988..f20fc44b58 100644
--- a/meta/recipes-devtools/perl/files/perl-rdepends.txt
+++ b/meta/recipes-devtools/perl/files/perl-rdepends.txt
@@ -1,3 +1,11 @@
+
+# Some additional dependencies that the above doesn't manage to figure out
+RDEPENDS_perl-module-file-spec += "perl-module-file-spec-unix"
+RDEPENDS_perl-module-math-bigint += "perl-module-math-bigint-calc"
+RDEPENDS_perl-module-thread-queue += "perl-module-attributes"
+RDEPENDS_perl-module-overload += "perl-module-overloading"
+
+# Generated depends list beyond this line
 RDEPENDS_perl-module-anydbm-file += "perl-module-strict"
 RDEPENDS_perl-module-anydbm-file += "perl-module-warnings"
 RDEPENDS_perl-module-app-cpan += "perl-module-config"
diff --git a/meta/recipes-devtools/perl/perl_5.32.1.bb 
b/meta/recipes-devtools/perl/perl_5.32.1.bb
index 65db6da2b5..b28040c7fb 100644
--- a/meta/recipes-devtools/perl/perl_5.32.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.32.1.bb
@@ -370,8 +370,8 @@ EOPREAMBLE
 sort -u | \
 sed 
's/^/RDEPENDS_/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;'
 | \
 egrep -wv 
'=>|module-a|module-apache.?|module-apr|module-authen-sasl|module-b-asmdata|module-convert-ebcdic|module-devel-size|module-digest-perl-md5|module-dumpvalue|module-extutils-constant-aaargh56hash|module-extutils-xssymset|module-file-bsdglob|module-for|module-it|module-io-socket-inet6|module-io-socket-ssl|module-io-string|module-ipc-system-simple|module-lexical|module-local-lib|metadata|module-modperl-util|module-pluggable-object|module-test-builder-io-scalar|module-test2|module-text-unidecode|module-unicore|module-win32|objects\sload|syscall.ph|systeminfo.ph|%s'
 | \
-egrep -wv 
'=>|module-algorithm-diff|module-carp|module-c|module-encode-hanextra|module-extutils-makemaker-version-regex|module-file-spec|module-io-compress-lzma|module-locale-maketext-lexicon|module-log-agent|module-meta-notation|module-net-localcfg|module-net-ping-external|module-b-deparse|module-scalar-util|module-some-module|module-symbol|module-uri|module-win32api-file'
 >> ${WORKDIR}/perl-rdepends.generated
-cp ${WORKDIR}/perl-rdepends.generated ${THISDIR}/files/perl-rdepends.txt
+egrep -wv 
'=>|module-algorithm-diff|module-carp|module-c|module-l|module-encode-hanextra|module-extutils-makemaker-version-regex|module-file-spec|module-io-compress-lzma|module-io-uncompress-unxz|module-locale-maketext-lexicon|module-log-agent|module-meta-notation|module-net-localcfg|module-net-ping-external|module-b-deparse|module-scalar-util|module-some-module|module-symbol|module-uri|module-win32api-file'
 > ${WORKDIR}/perl-rdepends.generated
+cat ${WORKDIR}/perl-rdepends.inc ${WORKDIR}/perl-rdepends.generated > 
${THISDIR}/files/perl-rdepends.txt
 }
 
 # bitbake perl -c create_rdepends_inc
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#150071): 
https://lists.openembedded.org/g/openembedded-core/message/150071
Mute This Topic: https://lists.openembedded.org/mt/81716800/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] rootfs.py: mask run-postinsts systemd service when unneeded

2021-03-25 Thread Awais Belal
[Edited Message Follows]

Hi Oleksiy,

I've submitted 
https://lists.openembedded.org/g/openembedded-core/topic/81600237 which should 
supersede this I did not send it as v3 because it is a different solution. I've 
also ran 'bitbake -c testimage core-image-sato' with the new solution and it is 
passing.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149925): 
https://lists.openembedded.org/g/openembedded-core/message/149925
Mute This Topic: https://lists.openembedded.org/mt/81522036/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] rootfs.py: mask run-postinsts systemd service when unneeded

2021-03-25 Thread Awais Belal
Hi Oleksiy,

I've submitted 
https://lists.openembedded.org/g/openembedded-core/topic/81600237 which should 
supersede this I did not send it as v3 because it is a different solution.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149925): 
https://lists.openembedded.org/g/openembedded-core/message/149925
Mute This Topic: https://lists.openembedded.org/mt/81522036/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] rootfs.py: uninstall the run-postinsts package if not needed

2021-03-25 Thread Awais Belal
The run-postinsts package runs post installation scripts
on target if packages request delayed post installations. When
no delayed post installations are found the sysV style scripts
are disabled for the package and hence it did not run on sysV
based systems. However, the package provides systemd service
as well which still ran on systems based on systemd even when
no post installations were found.
Rather than disabling/masking scripts for different initialization
managers we now simply remove/uninstall the run-postinsts package
when no post installations are found to be delayed till runtime.
This is also more aligned with the function (_uninstall_unneeded)
this functionality is triggered through.

Signed-off-by: Awais Belal 
---
 meta/lib/oe/rootfs.py | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 249c685dcf..5f81023040 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -250,13 +250,11 @@ class Rootfs(object, metaclass=ABCMeta):
 
 
 def _uninstall_unneeded(self):
-# Remove unneeded init script symlinks
+# Remove the run-postinsts package if no delayed postinsts are found
 delayed_postinsts = self._get_delayed_postinsts()
 if delayed_postinsts is None:
-if 
os.path.exists(self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts")):
-self._exec_shell_cmd(["update-rc.d", "-f", "-r",
-  self.d.getVar('IMAGE_ROOTFS'),
-  "run-postinsts", "remove"])
+if 
os.path.exists(self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts"))
 or 
os.path.exists(self.d.expand("${IMAGE_ROOTFS}${systemd_unitdir}/system/run-postinsts.service")):
+self.pm.remove(["run-postinsts"])
 
 image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
 True, False, self.d)
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149924): 
https://lists.openembedded.org/g/openembedded-core/message/149924
Mute This Topic: https://lists.openembedded.org/mt/81600237/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] rootfs.py: mask run-postinsts systemd service when unneeded

2021-03-22 Thread Awais Belal
The service is unnecessarily run even when it is unneeded.
This was handled correctly for sysV systems however the
service still runs on the systemd systems as it is not
disabled/masked when not needed.

Signed-off-by: Awais Belal 
---
 meta/lib/oe/rootfs.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 249c685dcf..fe35ce5b70 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -257,6 +257,10 @@ class Rootfs(object, metaclass=ABCMeta):
 self._exec_shell_cmd(["update-rc.d", "-f", "-r",
   self.d.getVar('IMAGE_ROOTFS'),
   "run-postinsts", "remove"])
+if 
os.path.exists(self.d.expand("${IMAGE_ROOTFS}${systemd_unitdir}/system/run-postinsts.service")):
+self._exec_shell_cmd(["systemctl",
+"--root", 
self.d.getVar('IMAGE_ROOTFS'),
+"mask", "run-postinsts.service"])
 
 image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
 True, False, self.d)
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149777): 
https://lists.openembedded.org/g/openembedded-core/message/149777
Mute This Topic: https://lists.openembedded.org/mt/81522036/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] rootfs.py: mask run-postinsts systemd service when unneeded

2021-03-22 Thread Awais Belal
Hi Alex,

> 
> Why isn’t this seen in the tests? Can you add a test that shows the issue
> please? (Fails without the patch, passes with)

I'm not very well versed with the oe test infrastructure, I'd be happy to 
create a test for this scenario if you can point me to the material that I need 
to go through in order to be able to create a test for this. However, if you 
want me to summarize this tends to fix the issue where the systemd 
run-postinsts.service is run at the target even when not needed (no pending 
postinsts are found during build).

I do need to send a v2 for this as there's a slight issue in the patch.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149776): 
https://lists.openembedded.org/g/openembedded-core/message/149776
Mute This Topic: https://lists.openembedded.org/mt/81518683/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] rootfs.py: mask run-postinsts systemd service when unneeded

2021-03-22 Thread Awais Belal
The service is unnecessarily run even when it is unneeded.
This was handled correctly for sysV systems however the
service still runs on the systemd systems as it is not
disabled/masked when not needed.

Signed-off-by: Awais Belal 
---
 meta/lib/oe/rootfs.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 249c685dcf..a29d1f6742 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -257,6 +257,10 @@ class Rootfs(object, metaclass=ABCMeta):
 self._exec_shell_cmd(["update-rc.d", "-f", "-r",
   self.d.getVar('IMAGE_ROOTFS'),
   "run-postinsts", "remove"])
+if 
os.path.exists(self.d.expand("${IMAGE_ROOTFS}${systemd_unitdir}/system/run-postinsts.service")):
+self._exec_shell_cmd(["systemctl",
+"--root", 
self.d.getVar('IMAGE_ROOTFS'),
+"mask", "run-postinsts"])
 
 image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
 True, False, self.d)
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149764): 
https://lists.openembedded.org/g/openembedded-core/message/149764
Mute This Topic: https://lists.openembedded.org/mt/81518683/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] libsdl2: disable shared memory for native builds

2021-03-17 Thread Awais Belal
libsdl2 currently does not handle the failures that
occur due to shared memory in case of remote hosts
where it should ideally switch to socket based writing
when a failure is seen with shared memory.
Consider a scenario where a qemu build is done with
graphics support on a build machine and then accessed
remotely using ssh. If the remote host's X presents
MIT-SHM as an extension, launching qemu fails with

runqemu - ERROR - Failed to run qemu: X Error: BadValue
Request Major code 130 (MIT-SHM)
Request Minor code 3 ()

This is most often seen when the remote machine doing
ssh is a Ubuntu 20.04. The libsdl2 native are mainly
used for qemu at this time so it is a major usecase.
A report of such a failure was also presented at
https://lists.yoctoproject.org/g/poky/topic/78854857

Signed-off-by: Awais Belal 
---
 meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb 
b/meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb
index 872592fdae..54556abb27 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb
@@ -65,6 +65,7 @@ PACKAGECONFIG[wayland]= 
"--enable-video-wayland,--disable-video-wayland,wayl
 PACKAGECONFIG[x11]= 
"--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr 
libxrender"
 
 EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
+CFLAGS_append_class-native = " -DNO_SHARED_MEMORY"
 
 do_configure_prepend() {
 # Remove old libtool macros.
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149602): 
https://lists.openembedded.org/g/openembedded-core/message/149602
Mute This Topic: https://lists.openembedded.org/mt/81403642/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] kernel.bbclass: fix deployment for initramfs images

2021-02-04 Thread Awais Belal
The do_bundle_initramfs() only processes kernel image
types that are found in KERNEL_IMAGETYPE_FOR_MAKE whereas
the build system can generate other types that are not
directly supported by the kernel build system. In which
case when we come to the deploy phase not all the images
mentioned in KERNEL_IMAGETYPES would have a respective
initramfs bundled image. An example is using vmlinux.gz
in KERNEL_IMAGETYPES and enabling initramfs and then we
see

install: cannot stat 'arch/arm64/boot/vmlinux.gz.initramfs': No such file or 
directory

So we align the deploy phase with bundle initramfs phase
and pick up relevant initramfs bundled images using
KERNEL_IMAGETYPE_FOR_MAKE instead of KERNEL_IMAGETYPES.

Signed-off-by: Awais Belal 
---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index ddff2ddcd2..8693ab86be 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -759,7 +759,7 @@ kernel_do_deploy() {
fi

if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; 
then
-   for imageType in ${KERNEL_IMAGETYPES} ; do
+   for imageType in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
if [ "$imageType" = "fitImage" ] ; then
continue
fi
--
2.17.1


Ping!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#147656): 
https://lists.openembedded.org/g/openembedded-core/message/147656
Mute This Topic: https://lists.openembedded.org/mt/80208526/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] kernel.bbclass: fix deployment for initramfs images

2021-01-29 Thread Awais Belal
The do_bundle_initramfs() only processes kernel image
types that are found in KERNEL_IMAGETYPE_FOR_MAKE whereas
the build system can generate other types that are not
directly supported by the kernel build system. In which
case when we come to the deploy phase not all the images
mentioned in KERNEL_IMAGETYPES would have a respective
initramfs bundled image. An example is using vmlinux.gz
in KERNEL_IMAGETYPES and enabling initramfs and then we
see

install: cannot stat 'arch/arm64/boot/vmlinux.gz.initramfs': No such file or 
directory

So we align the deploy phase with bundle initramfs phase
and pick up relevant initramfs bundled images using
KERNEL_IMAGETYPE_FOR_MAKE instead of KERNEL_IMAGETYPES.

Signed-off-by: Awais Belal 
---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index ddff2ddcd2..8693ab86be 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -759,7 +759,7 @@ kernel_do_deploy() {
fi
 
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; 
then
-   for imageType in ${KERNEL_IMAGETYPES} ; do
+   for imageType in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
if [ "$imageType" = "fitImage" ] ; then
continue
fi
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#147452): 
https://lists.openembedded.org/g/openembedded-core/message/147452
Mute This Topic: https://lists.openembedded.org/mt/80208526/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] toolchain-shar-relocate.sh: check for environment-setup beforehand

2020-06-18 Thread Awais Belal
> I'd change the script to run with bash and "set -euo pipefail" to capture
> errors like this early.

The toolchain-shar-relocate script comes in through the replacement of 
SDK_PRE_INSTALL_COMMAND in toolchain-shar-extract so it cannot decide to use 
bash itself. Also, I don't think it would be a good idea to introduce a 
specific shell binding for such scripts.

BR,
Awais


From: mikko.rap...@bmw.de 
Sent: Thursday, June 18, 2020 1:04 PM
To: pbar...@konsulko.com
Cc: Belal, Awais; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] toolchain-shar-relocate.sh: check for 
environment-setup beforehand

On Thu, Jun 18, 2020 at 08:50:21AM +0100, Paul Barker wrote:
> On Wed, 17 Jun 2020 at 21:48, Awais Belal  wrote:
> >
> > The script runs a 'cat' on the script and if it isn't present in the
> > sdk the cat command waits on the std input and hence the installation
> > process simply sits there.
>
> That sort of error would typically be caused by the variable being
> unset rather than the variable being set to the path of a nonexistent
> file. I don't know much about the context this script runs in though
> so I may be missing something obvious.

I'd change the script to run with bash and "set -euo pipefail" to capture
errors like this early.

-Mikko

> >
> > Signed-off-by: Awais Belal 
> > ---
> >  meta/files/toolchain-shar-relocate.sh | 6 ++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/meta/files/toolchain-shar-relocate.sh 
> > b/meta/files/toolchain-shar-relocate.sh
> > index e3c10018ef..02a05664c6 100644
> > --- a/meta/files/toolchain-shar-relocate.sh
> > +++ b/meta/files/toolchain-shar-relocate.sh
> > @@ -3,6 +3,12 @@ if ! xargs --version > /dev/null 2>&1; then
> > exit 1
> >  fi
> >
> > +# check if we have a valid env-setup script
> > +if [ ! -f "$env_setup_script" ]; then
> > +   echo "Main environment-setup file not found. Abort!"
> > +   exit 1
> > +fi
> > +
> >  # fix dynamic loader paths in all ELF SDK binaries
> >  native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 
> > 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
> >  dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
> > --
> > 2.17.1
>
>
>
> --
> Paul Barker
> Konsulko Group

> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#139637): 
https://lists.openembedded.org/g/openembedded-core/message/139637
Mute This Topic: https://lists.openembedded.org/mt/74946187/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] toolchain-shar-relocate.sh: check for environment-setup beforehand

2020-06-18 Thread Awais Belal
> That sort of error would typically be caused by the variable being
> unset rather than the variable being set to the path of a nonexistent
> file. I don't know much about the context this script runs in though
> so I may be missing something obvious.

You're right but a "! -f" takes care of both the cases where the var is unset 
of the file isn't present.

BR,
Awais


From: Paul Barker 
Sent: Thursday, June 18, 2020 12:50 PM
To: Belal, Awais
Cc: openembedded-core
Subject: Re: [OE-core] [PATCH] toolchain-shar-relocate.sh: check for 
environment-setup beforehand

On Wed, 17 Jun 2020 at 21:48, Awais Belal  wrote:
>
> The script runs a 'cat' on the script and if it isn't present in the
> sdk the cat command waits on the std input and hence the installation
> process simply sits there.

That sort of error would typically be caused by the variable being
unset rather than the variable being set to the path of a nonexistent
file. I don't know much about the context this script runs in though
so I may be missing something obvious.

>
> Signed-off-by: Awais Belal 
> ---
>  meta/files/toolchain-shar-relocate.sh | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/meta/files/toolchain-shar-relocate.sh 
> b/meta/files/toolchain-shar-relocate.sh
> index e3c10018ef..02a05664c6 100644
> --- a/meta/files/toolchain-shar-relocate.sh
> +++ b/meta/files/toolchain-shar-relocate.sh
> @@ -3,6 +3,12 @@ if ! xargs --version > /dev/null 2>&1; then
> exit 1
>  fi
>
> +# check if we have a valid env-setup script
> +if [ ! -f "$env_setup_script" ]; then
> +   echo "Main environment-setup file not found. Abort!"
> +   exit 1
> +fi
> +
>  # fix dynamic loader paths in all ELF SDK binaries
>  native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 
> 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
>  dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
> --
> 2.17.1



--
Paul Barker
Konsulko Group
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#139636): 
https://lists.openembedded.org/g/openembedded-core/message/139636
Mute This Topic: https://lists.openembedded.org/mt/74946187/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] toolchain-shar-relocate.sh: check for environment-setup beforehand

2020-06-17 Thread Awais Belal
The script runs a 'cat' on the script and if it isn't present in the
sdk the cat command waits on the std input and hence the installation
process simply sits there.

Signed-off-by: Awais Belal 
---
 meta/files/toolchain-shar-relocate.sh | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/meta/files/toolchain-shar-relocate.sh 
b/meta/files/toolchain-shar-relocate.sh
index e3c10018ef..02a05664c6 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -3,6 +3,12 @@ if ! xargs --version > /dev/null 2>&1; then
exit 1
 fi
 
+# check if we have a valid env-setup script
+if [ ! -f "$env_setup_script" ]; then
+   echo "Main environment-setup file not found. Abort!"
+   exit 1
+fi
+
 # fix dynamic loader paths in all ELF SDK binaries
 native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 
'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
 dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#139608): 
https://lists.openembedded.org/g/openembedded-core/message/139608
Mute This Topic: https://lists.openembedded.org/mt/74946187/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [sumo][PATCH] busybox: enable reboot in defconfig

2018-11-15 Thread Awais Belal
996247ba7dfffbeb444f793f7e105fcfb5ffa939 moved the power
flags (POWEROFF, HALT, REBOOT) to a fragment init.cfg which
is only included when busybox is selected as the init_manager.
This assumption is incorrect in scenarios where installation
mechanism is provided through live images and almost all the
initramfs scripts use the reboot command at the end of installation.
Without this change we see
reboot: not found

Signed-off-by: Awais Belal 
---
 meta/recipes-core/busybox/busybox/defconfig | 2 +-
 meta/recipes-core/busybox/busybox/init.cfg  | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox/defconfig 
b/meta/recipes-core/busybox/busybox/defconfig
index 59d93c7079..eb7665dfa2 100644
--- a/meta/recipes-core/busybox/busybox/defconfig
+++ b/meta/recipes-core/busybox/busybox/defconfig
@@ -470,7 +470,7 @@ CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y
 # CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
 # CONFIG_HALT is not set
 # CONFIG_POWEROFF is not set
-# CONFIG_REBOOT is not set
+CONFIG_REBOOT=y
 # CONFIG_FEATURE_CALL_TELINIT is not set
 # CONFIG_TELINIT_PATH is not set
 # CONFIG_INIT is not set
diff --git a/meta/recipes-core/busybox/busybox/init.cfg 
b/meta/recipes-core/busybox/busybox/init.cfg
index 3c1fdd42b6..3b839c515c 100644
--- a/meta/recipes-core/busybox/busybox/init.cfg
+++ b/meta/recipes-core/busybox/busybox/init.cfg
@@ -2,7 +2,6 @@ CONFIG_INIT=y
 CONFIG_FEATURE_USE_INITTAB=y
 CONFIG_HALT=y
 CONFIG_POWEROFF=y
-CONFIG_REBOOT=y
 CONFIG_FEATURE_KILL_DELAY=0
 CONFIG_TELINIT_PATH=""
 CONFIG_INIT_TERMINAL_TYPE=""
-- 
2.11.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] glibc-package.inc: correct intention for deleting /usr/lib as needed

2018-09-27 Thread Awais Belal
In case the baselib is lib64 we would want to delete /usr/lib
after removing the /usr/lib/locale dir and the implementation
wanted to do that earlier as well but the fault was checking
an already removed dir (/usr/lib/locale) before trying to
remove /usr/lib as that check would always fail.
Now we simply try to delete /usr/lib after deleting
/usr/lib/locale to make sure it deletes cleanly and is empty
at the time of deletion.

Signed-off-by: Awais Belal 
---
 meta/recipes-core/glibc/glibc-package.inc | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index 9ea41b7..a98ae1a 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -207,10 +207,11 @@ do_poststash_install_cleanup () {
rm -rf ${D}/${localedir}
rm -rf ${D}${datadir}/locale
if [ "${libdir}" != "${exec_prefix}/lib" ]; then
-   if [ -d ${D}${exec_prefix}/lib/locale ] ; then
-   rm -rf ${D}${exec_prefix}/lib/locale
+   if [ -d ${D}${exec_prefix}/lib ]; then
# error out if directory isn't empty
-   rm -f ${D}${exec_prefix}/lib
+   # this dir should only contain locale dir
+   # which has been deleted in the previous step
+   rmdir ${D}${exec_prefix}/lib
fi
fi
 }
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] matchbox-wm: fix QA issues with composite enabled

2018-03-26 Thread Awais Belal
If we try and enable composite support using --enable-composite
through EXTRA_OECONF the following warnings are seen
WARNING: matchbox-wm-1.2.1-r0 do_package_qa: QA Issue: matchbox-wm rdepends on 
libxcomposite, but it isn't a build dependency, missing libxcomposite in 
DEPENDS or PACKAGECONFIG? [build-deps]
WARNING: matchbox-wm-1.2.1-r0 do_package_qa: QA Issue: matchbox-wm rdepends on 
libxdamage, but it isn't a build dependency, missing libxdamage in DEPENDS or 
PACKAGECONFIG? [build-deps]
This fixes the above mentioned warnings.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb 
b/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb
index 815a75f..58e21a4 100644
--- a/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb
+++ b/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = 
"file://src/wm.h;endline=21;md5=a7e844465edbcf79c282369f93caa
 
file://src/wm.c;endline=21;md5=8dc9d24477d87ef5dfbc2e4927146aab"
 
 SECTION = "x11/wm"
-DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification 
expat gconf libxcursor libxfixes"
+DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification 
expat gconf libxcursor libxfixes libxcomposite libxdamage"
 
 # SRCREV tagged 1.2.2
 SRCREV = "27da947e7fbdf9659f7e5bd1e92af92af6c03970"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] dhcp: fix build issue with libxml2 support

2017-11-07 Thread Awais Belal
A missing case breaks the build when libxml2 is
required and found appropriately. The third argument
to the function AC_SEARCH_LIB is action-if-found which
was mistakenly been used for the case where the library
is not found and hence breaks the configure phase
where it shoud actually pass.
We now pass on silently when action-if-found is
executed.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 ...correct-the-intention-for-xml2-lib-search.patch | 37 ++
 meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb   |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 
meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch

diff --git 
a/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch
 
b/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch
new file mode 100644
index 00..2d3af9db0b
--- /dev/null
+++ 
b/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch
@@ -0,0 +1,37 @@
+From 501543b3ef715488a142e3d301ff2733aa33eec7 Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_be...@mentor.com>
+Date: Wed, 25 Oct 2017 21:00:05 +0500
+Subject: [PATCH] dhcp: correct the intention for xml2 lib search
+
+A missing case breaks the build when libxml2 is
+required and found appropriately. The third argument
+to the function AC_SEARCH_LIB is action-if-found which
+was mistakenly been used for the case where the library
+is not found and hence breaks the configure phase
+where it shoud actually pass.
+We now pass on silently when action-if-found is
+executed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index bfe988a..f0459e6 100644
+--- a/configure.ac
 b/configure.ac
+@@ -608,7 +608,7 @@ AC_ARG_WITH(libxml2,
+   with_libxml2="$withval", with_libxml2="no")
+ 
+ if test x$with_libxml2 != xno; then
+-  AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],
++  AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],,
+   [if test x$with_libxml2 != xauto; then
+   AC_MSG_FAILURE([*** Cannot find 
xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
+   fi])
+-- 
+2.11.1
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb 
b/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
index 4634a01b04..6615ae2555 100644
--- a/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
@@ -11,6 +11,7 @@ SRC_URI += 
"file://0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.pat
 file://0009-remove-dhclient-script-bash-dependency.patch \
 file://0010-build-shared-libs.patch \
 
file://0011-Moved-the-call-to-isc_app_ctxstart-to-not-get-signal.patch \
+file://0012-dhcp-correct-the-intention-for-xml2-lib-search.patch \
"
 
 SRC_URI[md5sum] = "afa6e9b3eb7539ea048421a82c668adc"
-- 
2.11.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] dhcp: fix build issue with libxml2 support

2017-10-25 Thread Awais Belal
A missing case breaks the build when libxml2 is
required and found appropriately. The third argument
to the function AC_SEARCH_LIB is action-if-found which
was mistakenly been used for the case where the library
is not found and hence breaks the configure phase
where it shoud actually pass.
We now pass on silently when action-if-found is
executed.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 ...correct-the-intention-for-xml2-lib-search.patch | 35 ++
 meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb   |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 
meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch

diff --git 
a/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch
 
b/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch
new file mode 100644
index 00..6ded764d0e
--- /dev/null
+++ 
b/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch
@@ -0,0 +1,35 @@
+From 501543b3ef715488a142e3d301ff2733aa33eec7 Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_be...@mentor.com>
+Date: Wed, 25 Oct 2017 21:00:05 +0500
+Subject: [PATCH] dhcp: correct the intention for xml2 lib search
+
+A missing case breaks the build when libxml2 is
+required and found appropriately. The third argument
+to the function AC_SEARCH_LIB is action-if-found which
+was mistakenly been used for the case where the library
+is not found and hence breaks the configure phase
+where it shoud actually pass.
+We now pass on silently when action-if-found is
+executed.
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index bfe988a..f0459e6 100644
+--- a/configure.ac
 b/configure.ac
+@@ -608,7 +608,7 @@ AC_ARG_WITH(libxml2,
+   with_libxml2="$withval", with_libxml2="no")
+ 
+ if test x$with_libxml2 != xno; then
+-  AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],
++  AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],,
+   [if test x$with_libxml2 != xauto; then
+   AC_MSG_FAILURE([*** Cannot find 
xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
+   fi])
+-- 
+2.11.1
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb 
b/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
index 4634a01b04..6615ae2555 100644
--- a/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
@@ -11,6 +11,7 @@ SRC_URI += 
"file://0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.pat
 file://0009-remove-dhclient-script-bash-dependency.patch \
 file://0010-build-shared-libs.patch \
 
file://0011-Moved-the-call-to-isc_app_ctxstart-to-not-get-signal.patch \
+file://0012-dhcp-correct-the-intention-for-xml2-lib-search.patch \
"
 
 SRC_URI[md5sum] = "afa6e9b3eb7539ea048421a82c668adc"
-- 
2.11.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] autogen-native: allow user to set POSIX_SHELL as desired

2017-05-18 Thread Awais Belal
Using 'test -x' is only viable in situations where
POSIX_SHELL is directly set to an executable whereas
there are scenarios where a user might want to set
it to "env sh" so that it can be used in places
where there's a problem with shebang lengths etc. This
is exactly how it is being used in OE so build failures
are seen in cases where deep directory hierarchies are
used for the builddir.
We now use 'test -n' just to make sure if POSIX_SHELL
is set by the user or not and then move forward to
other tests in case it is unset.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 .../autogen/autogen-native_5.18.12.bb  |  1 +
 ...pts-allow-user-to-set-POSIX_SHELL-as-desi.patch | 37 ++
 2 files changed, 38 insertions(+)
 create mode 100644 
meta/recipes-devtools/autogen/autogen/0001-config-libopts-allow-user-to-set-POSIX_SHELL-as-desi.patch

diff --git a/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb 
b/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb
index 853477cf7c..37571e3358 100644
--- a/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb
+++ b/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb
@@ -14,6 +14,7 @@ SRC_URI = 
"${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \
file://fix-script-err-when-processing-libguile.patch \

file://0001-config-libopts.m4-regenerate-it-from-config-libopts..patch \
file://0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch \
+   
file://0001-config-libopts-allow-user-to-set-POSIX_SHELL-as-desi.patch \
 "
 
 SRC_URI[md5sum] = "551d15ccbf5b5fc5658da375d5003389"
diff --git 
a/meta/recipes-devtools/autogen/autogen/0001-config-libopts-allow-user-to-set-POSIX_SHELL-as-desi.patch
 
b/meta/recipes-devtools/autogen/autogen/0001-config-libopts-allow-user-to-set-POSIX_SHELL-as-desi.patch
new file mode 100644
index 00..bfbf6621e1
--- /dev/null
+++ 
b/meta/recipes-devtools/autogen/autogen/0001-config-libopts-allow-user-to-set-POSIX_SHELL-as-desi.patch
@@ -0,0 +1,37 @@
+From dfb30e438a051993c69357c5069170ec779e91e4 Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_be...@mentor.com>
+Date: Wed, 17 May 2017 15:06:48 +0500
+Subject: [PATCH] config/libopts: allow user to set POSIX_SHELL as desired
+
+Using 'test -x' is only viable in situations where
+POSIX_SHELL is directly set to an executable whereas
+there are scenarios where a user might want to set
+it to "env sh" so that it can be used in places
+where there's a problem with shebang lengths etc.
+We now use 'test -n' just to make sure if POSIX_SHELL
+is set by the user or not and then move forward to
+other tests in case it is unset.
+
+Upstream-Status: Pending
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+---
+ config/libopts.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config/libopts.m4 b/config/libopts.m4
+index 51e6a39..efabc7f 100644
+--- a/config/libopts.m4
 b/config/libopts.m4
+@@ -114,7 +114,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
+   AC_PROG_SED
+   [while :
+   do
+-  test -x "$POSIX_SHELL" && break
++  test -n "$POSIX_SHELL" && break
+   POSIX_SHELL=`which bash`
+   test -x "$POSIX_SHELL" && break
+   POSIX_SHELL=`which dash`
+-- 
+2.11.1
+
-- 
2.11.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] autogen: fix autoopts script generation to handle shebang

2017-05-12 Thread Awais Belal
With deep directory hierarchy of the build dir the shenbang
generated for the autoopts scripts fail due to shebang length
crossing 128 characters.
This patch handles such scenarios for most cases by following
the symlink in HOSTTOOLS to the actual host executable so the
problem is resolved in most cases.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 .../autogen/autogen-native_5.18.12.bb  |  1 +
 ...oopts-mk-tpl-config.sh-fix-shebang-length.patch | 49 ++
 2 files changed, 50 insertions(+)
 create mode 100644 
meta/recipes-devtools/autogen/autogen/0001-autoopts-mk-tpl-config.sh-fix-shebang-length.patch

diff --git a/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb 
b/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb
index 853477cf7c..1d76810fd7 100644
--- a/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb
+++ b/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb
@@ -14,6 +14,7 @@ SRC_URI = 
"${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \
file://fix-script-err-when-processing-libguile.patch \

file://0001-config-libopts.m4-regenerate-it-from-config-libopts..patch \
file://0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch \
+   file://0001-autoopts-mk-tpl-config.sh-fix-shebang-length.patch \
 "
 
 SRC_URI[md5sum] = "551d15ccbf5b5fc5658da375d5003389"
diff --git 
a/meta/recipes-devtools/autogen/autogen/0001-autoopts-mk-tpl-config.sh-fix-shebang-length.patch
 
b/meta/recipes-devtools/autogen/autogen/0001-autoopts-mk-tpl-config.sh-fix-shebang-length.patch
new file mode 100644
index 00..453ecb28d6
--- /dev/null
+++ 
b/meta/recipes-devtools/autogen/autogen/0001-autoopts-mk-tpl-config.sh-fix-shebang-length.patch
@@ -0,0 +1,49 @@
+From 2648a4064aff7ae82e74b8de6ade93dc9c04ce3b Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_be...@mentor.com>
+Date: Fri, 12 May 2017 18:22:02 +0500
+Subject: [PATCH] autoopts/mk-tpl-config.sh: fix shebang length
+
+The shebang length cannot be more than 128 charaters
+and the change
+http://cgit.openembedded.org/openembedded-core/commit/meta/classes/base.bbclass?id=fa764a403da34bb0ca9fa3767a9e9dba8d685965
+requires that a user needs to make sure the HOSTTOOLS
+directory is under 128 characters in order to get
+the build through otherwise this causes
+bad interpreter: Permission denied
+when the builddir path is too long.
+This change now follows the path to actual host
+executable to be put in the final scripts that
+are generated so the shebang remains correct in
+most situations.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+---
+ autoopts/mk-tpl-config.sh | 7 +--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/autoopts/mk-tpl-config.sh b/autoopts/mk-tpl-config.sh
+index c4708a2..7de546b 100755
+--- a/autoopts/mk-tpl-config.sh
 b/autoopts/mk-tpl-config.sh
+@@ -98,11 +98,14 @@ fix_scripts() {
+ st=`sed 1q $f`
+ 
+ case "$st" in
+-*perl ) echo '#!/usr/bin/env perl'
++*perl )  PERL=`which perl`
++ PERL=`readlink -f ${PERL}`
++ echo '#!' ${PERL}
+  sed 1d $f
+  ;;
+ 
+-*/sh )   echo '#!' ${POSIX_SHELL}
++*/sh )   SH=`readlink -f ${POSIX_SHELL}`
++ echo '#!' ${SH}
+  sed 1d $f
+  ;;
+ 
+-- 
+2.11.1
+
-- 
2.11.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] [RFC]kernel-yocto.bbclass: ensure repatching when HEAD is checked out

2017-02-03 Thread Awais Belal
In some cases it is seen that kernel_checkout and
validate_branches are run again in simultaneous builds.
During do_patch the kgit-s2q mechanism creates and
checks for the kgit-s2q.last file inside the .git
directory, finds a fence post and starts picking up
patches after that. This can create trouble as
validate_branches checks out the HEAD of the branch
and so the patches should be reapplied rather than
skipped due to finding of the fence post.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/classes/kernel-yocto.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/kernel-yocto.bbclass 
b/meta/classes/kernel-yocto.bbclass
index 5cfd8af..131c48a 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -350,6 +350,10 @@ do_validate_branches() {
current_branch=`git rev-parse --abbrev-ref HEAD`
git branch "$current_branch-orig"
git reset --hard ${force_srcrev}
+   # We've checked out HEAD, make sure we cleanup kgit-s2q 
fence post check
+   # so the patches are applied as expected otherwise no 
patching
+   # would be done in some corner cases.
+   rm -rf ${S}/.git/kgit-s2q.last
fi
fi
 }
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] core-image-minimal-initramfs: fix extrausers functionality

2016-12-28 Thread Awais Belal
The extrausers functionality requires base-passwd and shadow
to be installed before it can be leveraged. Otherwise while
using the features of the class we get into build errors
like the following
ERROR: core-image-minimal-initramfs-1.0-r0 do_rootfs: 
core-image-minimal-initramfs: useradd command did not succeed.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-core/images/core-image-minimal-initramfs.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/images/core-image-minimal-initramfs.bb 
b/meta/recipes-core/images/core-image-minimal-initramfs.bb
index 5794a25..8186ddc 100644
--- a/meta/recipes-core/images/core-image-minimal-initramfs.bb
+++ b/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "Small image capable of booting a device. The 
kernel includes \
 the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
 first 'init' program more efficiently."
 
-PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install 
initramfs-live-install-efi ${VIRTUAL-RUNTIME_base-utils} udev base-passwd 
${ROOTFS_BOOTSTRAP_INSTALL}"
+PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install 
initramfs-live-install-efi ${VIRTUAL-RUNTIME_base-utils} udev base-passwd 
shadow ${ROOTFS_BOOTSTRAP_INSTALL}"
 
 # Do not pollute the initrd image with rootfs features
 IMAGE_FEATURES = ""
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 2/2] grub-efi/live-vm-common: allow grub as EFI_PROVIDER

2016-12-16 Thread Awais Belal
This allows grub to be used as EFI_PROVIDER and
extends the grub-efi class so it can be used as is
when EFI_PROVIDER is grub.
Currently this can only be leveraged if you are
using the grub_git recipe and GRUBPLATFORM plus
EFI_PROVIDER are set correctly.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/classes/grub-efi.bbclass   | 23 +--
 meta/classes/live-vm-common.bbclass |  2 +-
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 17417ba..c847645 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -16,8 +16,8 @@
 # ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
 # ${GRUB_ROOT} - grub's root device.
 
-do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
-do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy"
+do_bootimg[depends] += "${MLPREFIX}${EFI_PROVIDER}:do_deploy"
+do_bootdirectdisk[depends] += "${MLPREFIX}${EFI_PROVIDER}:do_deploy"
 
 GRUB_SERIAL ?= "console=ttyS0,115200"
 GRUB_CFG_VM = "${S}/grub_vm.cfg"
@@ -40,10 +40,21 @@ efi_populate() {
 
install -d ${DEST}${EFIDIR}
 
-   GRUB_IMAGE="bootia32.efi"
-   if [ "${TARGET_ARCH}" = "x86_64" ]; then
-   GRUB_IMAGE="bootx64.efi"
-   fi
+if [ "${EFI_PROVIDER}" = "grub" ]; then
+   GRUB_IMAGE="bootia32.${GRUBPLATFORM}"
+   if [ "${TARGET_ARCH}" = "x86_64" ]; then
+   GRUB_IMAGE="bootx64.${GRUBPLATFORM}"
+   elif [ "${TARGET_ARCH}" = "arm" ]; then
+grubimage = "bootarm.${GRUBPLATFORM}"
+   elif [ "${TARGET_ARCH}" = "aarch64" ]; then
+grubimage = "bootaa64.${GRUBPLATFORM}"
+fi
+else
+GRUB_IMAGE="bootia32.efi"
+   if [ "${TARGET_ARCH}" = "x86_64" ]; then
+   GRUB_IMAGE="bootx64.efi"
+fi
+fi
install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" >${DEST}/startup.nsh
diff --git a/meta/classes/live-vm-common.bbclass 
b/meta/classes/live-vm-common.bbclass
index 734697f..0af228b 100644
--- a/meta/classes/live-vm-common.bbclass
+++ b/meta/classes/live-vm-common.bbclass
@@ -13,7 +13,7 @@ def set_live_vm_vars(d, suffix):
 
 EFI = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "1", "0", d)}"
 EFI_PROVIDER ?= "grub-efi"
-EFI_CLASS = "${@bb.utils.contains("MACHINE_FEATURES", "efi", 
"${EFI_PROVIDER}", "", d)}"
+EFI_CLASS = "${@bb.utils.contains("EFI_PROVIDER", "grub", "grub-efi", 
"${EFI_PROVIDER}", d)}"
 
 # Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not
 # contain "efi". This way legacy is supported by default if neither is
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 1/2] grub_git: extend recipe for proper target deployment

2016-12-16 Thread Awais Belal
This extends the grub_git recipe so it can deploy grub
on the target boot disk just like grub-efi. Mainly
this copies stuff from the grub-efi recipe and then
adjusts some bits accordingly. This would allow
using the latest and greatest versions of grub
on the target.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-bsp/grub/grub_git.bb | 60 +++
 1 file changed, 54 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-bsp/grub/grub_git.bb 
b/meta/recipes-bsp/grub/grub_git.bb
index eb824cc..13c48c7 100644
--- a/meta/recipes-bsp/grub/grub_git.bb
+++ b/meta/recipes-bsp/grub/grub_git.bb
@@ -3,11 +3,15 @@ require grub2.inc
 DEFAULT_PREFERENCE = "-1"
 DEFAULT_PREFERENCE_arm = "1"
 
+DEPENDS += "grub-native"
+RDEPENDS_${PN}_class-target = "diffutils freetype"
+
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/grub-git:"
 
 PV = "2.00+${SRCPV}"
 SRCREV = "7a5b301e3adb8e054288518a325135a1883c1c6c"
 SRC_URI = "git://git.savannah.gnu.org/grub.git \
+   file://cfg \
file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
file://autogen.sh-exclude-pc.patch \
file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
@@ -19,29 +23,73 @@ COMPATIBLE_HOST = 
'(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
 COMPATIBLE_HOST_armv7a = 'null'
 COMPATIBLE_HOST_armv7ve = 'null'
 
-inherit autotools gettext texinfo
+inherit autotools gettext texinfo deploy
 
 # configure.ac has code to set this automagically from the target tuple
 # but the OE freeform one (core2-foo-bar-linux) don't work with that.
-
 GRUBPLATFORM_arm = "uboot"
 GRUBPLATFORM_aarch64 = "efi"
 GRUBPLATFORM ??= "pc"
 
+CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="
 EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont 
--program-prefix="" \
 --enable-liblzma=no --enable-device-mapper=no 
--enable-libzfs=no"
-
+EXTRA_OECONF += "${@bb.utils.contains('GRUBPLATFORM', 'efi', 
'--enable-efiemu=no', '', d)}"
 EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 
'--enable-largefile', '--disable-largefile', d)}"
 
-do_install_append () {
+# Determine the target arch for the grub modules
+python __anonymous () {
+import re
+target = d.getVar('TARGET_ARCH', True)
+platform = d.getVar('GRUBPLATFORM', True)
+if target == "x86_64":
+grubtarget = 'x86_64'
+grubimage = "bootx64." + platform
+elif re.match('i.86', target):
+grubtarget = 'i386'
+grubimage = "bootia32." + platform
+elif re.match('arm', target):
+grubtarget = 'arm'
+grubimage = "bootarm." + platform
+elif re.match('aarch64', target):
+grubtarget = 'arm64'
+grubimage = "bootaa64." + platform
+else:
+raise bb.parse.SkipPackage("grub is incompatible with target %s" % 
target)
+d.setVar("GRUB_TARGET", grubtarget)
+d.setVar("GRUB_IMAGE", grubimage)
+}
+
+do_install_class-native() {
+install -d ${D}${bindir}
+install -m 755 grub-mkimage ${D}${bindir}
+}
+
+do_install_append() {
 install -d ${D}${sysconfdir}/grub.d
 rm -rf ${D}${libdir}/charset.alias
 }
 
+GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop 
iso9660 search"
+do_deploy() {
+# Search for the grub.cfg on the local boot media by using the
+# built in cfg file provided via this recipe
+grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
+   -O ${GRUB_TARGET}-${GRUBPLATFORM} -o ./${GRUB_IMAGE} \
+   ${GRUB_BUILDIN}
+install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
+}
+
+do_deploy_class-native() {
+:
+}
+
+addtask deploy after do_install before do_build
+
 # debugedit chokes on bare metal binaries
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 
-RDEPENDS_${PN} = "diffutils freetype"
-
 INSANE_SKIP_${PN} = "arch"
 INSANE_SKIP_${PN}-dbg = "arch"
+
+BBCLASSEXTEND = "native"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] grub_git: extend recipe for proper target deployment

2016-12-13 Thread Awais Belal
This extends the grub_git recipe so it can deploy grub
on the target boot disk just like grub-efi. Mainly
this copies stuff from the grub-efi recipe and then
adjusts some bits accordingly. This would allow
using the latest and greatest versions of grub
on the target.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-bsp/grub/grub_git.bb | 60 +++
 1 file changed, 54 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-bsp/grub/grub_git.bb 
b/meta/recipes-bsp/grub/grub_git.bb
index eb824cc..86fa208 100644
--- a/meta/recipes-bsp/grub/grub_git.bb
+++ b/meta/recipes-bsp/grub/grub_git.bb
@@ -3,11 +3,15 @@ require grub2.inc
 DEFAULT_PREFERENCE = "-1"
 DEFAULT_PREFERENCE_arm = "1"
 
+DEPENDS_class-target += "grub-native"
+RDEPENDS_${PN}_class-target = "diffutils freetype"
+
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/grub-git:"
 
 PV = "2.00+${SRCPV}"
 SRCREV = "7a5b301e3adb8e054288518a325135a1883c1c6c"
 SRC_URI = "git://git.savannah.gnu.org/grub.git \
+   file://cfg \
file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
file://autogen.sh-exclude-pc.patch \
file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
@@ -19,29 +23,73 @@ COMPATIBLE_HOST = 
'(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
 COMPATIBLE_HOST_armv7a = 'null'
 COMPATIBLE_HOST_armv7ve = 'null'
 
-inherit autotools gettext texinfo
+inherit autotools gettext texinfo deploy
 
 # configure.ac has code to set this automagically from the target tuple
 # but the OE freeform one (core2-foo-bar-linux) don't work with that.
-
 GRUBPLATFORM_arm = "uboot"
 GRUBPLATFORM_aarch64 = "efi"
 GRUBPLATFORM ??= "pc"
 
+CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="
 EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont 
--program-prefix="" \
 --enable-liblzma=no --enable-device-mapper=no 
--enable-libzfs=no"
-
+EXTRA_OECONF += "${@bb.utils.contains('GRUBPLATFORM', 'efi', 
'--enable-efiemu=no', '', d)}"
 EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 
'--enable-largefile', '--disable-largefile', d)}"
 
-do_install_append () {
+# Determine the target arch for the grub modules
+python __anonymous () {
+import re
+target = d.getVar('TARGET_ARCH', True)
+platform = d.getVar('GRUBPLATFORM', True)
+if target == "x86_64":
+grubtarget = 'x86_64'
+grubimage = "bootx64." + platform
+elif re.match('i.86', target):
+grubtarget = 'i386'
+grubimage = "bootia32." + platform
+elif re.match('arm', target):
+grubtarget = 'arm'
+grubimage = "bootarm." + platform
+elif re.match('aarch64', target):
+grubtarget = 'arm64'
+grubimage = "bootaa64." + platform
+else:
+raise bb.parse.SkipPackage("grub is incompatible with target %s" % 
target)
+d.setVar("GRUB_TARGET", grubtarget)
+d.setVar("GRUB_IMAGE", grubimage)
+}
+
+do_install_class-native() {
+install -d ${D}${bindir}
+install -m 755 grub-mkimage ${D}${bindir}
+}
+
+do_install_append() {
 install -d ${D}${sysconfdir}/grub.d
 rm -rf ${D}${libdir}/charset.alias
 }
 
+GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop 
iso9660 search"
+do_deploy() {
+# Search for the grub.cfg on the local boot media by using the
+# built in cfg file provided via this recipe
+grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
+   -O ${GRUB_TARGET}-${GRUBPLATFORM} -o ./${GRUB_IMAGE} \
+   ${GRUB_BUILDIN}
+install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
+}
+
+do_deploy_class-native() {
+:
+}
+
+addtask deploy after do_install before do_build
+
 # debugedit chokes on bare metal binaries
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 
-RDEPENDS_${PN} = "diffutils freetype"
-
 INSANE_SKIP_${PN} = "arch"
 INSANE_SKIP_${PN}-dbg = "arch"
+
+BBCLASSEXTEND = "native"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] grub-efi/live-vm-common: allow grub as EFI_PROVIDER

2016-12-13 Thread Awais Belal
This allows grub to be used as EFI_PROVIDER and
extends the grub-efi class so it can be used as is
when EFI_PROVIDER is grub.
Currently this can only be leveraged if you are
using the grub_git recipe and GRUBPLATFORM plus
EFI_PROVIDER are set correctly.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/classes/grub-efi.bbclass   | 23 +--
 meta/classes/live-vm-common.bbclass |  2 +-
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 17417ba..c847645 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -16,8 +16,8 @@
 # ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
 # ${GRUB_ROOT} - grub's root device.
 
-do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
-do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy"
+do_bootimg[depends] += "${MLPREFIX}${EFI_PROVIDER}:do_deploy"
+do_bootdirectdisk[depends] += "${MLPREFIX}${EFI_PROVIDER}:do_deploy"
 
 GRUB_SERIAL ?= "console=ttyS0,115200"
 GRUB_CFG_VM = "${S}/grub_vm.cfg"
@@ -40,10 +40,21 @@ efi_populate() {
 
install -d ${DEST}${EFIDIR}
 
-   GRUB_IMAGE="bootia32.efi"
-   if [ "${TARGET_ARCH}" = "x86_64" ]; then
-   GRUB_IMAGE="bootx64.efi"
-   fi
+if [ "${EFI_PROVIDER}" = "grub" ]; then
+   GRUB_IMAGE="bootia32.${GRUBPLATFORM}"
+   if [ "${TARGET_ARCH}" = "x86_64" ]; then
+   GRUB_IMAGE="bootx64.${GRUBPLATFORM}"
+   elif [ "${TARGET_ARCH}" = "arm" ]; then
+grubimage = "bootarm.${GRUBPLATFORM}"
+   elif [ "${TARGET_ARCH}" = "aarch64" ]; then
+grubimage = "bootaa64.${GRUBPLATFORM}"
+fi
+else
+GRUB_IMAGE="bootia32.efi"
+   if [ "${TARGET_ARCH}" = "x86_64" ]; then
+   GRUB_IMAGE="bootx64.efi"
+fi
+fi
install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" >${DEST}/startup.nsh
diff --git a/meta/classes/live-vm-common.bbclass 
b/meta/classes/live-vm-common.bbclass
index 734697f..0af228b 100644
--- a/meta/classes/live-vm-common.bbclass
+++ b/meta/classes/live-vm-common.bbclass
@@ -13,7 +13,7 @@ def set_live_vm_vars(d, suffix):
 
 EFI = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "1", "0", d)}"
 EFI_PROVIDER ?= "grub-efi"
-EFI_CLASS = "${@bb.utils.contains("MACHINE_FEATURES", "efi", 
"${EFI_PROVIDER}", "", d)}"
+EFI_CLASS = "${@bb.utils.contains("EFI_PROVIDER", "grub", "grub-efi", 
"${EFI_PROVIDER}", d)}"
 
 # Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not
 # contain "efi". This way legacy is supported by default if neither is
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [master][morty] grub2: fix some quirks and div by zero

2016-12-08 Thread Awais Belal
Rather than erroring out on a single attempt while
terminating EFI services, make a few retries because
such quirks are found in a few implementations.
Also fix a div by zero issue in the same framework
which causes an infinite reboot on the target.
Both patches included here are backports.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 ...ern-efi-mm.c-grub_efi_finish_boot_service.patch | 79 ++
 ...ern-efi-mm.c-grub_efi_get_memory_map-Neve.patch | 43 
 meta/recipes-bsp/grub/grub2.inc|  2 +
 3 files changed, 124 insertions(+)
 create mode 100644 
meta/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch
 create mode 100644 
meta/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch

diff --git 
a/meta/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch
 
b/meta/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch
new file mode 100644
index 000..abf08e1
--- /dev/null
+++ 
b/meta/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch
@@ -0,0 +1,79 @@
+From b258761d11946b28a847dff0768c3f271e13d60a Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_be...@mentor.com>
+Date: Thu, 8 Dec 2016 18:21:12 +0500
+Subject: [PATCH 1/2] * grub-core/kern/efi/mm.c
+ (grub_efi_finish_boot_services):  Try terminating EFI services several times
+ due to quirks in some  implementations.
+
+Upstream-status: Backport [ 
http://git.savannah.gnu.org/cgit/grub.git/patch/?id=e75fdee420a7ad95e9a465c9699adc2e2e970440
 ]
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+---
+ grub-core/kern/efi/mm.c | 46 ++
+ 1 file changed, 30 insertions(+), 16 deletions(-)
+
+diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
+index 461deb0..b00e0bc 100644
+--- a/grub-core/kern/efi/mm.c
 b/grub-core/kern/efi/mm.c
+@@ -167,27 +167,41 @@ grub_efi_finish_boot_services (grub_efi_uintn_t 
*outbuf_size, void *outbuf,
+  apple, sizeof (apple)) == 0);
+ #endif
+ 
+-  if (grub_efi_get_memory_map (_mmap_size, finish_mmap_buf, 
_key,
+- _desc_size, _desc_version) < 0)
+-return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
++  while (1)
++{
++  if (grub_efi_get_memory_map (_mmap_size, finish_mmap_buf, 
_key,
++ _desc_size, _desc_version) < 0)
++  return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
+ 
+-  if (outbuf && *outbuf_size < finish_mmap_size)
+-return grub_error (GRUB_ERR_IO, "memory map buffer is too small");
++  if (outbuf && *outbuf_size < finish_mmap_size)
++  return grub_error (GRUB_ERR_IO, "memory map buffer is too small");
+ 
+-  finish_mmap_buf = grub_malloc (finish_mmap_size);
+-  if (!finish_mmap_buf)
+-return grub_errno;
++  finish_mmap_buf = grub_malloc (finish_mmap_size);
++  if (!finish_mmap_buf)
++  return grub_errno;
+ 
+-  if (grub_efi_get_memory_map (_mmap_size, finish_mmap_buf, 
_key,
+- _desc_size, _desc_version) <= 0)
+-return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
++  if (grub_efi_get_memory_map (_mmap_size, finish_mmap_buf, 
_key,
++ _desc_size, _desc_version) <= 
0)
++  {
++grub_free (finish_mmap_buf);
++return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
++  }
+ 
+-  b = grub_efi_system_table->boot_services;
+-  status = efi_call_2 (b->exit_boot_services, grub_efi_image_handle,
+- finish_key);
+-  if (status != GRUB_EFI_SUCCESS)
+-return grub_error (GRUB_ERR_IO, "couldn't terminate EFI services");
++  b = grub_efi_system_table->boot_services;
++  status = efi_call_2 (b->exit_boot_services, grub_efi_image_handle,
++ finish_key);
++  if (status == GRUB_EFI_SUCCESS)
++  break;
+ 
++  if (status != GRUB_EFI_INVALID_PARAMETER)
++  {
++grub_free (finish_mmap_buf);
++return grub_error (GRUB_ERR_IO, "couldn't terminate EFI services");
++  }
++
++  grub_free (finish_mmap_buf);
++  grub_printf ("Trying to terminate EFI services again\n");
++}
+   grub_efi_is_finished = 1;
+   if (outbuf_size)
+ *outbuf_size = finish_mmap_size;
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch
 
b/meta/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch
new file mode 100644
index 000..0e735ff
--- /dev/null
+++ 
b/meta/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch
@@ -0,0 +1,43 @@

[OE-core] [PATCH] kern-tools: update to avoid kernel_metadata failures

2016-12-07 Thread Awais Belal
Update kernel native tools to avoid do_kernel_metadata
failures. This is mainly to bring in
https://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/commit/?id=a287da4bfe0b4acb8f2b0627bd8e7abd1a1dde26
but we should pick up whatever enhancements are currently
available. Without this builds with no specific metadata
branches fail.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb 
b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 88b1aee..0f8a786 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = 
"file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1b
 
 DEPENDS = "git-native"
 
-SRCREV = "b36f6f9a5695f2084b83823393e13ca42284bed9"
+SRCREV = "bd9e1d6c9b0a34ff3e19a06999aaf57ffadfd04c"
 PR = "r12"
 PV = "0.2+git${SRCPV}"
 
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] asciidoc-native: add dependency on docbook-xml-dtd4-native

2016-08-19 Thread Awais Belal
During the compilation phase asciidoc runs a2x for validation
of some xmls which in turn invokes xmllint with --nonet
parameter that requires DTDs to be available locally in order
to succeed otherwise the do_compile fails.
We now add a direct dependency on docbook-xml-dtd4 so the
DTDs are always available locally.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb 
b/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
index 1500b0a..7597c0e 100644
--- a/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
+++ b/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
@@ -16,5 +16,6 @@ SRC_URI[sha256sum] = 
"78db9d0567c8ab6570a6eff7ffdf84eadd91f2dfc0a92a2d0105d323ca
 inherit distutils autotools-brokensep
 
 export DESTDIR = "${D}"
+DEPENDS_class-native = "docbook-xml-dtd4-native"
 RDEPENDS_${PN} += "python" 
 BBCLASSEXTEND = "native"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] insane.bbclass: handle INSANE_SKIP for license-checksum

2016-08-18 Thread Awais Belal
The function populate_lic_qa_checksum() is used to do the
QA test for license-checksum but it does not handle the
scenario where a package adds license-checksum to its
INSANE_SKIP and hence fails in such condition.
This patch adds handling of INSANE_SKIP to the
populate_lic_qa_checksum() function so it returns
cleanly in such a scenario.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/classes/insane.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 2cb8cc0..719ecd4 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -697,6 +697,10 @@ python populate_lic_qa_checksum() {
 if lic == "CLOSED":
 return
 
+if 'license-checksum' in (d.getVar('INSANE_SKIP_' + pn, True) or 
"").split():
+bb.note("Skipping %s for license-checksum QA test", pn)
+return
+
 if not lic_files and d.getVar('SRC_URI', True):
 package_qa_handle_error("license-checksum", pn + ": Recipe file 
fetches files and does not have license file information (LIC_FILES_CHKSUM)", d)
 return
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] init-install*: only pick root mmc devices

2016-08-10 Thread Awais Belal
Some eMMC devices show special sub-devices such as mmcblk0boot0
etc. The installation script currently pick all of them up and
displays it to the user which makes some confusions because these
sub-devices are pretty small and complete installation including
rootfs won't be possible in most cases.
We simply now drop these sub-devices and only present the user
with the root of such mmc devices.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 8 +++-
 meta/recipes-core/initrdscripts/files/init-install.sh | 8 +++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh 
b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index f564f4e..776dcbb 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -29,7 +29,13 @@ esac
 
 echo "Searching for hard drives ..."
 
-for device in `ls /sys/block/`; do
+# Some eMMC devices have special sub devices such as mmcblk0boot0 etc
+# we're currently only interested in the root device so pick them wisely
+devices=`ls /sys/block/ | grep -v mmcblk`
+mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"`
+devices="$devices $mmc_devices"
+
+for device in $devices; do
 case $device in
 loop*)
 # skip loop device
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh 
b/meta/recipes-core/initrdscripts/files/init-install.sh
index 72ce92b..9c4189b 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -28,7 +28,13 @@ esac
 
 echo "Searching for hard drives ..."
 
-for device in `ls /sys/block/`; do
+# Some eMMC devices have special sub devices such as mmcblk0boot0 etc
+# we're currently only interested in the root device so pick them wisely
+devices=`ls /sys/block/ | grep -v mmcblk`
+mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"`
+devices="$devices $mmc_devices"
+
+for device in $devices; do
 case $device in
 loop*)
 # skip loop device
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [[PATCH v3] init-install*: /etc/mtab make a link rather than a copy

2016-08-01 Thread Awais Belal
Using a copy would only make management of devices erroneous
and makes the system unstable in some scenarios as tools will
have to manipulate both files separately. A link ensures that
both files /proc/mounts and /etc/mtab will have the same
information at all times and this is how it is handled
on newer systems where there is such a need. Same is
suggested by busybox.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 4 ++--
 meta/recipes-core/initrdscripts/files/init-install.sh | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh 
b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index f564f4e..c5db2f0 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -122,8 +122,8 @@ umount ${device}* 2> /dev/null || /bin/true
 mkdir -p /tmp
 
 # Create /etc/mtab if not present
-if [ ! -e /etc/mtab ]; then
-cat /proc/mounts > /etc/mtab
+if [ ! -e /etc/mtab ] && [ -e /proc/mounts ]; then
+ln -sf /proc/mounts /etc/mtab
 fi
 
 disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " 
-f 3 | sed -e "s/MB//")
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh 
b/meta/recipes-core/initrdscripts/files/init-install.sh
index 72ce92b..bf92acb 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -118,8 +118,8 @@ if [ ! -b /dev/loop0 ] ; then
 fi
 
 mkdir -p /tmp
-if [ ! -L /etc/mtab ]; then
-cat /proc/mounts > /etc/mtab
+if [ ! -L /etc/mtab ] && [ -e /proc/mounts ]; then
+ln -sf /proc/mounts /etc/mtab
 fi
 
 disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " 
-f 3 | sed -e "s/MB//")
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [][PATCH v2] init-install*: /etc/mtab make a link rather than a copy

2016-07-29 Thread Awais Belal
Using a copy would only make management of devices erroneous
and makes the system unstable in some scenarios as tools will
have to manipulate both files separately. A link ensures that
both files /proc/mounts and /etc/mtab will have the same
information at all times and this is how it is handled
on newer systems where there is such a need. Same is
suggested by busybox.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 2 +-
 meta/recipes-core/initrdscripts/files/init-install.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh 
b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index f564f4e..8b996ca 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -123,7 +123,7 @@ mkdir -p /tmp
 
 # Create /etc/mtab if not present
 if [ ! -e /etc/mtab ]; then
-cat /proc/mounts > /etc/mtab
+ln -sf /proc/mounts /etc/mtab
 fi
 
 disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " 
-f 3 | sed -e "s/MB//")
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh 
b/meta/recipes-core/initrdscripts/files/init-install.sh
index 72ce92b..2362c53 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -119,7 +119,7 @@ fi
 
 mkdir -p /tmp
 if [ ! -L /etc/mtab ]; then
-cat /proc/mounts > /etc/mtab
+ln -sf /proc/mounts /etc/mtab
 fi
 
 disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " 
-f 3 | sed -e "s/MB//")
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] init-install*: /etc/mtab make a link rather than a copy

2016-07-28 Thread Awais Belal
Using a copy would only make management of devices erroneous
and makes the system unstable in some scenarios as tools will
have to manipulate both files separately. A link ensures that
both files /proc/mounts and /etc/mtab will have the same
information at all times and this is how it is handled
on newer systems where there is such a need. Same is
suggested by busybox.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 2 +-
 meta/recipes-core/initrdscripts/files/init-install.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh 
b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index f564f4e..53f6508 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -123,7 +123,7 @@ mkdir -p /tmp
 
 # Create /etc/mtab if not present
 if [ ! -e /etc/mtab ]; then
-cat /proc/mounts > /etc/mtab
+ln -sf /etc/mtab /proc/mounts
 fi
 
 disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " 
-f 3 | sed -e "s/MB//")
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh 
b/meta/recipes-core/initrdscripts/files/init-install.sh
index 72ce92b..21ae0a6 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -119,7 +119,7 @@ fi
 
 mkdir -p /tmp
 if [ ! -L /etc/mtab ]; then
-cat /proc/mounts > /etc/mtab
+ln -sf /etc/mtab /proc/mounts
 fi
 
 disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " 
-f 3 | sed -e "s/MB//")
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] mesa: move crypto configs to versioned recipe

2016-06-30 Thread Awais Belal
Fixes
WARNING: mesa-2_11.0.8+gitAUTOINC+b9b19162ee-r0 do_configure: QA Issue: mesa: 
configure was passed unrecognised options: --with-sha1 
[unknown-configure-option]
for git based recipe as it is on an older version of mesa
which does not support crypto configs.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-graphics/mesa/mesa.inc   | 6 --
 meta/recipes-graphics/mesa/mesa_11.2.2.bb | 6 ++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc 
b/meta/recipes-graphics/mesa/mesa.inc
index 1d084c0..b227abc 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -64,12 +64,6 @@ PACKAGECONFIG[gallium-llvm] = "--enable-gallium-llvm 
--enable-llvm-shared-libs,
 export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
 PACKAGECONFIG[xa]  = "--enable-xa, --disable-xa"
 
-# Mesa requires one of the following crypto implementation, pick one of them
-MESA_CRYPTO ??= "openssl"
-PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl"
-PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle"
-PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt"
-
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
 
diff --git a/meta/recipes-graphics/mesa/mesa_11.2.2.bb 
b/meta/recipes-graphics/mesa/mesa_11.2.2.bb
index a864b54..87c12c8 100644
--- a/meta/recipes-graphics/mesa/mesa_11.2.2.bb
+++ b/meta/recipes-graphics/mesa/mesa_11.2.2.bb
@@ -1,5 +1,11 @@
 require ${BPN}.inc
 
+# Mesa requires one of the following crypto implementation, pick one of them
+MESA_CRYPTO ??= "openssl"
+PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl"
+PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle"
+PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt"
+
 SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/mesa-${PV}.tar.xz \
file://replace_glibc_check_with_linux.patch \
 "
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] python3: fix CROSSPYTHONPATH for cross builds

2016-06-14 Thread Awais Belal
There are cases where target and host are of the same
type and at such instances the target modules may be
loaded if CROSSPYTHONPATH is not correct. This adds
host library paths so that target modules are not
loaded while cross compiling to avoid illegal instruction
issues.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-devtools/python/python3_3.5.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python3_3.5.1.bb 
b/meta/recipes-devtools/python/python3_3.5.1.bb
index ebfdcdb..78ae174 100644
--- a/meta/recipes-devtools/python/python3_3.5.1.bb
+++ b/meta/recipes-devtools/python/python3_3.5.1.bb
@@ -70,8 +70,8 @@ export _PYTHON_PROJECT_BASE = "${B}"
 export _PYTHON_PROJECT_SRC = "${S}"
 export CCSHARED = "-fPIC"
 
-# Fix ctypes cross compilation
-export CROSSPYTHONPATH = 
"${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
+# Fix cross compilation of different modules
+export CROSSPYTHONPATH = 
"${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
 
 # No ctypes option for python 3
 PYTHONLSBOPTS = ""
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] mesa-demos: provide option for disabling GLX demos

2016-05-19 Thread Awais Belal
There are platforms that default to EGL only configurations
in which case the GLX applications are not required
at all. Allow the user to control generation of these
demos as needed through a configure switch.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 .../0013-only-build-GLX-demos-if-needed.patch  | 62 ++
 meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb |  4 +-
 2 files changed, 65 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch

diff --git 
a/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch
 
b/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch
new file mode 100644
index 000..e7be4df
--- /dev/null
+++ 
b/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch
@@ -0,0 +1,62 @@
+From 322af294390a7f4e1524c5a79312be6cbebce988 Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_be...@mentor.com>
+Date: Wed, 11 Nov 2015 17:22:12 +0500
+Subject: [PATCH] only build GLX demos if needed
+
+There are platforms that default to EGL only configurations
+in which case the GLX applications are not required
+at all. Allow the user to control generation of these
+demos as needed through a configure switch.
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+Upstream-Status: Pending
+---
+ configure.ac| 9 +
+ src/Makefile.am | 6 +-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index f8ec7e3..1a4d96d 100644
+--- a/configure.ac
 b/configure.ac
+@@ -132,6 +132,11 @@ if test "x$enable_glu" = xyes; then
+ DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
+ fi
+ 
++AC_ARG_ENABLE([glx-demos],
++[AS_HELP_STRING([--enable-glx-demos],
++[enable GLX demos @<:@default=auto@:>@])],
++[glx_demos_enabled="$enableval"],
++[glx_demos_enabled=yes])
+ AC_ARG_ENABLE([egl],
+ [AS_HELP_STRING([--enable-egl],
+ [enable EGL library @<:@default=auto@:>@])],
+@@ -325,6 +333,7 @@ AC_SUBST([WAYLAND_LIBS])
+ 
+ AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes")
++AM_CONDITIONAL(HAVE_GLX, test "x$glx_demos_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 8b89dee..a4d7e8f 100644
+--- a/src/Makefile.am
 b/src/Makefile.am
+@@ -44,8 +44,12 @@ SUBDIRS = \
+   slang \
+   tests \
+   tools \
+-  wgl \
++  wgl
++
++if HAVE_GLX
++SUBDIRS += \
+   xdemos
++endif
+ 
+ if HAVE_GLEW
+ SUBDIRS += \
+-- 
+1.9.1
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb 
b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
index 034e01d..53bd5e2 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
@@ -22,6 +22,7 @@ SRC_URI = 
"ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
 file://0010-sharedtex_mt-fix-rendering-thread-hang.patch \
 file://0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch \
 file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \
+file://0013-only-build-GLX-demos-if-needed.patch \
 "
 SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061"
 SRC_URI[sha256sum] = 
"e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92"
@@ -31,7 +32,7 @@ inherit autotools pkgconfig distro_features_check
 REQUIRED_DISTRO_FEATURES = "opengl"
 
 PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
-  ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew 
glu', '', d)}"
+  ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew glu 
glx', '', d)}"
 
 # The Wayland code doesn't work with Wayland 1.0, so disable it for now
 #${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
@@ -51,6 +52,7 @@ PACKAGECONFIG[wayland] = 
"--enable-wayland,--disable-wayland,virtual/libgl wayla
 PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11"
 PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew"
 PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl"
+PACKAGECONFIG[glx] = "--enable-glx-demos,--disable-glx-demos"
 
 do_install_append() {
# it can be completely empty when all PACKAGECONFIG options are disabled
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [[PATCH v2 2/2] mesa-demos: provide option for disabling GLX demos

2016-05-04 Thread Awais Belal
There are platforms that default to EGL only configurations
in which case the GLX applications are not required
at all. Allow the user to control generation of these
demos as needed through a configure switch.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 .../0012-only-build-GLX-demos-if-needed.patch  | 62 ++
 meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb |  4 +-
 2 files changed, 65 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-graphics/mesa/mesa-demos/0012-only-build-GLX-demos-if-needed.patch

diff --git 
a/meta/recipes-graphics/mesa/mesa-demos/0012-only-build-GLX-demos-if-needed.patch
 
b/meta/recipes-graphics/mesa/mesa-demos/0012-only-build-GLX-demos-if-needed.patch
new file mode 100644
index 000..e7be4df
--- /dev/null
+++ 
b/meta/recipes-graphics/mesa/mesa-demos/0012-only-build-GLX-demos-if-needed.patch
@@ -0,0 +1,62 @@
+From 322af294390a7f4e1524c5a79312be6cbebce988 Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_be...@mentor.com>
+Date: Wed, 11 Nov 2015 17:22:12 +0500
+Subject: [PATCH] only build GLX demos if needed
+
+There are platforms that default to EGL only configurations
+in which case the GLX applications are not required
+at all. Allow the user to control generation of these
+demos as needed through a configure switch.
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+Upstream-Status: Pending
+---
+ configure.ac| 9 +
+ src/Makefile.am | 6 +-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index f8ec7e3..1a4d96d 100644
+--- a/configure.ac
 b/configure.ac
+@@ -132,6 +132,11 @@ if test "x$enable_glu" = xyes; then
+ DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
+ fi
+ 
++AC_ARG_ENABLE([glx-demos],
++[AS_HELP_STRING([--enable-glx-demos],
++[enable GLX demos @<:@default=auto@:>@])],
++[glx_demos_enabled="$enableval"],
++[glx_demos_enabled=yes])
+ AC_ARG_ENABLE([egl],
+ [AS_HELP_STRING([--enable-egl],
+ [enable EGL library @<:@default=auto@:>@])],
+@@ -325,6 +333,7 @@ AC_SUBST([WAYLAND_LIBS])
+ 
+ AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes")
++AM_CONDITIONAL(HAVE_GLX, test "x$glx_demos_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 8b89dee..a4d7e8f 100644
+--- a/src/Makefile.am
 b/src/Makefile.am
+@@ -44,8 +44,12 @@ SUBDIRS = \
+   slang \
+   tests \
+   tools \
+-  wgl \
++  wgl
++
++if HAVE_GLX
++SUBDIRS += \
+   xdemos
++endif
+ 
+ if HAVE_GLEW
+ SUBDIRS += \
+-- 
+1.9.1
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb 
b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
index 2df9bba..48c1d27 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
@@ -21,6 +21,7 @@ SRC_URI = 
"ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
 file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
 file://0010-sharedtex_mt-fix-rendering-thread-hang.patch \
 file://0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch \
+file://0012-only-build-GLX-demos-if-needed.patch \
 "
 SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061"
 SRC_URI[sha256sum] = 
"e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92"
@@ -30,7 +31,7 @@ inherit autotools pkgconfig distro_features_check
 REQUIRED_DISTRO_FEATURES = "opengl"
 
 PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
-  ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew 
glu', '', d)}"
+  ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew glu 
glx', '', d)}"
 
 # The Wayland code doesn't work with Wayland 1.0, so disable it for now
 #${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
@@ -50,6 +51,7 @@ PACKAGECONFIG[wayland] = 
"--enable-wayland,--disable-wayland,virtual/libgl wayla
 PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11"
 PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew"
 PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl"
+PACKAGECONFIG[glx] = "--enable-glx-demos,--disable-glx-demos"
 
 do_install_append() {
# it can be completely empty when all PACKAGECONFIG options are disabled
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [[PATCH v2 1/2] mesa-demos: remove demos using obsolete screen surface

2016-05-04 Thread Awais Belal
The mesa surface EGL_MESA_screen_surface was obsoleted
and then dropped from mesa some time ago. Drop demos
depending on this.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 ...dependant-on-obsolete-MESA_screen_surface.patch | 1592 
 meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb |1 +
 2 files changed, 1593 insertions(+)
 create mode 100644 
meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch

diff --git 
a/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch
 
b/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch
new file mode 100644
index 000..a2621ce
--- /dev/null
+++ 
b/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch
@@ -0,0 +1,1592 @@
+commit 74443c6ee79f3251f643ea05e94df58183e37d0d
+Author: Matt Turner <matts...@gmail.com>
+Date:   Fri Aug 28 15:57:38 2015 -0700
+
+egl: Remove demos using EGL_MESA_screen_surface.
+
+The remnants of the extension were removed from Mesa in commit 7a58262e.
+
+Reviewed-by: Andreas Boll <andreas.boll@gmail.com>
+Tested-by: Andreas Boll <andreas.boll@gmail.com>
+Reviewed-by: Marek Olk <marek.ol...@amd.com>
+
+Upstream-Status: Backport
+
+diff --git a/src/egl/eglut/Makefile.am b/src/egl/eglut/Makefile.am
+index 2d2f2af..b765069 100644
+--- a/src/egl/eglut/Makefile.am
 b/src/egl/eglut/Makefile.am
+@@ -33,17 +33,12 @@ if HAVE_WAYLAND
+ eglut_wayland = libeglut_wayland.la
+ endif
+ 
+-noinst_LTLIBRARIES = libeglut_screen.la $(eglut_x11) $(eglut_wayland)
++noinst_LTLIBRARIES = $(eglut_x11) $(eglut_wayland)
+ endif
+ 
+-libeglut_screen_la_SOURCES = \
+-  eglut.c \
+-  eglut.h \
+-  eglutint.h \
+-  eglut_screen.c
+-
+ libeglut_x11_la_SOURCES = \
+   eglut.c \
++  eglut.h \
+   eglutint.h \
+   eglut_x11.c
+ libeglut_x11_la_CFLAGS = $(X11_CFLAGS) $(EGL_CFLAGS)
+@@ -52,6 +47,7 @@ libeglut_x11_la_LIBADD = $(X11_LIBS) $(EGL_LIBS)
+ 
+ libeglut_wayland_la_SOURCES = \
+   eglut.c \
++  eglut.h \
+   eglutint.h \
+   eglut_wayland.c
+ 
+diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c
+index f6a2ad4..58b354a 100644
+--- a/src/egl/eglut/eglut.c
 b/src/egl/eglut/eglut.c
+@@ -176,9 +176,6 @@ _eglutCreateWindow(const char *title, int x, int y, int w, 
int h)
+ win->config, win->native.u.pixmap, NULL);
+   break;
+case EGL_PBUFFER_BIT:
+-#ifdef EGL_MESA_screen_surface
+-   case EGL_SCREEN_BIT_MESA:
+-#endif
+   win->surface = win->native.u.surface;
+   break;
+default:
+@@ -292,11 +289,7 @@ eglutDestroyWindow(int win)
+if (window->index != win)
+   return;
+ 
+-#ifdef EGL_MESA_screen_surface
+-   /* XXX it causes some bug in st/egl KMS backend */
+-   if ( _eglut->surface_type != EGL_SCREEN_BIT_MESA)
+-#endif
+-  eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, 
EGL_NO_CONTEXT);
++   eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, 
EGL_NO_CONTEXT);
+ 
+_eglutDestroyWindow(_eglut->current);
+ }
+diff --git a/src/egl/eglut/eglut_screen.c b/src/egl/eglut/eglut_screen.c
+deleted file mode 100644
+index 094a4e2..000
+--- a/src/egl/eglut/eglut_screen.c
 /dev/null
+@@ -1,194 +0,0 @@
+-/*
+- * Copyright (C) 2010 LunarG Inc.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included
+- * in all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+- * DEALINGS IN THE SOFTWARE.
+- *
+- * Authors:
+- *Chia-I Wu <o...@lunarg.com>
+- */
+-
+-#include 
+-#include 
+-#include 
+-
+-#define EGL_EGLEXT_PROTOTYPES
+-#include "EGL/egl.h"
+-#include "EGL/eglext.h"
+-
+-#include "eglutint.h"
+-
+-#define MAX_MODES 100
+-
+-#ifdef EGL_MESA_screen_surface
+-static EGLScreenMESA kms_screen;
+-static EGLModeMESA kms_mode;
+-static EGLi

[OE-core] [PATCH 2/2] mesa-demos: provide option for disabling GLX demos

2016-04-22 Thread Awais Belal
There are platforms that default to EGL only configurations
in which case the GLX applications are not required
at all. Allow the user to control generation of these
demos as needed through a configure switch.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 .../0012-only-build-GLX-demos-if-needed.patch  | 62 ++
 meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb |  4 +-
 2 files changed, 65 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-graphics/mesa/mesa-demos/0012-only-build-GLX-demos-if-needed.patch

diff --git 
a/meta/recipes-graphics/mesa/mesa-demos/0012-only-build-GLX-demos-if-needed.patch
 
b/meta/recipes-graphics/mesa/mesa-demos/0012-only-build-GLX-demos-if-needed.patch
new file mode 100644
index 000..e7be4df
--- /dev/null
+++ 
b/meta/recipes-graphics/mesa/mesa-demos/0012-only-build-GLX-demos-if-needed.patch
@@ -0,0 +1,62 @@
+From 322af294390a7f4e1524c5a79312be6cbebce988 Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_be...@mentor.com>
+Date: Wed, 11 Nov 2015 17:22:12 +0500
+Subject: [PATCH] only build GLX demos if needed
+
+There are platforms that default to EGL only configurations
+in which case the GLX applications are not required
+at all. Allow the user to control generation of these
+demos as needed through a configure switch.
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+Upstream-Status: Pending
+---
+ configure.ac| 9 +
+ src/Makefile.am | 6 +-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index f8ec7e3..1a4d96d 100644
+--- a/configure.ac
 b/configure.ac
+@@ -132,6 +132,11 @@ if test "x$enable_glu" = xyes; then
+ DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
+ fi
+ 
++AC_ARG_ENABLE([glx-demos],
++[AS_HELP_STRING([--enable-glx-demos],
++[enable GLX demos @<:@default=auto@:>@])],
++[glx_demos_enabled="$enableval"],
++[glx_demos_enabled=yes])
+ AC_ARG_ENABLE([egl],
+ [AS_HELP_STRING([--enable-egl],
+ [enable EGL library @<:@default=auto@:>@])],
+@@ -325,6 +333,7 @@ AC_SUBST([WAYLAND_LIBS])
+ 
+ AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes")
++AM_CONDITIONAL(HAVE_GLX, test "x$glx_demos_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 8b89dee..a4d7e8f 100644
+--- a/src/Makefile.am
 b/src/Makefile.am
+@@ -44,8 +44,12 @@ SUBDIRS = \
+   slang \
+   tests \
+   tools \
+-  wgl \
++  wgl
++
++if HAVE_GLX
++SUBDIRS += \
+   xdemos
++endif
+ 
+ if HAVE_GLEW
+ SUBDIRS += \
+-- 
+1.9.1
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb 
b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
index 2df9bba..a32a073 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
@@ -21,6 +21,7 @@ SRC_URI = 
"ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
 file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
 file://0010-sharedtex_mt-fix-rendering-thread-hang.patch \
 file://0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch \
+file://0012-only-build-GLX-demos-if-needed.patch \
 "
 SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061"
 SRC_URI[sha256sum] = 
"e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92"
@@ -29,7 +30,7 @@ inherit autotools pkgconfig distro_features_check
 # depends on virtual/egl, virtual/libgl ...
 REQUIRED_DISTRO_FEATURES = "opengl"
 
-PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
+PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 glx \
   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew 
glu', '', d)}"
 
 # The Wayland code doesn't work with Wayland 1.0, so disable it for now
@@ -50,6 +51,7 @@ PACKAGECONFIG[wayland] = 
"--enable-wayland,--disable-wayland,virtual/libgl wayla
 PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11"
 PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew"
 PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl"
+PACKAGECONFIG[glx] = "--enable-glx-demos,--disable-glx-demos"
 
 do_install_append() {
# it can be completely empty when all PACKAGECONFIG options are disabled
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] mesa-demos: remove demos using obsolete screen surface

2016-04-22 Thread Awais Belal
The mesa surface EGL_MESA_screen_surface was obsoleted
and then dropped from mesa some time ago. Drop demos
depending on this.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 ...dependant-on-obsolete-MESA_screen_surface.patch | 1592 
 meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb |1 +
 2 files changed, 1593 insertions(+)
 create mode 100644 
meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch

diff --git 
a/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch
 
b/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch
new file mode 100644
index 000..a2621ce
--- /dev/null
+++ 
b/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch
@@ -0,0 +1,1592 @@
+commit 74443c6ee79f3251f643ea05e94df58183e37d0d
+Author: Matt Turner <matts...@gmail.com>
+Date:   Fri Aug 28 15:57:38 2015 -0700
+
+egl: Remove demos using EGL_MESA_screen_surface.
+
+The remnants of the extension were removed from Mesa in commit 7a58262e.
+
+Reviewed-by: Andreas Boll <andreas.boll@gmail.com>
+Tested-by: Andreas Boll <andreas.boll@gmail.com>
+Reviewed-by: Marek Olšák <marek.ol...@amd.com>
+
+Upstream-Status: Backport
+
+diff --git a/src/egl/eglut/Makefile.am b/src/egl/eglut/Makefile.am
+index 2d2f2af..b765069 100644
+--- a/src/egl/eglut/Makefile.am
 b/src/egl/eglut/Makefile.am
+@@ -33,17 +33,12 @@ if HAVE_WAYLAND
+ eglut_wayland = libeglut_wayland.la
+ endif
+ 
+-noinst_LTLIBRARIES = libeglut_screen.la $(eglut_x11) $(eglut_wayland)
++noinst_LTLIBRARIES = $(eglut_x11) $(eglut_wayland)
+ endif
+ 
+-libeglut_screen_la_SOURCES = \
+-  eglut.c \
+-  eglut.h \
+-  eglutint.h \
+-  eglut_screen.c
+-
+ libeglut_x11_la_SOURCES = \
+   eglut.c \
++  eglut.h \
+   eglutint.h \
+   eglut_x11.c
+ libeglut_x11_la_CFLAGS = $(X11_CFLAGS) $(EGL_CFLAGS)
+@@ -52,6 +47,7 @@ libeglut_x11_la_LIBADD = $(X11_LIBS) $(EGL_LIBS)
+ 
+ libeglut_wayland_la_SOURCES = \
+   eglut.c \
++  eglut.h \
+   eglutint.h \
+   eglut_wayland.c
+ 
+diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c
+index f6a2ad4..58b354a 100644
+--- a/src/egl/eglut/eglut.c
 b/src/egl/eglut/eglut.c
+@@ -176,9 +176,6 @@ _eglutCreateWindow(const char *title, int x, int y, int w, 
int h)
+ win->config, win->native.u.pixmap, NULL);
+   break;
+case EGL_PBUFFER_BIT:
+-#ifdef EGL_MESA_screen_surface
+-   case EGL_SCREEN_BIT_MESA:
+-#endif
+   win->surface = win->native.u.surface;
+   break;
+default:
+@@ -292,11 +289,7 @@ eglutDestroyWindow(int win)
+if (window->index != win)
+   return;
+ 
+-#ifdef EGL_MESA_screen_surface
+-   /* XXX it causes some bug in st/egl KMS backend */
+-   if ( _eglut->surface_type != EGL_SCREEN_BIT_MESA)
+-#endif
+-  eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, 
EGL_NO_CONTEXT);
++   eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, 
EGL_NO_CONTEXT);
+ 
+_eglutDestroyWindow(_eglut->current);
+ }
+diff --git a/src/egl/eglut/eglut_screen.c b/src/egl/eglut/eglut_screen.c
+deleted file mode 100644
+index 094a4e2..000
+--- a/src/egl/eglut/eglut_screen.c
 /dev/null
+@@ -1,194 +0,0 @@
+-/*
+- * Copyright (C) 2010 LunarG Inc.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included
+- * in all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+- * DEALINGS IN THE SOFTWARE.
+- *
+- * Authors:
+- *Chia-I Wu <o...@lunarg.com>
+- */
+-
+-#include 
+-#include 
+-#include 
+-
+-#define EGL_EGLEXT_PROTOTYPES
+-#include "EGL/egl.h"
+-#include "EGL/eglext.h"
+-
+-#include "eglutint.h"
+-
+-#define MAX_MODES 100
+-
+-#ifdef EGL_MESA_screen_surface
+-static EGLScreenMESA kms_screen;
+-static EGLModeMESA kms_mode;
+-static EGLi

[OE-core] [jethro][PATCH] lttng-tools: fix regression tests hang

2016-03-30 Thread Awais Belal
Some of the lttng fast_regression ptests have race
conditions which end up in a deadlock so the test
case never returns and the only way around is to
kill the process.
This is fixed by picking up relevant patches from
lttng-tools mainstream that fix up the behavior
of these tests.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 .../lttng/lttng-tools/Fix-regression-tests.patch   | 480 +
 meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb |   1 +
 2 files changed, 481 insertions(+)
 create mode 100644 
meta/recipes-kernel/lttng/lttng-tools/Fix-regression-tests.patch

diff --git a/meta/recipes-kernel/lttng/lttng-tools/Fix-regression-tests.patch 
b/meta/recipes-kernel/lttng/lttng-tools/Fix-regression-tests.patch
new file mode 100644
index 000..42f2074
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/Fix-regression-tests.patch
@@ -0,0 +1,480 @@
+From 971c0ba5c008735b3c5013ca6e0e2e96ab63db90 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoy...@efficios.com>
+Date: Thu, 24 Sep 2015 12:23:58 -0400
+Subject: [PATCH] Fix: regression tests
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fix racy session/relayd wait-after-kill scheme.
+Fix racy live test where application may not have generated events yet
+when we attach to the live trace.
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoy...@efficios.com>
+Signed-off-by: Jérémie Galarneau <jeremie.galarn...@efficios.com>
+
+Conflicts:
+   tests/utils/utils.sh
+
+Upstream-Status: Backport
+---
+ tests/regression/tools/health/test_health.sh   |   4 +-
+ tests/regression/tools/live/test_kernel|  47 +-
+ tests/regression/tools/live/test_ust   |  60 
+ .../regression/tools/live/test_ust_tracefile_count |  60 
+ tests/regression/tools/save-load/test_load |   6 +-
+ tests/utils/utils.sh   | 103 -
+ 6 files changed, 120 insertions(+), 160 deletions(-)
+
+diff --git a/tests/regression/tools/health/test_health.sh 
b/tests/regression/tools/health/test_health.sh
+index 6ae8885..ddc104c 100644
+--- a/tests/regression/tools/health/test_health.sh
 b/tests/regression/tools/health/test_health.sh
+@@ -146,7 +146,9 @@ function test_health
+   fi
+ 
+   if [ ${test_relayd} -eq 1 ]; then
+-  stop_lttng_relayd_nocheck
++  # We may fail to stop relayd here, and this is OK, since
++  # it may have been killed volountarily by testpoint.
++  stop_lttng_relayd_notap
+   fi
+   stop_lttng_sessiond
+ 
+diff --git a/tests/regression/tools/live/test_kernel 
b/tests/regression/tools/live/test_kernel
+index 4b958df..0e542da 100755
+--- a/tests/regression/tools/live/test_kernel
 b/tests/regression/tools/live/test_kernel
+@@ -62,22 +62,8 @@ else
+   exit 0
+ fi
+ 
+-if [ -z $(pidof lt-$SESSIOND_BIN) ]; then
+-  $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --background --quiet 
--consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" 
--consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
+-  if [ $? -eq 1 ]; then
+-  echo "Fail to start lttng-sessiond"
+-  exit 1
+-  fi
+-fi
+-
+-opt="--background -o $TRACE_PATH"
+-if [ -z $(pidof lt-$RELAYD_BIN) ]; then
+-  $DIR/../src/bin/lttng-relayd/$RELAYD_BIN $opt >/dev/null 2>&1
+-  if [ $? -eq 1 ]; then
+-  echo "Fail to start lttng-relayd (opt: $opt)"
+-  return 1
+-  fi
+-fi
++start_lttng_sessiond_notap
++start_lttng_relayd_notap "-o $TRACE_PATH"
+ 
+ setup_live_tracing
+ 
+@@ -86,30 +72,5 @@ $TESTDIR/regression/tools/live/live_test
+ 
+ clean_live_tracing
+ 
+-# Kill the relayd
+-PID_RELAYD=`pidof lt-$RELAYD_BIN`
+-kill $PID_RELAYD
+-if [ $? -eq 1 ]; then
+-  echo "Kill lttng-relayd (pid: $PID_RELAYD)"
+-  exit 1
+-else
+-  out=1
+-  while [ -n "$out" ]; do
+-  out=$(pidof lt-$RELAYD_BIN)
+-  sleep 0.5
+-  done
+-fi
+-
+-# Kill the sessiond
+-PID_SESSIOND=`pidof lt-$SESSIOND_BIN`
+-kill $PID_SESSIOND
+-if [ $? -eq 1 ]; then
+-  echo "Kill sessiond daemon"
+-  exit 1
+-else
+-  out=1
+-  while [ -n "$out" ]; do
+-  out=$(pidof lt-$SESSIOND_BIN)
+-  sleep 0.5
+-  done
+-fi
++stop_lttng_relayd_notap
++stop_lttng_sessiond_notap
+diff --git a/tests/regression/tools/live/test_ust 
b/tests/regression/tools/live/test_ust
+index ae69195..0b96858 100755
+--- a/tests/regression/tools/live/test_ust
 b/tests/regression/tools/live/test_ust
+@@ -59,57 +59,29 @@ function clean_live_tracing()
+   rm -rf $TRACE_PATH
+ }
+ 
+-if [ -z $(pidof lt-$SESSIOND_BIN) ]; then
+-  $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --background --quiet 
--c

[OE-core] [master][jethro][PATCH] systemd-serialgetty: allow baud rate overriding

2016-03-30 Thread Awais Belal
In case a getty is required on a UART which is not being
used as the kernel console, the current agetty invocation
fails to obey the baud rate configured through the
SERIAL_CONSOLES variable because it uses --keep-baud.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service 
b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
index 182167b..e8b027e 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
+++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
@@ -21,7 +21,7 @@ IgnoreOnIsolate=yes
 
 [Service]
 Environment="TERM=xterm"
-ExecStart=-/sbin/agetty -8 -L --keep-baud %I @BAUDRATE@ $TERM
+ExecStart=-/sbin/agetty -8 -L %I @BAUDRATE@ $TERM
 Type=idle
 Restart=always
 RestartSec=0
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH][RFC] systemd-serialgetty: allow baud rate overriding

2016-03-07 Thread Awais Belal
In case a getty is required on a UART which is not being
used as the kernel console, the current agetty invocation
fails to obey the baud rate configured through the
SERIAL_CONSOLES variable because it uses --keep-baud.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service 
b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
index 182167b..e8b027e 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
+++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
@@ -21,7 +21,7 @@ IgnoreOnIsolate=yes
 
 [Service]
 Environment="TERM=xterm"
-ExecStart=-/sbin/agetty -8 -L --keep-baud %I @BAUDRATE@ $TERM
+ExecStart=-/sbin/agetty -8 -L %I @BAUDRATE@ $TERM
 Type=idle
 Restart=always
 RestartSec=0
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] dhcp: search libxml2 for bind

2016-01-12 Thread Awais Belal
libdns requires libxml2 if bind was built with libxml2 support
enabled. Compilation will fail for omapip/test.c in case
-lxml2 isn't used during the build. So, we add losely coupled
search path which will pick up the lib if it is present.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 meta/recipes-connectivity/dhcp/dhcp.inc|  3 ++-
 .../dhcp/dhcp/search-for-libxml2.patch | 23 ++
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-connectivity/dhcp/dhcp/search-for-libxml2.patch

diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc 
b/meta/recipes-connectivity/dhcp/dhcp.inc
index a673dbc..9c4233b 100644
--- a/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -18,7 +18,8 @@ SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz 
\
file://init-server file://default-server \
file://dhclient.conf file://dhcpd.conf \
file://dhcpd.service file://dhcrelay.service \
-   file://dhcpd6.service "
+   file://dhcpd6.service \
+   file://search-for-libxml2.patch "
 
 UPSTREAM_CHECK_URI = "ftp://ftp.isc.org/isc/dhcp/;
 UPSTREAM_CHECK_REGEX = "(?P\d+\.\d+\.(\d+?))/"
diff --git a/meta/recipes-connectivity/dhcp/dhcp/search-for-libxml2.patch 
b/meta/recipes-connectivity/dhcp/dhcp/search-for-libxml2.patch
new file mode 100644
index 000..a08a5b7
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/search-for-libxml2.patch
@@ -0,0 +1,23 @@
+libdns requires libxml2 if bind was built with libxml2 support
+enabled. Compilation will fail for omapip/test.c in case
+lxml2 isn't used during the build. So, we add losely coupled
+search path which will pick up the lib if it is present.
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+Upstream-Status: Pending
+
+diff --git a/configure.ac b/configure.ac
+index c9dc8b5..85f59be 100644
+--- a/configure.ac
 b/configure.ac
+@@ -602,6 +602,10 @@ no)
+ esac
+ AC_SUBST([libbind])
+ 
++# We need to find libxml2 if bind was built with support enabled
++# otherwise we'll fail to build omapip/test.c
++AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],)
++
+ # OpenLDAP support.
+ AC_ARG_WITH(ldap,
+ AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default 
is no)]),
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [fido][PATCH] bitbake: toaster: Rework mimetype guessing to fix artifact downloads

2015-12-28 Thread Awais Belal
From: Elliot Smith 

Artifact download links were broken because the function to
get the mimetype for the artifact was incorrectly using the
underlying mimetype library. The function was also attached
to the build environment controller, which was unnecessary, as
we only support local controllers anyway.

Remove the mimetype getter on the build environment and
use the one in the view code instead. This prevents the download error
from occurring.

(Backport of dd957fe0f261db6481882fee0413f459425000c2 and
dd957fe0f261db6481882fee0413f459425000c2 from master to Yocto 1.8)

[YOCTO #8472]

(Bitbake rev: b09966906ef054834f0b465f0c5a2a937b4c4a4c)

Signed-off-by: Elliot Smith 
Signed-off-by: Ed Bartosh 
Signed-off-by: Richard Purdie 
---
 bitbake/lib/toaster/bldcontrol/models.py | 34 
 bitbake/lib/toaster/toastergui/views.py  | 18 -
 2 files changed, 17 insertions(+), 35 deletions(-)

diff --git a/bitbake/lib/toaster/bldcontrol/models.py 
b/bitbake/lib/toaster/bldcontrol/models.py
index 02cfaf7..770ce40 100644
--- a/bitbake/lib/toaster/bldcontrol/models.py
+++ b/bitbake/lib/toaster/bldcontrol/models.py
@@ -39,40 +39,6 @@ class BuildEnvironment(models.Model):
 created = models.DateTimeField(auto_now_add = True)
 updated = models.DateTimeField(auto_now = True)
 
-
-def get_artifact_type(self, path):
-if self.betype == BuildEnvironment.TYPE_LOCAL:
-try:
-import magic
-
-# fair warning: this is a mess; there are multiple competeing 
and incompatible
-# magic modules floating around, so we try some of the most 
common combinations
-
-try:# we try ubuntu's python-magic 5.4
-m = magic.open(magic.MAGIC_MIME_TYPE)
-m.load()
-return m.file(path)
-except AttributeError:
-pass
-
-try:# we try python-magic 0.4.6
-m = magic.Magic(magic.MAGIC_MIME)
-return m.from_file(path)
-except AttributeError:
-pass
-
-try:# we try pip filemagic 1.6
-m = magic.Magic(flags=magic.MAGIC_MIME_TYPE)
-return m.id_filename(path)
-except AttributeError:
-pass
-
-return "binary/octet-stream"
-except ImportError:
-return "binary/octet-stream"
-raise Exception("FIXME: artifact type not implemented for build 
environment type %s" % be.get_betype_display())
-
-
 def get_artifact(self, path):
 if self.betype == BuildEnvironment.TYPE_LOCAL:
 return open(path, "r")
diff --git a/bitbake/lib/toaster/toastergui/views.py 
b/bitbake/lib/toaster/toastergui/views.py
index be59c83..98b040e 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -39,6 +39,22 @@ from datetime import timedelta, datetime, date
 from django.utils import formats
 from toastergui.templatetags.projecttags import json as jsonfilter
 import json
+import mimetypes
+
+class MimeTypeFinder(object):
+# setting this to False enables additional non-standard mimetypes
+# to be included in the guess
+_strict = False
+
+# returns the mimetype for a file path as a string,
+# or 'application/octet-stream' if the type couldn't be guessed
+@classmethod
+def get_mimetype(self, path):
+guess = mimetypes.guess_type(path, self._strict)
+guessed_type = guess[0]
+if guessed_type == None:
+guessed_type = 'application/octet-stream'
+return guessed_type
 
 # all new sessions should come through the landing page;
 # determine in which mode we are running in, and redirect appropriately
@@ -3209,7 +3225,7 @@ if toastermain.settings.MANAGED:
 if file_name is None:
 raise Exception("Could not handle artifact %s id %s" % 
(artifact_type, artifact_id))
 else:
-content_type = 
b.buildrequest.environment.get_artifact_type(file_name)
+content_type = MimeTypeFinder.get_mimetype(file_name)
 fsock = b.buildrequest.environment.get_artifact(file_name)
 file_name = os.path.basename(file_name) # we assume that the 
build environment system has the same path conventions as host
 
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [fido][PATCH] grub2: Fix CVE-2015-8370

2015-12-28 Thread Awais Belal
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=451d80e52d851432e109771bb8febafca7a5f1f2

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 ...E-2015-8370-Grub2-user-pass-vulnerability.patch | 52 ++
 meta/recipes-bsp/grub/grub2.inc|  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 
meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch

diff --git 
a/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
 
b/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
new file mode 100644
index 000..1661f64
--- /dev/null
+++ 
b/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
@@ -0,0 +1,52 @@
+Upstream-Status: Accepted
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+
+From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00 2001
+From: Hector Marco-Gisbert <hecma...@upv.es>
+Date: Wed, 16 Dec 2015 04:57:18 +
+Subject: Fix security issue when reading username and password
+
+This patch fixes two integer underflows at:
+  * grub-core/lib/crypto.c
+  * grub-core/normal/auth.c
+
+CVE-2015-8370
+
+Signed-off-by: Hector Marco-Gisbert <hecma...@upv.es>
+Signed-off-by: Ismael Ripoll-Ripoll <irip...@disca.upv.es>
+Also-By: Andrey Borzenkov <arvidj...@gmail.com>
+---
+diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
+index 010e550..683a8aa 100644
+--- a/grub-core/lib/crypto.c
 b/grub-core/lib/crypto.c
+@@ -470,7 +470,8 @@ grub_password_get (char buf[], unsigned buf_size)
+
+   if (key == '\b')
+   {
+-cur_len--;
++if (cur_len)
++  cur_len--;
+ continue;
+   }
+
+diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c
+index c6bd96e..8615c48 100644
+--- a/grub-core/normal/auth.c
 b/grub-core/normal/auth.c
+@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned buf_size)
+
+   if (key == '\b')
+   {
+-cur_len--;
+-grub_printf ("\b");
++if (cur_len)
++  {
++cur_len--;
++grub_printf ("\b");
++  }
+ continue;
+   }
+
+--
+cgit v0.9.0.2
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 8e733ec..c281098 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -25,6 +25,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \
file://grub-efi-fix-with-glibc-2.20.patch \
file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \
+   file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
 "
 
 DEPENDS = "flex-native bison-native xz"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] grub2: Fix CVE-2015-8370

2015-12-23 Thread Awais Belal
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=451d80e52d851432e109771bb8febafca7a5f1f2

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 ...E-2015-8370-Grub2-user-pass-vulnerability.patch | 52 ++
 meta/recipes-bsp/grub/grub2.inc|  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 
meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch

diff --git 
a/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
 
b/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
new file mode 100644
index 000..f9252e9
--- /dev/null
+++ 
b/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
@@ -0,0 +1,52 @@
+Upstream-Status: Accepted
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+
+From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00 2001
+From: Hector Marco-Gisbert <hecma...@upv.es>
+Date: Wed, 16 Dec 2015 04:57:18 +
+Subject: Fix security issue when reading username and password
+
+This patch fixes two integer underflows at:
+  * grub-core/lib/crypto.c
+  * grub-core/normal/auth.c
+
+CVE-2015-8370
+
+Signed-off-by: Hector Marco-Gisbert <hecma...@upv.es>
+Signed-off-by: Ismael Ripoll-Ripoll <irip...@disca.upv.es>
+Also-By: Andrey Borzenkov <arvidj...@gmail.com>
+---
+diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
+index 010e550..683a8aa 100644
+--- a/grub-core/lib/crypto.c
 b/grub-core/lib/crypto.c
+@@ -470,7 +470,8 @@ grub_password_get (char buf[], unsigned buf_size)
+ 
+   if (key == '\b')
+   {
+-cur_len--;
++if (cur_len)
++  cur_len--;
+ continue;
+   }
+ 
+diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c
+index c6bd96e..8615c48 100644
+--- a/grub-core/normal/auth.c
 b/grub-core/normal/auth.c
+@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned buf_size)
+ 
+   if (key == '\b')
+   {
+-cur_len--;
+-grub_printf ("\b");
++if (cur_len)
++  {
++cur_len--;
++grub_printf ("\b");
++  }
+ continue;
+   }
+ 
+--
+cgit v0.9.0.2
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 312771b..a8c41f8 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -27,6 +27,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \
file://grub2-fix-initrd-size-bug.patch \
+   file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
 "
 
 DEPENDS = "flex-native bison-native xz"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [dizzy][PATCH] grub2: Fix CVE-2015-8370

2015-12-23 Thread Awais Belal
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=451d80e52d851432e109771bb8febafca7a5f1f2

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 ...E-2015-8370-Grub2-user-pass-vulnerability.patch | 52 ++
 meta/recipes-bsp/grub/grub-efi_2.00.bb |  1 +
 meta/recipes-bsp/grub/grub_2.00.bb |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 
meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch

diff --git 
a/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
 
b/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
new file mode 100644
index 000..f9252e9
--- /dev/null
+++ 
b/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
@@ -0,0 +1,52 @@
+Upstream-Status: Accepted
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+
+From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00 2001
+From: Hector Marco-Gisbert <hecma...@upv.es>
+Date: Wed, 16 Dec 2015 04:57:18 +
+Subject: Fix security issue when reading username and password
+
+This patch fixes two integer underflows at:
+  * grub-core/lib/crypto.c
+  * grub-core/normal/auth.c
+
+CVE-2015-8370
+
+Signed-off-by: Hector Marco-Gisbert <hecma...@upv.es>
+Signed-off-by: Ismael Ripoll-Ripoll <irip...@disca.upv.es>
+Also-By: Andrey Borzenkov <arvidj...@gmail.com>
+---
+diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
+index 010e550..683a8aa 100644
+--- a/grub-core/lib/crypto.c
 b/grub-core/lib/crypto.c
+@@ -470,7 +470,8 @@ grub_password_get (char buf[], unsigned buf_size)
+ 
+   if (key == '\b')
+   {
+-cur_len--;
++if (cur_len)
++  cur_len--;
+ continue;
+   }
+ 
+diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c
+index c6bd96e..8615c48 100644
+--- a/grub-core/normal/auth.c
 b/grub-core/normal/auth.c
+@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned buf_size)
+ 
+   if (key == '\b')
+   {
+-cur_len--;
+-grub_printf ("\b");
++if (cur_len)
++  {
++cur_len--;
++grub_printf ("\b");
++  }
+ continue;
+   }
+ 
+--
+cgit v0.9.0.2
diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb 
b/meta/recipes-bsp/grub/grub-efi_2.00.bb
index 7674255..6822e7a 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.00.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb
@@ -30,6 +30,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://grub-2.00-add-oe-kernel.patch \
file://grub-efi-fix-with-glibc-2.20.patch \
file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \
+   file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
   "
 SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
 SRC_URI[sha256sum] = 
"65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
diff --git a/meta/recipes-bsp/grub/grub_2.00.bb 
b/meta/recipes-bsp/grub/grub_2.00.bb
index d4df676..94b6da9 100644
--- a/meta/recipes-bsp/grub/grub_2.00.bb
+++ b/meta/recipes-bsp/grub/grub_2.00.bb
@@ -25,6 +25,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
   file://fix-endianness-problem.patch \
   file://grub2-remove-sparc64-setup-from-x86-builds.patch \
   file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \
+  file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
   "
 
 SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [RFC][PATCH] python: ensure usage of host modules while cross compiling

2015-10-30 Thread Awais Belal
The issue is generally seen on x86 type of machines passing
-march=bdverX (X=3,4 etc) flags but in general this should
cause a problem when freshly built target modules are tried
for an import during the cross build process.
Aiding the PYTHONPATH with CROSSPYTHONPATH which contains
the native modules resolves the issue.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 ...e-of-native-modules-while-cross-compiling.patch | 31 ++
 meta/recipes-devtools/python/python_2.7.9.bb   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python/0001-ensure-usage-of-native-modules-while-cross-compiling.patch

diff --git 
a/meta/recipes-devtools/python/python/0001-ensure-usage-of-native-modules-while-cross-compiling.patch
 
b/meta/recipes-devtools/python/python/0001-ensure-usage-of-native-modules-while-cross-compiling.patch
new file mode 100644
index 000..1e87e89
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python/0001-ensure-usage-of-native-modules-while-cross-compiling.patch
@@ -0,0 +1,31 @@
+From 4eb30173f2d254f19d5ef18fabed3bdb2e5c1182 Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_be...@mentor.com>
+Date: Fri, 30 Oct 2015 17:47:07 +0500
+Subject: [PATCH] ensure usage of native modules while cross compiling
+
+The PYTHONPATH variable augments the default search path and
+is prepended to it. We need to make sure that host modules
+are used while cross compiling otherwise an illegal instruction
+error is generated if the modules built for target are imported.
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 87a4f02..fa9e0dd 100644
+--- a/configure.ac
 b/configure.ac
+@@ -33,7 +33,7 @@ if test "$cross_compiling" = yes; then
+   AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
+   fi
+ AC_MSG_RESULT($interp)
+-  PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) 
_PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f 
pybuilddir.txt && echo $(abs_builddir)/`cat 
pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
++  PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) 
_PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) 
PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo 
$(abs_builddir)/`cat 
pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
+ fi
+ elif test "$cross_compiling" = maybe; then
+ AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and 
--build=ARCH])
+-- 
+1.9.1
+
diff --git a/meta/recipes-devtools/python/python_2.7.9.bb 
b/meta/recipes-devtools/python/python_2.7.9.bb
index f7e2f27..9a43cf7 100644
--- a/meta/recipes-devtools/python/python_2.7.9.bb
+++ b/meta/recipes-devtools/python/python_2.7.9.bb
@@ -26,6 +26,7 @@ SRC_URI += "\
   file://parallel-makeinst-create-bindir.patch \
   file://use_sysroot_ncurses_instead_of_host.patch \
   file://avoid_parallel_make_races_on_pgen.patch \
+  file://0001-ensure-usage-of-native-modules-while-cross-compiling.patch \
 "
 
 S = "${WORKDIR}/Python-${PV}"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] mesa-demos: fix deadlock in sharedtex_mt

2015-10-08 Thread Awais Belal
This patch fixes a deadlock that occurs between the main
thread and rendering threads of the sharedtex_mt demo.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 ...10-sharedtex_mt-fix-rendering-thread-hang.patch | 43 ++
 meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 
meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch

diff --git 
a/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch
 
b/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch
new file mode 100644
index 000..1aa893b
--- /dev/null
+++ 
b/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch
@@ -0,0 +1,43 @@
+From 525fa9ded72d22b53c5eb366f61e2ac1d407a2db Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_be...@mentor.com>
+Date: Thu, 8 Oct 2015 13:49:31 +0500
+Subject: [PATCH] sharedtex_mt: fix rendering thread hang
+
+XNextEvent is a blocking call which locks up the display mutex
+this causes the rendering threads to hang when they try call
+glXSwapBuffers() as that tries to take the same mutex in
+underlying calls through XCopyArea().
+So we only go to XNextEvent when it has at least one event
+and we wouldn't lock indefinitely.
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+
+Upstream-Status: Submitted
+---
+ src/xdemos/sharedtex_mt.c | 9 +++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/xdemos/sharedtex_mt.c b/src/xdemos/sharedtex_mt.c
+index a90903a..1d503c4 100644
+--- a/src/xdemos/sharedtex_mt.c
 b/src/xdemos/sharedtex_mt.c
+@@ -420,9 +420,14 @@ Resize(struct window *h, unsigned int width, unsigned int 
height)
+ static void
+ EventLoop(void)
+ {
++   int i;
++   XEvent event;
+while (1) {
+-  int i;
+-  XEvent event;
++  /* Do we have an event? */
++  if (XPending(gDpy) == 0) {
++ usleep(1);
++ continue;
++  }
+   XNextEvent(gDpy, );
+   for (i = 0; i < NumWindows; i++) {
+struct window *h = [i];
+-- 
+1.9.1
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb 
b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
index e451642..0094f55 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
@@ -19,6 +19,7 @@ SRC_URI = 
"ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
 file://0007-Install-few-more-test-programs.patch \
 file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \
 file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
+file://0010-sharedtex_mt-fix-rendering-thread-hang.patch \
 "
 SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061"
 SRC_URI[sha256sum] = 
"e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [][PATCH v2] mesa-demos: fix deadlock in sharedtex_mt

2015-10-08 Thread Awais Belal
This patch fixes a deadlock that occurs between the main
thread and rendering threads of the sharedtex_mt demo.

Signed-off-by: Awais Belal <awais_be...@mentor.com>
---
 ...10-sharedtex_mt-fix-rendering-thread-hang.patch | 43 ++
 meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 
meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch

diff --git 
a/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch
 
b/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch
new file mode 100644
index 000..7ce38b8
--- /dev/null
+++ 
b/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch
@@ -0,0 +1,43 @@
+From 525fa9ded72d22b53c5eb366f61e2ac1d407a2db Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_be...@mentor.com>
+Date: Thu, 8 Oct 2015 13:49:31 +0500
+Subject: [PATCH] sharedtex_mt: fix rendering thread hang
+
+XNextEvent is a blocking call which locks up the display mutex
+this causes the rendering threads to hang when they try call
+glXSwapBuffers() as that tries to take the same mutex in
+underlying calls through XCopyArea().
+So we only go to XNextEvent when it has at least one event
+and we wouldn't lock indefinitely.
+
+Signed-off-by: Awais Belal <awais_be...@mentor.com>
+
+Upstream-Status: Submitted [https://patchwork.freedesktop.org/patch/61350/]
+---
+ src/xdemos/sharedtex_mt.c | 9 +++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/xdemos/sharedtex_mt.c b/src/xdemos/sharedtex_mt.c
+index a90903a..1d503c4 100644
+--- a/src/xdemos/sharedtex_mt.c
 b/src/xdemos/sharedtex_mt.c
+@@ -420,9 +420,14 @@ Resize(struct window *h, unsigned int width, unsigned int 
height)
+ static void
+ EventLoop(void)
+ {
++   int i;
++   XEvent event;
+while (1) {
+-  int i;
+-  XEvent event;
++  /* Do we have an event? */
++  if (XPending(gDpy) == 0) {
++ usleep(1);
++ continue;
++  }
+   XNextEvent(gDpy, );
+   for (i = 0; i < NumWindows; i++) {
+struct window *h = [i];
+-- 
+1.9.1
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb 
b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
index e451642..0094f55 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
@@ -19,6 +19,7 @@ SRC_URI = 
"ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
 file://0007-Install-few-more-test-programs.patch \
 file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \
 file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
+file://0010-sharedtex_mt-fix-rendering-thread-hang.patch \
 "
 SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061"
 SRC_URI[sha256sum] = 
"e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] initrdscripts: handle mmc device as installer medium

2015-07-07 Thread Awais Belal
Platforms which have the capability of using the MMC as an
installer medium will present the same MMC device as an
installation candidate. This happens because the MMC
devices appear as mmcblkX and the current script strips
up the X which is needed to identify an MMC device
uniqely.
This patch now updates the way device identifier stripping
is done and handles the exclusion of installer device from
installation candidates more generically.

Signed-off-by: Awais Belal awais_be...@mentor.com
---
 .../initrdscripts/files/init-install-efi.sh  | 20 
 .../recipes-core/initrdscripts/files/init-install.sh | 20 
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh 
b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 14939ac..f339b30 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -18,7 +18,14 @@ swap_ratio=5
 hdnamelist=
 live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
 live_dev_name=${live_dev_name#\/dev/}
-live_dev_name=${live_dev_name%%[0-9]*}
+# Only strip the digit identifier if the device is not an mmc
+case $live_dev_name in
+mmcblk*)
+;;
+*)
+live_dev_name=${live_dev_name%%[0-9]*}
+;;
+esac
 
 echo Searching for hard drives ...
 
@@ -36,9 +43,14 @@ for device in `ls /sys/block/`; do
 *)
 # skip the device LiveOS is on
 # Add valid hard drive name to the list
-if [ $device != $live_dev_name -a -e /dev/$device ]; then
-hdnamelist=$hdnamelist $device
-fi
+case $device in
+$live_dev_name*)
+# skip the device we are running from
+;;
+*)
+hdnamelist=$hdnamelist $device
+;;
+esac
 ;;
 esac
 done
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh 
b/meta/recipes-core/initrdscripts/files/init-install.sh
index 7fccdde..f9e9768 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -17,7 +17,14 @@ swap_ratio=5
 hdnamelist=
 live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
 live_dev_name=${live_dev_name#\/dev/}
-live_dev_name=${live_dev_name%%[0-9]*}
+# Only strip the digit identifier if the device is not an mmc
+case $live_dev_name in
+mmcblk*)
+;;
+*)
+live_dev_name=${live_dev_name%%[0-9]*}
+;;
+esac
 
 echo Searching for hard drives ...
 
@@ -35,9 +42,14 @@ for device in `ls /sys/block/`; do
 *)
 # skip the device LiveOS is on
 # Add valid hard drive name to the list
-if [ $device != $live_dev_name -a -e /dev/$device ]; then
-hdnamelist=$hdnamelist $device
-fi
+case $device in
+$live_dev_name*)
+# skip the device we are running from
+;;
+*)
+hdnamelist=$hdnamelist $device
+;;
+esac
 ;;
 esac
 done
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] initrdscripts: make boot drive detection more generic

2015-05-21 Thread Awais Belal
The init script that invokes install and install-efi scripts
passes the first parameter that identifies the boot drive but
in cases when this disk is labeled and kernel configurations
allow disk labeling under /run/media/ this would pass the disk
label.
The earlier implementation considered that the drive name will
be passed and in case the label is passed it fails and provides
the boot drive as an option for installation driver.
We now use a more generic approach to identify the boot drive
which can handle both drive name as well as label if passed.

Signed-off-by: Awais Belal awais_be...@mentor.com
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 3 ++-
 meta/recipes-core/initrdscripts/files/init-install.sh | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh 
b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 329586d..8dd2749 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -16,7 +16,8 @@ swap_ratio=5
 
 # Get a list of hard drives
 hdnamelist=
-live_dev_name=${1%%/*}
+live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
+live_dev_name=${live_dev_name#\/dev/}
 live_dev_name=${live_dev_name%%[0-9]*}
 
 echo Searching for hard drives ...
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh 
b/meta/recipes-core/initrdscripts/files/init-install.sh
index fb537ee..cb26163 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -15,7 +15,8 @@ swap_ratio=5
 
 # Get a list of hard drives
 hdnamelist=
-live_dev_name=${1%%/*}
+live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
+live_dev_name=${live_dev_name#\/dev/}
 live_dev_name=${live_dev_name%%[0-9]*}
 
 echo Searching for hard drives ...
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] initrdscripts: make boot drive detection more generic

2015-05-21 Thread Awais Belal
The init script that invokes install and install-efi scripts
passes the first parameter that identifies the boot drive but
in cases when this disk is labeled and kernel configurations
allow disk labeling under /run/media/ this would pass the disk
label.
The earlier implementation considered that the drive name will
be passed and in case the label is passed it fails and provides
the boot drive as an option for installation driver.
We now use a more generic approach to identify the boot drive
which can handle both drive name as well as label if passed.

Signed-off-by: Awais Belal awais_be...@mentor.com
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 3 ++-
 meta/recipes-core/initrdscripts/files/init-install.sh | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh 
b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 329586d..14cb5be 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -16,7 +16,8 @@ swap_ratio=5
 
 # Get a list of hard drives
 hdnamelist=
-live_dev_name=${1%%/*}
+live_dev_name=`cat /proc/mounts | grep /boot | awk '{print $1}'`
+live_dev_name=${live_dev_name#\/dev/}
 live_dev_name=${live_dev_name%%[0-9]*}
 
 echo Searching for hard drives ...
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh 
b/meta/recipes-core/initrdscripts/files/init-install.sh
index fb537ee..72bafe1 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -15,7 +15,8 @@ swap_ratio=5
 
 # Get a list of hard drives
 hdnamelist=
-live_dev_name=${1%%/*}
+live_dev_name=`cat /proc/mounts | grep /boot | awk '{print $1}'`
+live_dev_name=${live_dev_name#\/dev/}
 live_dev_name=${live_dev_name%%[0-9]*}
 
 echo Searching for hard drives ...
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] gstreamer1.0-omx: use mulitple SCMs to fetch submodules

2014-12-29 Thread Awais Belal
The gstreamer omx package uses a submodule 'common' which
is fetched by the configure script. This approach fails
on non-network builds as the fetcher tries to look upstream
for the submodule.
We now use multiple SCMs, one for the main omx package and
the other for the 'common' submodule so it is available in
the downloads_dir for later use.

Signed-off-by: Awais Belal awais_be...@mentor.com
---
 .../gstreamer/gstreamer1.0-omx_git.bb  |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
index 931a7fc..99c84668 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
@@ -6,12 +6,17 @@ LIC_FILES_CHKSUM = 
file://COPYING;md5=4fbd65380cdd255951079008b364516c \
 
file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f
 
 SRC_URI =  \
-git://anongit.freedesktop.org/gstreamer/gst-omx;branch=master \
-file://0001-omx-fixed-type-error-in-printf-call.patch \
+git://anongit.freedesktop.org/gstreamer/gst-omx;branch=master;name=gst-omx 
\
+
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;branch=master;name=common
 \
+file://0001-omx-fixed-type-error-in-printf-call.patch \
 
+
 S = ${WORKDIR}/git
 
-SRCREV = a2db76b048db278ef0aa798e106b7594264e06c0
+SRCREV_gst-omx = a2db76b048db278ef0aa798e106b7594264e06c0
+SRCREV_common = 5edcd857b2107cd8b78c16232dd10877513ec157
+
+SRCREV_FORMAT = gst-omx
 
 do_configure_prepend() {
cd ${S}
-- 
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] gstreamer1.0-* use gitsm style SRC_URI for git recipes

2014-12-22 Thread Awais Belal
All gstreamer components when fetched through git have a git
submodule type repo rather than a main repo style. This
will make builds fail when there's no network connection
while the source is already downloaded.
We fix this by explicitly using the gitsm styled SRC_URI for
these submodules.

Signed-off-by: Awais Belal awais_be...@mentor.com
---
 .../gstreamer/gstreamer1.0-libav_git.bb|2 +-
 .../gstreamer/gstreamer1.0-omx_git.bb  |2 +-
 .../gstreamer/gstreamer1.0-plugins.inc |2 +-
 .../gstreamer/gstreamer1.0_git.bb  |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
index bf1b87e..376a7c4 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = 
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 
\
 
file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02
 
-SRC_URI = git://anongit.freedesktop.org/gstreamer/gst-libav;branch=master
+SRC_URI = gitsm://anongit.freedesktop.org/gstreamer/gst-libav;branch=master
 S = ${WORKDIR}/git
 
 SRCREV = 127202d6f65584891dabf92be031f0d170b0e7f1
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
index 931a7fc..df7c58c 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = 
file://COPYING;md5=4fbd65380cdd255951079008b364516c \
 
file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f
 
 SRC_URI =  \
-git://anongit.freedesktop.org/gstreamer/gst-omx;branch=master \
+gitsm://anongit.freedesktop.org/gstreamer/gst-omx;branch=master \
 file://0001-omx-fixed-type-error-in-printf-call.patch \
 
 S = ${WORKDIR}/git
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
index 687aa2f..d857a40 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
@@ -43,7 +43,7 @@ def get_gst_srcuri(d):
 branch = d.getVar(GSTREAMER_1_0_GIT_BRANCH, True)
 
 if pv == git:
-s = git://anongit.freedesktop.org/gstreamer/%s;branch=%s % 
(gstpkg_basename, branch)
+s = gitsm://anongit.freedesktop.org/gstreamer/%s;branch=%s % 
(gstpkg_basename, branch)
 else:
 s = http://gstreamer.freedesktop.org/src/%s/%s-%s.tar.xz; % 
(gstpkg_basename, gstpkg_basename, pv)
 return s
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
index cb00d31..a8d3731 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
@@ -5,7 +5,7 @@ include gstreamer1.0.inc
 LIC_FILES_CHKSUM = file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
 
file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d
 
-SRC_URI = git://anongit.freedesktop.org/gstreamer/gstreamer;branch=master
+SRC_URI = gitsm://anongit.freedesktop.org/gstreamer/gstreamer;branch=master
 S = ${WORKDIR}/git
 
 SRCREV = 3b8181a8c550e74acaba4e8c55bdc649fa551dc9
-- 
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] libxcb, xcbproto: upgrade to version 1.11

2014-12-08 Thread Awais Belal
Update libxcb and xcb-proto to 1.11 from 1.10.

Signed-off-by: Awais Belal awais_be...@mentor.com
---
 .../xorg-lib/{libxcb_1.10.bb = libxcb_1.11.bb}|5 +++--
 .../{xcb-proto_1.10.bb = xcb-proto_1.11.bb}   |4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)
 rename meta/recipes-graphics/xorg-lib/{libxcb_1.10.bb = libxcb_1.11.bb} (48%)
 rename meta/recipes-graphics/xorg-proto/{xcb-proto_1.10.bb = 
xcb-proto_1.11.bb} (60%)

diff --git a/meta/recipes-graphics/xorg-lib/libxcb_1.10.bb 
b/meta/recipes-graphics/xorg-lib/libxcb_1.11.bb
similarity index 48%
rename from meta/recipes-graphics/xorg-lib/libxcb_1.10.bb
rename to meta/recipes-graphics/xorg-lib/libxcb_1.11.bb
index d88b025..d533c7d 100644
--- a/meta/recipes-graphics/xorg-lib/libxcb_1.10.bb
+++ b/meta/recipes-graphics/xorg-lib/libxcb_1.11.bb
@@ -6,5 +6,6 @@ LIC_FILES_CHKSUM = 
file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7
 
 DEPENDS += libxdmcp
 
-SRC_URI[md5sum] = 074c335cc4453467eeb234e3dadda700
-SRC_URI[sha256sum] = 
98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5
+SRC_URI[md5sum] = 5a873ebd383d1a60612dd6ec6b42c781
+SRC_URI[sha256sum] = 
03635d70045b9ede90778e67516135828a57de87ac508f987024f43c03620ff7
+
diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.10.bb 
b/meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb
similarity index 60%
rename from meta/recipes-graphics/xorg-proto/xcb-proto_1.10.bb
rename to meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb
index 0b67b57..5bc5a11 100644
--- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.10.bb
+++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb
@@ -5,5 +5,5 @@ LIC_FILES_CHKSUM = 
file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \
 
file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65
 
 
-SRC_URI[md5sum] = ade74b8e9c870dc7515adfa209e66063
-SRC_URI[sha256sum] = 
7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05
+SRC_URI[md5sum] = 6bf2797445dc6d43e9e4707c082eff9c
+SRC_URI[sha256sum] = 
b4aceee6502a0ce45fc39b33c541a2df4715d00b72e660ebe8c5bb444771e32e
-- 
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] gstreamer1.0-* fix configure for out of tree build on git recipes

2014-12-08 Thread Awais Belal
The autogen.sh script lies in the srcdir ($S) and is required to
be run on git based checkouts of gstreamer packages in order to
generate initial makefiles. So, we fix this by cd'ing to the
specific dir, run the required script and then come back to our
initial dir which is builddir ($B).
Additionally rather than overriding the whole do_configure step
we only _prepend to make it clear what we are doing here.

Signed-off-by: Awais Belal awais_be...@mentor.com
---
 .../gstreamer/gstreamer1.0-libav_git.bb|5 +++--
 .../gstreamer/gstreamer1.0-omx_git.bb  |5 +++--
 .../gstreamer/gstreamer1.0-plugins-bad_git.bb  |5 +++--
 .../gstreamer/gstreamer1.0-plugins-base_git.bb |5 +++--
 .../gstreamer/gstreamer1.0-plugins-good_git.bb |5 +++--
 .../gstreamer/gstreamer1.0-plugins-ugly_git.bb |5 +++--
 .../gstreamer/gstreamer1.0_git.bb  |5 +++--
 7 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
index 5ce28cc..b0e6b2e 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
@@ -20,8 +20,9 @@ LIBAV_EXTRA_CONFIGURE_COMMON_ARG = --target-os=linux \
   --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
   ${GSTREAMER_1_0_DEBUG}
 
-do_configure() {
+do_configure_prepend() {
+   cd ${S}
./autogen.sh --noconfigure
-   oe_runconf
+   cd ${B}
 }
 
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
index a390205..931a7fc 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
@@ -13,8 +13,9 @@ S = ${WORKDIR}/git
 
 SRCREV = a2db76b048db278ef0aa798e106b7594264e06c0
 
-do_configure() {
+do_configure_prepend() {
+   cd ${S}
./autogen.sh --noconfigure
-   oe_runconf
+   cd ${B}
 }
 
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
index e1a5904..75859f9 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
@@ -19,8 +19,9 @@ EXTRA_OECONF +=  \
 -disable-openjpeg \
 
 
-do_configure() {
+do_configure_prepend() {
+   cd ${S}
./autogen.sh --noconfigure
-   oe_runconf
+   cd ${B}
 }
 
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
index a894abe..fbe3a42 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
@@ -11,8 +11,9 @@ S = ${WORKDIR}/git
 
 SRCREV = 8d4cb64a4b9d84b10076bf350f80a0d6ea68ec2d
 
-do_configure() {
+do_configure_prepend() {
+   cd ${S}
./autogen.sh --noconfigure
-   oe_runconf
+   cd ${B}
 }
 
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
index 8b11b20..2c0e0ef 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
@@ -10,8 +10,9 @@ S = ${WORKDIR}/git
 
 SRCREV = fd0123800c8c1cf1468c0fa5d592ad0d0d8b4140
 
-do_configure() {
+do_configure_prepend() {
+   cd ${S}
./autogen.sh --noconfigure
-   oe_runconf
+   cd ${B}
 }
 
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
index 2f72497..dcf5ffc 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
@@ -9,8 +9,9 @@ S = ${WORKDIR}/git
 
 SRCREV = 06b8ac10cee85c5c304ca320997aa8f44295a66f
 
-do_configure() {
+do_configure_prepend() {
+   cd ${S}
./autogen.sh --noconfigure
-   oe_runconf
+   cd ${B}
 }
 
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
index 424c90a..cb00d31 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
@@ -10,8 +10,9 @@ S = ${WORKDIR}/git
 
 SRCREV = 3b8181a8c550e74acaba4e8c55bdc649fa551dc9
 
-do_configure() {
+do_configure_prepend() {
+   cd ${S}
./autogen.sh --noconfigure
-   oe_runconf
+   cd ${B}
 }
 
-- 
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] libxcb: fix socket writes

2014-12-05 Thread Awais Belal
The patch has been picked up from libxcb git and is only
applicable to v1.10 while it gets fixed in mainstream v1.11.
http://cgit.freedesktop.org/xcb/libxcb/commit/?id=be0fe56c3bcad5124dcc6c47a2fad01acd16f71a

Signed-off-by: Awais Belal awais_be...@mentor.com
---
 ...owns-socket-and-no-other-threads-are-writ.patch |  121 
 meta/recipes-graphics/xorg-lib/libxcb_1.10.bb  |3 +
 2 files changed, 124 insertions(+)
 create mode 100644 
meta/recipes-graphics/xorg-lib/libxcb/ensure-xcb-owns-socket-and-no-other-threads-are-writ.patch

diff --git 
a/meta/recipes-graphics/xorg-lib/libxcb/ensure-xcb-owns-socket-and-no-other-threads-are-writ.patch
 
b/meta/recipes-graphics/xorg-lib/libxcb/ensure-xcb-owns-socket-and-no-other-threads-are-writ.patch
new file mode 100644
index 000..14cefa3
--- /dev/null
+++ 
b/meta/recipes-graphics/xorg-lib/libxcb/ensure-xcb-owns-socket-and-no-other-threads-are-writ.patch
@@ -0,0 +1,121 @@
+From be0fe56c3bcad5124dcc6c47a2fad01acd16f71a Mon Sep 17 00:00:00 2001
+From: Keith Packard kei...@keithp.com
+Date: Mon, 23 Dec 2013 21:15:20 -0800
+Subject: [PATCH] Ensure xcb owns socket and no other threads are writing
+ before send_request
+
+send_request may only write to out.queue if no other thread is busy
+writing to the network (as that thread may be writing from out.queue).
+
+send_request may only allocate request sequence numbers if XCB owns
+the socket.
+
+Therefore, send_request must make sure that both conditions are true
+when it holds iolock, which can only be done by looping until both
+conditions are true without having dropped the lock waiting for the
+second condition.
+
+We choose to get the socket back from Xlib first as get_socket_back
+has a complicated test and checking for other threads writing is a
+simple in-lined check.
+
+This also changes the sequence number checks (64k requests with no
+reply, 4M request wrapping) to ensure that both conditions are true
+before queueing the request.
+
+Signed-off-by: Keith Packard kei...@keithp.com
+Reviewed-by: Uli Schlachter psyc...@znc.in
+---
+ src/xcb_out.c | 57 -
+ 1 file changed, 40 insertions(+), 17 deletions(-)
+
+diff --git a/src/xcb_out.c b/src/xcb_out.c
+index 18bb5f9..dc42954 100644
+--- a/src/xcb_out.c
 b/src/xcb_out.c
+@@ -103,6 +103,33 @@ static void get_socket_back(xcb_connection_t *c)
+ _xcb_in_replies_done(c);
+ }
+ 
++static void prepare_socket_request(xcb_connection_t *c)
++{
++/* We're about to append data to out.queue, so we need to
++ * atomically test for an external socket owner *and* some other
++ * thread currently writing.
++ *
++ * If we have an external socket owner, we have to get the socket back
++ * before we can use it again.
++ *
++ * If some other thread is writing to the socket, we assume it's
++ * writing from out.queue, and so we can't stick data there.
++ *
++ * We satisfy this condition by first calling get_socket_back
++ * (which may drop the lock, but will return when XCB owns the
++ * socket again) and then checking for another writing thread and
++ * escaping the loop if we're ready to go.
++ */
++for (;;) {
++if(c-has_error)
++return;
++get_socket_back(c);
++if (!c-out.writing)
++break;
++pthread_cond_wait(c-out.cond, c-iolock);
++}
++}
++
+ /* Public interface */
+ 
+ void xcb_prefetch_maximum_request_length(xcb_connection_t *c)
+@@ -236,24 +263,23 @@ unsigned int xcb_send_request(xcb_connection_t *c, int 
flags, struct iovec *vect
+ 
+ /* get a sequence number and arrange for delivery. */
+ pthread_mutex_lock(c-iolock);
+-/* wait for other writing threads to get out of my way. */
+-while(c-out.writing)
+-pthread_cond_wait(c-out.cond, c-iolock);
+-get_socket_back(c);
++
++prepare_socket_request(c);
+ 
+ /* send GetInputFocus (sync_req) when 64k-2 requests have been sent 
without
+- * a reply. */
+-if(req-isvoid  c-out.request == c-in.request_expected + (1  16) - 
2)
+-send_sync(c);
+-/* Also send sync_req (could use NoOp) at 32-bit wrap to avoid having
++ * a reply.
++ * Also send sync_req (could use NoOp) at 32-bit wrap to avoid having
+  * applications see sequence 0 as that is used to indicate
+- * an error in sending the request */
+-if((unsigned int) (c-out.request + 1) == 0)
++ * an error in sending the request
++ */
++ 
++while ((req-isvoid  c-out.request == c-in.request_expected + (1  
16) - 2) ||
++   (unsigned int) (c-out.request + 1) == 0)
++{
+ send_sync(c);
++prepare_socket_request(c);
++}
+ 
+-/* The above send_sync calls could drop the I/O lock, but this
+- * thread will still exclude any other thread that tries to write,
+- * so the sequence number postconditions still hold. */
+ send_request(c, req-isvoid, workaround

[OE-core] [PATCH] gstreamer1.0-libav: specify proper cross-prefix

2014-12-05 Thread Awais Belal
This avoids a compile failure locating ranlib by providing
the correct cross-prefix for build.

Signed-off-by: Drew Moseley drew_mose...@mentor.com
Signed-off-by: Awais Belal awais_be...@mentor.com
---
 .../gstreamer/gstreamer1.0-libav_1.4.1.bb  |3 ++-
 .../gstreamer/gstreamer1.0-libav_git.bb|3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.1.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.1.bb
index 8bba831..f962ff0 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.1.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.1.bb
@@ -18,7 +18,8 @@ SRC_URI[sha256sum] = 
fc125521187fa84f3210269a0eecc51f8a856802f1ca4bb251f118dab9
 LIBAV_EXTRA_CONFIGURE_COMMON_ARG = --target-os=linux \
   --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
   --ranlib='${RANLIB}' \
-  ${GSTREAMER_1_0_DEBUG}
+  ${GSTREAMER_1_0_DEBUG} \
+  --cross-prefix='${HOST_PREFIX}'
 
 S = ${WORKDIR}/gst-libav-${PV}
 
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
index 5ce28cc..aa2de69 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
@@ -18,7 +18,8 @@ SRCREV = 127202d6f65584891dabf92be031f0d170b0e7f1
 
 LIBAV_EXTRA_CONFIGURE_COMMON_ARG = --target-os=linux \
   --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
-  ${GSTREAMER_1_0_DEBUG}
+  ${GSTREAMER_1_0_DEBUG} \
+  --cross-prefix='${HOST_PREFIX}'
 
 do_configure() {
./autogen.sh --noconfigure
-- 
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core