Skip to contentSkip to conversation

ramdisk problem with ELF kernel

parisc-linux Ulrich Strelow 9 participants 17 messages Mar 15, 2000 – Mar 16, 2000

lore
Share & tools
lore
#0 lore raw

Hi all,

I switched my build environment from HP-UX 10.20 SOM to cross compile on x86 ELF and building and booting a kernel works fine. Compiling the kernel now only takes 5-10 minutes compared to 1 to 1 1/2 hours(!) on my 715/33. Great ! But (there is always a but) ...

Because there is currently no network driver for the 715/33 I need to boot with a ramdisk. In former times there was copying ramdisk.bin to /usr/src/linux and "make Image", but how to do this now (when "make Image" no longer works)?

This is what I have tried:
I found the undocumented "-r" switch in palo to add a ramdisk to the lif image. I tried both the original ramdisk.bin and the compiled ramdisk.o but in both cases the kernel is not able to detect the ramdisk.

Has anyone a solution to this?

Ulrich

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

#1 lore raw
Quoted 1 line

Has anyone a solution to this?

I'm pretty sure I did use a ramdisk with ELF kernels by building it into the kernel as we did for SOM kernels.

Philipp Rumpf

#2 lore raw

[parisc-linux] Cross compiler -- on Alpha?

Will the new ELF compiler/binutils work on an Alpha Linux box? (I wouldn't think it would make a difference what the host was but then there may be a subtlety there I'm unaware of.) My x86 is out of disk.

--
Brian S. Julin

#10 lore raw
In reply to Ulrich Strelow

= This is what I have tried:
= I found the undocumented "-r" switch in palo to add a = ramdisk to the lif image. I tried both the original = ramdisk.bin and the compiled ramdisk.o but in both = cases the kernel is not able to detect the ramdisk.

PALO doesn't support ramdisks yet, which is why the option is undocumented. The palo boot loader (ipl) doesn't load the ramdisk even if you used palo -r. Our current linux kernel isn't wired to find a boot-loaded ramdisk upon startup -- a minor modification but one which hasn't happened. I was avoiding that modification since the old ramdisk scheme works with the HPUX boot loader and a palo-based scheme won't.

Now that the hpux boot loader is useless[1] anyway, and now that everyone is using palo, I'll look into ramdisks again.

-Paul Bame

[1] A simple elf->som translator would be sufficient to enable the hpux boot loader to work again.

#3 lore raw

Re: [parisc-linux] Cross compiler -- on Alpha?

In reply to Brian S. Julin
Quoted 4 lines

Will the new ELF compiler/binutils work on an Alpha Linux box? (I wouldn't think it would make a difference what the host was but then there may be a subtlety there I'm unaware of.) My x86 is out of disk.

It might. The only real difference between alpha and i386 to run a cross-compiler on is sizeof(long), and I don't think we rely on that too heavily in gcc.

Philipp Rumpf

#11 lore raw

[parisc-linux] need tftp boot and ELF

In reply to Paul Bame
Quoted 4 lines

[1] A simple elf->som translator would be sufficient to enable the hpux boot loader to work again.

Hmm... any chance someone is going to do this? Considering I have yet to see a shell and I have no way to restore my HPUX if it breaks (I gave away the tape drive and there's no CD.) I'm not about to go partitioning my hard disk. I need to boot from a tftp server.

Or can I still build a SOM kernel somehow?

--
Brian

#12 lore raw

Re: [parisc-linux] need tftp boot and ELF

Quoted 10 lines · Brian S. Julin
Quoted 4 lines

[1] A simple elf->som translator would be sufficient to enable the hpux boot loader to work again.

Hmm... any chance someone is going to do this? Considering I have yet to see a shell and I have no way to restore my HPUX if it breaks (I gave away the tape drive and there's no CD.) I'm not about to go partitioning my hard disk. I need to boot from a tftp server.

you can still boot from a tftp server using palo. i agree this isn't clear in the palo docs (i initially thought you couldn't either). suggestions on making this more obvious gratefully received.

#13 lore raw
In reply to Ulrich Strelow
Quoted 5 lines · Ulrich Strelow

Because there is currently no network driver for the 715/33 I need to boot with a ramdisk. In former times there was copying ramdisk.bin to /usr/src/linux and "make Image", but how to do this now (when "make Image" no longer works)?

Seems I may need to dust off my 715/33 here and see how far things have come by now. Considering the size of the task and the limited resources it is executed very well so far.

Thanks to all those involved. And Let me know where I can lend a hand as a non-programmer. (Ok. I wrote some PHP3 stuff but is a different thing.) I do have some skill involving documentation. (DocBook SGML by preferences.)

Hugo.

Signature · 5 lines
Hugo van der Kooij; Oranje Nassaustraat 16; 3155 VJ  Maasland
[email protected]	http://home.kabelfoon.nl/~hvdkooij/
--------------------------------------------------------------
Use of any of my email addresses for unsollicited (commercial)
    email is a clear intrusion of my privacy and illegal!
#4 lore raw

Re: [parisc-linux] Cross compiler -- on Alpha?

In reply to Philipp Rumpf
Quoted 8 lines · Philipp Rumpf
Quoted 4 lines

Will the new ELF compiler/binutils work on an Alpha Linux box? (I wouldn't think it would make a difference what the host was but then there may be a subtlety there I'm unaware of.) My x86 is out of disk.

It might. The only real difference between alpha and i386 to run a cross-compiler on is sizeof(long), and I don't think we rely on that too heavily in gcc.

Wouldn't big endian vs little endian be an issue?

I know there is plenty of software out there that does not use proper handling of pointers and that will break on my Alpha while you can get away with it on intel based machines. The problem is due to bad coding but it could be a good case to try and see if the code is clean enough.

Hugo.

Signature · 5 lines
Hugo van der Kooij; Oranje Nassaustraat 16; 3155 VJ  Maasland
[email protected]	http://home.kabelfoon.nl/~hvdkooij/
--------------------------------------------------------------
Use of any of my email addresses for unsollicited (commercial)
    email is a clear intrusion of my privacy and illegal!
#5 lore raw

Re: [parisc-linux] Cross compiler -- on Alpha?

Quoted 1 line · On Wed, Mar 15, 2000 at 07:30:40PM +0100, [email protected] wrote:

Wouldn't big endian vs little endian be an issue?

unlikely. parisc is big endian and i386 is little endian. people compile parisc kernels on both machines.

#14 lore raw
In reply to [email protected]
Quoted 3 lines · On Wed, Mar 15, 2000 at 07:26:08PM +0100, [email protected] wrote:

Thanks to all those involved. And Let me know where I can lend a hand as a non-programmer. (Ok. I wrote some PHP3 stuff but is a different thing.) I do have some skill involving documentation. (DocBook SGML by preferences.)

the website is in CVS so anyone can contribute to it and fix mistakes or update documentation if it starts to succumb to bitrot. i've been slowly going through it all but i'm sure the first documents i touched have started to rot again and there are documents i haven't got to yet.

#6 lore raw

Re: [parisc-linux] Cross compiler -- on Alpha?

In reply to [email protected]
Quoted 5 lines
Quoted 3 lines

It might. The only real difference between alpha and i386 to run a cross-compiler on is sizeof(long), and I don't think we rely on that too heavily in gcc.

Wouldn't big endian vs little endian be an issue?

PA-RISC is (usually) big-endian; Alpha and i386 are little-endian. Cross- compiling from i386 works, so this shouldn't be an issue for cross-compiling from Alpha.

Philipp Rumpf

#7 lore raw

Re: [parisc-linux] Cross compiler -- on Alpha?

In reply to [email protected]
Quoted 5 lines

I know there is plenty of software out there that does not use proper handling of pointers and that will break on my Alpha while you can get away with it on intel based machines. The problem is due to bad coding but it could be a good case to try and see if the code is clean enough.

OK, well I gave it a spin -- the linker compiled, with a lot of warnings about integers of different size than pointers. The rest of binutils built but I couldn't build gas, I don't think it was architecture related though:

gcc -g -O2 -o .libs/as-new app.o as.o atof-generic.o bignum-copy.o cond.o depend.o dwarf2dbg.o ecoff.o ehopt.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o listing.o literal.o macro.o messages.o output-file.o
read.o sb.o stabs.o subsegs.o symbols.o write.o tc-hppa.o obj-elf.o atof-ieee.o ../opcodes/.libs/libopcodes.so ../bfd/.libs/libbfd.so ../libiberty/libiberty.a -lm -Wl,--rpath -Wl,/usr/src/parisc/lib tc-hppa.o: In function `tc_gen_reloc':
/usr/src/parisc/binutils/gas/./config/tc-hppa.c:3972: undefined reference to _bfd_elf64_hppa_gen_reloc_type' /usr/src/parisc/binutils/gas/./config/tc-hppa.c:3972: undefined reference to _bfd_elf64_hppa_gen_reloc_type'
collect2: ld returned 1 exit status
make[3]: *** [as-new] Error 1

--
Brian

#8 lore raw

Re: [parisc-linux] Cross compiler -- on Alpha?

Quoted 4 lines · Brian S. Julin

/usr/src/parisc/binutils/gas/./config/tc-hppa.c:3972: undefined reference to _bfd_elf64_hppa_gen_reloc_type' /usr/src/parisc/binutils/gas/./config/tc-hppa.c:3972: undefined reference to _bfd_elf64_hppa_gen_reloc_type'

elf_64_? I think you may have misconfigured it. were you following the recipe on the website?

#9 lore raw

Re: [parisc-linux] Cross compiler -- on Alpha?

In reply to Brian S. Julin
Quoted 7 lines · Brian S. Julin

tc-hppa.o: In function `tc_gen_reloc':
/usr/src/parisc/binutils/gas/./config/tc-hppa.c:3972: undefined reference to _bfd_elf64_hppa_gen_reloc_type' /usr/src/parisc/binutils/gas/./config/tc-hppa.c:3972: undefined reference to _bfd_elf64_hppa_gen_reloc_type'
collect2: ld returned 1 exit status
make[3]: *** [as-new] Error 1

Yeah, the problem here is that some part of the binutils configure script is getting the host and target word size confused and thus thinking that it should be building for an ELF64 instead of ELF32 target.

You cna fix this by undefining BFD64 in tc-hppa.c and possibly some other place, I think. I didn't commit this to CVS because it's really the wrong thing to do. Someone who actually understands the binutils configuration and build system should be able to apply the correct fix...

Signature · 4 lines
David Huggins-Daines, Senior Linux Consultant, Linuxcare, Inc.
613.562.1239 tel
[email protected], http://www.linuxcare.com/
Linuxcare. Support for the revolution.
#15 lore raw
In reply to Ulrich Strelow

Am Wed, 15 Mar 2000 schrieb Ulrich Strelow:

Quoted 1 line

Hi all,

Hi Ulrich,

Quoted 9 lines

I switched my build environment from HP-UX 10.20 SOM to cross compile on x86 ELF and building and booting a kernel works fine. Compiling the kernel now only takes 5-10 minutes compared to 1 to 1 1/2 hours(!) on my 715/33. Great ! But (there is always a but) ...

Because there is currently no network driver for the 715/33 I need to boot with a ramdisk.

I just checked the hardware-database, and it seems that the 715/33 has a standard LASI-LAN-Adaptor (i82596, (old driver: Apricot)). If you enable lasi-support and the "lasi-ethernet"-driver from the network-devices, you should be able to boot with root-nfs.....

Quoted 10 lines

In former times there was copying ramdisk.bin to /usr/src/linux and "make Image", but how to do this now (when "make
Image" no longer works)?

This is what I have tried:
I found the undocumented "-r" switch in palo to add a ramdisk to the lif image. I tried both the original ramdisk.bin and the compiled ramdisk.o but in both cases the kernel is not able to detect the ramdisk.

Quoted 3 lines

Has anyone a solution to this?

Ulrich

Helge.

#16 lore raw
Quoted 4 lines

I just checked the hardware-database, and it seems that the 715/33 has a standard LASI-LAN-Adaptor (i82596, (old driver: Apricot)). If you enable lasi-support and the "lasi-ethernet"-driver from the network-devices, you should be able to boot with root-nfs.....

The problem is, that it has ASP not LASI. The MAC address is not returned by the PDC call the current driver is using thus the driver gives up.

Gyula