LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Cross compiled kernel-2.6.13 for x86-64 arch stops booting under Slackware-10.1 (http://www.linuxquestions.org/questions/slackware-14/cross-compiled-kernel-2-6-13-for-x86-64-arch-stops-booting-under-slackware-10-1-a-361463/)

Basel 09-08-2005 01:15 PM

Cross compiled kernel-2.6.13 for x86-64 arch stops booting under Slackware-10.1
 
Hi everyone,

Why does the kernel stop booting after freeing 200k of memory? I am trying to compile a 64-bit kernel for my AMD64.
I tried to use the same .config file to compile a kernel for the i686 architecture and it worked just fine. In fact, I am currently running the i686 kernel.


I forgot to mention one important point: After the kernel stops booting I can write whatever I want but nothing is executed. I can even use Ctrl+Alt+Delete to reboot the machine.


Code:

ReiserFS sda3: found reiserfs format "3.5" with standard journal
ReiserFS sda3: using ordered data model
ReiserFS sda3: journal params: device sda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS sda3: checking transaction log (sda3)
ReiserFS sda3: using r5 hash to sort names
VFS: mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 200k freed

I used the following commands to configure and compile the kernel:
Code:

basel@slackware:~/tmp/linux-2.6.13$ make CROSS_COMPILE=/cross-tools/bin/x86_64-pc-linux-gnu- ARCH=x86_64 menuconfig
basel@slackware:~/tmp/linux-2.6.13$ make CROSS_COMPILE=/cross-tools/bin/x86_64-pc-linux-gnu- ARCH=x86_64 && echo done_make
root@slackware:~/tmp/linux-2.6.13-x86_64$ cp arch/x86_64/boot/bzImage /boot/vmlinuz-x86_64
root@slackware:~/tmp/linux-2.6.13-x86_64$ cp .config /boot/config-x86_64
root@slackware:~/tmp/linux-2.6.13-x86_64$ cp System.map /boot/System.map-x86_64
root@slackware:/home/basel/tmp/linux-2.6.13# rm -f /boot/System.map /boot/config /boot/vmlinuz
root@slackware:/home/basel/tmp/linux-2.6.13# cd /boot/
root@slackware:/boot# ln -s vmlinuz-x86_64 vmlinuz
root@slackware:/boot# ln -s config-x86_64 config
root@slackware:/boot# ln -s System.map-x86_64 System.map

I have added the following section to /etc/lilo.conf
Code:

# Linux bootable partition config begins
image="/boot/vmlinuz-x86_64"
        root="/dev/sda3"
        label="Kernel-x86_64"
  read-only
# Linux bootable partition config ends

And then I run lilo:
Code:

root@slackware:/boot# lilo -v
LILO version 22.5.9, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2004 John Coffman
Released 08-Apr-2004 and compiled at 00:18:50 on May 21 2004.

Warning: LBA32 addressing assumed
Reading boot sector from /dev/sda
Using MENU secondary loader
Calling map_insert_data
Mapping message file /boot/boot_message.txt
Calling map_insert_file

Boot image: vmlinuz-ide-2.4.29
Added Slackware-10.1

Boot image: /boot/vmlinuz-2.6.13
Added Kernel-2.6.13 *

Boot image: /boot/vmlinuz-x86_64
Added Kernel-x86_64

Writing boot sector.
/boot/boot.0800 exists - no boot sector backup copy made.
root@slackware:/boot#


cb951303 09-08-2005 04:30 PM

can you try to compile 64bit alone, so you can see if cross-compile is the problem....

piete 09-09-2005 06:33 AM

I have two thoughts on this topic:

1. You've forgotton to deal with the modules?

Code:

~# CROSS_COMPILE=/cross-tools/bin/x86_64-pc-linux-gnu- ARCH=x86_64 make
~# CROSS_COMPILE=/cross-tools/bin/x86_64-pc-linux-gnu- ARCH=x86_64 make modules_install
~# CROSS_COMPILE=/cross-tools/bin/x86_64-pc-linux-gnu- ARCH=x86_64 make install

make install runs the install.sh script found in: $YOURLINUXSRCDIR/arch/$ARCH/boot/install.sh

It basically copies System.map and bzImage into /boot and runs lilo for you. I usually tweak mine, or at least check it's doing what I want it to. I'm so lazy =D

2. You've forgotton to enable ia32 binary support in your kernel - this'll mean it can't use 32-bit programs, which will be a problem when trying to boot your 32-bit system.

- Piete.

Basel 09-09-2005 12:46 PM

Quote:

1. You've forgotton to deal with the modules?
My current kernel configurations does not have any option set as a module. That is why I did not run 'make install_modules'

Quote:

2. You've forgotton to enable ia32 binary support in your kernel - this'll mean it can't use 32-bit programs, which will be a problem when trying to boot your 32-bit system.
That is a possibility since the kernel stops booting at the point when it should execute the init scripts for Slackware.
How do I enable the 32 binary support? Is it the followingl line under the .config file?
Code:

basel@slackware:~/tmp/linux-2.6.13-x86_64$ grep IA32 .config
# CONFIG_IA32_EMULATION is not set


Basel 09-09-2005 01:57 PM

Thanks Piete. I am currently running the x86_64 kernel under Slackware 10.1 :cool:
Code:

basel@slackware:~$ uname -a
Linux slackware 2.6.13 #2 Fri Sep 9 17:20:06 UTC 2005 x86_64 unknown unknown GNU/Linux

What I did was to change
Code:

# CONFIG_IA32_EMULATION is not set
into
Code:

CONFIG_IA32_EMULATION=y


All times are GMT -5. The time now is 06:05 PM.