build ext4 images

1,743 views
Skip to first unread message

andria

unread,
May 12, 2011, 3:38:53 PM5/12/11
to Android Building
Hi,

I was wondering if it is possible to build ext4 images instead of
yaffs2 images for the android emulator. My goal is to use mount
system, data and cache with ext4. I work with the version 2.3 of
android : gingerbread.

Thanks

Akash Choudhari

unread,
May 12, 2011, 4:00:18 PM5/12/11
to android-...@googlegroups.com
Yes 

Refer to

- Akash


--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

andria

unread,
May 13, 2011, 10:12:38 AM5/13/11
to Android Building
Hi,

I tried simg2img and the command prints 'bad magic' when I use it on
userdata.img. To get an ext4 image I used "adb pull /data dest/" then
the make_ext4 command.

The Makefile in build/core/ seems intersting. There are tests which
choose if the images will be yaffs2 or ext2/3/4. What I don't
understant is why it is not used? I added "echo .. >> /tmp/result"
commands before some tests to get the default value of parameters but
the output file is never created.


On 12 mai, 22:00, Akash Choudhari <akas...@gmail.com> wrote:
> Yes
>
> Refer tohttp://www.omappedia.org/wiki/Using_EMMC_on_OMAP4_devices#System.img_...

Magnus Bäck

unread,
May 13, 2011, 10:37:23 AM5/13/11
to android-...@googlegroups.com
On Friday, May 13, 2011 at 16:12 CEST,
andria <andr...@gmail.com> wrote:

> I tried simg2img and the command prints 'bad magic' when I use it on
> userdata.img. To get an ext4 image I used "adb pull /data dest/" then
> the make_ext4 command.
>
> The Makefile in build/core/ seems intersting. There are tests which
> choose if the images will be yaffs2 or ext2/3/4. What I don't
> understant is why it is not used? I added "echo .. >> /tmp/result"
> commands before some tests to get the default value of parameters but
> the output file is never created.

How did you add those commands? The makefile is not a shell script where
you can add generic commands wherever you like. If you want to obtain
the value of a variable at a certain point I often use the $(error ...)
macro to halt execution with a message:

$(error Interesting variable: "$(TARGET_BOOTIMAGE_USE_EXT2)")

Not sure if the double quotes will survive to the actual message, but
it's a good idea to surround the variable reference by some character
that will be printed -- otherwise it'll be hard to distinguish between
a variable that's really empty and one that contains one or more spaces.
As strings are often checked for emptiness that distinction can be
vital.

If $(TARGET_BOOTIMAGE_USE_EXT2) isn't set anywhere in your source code
it'll be empty, meaning you'll get yaffs images.

--
Magnus B�ck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson

andria

unread,
May 16, 2011, 3:03:01 AM5/16/11
to Android Building
Hi,

Here is what my commands look like

@echo "TARGET_BOOTIMAGE_USE_EXT2 : ($(TARGET_BOOTIMAGE_USE_EXT2))" > /
tmp/android/output.txt

On 13 mai, 16:37, Magnus Bäck <magnus.b...@sonyericsson.com> wrote:
> On Friday, May 13, 2011 at 16:12 CEST,
>      andria <andri...@gmail.com> wrote:
>
> > I tried simg2img and the command prints 'bad magic' when I use it on
> > userdata.img. To get anext4image I used "adb pull /data dest/" then

Magnus Bäck

unread,
May 16, 2011, 12:49:37 PM5/16/11
to android-...@googlegroups.com
On Monday, May 16, 2011 at 09:03 CEST,
andria <andr...@gmail.com> wrote:

> On 13 mai, 16:37, Magnus B�ck <magnus.b...@sonyericsson.com> wrote:
>
> > How did you add those commands? The makefile is not a shell script
> > where you can add generic commands wherever you like. If you want to
> > obtain the value of a variable at a certain point I often use the
> > $(error ...) macro to halt execution with a message:
> >
> > � �$(error Interesting variable: "$(TARGET_BOOTIMAGE_USE_EXT2)")

[...]

> > If $(TARGET_BOOTIMAGE_USE_EXT2) isn't set anywhere in your source
> > code it'll be empty, meaning you'll get yaffs images.
>

> Here is what my commands look like
>
> @echo "TARGET_BOOTIMAGE_USE_EXT2 : ($(TARGET_BOOTIMAGE_USE_EXT2))" > /
> tmp/android/output.txt

And you put that one a line by itself, not indented with
a tab character and part of a rule? That will never ever
work. See what I wrote about using the $(error ...) macro
for printf-style debugging of makefiles.

Reply all
Reply to author
Forward
0 new messages