AnsweredAssumed Answered

android rootfs over nfs issues

Question asked by rema on Nov 7, 2012
Branched to a new discussion


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

Outcomes