Re: Building RHEL/Fedora Kernels on ARM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/22/2011 06:07 PM, Gordan Bobic wrote:
On 12/22/2011 04:52 PM, Gordan Bobic wrote:
On 12/22/2011 04:42 PM, Jon Masters wrote:
On Thu, 2011-12-22 at 14:56 +0000, Gordan Bobic wrote:

I'm trying to build a RHEL6 kernel from src.rpm on ARM and I think I
have it mostly sorted out, but it looks like the modules aren't getting
signed and since they weren't signed from<module>.ko.unsigned
<module>.ko the packaging part can't find the .ko files and the process
fails at the end.

Module signing is fun since you need not only the rngd but gpg and a few
other bits.

Sure, I know that - I have both of those working.

Having said that, I thought it was supposed to disable if it
didn't find those bits. It's been a while, I can look. Please send the
whole log as well, since that's really the only way to ponder.

Thanks, I appreciate it. I will attach the full log once the latest
build attempt has completed (I removed the -s from the make lines to be
able to better connect the errors/warnings with their causes).

I have attached the full build log.

It looks like the problem is in:
scripts/mod/mod-extract

Actually, the problem appears to be in this line:

sh scripts/mod/modsign-note.sh sound/pci/hda/snd-hda-codec-cmedia.ko.digest.sig | \ gcc -x assembler-with-cpp -Wp,-MD,sound/pci/hda/.snd-hda-codec-cmedia.ko.d -nostdinc -isystem /usr/lib/gcc/armv5tel-redhat-linux-gnueabi/4.4.5/include -Iinclude -I/usr/src/rhel6-stage1/root/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.armv5tel/arch/arm/include -include include/linux/autoconf.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-kirkwood/include -Iarch/arm/plat-orion/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -marm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=xscale -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(snd_hda_codec_cmedia)" -D"KBUILD_MODNAME=KBUILD_STR(snd_hda_codec_cmedia.ko)" -D"DEBUG_HASH=23" -D"DEBUG_HASH2=54" -DMODULE -c -o sound/pci/hda/snd-hda-codec-cmedia.ko.note.o -

The modsign-note.sh script produces this:
#include <linux/modsign.h>

ELFNOTE(MODSIGN_NOTE_NAME, MODSIGN_NOTE_TYPE, .incbin "sound/pci/hda/snd-hda-codec-cmedia.ko.digest.sig")

and gcc proceeds to choke on it:
<stdin>:Assembler messages:
<stdin>:3: Error: junk at end of line, first unrecognized character is `,'


include/linux/modsign.h includes include/linux/elfnote.h

and this defines ELFNOTE either as:
#ifdef __ASSEMBLER__
[...]
#define ELFNOTE(name, type, desc)
[...]
#else
[...]
#define ELFNOTE(size, name, type, desc)
[...]
#endif

In this case __ASSEMBLER__ is defined, and the macro expects 3 arguments (tested it), so that means the relevant definition from elfnote.h is this:

#define ELFNOTE_START(name, type, flags)        \
.pushsection .note.name, flags,@note    ;       \
  .balign 4                             ;       \
  .long 2f - 1f         /* namesz */    ;       \
  .long 4484f - 3f      /* descsz */    ;       \
  .long type                            ;       \
1:.asciz #name                          ;       \
2:.balign 4                             ;       \
3:

#define ELFNOTE_END                             \
4484:.balign 4                          ;       \
.popsection                             ;

#define ELFNOTE(name, type, desc)               \
        ELFNOTE_START(name, type, "")           \
                desc                    ;       \
        ELFNOTE_END

And unless I am mistaken, the ARM assembly @ comment bug strikes again.

This pseudopatch seems to fix it:

-.pushsection .note.name, flags,@note    ;       \
+.pushsection .note.name, flags          ;       \


Now to try again. :)

Gordan
_______________________________________________
arm mailing list
arm@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/arm



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM (Vger)]     [Linux ARM]     [ARM Kernel]     [Fedora User Discussion]     [Older Fedora Users Discussion]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

Powered by Linux