The fix turned out to be pretty straightforward: clear the shell's umask prior to extracting from the tarballs, to ensure that the permissions of the rootfs contents are preserved.
commit 6095bb5ef1e068e6d14baf26588b3a67a501a2cc Author: Gareth Stockwell gareth.stockwell@arm.com AuthorDate: Mon Sep 9 10:43:04 2013 +0100 Commit: Gareth Stockwell gareth.stockwell@arm.com CommitDate: Mon Sep 9 10:43:04 2013 +0100
linaro-android-nfs-tool.sh: clear umask before creating rootfs
This ensures that all files and directories are extracted from the tarballs with the correct permissions.
diff --git a/linaro-android-nfs-tool.sh b/linaro-android-nfs-tool.sh index 2432a45..e1cfbcf 100755 --- a/linaro-android-nfs-tool.sh +++ b/linaro-android-nfs-tool.sh @@ -313,6 +313,8 @@ function func_install_binaries(){ }
function func_create_rootfs(){ + umask 0 + if [ -z "${rootfs_dir}" ];then template=$(date '+%y%m%d-%H%M%S') rootfs_dir=`mktemp -d -u --tmpdir=${default_nfs_root_dir} -t $template.XXX`
-----Original Message----- From: linaro-android-bounces@lists.linaro.org [mailto:linaro-android- bounces@lists.linaro.org] On Behalf Of Gareth Stockwell Sent: 06 September 2013 17:24 To: linaro-android@lists.linaro.org Subject: Android NFS boot problem
I am facing a problem booting Android on TC2 via NFS, using the scripts provided in linaro-android-tools.
http://android.git.linaro.org/gitweb?p=platform/external/linaro- android-tools.git;a=shortlog;h=refs/heads/linaro_android_4.3
The rootfs is successfully mounted and /init is executed, but system services fail to launch due to a permissions problem:
Command line 'earlyprintk mem=2G rw ip=dhcp --no-log console=ttyAMA0,38400n8 root=/dev/nfs nfsrootdebug nfsroot=10.1.193.42:/work/local/build/linaro/13.08-4.3/rootfs,tcp,v3 init=/init' ... [ 15.584115] VFS: Mounted root (nfs filesystem) on device 0:12. ... [ 18.447297] init: cannot execve('/system/bin/servicemanager'): Permission denied
I am using the prebuilt binaries from the 4.3-13.08 release for vexpress: https://android-build.linaro.org/builds/~linaro-android/vexpress- linaro-4.3-13.08-release/#build=1
My /etc/exports has this: /work/local/build/linaro/13.08-4.3/rootfs *(rw,sync,no_root_squash,no_subtree_check)
I have tried adding various options to the nfsroot kernel argument (proto=tcp; vers=3; nolock; exec), but none of these has any effect.
Using a Debian rootfs created using qemu-debootstrap, with the same options in /etc/exports and using the same kernel image, the system boots up successfully.
Has anyone seen this problem before?
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782
linaro-android mailing list linaro-android@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-android
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782