[OE-core] [PATCH 0/6] fix xuser write to usb storage failed
Hongxu Jia
hongxu.jia at windriver.com
Fri Jul 12 09:29:24 UTC 2013
Test Case
* Steps
1) preparation
...
one target: atom-pc
two usb sticks: one for boot and install, another for plug test, they are both vfat filesystem.
...
2) config
conf/local.conf:
...
MACHINE ?= "atom-pc"
...
3) build image
bitbake core-image-sato
4) load image to atom-pc
Test Case TC-2927: boot and install from usb
5) open a terminal/ssh of atom-pc
Test Case TC-2955: remote access by ssh
6) hotplug test: usb stick with vfat filesystem is accessible
Test Case TC-2947: usb mount
Test Case TC-2950: usb write files
Test Case TC-2948: usb read files
Test Case TC-2949: usb umount
7) coldplug test: usb stick with vfat filesystem is accessible
plug usb stick
boot system
create files in usb
view files in usb by file browser
8) use systemd for the main image and use sysvinit for the rescue image
Modify conf/local.conf, and repeat step 3 to 7;
...
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
...
9) use systemd exclusively
Modify conf/local.conf, and repeat step 3 to 7;
...
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
...
* Expected Results:
1) build image success
2) the owner of plugin usb stick is `xuser', it will be automatically
mount/umount, and xuser could read files from usb and write files to it.
root at emenlow-noemgd:~# mount
/dev/sdc1 on /media/sdc1 type vfat (rw,nosuid,nodev,noexec,relatime,uid=1000,gid=1000,fmask=0177,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,quiet,errors=remount-ro,user)
/dev/sdb on /media/realroot type vfat (rw,nosuid,nodev,noexec,relatime,uid=1000,gid=1000,fmask=0177,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,quiet,errors=remount-ro)
root at emenlow-noemgd:~# ls /media/ -al
drwxr-xr-x 2 root root 16384 Jan 1 1970 realroot
drwx------ 3 xuser xuser 1024 Jun 9 12:08 sdc1
root at emenlow-noemgd:~# su xuser
xuser at emenlow-noemgd:~$ echo "hello world" > /media/sdc1/test
xuser at emenlow-noemgd:~$ cat /media/sdc1/test
hello world
//Hongxu
The following changes since commit a63229917a5708de2d161aba0d67168ce0da6365:
meta-yocto-bsp: update reference board SRCREVs (2013-07-10 09:45:51 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/fix-udev-xuser
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-udev-xuser
Hongxu Jia (6):
pmount: add version 0.9.23
atom-pc:fix xuser write to usb storage failed
udev-extraconf:fix xuser write to usb storage failed
udev: fix invoking pmount failed based on sysvinit
pmount: allow users in disk group to perform pmount/pumount
xuser-account: add xuser to disk group
meta-yocto-bsp/conf/machine/atom-pc.conf | 1 +
meta/recipes-core/udev/udev-extraconf/mount.sh | 31 +++++-
meta/recipes-core/udev/udev/init | 1 +
...-option-f-to-mount-already-mounted-device.patch | 115 +++++++++++++++++++++
meta/recipes-extended/pmount/pmount_0.9.23.bb | 34 ++++++
.../user-creation/xuser-account_0.1.bb | 2 +-
6 files changed, 181 insertions(+), 3 deletions(-)
mode change 100644 => 100755 meta/recipes-core/udev/udev-extraconf/mount.sh
create mode 100644 meta/recipes-extended/pmount/files/pmount-add-option-f-to-mount-already-mounted-device.patch
create mode 100644 meta/recipes-extended/pmount/pmount_0.9.23.bb
--
1.8.1.2
More information about the Openembedded-core
mailing list