How does the build system choose which filesystem to use?

679 views
Skip to first unread message

Keith Twombley

unread,
Dec 9, 2011, 2:30:28 PM12/9/11
to Android Building
I'm trying to port ICS to the asus transformer.

So far I've gotten ICS to build and give me images, but it insists on
making yaffs2 images rather than ext4.

How does the build system choose which to use? Reading build/tools/
releasetools/img_from_target_files (and the other files in there), it
looks like the build system examines the fstab in my device's
directory and chooses which to use based on the fstype it finds. Even
though my recovery.fstab shows ext4, it always chooses yaffs2.

my recovery.fstab:

# mount point fstype
device [device2]

/system ext4 /dev/block/mmcblk0p1
/cache ext4 /dev/block/mmcblk0p2
/misc emmc /dev/block/mmcblk0p3
/boot emmc boot
/recovery emmc recovery
/staging ext3 /dev/block/mmcblk0p4
/btmac vfat /dev/block/mmcblk0p5
/data ext4 /dev/block/mmcblk0p7
/sdcard vfat /dev/block/
mmcblk1p1 /dev/block/mmcblk1


Anywhere else I should be checking? Any documentation you could point
me to?

Thanks,

--
Keith W Twombley

Magnus Bäck

unread,
Dec 9, 2011, 3:20:41 PM12/9/11
to Android Building
On Friday, December 09, 2011 at 20:30 CET,
Keith Twombley <ktwo...@gmail.com> wrote:

> I'm trying to port ICS to the asus transformer.
>
> So far I've gotten ICS to build and give me images, but it insists on
> making yaffs2 images rather than ext4.
>
> How does the build system choose which to use?

build/core/Makefile contains the rules to generate the boot, userdata,
and system images. The choice of file system for the two latter is
determined by the setting of the TARGET_USERIMAGES_USE_EXT[234]
variables, so to get ext4 for your system and userdata images you can
say

TARGET_USERIMAGES_USE_EXT4 := true

in e.g. BoardConfig.mk.

[...]

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

Keith Twombley

unread,
Dec 9, 2011, 4:35:27 PM12/9/11
to Android Building
Thank you, Magnus.

I'm now generating ext4 images just fine.

I did notice that my init.rc is still set up to try mounting
everything as yaffs2. How do I fix that?

Thanks again,
-Keith


On Dec 9, 2:20 pm, Magnus Bäck <magnus.b...@sonyericsson.com> wrote:
> On Friday, December 09, 2011 at 20:30 CET,

Keith Twombley

unread,
Dec 9, 2011, 5:04:14 PM12/9/11
to Android Building
Update for anyone else with this problem:

I looked through the device/samsung/tuna and some honeycomb OTA
updates and found this:

init.rc seems to just be a canned init.rc.

You have to use PRODUCT_COPY_FILES to get your board-specific init
file (in my case, init.ventana.rc) into the system.

So to do this right, you create a device/manuf/product/
init.something.rc file with what you need in it (such as mounts), and
then in your device.mk you need

PRODUCT_COPY_FILES := \
device/manuf/product/init.something.rc:root/init.something.rc \
(whatever else was here before)

Reply all
Reply to author
Forward
0 new messages