Subject: mkvmlinuz fails with undefined reference to zlib_inflate_blocks* against 2.6.18-4-powerpc Package: mkvmlinuz Version: 32 Severity: normal
i'm not using mkvmlinuz as my sole bootloader: i am considering it as an alternate. However, running it by hand with a stock kernel and an initrd fails with linker errors: 0 clam:/home/debirf# mkvmlinuz -o /foo.mkvmlinuz -k /boot/vmlinux-2.6.18-4-powerpc -i /boot/initrd.img-2.6.18-4-powerpc -v -d /usr/lib/mkvmlinuz 2>&1 === Building for sub-architecture pmac. === Using kernel image file /boot/vmlinux-2.6.18-4-powerpc. === Using initrd image file /boot/initrd.img-2.6.18-4-powerpc. === Release version seems to be 2.6.18-4-powerpc. === Using object files from /usr/lib/mkvmlinuz. === Building a bootable compressed kernel image in /foo.mkvmlinuz. === Doing build in /tmp/tmp.AJsdy17607. === Creating compressed initrd image initrd.gz... cp -p /boot/initrd.img-2.6.18-4-powerpc /tmp/tmp.AJsdy17607/initrd.gz === Creating compressed kernel image vmlinux.gz... strip -s -R .comment /boot/vmlinux-2.6.18-4-powerpc -o /tmp/tmp.AJsdy17607/vmlinux gzip --force --best /tmp/tmp.AJsdy17607/vmlinux === Putting everything into ELF image file image.o... objcopy /usr/lib/mkvmlinuz/mkvmlinuz-kernel-vmlinux.strip.o /tmp/tmp.AJsdy17607/dummy_kernel.o --add-section=.kernel:vmlinux.strip=/tmp/tmp.AJsdy17607/vmlinux.gz --set-section-flags=.kernel:vmlinux.strip=contents,alloc,load,readonly,data objcopy /usr/lib/mkvmlinuz/mkvmlinuz-kernel-initrd.o /tmp/tmp.AJsdy17607/dummy_initrd.o --add-section=.kernel:initrd=/tmp/tmp.AJsdy17607/initrd.gz --set-section-flags=.kernel:initrd=contents,alloc,load,readonly,data === Creating bootable kernel image file vmlinuz.pmac... ld -m elf32ppc -T /usr/lib/mkvmlinuz/zImage.lds -o /tmp/tmp.AJsdy17607/vmlinuz.pmac /usr/lib/mkvmlinuz/crt0.o /usr/lib/mkvmlinuz/string.o /usr/lib/mkvmlinuz/prom.o /usr/lib/mkvmlinuz/stdio.o /usr/lib/mkvmlinuz/main.o /usr/lib/mkvmlinuz/div64.o /usr/lib/mkvmlinuz/inffast.o /usr/lib/mkvmlinuz/inflate.o /usr/lib/mkvmlinuz/inftrees.o /tmp/tmp.AJsdy17607/dummy_kernel.o /tmp/tmp.AJsdy17607/dummy_initrd.o /usr/lib/mkvmlinuz/inffast.o:(.got2+0x0): undefined reference to `zlib_inflate_mask' /usr/lib/mkvmlinuz/inflate.o: In function `zlib_inflate': /home/sven/debian/kernel/trunk/utils/mkvmlinuz/32/mkvmlinuz-32/boot/inflate.c:188: undefined reference to `zlib_inflate_blocks' /home/sven/debian/kernel/trunk/utils/mkvmlinuz/32/mkvmlinuz-32/boot/inflate.c:202: undefined reference to `zlib_inflate_blocks_reset' /usr/lib/mkvmlinuz/inflate.o: In function `zlib_inflateReset': /home/sven/debian/kernel/trunk/utils/mkvmlinuz/32/mkvmlinuz-32/boot/inflate.c:25: undefined reference to `zlib_inflate_blocks_reset' /usr/lib/mkvmlinuz/inflate.o: In function `zlib_inflateEnd': /home/sven/debian/kernel/trunk/utils/mkvmlinuz/32/mkvmlinuz-32/boot/inflate.c:37: undefined reference to `zlib_inflate_blocks_free' /usr/lib/mkvmlinuz/inflate.o: In function `zlib_inflateInit2_': /home/sven/debian/kernel/trunk/utils/mkvmlinuz/32/mkvmlinuz-32/boot/inflate.c:76: undefined reference to `zlib_inflate_blocks_new' /usr/lib/mkvmlinuz/addnote /tmp/tmp.AJsdy17607/vmlinuz.pmac /tmp/tmp.AJsdy17607/vmlinuz.pmac: No such file or directory === Cleaning up... 0 clam:/home/debirf# Interestingly, the return code is 0. mkvmlinuz doesn't seem to realize that the ld step has failed. when i run the different steps by hand, ld definitely returns 1, but the do_cmd step in mkvmlinuz doesn't check the return value. I'm not sure what i'm supposed to do to get this to work. the kernel in question is a stock debian 2.6.18-4-powerpc: [0 [EMAIL PROTECTED] tmp]$ grep CONFIG_ZLIB /boot/config-2.6.18-4-powerpc CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m [0 [EMAIL PROTECTED] tmp]$ i'm happy to help debug more if i can. Please let me know if i'm just confused. I've never used mkvmlinuz before, but i'm excited to get it working. It looks like a very useful boot strategy. --dkg -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (500, 'testing') Architecture: powerpc (ppc) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.8-powerpc Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Versions of packages mkvmlinuz depends on: ii bash 3.1dfsg-8 The GNU Bourne Again SHell ii binutils 2.17-3 The GNU assembler, linker and bina ii debconf [debconf-2.0] 1.5.11 Debian configuration management sy mkvmlinuz recommends no packages. -- debconf information: * mkvmlinuz/bootloaders: yaboot -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]