diff mbox

[android/device/linaro/beagleboard] Add vold.fstab

Message ID AANLkTimXcp-8ybAfNsD1Cu93tV_ojFAH053BL0niK94F@mail.gmail.com
State New
Headers show

Commit Message

Jeremy Chang March 21, 2011, 6:35 p.m. UTC
vold.fstab is the vold configuration file to tell what the device to
mount.

Add device.mk, the device-specific product definition file for copy
device-specific drivers, configuration files, settings, etc.

Signed-off-by: Jeremy Chang <jeremy.chang@linaro.org>
---
 beagleboard.mk |    1 +
 device.mk      |   16 ++++++++++++++++
 vold.fstab     |   15 +++++++++++++++
 3 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 device.mk
 create mode 100644 vold.fstab

Comments

Alexander Sack March 21, 2011, 10:47 p.m. UTC | #1
On Mon, Mar 21, 2011 at 7:35 PM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
> +#######################
> +## Regular device mount
> +##
> +## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
> +## label        - Label for the volume
> +## mount_point  - Where the volume will be mounted
> +## part         - Partition # (1 based), or 'auto' for first usable partition.
> +## <sysfs_path> - List of sysfs paths to source devices
> +######################
> +
> +dev_mount sdcard /mnt/sdcard 7 /devices/platform/mmci-omap-hs.0/mmc_host/mmc0

from what i understand this hardcodes that our sdcard partition is
partition 7 right?

Remember, that eventually we will move to "by-name" or "by-uuid" not
only because it feels cleaner, but also because the partition offset
for our validation farm install might be different.

Is there a way to also express this here? Otherwise, I would think
that we have to keep the "mount" in the init.rc. Or would we also work
on adding "by-name" here?
Jim Huang March 22, 2011, 3:23 a.m. UTC | #2
On 22 March 2011 06:47, Alexander Sack <asac@linaro.org> wrote:
> On Mon, Mar 21, 2011 at 7:35 PM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
[...]
>> +dev_mount sdcard /mnt/sdcard 7 /devices/platform/mmci-omap-hs.0/mmc_host/mmc0
>
> from what i understand this hardcodes that our sdcard partition is
> partition 7 right?

Yes, it was hardcoded.

> Remember, that eventually we will move to "by-name" or "by-uuid" not
> only because it feels cleaner, but also because the partition offset
> for our validation farm install might be different.

But vold has its own logic and why not keep the same configurations as
Android tends to take?
I mean, we can always prepare the well-defined layout and vold.fstab in advance.

Adding new codes to vold might not be a good idea since Google always
tries to improve user-space utilities and their configurations.

> Is there a way to also express this here? Otherwise, I would think
> that we have to keep the "mount" in the init.rc. Or would we also work
> on adding "by-name" here?

In my opinion, providing flexible ways in /init (no visible changes by
each Android release) is good because we have to make sure that we can
always boot from storage, and then we can do something automated such
as adb.  While, it might not be the same if we modify vold (always
changed).

Just my two cents.

Regards,
-jserv
Jeremy Chang March 22, 2011, 7:07 a.m. UTC | #3
Same time, we could rethink the partition layout,
Partition layout is wikied at
https://wiki.linaro.org/Platform/Android/DevBoards.
The original partition layout define is from
https://bugs.launchpad.net/linaro-image-tools/+bug/724207

Regarding to the partition offset for our validation farm install, we
may need to have two more partitions for testboot and testrootfs as
Paul suggested and adjust the partition offset to fit better.

I think the sdcard partition should be vfat format instead of ext4, at
least for now as I know, vold only supports vfat format.

For the hardcoded vold.fstab, somehow we need to modify the vold for
using the "by-partition-name" way in vold.fstab and the init as well.

To me, vold.fstab is hardcoded so it's put under device/linaro/beagleboard,

For "by-name" way, I think it may could not be that urgent to support
this, or we should just spend time and send a patch for this to AOSP.?

Thanks,
-Jeremy

On Tue, Mar 22, 2011 at 11:23 AM, Jim Huang <jim.huang@linaro.org> wrote:
> On 22 March 2011 06:47, Alexander Sack <asac@linaro.org> wrote:
>> On Mon, Mar 21, 2011 at 7:35 PM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
> [...]
>>> +dev_mount sdcard /mnt/sdcard 7 /devices/platform/mmci-omap-hs.0/mmc_host/mmc0
>>
>> from what i understand this hardcodes that our sdcard partition is
>> partition 7 right?
>
> Yes, it was hardcoded.
>
>> Remember, that eventually we will move to "by-name" or "by-uuid" not
>> only because it feels cleaner, but also because the partition offset
>> for our validation farm install might be different.
>
> But vold has its own logic and why not keep the same configurations as
> Android tends to take?
> I mean, we can always prepare the well-defined layout and vold.fstab in advance.
>
> Adding new codes to vold might not be a good idea since Google always
> tries to improve user-space utilities and their configurations.
>
>> Is there a way to also express this here? Otherwise, I would think
>> that we have to keep the "mount" in the init.rc. Or would we also work
>> on adding "by-name" here?
>
> In my opinion, providing flexible ways in /init (no visible changes by
> each Android release) is good because we have to make sure that we can
> always boot from storage, and then we can do something automated such
> as adb.  While, it might not be the same if we modify vold (always
> changed).
>
> Just my two cents.
>
> Regards,
> -jserv
>
Patrik Ryd March 22, 2011, 10:25 a.m. UTC | #4
On 21 March 2011 19:35, Jeremy Chang <jeremy.chang@linaro.org> wrote:

> vold.fstab is the vold configuration file to tell what the device to
> mount.
>
> Add device.mk, the device-specific product definition file for copy
> device-specific drivers, configuration files, settings, etc.
>
> Signed-off-by: Jeremy Chang <jeremy.chang@linaro.org>
> ---
>  beagleboard.mk |    1 +
>  device.mk      |   16 ++++++++++++++++
>  vold.fstab     |   15 +++++++++++++++
>  3 files changed, 32 insertions(+), 0 deletions(-)
>  create mode 100644 device.mk
>  create mode 100644 vold.fstab
>
> diff --git a/beagleboard.mk b/beagleboard.mk
> index f810f36..015b605 100644
> --- a/beagleboard.mk
> +++ b/beagleboard.mk
> @@ -29,6 +29,7 @@ PRODUCT_PACKAGES := \
>
>
>  $(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
> +$(call inherit-product, device/linaro/beagleboard/device.mk)
>
>  # Overrides
>  PRODUCT_BRAND := beagleboard
> diff --git a/device.mk b/device.mk
> new file mode 100644
> index 0000000..79979e3
> --- /dev/null
> +++ b/device.mk
> @@ -0,0 +1,16 @@
> +# Copyright (C) 2010 The Android Open Source Project
>

Minor comment: Our device.mk file was written by you and then it is Linaro
that has the copyright.

We should probably think more about this. I know that AOSP prefers to have
the line above, but according to the contribution agreement with AOSP we
just give them an irrevocable never ending license to do whatever they want
with the code in any part of the Universe for free. We still have the
copyright of the code, but they can do whatever the want. :)

Anyway. I don't think we will contribute this file.


> +#
> +# Licensed under the Apache License, Version 2.0 (the "License");
> +# you may not use this file except in compliance with the License.
> +# You may obtain a copy of the License at
> +#
> +#      http://www.apache.org/licenses/LICENSE-2.0
> +#
> +# Unless required by applicable law or agreed to in writing, software
> +# distributed under the License is distributed on an "AS IS" BASIS,
> +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> +# See the License for the specific language governing permissions and
> +# limitations under the License.
> +
> +PRODUCT_COPY_FILES := \
> +    device/linaro/beagleboard/vold.fstab:system/etc/vold.fstab
> diff --git a/vold.fstab b/vold.fstab
> new file mode 100644
> index 0000000..c17bb64
> --- /dev/null
> +++ b/vold.fstab
> @@ -0,0 +1,15 @@
> +## Vold 2.0 Generic fstab
> +## - San Mehat (san@android.com)
> +##
> +
> +#######################
> +## Regular device mount
> +##
> +## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
> +## label        - Label for the volume
> +## mount_point  - Where the volume will be mounted
> +## part         - Partition # (1 based), or 'auto' for first usable
> partition.
> +## <sysfs_path> - List of sysfs paths to source devices
> +######################
> +
> +dev_mount sdcard /mnt/sdcard 7
> /devices/platform/mmci-omap-hs.0/mmc_host/mmc0
> --
> 1.7.1
>
Jeremy Chang March 22, 2011, 10:43 a.m. UTC | #5
On Tue, Mar 22, 2011 at 6:25 PM, Patrik Ryd <patrik.ryd@linaro.org> wrote:
> On 21 March 2011 19:35, Jeremy Chang <jeremy.chang@linaro.org> wrote:
>>
>> vold.fstab is the vold configuration file to tell what the device to
>> mount.
>>
>> Add device.mk, the device-specific product definition file for copy
>> device-specific drivers, configuration files, settings, etc.
>>
>> Signed-off-by: Jeremy Chang <jeremy.chang@linaro.org>
>> ---
>>  beagleboard.mk |    1 +
>>  device.mk      |   16 ++++++++++++++++
>>  vold.fstab     |   15 +++++++++++++++
>>  3 files changed, 32 insertions(+), 0 deletions(-)
>>  create mode 100644 device.mk
>>  create mode 100644 vold.fstab
>>
>> diff --git a/beagleboard.mk b/beagleboard.mk
>> index f810f36..015b605 100644
>> --- a/beagleboard.mk
>> +++ b/beagleboard.mk
>> @@ -29,6 +29,7 @@ PRODUCT_PACKAGES := \
>>
>>
>>  $(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
>> +$(call inherit-product, device/linaro/beagleboard/device.mk)
>>
>>  # Overrides
>>  PRODUCT_BRAND := beagleboard
>> diff --git a/device.mk b/device.mk
>> new file mode 100644
>> index 0000000..79979e3
>> --- /dev/null
>> +++ b/device.mk
>> @@ -0,0 +1,16 @@
>> +# Copyright (C) 2010 The Android Open Source Project
>
> Minor comment: Our device.mk file was written by you and then it is Linaro
> that has the copyright.
> We should probably think more about this. I know that AOSP prefers to have
> the line above, but according to the contribution agreement with AOSP we
> just give them an irrevocable never ending license to do whatever they want
> with the code in any part of the Universe for free. We still have the
> copyright of the code, but they can do whatever the want. :)
> Anyway. I don't think we will contribute this file.
>

Hi, Patrik:
    Thanks for reminding this.

Regards,
-Jeremy

>>
>> +#
>> +# Licensed under the Apache License, Version 2.0 (the "License");
>> +# you may not use this file except in compliance with the License.
>> +# You may obtain a copy of the License at
>> +#
>> +#      http://www.apache.org/licenses/LICENSE-2.0
>> +#
>> +# Unless required by applicable law or agreed to in writing, software
>> +# distributed under the License is distributed on an "AS IS" BASIS,
>> +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> +# See the License for the specific language governing permissions and
>> +# limitations under the License.
>> +
>> +PRODUCT_COPY_FILES := \
>> +    device/linaro/beagleboard/vold.fstab:system/etc/vold.fstab
>> diff --git a/vold.fstab b/vold.fstab
>> new file mode 100644
>> index 0000000..c17bb64
>> --- /dev/null
>> +++ b/vold.fstab
>> @@ -0,0 +1,15 @@
>> +## Vold 2.0 Generic fstab
>> +## - San Mehat (san@android.com)
>> +##
>> +
>> +#######################
>> +## Regular device mount
>> +##
>> +## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
>> +## label        - Label for the volume
>> +## mount_point  - Where the volume will be mounted
>> +## part         - Partition # (1 based), or 'auto' for first usable
>> partition.
>> +## <sysfs_path> - List of sysfs paths to source devices
>> +######################
>> +
>> +dev_mount sdcard /mnt/sdcard 7
>> /devices/platform/mmci-omap-hs.0/mmc_host/mmc0
>> --
>> 1.7.1
>
>
Alexander Sack March 22, 2011, 4:57 p.m. UTC | #6
On Tue, Mar 22, 2011 at 8:07 AM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
> Same time, we could rethink the partition layout,
> Partition layout is wikied at
> https://wiki.linaro.org/Platform/Android/DevBoards.
> The original partition layout define is from
> https://bugs.launchpad.net/linaro-image-tools/+bug/724207
>
> Regarding to the partition offset for our validation farm install, we
> may need to have two more partitions for testboot and testrootfs as
> Paul suggested and adjust the partition offset to fit better.
>
> I think the sdcard partition should be vfat format instead of ext4, at
> least for now as I know, vold only supports vfat format.
>
> For the hardcoded vold.fstab, somehow we need to modify the vold for
> using the "by-partition-name" way in vold.fstab and the init as well.
>
> To me, vold.fstab is hardcoded so it's put under device/linaro/beagleboard,
>
> For "by-name" way, I think it may could not be that urgent to support
> this, or we should just spend time and send a patch for this to AOSP.?

I don't want testboot and testrootfs partition to be on normal
installs ... just in the validation farm. I would really prefer if we
get by-name sent to AOSP asap. But I don't understand why by-name
support would be less reasonable for vold than for init. Can you
elaborate?
Alexander Sack March 22, 2011, 5:01 p.m. UTC | #7
On Tue, Mar 22, 2011 at 8:07 AM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
> Same time, we could rethink the partition layout,
> Partition layout is wikied at
> https://wiki.linaro.org/Platform/Android/DevBoards.
> The original partition layout define is from
> https://bugs.launchpad.net/linaro-image-tools/+bug/724207
>
> Regarding to the partition offset for our validation farm install, we
> may need to have two more partitions for testboot and testrootfs as
> Paul suggested and adjust the partition offset to fit better.
>
> I think the sdcard partition should be vfat format instead of ext4, at
> least for now as I know, vold only supports vfat format.

right, sdcard should be vfat. Well spotted. Was an oversight on my
side when initially dumping the partition layout to the bug ;).
Jeremy Chang March 23, 2011, 7:51 a.m. UTC | #8
On Wed, Mar 23, 2011 at 12:57 AM, Alexander Sack <asac@linaro.org> wrote:
> On Tue, Mar 22, 2011 at 8:07 AM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
>> Same time, we could rethink the partition layout,
>> Partition layout is wikied at
>> https://wiki.linaro.org/Platform/Android/DevBoards.
>> The original partition layout define is from
>> https://bugs.launchpad.net/linaro-image-tools/+bug/724207
>>
>> Regarding to the partition offset for our validation farm install, we
>> may need to have two more partitions for testboot and testrootfs as
>> Paul suggested and adjust the partition offset to fit better.
>>
>> I think the sdcard partition should be vfat format instead of ext4, at
>> least for now as I know, vold only supports vfat format.
>>
>> For the hardcoded vold.fstab, somehow we need to modify the vold for
>> using the "by-partition-name" way in vold.fstab and the init as well.
>>
>> To me, vold.fstab is hardcoded so it's put under device/linaro/beagleboard,
>>
>> For "by-name" way, I think it may could not be that urgent to support
>> this, or we should just spend time and send a patch for this to AOSP.?
>
> I don't want testboot and testrootfs partition to be on normal
> installs ... just in the validation farm. I would really prefer if we
> get by-name sent to AOSP asap. But I don't understand why by-name
> support would be less reasonable for vold than for init. Can you
> elaborate?

Hi, Alexander:
    There will be more needed to modify for by-name support in vold.
vold uses partition number to indicate the certain partition that we
want to mount as you can see the format in vold.fstab.  and vold uses
a an partition array for maintaining the partitions. You can see the
array mPartMinors in DirectVolume.cpp.

    So adding "by-name" support in vold looks like not easy task and
giving the limit to vold.

Regards,
-Jeremy Chang

>
> --
>
>  - Alexander
>
Alexander Sack March 23, 2011, 1:57 p.m. UTC | #9
On Wed, Mar 23, 2011 at 8:51 AM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
> On Wed, Mar 23, 2011 at 12:57 AM, Alexander Sack <asac@linaro.org> wrote:
>> On Tue, Mar 22, 2011 at 8:07 AM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
>>> Same time, we could rethink the partition layout,
>>> Partition layout is wikied at
>>> https://wiki.linaro.org/Platform/Android/DevBoards.
>>> The original partition layout define is from
>>> https://bugs.launchpad.net/linaro-image-tools/+bug/724207
>>>
>>> Regarding to the partition offset for our validation farm install, we
>>> may need to have two more partitions for testboot and testrootfs as
>>> Paul suggested and adjust the partition offset to fit better.
>>>
>>> I think the sdcard partition should be vfat format instead of ext4, at
>>> least for now as I know, vold only supports vfat format.
>>>
>>> For the hardcoded vold.fstab, somehow we need to modify the vold for
>>> using the "by-partition-name" way in vold.fstab and the init as well.
>>>
>>> To me, vold.fstab is hardcoded so it's put under device/linaro/beagleboard,
>>>
>>> For "by-name" way, I think it may could not be that urgent to support
>>> this, or we should just spend time and send a patch for this to AOSP.?
>>
>> I don't want testboot and testrootfs partition to be on normal
>> installs ... just in the validation farm. I would really prefer if we
>> get by-name sent to AOSP asap. But I don't understand why by-name
>> support would be less reasonable for vold than for init. Can you
>> elaborate?
>
> Hi, Alexander:
>    There will be more needed to modify for by-name support in vold.
> vold uses partition number to indicate the certain partition that we
> want to mount as you can see the format in vold.fstab.  and vold uses
> a an partition array for maintaining the partitions. You can see the
> array mPartMinors in DirectVolume.cpp.
>
>    So adding "by-name" support in vold looks like not easy task and
> giving the limit to vold.
>

OK understood. How important is it that we use vold for sdcard (rather
than by-name in init.rc)? alternatively, we could install vold during
install in lmc and during lava install and set the correct value
there.

Note: on mx5 we have a 1 partition offset because there is an
additional non-data-fs partition for u-boot on sdcard.
Jeremy Chang March 23, 2011, 4:37 p.m. UTC | #10
On Wed, Mar 23, 2011 at 9:57 PM, Alexander Sack <asac@linaro.org> wrote:
> On Wed, Mar 23, 2011 at 8:51 AM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
>> On Wed, Mar 23, 2011 at 12:57 AM, Alexander Sack <asac@linaro.org> wrote:
>>> On Tue, Mar 22, 2011 at 8:07 AM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
>>>> Same time, we could rethink the partition layout,
>>>> Partition layout is wikied at
>>>> https://wiki.linaro.org/Platform/Android/DevBoards.
>>>> The original partition layout define is from
>>>> https://bugs.launchpad.net/linaro-image-tools/+bug/724207
>>>>
>>>> Regarding to the partition offset for our validation farm install, we
>>>> may need to have two more partitions for testboot and testrootfs as
>>>> Paul suggested and adjust the partition offset to fit better.
>>>>
>>>> I think the sdcard partition should be vfat format instead of ext4, at
>>>> least for now as I know, vold only supports vfat format.
>>>>
>>>> For the hardcoded vold.fstab, somehow we need to modify the vold for
>>>> using the "by-partition-name" way in vold.fstab and the init as well.
>>>>
>>>> To me, vold.fstab is hardcoded so it's put under device/linaro/beagleboard,
>>>>
>>>> For "by-name" way, I think it may could not be that urgent to support
>>>> this, or we should just spend time and send a patch for this to AOSP.?
>>>
>>> I don't want testboot and testrootfs partition to be on normal
>>> installs ... just in the validation farm. I would really prefer if we
>>> get by-name sent to AOSP asap. But I don't understand why by-name
>>> support would be less reasonable for vold than for init. Can you
>>> elaborate?
>>
>> Hi, Alexander:
>>    There will be more needed to modify for by-name support in vold.
>> vold uses partition number to indicate the certain partition that we
>> want to mount as you can see the format in vold.fstab.  and vold uses
>> a an partition array for maintaining the partitions. You can see the
>> array mPartMinors in DirectVolume.cpp.
>>
>>    So adding "by-name" support in vold looks like not easy task and
>> giving the limit to vold.
>>
>
> OK understood. How important is it that we use vold for sdcard (rather
> than by-name in init.rc)? alternatively, we could install vold during
> install in lmc and during lava install and set the correct value
> there.

As my understanding, through vold mounting the sdcard partition and
informing MountService,
the sdcard partition will be used by Android as an external storage
for like installing apks. Also applications can utilize the external
storage to store files, like 0xbench will check the status of the
Android external storage and intend to store the test result there.

In java code, Environment.getExternalStorageDirectory() can be used to
get the external storage File path.

If we just mount sdcard partition in init.rc, the partition will not
be any special but just a mounted partition not knowing by Android
framework.

vold is a service that should be launched during the booting. We can
also install and restart it as anytime as we want.

>
> Note: on mx5 we have a 1 partition offset because there is an
> additional non-data-fs partition for u-boot on sdcard.

So I think vold.fstab is not common but a hardware/product dependent file.

Regards,
-Jeremy Chang

>
> --
>
>  - Alexander
>
Alexander Sack March 23, 2011, 5:25 p.m. UTC | #11
On Wed, Mar 23, 2011 at 5:37 PM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
> On Wed, Mar 23, 2011 at 9:57 PM, Alexander Sack <asac@linaro.org> wrote:
>> On Wed, Mar 23, 2011 at 8:51 AM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
>>> On Wed, Mar 23, 2011 at 12:57 AM, Alexander Sack <asac@linaro.org> wrote:
>>>> On Tue, Mar 22, 2011 at 8:07 AM, Jeremy Chang <jeremy.chang@linaro.org> wrote:
>>>>> Same time, we could rethink the partition layout,
>>>>> Partition layout is wikied at
>>>>> https://wiki.linaro.org/Platform/Android/DevBoards.
>>>>> The original partition layout define is from
>>>>> https://bugs.launchpad.net/linaro-image-tools/+bug/724207
>>>>>
>>>>> Regarding to the partition offset for our validation farm install, we
>>>>> may need to have two more partitions for testboot and testrootfs as
>>>>> Paul suggested and adjust the partition offset to fit better.
>>>>>
>>>>> I think the sdcard partition should be vfat format instead of ext4, at
>>>>> least for now as I know, vold only supports vfat format.
>>>>>
>>>>> For the hardcoded vold.fstab, somehow we need to modify the vold for
>>>>> using the "by-partition-name" way in vold.fstab and the init as well.
>>>>>
>>>>> To me, vold.fstab is hardcoded so it's put under device/linaro/beagleboard,
>>>>>
>>>>> For "by-name" way, I think it may could not be that urgent to support
>>>>> this, or we should just spend time and send a patch for this to AOSP.?
>>>>
>>>> I don't want testboot and testrootfs partition to be on normal
>>>> installs ... just in the validation farm. I would really prefer if we
>>>> get by-name sent to AOSP asap. But I don't understand why by-name
>>>> support would be less reasonable for vold than for init. Can you
>>>> elaborate?
>>>
>>> Hi, Alexander:
>>>    There will be more needed to modify for by-name support in vold.
>>> vold uses partition number to indicate the certain partition that we
>>> want to mount as you can see the format in vold.fstab.  and vold uses
>>> a an partition array for maintaining the partitions. You can see the
>>> array mPartMinors in DirectVolume.cpp.
>>>
>>>    So adding "by-name" support in vold looks like not easy task and
>>> giving the limit to vold.
>>>
>>
>> OK understood. How important is it that we use vold for sdcard (rather
>> than by-name in init.rc)? alternatively, we could install vold during
>> install in lmc and during lava install and set the correct value
>> there.
>
> As my understanding, through vold mounting the sdcard partition and
> informing MountService,
> the sdcard partition will be used by Android as an external storage
> for like installing apks. Also applications can utilize the external
> storage to store files, like 0xbench will check the status of the
> Android external storage and intend to store the test result there.
>
> In java code, Environment.getExternalStorageDirectory() can be used to
> get the external storage File path.
>
> If we just mount sdcard partition in init.rc, the partition will not
> be any special but just a mounted partition not knowing by Android
> framework.
>
> vold is a service that should be launched during the booting. We can
> also install and restart it as anytime as we want.
>

thanks for explaining. I agree that sdcard should be configured
through vold then.

>>
>> Note: on mx5 we have a 1 partition offset because there is an
>> additional non-data-fs partition for u-boot on sdcard.
>
> So I think vold.fstab is not common but a hardware/product dependent file.

I think it is kind of hardware/product AND install-variant dependent
(e.g. "normal" install vs. validation farm install);

Based on that I think the logic to put the final vold.conf together
should be in l-m-c; i think some similar logic already is there for
ubuntu based images  and /etc/fstab; take a look if reusing that
approach might make sense and let us know.

If not, i think going for hardware/product dependent vold config as
you suggested and then adding logic to lava deploy code that tweaks
that is another valid a way forward for now.
diff mbox

Patch

diff --git a/beagleboard.mk b/beagleboard.mk
index f810f36..015b605 100644
--- a/beagleboard.mk
+++ b/beagleboard.mk
@@ -29,6 +29,7 @@  PRODUCT_PACKAGES := \


 $(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
+$(call inherit-product, device/linaro/beagleboard/device.mk)

 # Overrides
 PRODUCT_BRAND := beagleboard
diff --git a/device.mk b/device.mk
new file mode 100644
index 0000000..79979e3
--- /dev/null
+++ b/device.mk
@@ -0,0 +1,16 @@ 
+# Copyright (C) 2010 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+PRODUCT_COPY_FILES := \
+    device/linaro/beagleboard/vold.fstab:system/etc/vold.fstab
diff --git a/vold.fstab b/vold.fstab
new file mode 100644
index 0000000..c17bb64
--- /dev/null
+++ b/vold.fstab
@@ -0,0 +1,15 @@ 
+## Vold 2.0 Generic fstab
+## - San Mehat (san@android.com)
+##
+
+#######################
+## Regular device mount
+##
+## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
+## label        - Label for the volume
+## mount_point  - Where the volume will be mounted
+## part         - Partition # (1 based), or 'auto' for first usable partition.
+## <sysfs_path> - List of sysfs paths to source devices
+######################
+
+dev_mount sdcard /mnt/sdcard 7 /devices/platform/mmci-omap-hs.0/mmc_host/mmc0