mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 0/2] kernel image generation extensions
@ 2016-11-28 10:21 Alexander Dahl
  2016-11-28 10:21 ` [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage Alexander Dahl
  2016-11-28 10:21 ` [ptxdist] [PATCH 2/2] image_kernel: new options for "appended DT" images Alexander Dahl
  0 siblings, 2 replies; 10+ messages in thread
From: Alexander Dahl @ 2016-11-28 10:21 UTC (permalink / raw)
  To: ptxdist

Hei hei,

for an older at91sam9g20 based platform I recently updated the kernel
from ancient without DT to 4.x with DT. This patch series has two
patches. The first is quite small and I consider it useful for
everybody. The second depends on the first and covers a special
usecase and may not be of common interest.  I put it here anyway
because it at least shows how I extended the kernel image generation
rules. ;-)

Greets
Alex

Alexander Dahl (2):
  kernel: pass loadaddr for building uImage
  image_kernel: new options for "appended DT" images

 platforms/image_kernel.in    | 26 ++++++++++++++++++++++++++
 platforms/kernel.in          |  7 +++++++
 rules/kernel.make            | 11 +++++++++++
 rules/post/image_kernel.make | 32 ++++++++++++++++++++++++++++++++
 4 files changed, 76 insertions(+)

-- 
2.1.4


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage
  2016-11-28 10:21 [ptxdist] [PATCH 0/2] kernel image generation extensions Alexander Dahl
@ 2016-11-28 10:21 ` Alexander Dahl
  2016-11-28 16:46   ` Michael Olbrich
  2016-11-28 10:21 ` [ptxdist] [PATCH 2/2] image_kernel: new options for "appended DT" images Alexander Dahl
  1 sibling, 1 reply; 10+ messages in thread
From: Alexander Dahl @ 2016-11-28 10:21 UTC (permalink / raw)
  To: ptxdist

On newer kernels (4.x ?) kernel build fails when building an uImage
unless you provide LOADADDR as kernel make var, which is put in the
resulting uImage header. You could append it to
PTXCONF_KERNEL_EXTRA_MAKEVARS but this would be just a workaround. This
patch extends the menu if uImage is selected so you can directly input
the desired address.

Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 platforms/kernel.in | 7 +++++++
 rules/kernel.make   | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/platforms/kernel.in b/platforms/kernel.in
index fd1c492..2a00122 100644
--- a/platforms/kernel.in
+++ b/platforms/kernel.in
@@ -213,6 +213,13 @@ config KERNEL_IMAGE
 config KERNEL_DTC
 	bool
 
+config KERNEL_LOADADDR
+	hex
+	prompt "uImage load address"
+	depends on KERNEL_IMAGE_U
+	help
+	  Newer kernels want this passed if you build an uImage.
+
 config KERNEL_XZ
 	prompt "build xz-utils hosttool"
 	bool
diff --git a/rules/kernel.make b/rules/kernel.make
index d02a69c..3270231 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -71,6 +71,11 @@ KERNEL_MAKEVARS += \
 	DEPMOD=$(PTXCONF_SYSROOT_HOST)/sbin/depmod
 endif
 
+ifdef PTXCONF_KERNEL_IMAGE_U
+KERNEL_MAKEVARS += \
+	LOADADDR=$(PTXCONF_KERNEL_LOADADDR)
+endif
+
 #
 # Make the build more predictable if $(KERNEL_DIR) is not a symlink
 #
-- 
2.1.4


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 2/2] image_kernel: new options for "appended DT" images
  2016-11-28 10:21 [ptxdist] [PATCH 0/2] kernel image generation extensions Alexander Dahl
  2016-11-28 10:21 ` [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage Alexander Dahl
@ 2016-11-28 10:21 ` Alexander Dahl
  1 sibling, 0 replies; 10+ messages in thread
From: Alexander Dahl @ 2016-11-28 10:21 UTC (permalink / raw)
  To: ptxdist

On a platform where we can not load a separate device tree binary blob
with the old bootloader we use the kernel option
CONFIG_ARM_APPENDED_DTB to load the DT blob. This requires creating a
zImage, concatenate the dtb file and put this back to an uImage. This
patch extends the image generation rules so this is possible
automatically with just a few options in the menu.

Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 platforms/image_kernel.in    | 26 ++++++++++++++++++++++++++
 platforms/kernel.in          |  2 +-
 rules/kernel.make            |  6 ++++++
 rules/post/image_kernel.make | 32 ++++++++++++++++++++++++++++++++
 4 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/platforms/image_kernel.in b/platforms/image_kernel.in
index 1f32576..e7928b3 100644
--- a/platforms/image_kernel.in
+++ b/platforms/image_kernel.in
@@ -44,4 +44,30 @@ config IMAGE_KERNEL_LZOP_EXTRA_ARGS
 	string
 	prompt "extra arguments passed to the lzop command"
 
+menuconfig IMAGE_KERNEL_APPENDED_DTB_ZIMAGE
+	bool
+	prompt "Generate image with appended DT blob"
+	depends on DTC
+	depends on KERNEL_IMAGE_Z
+	help
+	  Old bootloaders may not be able load a separate device tree binary
+	  blob, so the kernel offers the option CONFIG_ARM_APPENDED_DTB to
+	  append the dtb directly to a zImage and load it from there.
+
+config IMAGE_KERNEL_APPENDED_DTB_FILE
+	string
+	prompt "dtb filename"
+	depends on IMAGE_KERNEL_APPENDED_DTB_ZIMAGE
+	help
+	  You can build several dtb files, but it only makes sense to
+	  concatenate one to the kernel image. Enter the filename here!
+
+config IMAGE_KERNEL_APPENDED_DTB_UIMAGE
+	bool
+	prompt "additional uImage"
+	depends on IMAGE_KERNEL_APPENDED_DTB_ZIMAGE
+	select HOST_U_BOOT_TOOLS
+	help
+	  Make a uImage from the concatenated zImage/dtb file.
+
 endif
diff --git a/platforms/kernel.in b/platforms/kernel.in
index 2a00122..0a894b2 100644
--- a/platforms/kernel.in
+++ b/platforms/kernel.in
@@ -216,7 +216,7 @@ config KERNEL_DTC
 config KERNEL_LOADADDR
 	hex
 	prompt "uImage load address"
-	depends on KERNEL_IMAGE_U
+	depends on KERNEL_IMAGE_U || IMAGE_KERNEL_APPENDED_DTB_UIMAGE
 	help
 	  Newer kernels want this passed if you build an uImage.
 
diff --git a/rules/kernel.make b/rules/kernel.make
index 3270231..dc1e240 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -280,6 +280,12 @@ $(STATEDIR)/kernel.targetinstall.post: $(IMAGEDIR)/linuximage
 ifdef PTXCONF_IMAGE_KERNEL_LZOP
 $(STATEDIR)/kernel.targetinstall.post: $(IMAGEDIR)/linuximage.lzo
 endif
+ifdef PTXCONF_IMAGE_KERNEL_APPENDED_DTB_ZIMAGE
+$(STATEDIR)/kernel.targetinstall.post: $(IMAGEDIR)/linux_dtb.zImage
+endif
+ifdef PTXCONF_IMAGE_KERNEL_APPENDED_DTB_UIMAGE
+$(STATEDIR)/kernel.targetinstall.post: $(IMAGEDIR)/linux_dtb.uImage
+endif
 endif
 
 $(STATEDIR)/kernel.targetinstall.post:
diff --git a/rules/post/image_kernel.make b/rules/post/image_kernel.make
index a401d71..402b743 100644
--- a/rules/post/image_kernel.make
+++ b/rules/post/image_kernel.make
@@ -10,6 +10,8 @@
 
 SEL_ROOTFS-$(PTXCONF_IMAGE_KERNEL) += $(IMAGEDIR)/linuximage
 SEL_ROOTFS-$(PTXCONF_IMAGE_KERNEL_LZOP) += $(IMAGEDIR)/linuximage.lzo
+SEL_ROOTFS-$(PTXCONF_IMAGE_KERNEL_APPENDED_DTB_ZIMAGE) += $(IMAGEDIR)/linux_dtb.zImage
+SEL_ROOTFS-$(PTXCONF_IMAGE_KERNEL_APPENDED_DTB_UIMAGE) += $(IMAGEDIR)/linux_dtb.uImage
 
 ifdef PTXCONF_IMAGE_KERNEL_INITRAMFS
 $(IMAGEDIR)/linuximage: $(STATEDIR)/image_kernel.compile
@@ -33,4 +35,34 @@ $(IMAGEDIR)/linuximage.lzo: $(IMAGEDIR)/linuximage
 	@lzop -f $(call remove_quotes,$(PTXCONF_IMAGE_KERNEL_LZOP_EXTRA_ARGS)) -c "$(<)" > "$(@)"
 	@echo "done."
 
+$(IMAGEDIR)/linux_dtb.zImage: $(IMAGEDIR)/linuximage $(STATEDIR)/dtc.targetinstall
+	@echo -n "Creating '$(notdir $(@))' from '$(notdir $(<))' ..."
+	@cat "$(<)" "$(IMAGEDIR)/$(call remove_quotes,$(PTXCONF_IMAGE_KERNEL_APPENDED_DTB_FILE))" > "$(@)"
+	@echo ' done.'
+
+#
+# Create architecture type for mkimage
+# Most architectures are working with label $(PTXCONF_ARCH_STRING)
+# but the i386 family needs "x86" instead!
+#
+ifeq ($(PTXCONF_ARCH_STRING),"i386")
+MKIMAGE_ARCH := x86
+else
+MKIMAGE_ARCH := $(PTXCONF_ARCH_STRING)
+endif
+
+$(IMAGEDIR)/linux_dtb.uImage: $(IMAGEDIR)/linux_dtb.zImage
+	@echo "Creating '$(notdir $(@))' from '$(notdir $(<))' ..."
+	@$(PTXCONF_SYSROOT_HOST)/bin/mkimage \
+			-A $(MKIMAGE_ARCH) \
+			-O linux \
+			-T kernel \
+			-C none \
+			-a $(PTXCONF_KERNEL_LOADADDR) \
+			-e $(PTXCONF_KERNEL_LOADADDR) \
+			-n "Linux-$(KERNEL_VERSION)" \
+			-d "$(<)" \
+			"$(@)"
+	@echo 'Done.'
+
 # vim: syntax=make
-- 
2.1.4


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage
  2016-11-28 10:21 ` [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage Alexander Dahl
@ 2016-11-28 16:46   ` Michael Olbrich
  2016-11-29  9:04     ` Marc Kleine-Budde
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Olbrich @ 2016-11-28 16:46 UTC (permalink / raw)
  To: ptxdist; +Cc: Marc Kleine-Budde

On Mon, Nov 28, 2016 at 11:21:31AM +0100, Alexander Dahl wrote:
> On newer kernels (4.x ?) kernel build fails when building an uImage
> unless you provide LOADADDR as kernel make var, which is put in the
> resulting uImage header. You could append it to
> PTXCONF_KERNEL_EXTRA_MAKEVARS but this would be just a workaround. This
> patch extends the menu if uImage is selected so you can directly input
> the desired address.

I don't have a lot of experience with uImages. Marc, what do you think?

> Signed-off-by: Alexander Dahl <post@lespocky.de>
> ---
>  platforms/kernel.in | 7 +++++++
>  rules/kernel.make   | 5 +++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/platforms/kernel.in b/platforms/kernel.in
> index fd1c492..2a00122 100644
> --- a/platforms/kernel.in
> +++ b/platforms/kernel.in
> @@ -213,6 +213,13 @@ config KERNEL_IMAGE
>  config KERNEL_DTC
>  	bool
>  
> +config KERNEL_LOADADDR
> +	hex
> +	prompt "uImage load address"
> +	depends on KERNEL_IMAGE_U
> +	help
> +	  Newer kernels want this passed if you build an uImage.
> +

This should be right after the image selection.

Michael

>  config KERNEL_XZ
>  	prompt "build xz-utils hosttool"
>  	bool
> diff --git a/rules/kernel.make b/rules/kernel.make
> index d02a69c..3270231 100644
> --- a/rules/kernel.make
> +++ b/rules/kernel.make
> @@ -71,6 +71,11 @@ KERNEL_MAKEVARS += \
>  	DEPMOD=$(PTXCONF_SYSROOT_HOST)/sbin/depmod
>  endif
>  
> +ifdef PTXCONF_KERNEL_IMAGE_U
> +KERNEL_MAKEVARS += \
> +	LOADADDR=$(PTXCONF_KERNEL_LOADADDR)
> +endif
> +
>  #
>  # Make the build more predictable if $(KERNEL_DIR) is not a symlink
>  #
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage
  2016-11-28 16:46   ` Michael Olbrich
@ 2016-11-29  9:04     ` Marc Kleine-Budde
  2016-11-29  9:12       ` Michael Olbrich
                         ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Marc Kleine-Budde @ 2016-11-29  9:04 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1.1: Type: text/plain, Size: 2269 bytes --]

On 11/28/2016 05:46 PM, Michael Olbrich wrote:
> On Mon, Nov 28, 2016 at 11:21:31AM +0100, Alexander Dahl wrote:
>> On newer kernels (4.x ?) kernel build fails when building an uImage
>> unless you provide LOADADDR as kernel make var, which is put in the
>> resulting uImage header. You could append it to
>> PTXCONF_KERNEL_EXTRA_MAKEVARS but this would be just a workaround. This
>> patch extends the menu if uImage is selected so you can directly input
>> the desired address.
> 
> I don't have a lot of experience with uImages. Marc, what do you think?

According to rmk uimages are considered obsolete. However there are
probably some old bootloaders around that insist of that format.

>> Signed-off-by: Alexander Dahl <post@lespocky.de>
>> ---
>>  platforms/kernel.in | 7 +++++++
>>  rules/kernel.make   | 5 +++++
>>  2 files changed, 12 insertions(+)
>>
>> diff --git a/platforms/kernel.in b/platforms/kernel.in
>> index fd1c492..2a00122 100644
>> --- a/platforms/kernel.in
>> +++ b/platforms/kernel.in
>> @@ -213,6 +213,13 @@ config KERNEL_IMAGE
>>  config KERNEL_DTC
>>  	bool
>>  
>> +config KERNEL_LOADADDR
>> +	hex
>> +	prompt "uImage load address"
>> +	depends on KERNEL_IMAGE_U
>> +	help
>> +	  Newer kernels want this passed if you build an uImage.
>> +
> 
> This should be right after the image selection.
> 
> Michael
> 
>>  config KERNEL_XZ
>>  	prompt "build xz-utils hosttool"
>>  	bool
>> diff --git a/rules/kernel.make b/rules/kernel.make
>> index d02a69c..3270231 100644
>> --- a/rules/kernel.make
>> +++ b/rules/kernel.make
>> @@ -71,6 +71,11 @@ KERNEL_MAKEVARS += \
>>  	DEPMOD=$(PTXCONF_SYSROOT_HOST)/sbin/depmod
>>  endif
>>  
>> +ifdef PTXCONF_KERNEL_IMAGE_U
>> +KERNEL_MAKEVARS += \
>> +	LOADADDR=$(PTXCONF_KERNEL_LOADADDR)
>> +endif
>> +

What happens if you build a older kernel and don't configure
PTXCONF_KERNEL_LOADADDR via ptxdist? Does it break while it used to work
with an older ptxdist?

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage
  2016-11-29  9:04     ` Marc Kleine-Budde
@ 2016-11-29  9:12       ` Michael Olbrich
  2016-11-29  9:18       ` Uwe Kleine-König
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Michael Olbrich @ 2016-11-29  9:12 UTC (permalink / raw)
  To: ptxdist

On Tue, Nov 29, 2016 at 10:04:19AM +0100, Marc Kleine-Budde wrote:
> On 11/28/2016 05:46 PM, Michael Olbrich wrote:
> > On Mon, Nov 28, 2016 at 11:21:31AM +0100, Alexander Dahl wrote:
> >> On newer kernels (4.x ?) kernel build fails when building an uImage
> >> unless you provide LOADADDR as kernel make var, which is put in the
> >> resulting uImage header. You could append it to
> >> PTXCONF_KERNEL_EXTRA_MAKEVARS but this would be just a workaround. This
> >> patch extends the menu if uImage is selected so you can directly input
> >> the desired address.
> > 
> > I don't have a lot of experience with uImages. Marc, what do you think?
> 
> According to rmk uimages are considered obsolete. However there are
> probably some old bootloaders around that insist of that format.
> 
> >> Signed-off-by: Alexander Dahl <post@lespocky.de>
> >> ---
> >>  platforms/kernel.in | 7 +++++++
> >>  rules/kernel.make   | 5 +++++
> >>  2 files changed, 12 insertions(+)
> >>
> >> diff --git a/platforms/kernel.in b/platforms/kernel.in
> >> index fd1c492..2a00122 100644
> >> --- a/platforms/kernel.in
> >> +++ b/platforms/kernel.in
> >> @@ -213,6 +213,13 @@ config KERNEL_IMAGE
> >>  config KERNEL_DTC
> >>  	bool
> >>  
> >> +config KERNEL_LOADADDR
> >> +	hex
> >> +	prompt "uImage load address"
> >> +	depends on KERNEL_IMAGE_U
> >> +	help
> >> +	  Newer kernels want this passed if you build an uImage.
> >> +
> > 
> > This should be right after the image selection.
> > 
> > Michael
> > 
> >>  config KERNEL_XZ
> >>  	prompt "build xz-utils hosttool"
> >>  	bool
> >> diff --git a/rules/kernel.make b/rules/kernel.make
> >> index d02a69c..3270231 100644
> >> --- a/rules/kernel.make
> >> +++ b/rules/kernel.make
> >> @@ -71,6 +71,11 @@ KERNEL_MAKEVARS += \
> >>  	DEPMOD=$(PTXCONF_SYSROOT_HOST)/sbin/depmod
> >>  endif
> >>  
> >> +ifdef PTXCONF_KERNEL_IMAGE_U
> >> +KERNEL_MAKEVARS += \
> >> +	LOADADDR=$(PTXCONF_KERNEL_LOADADDR)
> >> +endif
> >> +
> 
> What happens if you build a older kernel and don't configure
> PTXCONF_KERNEL_LOADADDR via ptxdist? Does it break while it used to work
> with an older ptxdist?

We should add an 'empty' check. And the help text should include the kernel
version that introduced this requirement.

Michael


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage
  2016-11-29  9:04     ` Marc Kleine-Budde
  2016-11-29  9:12       ` Michael Olbrich
@ 2016-11-29  9:18       ` Uwe Kleine-König
  2016-11-29  9:21       ` Alexander Stein
  2016-11-30 10:06       ` Alexander Dahl
  3 siblings, 0 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2016-11-29  9:18 UTC (permalink / raw)
  To: ptxdist

On Tue, Nov 29, 2016 at 10:04:19AM +0100, Marc Kleine-Budde wrote:
> What happens if you build a older kernel and don't configure
> PTXCONF_KERNEL_LOADADDR via ptxdist? Does it break while it used to work
> with an older ptxdist?

Passing LOADADDR is necessary since Linux commit 
938f94cde74b ("ARM: 7656/1: uImage: Error out on build of multiplatform without LOADADDR")

The first release including this one is v3.9-rc1.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage
  2016-11-29  9:04     ` Marc Kleine-Budde
  2016-11-29  9:12       ` Michael Olbrich
  2016-11-29  9:18       ` Uwe Kleine-König
@ 2016-11-29  9:21       ` Alexander Stein
  2016-11-29  9:23         ` Marc Kleine-Budde
  2016-11-30 10:06       ` Alexander Dahl
  3 siblings, 1 reply; 10+ messages in thread
From: Alexander Stein @ 2016-11-29  9:21 UTC (permalink / raw)
  To: ptxdist; +Cc: Marc Kleine-Budde

On Tuesday 29 November 2016 10:04:19, Marc Kleine-Budde wrote:
> On 11/28/2016 05:46 PM, Michael Olbrich wrote:
> > On Mon, Nov 28, 2016 at 11:21:31AM +0100, Alexander Dahl wrote:
> >> On newer kernels (4.x ?) kernel build fails when building an uImage
> >> unless you provide LOADADDR as kernel make var, which is put in the
> >> resulting uImage header. You could append it to
> >> PTXCONF_KERNEL_EXTRA_MAKEVARS but this would be just a workaround. This
> >> patch extends the menu if uImage is selected so you can directly input
> >> the desired address.
> > 
> > I don't have a lot of experience with uImages. Marc, what do you think?
> 
> According to rmk uimages are considered obsolete. However there are
> probably some old bootloaders around that insist of that format.

What image format is the successor then? Or which should be used instead?

Best regards,
Alexander
-- 
Dipl.-Inf. Alexander Stein
SYS TEC electronic GmbH
alexander.stein@systec-electronic.com

Legal and Commercial Address:
Am Windrad 2
08468 Heinsdorfergrund
Germany

Office: +49 (0) 3765 38600-0
Fax:    +49 (0) 3765 38600-4100
 
Managing Directors:
	Director Technology/CEO: Dipl.-Phys. Siegmar Schmidt;
	Director Commercial Affairs/COO: Dipl. Ing. (FH) Armin von Collrepp
Commercial Registry:
	Amtsgericht Chemnitz, HRB 28082; USt.-Id Nr. DE150534010


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage
  2016-11-29  9:21       ` Alexander Stein
@ 2016-11-29  9:23         ` Marc Kleine-Budde
  0 siblings, 0 replies; 10+ messages in thread
From: Marc Kleine-Budde @ 2016-11-29  9:23 UTC (permalink / raw)
  To: Alexander Stein, ptxdist


[-- Attachment #1.1.1: Type: text/plain, Size: 1221 bytes --]

On 11/29/2016 10:21 AM, Alexander Stein wrote:
> On Tuesday 29 November 2016 10:04:19, Marc Kleine-Budde wrote:
>> On 11/28/2016 05:46 PM, Michael Olbrich wrote:
>>> On Mon, Nov 28, 2016 at 11:21:31AM +0100, Alexander Dahl wrote:
>>>> On newer kernels (4.x ?) kernel build fails when building an uImage
>>>> unless you provide LOADADDR as kernel make var, which is put in the
>>>> resulting uImage header. You could append it to
>>>> PTXCONF_KERNEL_EXTRA_MAKEVARS but this would be just a workaround. This
>>>> patch extends the menu if uImage is selected so you can directly input
>>>> the desired address.
>>>
>>> I don't have a lot of experience with uImages. Marc, what do you think?
>>
>> According to rmk uimages are considered obsolete. However there are
>> probably some old bootloaders around that insist of that format.
> 
> What image format is the successor then? Or which should be used instead?

zImage

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage
  2016-11-29  9:04     ` Marc Kleine-Budde
                         ` (2 preceding siblings ...)
  2016-11-29  9:21       ` Alexander Stein
@ 2016-11-30 10:06       ` Alexander Dahl
  3 siblings, 0 replies; 10+ messages in thread
From: Alexander Dahl @ 2016-11-30 10:06 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1420 bytes --]

Hei hei,

On Tue, Nov 29, 2016 at 10:04:19AM +0100, Marc Kleine-Budde wrote:
> What happens if you build a older kernel and don't configure
> PTXCONF_KERNEL_LOADADDR via ptxdist? Does it break while it used to work
> with an older ptxdist?

If I understood you correctly, that's not the case. Older kernels
don't need this passed, but somehow determine it. For example with
ptxdist 2015.10 and kernel 2.6.36.4 for at91sam9g20ek the loadaddr in
the final uImage is 0x20008000. The code for generating the image is
in arch/arm/boot/Makefile but I could not find out, where the actual
address comes from, if I don't pass LOADADDR. If I pass it (e.g. with
the backported patch) the address I pass is used (tried this with
another address).

So while LOADADDR needs to be passed for newer kernels, the build is
successful on older kernels with or without passing LOADADDR. Without
it is somehow determined by the kernel make files I suppose. When
passing LOADADDR the result is the same as for newer kernels.

Does this answer your question?

Í'm not sure how the patch would have to be extended, though.

Greets
Alex

-- 
»With the first link, the chain is forged. The first speech censured, 
the first thought forbidden, the first freedom denied, chains us all 
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: C28E E6B9 0263 95CF 8FAF  08FA 34AD CD00 7221 5CC6 ***

[-- Attachment #1.2: Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2016-11-30 10:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-28 10:21 [ptxdist] [PATCH 0/2] kernel image generation extensions Alexander Dahl
2016-11-28 10:21 ` [ptxdist] [PATCH 1/2] kernel: pass loadaddr for building uImage Alexander Dahl
2016-11-28 16:46   ` Michael Olbrich
2016-11-29  9:04     ` Marc Kleine-Budde
2016-11-29  9:12       ` Michael Olbrich
2016-11-29  9:18       ` Uwe Kleine-König
2016-11-29  9:21       ` Alexander Stein
2016-11-29  9:23         ` Marc Kleine-Budde
2016-11-30 10:06       ` Alexander Dahl
2016-11-28 10:21 ` [ptxdist] [PATCH 2/2] image_kernel: new options for "appended DT" images Alexander Dahl

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