|
2010-01-19
, 02:04
|
Posts: 207 |
Thanked: 119 times |
Joined on Nov 2009
@ Pittsburgh, PA, USA
|
#133
|
sudo gainroot cd /home/user umount MyDocs sfdisk -d > sf nano sf # set 1st partition to 83 sfdisk --force /dev/mmcblk0 < sf mkfs.ext3 /dev/mmcblk0p1
#!/usr/bin/awk BEGIN { # states so that we don't end up having more than one # of home or MyDocs; we can have as many swaps as we find __home = 0 __fat = 0 print "# autogenerated" print "rootfs / rootfs defaults,errors=remount-ro,noatime 0 0" } /^\/dev\/mmc/ { start=1 } start == 1 && $6 == 82 { printf "%s none swap sw 0 0\n", $1 } start == 1 && $6 == 83 && !__home { printf "%s /home ext3 %s 0 0\n", "/dev/mmcblk0p2", home_opts __home++ } start == 1 && $6 == 83 && !__fat { printf "%s /home/user/MyDocs ext3 %s 0 0\n", "/dev/mmcblk0p1", home_opts __fat++ }
#!/bin/sh # $1 - device # $2 - mount point # $3 - rw or ro mode for mounting # $4 - file system vfat or ext3. If it is absent mount vfat. . /etc/default/mount-opts #load standard parameters for mounting FAT and ext3 #home_opts="rw,noatime,errors=continue,commit=1,data=writeback" #fat_opts="noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir" case "$4" in ext3) SYS=ext3 PAR=$home_opts ;; *) SYS=vfat PAR="$3,$fat_opts" ;; esac COMMAND="mount -t $SYS -o $PAR "$1" "$2" > /dev/null" #echo $COMMAND eval $COMMAND #mount -t vfat -o $3,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir "$1" "$2" > /dev/null
max@max-lap:~$ diff -b '/home/max/TEMP/n900/Scratchbox/ke-recv/ke-recv-3 (fixed).19/src/osso-mmc-mount.sh' '/home/max/TEMP/n900/Scratchbox/ke-recv/ke-recv-3.19/src/osso-mmc-mount.sh'
40d39
<
49,53d47
< FSys=vfat
< ;;
< 83)
< logger "$0: $PDEV type '$PID' is not FAT32 or FAT16"
< FSys=ext3
56c50
< logger "$0: $PDEV type '$PID' is not FAT32 or FAT16 or ext3"
---
> logger "$0: $PDEV type '$PID' is not FAT32 or FAT16"
66c60
< # mmc-mount $PDEV $MP ro $FSys
---
> # mmc-mount $PDEV $MP ro
76,78c70
< #echo "mmc-mount $PDEV $MP rw $FSys"
<
< mmc-mount $PDEV $MP rw $FSys
---
> mmc-mount $PDEV $MP rw
81d72
< #echo $RC
96,101d86
< if [ "$FSys" = "ext3" ]; then
< #chown -R user:users "$XDG_DOCUMENTS_DIR" "$XDG_PICTURES_DIR" "$XDG_MUSIC_DIR" "$XDG_VIDEOS_DIR" "$NOKIA_CAMERA_DIR"
< chown -R user:users "$MP"
< chmod -R 774 "$XDG_DOCUMENTS_DIR" "$XDG_PICTURES_DIR" "$XDG_MUSIC_DIR" "$XDG_VIDEOS_DIR" "$NOKIA_CAMERA_DIR"
< fi
<
118,122d102
< if [ "$FSys" = "ext3" ]; then
< #chown -R user:users "$NOKIA_MMC_CAMERA_DIR"
< chown -R user:users "$MP"
< chmod -R 774 "$NOKIA_MMC_CAMERA_DIR"
< fi
max@max-lap:~$
#!/bin/sh # This file is part of ke-recv # # Copyright (C) 2005-2009 Nokia Corporation. All rights reserved. # # Author: Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA # Return codes: # 0 - mounted read-write # 1 - could not mount # 2 - mounted read-only PDEV=$1 ;# preferred device (partition) MP=$2 ;# mount point grep "$PDEV " /proc/mounts > /dev/null if [ $? = 0 ]; then logger "$0: $PDEV is already mounted" exit 0 fi if [ ! -d $MP ]; then mkdir -p $MP fi if ! [ $PDEV = /dev/mmcblk0 -o $PDEV = /dev/mmcblk1 ]; then # check the FAT magic number PNUM=$(echo $PDEV | sed "s#/dev/mmcblk[01]p##") DEV=$(echo $PDEV | sed "s#p[1234]##") PID=$(sfdisk -c $DEV $PNUM) case "$PID" in b | c | e | 4 | 6 | 14 | 16 | 1b | 1c | 1e) logger "$0: $PDEV partition type is '$PID'" FSys=vfat ;; 83) logger "$0: $PDEV type '$PID' is not FAT32 or FAT16" FSys=ext3 ;; *) logger "$0: $PDEV type '$PID' is not FAT32 or FAT16 or ext3" exit 1 ;; esac fi # time limited check #/sbin/dosfsck -I -n -T 10 $PDEV #if [ $? != 0 ]; then # logger "$0: $PDEV is corrupt, trying to mount it read-only" # mmc-mount $PDEV $MP ro $FSys # if [ $? = 0 ]; then # logger "$0: $PDEV mounted read-only" # exit 2 # else # logger "$0: Couldn't mount $PDEV read-only" # exit 1 # fi #fi #echo "mmc-mount $PDEV $MP rw $FSys" mmc-mount $PDEV $MP rw $FSys RC=$? logger "$0: mounting $PDEV read-write to $MP, rc: $RC" #echo $RC if [ $RC = 0 ]; then # create some special directories for user's partition if [ "x$MP" = "x/home/user/MyDocs" -a -w $MP ]; then # use global folder names USERDIRS="/home/user/.config/user-dirs.dirs" if [ -f "$USERDIRS" ]; then HOME='/home/user' source "$USERDIRS" mkdir -p "$XDG_DOCUMENTS_DIR" mkdir -p "$XDG_PICTURES_DIR" mkdir -p "$XDG_MUSIC_DIR" mkdir -p "$XDG_VIDEOS_DIR" mkdir -p "$NOKIA_CAMERA_DIR" if [ "$FSys" = "ext3" ]; then #chown -R user:users "$XDG_DOCUMENTS_DIR" "$XDG_PICTURES_DIR" "$XDG_MUSIC_DIR" "$XDG_VIDEOS_DIR" "$NOKIA_CAMERA_DIR" chown -R user:users "$MP" chmod -R 774 "$XDG_DOCUMENTS_DIR" "$XDG_PICTURES_DIR" "$XDG_MUSIC_DIR" "$XDG_VIDEOS_DIR" "$NOKIA_CAMERA_DIR" chmod -R ug+rwX "$MP" fi else # fallback for d in .sounds .videos .documents .images .camera; do mkdir -p $MP/$d done fi touch $MP elif [ "x$MP" = "x/home/user/MyDocs" ]; then logger "$0: '$MP' is not writable" elif [ "x$MP" = "x/media/mmc1" -a -w $MP ]; then # use global folder names USERDIRS="/home/user/.config/user-dirs.dirs" if [ -f "$USERDIRS" ]; then HOME='/home/user' source "$USERDIRS" mkdir -p "$NOKIA_MMC_CAMERA_DIR" if [ "$FSys" = "ext3" ]; then #chown -R user:users "$NOKIA_MMC_CAMERA_DIR" chown -R user:users "$MP" chmod -R ug+rwX "$MP" chmod -R 774 "$NOKIA_MMC_CAMERA_DIR" fi fi elif [ "x$MP" = "x/media/mmc1" ]; then logger "$0: '$MP' is not writable" fi fi exit $(($RC != 0))
sudo addgroup --gid 29999 n900 sudo adduser YourUserName n900
|
2010-01-19
, 06:47
|
Posts: 543 |
Thanked: 181 times |
Joined on Aug 2009
@ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
|
#134
|
|
2010-01-19
, 07:43
|
Posts: 543 |
Thanked: 181 times |
Joined on Aug 2009
@ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
|
#135
|
|
2010-01-24
, 15:09
|
Posts: 451 |
Thanked: 334 times |
Joined on Sep 2009
|
#136
|
|
2010-01-24
, 15:42
|
Posts: 543 |
Thanked: 181 times |
Joined on Aug 2009
@ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
|
#137
|
|
2010-01-24
, 16:36
|
Posts: 451 |
Thanked: 334 times |
Joined on Sep 2009
|
#138
|
|
2010-01-24
, 16:38
|
Posts: 451 |
Thanked: 334 times |
Joined on Sep 2009
|
#139
|
From testing it. I umounted MyDocs and camera refused to work without a volume. It clearly states it wants a volume to store images.
|
2010-01-24
, 16:53
|
Posts: 543 |
Thanked: 181 times |
Joined on Aug 2009
@ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
|
#140
|
Now my camera can took pictures on ext3 and vfat!!!!
I resolved it by modification ke-recv (I will try too put patch somewhere...).
But camera has bug too.....
Bug is:
When camera start it is checking on presence folder DCIM on target partition. If it doesn't exist camera create folder DCIM. Here is a bug!
DCIM created with root:root (group and user) but should be user:users.
Like way around (until nokia will fix it) could be change owner:group by command:
chown -R user:users DCIM
chmod -R 664 DCIM
After this camera make picture on ext3 partition!!!
Quality of pictures absolutely same!
full script for this:
1. Turn on Camera
2. Change Location for saving picture on internal memory
3. Make picture. Camera will be closed with error message.
4. in terminal type:
chown -R user:users DCIM
chmod -R 664 DCIM
After this camera will work.