Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - devf-ram does not automount as described: (13 Items)
   
devf-ram does not automount as described  
Per http://support7.qnx.com/download/download/20951/building.pdf I should be able to do the following on the Nitrogen6X 
development system (using default BSP).  Assume "my_efs_img" is on the micro-SD card and I have mounted it accordingly  
"mount -t dos /dev/hd0t11 /dos".

# devf-ram &
# flashctl -p /dev/fs0 -e
# cat /dos/my_efs_img > /dev/fs1
# slay devf-ram &
# devf-ram &
# cd /fs1p0
ksh: cd: /fs1p0 - No such file or directory

The last line will not work because the automount did not work properly.  Is this because there is already a flash 
filesystem mounted on the Nitrogen6X board (fs0)?  I mean I should be able to mount multiple flash filesystems right? 
Re: devf-ram does not automount as described  
You are erasing /dev/fs0, but then writing the image to /dev/fs1. Is this what you intended?

Sent from my BlackBerry 10 smartphone.
From: Erick Roane
Sent: Wednesday, May 29, 2013 3:23 PM
To: general-filesystems
Reply To: general-filesystems@community.qnx.com
Subject: devf-ram does not automount as described


Per http://support7.qnx.com/download/download/20951/building.pdf I should be able to do the following on the Nitrogen6X 
development system (using default BSP). Assume "my_efs_img" is on the micro-SD card and I have mounted it accordingly "
mount -t dos /dev/hd0t11 /dos".

# devf-ram &
# flashctl -p /dev/fs0 -e
# cat /dos/my_efs_img > /dev/fs1
# slay devf-ram &
# devf-ram &
# cd /fs1p0
ksh: cd: /fs1p0 - No such file or directory

The last line will not work because the automount did not work properly. Is this because there is already a flash 
filesystem mounted on the Nitrogen6X board (fs0)? I mean I should be able to mount multiple flash filesystems right?




_______________________________________________

General
http://community.qnx.com/sf/go/post101837
To cancel your subscription to this discussion, please e-mail general-filesystems-unsubscribe@community.qnx.com
Attachment: HTML sf-attachment-mime13275 3.05 KB
Re: devf-ram does not automount as described  
Sorry, that was a typo, no it is all on /dev/fs1 like so...

# devf-ram &
# flashctl -p /dev/fs1 -e
# cat /dos/my_efs_img > /dev/fs1
# slay devf-ram &
# devf-ram &
# cd /fs1p0
ksh: cd: /fs1p0 - No such file or directory
RE: devf-ram does not automount as described  

> -----Message d'origine-----
> De : Erick Roane [mailto:community-noreply@qnx.com]
> Envoyé : 29 mai 2013 15:24
> À : general-filesystems
> Objet : devf-ram does not automount as described
> 
> Per http://support7.qnx.com/download/download/20951/building.pdf I
> should be able to do the following on the Nitrogen6X development system
> (using default BSP).  Assume "my_efs_img" is on the micro-SD card and I have
> mounted it accordingly  "mount -t dos /dev/hd0t11 /dos".
> 
> # devf-ram &
> # flashctl -p /dev/fs0 -e
> # cat /dos/my_efs_img > /dev/fs1
> # slay devf-ram &
> # devf-ram &
> # cd /fs1p0
> ksh: cd: /fs1p0 - No such file or directory

Maybe I`m missing something but for auto-mount to work the device has to exist. When devf-ram is killed the content  of 
corresponding device, memory, is destroyed. There is nothing to auto-mount from when you restart devf-ram.

> 
> The last line will not work because the automount did not work properly.  Is
> this because there is already a flash filesystem mounted on the Nitrogen6X
> board (fs0)?  I mean I should be able to mount multiple flash filesystems
> right?
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post101837
> To cancel your subscription to this discussion, please e-mail general-
> filesystems-unsubscribe@community.qnx.com

Re: RE: devf-ram does not automount as described  
Then why does http://support7.qnx.com/download/download/20951/building.pdf give the following guidance:

"To use the [devf-ram] flash filesystem partition, you need to slay the driver and start it again so it can recognize 
the partitions and mount them. For instance, with devf-ram:

$ slay devf-ram
$ devf-ram &

From this point, you have a /fs0p1 mountpoint that’s in fact a directory and contains the files you specified with 
mkefs to create your flash image."

You can substitude the "fs0p1" in the paragraph above with "fs1p0" for my Nitrogen6X system since /dev/fs0 is the on-
board boot ROM.  What other way can I mount the image using devf-ram?
RE: RE: devf-ram does not automount as described  
Here's a link to the HTML version of that section:

http://www.qnx.com/developers/docs/6.5.0_sp1/topic/com.qnx.doc.neutrino_building/building_nto.html?cp=13_2_3_5_2#
TransferringToFlash

I think this section uses devf-ram as a rather artificial example to illustrate how to transfer an image to flash using 
flash filesystem raw mountpoints. Perhaps we should make the example more realistic or point out that that step won't 
actually work with devf-ram.

Steve Reid (stever@qnx.com)
Technical Editor
QNX Software Systems


-----Original Message-----
From: Erick Roane [mailto:community-noreply@qnx.com] 
Sent: Wednesday, May 29, 2013 3:36 PM
To: general-filesystems
Subject: Re: RE: devf-ram does not automount as described

Then why does http://support7.qnx.com/download/download/20951/building.pdf give the following guidance:

"To use the [devf-ram] flash filesystem partition, you need to slay the driver and start it again so it can recognize 
the partitions and mount them. For instance, with devf-ram:

$ slay devf-ram
$ devf-ram &

From this point, you have a /fs0p1 mountpoint that’s in fact a directory and contains the files you specified with 
mkefs to create your flash image."

You can substitude the "fs0p1" in the paragraph above with "fs1p0" for my Nitrogen6X system since /dev/fs0 is the on-
board boot ROM.  What other way can I mount the image using devf-ram?



_______________________________________________

General
http://community.qnx.com/sf/go/post101841
To cancel your subscription to this discussion, please e-mail general-filesystems-unsubscribe@community.qnx.com
Re: RE: RE: devf-ram does not automount as described  
Agreed, but to my other question, what other way can I transfer a pre-built image to devf-ram?  I actually want to use 
it until my real flash system is available.  
Re: devf-ram does not automount as described  
Copy the efs to /dev/shmem/fs0, and then start devf-ram.

Sent from my BlackBerry 10 smartphone.
From: Erick Roane
Sent: Wednesday, May 29, 2013 4:42 PM
To: general-filesystems
Reply To: general-filesystems@community.qnx.com
Subject: Re: RE: RE: devf-ram does not automount as described


Agreed, but to my other question, what other way can I transfer a pre-built image to devf-ram? I actually want to use it
 until my real flash system is available.



_______________________________________________

General
http://community.qnx.com/sf/go/post101845
To cancel your subscription to this discussion, please e-mail general-filesystems-unsubscribe@community.qnx.com
Attachment: HTML sf-attachment-mime13286 2.48 KB
Re: devf-ram does not automount as described  
Again, I cannot use fs0 because that is my boot ROM.  But I tried this with fs1 and this is what I got:

# cat /dos/my_efs_img > /dev/shmem/fs1
# devf-ram &
[1] 61463
#

[1] + Done                 devf-ram
# ls
bin     dev     dos     etc     proc    sbin    tmp     usr
# ls /dev
bpf          hd0t11       ptyp0        shmem        tap2         ttyp6
bpf0         hd0t179      ptyp1        slog         tap3         ttyp7
can0         i2c1         ptyp2        snd          text         tun0
console      i2c2         ptyp3        socket       tty          tun1
dbgmem       i2c3         ptyp4        stderr       ttyp0        tun2
fs0          io-usb       ptyp5        stdin        ttyp1        tun3
fs0p0        mem          ptyp6        stdout       ttyp2        tymem
fs1          null         ptyp7        tap          ttyp3        zero
fs1p0        pipe         sem          tap0         ttyp4
hd0          profiler     ser2         tap1         ttyp5
#

Notice the /dev/fs1p0 appears in the system but it is not mounted.  If I try to explicitly mount it:

# flashctl -p /dev/fs1p0 -m
flashctl: mounting partition failed

Because the simulated flash file system in RAM must always be erased before it is mounted when using flashctl.
Re: devf-ram does not automount as described  
Pass -i 1 to the driver when you start it.

Sent from my BlackBerry 10 smartphone.
From: Erick Roane
Sent: Wednesday, May 29, 2013 5:00 PM
To: general-filesystems
Reply To: general-filesystems@community.qnx.com
Subject: Re: devf-ram does not automount as described


Again, I cannot use fs0 because that is my boot ROM. But I tried this with fs1 and this is what I got:

# cat /dos/my_efs_img > /dev/shmem/fs1
# devf-ram &
[1] 61463
#

[1] + Done devf-ram
# ls
bin dev dos etc proc sbin tmp usr
# ls /dev
bpf hd0t11 ptyp0 shmem tap2 ttyp6
bpf0 hd0t179 ptyp1 slog tap3 ttyp7
can0 i2c1 ptyp2 snd text tun0
console i2c2 ptyp3 socket tty tun1
dbgmem i2c3 ptyp4 stderr ttyp0 tun2
fs0 io-usb ptyp5 stdin ttyp1 tun3
fs0p0 mem ptyp6 stdout ttyp2 tymem
fs1 null ptyp7 tap ttyp3 zero
fs1p0 pipe sem tap0 ttyp4
hd0 profiler ser2 tap1 ttyp5
#

Notice the /dev/fs1p0 appears in the system but it is not mounted. If I try to explicitly mount it:

# flashctl -p /dev/fs1p0 -m
flashctl: mounting partition failed

Because the simulated flash file system in RAM must always be erased before it is mounted when using flashctl.



_______________________________________________

General
http://community.qnx.com/sf/go/post101848
To cancel your subscription to this discussion, please e-mail general-filesystems-unsubscribe@community.qnx.com
Attachment: HTML sf-attachment-mime13290 3.27 KB
Re: devf-ram does not automount as described  
Still not showing up.

# cat /dos/bp_fs.img > /dev/shmem/fs1
# devf-ram -i 1 &
[1] 57367
#

[1] + Done                 devf-ram -i 1
# ls
bin     dev     dos     etc     proc    sbin    tmp     usr
#

Maybe I'm doing something wrong with my efs filesytem build.  Here is my Makefile

all : my_efs_img
	echo "Making QNX6 file image" 
	
my_efs_img : build
	mkefs -v build my_efs_img
	
clean :
	echo "Cleaning QNX 6 file system image"
	rm -f my_efs_img

And here is my build file:

[search=C:\QNX650\target\qnx6\armle-v7\bin;C:\QNX650\target\qnx6\armle-v7\sbin;C:\QNX650\target\qnx6\armle-v7\usr\bin;C:
\QNX650\target\qnx6\armle-v7\usr\sbin;C:\QNX650\target\qnx6\armle-v7\usr\photon\bin;C:\QNX650\target\qnx6\armle-v7\usr\
libexec;C:\QNX650\target\qnx6\armle-v7\lib\dll;C:\QNX650\target\qnx6\armle-v7\usr\photon\dll;C:\QNX650\target\qnx6\armle
-v7\lib;C:\QNX650\target\qnx6\armle-v7\usr\lib;C:\QNX650\target\qnx6\armle-v7\usr\photon\lib;C:\QNX650\target\qnx6\armle
-v7\etc;C:\QNX650\target\qnx6\etc;C:\QNX650\target\qnx6\usr\photon;C:\QNX650\target\qnx6\usr\photon\keyboard;C:\QNX650\
target\qnx6\usr\lib;C:\QNX650\target\qnx6\usr\share;C:\QNX650\target\qnx6\armle-v7\boot\sys;C:\QNX650\target\qnx6\usr\
lib\terminfo;C:\QNX650\target\qnx6\usr\lib\terminfo\a;C:\QNX650\target\qnx6\usr\lib\terminfo\q;C:\QNX650\target\qnx6\usr
\lib\terminfo\t;C:\QNX650\target\qnx6\usr\lib\terminfo\v;C:\QNX650\target\qnx6\usr\lib\terminfo\x;C:\QNX650\target\qnx6\
etc\system\config;C:\QNX650\target\qnx6\etc\ssh]

[block_size=128k spare_blocks=1 min_size=384k]

dummy.dat = { 

This is a dummy data file. 

}
Re: devf-ram does not automount as described  
Specify the sector size with -s0,1m,128k

Sent from my BlackBerry 10 smartphone.
From: Erick Roane
Sent: Wednesday, May 29, 2013 5:24 PM
To: general-filesystems
Reply To: general-filesystems@community.qnx.com
Subject: Re: devf-ram does not automount as described


Still not showing up.

# cat /dos/bp_fs.img > /dev/shmem/fs1
# devf-ram -i 1 &
[1] 57367
#

[1] + Done devf-ram -i 1
# ls
bin dev dos etc proc sbin tmp usr
#

Maybe I'm doing something wrong with my efs filesytem build. Here is my Makefile

all : my_efs_img
echo "Making QNX6 file image"

my_efs_img : build
mkefs -v build my_efs_img

clean :
echo "Cleaning QNX 6 file system image"
rm -f my_efs_img

And here is my build file:

[search=C:\QNX650\target\qnx6\armle-v7\bin;C:\QNX650\target\qnx6\armle-v7\sbin;C:\QNX650\target\qnx6\armle-v7\usr\bin;C:
\QNX650\target\qnx6\armle-v7\usr\sbin;C:\QNX650\target\qnx6\armle-v7\usr\photon\bin;C:\QNX650\target\qnx6\armle-v7\usr\
libexec;C:\QNX650\target\qnx6\armle-v7\lib\dll;C:\QNX650\target\qnx6\armle-v7\usr\photon\dll;C:\QNX650\target\qnx6\armle
-v7\lib;C:\QNX650\target\qnx6\armle-v7\usr\lib;C:\QNX650\target\qnx6\armle-v7\usr\photon\lib;C:\QNX650\target\qnx6\armle
-v7\etc;C:\QNX650\target\qnx6\etc;C:\QNX650\target\qnx6\usr\photon;C:\QNX650\target\qnx6\usr\photon\keyboard;C:\QNX650\
target\qnx6\usr\lib;C:\QNX650\target\qnx6\usr\share;C:\QNX650\target\qnx6\armle-v7\boot\sys;C:\QNX650\target\qnx6\usr\
lib\terminfo;C:\QNX650\target\qnx6\usr\lib\terminfo\a;C:\QNX650\target\qnx6\usr\lib\terminfo\q;C:\QNX650\target\qnx6\usr
\lib\terminfo\t;C:\QNX650\target\qnx6\usr\lib\terminfo\v;C:\QNX650\target\qnx6\usr\lib\terminfo\x;C:\QNX650\target\qnx6\
etc\system\config;C:\QNX650\target\qnx6\etc\ssh]

[block_size=128k spare_blocks=1 min_size=384k]

dummy.dat = {

This is a dummy data file.

}



_______________________________________________

General
http://community.qnx.com/sf/go/post101850
To cancel your subscription to this discussion, please e-mail general-filesystems-unsubscribe@community.qnx.com
Attachment: HTML sf-attachment-mime13294 4.03 KB
Re: devf-ram does not automount as described  
I think you meant -s0,1m,,,128k

The third argument for this option is aoffset (array offset info flash), the fourth is asize (size of flash array equal 
to wsize), and the fifth is usize (physical erase sector size).  Works great!  Thanks for the help!

# cat /dos/bp_fs.img > /dev/shmem/fs1
# devf-ram -i1 -s0,1m,,,128k &
[1] 40983
#

[1] + Done                 devf-ram -i1 -s0,1m,,,128k
# ls
bin      dos      fs1p0    sbin     usr
dev      etc      proc     tmp
# cd /fs1p0
# ls
dummy.dat
# cat dummy.dat

This is a dummy data file.

#