[Gta04-owner] gta04 with 3.6 kernel with dtb booted
Belisko Marek
marek.belisko at gmail.com
Tue Oct 9 11:26:15 CEST 2012
Hi,
On Tue, Oct 9, 2012 at 11:15 AM, Dr. H. Nikolaus Schaller
<hns at goldelico.com> wrote:
>
> Am 09.10.2012 um 09:55 schrieb Belisko Marek:
>
>> Hi,
>> On Tue, Oct 9, 2012 at 9:50 AM, Dr. H. Nikolaus Schaller
>> <hns at goldelico.com> wrote:
>>> Hi,
>>> cool!
>>>
>>> Am 08.10.2012 um 23:11 schrieb Belisko Marek:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to work to boot gta04 with latest kernel with devicetree
>>>> (also trying to get some experience with dtb :))
>>>> So basically I fetch 3.6 kernel (apply patch to create uImage with dtb
>>>> easily : https://patchwork.kernel.org/patch/1432321/)
>>>
>>> I tried to do it myself but failed applying the patch:
>> I just copy diff patch and apply with patch -p1 <path.txt and it was
>> working fine.
>
> Hm.
>
Exact steps:
git checkout -b v3.6 v3.6 in linux-3.0 tree
(git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
)
patch -p1 < patch.txt (patch.txt in attachment)
Should apply without errors.
> hns$ patch -p1 <ARM-add-dtbImage.-dt-and-dtbuImage.-dt-rules.patch
> patching file arch/arm/Makefile
> Hunk #1 succeeded at 284 (offset 6 lines).
> Hunk #2 FAILED at 306.
> 1 out of 2 hunks FAILED -- saving rejects to file arch/arm/Makefile.rej
> patching file arch/arm/boot/Makefile
> Hunk #1 succeeded at 100 (offset 2 lines).
> patching file scripts/Makefile.lib
> hns$
>
> Ah, I have an idea: linux-stable is 3.6.1 and not 3.6.
>
> Is there an update of the patch? Or how can I apply a patch
> for 3.6 to 3.6.1? 'git am -3' did fail (I am still not becoming a friend of git...).
>
> Finally, I could manually fix arch/arm/boot/Makefile ...
>
>
> Nikolaus
>
> _______________________________________________
> Gta04-owner mailing list
> Gta04-owner at goldelico.com
> http://lists.goldelico.com/mailman/listinfo/gta04-owner
cheers,
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
-------------- next part --------------
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 30eae87..c5f2673 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -278,7 +278,7 @@ archprepare:
# Convert bzImage to zImage
bzImage: zImage
-zImage Image xipImage bootpImage uImage: vmlinux
+zImage Image xipImage bootpImage uImage dtbImage.% dtbuImage.% : vmlinux
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
zinstall uinstall install: vmlinux
@@ -300,17 +300,19 @@ i zi:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
define archhelp
- echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
- echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
- echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)'
- echo ' uImage - U-Boot wrapped zImage'
- echo ' bootpImage - Combined zImage and initial RAM disk'
- echo ' (supply initrd image via make variable INITRD=<path>)'
- echo ' dtbs - Build device tree blobs for enabled boards'
- echo ' install - Install uncompressed kernel'
- echo ' zinstall - Install compressed kernel'
- echo ' uinstall - Install U-Boot wrapped compressed kernel'
- echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or'
- echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
- echo ' install to $$(INSTALL_PATH) and run lilo'
+ echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
+ echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
+ echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)'
+ echo ' uImage - U-Boot wrapped zImage'
+ echo ' bootpImage - Combined zImage and initial RAM disk'
+ echo ' (supply initrd image via make variable INITRD=<path>)'
+ echo ' dtbs - Build device tree blobs for enabled boards'
+ echo ' dtbImage.<dt> - zImage with an appended device tree blob'
+ echo ' dtbuImage.<dt> - uImage with an embedded device tree blob'
+ echo ' install - Install uncompressed kernel'
+ echo ' zinstall - Install compressed kernel'
+ echo ' uinstall - Install U-Boot wrapped compressed kernel'
+ echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or'
+ echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
+ echo ' install to $$(INSTALL_PATH) and run lilo'
endef
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
index c877087..35c01a8 100644
--- a/arch/arm/boot/Makefile
+++ b/arch/arm/boot/Makefile
@@ -98,6 +98,17 @@ $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
$(call if_changed,objcopy)
@echo ' Kernel: $@ is ready'
+# dtbImage.% - a dtbImage is a zImage with an appended device tree blob
+$(obj)/dtbImage.%: $(obj)/zImage $(obj)/%.dtb FORCE
+ $(call if_changed,cat)
+ @echo ' Kernel: $@ is ready'
+
+# dtbuImage.% - a dtbuImage is a uImage with an embedded device tree blob
+$(obj)/dtbuImage.%: $(obj)/dtbImage.% FORCE
+ @$(check_for_multiple_loadaddr)
+ $(call if_changed,uimage)
+ @echo ' Image $@ is ready'
+
PHONY += initrd FORCE
initrd:
@test "$(INITRD_PHYS)" != "" || \
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 0be6f11..8550466 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -235,6 +235,12 @@ cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \
quiet_cmd_objcopy = OBJCOPY $@
cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
+# Cat
+# ---------------------------------------------------------------------------
+
+quiet_cmd_cat = CAT $@
+cmd_cat = (cat $(filter-out FORCE,$^) > $@) || (rm -f $@ ; false)
+
# Gzip
# ---------------------------------------------------------------------------
More information about the Gta04-owner
mailing list