Patchwork [3/3] UBUNTU: auto-generate uImage file

login
register
mail settings
Submitter Bryan Wu
Date July 13, 2010, 3:22 a.m.
Message ID <1278991369-17962-4-git-send-email-bryan.wu@canonical.com>
Download mbox | patch
Permalink /patch/58701/
State Rejected
Delegated to: Tim Gardner
Headers show

Comments

Bryan Wu - July 13, 2010, 3:22 a.m.
From: Sebastien Jan <s-jan@ti.com>

Signed-off-by: Sebastien Jan <s-jan@ti.com>
---
 debian.ti-omap4/control.stub.in |    2 +-
 debian/rules.d/2-binary-arch.mk |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
Bryan Wu - July 13, 2010, 3:44 a.m.
On 07/13/2010 11:22 AM, Bryan Wu wrote:
> From: Sebastien Jan <s-jan@ti.com>
> 
> Signed-off-by: Sebastien Jan <s-jan@ti.com>
> ---
>  debian.ti-omap4/control.stub.in |    2 +-
>  debian/rules.d/2-binary-arch.mk |    6 ++++++
>  2 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/debian.ti-omap4/control.stub.in b/debian.ti-omap4/control.stub.in
> index 4762b55..9d5ba50 100644
> --- a/debian.ti-omap4/control.stub.in
> +++ b/debian.ti-omap4/control.stub.in
> @@ -3,7 +3,7 @@ Section: devel
>  Priority: optional
>  Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
>  Standards-Version: 3.6.1
> -Build-Depends: debhelper (>= 3), cpio, module-init-tools, kernel-wedge (>= 2.24ubuntu1), rsync
> +Build-Depends: debhelper (>= 3), cpio, module-init-tools, kernel-wedge (>= 2.24ubuntu1), rsync, uboot-mkimage
>  Build-Depends-Indep: xmlto, docbook-utils, gs, transfig, bzip2, sharutils
>  Build-Conflicts: findutils (= 4.4.1-1ubuntu1)
>  Vcs-Git: git://kernel.ubuntu.com/ubuntu/ubuntu-maverick.git
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 4f7b66d..bb4d49d 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -73,6 +73,12 @@ ifeq ($(no_dumpfile),)
>  	makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \
>  		-x $(builddir)/build-$*/vmlinux
>  endif
> +	# Generate uImage automatically out of the box
> +	mkimage -A arm -O linux -T kernel -C none -a 0x80008000 \
> +		-e 0x80008000 -n "Ubuntu Kernel" \
> +		-d $(pkgdir)/boot/$(install_file)-$(abi_release)-$* \
> +		$(pkgdir)/boot/uImage-$(abi_release)-$*
> +
>  

I'd like to say this patch is quit convenient for building ARM image for U-Boot.
But it contains sort of hard coded load address and entry address which are
specific for TI omap4 processor. It's not right to do that in our debian
packaging system.

How about using scripts/mkuboot.sh in kernel source tree?

And Oliver, when do you prepare uImage from vmlinuz file? I guess it is when we
installed the kernel package on ti-omap4 target, right?

Thanks,
Oliver Grawert - July 13, 2010, 7:36 a.m.
hi,
Am Dienstag, den 13.07.2010, 11:44 +0800 schrieb Bryan Wu:
> 
> I'd like to say this patch is quit convenient for building ARM image for U-Boot.
> But it contains sort of hard coded load address and entry address which are
> specific for TI omap4 processor. It's not right to do that in our debian
> packaging system.
> 
> How about using scripts/mkuboot.sh in kernel source tree?
> 
> And Oliver, when do you prepare uImage from vmlinuz file? I guess it is when we
> installed the kernel package on ti-omap4 target, right?
pleas dont do that, that means we need to special case flash-kernel for
that one platform, while flash-kernel generates uImage and uInitrd for
all others, just ship the vmlinuz binary as in all other linux packages,
flash-kernel is run on each update-initramfs run and will generate
uImage automatically together with uInitrd anyway.

ciao
	oli
Tim Gardner - July 15, 2010, 2:26 p.m.
On 07/13/2010 01:36 AM, Oliver Grawert wrote:
> hi,
> Am Dienstag, den 13.07.2010, 11:44 +0800 schrieb Bryan Wu:
>>
>> I'd like to say this patch is quit convenient for building ARM image for U-Boot.
>> But it contains sort of hard coded load address and entry address which are
>> specific for TI omap4 processor. It's not right to do that in our debian
>> packaging system.
>>
>> How about using scripts/mkuboot.sh in kernel source tree?
>>
>> And Oliver, when do you prepare uImage from vmlinuz file? I guess it is when we
>> installed the kernel package on ti-omap4 target, right?
> pleas dont do that, that means we need to special case flash-kernel for
> that one platform, while flash-kernel generates uImage and uInitrd for
> all others, just ship the vmlinuz binary as in all other linux packages,
> flash-kernel is run on each update-initramfs run and will generate
> uImage automatically together with uInitrd anyway.
>
> ciao
> 	oli
>

NAK'd as requested.

Patch

diff --git a/debian.ti-omap4/control.stub.in b/debian.ti-omap4/control.stub.in
index 4762b55..9d5ba50 100644
--- a/debian.ti-omap4/control.stub.in
+++ b/debian.ti-omap4/control.stub.in
@@ -3,7 +3,7 @@  Section: devel
 Priority: optional
 Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
 Standards-Version: 3.6.1
-Build-Depends: debhelper (>= 3), cpio, module-init-tools, kernel-wedge (>= 2.24ubuntu1), rsync
+Build-Depends: debhelper (>= 3), cpio, module-init-tools, kernel-wedge (>= 2.24ubuntu1), rsync, uboot-mkimage
 Build-Depends-Indep: xmlto, docbook-utils, gs, transfig, bzip2, sharutils
 Build-Conflicts: findutils (= 4.4.1-1ubuntu1)
 Vcs-Git: git://kernel.ubuntu.com/ubuntu/ubuntu-maverick.git
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 4f7b66d..bb4d49d 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -73,6 +73,12 @@  ifeq ($(no_dumpfile),)
 	makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \
 		-x $(builddir)/build-$*/vmlinux
 endif
+	# Generate uImage automatically out of the box
+	mkimage -A arm -O linux -T kernel -C none -a 0x80008000 \
+		-e 0x80008000 -n "Ubuntu Kernel" \
+		-d $(pkgdir)/boot/$(install_file)-$(abi_release)-$* \
+		$(pkgdir)/boot/uImage-$(abi_release)-$*
+
 
 	$(build_cd) $(kmake) $(build_O) modules_install \
 		INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$(pkgdir)/ \