[fedora-arm] Building RHEL/Fedora Kernels on ARM

Gordan Bobic gordan at bobich.net
Thu Dec 22 14:56:38 UTC 2011


Hi,

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.

I added the configs for arm (Kirkwood), modified Makefile.config, and 
added a few minor changes to the spec file along with a few patches for 
various breakages in the RHEL kernel caused by either broken or 
incomplete patches applied there. I am also defining rhel to 1 so that 
the debug and signing are used.

At the end of the build process I get this:

A few hundred instances of this:

<stdin>: Assembler messages:
<stdin>:3: Error: junk at end of line, first unrecognized character is `,'

Immediately followed by this bit that looks OK (I think):
+ pushd tools/perf
~/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.armv5tel/tools/perf 
~/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.armv5tel
+ chmod +x util/generate-cmdlist.sh util/PERF-VERSION-GEN
+ make -s V=1 -j2 NO_DEMANGLE=1 perf
PERF_VERSION = 0.0.2.PERF
     * new build flags or prefix
+ mkdir -p 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/usr/libexec/
+ install -m 755 perf 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/usr/libexec/perf.2.6.32-71.29.1.el6.kirkwood.armv5tel
+ popd
~/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.armv5tel
+ mkdir -p 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/usr/lib/debug/boot
+ mkdir -p 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/usr/lib/debug/boot
+ install -m 644 System.map 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm//usr/lib/debug/boot/System.map-2.6.32-71.29.1.el6.kirkwood.armv5tel
+ mkdir -p 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot
+ install -m 644 .config 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot/config-2.6.32-71.29.1.el6.kirkwood.armv5tel
+ install -m 644 System.map 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot/System.map-2.6.32-71.29.1.el6.kirkwood.armv5tel
+ dd if=/dev/zero 
of=/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot/initramfs-2.6.32-71.29.1.el6.kirkwood.armv5tel.img 
bs=1M count=20
20+0 records in
20+0 records out
20971520 bytes (21 MB) copied, 1.55678 s, 13.5 MB/s
+ '[' -f arch/arm/boot/zImage.stub ']'
+ cp_vmlinux vmlinux 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot/vmlinuz-2.6.32-71.29.1.el6.kirkwood.armv5tel
+ eu-strip --remove-comment -o 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot/vmlinuz-2.6.32-71.29.1.el6.kirkwood.armv5tel 
vmlinux
+ chmod 755 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot/vmlinuz-2.6.32-71.29.1.el6.kirkwood.armv5tel
+ echo 'Creating hmac file: 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot/.vmlinuz-2.6.32-71.29.1.el6.kirkwood.armv5tel.hmac'
Creating hmac file: 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot/.vmlinuz-2.6.32-71.29.1.el6.kirkwood.armv5tel.hmac
+ ls -l 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot/vmlinuz-2.6.32-71.29.1.el6.kirkwood.armv5tel
-rwxr-xr-x 1 root root 5365340 Dec 22 06:15 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot/vmlinuz-2.6.32-71.29.1.el6.kirkwood.armv5tel
+ sha512hmac 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/boot/vmlinuz-2.6.32-71.29.1.el6.kirkwood.armv5tel
+ sed -e s,/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm,,
+ mkdir -p 
/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm/lib/modules/2.6.32-71.29.1.el6.kirkwood.armv5tel
+ '[' arm '!=' s390 -o '' '!=' kdump ']'
+ make -s ARCH=arm 
INSTALL_MOD_PATH=/root/rpmbuild/BUILDROOT/kernel-2.6.32-71.29.1.el6.kirkwood.arm 
modules_install KERNELRELEASE=2.6.32-71.29.1.el6.kirkwood.armv5tel mod-fw=

This is then followed by a line like this for every module that should 
be packaged:


cp: cannot stat `crypto/aes_generic.ko': No such file or directory
cp: cannot stat `crypto/ansi_cprng.ko': No such file or directory
cp: cannot stat `crypto/anubis.ko': No such file or directory
cp: cannot stat `crypto/arc4.ko': No such file or directory

Reading through the spec file, the last thing that happens before 
building the %{wigh_perftool} stuff is:

     make -s ARCH=$Arch %{oldconfig_target} > /dev/null
     make -s ARCH=$Arch V=1 %{?_smp_mflags} $MakeTarget %{?sparse_mflags}
     if [ "$Arch" != "s390" -o "$Flavour" != "kdump" ]; then
         make -s ARCH=$Arch V=1 %{?_smp_mflags} modules 
%{?sparse_mflags} || exit 1
     fi


Am I understanding this right?

Can anybody point me in the direction of where the problem might be WRT 
why the modules aren't getting signed? From what I can figure out there 
is no separate signing stage, it should all be done by "make modules", 
but for some reason it isn't happening. :(

Gordan


More information about the arm mailing list