[Aboriginal] Kernel patching failure with 1.2.4.1

Rob Landley rob at landley.net
Tue Aug 20 05:03:38 PDT 2013


On 08/17/2013 10:57:50 PM, Patrick Lauer wrote:
> Trying to build 1.2.4.1 fails when fetching/patching kernel:

Odd. It works here and I tried it on your gentoo server too. Did a  
fresh one in a new directory from the release tarball, and the kernel  
patching part went:

Applying  
/home/landley/aboriginal/aboriginal-1.2.4.1/sources/patches/linux-arm.patch
patching file arch/arm/mach-versatile/Kconfig
patching file arch/arm/mm/Kconfig
Hunk #5 succeeded at 359 (offset 4 lines).
patching file arch/arm/mach-versatile/Kconfig
patching file arch/arm/mach-versatile/pci.c
Applying  
/home/landley/aboriginal/aboriginal-1.2.4.1/sources/patches/linux-fixsh4-2.patch
patching file drivers/tty/serial/sh-sci.c
Applying  
/home/landley/aboriginal/aboriginal-1.2.4.1/sources/patches/linux-fixsh4.patch
patching file arch/sh/boot/compressed/head_32.S
patching file arch/sh/include/asm/entry-macros.S
patching file arch/sh/kernel/cpu/sh3/entry.S
Hunk #1 succeeded at 258 (offset 1 line).
patching file arch/sh/kernel/entry-common.S
Hunk #1 succeeded at 104 (offset 6 lines).
patching file arch/sh/lib/__clear_user.S
Hunk #1 succeeded at 11 (offset -46 lines).
Applying  
/home/landley/aboriginal/aboriginal-1.2.4.1/sources/patches/linux-fixuClibc.patch
patching file include/uapi/linux/netlink.h
Applying  
/home/landley/aboriginal/aboriginal-1.2.4.1/sources/patches/linux-hack.patch
patching file init/Kconfig
Hunk #1 succeeded at 1797 (offset 131 lines).
Applying  
/home/landley/aboriginal/aboriginal-1.2.4.1/sources/patches/linux-noperl-timeconst.patch
patching file kernel/mktimeconst.c
patching file kernel/timeconst.bc
patching file kernel/Makefile
Hunk #1 succeeded at 126 (offset 1 line).
Applying  
/home/landley/aboriginal/aboriginal-1.2.4.1/sources/patches/linux-pmacorder.patch
patching file drivers/ide/Makefile
Applying  
/home/landley/aboriginal/aboriginal-1.2.4.1/sources/patches/linux-sh4-fixifconfig.patch
patching file arch/sh/mm/consistent.c
Hunk #1 succeeded at 84 (offset 2 lines).

So that worked fine...

> Confirmed linux-3.10.tar.bz2
> === linux (host download)
> Extracting
> 'linux'...............................................$
> Applying  
> /home/me/code/aboriginal-1.2.4.1/sources/patches/linux-arm.patch
> patching file arch/arm/mach-versatile/Kconfig
> patching file arch/arm/mm/Kconfig
> Hunk #5 succeeded at 359 (offset 4 lines).
> patching file arch/arm/mach-versatile/Kconfig
> patching file arch/arm/mach-versatile/pci.c
> Applying
> /home/me/code/aboriginal-1.2.4.1/sources/patches/linux-fixsh4-2.patch
> patching file drivers/tty/serial/sh-sci.c
> Applying  
> /home/me/code/aboriginal-1.2.4.1/sources/patches/linux-fixsh4.patch
> patching file arch/sh/boot/compressed/head_32.S
> patching file arch/sh/include/asm/entry-macros.S
> patching file arch/sh/kernel/cpu/sh3/entry.S
> Hunk #1 succeeded at 258 (offset 1 line).
> patching file arch/sh/kernel/entry-common.S
> Hunk #1 succeeded at 104 (offset 6 lines).
> patching file arch/sh/lib/__clear_user.S
> Hunk #1 succeeded at 11 (offset -46 lines).
> Applying
> /home/me/code/aboriginal-1.2.4.1/sources/patches/linux-fixuClibc.patch
> patching file include/uapi/linux/netlink.h
> Applying  
> /home/me/code/aboriginal-1.2.4.1/sources/patches/linux-hack.patch
> patching file init/Kconfig
> Hunk #1 succeeded at 1797 (offset 131 lines).
> Applying
> /home/me/code/aboriginal-1.2.4.1/sources/patches/linux-noperl-timeconst.patch
> The next patch would create the file kernel/Makefile,
> which already exists!  Assume -R? [n]

Yes, the file already exists. But the patch _isn't_ trying to create  
it, it starts:

--- linux/kernel/Makefile
+++ linux/kernel/Makefile
@@ -125,19 +125,13 @@

  $(obj)/time.o: $(obj)/timeconst.h

-quiet_cmd_hzfile = HZFILE  $@
-      cmd_hzfile = echo "hz=$(CONFIG_HZ)" > $@
-
-targets += hz.bc
-$(obj)/hz.bc: $(objtree)/include/config/hz.h FORCE
-       $(call if_changed,hzfile)
-

How you _create_ a file starting at line 125 is a strainge question.  
And the old one is linux/kernel/Makefile not /dev/null (and since  
there's no date, it's not dated the epoch which is the other way of  
saying file may not actually have existed).

I.E. the patch isn't asking to create a new file, and there seems to be  
something wrong with your host's "patch" command for thinking it is.  
The patch command in ubuntu likes it, the patch command in toybox likes  
it (I wrote that one, which is why I know so much about the minutiae of  
patch format), and the busybox patch command likes it (although since  
the current version's a port of the toybox patch command, that's not  
saying much).

Rob
 1377000218.0


More information about the Aboriginal mailing list