make bootimage and make bootpfile not working
i forgot to sent that on list, someone can find it useful (may be...)
Quoted 4 lines
Quoted 1 line
I tried many times to obtain a network-bootable kernel image both with kernel 2.6.7 and 2.4.26, but I always got link errors while executing make bootpfile and make bootimage
Please provide *exact* error messages.
ok, obviously they are rather long ...
kernel 2.6.7
gcc 3.3.3
digital personal workstation 500au (miata)
debian gnu/linux sid
$ make bootimage
make[1]: `arch/alpha/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
HOSTCC arch/alpha/boot/tools/mkbb
arch/alpha/boot/tools/mkbb.c:85: warning: return type defaults to `int'
arch/alpha/boot/tools/mkbb.c: In function `main':
arch/alpha/boot/tools/mkbb.c:95: warning: implicit declaration of function `exit'
arch/alpha/boot/tools/mkbb.c:117: warning: int format, different type arg (arg 3)
arch/alpha/boot/tools/mkbb.c:125: warning: int format, different type arg (arg 3)
AS arch/alpha/boot/head.o
HOSTCC arch/alpha/boot/tools/objstrip
OBJSTRIP arch/alpha/boot/vmlinux.nh
arch/alpha/boot/tools/objstrip: extracting 0xfffffc0000310000-0xfffffc0000516c08 (at 2000)
arch/alpha/boot/tools/objstrip: copying 2124808 byte from vmlinux
arch/alpha/boot/tools/objstrip: zero-filling bss and aligning to 0 with 114016 bytes
echo "#define KERNEL_SIZE `ls -l arch/alpha/boot/vmlinux.nh | awk '{print $5}'`" > arch/alpha/boot/ksize.hT
cmp -s arch/alpha/boot/ksize.hT arch/alpha/boot/ksize.h || mv -f arch/alpha/boot/ksize.hT arch/alpha/boot/ksize.h
rm -f arch/alpha/boot/ksize.hT
CC arch/alpha/boot/main.o
arch/alpha/boot/main.c: In function `load':
arch/alpha/boot/main.c:135: warning: passing arg 3 of `callback_read' makes pointer from integer without a cast
LD arch/alpha/boot/bootloader
arch/alpha/boot/main.o(.text+0x34): In function `pal_init':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0x8c): In function `pal_init':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0xc0): In function `pal_init':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0xcc): In function `pal_init':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0xe8): In function `pal_init':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0xfc): more undefined references to `srm_printk' follow
arch/alpha/boot/main.o(.text+0x1a8): In function `start_kernel':
: undefined reference to `callback_getenv'
arch/alpha/boot/main.o(.text+0x1b8): In function `start_kernel':
: undefined reference to `callback_getenv'
arch/alpha/boot/main.o(.text+0x1cc): In function `start_kernel':
: undefined reference to `callback_open'
arch/alpha/boot/main.o(.text+0x1d8): In function `start_kernel':
: undefined reference to `callback_open'
arch/alpha/boot/main.o(.text+0x200): In function `start_kernel':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0x210): In function `start_kernel':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0x220): In function `start_kernel':
: undefined reference to `callback_getenv'
arch/alpha/boot/main.o(.text+0x22c): In function `start_kernel':
: undefined reference to `callback_getenv'
arch/alpha/boot/main.o(.text+0x254): In function `start_kernel':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0x260): In function `start_kernel':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0x288): In function `start_kernel':
: undefined reference to `callback_read'
arch/alpha/boot/main.o(.text+0x29c): In function `start_kernel':
: undefined reference to `callback_read'
arch/alpha/boot/main.o(.text+0x2ac): In function `start_kernel':
: undefined reference to `callback_close'
arch/alpha/boot/main.o(.text+0x2b8): In function `start_kernel':
: undefined reference to `callback_close'
arch/alpha/boot/main.o(.text+0x2e0): In function `start_kernel':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0x2e4): In function `start_kernel':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0x2f4): In function `start_kernel':
: undefined reference to `callback_getenv'
arch/alpha/boot/main.o(.text+0x308): In function `start_kernel':
: undefined reference to `callback_getenv'
arch/alpha/boot/main.o(.text+0x324): In function `start_kernel':
: undefined reference to `strcpy'
arch/alpha/boot/main.o(.text+0x338): In function `start_kernel':
: undefined reference to `strcpy'
arch/alpha/boot/main.o(.text+0x348): In function `start_kernel':
: undefined reference to `srm_printk'
arch/alpha/boot/main.o(.text+0x350): In function `start_kernel':
: undefined reference to `srm_printk'
make[1]: *** [arch/alpha/boot/bootloader] Error 1
make: *** [bootimage] Error 2$ make bootpfile
make[1]: `arch/alpha/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
AS arch/alpha/boot/head.o
echo "#define KERNEL_SIZE `ls -l arch/alpha/boot/vmlinux.nh | awk '{print $5}'`" > arch/alpha/boot/ksize.hT
cmp -s arch/alpha/boot/ksize.hT arch/alpha/boot/ksize.h || mv -f arch/alpha/boot/ksize.hT arch/alpha/boot/ksize.h
rm -f arch/alpha/boot/ksize.hT
CC arch/alpha/boot/bootp.o
LD arch/alpha/boot/bootpheader
lib/lib.a(vsprintf.o)(.text+0x538): In function `vsnprintf':
: undefined reference to `printk'
lib/lib.a(vsprintf.o)(.text+0x54c): In function `vsnprintf':
: undefined reference to `printk'
make[1]: *** [arch/alpha/boot/bootpheader] Error 1
make: *** [bootpfile] Error 2----------- EXTRA INFO ---------
$ make bootpzfile
this works fine, but I had to modify file lib/dump_stack.c this (ugly) way commenting printk, otherwise I got link errors
#include <linux/kernel.h>
#include <linux/module.h>
void dump_stack(void)
{
// printk(KERN_NOTICE
// "This architecture does not implement dump_stack()\n");
}EXPORT_SYMBOL(dump_stack);
make[1]: `arch/alpha/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h AS arch/alpha/boot/head.o GZIP arch/alpha/boot/vmlinux.nh.gz
echo "#define KERNEL_SIZE ls -l arch/alpha/boot/vmlinux.nh | awk '{print $5}'" > arch/alpha/boot/kzsize.hT echo "#define KERNEL_Z_SIZE ls -l arch/alpha/boot/vmlinux.nh.gz | awk '{print $5}'" >> arch/alpha/boot/kzsize.hT cmp -s arch/alpha/boot/kzsize.hT arch/alpha/boot/kzsize.h || mv -f arch/alpha/boot/kzsize.hT arch/alpha/boot/kzsize.h rm -f arch/alpha/boot/kzsize.hT
CC arch/alpha/boot/bootpz.o CC arch/alpha/boot/misc.o LD arch/alpha/boot/bootpzheader
OBJSTRIP arch/alpha/boot/tools/bootpzharch/alpha/boot/tools/objstrip: 2 program headers (forgot to link with -N?) arch/alpha/boot/tools/objstrip: extracting 0x00000020000000-0x00000020005e34 (at 10000) arch/alpha/boot/tools/objstrip: copying 24116 byte from arch/alpha/boot/bootpzheader arch/alpha/boot/tools/objstrip: zero-filling bss and aligning to 512 with 3532 bytes cat arch/alpha/boot/tools/bootpzh arch/alpha/boot/vmlinux.nh.gz > arch/alpha/boot/bootpzfile
the .config file I used (i removed commented lines, since I selected only a minimal set of options)
CONFIG_ALPHA=yCONFIG_64BIT=yCONFIG_MMU=yCONFIG_RWSEM_XCHGADD_ALGORITHM=yCONFIG_GENERIC_ISA_DMA=y
CONFIG_EXPERIMENTAL=yCONFIG_CLEAN_COMPILE=yCONFIG_STANDALONE=yCONFIG_BROKEN_ON_SMP=y
CONFIG_SWAP=yCONFIG_SYSVIPC=yCONFIG_POSIX_MQUEUE=yCONFIG_BSD_PROCESS_ACCT=yCONFIG_SYSCTL=yCONFIG_LOG_BUF_SHIFT=14CONFIG_EMBEDDED=yCONFIG_FUTEX=yCONFIG_EPOLL=yCONFIG_IOSCHED_NOOP=yCONFIG_IOSCHED_DEADLINE=yCONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_MODULES=yCONFIG_MODULE_UNLOAD=yCONFIG_MODULE_FORCE_UNLOAD=yCONFIG_OBSOLETE_MODPARM=yCONFIG_KMOD=y
CONFIG_ALPHA_MIATA=yCONFIG_ISA=yCONFIG_PCI=yCONFIG_PCI_DOMAINS=yCONFIG_ALPHA_EV5=yCONFIG_ALPHA_CIA=yCONFIG_ALPHA_EV56=yCONFIG_ALPHA_PYXIS=yCONFIG_ALPHA_SRM=yCONFIG_EARLY_PRINTK=yCONFIG_BINFMT_ELF=yCONFIG_BINFMT_MISC=m
CONFIG_PNP=y
CONFIG_BLK_DEV_FD=m
CONFIG_SCSI=m
CONFIG_BLK_DEV_SD=m
CONFIG_SCSI_QLOGIC_ISP=m
CONFIG_NET=y
CONFIG_PACKET=yCONFIG_PACKET_MMAP=yCONFIG_NETLINK_DEV=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_PNP=yCONFIG_IP_PNP_DHCP=y
CONFIG_NETDEVICES=y
CONFIG_NET_ETHERNET=y
CONFIG_NET_TULIP=yCONFIG_DE4X5=y
CONFIG_INPUT=y
CONFIG_SOUND_GAMEPORT=yCONFIG_SERIO=mCONFIG_SERIO_I8042=m
CONFIG_INPUT_KEYBOARD=yCONFIG_KEYBOARD_ATKBD=m
CONFIG_VT=yCONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_VGA_CONSOLE=yCONFIG_DUMMY_CONSOLE=y
CONFIG_XFS_FS=mCONFIG_XFS_RT=yCONFIG_XFS_QUOTA=yCONFIG_XFS_SECURITY=yCONFIG_XFS_POSIX_ACL=yCONFIG_QUOTACTL=y
CONFIG_PROC_FS=yCONFIG_PROC_KCORE=yCONFIG_SYSFS=yCONFIG_TMPFS=yCONFIG_RAMFS=y
CONFIG_NFS_FS=yCONFIG_NFS_V3=yCONFIG_ROOT_NFS=yCONFIG_LOCKD=yCONFIG_LOCKD_V4=yCONFIG_SUNRPC=y
CONFIG_PARTITION_ADVANCED=yCONFIG_OSF_PARTITION=yCONFIG_MSDOS_PARTITION=yCONFIG_BSD_DISKLABEL=y
CONFIG_ALPHA_LEGACY_START_ADDRESS=yCONFIG_DEBUG_KERNEL=yCONFIG_MATHEMU=y
CONFIG_CRC32=y
--- kernel 2.4.26 ---
in the last minute I was able to make bootpfile, make bootpzfile and make bootimage correctly with kernel 2.4.26, but I had to comment out calls to printk in lib/dump_stack.c and lib/vsprintf.c
otherwise I got link errors, complaining that printk was undefined
I used almost the same .config than with 2.6
I will post exact error message after a recompilation ...
Riccardo Vestrini
<[email protected]>