ntfs support problem of ssd on imx6 sabresd board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ntfs support problem of ssd on imx6 sabresd board

Jump to solution
5,141 Views
kaisun1
Contributor III

Hi ,

     I am using imx6 sabresd board as my development platform, using android 4.0 as my operating system.  I've added some code, now my board can recognize fat32 format ssd, and can read and write properly.  Now I need to used ntfs format but the code does not support. 

 

I usd the patch(0004-ntfs_support.patch ) on HDMI Dongle Reference Design Release

adn used the folder (cp folder external/ntfs-3g) on i.MX6 OTT TVBox HW/SW Reference Design Release (ICS4.0.4_1.0.0-alpha)

 

but my board can not recongnize ntfs foramt ssd.

 

Does anyone know if this knowledge, or give me some advice. Thank you very much for any help

 

regards

Labels (2)
0 Kudos
1 Solution
2,693 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Please delete your corrent "ntfs-3g" folder and unzip a new folder here.

Please don't run "sk@ubuntu:~/myandroid/external/ntfs-3g$ ./configure " at any time, it is for Linux, not for Android, this command will modify some head files for Linux build, so it will fail to build the code in Android.

I attached the build steps again, after finished building the sabresd image, please follow them one by one, don't skip any line or add any line, thanks!

$ export ARCH=arm

$ export CROSS_COMPILE=~/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

$ cd ~/myandroid

$ source build/envsetup.sh

$ lunch sabresd_6dq-user

$ cd external/ntfs-3g

$ mm

Also attached the workable "ntfs-3g.tar.gz" here, hope there will be no more stange things happen in your side again.

View solution in original post

0 Kudos
11 Replies
2,693 Views
kaisun1
Contributor III

when i compile all projects. it is error :

external/ntfs-3g/src/ntfs-3g.c:69:23: error: sys/xattr.h: No such file or directory

external/ntfs-3g/src/ntfs-3g.c: In function 'ntfs_fuse_getattr':

external/ntfs-3g/src/ntfs-3g.c:858: error: 'struct stat' has no member named 'st_atim'

external/ntfs-3g/src/ntfs-3g.c:859: error: 'struct stat' has no member named 'st_ctim'

external/ntfs-3g/src/ntfs-3g.c:860: error: 'struct stat' has no member named 'st_mtim'

0 Kudos
2,693 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

It was answered in https://community.freescale.com/docs/DOC-94561.

To support NTFS, except the "external\ntfs-3g", "system\vold" should also be updated.

2,693 Views
kaisun1
Contributor III

Hi li :

        i know why it happen. because when i copy the ntfs-3g to /external/.  i read the README.and do the follow operation according to the README.

cd external/ntfs-3g

./configure

make

cd /myandroid

make

now i had obtain the system.ing and boot.img .i will used the ntfs format ssd.and test whether it works.  when i open my terminal .I put the Log on attachment.

d--------- system   system            1970-01-01 00:00 sata

d---rwxr-x system   sdcard_rw          1970-01-02 00:00 sdcard

this is my change :

1.system/vold/Andrido.mk
Fat.cpp \

+        Ntfs.cpp \

Loop.cpp \

2.add /sys/vold/Ntfs.cpp file
3.add /sys/vold/Ntfs.h file
4.change system/vold/Volume.cpp
5.change device/fsl/imx6/imx6/mk

       

+PRODUCT_PACKAGES += \
+      ntfs-3g                                \
+      ntfsfix

6.kerenl_imx/arch/arm/configs/imx6_android_defconfig

        +CONFIG_FUSE_FS=y 

7.add the /external/ntfs-3g  file

0 Kudos
2,693 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

You had used the wrong way to build the source code, the readme file is not for Android.

In Android, you should use the followed commands:

$ export ARCH=arm

$ export CROSS_COMPILE=~/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

$ cd ~/myandroid

$ source build/envsetup.sh

$ lunch sabresd_6dq-user

$ cd external/ntfs-3g

$ mm

2,693 Views
kaisun1
Contributor III

Hi li,

sk@ubuntu:~/myandroid/external/ntfs-3g$ mm

============================================

PLATFORM_VERSION_CODENAME=REL

PLATFORM_VERSION=4.0.4

TARGET_PRODUCT=sabresd_6dq

TARGET_BUILD_VARIANT=user

TARGET_BUILD_TYPE=release

TARGET_BUILD_APPS=

TARGET_ARCH=arm

TARGET_ARCH_VARIANT=armv7-a-neon

HOST_ARCH=x86

HOST_OS=linux

HOST_BUILD_TYPE=release

BUILD_ID=UNKNOWN

BUILD_NUMBER=eng.sk.20130626.020656

============================================

No private recovery resources for TARGET_DEVICE sabresd_6dq

make: Entering directory `/home/sk/myandroid'

make: Nothing to be done for `all_modules'.

make: Leaving directory `/home/sk/myandroid'

0 Kudos
2,692 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

I think you had never built your android code, please followed the Android BSP user guider to build the Android code first.

0 Kudos
2,692 Views
kaisun1
Contributor III

Hi li:

      I deleted my out/target/product/sabresd_6dq directory and recompile generated sabresd_6dq/system.img file. Then I went to / external/ntfs-3g this directory, I do the command output:

sk@ubuntu:~/myandroid/external/ntfs-3g$ ./configure

sk@ubuntu:~/myandroid/external/ntfs-3g$ mm

============================================

PLATFORM_VERSION_CODENAME=REL

PLATFORM_VERSION=4.0.4

TARGET_PRODUCT=sabresd_6dq

TARGET_BUILD_VARIANT=eng

TARGET_BUILD_TYPE=release

TARGET_BUILD_APPS=

TARGET_ARCH=arm

TARGET_ARCH_VARIANT=armv7-a-neon

HOST_ARCH=x86

HOST_OS=linux

HOST_BUILD_TYPE=release

BUILD_ID=UNKNOWN

BUILD_NUMBER=eng.sk.20130627.025131

============================================

No private recovery resources for TARGET_DEVICE sabresd_6dq

make: Entering directory `/home/sk/myandroid'

target thumb C: libfuse <= external/ntfs-3g/libfuse-lite/fuse.c

In file included from external/ntfs-3g/libfuse-lite/fuse.c:9:

external/ntfs-3g/config.h:49:1: warning: "HAVE_ENDIAN_H" redefined

In file included from <command-line>:0:

./system/core/include/arch/linux-arm/AndroidConfig.h:165:1: warning: this is the location of the previous definition

external/ntfs-3g/libfuse-lite/fuse.c: In function 'fuse_lib_setattr':

external/ntfs-3g/libfuse-lite/fuse.c:1204: error: 'struct stat' has no member named 'st_atim'

external/ntfs-3g/libfuse-lite/fuse.c:1209: error: 'struct stat' has no member named 'st_mtim'

external/ntfs-3g/libfuse-lite/fuse.c:1218: error: 'struct stat' has no member named 'st_atim'

external/ntfs-3g/libfuse-lite/fuse.c:1220: error: 'struct stat' has no member named 'st_mtim'

external/ntfs-3g/libfuse-lite/fuse.c: In function 'fuse_lib_readdir':

external/ntfs-3g/libfuse-lite/fuse.c:1909: warning: comparison between signed and unsigned integer expressions

external/ntfs-3g/libfuse-lite/fuse.c: In function 'locks_insert':

external/ntfs-3g/libfuse-lite/fuse.c:2170: warning: comparison is always true due to limited range of data type

external/ntfs-3g/libfuse-lite/fuse.c: In function 'lock_to_flock':

external/ntfs-3g/libfuse-lite/fuse.c:2250: warning: comparison is always false due to limited range of data type

make: *** [out/target/product/sabresd_6dq/obj/STATIC_LIBRARIES/libfuse_intermediates/libfuse-lite/fuse.o] Error 1

make: Leaving directory `/home/sk/myandroid'

sk@ubuntu:~/myandroid/external/ntfs-3g$

0 Kudos
2,694 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Please delete your corrent "ntfs-3g" folder and unzip a new folder here.

Please don't run "sk@ubuntu:~/myandroid/external/ntfs-3g$ ./configure " at any time, it is for Linux, not for Android, this command will modify some head files for Linux build, so it will fail to build the code in Android.

I attached the build steps again, after finished building the sabresd image, please follow them one by one, don't skip any line or add any line, thanks!

$ export ARCH=arm

$ export CROSS_COMPILE=~/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

$ cd ~/myandroid

$ source build/envsetup.sh

$ lunch sabresd_6dq-user

$ cd external/ntfs-3g

$ mm

Also attached the workable "ntfs-3g.tar.gz" here, hope there will be no more stange things happen in your side again.

0 Kudos
2,692 Views
kaisun1
Contributor III

HI li,

      now i can use commond "ntfs-3g /dev/block/sda1  /mnt/sata" and use mouse click "Mount SD card "button .then ssd is mount.  How do  make it automatic mount ?

0 Kudos
2,692 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

sata hot plug feature was not supported yet, you need connected the sata before power on the board. Then after run into android, it can be mounted.

0 Kudos
2,692 Views
kaisun1
Contributor III

Hi ,

     i have do it .I have compiled  the  Android BSP code a long time ago. it has been generated system.img

when i used the same operation on the /myandroid/external/hostapd. the same error is appear.  where am i wrong?

i have compilde the android bsp code long long ago.  i could  found  everything  on the /out/target/program/sabresd/. it is ok.

please tell me the wrong.

0 Kudos