public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/4] arm64-related fixes & more
@ 2018-08-27  7:19 Jan Kiszka
  2018-08-27  7:19 ` [PATCH 1/4] u-boot-script: Fix bashism Jan Kiszka
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Jan Kiszka @ 2018-08-27  7:19 UTC (permalink / raw)
  To: isar-users

See patches for details.

Patch 1 obsoletes the previously sent version of it. The only change is
the corrected subject line.

Jan

Jan Kiszka (4):
  u-boot-script: Fix bashism
  u-boot-script: Fix root partition detection
  linux-custom: Use uncompressed kernel image on arm64
  buildchroot: Pass -I down to dpkg-source

 meta/recipes-bsp/u-boot-script/files/update-u-boot-script | 4 ++--
 meta/recipes-devtools/buildchroot/files/build.sh          | 2 +-
 meta/recipes-kernel/linux/files/build-kernel.sh           | 7 +++++++
 3 files changed, 10 insertions(+), 3 deletions(-)

-- 
2.16.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/4] u-boot-script: Fix bashism
  2018-08-27  7:19 [PATCH 0/4] arm64-related fixes & more Jan Kiszka
@ 2018-08-27  7:19 ` Jan Kiszka
  2018-08-27  7:19 ` [PATCH 2/4] u-boot-script: Fix root partition detection Jan Kiszka
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Jan Kiszka @ 2018-08-27  7:19 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

This prevented correct detection of aarch64 targets.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-bsp/u-boot-script/files/update-u-boot-script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
index ebdc0d5..bd7a014 100755
--- a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
+++ b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
@@ -46,7 +46,7 @@ yes|1)
 esac
 
 BOOT="bootz"
-if [ "$(uname -m)" == "aarch64" ]; then
+if [ "$(uname -m)" = "aarch64" ]; then
 	BOOT="booti"
 fi
 
-- 
2.16.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/4] u-boot-script: Fix root partition detection
  2018-08-27  7:19 [PATCH 0/4] arm64-related fixes & more Jan Kiszka
  2018-08-27  7:19 ` [PATCH 1/4] u-boot-script: Fix bashism Jan Kiszka
@ 2018-08-27  7:19 ` Jan Kiszka
  2018-08-27  7:19 ` [PATCH 3/4] linux-custom: Use uncompressed kernel image on arm64 Jan Kiszka
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Jan Kiszka @ 2018-08-27  7:19 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

A wrong variable name left ROOT_PART blank. This worked as long as this
was the first partition.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-bsp/u-boot-script/files/update-u-boot-script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
index bd7a014..c12c3ed 100755
--- a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
+++ b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
@@ -18,7 +18,7 @@ ROOT_DEV=$(egrep '^[^# 	]+[ 	]+/[ 	]' /etc/fstab | awk '{print $1}') \
 
 ROOT_PART="\${distro_bootpart}"
 if [ -n "${ROOT_DEV}" ]; then
-	ROOT_PART=$(echo ${DEV} | sed 's/.*[^0-9]\([0-9]*\)$/\1/')
+	ROOT_PART=$(echo ${ROOT_DEV} | sed 's/.*[^0-9]\([0-9]*\)$/\1/')
 fi
 
 BOOT_CMD=$(mktemp)
-- 
2.16.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3/4] linux-custom: Use uncompressed kernel image on arm64
  2018-08-27  7:19 [PATCH 0/4] arm64-related fixes & more Jan Kiszka
  2018-08-27  7:19 ` [PATCH 1/4] u-boot-script: Fix bashism Jan Kiszka
  2018-08-27  7:19 ` [PATCH 2/4] u-boot-script: Fix root partition detection Jan Kiszka
@ 2018-08-27  7:19 ` Jan Kiszka
  2018-08-27  8:29   ` Henning Schild
  2018-08-27 13:45   ` [PATCH v2 " Jan Kiszka
  2018-08-27  7:19 ` [PATCH 4/4] buildchroot: Pass -I down to dpkg-source Jan Kiszka
  2018-08-28 12:15 ` [PATCH 0/4] arm64-related fixes & more Maxim Yu. Osipov
  4 siblings, 2 replies; 10+ messages in thread
From: Jan Kiszka @ 2018-08-27  7:19 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

U-Boot does not directly support decompression on bootloader side like
Image.gz would require. We would have to enable the unzip command and
write special scripts that perform the decompression prior to calling
booti. As the Debian kernel also comes uncompressed, choose that path
instead.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-kernel/linux/files/build-kernel.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
index 8b58e93..ef30aea 100644
--- a/meta/recipes-kernel/linux/files/build-kernel.sh
+++ b/meta/recipes-kernel/linux/files/build-kernel.sh
@@ -95,6 +95,13 @@ if [ \"\$1\" != upgrade ] && command -v linux-update-symlinks >/dev/null; then\\
 	linux-update-symlinks remove ${PV}  /boot/vmlinuz-${PV}\\
 fi"
 
+# Make sure arm64 kernels are decompressed
+if [ "$target_arch" = "arm64" ]; then
+	vmlinuz=${REPACK_LINUX_IMAGE_DIR}/boot/vmlinuz-${PV}
+	mv $vmlinuz $vmlinuz.gz
+	gunzip $vmlinuz
+fi
+
 dpkg-gencontrol -crepack/debian/control \
 	-lrepack/debian/changelog \
 	-frepack/debian/files \
-- 
2.16.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 4/4] buildchroot: Pass -I down to dpkg-source
  2018-08-27  7:19 [PATCH 0/4] arm64-related fixes & more Jan Kiszka
                   ` (2 preceding siblings ...)
  2018-08-27  7:19 ` [PATCH 3/4] linux-custom: Use uncompressed kernel image on arm64 Jan Kiszka
@ 2018-08-27  7:19 ` Jan Kiszka
  2018-08-28 12:15 ` [PATCH 0/4] arm64-related fixes & more Maxim Yu. Osipov
  4 siblings, 0 replies; 10+ messages in thread
From: Jan Kiszka @ 2018-08-27  7:19 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

When building the source package, exclude typical version control files
from archiving by passing -I to dpkg-source. This is needed as we may
have pulled the package source from git & Co.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-devtools/buildchroot/files/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/buildchroot/files/build.sh b/meta/recipes-devtools/buildchroot/files/build.sh
index e2dabab..d8633cc 100644
--- a/meta/recipes-devtools/buildchroot/files/build.sh
+++ b/meta/recipes-devtools/buildchroot/files/build.sh
@@ -61,4 +61,4 @@ for i in configure aclocal.m4 Makefile.am Makefile.in; do
 done
 
 # Build the package
-dpkg-buildpackage -a$target_arch -d
+dpkg-buildpackage -a$target_arch -d --source-option=-I
-- 
2.16.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/4] linux-custom: Use uncompressed kernel image on arm64
  2018-08-27  7:19 ` [PATCH 3/4] linux-custom: Use uncompressed kernel image on arm64 Jan Kiszka
@ 2018-08-27  8:29   ` Henning Schild
  2018-08-27  8:31     ` Jan Kiszka
  2018-08-27 13:45   ` [PATCH v2 " Jan Kiszka
  1 sibling, 1 reply; 10+ messages in thread
From: Henning Schild @ 2018-08-27  8:29 UTC (permalink / raw)
  To: [ext] Jan Kiszka; +Cc: isar-users

Am Mon, 27 Aug 2018 09:19:54 +0200
schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:

> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> U-Boot does not directly support decompression on bootloader side like
> Image.gz would require. We would have to enable the unzip command and
> write special scripts that perform the decompression prior to calling
> booti. As the Debian kernel also comes uncompressed, choose that path
> instead.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  meta/recipes-kernel/linux/files/build-kernel.sh | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
> b/meta/recipes-kernel/linux/files/build-kernel.sh index
> 8b58e93..ef30aea 100644 ---
> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -95,6 +95,13 @@
> if [ \"\$1\" != upgrade ] && command -v linux-update-symlinks
> >/dev/null; then\\ linux-update-symlinks remove
> >${PV}  /boot/vmlinuz-${PV}\\ fi"
>  
> +# Make sure arm64 kernels are decompressed
> +if [ "$target_arch" = "arm64" ]; then
> +	vmlinuz=${REPACK_LINUX_IMAGE_DIR}/boot/vmlinuz-${PV}
> +	mv $vmlinuz $vmlinuz.gz
> +	gunzip $vmlinuz
> +fi

That looks weird. The gunzip should not work after the mv. And would is
the filename after the intended patch? If it still contains a "z", that
would be misleading.

Henning

>  dpkg-gencontrol -crepack/debian/control \
>  	-lrepack/debian/changelog \
>  	-frepack/debian/files \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/4] linux-custom: Use uncompressed kernel image on arm64
  2018-08-27  8:29   ` Henning Schild
@ 2018-08-27  8:31     ` Jan Kiszka
  2018-08-27 13:37       ` Jan Kiszka
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Kiszka @ 2018-08-27  8:31 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

On 2018-08-27 10:29, Henning Schild wrote:
> Am Mon, 27 Aug 2018 09:19:54 +0200
> schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:
> 
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> U-Boot does not directly support decompression on bootloader side like
>> Image.gz would require. We would have to enable the unzip command and
>> write special scripts that perform the decompression prior to calling
>> booti. As the Debian kernel also comes uncompressed, choose that path
>> instead.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>   meta/recipes-kernel/linux/files/build-kernel.sh | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
>> b/meta/recipes-kernel/linux/files/build-kernel.sh index
>> 8b58e93..ef30aea 100644 ---
>> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
>> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -95,6 +95,13 @@
>> if [ \"\$1\" != upgrade ] && command -v linux-update-symlinks
>>> /dev/null; then\\ linux-update-symlinks remove
>>> ${PV}  /boot/vmlinuz-${PV}\\ fi"
>>   
>> +# Make sure arm64 kernels are decompressed
>> +if [ "$target_arch" = "arm64" ]; then
>> +	vmlinuz=${REPACK_LINUX_IMAGE_DIR}/boot/vmlinuz-${PV}
>> +	mv $vmlinuz $vmlinuz.gz
>> +	gunzip $vmlinuz
>> +fi
> 
> That looks weird. The gunzip should not work after the mv. And would is
> the filename after the intended patch? If it still contains a "z", that
> would be misleading.

gunzip appends .gz. We maybe that also works explicitly, didn't test.

The filename follows Debian style, I douple-checked the upstream package.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/4] linux-custom: Use uncompressed kernel image on arm64
  2018-08-27  8:31     ` Jan Kiszka
@ 2018-08-27 13:37       ` Jan Kiszka
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Kiszka @ 2018-08-27 13:37 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

On 2018-08-27 10:31, [ext] Jan Kiszka wrote:
> On 2018-08-27 10:29, Henning Schild wrote:
>> Am Mon, 27 Aug 2018 09:19:54 +0200
>> schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:
>>
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> U-Boot does not directly support decompression on bootloader side like
>>> Image.gz would require. We would have to enable the unzip command and
>>> write special scripts that perform the decompression prior to calling
>>> booti. As the Debian kernel also comes uncompressed, choose that path
>>> instead.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>> ---
>>>   meta/recipes-kernel/linux/files/build-kernel.sh | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>>
>>> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
>>> b/meta/recipes-kernel/linux/files/build-kernel.sh index
>>> 8b58e93..ef30aea 100644 ---
>>> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
>>> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -95,6 +95,13 @@
>>> if [ \"\$1\" != upgrade ] && command -v linux-update-symlinks
>>>> /dev/null; then\\ linux-update-symlinks remove
>>>> ${PV}  /boot/vmlinuz-${PV}\\ fi"
>>> +# Make sure arm64 kernels are decompressed
>>> +if [ "$target_arch" = "arm64" ]; then
>>> +    vmlinuz=${REPACK_LINUX_IMAGE_DIR}/boot/vmlinuz-${PV}
>>> +    mv $vmlinuz $vmlinuz.gz
>>> +    gunzip $vmlinuz
>>> +fi
>>
>> That looks weird. The gunzip should not work after the mv. And would is
>> the filename after the intended patch? If it still contains a "z", that
>> would be misleading.
> 
> gunzip appends .gz. We maybe that also works explicitly, didn't test.

Of course, both variants work. Will send v2 which addresses $vmlinuz.gz 
explicitly.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 3/4] linux-custom: Use uncompressed kernel image on arm64
  2018-08-27  7:19 ` [PATCH 3/4] linux-custom: Use uncompressed kernel image on arm64 Jan Kiszka
  2018-08-27  8:29   ` Henning Schild
@ 2018-08-27 13:45   ` Jan Kiszka
  1 sibling, 0 replies; 10+ messages in thread
From: Jan Kiszka @ 2018-08-27 13:45 UTC (permalink / raw)
  To: isar-users

U-Boot does not directly support decompression on bootloader side like
Image.gz would require. We would have to enable the unzip command and
write special scripts that perform the decompression prior to calling
booti. As the Debian kernel also comes uncompressed, choose that path
instead.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Changes in v2:
 - "gunzip $vmlinuz.gz", to make the source clearer

 meta/recipes-kernel/linux/files/build-kernel.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
index 8b58e93..611d96f 100644
--- a/meta/recipes-kernel/linux/files/build-kernel.sh
+++ b/meta/recipes-kernel/linux/files/build-kernel.sh
@@ -95,6 +95,13 @@ if [ \"\$1\" != upgrade ] && command -v linux-update-symlinks >/dev/null; then\\
 	linux-update-symlinks remove ${PV}  /boot/vmlinuz-${PV}\\
 fi"
 
+# Make sure arm64 kernels are decompressed
+if [ "$target_arch" = "arm64" ]; then
+	vmlinuz=${REPACK_LINUX_IMAGE_DIR}/boot/vmlinuz-${PV}
+	mv $vmlinuz $vmlinuz.gz
+	gunzip $vmlinuz.gz
+fi
+
 dpkg-gencontrol -crepack/debian/control \
 	-lrepack/debian/changelog \
 	-frepack/debian/files \
-- 
2.16.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/4] arm64-related fixes & more
  2018-08-27  7:19 [PATCH 0/4] arm64-related fixes & more Jan Kiszka
                   ` (3 preceding siblings ...)
  2018-08-27  7:19 ` [PATCH 4/4] buildchroot: Pass -I down to dpkg-source Jan Kiszka
@ 2018-08-28 12:15 ` Maxim Yu. Osipov
  4 siblings, 0 replies; 10+ messages in thread
From: Maxim Yu. Osipov @ 2018-08-28 12:15 UTC (permalink / raw)
  To: Jan Kiszka, isar-users

On 08/27/2018 10:19 AM, Jan Kiszka wrote:
> See patches for details.
> 
> Patch 1 obsoletes the previously sent version of it. The only change is
> the corrected subject line.

Applied to the 'next'.
Patch 3 was substituted by its version 2.

Thanks,
Maxim.


> Jan
> 
> Jan Kiszka (4):
>    u-boot-script: Fix bashism
>    u-boot-script: Fix root partition detection
>    linux-custom: Use uncompressed kernel image on arm64
>    buildchroot: Pass -I down to dpkg-source
> 
>   meta/recipes-bsp/u-boot-script/files/update-u-boot-script | 4 ++--
>   meta/recipes-devtools/buildchroot/files/build.sh          | 2 +-
>   meta/recipes-kernel/linux/files/build-kernel.sh           | 7 +++++++
>   3 files changed, 10 insertions(+), 3 deletions(-)
> 


-- 
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-08-28 12:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-27  7:19 [PATCH 0/4] arm64-related fixes & more Jan Kiszka
2018-08-27  7:19 ` [PATCH 1/4] u-boot-script: Fix bashism Jan Kiszka
2018-08-27  7:19 ` [PATCH 2/4] u-boot-script: Fix root partition detection Jan Kiszka
2018-08-27  7:19 ` [PATCH 3/4] linux-custom: Use uncompressed kernel image on arm64 Jan Kiszka
2018-08-27  8:29   ` Henning Schild
2018-08-27  8:31     ` Jan Kiszka
2018-08-27 13:37       ` Jan Kiszka
2018-08-27 13:45   ` [PATCH v2 " Jan Kiszka
2018-08-27  7:19 ` [PATCH 4/4] buildchroot: Pass -I down to dpkg-source Jan Kiszka
2018-08-28 12:15 ` [PATCH 0/4] arm64-related fixes & more Maxim Yu. Osipov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox