Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] need help making bootable image
Date: Sun, 20 Nov 2011 09:26:55 +0100	[thread overview]
Message-ID: <20111120092655.5a603142@skate> (raw)
In-Reply-To: <FE2CFD94-31A4-4D5D-B6B0-634C6358BE93@jakesullivan.com>

Hello,

Le Sat, 19 Nov 2011 12:51:06 -0800,
Jacob Sullivan <mail@jakesullivan.com> a ?crit :

> Current status.  I have a buildroot ISO image that I can boot in qemu
> and a buildroot ext2 image that I can mount either in ubuntu or in
> qemu when I boot with the ISO image.  The changes that I made to the
> default build are minimal.  I added ext2 to buildroot and the kernel,
> added nano to buildroot and fdsk to busybox.  I also changed the tty
> in buildroot to tty1 so that I could get a console prompt when I
> booted in qemu.  I made an empty disk image, mounted it and made a
> primary partition formatted ext2, mounted that and copied in the root
> file structure.  I then unmounted it and tried to install grub on the
> image.  ubuntu has grub 2, and I couldn't figure out how to use the
> grub that buildroot created.  next, I booted qemu using the ISO as
> boot and the disk image as the hard drive.  I installed grub onto the
> hdd image (from inside qemu) and tried to boot from the drive.  No
> luck, I get an error stating that the drive is read only and all the
> attempts to open /dev/* fail.  I googled the error code and all the
> answers pointed to a corrupt drive.  I started all over and got the
> same error.

I don't understand why you're trying to mix an ISO image and an ext2
partition here. Why don't you simply make your ext2 image bootable ?

I have some script stuff that does that here (create partitions,
loopback mount them, install grub, etc.), I could extract it and make it
available if you're interested.

> 1) is this the right approach, or am I missing an obvious step?

The steps to install Grub, create partitions and so on require to be
root, this is the reason why Buildroot does not do this work. But
certainly, we could better document how to proceed to do these things.

> 2) is there a reason that the inittab file only has getty on a serial
> port by default? 

As answered by Bjorn, typical embedded systems use a serial port for
debugging purposes.

> 3) what is the recommended way of making changes to
> buildroot so that when a new version comes out I don't lose all my
> changes.  I thought that I would just need to put my .configs into
> source control, but it looks like I need to change the inittab file
> in the skeleton.  How do other people handle configuration changes
> that aren't covered by any of the .configs (or the various make
> menuconfigs)?

You should not change the inittab of the skeleton, because that will
prevent you from making upgrades to newer Buildroot versions.

Instead, use a custom post-build script (BR2_POST_BUILD_SCRIPT) that
tweaks the inittab.

See http://elinux.org/images/2/2a/Using-buildroot-real-project.pdf,
page 22, 23, 24 and 25.

> 
> Note:  I didn't search the buildroot archives.  I tried, but I keep
> getting an error from google stating that I have been blocked from
> that service.

The archives are available at
http://lists.busybox.net/pipermail/buildroot/. Do you have a problem
access this URL ?

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  parent reply	other threads:[~2011-11-20  8:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-19 20:51 [Buildroot] need help making bootable image Jacob Sullivan
2011-11-19 21:42 ` Bjørn Forsman
2011-11-20  8:26 ` Thomas Petazzoni [this message]
2011-11-20 22:34   ` Jacob Sullivan
2011-11-21  8:31     ` Thomas Petazzoni

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=20111120092655.5a603142@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --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