From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Using buildroot images (iso/ext2) in real target device (flash drive)
Date: Fri, 27 Apr 2012 22:37:44 +0200 [thread overview]
Message-ID: <201204272237.44841.arnout@mind.be> (raw)
In-Reply-To: <jnea4q$6a2$1@dough.gmane.org>
On Friday 27 April 2012 16:23:20 Willy wrote:
> So I've deleted the output/ folder, made some modifications and rebuilt
> all obtaining a smaller kernel and a smaller fs.
> Now it boot, but always using the bzImage (I've only /boot/grub/* and
> bzImage on my flash usb).
So where did the rest of your rootfs.ext2 go?
> Every modifications does not survive to reboot.
Maybe you changed the rootfs to an initramfs?
> So I've built the vmlinux image and tar fs, but I got
> "Grub Error 13: Invalid or unsupported executable format"
vmlinux is not executable by grub, and a tar file is not readable
by the kernel.
The proper approach is the following:
- Create a /boot/grub/menu.lst in your rootfs skeleton.
- Make sure you have the grub boot loader configured.
- Build kernel and rootfs.ext2. Make sure BR2_LINUX_KERNEL_INSTALL_TARGET
is selected, so the kernel is inside the rootfs.ext2. If you want extra
space in your rootfs to write files to it, set the
BR2_TARGET_ROOTFS_EXT2_BLOCKS variable to the size of the root partition.
Note, though, that genext2fs creates that whole size in memory, so you
need to have enough RAM.
- Write rootfs.ext2 to the root partition: 'cat rootfs.ext2 > /dev/hdc1'
- Run 'grub --device-map=/dev/null --no-floppy' and give the following
commands interactively:
device (hd0) /dev/hdc
root (hd0,0)
setup (hd0)
quit
This installs grub on /dev/hdc and makes it bootable.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
prev parent reply other threads:[~2012-04-27 20:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-01 16:06 [Buildroot] Using buildroot images (iso/ext2) in real target device (flash drive) Willy
2012-03-01 16:59 ` Thomas Petazzoni
2012-03-02 23:00 ` Arnout Vandecappelle
2012-03-03 19:52 ` PHilip RUshik
2012-03-05 9:45 ` Thomas Petazzoni
2012-04-24 13:04 ` Willy
2012-04-27 14:23 ` Willy
2012-04-27 20:37 ` Arnout Vandecappelle [this message]
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=201204272237.44841.arnout@mind.be \
--to=arnout@mind.be \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.