Date: Fri, 27 Aug 2010 09:12:22 -0700 From: Patrick Mahan <pmahan@adaranet.com> To: Juli Mallett <jmallett@FreeBSD.org> Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: Cannot build the Mips 32 bit kernel Message-ID: <4C77E3E6.8060002@adaranet.com> In-Reply-To: <AANLkTinhjiGZUbTr98ADZT4cokp8Hb3wqUSveZADWM_D@mail.gmail.com> References: <4C76F4B6.5050607@adaranet.com> <20100826.171545.705015198975915183.imp@bsdimp.com> <AANLkTikXkvBh3EgmYvfAogDb%2BUeM%2BK%2BN26-c6FOJVwTt@mail.gmail.com> <4C76FA9F.2070805@adaranet.com> <AANLkTinhjiGZUbTr98ADZT4cokp8Hb3wqUSveZADWM_D@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Juli Mallett wrote: > On Thu, Aug 26, 2010 at 16:37, Patrick Mahan <pmahan@adaranet.com> wrote: >> We build for mips o32 under 8.0 and our kernel (before we insert the >> rootfile system) is >> >> -rwxr-xr-x 1 pmahan pmahan 38155521 Aug 24 19:22 kernel.octeon.32 >> >> Where when we build it off of head we are seeing >> >> -rwxr-xr-x 1 pmahan pmahan 243364423 Aug 26 09:45 kernel.octeon.32 >> >> ~38 Mbytes versus ~243 Mbytes >> >> a 6x increase in size. So I was playing around with the configuration >> file to decide what to leave out. > > That must be either some difference in allocating space for the root > filesystem or related to having a lot of debugging info and not > stripping the one from HEAD. The Cavium Simple Executive (I don't > know if the proprietary port you're using uses it or not) adds some > bloat, but nothing like that much. My kernels, n64 and o32 both, are > around 8M. I'm not embedding any sort of root filesystem. Okay, problem solved, pilot error (sort of :-p). It was a case of allocating space for the root filesystem. We have build scripts that are suppose to winnow down the stuff put into world/ after we finish a 'buildworld'. This winnowing reduces the overall size of the root filesystem. The script then compares the size of the created filesystem image to the value of MD_ROOT_SIZE in OCTEON1-32 and if it is too small, increase it to the correct size and rebuild the kernel. It seems that our initial build, the root filesystem was not reduced in size and this caused MD_ROOT_SIZE to be set to a really large size and subsequent builds do not reduce the size of MD_ROOT_SIZE thus the resultant kernel builds were too large. It wasn't till I went back and pulled a fresh checkout and carefully ran our build scripts one at a time that I figured this out. I've got some code that is not ready for prime time for building the embedded root filesystem more like how linux uses its initramfs. This method does require messing with a large array in place to hold the root filesystem. Instead, it will be captured in its own data section. Patrick
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C77E3E6.8060002>