Closed Bug 994563 Opened 11 years ago Closed 10 years ago

[tarako]support internal sdcard

Categories

(Firefox OS Graveyard :: Vendcom, defect)

ARM
Gonk (Firefox OS)
defect
Not set
major

Tracking

(blocking-b2g:1.3T+, b2g-v1.3T fixed)

RESOLVED FIXED
blocking-b2g 1.3T+
Tracking Status
b2g-v1.3T --- fixed

People

(Reporter: james.zhang, Assigned: lianxiang.zhou)

Details

(Whiteboard: [POVB][sprd301827][sprd fixed wait for linux flashtool])

Attachments

(2 files, 1 obsolete file)

support internal sdcard, then we can use camera when if no sdcard.
blocking-b2g: --- → 1.3T?
Flags: needinfo?(ttsai)
Flags: needinfo?(styang)
Flags: needinfo?(kli)
Hi Alan, Sorry, I don't the related bugs indicate this, could you point out to James? Thanks.
Flags: needinfo?(styang) → needinfo?(ahuang)
Hi James, Do you plan to use ext4/vFAT, or FUSE? If you wanna use FUSE, then it is an special case. Once you've done with the ext4 of fat partition, you can reference bug 932018 to see how to add vold.fstab in tarako's ramdisk.
Flags: needinfo?(ahuang)
Hi Steven, Just a heads up. Mozilla don't have action (I mean code modifications) here as I remember. This can be simply done by the modification in boot image.
Flags: needinfo?(styang)
Alan, is it also necessary to add an volume.cfg for it?
Flags: needinfo?(kli)
(In reply to Kai-Zhen Li from comment #4) > Alan, is it also necessary to add an volume.cfg for it? No, if there's no fake volume using FUSE :)
Based on comment 3, it sounds like a boot.img configuration and this is vendor related.
Component: GonkIntegration → Vendcom
Whiteboard: [POVB]
Hi James, how much storage are you planning to allocate to internal SD Card? thanks
Flags: needinfo?(james.zhang)
About 30~60MB, is this value OK? (In reply to Alan Huang [:ahuang] from comment #2) > Hi James, > Do you plan to use ext4/vFAT, or FUSE? If you wanna use FUSE, then it is an > special case. > Once you've done with the ext4 of fat partition, you can reference bug > 932018 to see how to add vold.fstab in tarako's ramdisk. Lianxiang, please follow bug 932018 to configure internal sdcard.
Flags: needinfo?(james.zhang)
it might be too big isn't it? this will make userdata very small Steven, can you please discuss with James
(In reply to Joe Cheng [:jcheng] from comment #9) > it might be too big isn't it? this will make userdata very small > Steven, can you please discuss with James I'll check this value with our PM. I think 20~30MB is OK. Lianxiang, please implement it on my side.
Assignee: nobody → lianxiang.zhou
Steven will follow up with James on this one
Our plan: 1 make a 20m partition from u-boot 2 mount partition to yaffs2 3 use sdcard service(use fuse) 4 need volumn.cfg?(Comment 5)
1 In u-boot/include/configs/sp6821a.h, add a "media" partition. #define MTDPARTS_DEFAULT "mtdparts=sprd-nand:...,20m(media),..." 2 In init.rc, mount the partition mkdir /media 0774 system system mount yaffs2 mtd@media /media nosuid nodev 3 In init.sp8810.rc, add a service service sdcard /system/bin/sdcard /media 1023 1023 class main 4 Add volume.cfg file and add to PRODUCT_COPY_FILES $ cat sp6821a_gonk/volume.cfg create internal-storage /media 5 All work well, but in settings, there is a bit of trouble. The "Internal Storage" and "Sd Card Storage" exchanged their position. The 20m internal storage display at the site of "Sd Card Storage". 6 What can I do to correct it?
(In reply to Zhou Lianxiang from comment #13) > 1 In u-boot/include/configs/sp6821a.h, add a "media" partition. > #define MTDPARTS_DEFAULT "mtdparts=sprd-nand:...,20m(media),..." > > 2 In init.rc, mount the partition > mkdir /media 0774 system system > mount yaffs2 mtd@media /media nosuid nodev > > 3 In init.sp8810.rc, add a service > service sdcard /system/bin/sdcard /media 1023 1023 > class main > > 4 Add volume.cfg file and add to PRODUCT_COPY_FILES > $ cat sp6821a_gonk/volume.cfg > create internal-storage /media > > 5 All work well, but in settings, there is a bit of trouble. The "Internal > Storage" and "Sd Card Storage" exchanged their position. The 20m internal > storage display at the site of "Sd Card Storage". > > 6 What can I do to correct it? What about the result of "adb shell vdc volume list" ? Could you post it?
(In reply to Alan Huang [:ahuang] from comment #14) > What about the result of "adb shell vdc volume list" ? Could you post it? $ adb shell vdc volume list 110 sdcard /mnt/external 4 200 Volumes listed.
(In reply to Zhou Lianxiang from comment #15) > (In reply to Alan Huang [:ahuang] from comment #14) > > What about the result of "adb shell vdc volume list" ? Could you post it? > > $ adb shell vdc volume list > 110 sdcard /mnt/external 4 > 200 Volumes listed. Oh, I see. According to comment 14, you wrote volume.cfg. So neither vold or b2g will recognize this as a real volume. They treat it as a fake one. I would suggest you to write your volume in /etc/vold, like your sdcard partition. Also, make the first one the internal storage. Take Fireweb as an example: $ adb shell cat etc/vold.fstab dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host dev_mount extsdcard /mnt/extsdcard auto /devices/platform/msm_sdcc.1/mmc_host $ adb shell vdc volume list 110 sdcard /mnt/sdcard 4 110 extsdcard /mnt/extsdcard 0 200 Volumes listed.
(In reply to Alan Huang [:ahuang] from comment #16) > (In reply to Zhou Lianxiang from comment #15) > > (In reply to Alan Huang [:ahuang] from comment #14) > > > What about the result of "adb shell vdc volume list" ? Could you post it? > > > > $ adb shell vdc volume list > > 110 sdcard /mnt/external 4 > > 200 Volumes listed. > > Oh, I see. According to comment 14, you wrote volume.cfg. So neither vold or > b2g will recognize this as a real volume. They treat it as a fake one. > > I would suggest you to write your volume in /etc/vold, like your sdcard > partition. Also, make the first one the internal storage. > > Take Fireweb as an example: > > $ adb shell cat etc/vold.fstab > dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host > dev_mount extsdcard /mnt/extsdcard auto /devices/platform/msm_sdcc.1/mmc_host > > $ adb shell vdc volume list > 110 sdcard /mnt/sdcard 4 > 110 extsdcard /mnt/extsdcard 0 > 200 Volumes listed. D/VoldCmdListener( 80): volume mount sdcard I/Vold ( 80): /dev/block/vold/31:13 being considered for volume sdcard D/Vold ( 80): Volume sdcard state changing 1 (Idle-Unmounted) -> 3 (Checking) W/Vold ( 80): Skipping fs checks E/Vold ( 80): /dev/block/vold/31:13 failed to mount via VFAT (Invalid argument) E/Vold ( 80): Volume sdcard found no suitable devices for mounting :( D/Vold ( 80): Volume sdcard state changing 3 (Checking) -> 1 (Idle-Unmounted) W/Vold ( 80): Returning OperationFailed - no handler for errno 22 On out device, can mount via yaffs2, but not vfat root@android:/dev/block # mount -t vfat /dev/block/mtdblock13 /mnt/sdcard mount: Invalid argument 255|root@android:/dev/block # mount -t yaffs2 /dev/block/mtdblock13 /mnt/sdcar> root@android:/dev/block # What's wrong?
We can not mount mtd partition via vfat,so we can not write out volume in vold.fstab. In vold.fstab, it always mount device via vfat, no option.
Attached file sprd-internel-sdcard-image.tar.gz (obsolete) —
Update the boot loader and boot.img for internal sdcard
triage: 1.3T+ per discussino with product
blocking-b2g: 1.3T? → 1.3T+
Danny and I still cannot boot up my device with partner provided boot and bootloader. Still waiting for available images ...
Flags: needinfo?(styang)
Oh Okay, I think I get it. Please see comment 16 and bug 936018. Please name your physical sdcard to "extsdcard", and the internal partition to "sdcard" :)
(In reply to Alan Huang [:ahuang] from comment #22) > Oh Okay, I think I get it. > > Please see comment 16 and bug 936018. Please name your physical sdcard to > "extsdcard", and the internal partition to "sdcard" :) Sorry, it is bug 932018.
(In reply to Alan Huang [:ahuang] from comment #23) > (In reply to Alan Huang [:ahuang] from comment #22) > > Oh Okay, I think I get it. > > > > Please see comment 16 and bug 936018. Please name your physical sdcard to > > "extsdcard", and the internal partition to "sdcard" :) > > Sorry, it is bug 932018. What about this one...
(In reply to Alan Huang [:ahuang] from comment #22) > Oh Okay, I think I get it. > > Please see comment 16 and bug 936018. Please name your physical sdcard to > "extsdcard", and the internal partition to "sdcard" :) It's OK!But why? Gaia recognze the volume by name?
Lianxiang has provided patch on my side, but I can't merge it because it changes uboot. I'll wait mozilla finish download tool development. Steven, is it ok?
Flags: needinfo?(styang)
patch for device/sprd
Attachment #8407346 - Attachment is obsolete: true
Attached patch u-boot.patchSplinter Review
patch for u-boot
Flags: needinfo?(styang)
Whiteboard: [POVB] → [POVB][sprd301827]
I verify the function by wip and it works, so let's wait for linux pac tool for all developers to update the device.
Flags: needinfo?(ttsai)
(In reply to thomas tsai from comment #29) > I verify the function by wip and it works, so let's wait for linux pac tool > for all developers to update the device. OK, I'll land it with WIP patch on my side. Please ask me to land it when mozilla pac tool is ok.
Status: NEW → ASSIGNED
may i know have we lockdown the spec for this? 20MB?
Flags: needinfo?(james.zhang)
(In reply to Marvin Khoo [:Marvin_Khoo] from comment #31) > may i know have we lockdown the spec for this? 20MB? Yes, but our customer can modify this partition size in u-boot git repo. And is there any limitation on mozilla side? Please comment here.
Flags: needinfo?(james.zhang)
The only consideration is how much space is left for userdata which impacts the installed apps from market and meta-data upperbound used by apps in runtime.
hi James, we need reserved at least 55MB ~ 60MB space here for things that Thomas Tsai mentioned. thus, 20MB for this specific partition is max from my perspective.
Whiteboard: [POVB][sprd301827] → [POVB][sprd301827][sprd fixed wait for linux flashtool]
(In reply to Marvin Khoo [:Marvin_Khoo] from comment #34) > hi James, we need reserved at least 55MB ~ 60MB space here for things that > Thomas Tsai mentioned. thus, 20MB for this specific partition is max from my > perspective. OK
We have fixed on my side. device/sprd commit bac372a291100abc019c4c24b8f3f79c034e2517 Author: lianxiang.zhou <lianxiang.zhou@spreadtrum.com> Date: Wed Apr 16 15:03:13 2014 +0800 Bug #301827 support internal sdcard [bug number ] 301827 [root cause ] new feature [changes ] u-boot, volume.cfg [side effects] none [self test ] work well [reviewers ] james.zhang Change-Id: If7ad323f60e2ae6658a752b5a7dff2c9c10b814c u-boot commit 37c1ba6741cdad6b5712eb8608c894ff6629a73c Author: lianxiang.zhou <lianxiang.zhou@spreadtrum.com> Date: Wed Apr 16 15:07:20 2014 +0800 Bug #301827 support internal sdcard [bug number ] 301827 [root cause ] new feature [changes ] u-boot, volume.cfg [side effects] none [self test ] work well [reviewers ] james.zhang Change-Id: I47c3ee9ae5a92061ec92f864fa13b2af87b6bb4a
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
I have fixed this issue, but bring a new issue, bug 1003045.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: