Re: Building custom kernel

2004-03-05 Thread Janos Sziliczi
Jim,

Igmar and me said same thing.

The essence:
CC has to be 64 bit C compiler
HOSTCC has to be 32 bit C compiler

(Igmar has 64 bit gcc, I have 32 bit gcc, so we said the same.)
Check whether the above things is true on your computer.

Other suggestion:

The 'make menuconfig' uses the ncurses5 library.

Check which version is installed on your Sparc:
- libncurses5, libncurses5-dev
or
- lib64ncurses5(?), lib64ncurses5-dev (as Igmar wrote)

Just try the 'make config' command. If it will be start, the
problem is in ncurses.
The 'make menuconfig' uses the HOSTCC compiler.

If you have libncurses5-dev the HOSTCC, which contains 32 bit
compiler should be work.

However, if you have lib64ncurses5-dev, try to change HOSTCC to 64 bit
compiler. (I don't know whether it is work, because the HOSTCC is used in
another compiling threads also.)

Regards,
Jana



Re: Building custom kernel

2004-03-05 Thread Jim Watson
I have tried burning frankincence and threw snillocneb three times over
my shoulder but still it is not working :(
jim

On Fri, Mar 05, 2004 at 10:52:39AM +0100, Igmar Palsenberg wrote:
> 
> I've just been here myself. The following works for me :



Re: Building custom kernel

2004-03-05 Thread Igmar Palsenberg



> (Where /usr/src/linux is a symlink to /usr/src/kernel-source-2.4.25)
> 
> I don't understand why it hangs at the end.  make -d menuconfig didn't seem
> to reveal anything useful either.  Ideas?

I've just been here myself. The following works for me :

- Install the kernel source in /usr/src and symlink it

- Verify your gcc can spit out the right stuff :

test.c :

int main(int argc, char **argv)
{
   return 0;
}

guru:~# gcc -o test test.c
guru:~# file test
test: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), for GNU/Linux 
2.4.18, dynamically linked (uses shared libs), not stripped

guru:~# sparc-linux-gcc -o test test.c
guru:~# file test
test: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), for GNU/Linux 
2.2.0, dynamically linked (uses shared libs), not stripped

If the above is the same for you, then :

- vi the Makefile, and change 

HOSTCC = gcc
to
HOSTCC  = sparc-linux-gcc

- Run make menuconfig, make dep; make vmlinuz, and do the usuall install 
stuff.

I end up with :

guru:/usr/src/linux# file vmlinux
vmlinux: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), statically 
linked, not stripped

After booting that, I can also run 64 bit binaries, so when you actually 
run it, the above hack isn't necessary anymore :

guru:~# gcc -o test test.c
.guru:~# ./test
foo
guru:~# file test
test: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), for GNU/Linux 
2.4.18, dynamically linked (uses shared libs), not stripped




Regards,


Igmar



RE: Building custom kernel

2004-03-04 Thread Small, Jim
Ben,

I'd be interested in your input on this.  I thought the latest direction was
to use gcc 3.3.3+ for kernel compilation versus egcs64.  Please correct me
if I'm wrong...

<> Jim


> If you want to build custom kernel, I suggest that you should download the
> source from ftp://ftp.kernel.org or from one of it's mirrors.
> 
> Install the egcs64 package (cross compiler) using apt-get.
> (It seems to be, that it is already installed on your computer.)
> 
> Here is my workflow:
> 
> 1. Open the Makefile (in kernel's source root dir) with an arbitrary
> editor.
> 
> 2. Look the beginning of this file. here is the variables for executable
> programs.
> 
> Find the CC (not HOSTCC!!!) It's value is: $(CROSS_COMPILE)gcc
> Change it to: sparc64-linux-gcc
> (Note: I don't remeber exactly, look the real name from output of
>  'dpkg -L egcs64' command)
> 
> Note: Change only the CC variable, not the CROSS_COMPILE!
> 
> 3. Don't forget to run 'make mrproper' first!
> 
> 4. Run 'make menuconfig'



Re: Building custom kernel

2004-03-04 Thread Janos Sziliczi
Hello,

On Wed, 3 Mar 2004, Small, Jim wrote:

> I am trying to build a custom kernel under Debian Sparc64 using a recent 2.4
> kernel

I have already built the 2.4.25 kernel successfully on Sparc.
I've 64bit Sparc Ultra also (but only one CPU).
I haven't experienced your problem.

I think the sparc32 style compiling is wrong, because the kernel must be
64bit (your system is 64bit arch, isn't it?).

> I did an apt-get kernel-source-2.4.25 (also tried
If you want to build custom kernel, I suggest that you should download the
source from ftp://ftp.kernel.org or from one of it's mirrors.

Install the egcs64 package (cross compiler) using apt-get.
(It seems to be, that it is already installed on your computer.)

Here is my workflow:

1. Open the Makefile (in kernel's source root dir) with an arbitrary
editor.

2. Look the beginning of this file. here is the variables for executable
programs.

Find the CC (not HOSTCC!!!) It's value is: $(CROSS_COMPILE)gcc
Change it to: sparc64-linux-gcc
(Note: I don't remeber exactly, look the real name from output of
 'dpkg -L egcs64' command)

Note: Change only the CC variable, not the CROSS_COMPILE!

3. Don't forget to run 'make mrproper' first!

4. Run 'make menuconfig'

I think, It have to work...
Jana



Re: Building custom kernel

2004-03-04 Thread Jim Watson
I did as  described by Mustafa (thanks) but

 LD  .tmp_vmlinux1
arch/sparc64/kernel/built-in.o(.init.text+0x72c): In function Setup_arch':
: undefined reference to Rd_image_start'

I have searched around and find some old discussions but nothing that helps
me see what is missing? any suggestions appreciated...

another jim


On Wed, Mar 03, 2004 at 06:23:10PM -0600, Mustafa Hussein wrote:
> 
> Are you running this from a "sparc32 bash"?
> If not, you need to switch to it:
> sparc32 bash
> make ARCH=sparc64 menuconfig
> or just from your current shell:
> sparc32 make ARCH=sparc64 menuconfig



Re: Building custom kernel

2004-03-03 Thread Mustafa Hussein
Small, Jim wrote:
> I am trying to build a custom kernel under Debian Sparc64 using a recent
2.4
> kernel.
>
> I am running the latest of everything (unstable) via apt-get dist-upgrade.
> I tried to install the minimum amount of packages necessary.  I am running
> on a 2 CPU Ultra 60.  I did an apt-get kernel-source-2.4.25 (also tried
> .24), unbzipped and tarred under /usr/src.
>
> Now when I do a make menuconfig, it hangs after the Preparing scripts
part:
> debian{root}:/usr/src/linux<264>make menuconfig
> rm -f include/asm
> ( cd include ; ln -sf asm-sparc64 asm)
> make -C scripts/lxdialog all
> make[1]: Entering directory
`/usr/src/kernel-source-2.4.25/scripts/lxdialog'
> make[1]: Leaving directory
`/usr/src/kernel-source-2.4.25/scripts/lxdialog'
> /bin/sh scripts/Menuconfig arch/sparc64/config.in
> Using defaults found in arch/sparc64/defconfig
> Preparing scripts: functions,
> parsing...done.
>
>
> (Where /usr/src/linux is a symlink to /usr/src/kernel-source-2.4.25)
>
> I don't understand why it hangs at the end.  make -d menuconfig didn't
seem
> to reveal anything useful either.  Ideas?
>

Are you running this from a "sparc32 bash"?
If not, you need to switch to it:
sparc32 bash
make ARCH=sparc64 menuconfig
or just from your current shell:
sparc32 make ARCH=sparc64 menuconfig

Same thing for make vmlinux, modules, modules_install.


HTH

Mustafa Hussein



Building custom kernel

2004-03-03 Thread Small, Jim
I am trying to build a custom kernel under Debian Sparc64 using a recent 2.4
kernel.

I am running the latest of everything (unstable) via apt-get dist-upgrade.
I tried to install the minimum amount of packages necessary.  I am running
on a 2 CPU Ultra 60.  I did an apt-get kernel-source-2.4.25 (also tried
.24), unbzipped and tarred under /usr/src.

Now when I do a make menuconfig, it hangs after the Preparing scripts part:
debian{root}:/usr/src/linux<264>make menuconfig
rm -f include/asm
( cd include ; ln -sf asm-sparc64 asm)
make -C scripts/lxdialog all
make[1]: Entering directory `/usr/src/kernel-source-2.4.25/scripts/lxdialog'
make[1]: Leaving directory `/usr/src/kernel-source-2.4.25/scripts/lxdialog'
/bin/sh scripts/Menuconfig arch/sparc64/config.in
Using defaults found in arch/sparc64/defconfig
Preparing scripts: functions,
parsing...done.


(Where /usr/src/linux is a symlink to /usr/src/kernel-source-2.4.25)

I don't understand why it hangs at the end.  make -d menuconfig didn't seem
to reveal anything useful either.  Ideas?

<> Jim