All of lore.kernel.org
 help / color / mirror / Atom feed
* SILO on Qemu Sparc v8 unable to boot stripped kernel
@ 2014-07-09  2:51 chase rayfield
  2014-07-09 20:43 ` Sam Ravnborg
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: chase rayfield @ 2014-07-09  2:51 UTC (permalink / raw)
  To: sparclinux

I emailed davem, last week and he told me the appropriate course of action
would be to message the list so here goes.

This is the error SILO in Qemu is printing out:
"ext2 superblock magic is wrong" ... then
"Cannot find a loadable segment in your ELF image."

 I stripped the kernel with  "strip -R .comment -R .note" also tried a myriad of
other options to the same effect. My build of Qemu can boot an older Gentoo
livecd that I have that is also 2.6.32 but I don't have a dot config
and it was built with
a different toolchain. Here are links to most of the relevant stuff if
you want my
catalyst spec files or for me to tar up my silo build etc... just ask.
I have real hardware I can test on but I'd rather not make coasters
especially since I know Qemu *can*
boot a sparc livecd no problem the same kernel version even.

Is is possible I have the kenrel arguments wrong or something of that nature?

The gentoo stage3 it is built from is here...
http://gh0stwriter.net/archive/20140708/stage3-sparc-20140628.tar.bz2
And portage snapshot:
http://gh0stwriter.net/archive/20140708/portage-20140628.tar.bz2
Known good iso:
http://www.gh0stwriter.net/archive/linux-sparc32-install-20111216.iso

You can grab a copy of the WIP iso here:
http://gh0stwriter.net/archive/20140708/install-sparc-minimal-20140620.iso
(includes the stripped kernel that fails to boot)

Unstripped kernel from the above iso
http://www.gh0stwriter.net/archive/20140708/gentoo.gz

My .config
http://gh0stwriter.net/archive/20140708/config-2.6.32-r41-20140708.config

Screenshot of silo failure:
http://gh0stwriter.net/archive/20140708/qemu-silo-fail.png

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SILO on Qemu Sparc v8 unable to boot stripped kernel
  2014-07-09  2:51 SILO on Qemu Sparc v8 unable to boot stripped kernel chase rayfield
@ 2014-07-09 20:43 ` Sam Ravnborg
  2014-07-10  1:50 ` chase rayfield
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2014-07-09 20:43 UTC (permalink / raw)
  To: sparclinux

On Tue, Jul 08, 2014 at 10:51:44PM -0400, chase rayfield wrote:
> I emailed davem, last week and he told me the appropriate course of action
> would be to message the list so here goes.
> 
> This is the error SILO in Qemu is printing out:
> "ext2 superblock magic is wrong" ... then
> "Cannot find a loadable segment in your ELF image."
> 
>  I stripped the kernel with  "strip -R .comment -R .note" also tried a myriad of
> other options to the same effect. My build of Qemu can boot an older Gentoo
> livecd that I have that is also 2.6.32 but I don't have a dot config
> and it was built with
> a different toolchain. Here are links to most of the relevant stuff if
> you want my
> catalyst spec files or for me to tar up my silo build etc... just ask.
> I have real hardware I can test on but I'd rather not make coasters
> especially since I know Qemu *can*
> boot a sparc livecd no problem the same kernel version even.
> 
> Is is possible I have the kenrel arguments wrong or something of that nature?
> 
> The gentoo stage3 it is built from is here...
> http://gh0stwriter.net/archive/20140708/stage3-sparc-20140628.tar.bz2
> And portage snapshot:
> http://gh0stwriter.net/archive/20140708/portage-20140628.tar.bz2
> Known good iso:
> http://www.gh0stwriter.net/archive/linux-sparc32-install-20111216.iso
> 
> You can grab a copy of the WIP iso here:
> http://gh0stwriter.net/archive/20140708/install-sparc-minimal-20140620.iso
> (includes the stripped kernel that fails to boot)
> 
> Unstripped kernel from the above iso
> http://www.gh0stwriter.net/archive/20140708/gentoo.gz
> 
> My .config
> http://gh0stwriter.net/archive/20140708/config-2.6.32-r41-20140708.config
> 
> Screenshot of silo failure:
> http://gh0stwriter.net/archive/20140708/qemu-silo-fail.png

I am confused to see that the screenshot mentions sparc64, but
you refer to sparc v8 which is only sparc32.

The silo version also looks quite dated.
I know some extfs related fixes went in some years ago,
but have not looked up when.
Could you compare the two versions of silo used to see if this give any clue.

	Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SILO on Qemu Sparc v8 unable to boot stripped kernel
  2014-07-09  2:51 SILO on Qemu Sparc v8 unable to boot stripped kernel chase rayfield
  2014-07-09 20:43 ` Sam Ravnborg
@ 2014-07-10  1:50 ` chase rayfield
  2014-07-12  4:08 ` chase rayfield
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: chase rayfield @ 2014-07-10  1:50 UTC (permalink / raw)
  To: sparclinux

Sam, Sparc64 is merely what the default catalyst silo.conf happens to
have in it it is in
fact a 32bit silo running in qemu-system-sparc

I built silo with the patch from LFS... I was unable to build SILO
directly from davem's git.
Since I built the iso itself manually (I had to strip the kernel
manually) I also changed the
volume to indicate that it is a sparc32 ISO.

http://cross-lfs.org/view/git/sparc/final-system/silo.html

The following is with gcc 4.5.4 and binutils 2.21.1 I just doubled checked
the following results and that the LFS silo produces the same results
as in the screenshot.

Also if I just untar, patch with silo-1.4.14-fixes-3.patch and make it
fails with
o malloc.o
mallocl.o: In function `calloc':
malloc.c:(.text+0x48): undefined reference to `.umul'
make[1]: *** [b2.out] Error 1
make[1]: *** Waiting for unfinished jobs....
malloc.o: In function `calloc':
malloc.c:(.text+0x48): undefined reference to `.umul'

So I changed CC=gcc -m32 to CC=gcc -m32 -mcpu=v8. And it builds...
and will boot the older kernel I have but not the one I build/stripped myself.


If I attempt to build silo from git
ld -m elf32_sparc -N -Ttext 0x280000 -Bstatic -o silotftp crt0.o
decompnet.o ../common/console.o ../common/printf.o malloc.o
../common/jmp.o ../common/prom.o ../common/tree.o ../common/urem.o
../common/udiv.o ../common/stringops1.o ../common/ffs.o
../common/divdi3.o ../common/udivdi3.o bmark.o mainnet.o cmdline.o
disk.o file.o misc.o cfg.o strtol.o ranges.o timer.o memory.o
fs/libfs.a mul.o ../common/rem.o ../common/sdiv.o umul.o
../common/stringops2.o ls.o muldi3.o mark.o `gcc -m32
-print-libgcc-file-name`
decompnet.o: In function `error':
decomp.c:(.text+0x4f8): undefined reference to `__longjmp_chk'
file.o: In function `unget_gzip_input':
file.c:(.text+0x40): undefined reference to `__longjmp_chk'
file.o: In function `get_gzip_input':
file.c:(.text+0x180): undefined reference to `__longjmp_chk'
cfg.o: In function `cfg_error':
cfg.c:(.text+0x190): undefined reference to `__longjmp_chk'
make[1]: *** [silotftp] Error 1

Chase Rayfield

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SILO on Qemu Sparc v8 unable to boot stripped kernel
  2014-07-09  2:51 SILO on Qemu Sparc v8 unable to boot stripped kernel chase rayfield
  2014-07-09 20:43 ` Sam Ravnborg
  2014-07-10  1:50 ` chase rayfield
@ 2014-07-12  4:08 ` chase rayfield
  2014-07-14  1:08 ` chase rayfield
  2014-07-14  6:11 ` Sam Ravnborg
  4 siblings, 0 replies; 6+ messages in thread
From: chase rayfield @ 2014-07-12  4:08 UTC (permalink / raw)
  To: sparclinux

I made some progress on this.

The problem is silo is failing to load the compressed image. I copied
an uncompressed kernel onto the ISO and it booted correctly.

I expect silo should be able to load a zImage though...

Chase

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SILO on Qemu Sparc v8 unable to boot stripped kernel
  2014-07-09  2:51 SILO on Qemu Sparc v8 unable to boot stripped kernel chase rayfield
                   ` (2 preceding siblings ...)
  2014-07-12  4:08 ` chase rayfield
@ 2014-07-14  1:08 ` chase rayfield
  2014-07-14  6:11 ` Sam Ravnborg
  4 siblings, 0 replies; 6+ messages in thread
From: chase rayfield @ 2014-07-14  1:08 UTC (permalink / raw)
  To: sparclinux

I sorted out the remaining issues and you can now download the first
working version I have produced links below. Only tested in QEMU so
far due to lack of time since I started my new job.

This is using Glibc 2.17, GCC 4.5.4, Binutils 2.21.1 and Linux
2.6.32-r41 (Gentoo revision 41) all the packages are at the latest
stable revision otherwise. I may add a version that includes more
things to demo and such to make testing sparc32 convenient in QEMU or
real hardware.

http://www.gh0stwriter.net/gentoo/

http://www.gh0stwriter.net/archive/install-sparc-minimal-20140620.iso


Chase Rayfield

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SILO on Qemu Sparc v8 unable to boot stripped kernel
  2014-07-09  2:51 SILO on Qemu Sparc v8 unable to boot stripped kernel chase rayfield
                   ` (3 preceding siblings ...)
  2014-07-14  1:08 ` chase rayfield
@ 2014-07-14  6:11 ` Sam Ravnborg
  4 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2014-07-14  6:11 UTC (permalink / raw)
  To: sparclinux

On Sun, Jul 13, 2014 at 09:08:47PM -0400, chase rayfield wrote:
> I sorted out the remaining issues and you can now download the first
> working version I have produced links below. Only tested in QEMU so
> far due to lack of time since I started my new job.
> 
> This is using Glibc 2.17, GCC 4.5.4, Binutils 2.21.1 and Linux
> 2.6.32-r41 (Gentoo revision 41) all the packages are at the latest
> stable revision otherwise. I may add a version that includes more
> things to demo and such to make testing sparc32 convenient in QEMU or
> real hardware.
> 
> http://www.gh0stwriter.net/gentoo/
> 
> http://www.gh0stwriter.net/archive/install-sparc-minimal-20140620.iso

Thanks for providing these.
Can you find time to tell what the issues was - so others can avoid the same.
Even if it was some stupid thing others could fail into the same.

	Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-14  6:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-09  2:51 SILO on Qemu Sparc v8 unable to boot stripped kernel chase rayfield
2014-07-09 20:43 ` Sam Ravnborg
2014-07-10  1:50 ` chase rayfield
2014-07-12  4:08 ` chase rayfield
2014-07-14  1:08 ` chase rayfield
2014-07-14  6:11 ` Sam Ravnborg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.