How to generate a image

396 views
Skip to first unread message

p4u

unread,
Jun 19, 2012, 3:50:29 PM6/19/12
to raspberrypi...@googlegroups.com
I have compiled the source and in the output directory (bin/raspberrypi/) I see the root filesystem and the kernel image.
Any idea how to package both to have a single image ready to copy in the SD card?

I have been looking for which kind of bootloader has the RSpi, but nothing relevant found. Do you know how Arch/Debian are preparing the final image?
I see in the Arch Linux image that there is a small FAT partition (boot), does the bootloader looks for it?

I found this tool: https://github.com/raspberrypi/tools/tree/master/mkimage
Which seems to be used to prepare the kernel image, maybe it can be useful.

Cheers

Nathan Huizinga

unread,
Jun 21, 2012, 3:29:17 PM6/21/12
to raspberrypi...@googlegroups.com
Hi p4u,

The Rpi �bootloader� is loading the linux kernel image, from the FAT
partition. This partition also contains the GPU firmware. A second
partition (Ext2) contains the Linux root file system.

Currently I�m developing a tool for building a SD card image, which will
contain both FAT and Ext4 partitions and the needed files for booting
the Rpi. That�s on top of my todo list ;-)

Thanks for the link. It looks very interesting...

Grtz,
Nathan.
> --
> You received this message because you are subscribed to the Google
> Groups "Raspberry Pi Openwrt Development" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/raspberrypi-openwrt-dev/-/gtQvtcQ62OsJ.
> To post to this group, send email to
> raspberrypi...@googlegroups.com.
> To unsubscribe from this group, send email to
> raspberrypi-openw...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/raspberrypi-openwrt-dev?hl=en.

Pau

unread,
Jun 22, 2012, 7:47:31 AM6/22/12
to raspberrypi...@googlegroups.com
The Rpi ¨bootloader¨ is loading the linux kernel image, from the FAT partition. This partition also contains the GPU firmware.
Understood.


A second partition (Ext2) contains the Linux root file system.
I think you wanted to say "any" EXT file system (because Arch is using Ext4 for instance).
However I think it would be very interesting to use (or leave user choose) Squash + JFFS2 instead ExtN, like OpenWRT is doing by default.
First because it is better for Flash card health, and second because a read only FS with few writes would be better for a device like RSpi (you are unplugging it without several times without umount the FS).
As far I know it is just a matter of enable this option in OpenWRT menuconfig.


Currently I´m developing a tool for building a SD card image, which will contain both FAT and Ext4 partitions and the needed files for booting the Rpi. That´s on top of my todo list ;-)
Cool! Let me know when you have the first version, I'll test it.

Cheers
--
./p4u




To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/raspberrypi-openwrt-dev?hl=en.
--
You received this message because you are subscribed to the Google Groups "Raspberry Pi Openwrt Development" group.
To post to this group, send email to raspberrypi-openwrt-dev@googlegroups.com.
To unsubscribe from this group, send email to raspberrypi-openwrt-dev+unsub...@googlegroups.com.

Nathan Huizinga

unread,
Jun 30, 2012, 4:58:02 PM6/30/12
to raspberrypi...@googlegroups.com
Hi p4u,

Currently all (?) Rpi distributions are using an Ext3/4 partition
holding the root file system. My first goal is to make an identical
image with a single FAT and single Ext N partition, which is bootable by
an Rpi. When the whole openwrt based toolchain is working, changing the
FS type for the root file system would be a wise step.

First things first:
1) make it work
2) start tweaking ;-)

The prototype of the "genfatfs" tool is based on the "genext2fs"
(http://genext2fs.sourceforge.net/) tool. It will have compatible
options, when applicable to both Ext2 and Fat. I've started to integrate
"genfatfs" into the openwrt environment and should be able to test it in
the next few days. Hopefully I can release it soon for you to test it.

Currently I cannot validate the generated image, as I don't have a Rpi
to test with. :-( So expect a bumpy ride until the first login prompt ;-)

Grtz,
Nathan.
> https://github.com/__raspberrypi/tools/tree/master/__mkimage
> <https://github.com/raspberrypi/tools/tree/master/mkimage>
> Which seems to be used to prepare the kernel image, maybe it can
> be useful.
>
> Cheers
>
> --
> You received this message because you are subscribed to the Google
> Groups "Raspberry Pi Openwrt Development" group.
> To view this discussion on the web visit
> https://groups.google.com/d/__msg/raspberrypi-openwrt-dev/-/__gtQvtcQ62OsJ
> <https://groups.google.com/d/msg/raspberrypi-openwrt-dev/-/gtQvtcQ62OsJ>.
> To post to this group, send email to
> raspberrypi-openwrt-dev@__googlegroups.com
> <mailto:raspberrypi...@googlegroups.com>.
> To unsubscribe from this group, send email to
> raspberrypi-openwr...@googlegroups.com
> <mailto:raspberrypi-openwrt-dev%2Bunsu...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/__group/raspberrypi-openwrt-dev?__hl=en
> <http://groups.google.com/group/raspberrypi-openwrt-dev?hl=en>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Raspberry Pi Openwrt Development" group.
> To post to this group, send email to
> raspberrypi-openwrt-dev@__googlegroups.com
> <mailto:raspberrypi...@googlegroups.com>.
> To unsubscribe from this group, send email to
> raspberrypi-openwr...@googlegroups.com
> <mailto:raspberrypi-openwrt-dev%2Bunsu...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/__group/raspberrypi-openwrt-dev?__hl=en
> <http://groups.google.com/group/raspberrypi-openwrt-dev?hl=en>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Raspberry Pi Openwrt Development" group.
> To post to this group, send email to
> raspberrypi...@googlegroups.com.
> To unsubscribe from this group, send email to
> raspberrypi-openw...@googlegroups.com.

Pau

unread,
Jul 1, 2012, 10:54:03 AM7/1/12
to raspberrypi...@googlegroups.com
Ok.
I will try it in my RSpi when you finish the first alpha version.

Cheers
--
./p4u




        To unsubscribe from this group, send email to

        For more options, visit this group at
        http://groups.google.com/__group/raspberrypi-openwrt-dev?__hl=en
        <http://groups.google.com/group/raspberrypi-openwrt-dev?hl=en>.



    --
    You received this message because you are subscribed to the Google
    Groups "Raspberry Pi Openwrt Development" group.
    To post to this group, send email to
    raspberrypi-openwrt-dev@__googlegroups.com

    To unsubscribe from this group, send email to



--
You received this message because you are subscribed to the Google
Groups "Raspberry Pi Openwrt Development" group.
To post to this group, send email to

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/raspberrypi-openwrt-dev?hl=en.
--
You received this message because you are subscribed to the Google Groups "Raspberry Pi Openwrt Development" group.
To post to this group, send email to raspberrypi-openwrt-dev@googlegroups.com.
To unsubscribe from this group, send email to raspberrypi-openwrt-dev+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages