* [Buildroot] Creating a filesystem for Real Time Linux using QEMU
@ 2009-11-16 6:05 Bogdan Cristea
2009-11-16 8:51 ` hedwin.koning at gmail.com
0 siblings, 1 reply; 6+ messages in thread
From: Bogdan Cristea @ 2009-11-16 6:05 UTC (permalink / raw)
To: buildroot
I have been able to use buildroot (buildroot-20091114.tar.bz2) in order to
build a filesystem for Real Time Linux. I have been able to boot Linux in QEMU
with the following command:
qemu -kernel $LOCATION/bzImage \
-hda $LOCATION/rootfs.i686.ext2 \
-append "root=/dev/sda"
However, the file system is detected as read only, which could be a problem
since I need to make my changes.
Someone else suggested to use a different approach, based on initramfs option
(in build root menu) which loads the filesystem into RAM, but in this case the
changes are not permanent.
Could you advise please ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Creating a filesystem for Real Time Linux using QEMU
2009-11-16 6:05 [Buildroot] Creating a filesystem for Real Time Linux using QEMU Bogdan Cristea
@ 2009-11-16 8:51 ` hedwin.koning at gmail.com
2009-11-16 9:34 ` Bogdan Cristea
0 siblings, 1 reply; 6+ messages in thread
From: hedwin.koning at gmail.com @ 2009-11-16 8:51 UTC (permalink / raw)
To: buildroot
Bogdan Cristea wrote:
> I have been able to use buildroot (buildroot-20091114.tar.bz2) in order to
> build a filesystem for Real Time Linux. I have been able to boot Linux in QEMU
> with the following command:
>
> qemu -kernel $LOCATION/bzImage \
> -hda $LOCATION/rootfs.i686.ext2 \
> -append "root=/dev/sda"
>
> However, the file system is detected as read only, which could be a problem
> since I need to make my changes.
>
> Someone else suggested to use a different approach, based on initramfs option
> (in build root menu) which loads the filesystem into RAM, but in this case the
> changes are not permanent.
>
> Could you advise please ?
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
>
Hi
Add "rw" to your append command.
So change it to -append "root=/dev/sda rw"
Hedwin Koning
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Creating a filesystem for Real Time Linux using QEMU
2009-11-16 8:51 ` hedwin.koning at gmail.com
@ 2009-11-16 9:34 ` Bogdan Cristea
2009-11-16 19:44 ` Chris Packham
2009-11-17 0:18 ` Hedwin Koning
0 siblings, 2 replies; 6+ messages in thread
From: Bogdan Cristea @ 2009-11-16 9:34 UTC (permalink / raw)
To: buildroot
On Monday 16 November 2009 10:51:33 you wrote:
> Add "rw" to your append command.
>
> So change it to -append "root=/dev/sda rw"
>
Thanks for the tip, it allows me to write to the virtual hard disk, but still
the changes are not permanent.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Creating a filesystem for Real Time Linux using QEMU
2009-11-16 9:34 ` Bogdan Cristea
@ 2009-11-16 19:44 ` Chris Packham
2009-11-17 0:18 ` Hedwin Koning
1 sibling, 0 replies; 6+ messages in thread
From: Chris Packham @ 2009-11-16 19:44 UTC (permalink / raw)
To: buildroot
It depends what you want to do. Normally (in the way I use it)
buildroot generates a root file system which I can then load onto an
embedded (or emulated) target. I generally leave this as my software
image for that device, that way I can guarantee what the device boots
up with.
The contents of the generated file system are determined by what I've
configured buildroot to install for me. Any additions/changes to the
contents of that image I make by changing my buildroot config and
recompiling. I generally consider that file system readonly or at the
very least not persistent.
If I want to store something on my target I do this on some other
mounted media (usually flash). Others might write the image into the
devices flash and allow changes to be saved into flash. Both
approaches have their pros and cons.
When using qemu you can use the qemu-img utility to generate a fake
hard drive and feed it to qemu.
On your host PC do this once to create a new image
qemu-img create -f raw flash.img 32M
Invoke qemu feeding it the -hdb option for a second hard drive
qemu -kernel $LOCATION/bzImage \
-hda $LOCATION/rootfs.i686.ext2 \
-hdb flash.img \
-append "root=/dev/sda"
On the emulated target you can mount it
mount -t ext2 /dev/hdb /mnt/writeable
You can play with various files in buildroot to have it mounted
automatically e.g. target/generic/target_skeleton/etc/fstab or
target/device/<company>/<board>/target_skeleton/etc/fstab
It may also be worth looking at qemu's copy-on-write or snapshot
capabilities. I've never used it but it sounds neat and will probably
allow you to start with an image generated by buildroot and make
modifications to that image from the emulated target.
---
Regards,
Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Creating a filesystem for Real Time Linux using QEMU
2009-11-16 9:34 ` Bogdan Cristea
2009-11-16 19:44 ` Chris Packham
@ 2009-11-17 0:18 ` Hedwin Koning
2009-11-17 5:22 ` Bogdan Cristea
1 sibling, 1 reply; 6+ messages in thread
From: Hedwin Koning @ 2009-11-17 0:18 UTC (permalink / raw)
To: buildroot
Bogdan Cristea wrote:
> On Monday 16 November 2009 10:51:33 you wrote:
>
>> Add "rw" to your append command.
>>
>> So change it to -append "root=/dev/sda rw"
>>
>>
>
> Thanks for the tip, it allows me to write to the virtual hard disk, but still
> the changes are not permanent.
>
>
Hi,
Hmm weird.
This is what I use to start qemu for 386:
qemu -kernel bzImage.1 -hda hd.img -append "root=/dev/sda rw
init=./init"
And this is what I use for mips emulation:
../repos/mipsel-softmmu/qemu-system-mipsel -M malta --kernel
./vmlinux -hda hda256m-img -append "root=/dev/hda rw" -m 128 -nographic
In both cases any changes I make in the file system during emulation is
persistent.
Did you also check the file permission of the virtual disk drive you are
using? But if rw the you should have seen that the kernel is complaining
when trying to write anything to the disk.
Hedwin Koning.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Creating a filesystem for Real Time Linux using QEMU
2009-11-17 0:18 ` Hedwin Koning
@ 2009-11-17 5:22 ` Bogdan Cristea
0 siblings, 0 replies; 6+ messages in thread
From: Bogdan Cristea @ 2009-11-17 5:22 UTC (permalink / raw)
To: buildroot
On Tuesday 17 November 2009 02:18:41 you wrote:
> Bogdan Cristea wrote:
> > On Monday 16 November 2009 10:51:33 you wrote:
> >> Add "rw" to your append command.
> >>
> >> So change it to -append "root=/dev/sda rw"
> >
> > Thanks for the tip, it allows me to write to the virtual hard disk, but
> > still the changes are not permanent.
>
> Hi,
>
> Hmm weird.
>
> This is what I use to start qemu for 386:
>
> qemu -kernel bzImage.1 -hda hd.img -append "root=/dev/sda rw
> init=./init"
>
>
> And this is what I use for mips emulation:
>
> ../repos/mipsel-softmmu/qemu-system-mipsel -M malta --kernel
> ./vmlinux -hda hda256m-img -append "root=/dev/hda rw" -m 128 -nographic
>
> In both cases any changes I make in the file system during emulation is
> persistent.
>
> Did you also check the file permission of the virtual disk drive you are
> using? But if rw the you should have seen that the kernel is complaining
> when trying to write anything to the disk.
>
> Hedwin Koning.
>
Well, I have tried to change the root password and add a new user and it seems
that the changes are not always recorded.
However I have just begun to play with RT Linux in QEMU, but with the latest
file system I have managed to compile I have been able to add a new user and
change the fstab file. So thank you all for your help.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-11-17 5:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-16 6:05 [Buildroot] Creating a filesystem for Real Time Linux using QEMU Bogdan Cristea
2009-11-16 8:51 ` hedwin.koning at gmail.com
2009-11-16 9:34 ` Bogdan Cristea
2009-11-16 19:44 ` Chris Packham
2009-11-17 0:18 ` Hedwin Koning
2009-11-17 5:22 ` Bogdan Cristea
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.