Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: G5 powermacs



>> When I was working on incorporating G5 support ( patches from someone
>> else, I just helped getting them into the tree ) this was what I got:
>>
>> - kernels had to be loaded directly, without ofwboot.xcf, at least for
>>   netbooting. There's a size limit imposed by OF which seems to be
>>   about 4MB, bigger kernels will randomly crash or not load at all
>>   IIRC. G5s don't have BARs, I'm not sure ofwboot knows that.
> 
> Then the kernel needs to go on a real diet.  In -current the
> default POWERMAC_G5 kernel config results in a 6.1MB kernel file,
> with sizes such as this:
> 
> mt: {57} size /u/build/HEAD/obj/macppc/sys/arch/macppc/compile/POWERMAC_G5/netbsd
>    text    data     bss     dec     hex filename
> 3366639 2350212  125796 5842647  5926d7 /u/build/HEAD/obj/macppc/sys/arch/macppc/compile/POWERMAC_G5/netbsd
> mt: {58} 
> 
> Even if we just add text+data, we get to 5.7MB.

OK, by eleminiating the MEMORY_DISK and disabling various options
(NTP, KTRACE, SYSV*, USERCONF, SYSCTL_INCLUDE_DESCR, COMPAT_*, NFS,
QUOTA*, UFS_EXTATTR, PCIVERBOSE, MIIVERBOSE, vnd, md, clockctl, nsmb
and all the MEMORY_DISK* options) in the POWERMAC_G5 kernel, I can get
it down to below 4MB:

mt: {68} ls -l /u/build/HEAD/obj/macppc/sys/arch/macppc/compile/TWEAK_G5/netbsd
-rwxr-xr-x  1 he  wheel  3228276 Jun  5 14:28 /u/build/HEAD/obj/macppc/sys/arch/macppc/compile/TWEAK_G5/netbsd*
mt: {69} size !$
size /u/build/HEAD/obj/macppc/sys/arch/macppc/compile/TWEAK_G5/netbsd
   text    data     bss     dec     hex filename
2816851   44628  115100 2976579  2d6b43 /u/build/HEAD/obj/macppc/sys/arch/macppc/compile/TWEAK_G5/netbsd
mt: {70}

So that's 2.8MB text+data.  But with no MEMORY_DISK there's no way to
include the install tools in the kernel, and with only 1.2MB left,
this is half of the size of the existing MEMORY_DISK.  With no NFS, it
can't be used to net-mount file systems either.  Hm.  Both i386 and
amd64 have largish MEMORY_DISK* images embedded inside their INSTALL
kernels, so apparently that's not a model to follow either.

Adding in NFS and CD9660 gets me to

mt: {93} ls -l           /u/build/HEAD/obj/macppc/sys/arch/macppc/compile/TWEAK_G5/netbsd
-rwxr-xr-x  1 he  wheel  3435112 Jun  5 14:40 /u/build/HEAD/obj/macppc/sys/arch/macppc/compile/TWEAK_G5/netbsd*
mt: {94} size !$
size /u/build/HEAD/obj/macppc/sys/arch/macppc/compile/TWEAK_G5/netbsd
   text    data     bss     dec     hex filename
3008271   44884  124060 3177215  307aff /u/build/HEAD/obj/macppc/sys/arch/macppc/compile/TWEAK_G5/netbsd
mt: {95}

which is 3.05MB text+data, so if I can use a cd9660 file system as the
root file system that might be a workable path to pursue.

Regards,

- Håvard


Home | Main Index | Thread Index | Old Index