android rootfs over nfs issues

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

android rootfs over nfs issues

Jump to solution
4,876 Views
rema
Contributor I


I'm working with an iMX6 SabreSD board. I've got the board booting from eMMC. I have been able to build the kernel Image and android image and can flash the board using the MfgTool successfully.

 

I am currently trying to set up my development environment to have android boot up over NFS and kernel over TFTP.  My host machine runs Ubuntu 12.04.

 

I've followed the instructions in the i.MX_Android_R13.3_User_Guide.html document that came with the imx-android-r13.3 package for the build and setting up of the nfs directory.

 

The kernel comes up correctly, but I am having problems with the NFS boot part. (Kernel's uImage is available in /var/lib/tftpboot/)

 

Output of /etc/exports:

/var/lib/export-rfs   *(rw,no_root_squash,async,no_subtree_check)

 

The android rootfs is available under /var/lib/export-rfs/sabresd_6q

After copying over the files to /var/lib/export-rfs/sabresd_6q, I modified init.freescale.rc and commented out the lines that would mount /system /data/, etc from /dev/block/mmcblk0p*.

 

I can mount the nfs directory on a pc correctly and have no read-write issues. NFS works ok otherwise. I am using it successfully for other directories under /var/lib/export-rfs on different machines.

 

The output on the console from the boot up sequence is attached.

 

The logcat output shows the following errors :

 

E/dalvikvm( 3987): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory

 

I/dalvikvm( 3987): Unable to open or create cache for /system/framework/core.jar (/data/dalvik-cache/system@framework@core.jar@classes.dex)

D/dalvikvm( 3987): Unable to process classpath element '/system/framework/core.jar'

E/dalvikvm( 3987): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory

I/dalvikvm( 3987): Unable to open or create cache for /system/framework/core-junit.jar (/data/dalvik-cache/system@framework@core-junit.jar@classes.dex)

D/dalvikvm( 3987): Unable to process classpath element '/system/framework/core-junit.jar'

E/dalvikvm( 3987): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory

I/dalvikvm( 3987): Unable to open or create cache for /system/framework/bouncycastle.jar (/data/dalvik-cache/system@framework@bouncycastle.jar@classes.dex)

D/dalvikvm( 3987): Unable to process classpath element '/system/framework/bouncycastle.jar'

E/dalvikvm( 3987): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory

I/dalvikvm( 3987): Unable to open or create cache for /system/framework/ext.jar (/data/dalvik-cache/system@framework@ext.jar@classes.dex)

D/dalvikvm( 3987): Unable to process classpath element '/system/framework/ext.jar'

E/dalvikvm( 3987): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory

I/dalvikvm( 3987): Unable to open or create cache for /system/framework/framework.jar (/data/dalvik-cache/system@framework@framework.jar@classes.dex)

D/dalvikvm( 3987): Unable to process classpath element '/system/framework/framework.jar'

E/dalvikvm( 3987): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory

I/dalvikvm( 3987): Unable to open or create cache for /system/framework/android.policy.jar (/data/dalvik-cache/system@framework@android.policy.jar@classes.dex)

D/dalvikvm( 3987): Unable to process classpath element '/system/framework/android.policy.jar'

E/dalvikvm( 3987): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory

I/dalvikvm( 3987): Unable to open or create cache for /system/framework/services.jar (/data/dalvik-cache/system@framework@services.jar@classes.dex)

D/dalvikvm( 3987): Unable to process classpath element '/system/framework/services.jar'

E/dalvikvm( 3987): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory

I/dalvikvm( 3987): Unable to open or create cache for /system/framework/apache-xml.jar (/data/dalvik-cache/system@framework@apache-xml.jar@classes.dex)

D/dalvikvm( 3987): Unable to process classpath element '/system/framework/apache-xml.jar'

E/dalvikvm( 3987): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory

I/dalvikvm( 3987): Unable to open or create cache for /system/framework/filterfw.jar (/data/dalvik-cache/system@framework@filterfw.jar@classes.dex)

D/dalvikvm( 3987): Unable to process classpath element '/system/framework/filterfw.jar'

E/dalvikvm( 3987): No valid entries found in bootclasspath '/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar'

E/dalvikvm( 3987): VM aborting

F/libc    ( 3987): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1)

 

So it looks like it can't access /system and /data, etc.

 

The files are available as read-only when I do an ls -l on the target. (Can't write to them). I can't do a touch successfully.

 

Running mount shows the following output:

 

rootfs / rootfs rw 0 0

 

192.168.1.112:/var/lib/export-rfs/sabresd_6q/ / nfs ro,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.112,mountvers=3,mountproto=tcp,local_lock=all,addr=192.168.1.112 0 0

tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0

devpts /dev/pts devpts rw,relatime,mode=600 0 0

proc /proc proc rw,relatime 0 0

sysfs /sys sysfs rw,relatime 0 0

none /acct cgroup rw,relatime,cpuacct 0 0

tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0

tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0

tmpfs /mnt/shm tmpfs rw,relatime,size=1024k,mode=775,uid=1000,gid=1003 0 0

none /dev/cpuctl cgroup rw,relatime,cpu 0 0

none /sys/kernel/debug debugfs rw,relatime 0 0

root@android:/ #



The output of Uboot environemt:

 

MX6Q SABRESD U-Boot > printenv

 

bootdelay=3

baudrate=115200

netmask=255.255.255.0

rd_loadaddr=0x11000000

netdev=eth0

ethprime=FEC0

fastboot_dev=mmc3

ethact=FEC0

ipaddr=192.168.1.103

loadaddr=0x10800000

bootfile=uImage

serverip=192.168.1.112

nfsroot=var/lib/export-rfs/sabresd_6q

bootcmd=dhcp;bootm

stdin=serial

stdout=serial

stderr=serial

bootargs=console=ttymxc0,115200 init=/init rw video=mxcfb0 ip=dhcp fbmem=10M nfsroot=192.168.1.112:/var/lib/export-rfs/sabresd_6q vmalloc=400M androidboot.console=ttymxc0


Environment size: 509/8188 bytes


MX6Q SABRESD U-Boot >

 

This is what I set it as in U-Boot:

setenv bootargs console=ttymxc0,115200 init=/init rw video=mxcfb0 ip=dhcp fbmem=10M nfsroot=${serverip}:/${nfsroot}, vmalloc=400M androidboot.console=ttymxc0

 

The bootargs variable for the console is specifying it as rw, but it looks like / is finally mounted as ro. Any ideas on where I can change this or what can be causing these errors.

 

Thanks.

 

Regards,

-Rema.

 


Original Attachment has been moved to: bootconsole.txt.zip

Labels (3)
1 Solution
1,816 Views
rema
Contributor I

Thanks Daiane.

After a bit of trial and error after I had posted this problem, I discovered that adding the mount with the nfs command in the init.freescale.rc file had fixed this issue.

View solution in original post

6 Replies
1,816 Views
daiane_angolini
NXP Employee
NXP Employee

RO issue on system usually is something wrong on init.rc.

Try to look for the command line that mount /system or that remount /systems with ro

1,817 Views
rema
Contributor I

Thanks Daiane.

After a bit of trial and error after I had posted this problem, I discovered that adding the mount with the nfs command in the init.freescale.rc file had fixed this issue.

1,816 Views
evgenymolchanov
Contributor III

Hello Rema. Could you be so kind and provide "nfs command in the init.freescale.rc file" which solved you issue?

0 Kudos
Reply
1,816 Views
durgeshsingh
Contributor I

Hi Reema,

I am also getting the same issue while encrypting/decrypting the phone and after encryption is done when device is trying to reboot i am getting this issue,so there is something i need to modify in the init files.

Can u please tell what exactly you have changed to resolve this issue.

Thanks,

Durgesh

0 Kudos
Reply
1,816 Views
JamesBlack
Contributor I

I have exactly the same issue. Can you post the mount command that you used in the init.freescale.rc. I am not sure what "adding the mount with the nfs command" translate into.

0 Kudos
Reply
1,816 Views
JamesBlack
Contributor I

My problem was that the file

./system/core/rootdir/init.rc

<snip>

on post-fs

    # once everything is setup, no need to modify /

#    mount rootfs rootfs / ro remount

Thinking .system/core/rootdir/init.rc ended up in the root directory of the nfs mount. Apparently it does not. I have not found the actual file that the build uses.

We also had to change

./device/fsl/imx6/sabresd/init.rc

to remove all the ext4 mounts

in the file device/fsl//imx6/sabresd/init.rc,

add a line so it doesn't try to reDHCP during boot

and comment out the ext4 mounts

setprop ethernet.clear.ip no
#on fs
# mount ext4 partitions
# mount ext4 /dev/block/mmcblk0p5 /system
# mount ext4 /dev/block/mmcblk0p5 /system ro remount
# mount ext4 /dev/block/mmcblk0p7 /data nosuid nodev nodiratime noatime
errors=panic,discard,nomblk_io_submit,noauto_da_alloc
# mount ext4 /dev/block/mmcblk0p6 /cache nosuid nodev
# mount ext4 /dev/block/mmcblk0p8 /device ro nosuid nodev