Subject: O2 arcboot 32-bit kernel boot fix

From: "Kaj-Michael Lang" <[email-masked]>
Date: Mon, 16 Aug 2004 20:41:40 +0300

Hi

Played with arcboot today and fixed (for me atleast) loading of 32-bit
kernels.
I've also added a very simple progress thing so you know something is
happening when
the kernel is loaded.
Anyway, the patch can be found here:
http://fairytale.tal.org/pub/talinux/patches/arcboot-O2boot-and-progress.patch

The fix was quite simple, arcboot was loading the kernel over itself, the
 -	.base     = 0x80004000,
+	.base     = 0x80002000,

change is the actual fix. 64-bit kernels loads fine after the fix.

There is some extra stuff (a patch from gentoo, removal debuging from e2fs
lib, etc) too..

-- 
Kaj-Michael Lang , [email-masked]

---

From: Martin Michlmayr <[email-masked]>
Date: Tue, 17 Aug 2004 15:55:50 +0100

> Played with arcboot today and fixed (for me atleast) loading of 32-bit
...
> The fix was quite simple, arcboot was loading the kernel over itself, the

It has previously been suggested that the kernel needs to be patched
but your patch is against arcboot.  Who has to change?
-- 
Martin Michlmayr
[email-masked]

---

From: Max Zaitsev <[email-masked]>
Date: Wed, 18 Aug 2004 14:05:53 +0200

Hi,

good news, but I cannot test your fix because I'm not able to compile a 
working arcboot binary. I've tried self-compilation with cgg 3.3 and 3.4 and 
neither worked (the binary was about 500K large and did nothing). I've tried 
cross-compilation, but it did not complete. The only working binary I was 
able to acquire was unpacked from the debian package. But kernel crashed with 
that anyways (I've tried only 64-bit kernels so far).

It would be very helpfull for me if you could enlighten me with the 
instructions to compile arcboot: which gcc version should I use and which 
tricks shall I apply to get it to compile. Or you may just send me the binary 
(or put it out on your Internet site). Or you can do both :-))

Regards,
Max

---

From: "Kaj-Michael Lang" <[email-masked]>
Date: Wed, 18 Aug 2004 17:33:32 +0300

> working arcboot binary. I've tried self-compilation with cgg 3.3 and 3.4
and

Did you just use the small fix or did you use the whole patch ?

---

From: Max Zaitsev <[email-masked]>
Date: Wed, 18 Aug 2004 16:46:53 +0200

> Did you just use the small fix or did you use the whole patch ?

No, I've just used the original 3.8.1 distribution and could not compile that 
I've tried it like a month ago and did not get anywhere neither with 
self-compilation nor with cross-compilation. I wrote Guido Guenther and he 
had said that he only tried to compile arcboot with gcc 2.95 and that gcc 3.x 
might have problems stripping some symbols that we want from the binary, 
while leaving the others, that we don't want... That would explain the factor 
10 increase in the resulting file size and it's inability to do anything...

So the thing is that the original arcboot 3.8.1 does not work for me if I 
compile (whereas the debian binary of the same version does), so it made no 
sense for me to try to apply your patch. I need to find a way to compile 
arcboot properly first. How do you do that yourself? Or do you think your 
fixes in makefiles make difference already? Actually, you've changed the 
LDFLAGS, which could be the problem... OK, I'll give it a try and let you 
know how it was.

Regards,
Max

---

From: Maxim Zaitsev <[email-masked]>
Date: Wed, 18 Aug 2004 17:52:35 +0200

Ha!!! It works!!! Well, only 32-bit kernels work, but anyways, sorry for 
trouble. I must have tested it before bothering you with stupid questions... 

With regard to booting a 64-bit kernel it all looks OK, loading works and what 
I see in the end is:

Starting 64-bit kernel
--- Press <spacebar> to restart ---

No OOPs, no crash, nothing! Isn't that strange? Any ideas?

Regards,
Max

On Wednesday 18 August 2004 16:46, Max Zaitsev wrote:
> No, I've just used the original 3.8.1 distribution and could not compile
> that I've tried it like a month ago and did not get anywhere neither with
> had said that he only tried to compile arcboot with gcc 2.95 and that gcc
> 3.x might have problems stripping some symbols that we want from the
> binary, while leaving the others, that we don't want... That would explain
> the factor 10 increase in the resulting file size and it's inability to do
> anything...
>

-- 
Dr. Maxim Zaitsev
University Hospital Freiburg
Department of Diagnostic Radiology
Medical Physics
Hugstetterstr. 55
79106 Freiburg
Tel. (761) 270 3800
Fax. (761) 270 3831

---

From: Kaj-Michael Lang <[email-masked]>
Date: Wed, 18 Aug 2004 22:41:09 +0300 (EEST)

> With regard to booting a 64-bit kernel it all looks OK, loading works and what

Don't use vmlinux.64, use plain vmlinux.. that works for me.

-- 
Kaj-Michael Lang, Turku, Finland
[email-masked] http://www.tal.org