Skip to contentSkip to conversation

kernel.bbclass: Remove bashism

PATCH In review Khem Raj 1 participant 2 messages Dec 12, 2014

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 kernel.bbclass: Remove bashism

Fixes build on systems using dash for default shell e.g.

errors like

run.do_strip.25842: [[: not found
| readelf: Error: Unable to read in 0x37 bytes of section headers | readelf: Error: Not an ELF file - it has the wrong magic bytes at the start

Change-Id I29cac15be44a02d75a3d6889b6ae9b2e19bf46af
---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
index f300fa3..4af9d15 100644
@@ -390,7 +390,7 @@ python split_kernel_packages () {
 
 do_strip() {
 	if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then
-		if [[ "${KERNEL_IMAGETYPE}" != "vmlinux" ]]; then
+		if [ "${KERNEL_IMAGETYPE}" != "vmlinux" ]; then
 			bbwarn "image type will not be stripped (not supported): ${KERNEL_IMAGETYPE}"
 			return
 		fi
Signature · 1 line
2.1.1
author
#1 lore raw

this needs back porting to dizzy as well

Quoted 32 lines · Khem Raj

Fixes build on systems using dash for default shell e.g.

errors like

run.do_strip.25842: [[: not found
| readelf: Error: Unable to read in 0x37 bytes of section headers | readelf: Error: Not an ELF file - it has the wrong magic bytes at the start

Change-Id I29cac15be44a02d75a3d6889b6ae9b2e19bf46af

---
meta/classes/kernel.bbclass | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
index f300fa3..4af9d15 100644
@@ -390,7 +390,7 @@ python split_kernel_packages () {
 
 do_strip() {
 	if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then
-		if [[ "${KERNEL_IMAGETYPE}" != "vmlinux" ]]; then
+		if [ "${KERNEL_IMAGETYPE}" != "vmlinux" ]; then
 			bbwarn "image type will not be stripped (not supported): ${KERNEL_IMAGETYPE}"
 			return
 		fi
Signature · 1 line
2.1.1