Skip to contentSkip to conversation

How to load 2.6.22 kernel (image too large to fit ...)

DISCUSSION Krzysztof Helt 6 participants 11 messages May 18, 2007 – May 19, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

I have tried to load the latest 2.6.22-rc1 and failed miserably. I got 2.6MB kernel after modularization and famous "strip -R. note -R .commend" trick. Nevertheless, it is still too big.

I upgrades SILO to 1.4.13 and still no luck.

Any hints? Are there any silo patches to allow bigger kernels.

Regards,
Krzysztof

----------------------------------------------------
Esej Michela Houellebecqa o Samotniku z Providence
"H.P Lovecraft. Przeciw ¶wiatu, przeciw ¿yciu" ju¿ w ksiegarniach!
http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fd105.html&sid46

#1 lore raw
Quoted 6 lines · Krzysztof Helt

Hi,

I have tried to load the latest 2.6.22-rc1 and failed miserably. I got 2.6MB kernel after modularization and famous "strip -R. note -R .commend" trick. Nevertheless, it is still too big.

08:05 sun:/boot # l
-rwxr-xr-x 1 root root 3655632 Mar 26 16:53 vmlinuz-2.6.20-1.2986.al3.3smp

No problems booting that on a E250. SILO is 1.4.13 too.

Quoted 2 lines

I upgrades SILO to 1.4.13 and still no luck.
Any hints? Are there any silo patches to allow bigger kernels.

make bzImage to build a kernel (rather than make zImage), but I suppose you already have that :-/

Jan

#2 lore raw
In reply to Krzysztof Helt

From: "Krzysztof Helt" <[email protected]>
Date: Fri, 18 May 2007 07:50:31 +0200

Quoted 7 lines

I have tried to load the latest 2.6.22-rc1 and failed miserably. I got 2.6MB kernel after modularization and famous "strip -R. note -R .commend" trick. Nevertheless, it is still too big.

I upgrades SILO to 1.4.13 and still no luck.

Any hints? Are there any silo patches to allow bigger kernels.

Sparc64 can handle up to ~10.5MB kernels, so I guess you are on sparc32?

#3 lore raw
In reply to Krzysztof Helt

Dnia 18-05-2007 o godz. 8:43 David Miller napisa³(a):

Quoted 7 lines

From: "Krzysztof Helt" <[email protected]>
Date: Fri, 18 May 2007 07:50:31 +0200

Quoted 4 lines

I have tried to load the latest 2.6.22-rc1 and failed miserably. I got 2.6MB kernel after modularization and famous "strip -R. note -R .commend" trick. Nevertheless, it is still too big.

Quoted 6 lines
Quoted 3 lines

I upgrades SILO to 1.4.13 and still no luck.

Any hints? Are there any silo patches to allow bigger kernels.

Sparc64 can handle up to ~10.5MB kernels, so I guess you are on sparc32?

Exactly, I tried on sparc32 (SS20). Is it solvable in any way except hacking the silo? I don't know how hack it yet.

Regards,
Krzysztof

----------------------------------------------------
Esej Michela Houellebecqa o Samotniku z Providence
"H.P Lovecraft. Przeciw ¶wiatu, przeciw ¿yciu" ju¿ w ksiegarniach!
http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fd105.html&sid46

#4 lore raw
In reply to Krzysztof Helt
Quoted 10 lines · Krzysztof Helt

Dnia 18-05-2007 o godz. 8:43 David Miller napisał(a):

Quoted 9 lines

From: "Krzysztof Helt" <[email protected]>
Date: Fri, 18 May 2007 07:50:31 +0200

Quoted 6 lines

I have tried to load the latest 2.6.22-rc1 and failed miserably. I got 2.6MB kernel after modularization and famous "strip -R. note -R .commend" trick. Nevertheless, it is still too big.

I upgrades SILO to 1.4.13 and still no luck.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Any hints? Are there any silo patches to allow bigger kernels.

Sparc64 can handle up to ~10.5MB kernels, so I guess you are on sparc32?

Exactly, I tried on sparc32 (SS20). Is it solvable in any way except hacking the silo? I don't know how hack it yet.

Turn off things in your kernel? Modularize things where possible?

~spot

#5 lore raw
In reply to Krzysztof Helt

Hi again,

I overcame the problem with too big kernel with the attached patch, but I run into another problem. Now, the silo says:

"Your kernel cannot fit into the memory destination. This can be resolved by recompiling the kernel with more devices built as modules, or upgrading your kernel to one that supports being loaded to higher memory areas (currently 2.6.3+ or 2.4.26+)."

Does it mean, that 2.6.22-rc1 for sparc32 cannot be relocated?

Regards,
Krzysztof

PS. The patch maps 8MB or 4MB of memory for kernel like for the sparc64 kernel.

------------------------------------------------------------------------

second/main.c +1 -0
diff -urp silo-1.4.13/second/main.c silo-1.4.13.new/second/main.c
@@ -1272,6 +1273,7 @@ try_again:
 		       "built as modules, or upgrading your kernel to one that\n"
 		       "supports being loaded to higher memory areas (currently\n"
 		       "2.6.3+ or 2.4.26+).\n");
+		image_memory_release();
 		goto try_again;
 	    }
 
second/memory.c +128 -1

147 lines not on this page · raw message

#6 lore raw
In reply to Krzysztof Helt

From: Krzysztof Helt <[email protected]>
Date: Sat, 19 May 2007 23:44:53 +0200

Quoted 2 lines

I overcame the problem with too big kernel with the attached patch, but I run into another problem. Now, the silo says:

You haven't told us why you simply cannot make the kernel smaller by building more things as modules, why kill yourself with all of these SILO and kernel hacks when you can solve your problem more easily?

#7 lore raw
In reply to Krzysztof Helt
Quoted 5 lines · Krzysztof Helt

Hi again,

I overcame the problem with too big kernel with the attached patch, but I run into another problem. Now, the silo says:

Quoted 7 lines

"Your kernel cannot fit into the memory destination. This can be resolved by recompiling the kernel with more devices built as modules, or upgrading your kernel to one that supports being loaded to higher memory areas (currently 2.6.3+ or 2.4.26+)."

Does it mean, that 2.6.22-rc1 for sparc32 cannot be relocated?

The patch isn't complete. SILO checks to make sure that the kernel can be relocated. You probably also need to patch up sparc kernel to allow itself to be loaded at an alternate location. Whole lot of work.

Honestly, just compile it with less stuff. I don't have a sparc32 to test anything on, so I'm of no help.

Signature · 2 lines
Ubuntu   : http://www.ubuntu.com/
Linux1394: http://wiki.linux1394.org/
#8 lore raw
In reply to Krzysztof Helt
Quoted 12 lines · Ben Collins
Quoted 11 lines · Krzysztof Helt

Hi again,

I overcame the problem with too big kernel with the attached patch, but I run into another problem. Now, the silo says:

"Your kernel cannot fit into the memory destination. This can be resolved by recompiling the kernel with more devices built as modules, or upgrading your kernel to one that supports being loaded to higher memory areas (currently 2.6.3+ or 2.4.26+)."

Quoted 6 lines
Quoted 1 line

Does it mean, that 2.6.22-rc1 for sparc32 cannot be relocated?

The patch isn't complete. SILO checks to make sure that the kernel can be relocated. You probably also need to patch up sparc kernel to allow itself to be loaded at an alternate location. Whole lot of work.

The silo patch seems complete. It is now kernel hHdrS version, which says it is not relocatable.
If the kernel fits 2.5MB size, the patch does not hurts (just allocate memory and copy kernel back to 2.5MB area).

Quoted 3 lines

Honestly, just compile it with less stuff. I don't have a sparc32 to test anything on, so I'm of no help.

I thought I modularized everything but I rechecked my options and I left nfs compiled into the kernel statically.
Now, it fits for UP kernel.

Thank you for your time,
Krzysztof

#9 lore raw
In reply to Krzysztof Helt

DM> You haven't told us why you simply cannot make the kernel DM> smaller by building more things as modules, why kill yourself DM> with all of these SILO and kernel hacks when you can solve DM> your problem more easily?

Well, it's quite hard nowadays since the base 2.6 kernel has grown quite a lot in features that are not modular. I managed to slim my sparc32 kernel down last year but it was quite a pain. Initrd/initramfs becomes almost a must and I seem to remember that I had to also disable some new 2.6 features to make it fit.

Granted, there are more burning problems with the sparc32 port than enhancing the boot protocol but it is a real problem IMHO.

Signature · 1 line
Meelis Roos
#10 lore raw
In reply to Krzysztof Helt
Quoted 20 lines · Krzysztof Helt
Quoted 12 lines · Ben Collins
Quoted 11 lines · Krzysztof Helt

Hi again,

I overcame the problem with too big kernel with the attached patch, but I run into another problem. Now, the silo says:

"Your kernel cannot fit into the memory destination. This can be resolved by recompiling the kernel with more devices built as modules, or upgrading your kernel to one that supports being loaded to higher memory areas (currently 2.6.3+ or 2.4.26+)."

Quoted 6 lines
Quoted 1 line

Does it mean, that 2.6.22-rc1 for sparc32 cannot be relocated?

The patch isn't complete. SILO checks to make sure that the kernel can be relocated. You probably also need to patch up sparc kernel to allow itself to be loaded at an alternate location. Whole lot of work.

Quoted 4 lines

The silo patch seems complete. It is now kernel hHdrS version, which says it is not relocatable.
If the kernel fits 2.5MB size, the patch does not hurts (just allocate memory and copy kernel back to 2.5MB area).

Sure, SILO side is complete, but the kernel side is a little more difficult. It's not just HdrS that needs fixing, the kernel needs to actually support being loaded to arbitrary locations in memory.

I'd be happy for someone to do this work, though.

Signature · 2 lines
Ubuntu   : http://www.ubuntu.com/
Linux1394: http://wiki.linux1394.org/