Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bifferos <bifferos@yahoo.co.uk>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] bifferboard: new board
Date: Sun, 18 Mar 2012 16:12:39 +0000	[thread overview]
Message-ID: <4F660977.4040806@yahoo.co.uk> (raw)
In-Reply-To: <201203181450.44385.arnout@mind.be>

On 03/18/2012 01:50 PM, Arnout Vandecappelle wrote:
> On Monday 12 March 2012 02:23:35 bifferos wrote:
>> Write protecting the kernel text: 1048k
>> Write protecting the kernel read-only data: 164k
>> init[1]: segfault at 0 ip   (null) sp bf95bf40 error 4 in
>> busybox[8048000+7c000]
>   Since this segmentation fault is in init, it will be tough to debug.
> Judging from the address, it in fact happens even before init is
> started.  Is it possible that there isn't enough RAM to run busybox?
>

I have a hard time believing there is not enough RAM  I have copied the 
generated busybox onto the working system and run it there, and it 
executes OK, so the same system can execute two instances of the busybox 
binary (from two different places on rootfs), and they both run OK.

I learnt something new the other day - an initramfs compiled into the 
kernel can be compressed, however the kernel compression works ontop of 
that.  So if you specify CONFIG_INITRAMFS_SOURCE it is pointless to 
specify initramfs compression other than 'None', and in fact this is 
probably why lzma compression for initramfs in conjunction with lzma 
compression for kernel gives Ooops on kernel boot for most recent 
kernels (2.6.37 -> 3.3), perhaps because the compressed is larger than 
the uncompressed initramfs.. or something.  When I used bz2 initramfs 
compression (or any other compression) instead of lzma, it worked.  Now 
I switched initramfs compression to 'none' and removed the support for 
bz2 compressed initramfs and saved myself another 20k of space - handy 
to know if your storage is constrained, but not immediately obvious 
unless you've done the experiment.

So, why was I messing about with this?  To make it easier to pull out 
the cpio after the fact.  I switched kernel compression to bz2, 
initramfs to 'none', searched for BZh header in kernel, pulled out the 
binary from there, uncompressed with bz2 (it ignores junk at the end of 
the file, fortunately), and looked at the resulting binary.  Yes, 
there's definitely a cpio there, it's got the header '070701', and it 
matches the cpio generated by buildroot.  It also seems to indicate cpio 
generated with the right options (not that I believed buildroot would 
have screwed that up or everyone would have noticed).  CPIO starts at 
about the right place, and it's the right length.  I can see busybox and 
its strings inside it, it's really beginning to look doubtful it's 
corrupted, the only thing I haven't done is pull it out of the cpio 
again and try to run it.

Now I'm wondering if there is something that has been activated in 
busybox, some feature, which requires kernel support, and (since my 
kernel is minimal) perhaps it doesn't have it, and perhaps init doesn't 
handle the lack of that support gracefully and crashes.  Nothing comes 
to mind though.

regards,
Biff

  reply	other threads:[~2012-03-18 16:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01  0:52 [Buildroot] Kernel and buildroot in 1MB bifferos
2012-03-01  7:50 ` Thomas Petazzoni
2012-03-01 11:13   ` bifferos
2012-03-03 15:29     ` Arnout Vandecappelle
2012-03-03 15:35       ` [Buildroot] [PATCH] bifferboard: new board Arnout Vandecappelle
2012-03-05  9:49         ` Thomas Petazzoni
2012-03-06  7:00           ` Arnout Vandecappelle
2012-03-11 10:58           ` [Buildroot] [PATCH v2] " Arnout Vandecappelle
2012-03-12 14:46             ` bifferos
2012-03-12  1:23         ` [Buildroot] [PATCH] " bifferos
2012-03-16  1:58           ` [Buildroot] Debugging /sbin/init startup issues bifferos
2012-03-17  4:03             ` Charles Krinke
2012-03-17 14:10               ` bifferos
2012-03-18 13:50           ` [Buildroot] [PATCH] bifferboard: new board Arnout Vandecappelle
2012-03-18 16:12             ` bifferos [this message]
2012-03-18 17:13               ` Arnout Vandecappelle
2012-03-18 19:51                 ` Alexandre Pereira da Silva
2012-03-18 20:54                 ` bifferos
2012-03-18 21:40                   ` Arnout Vandecappelle
2012-03-19 12:36                     ` bifferos
     [not found]       ` <4F525794.5010406@yahoo.co.uk>
2012-03-03 17:00         ` [Buildroot] Kernel and buildroot in 1MB Arnout Vandecappelle
2012-03-01 12:18 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F660977.4040806@yahoo.co.uk \
    --to=bifferos@yahoo.co.uk \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox