Skip navigation.
Home
The QNX Community Portal

View topic - QNX on BBB: Unable to mount file system in read/write mode.

QNX on BBB: Unable to mount file system in read/write mode.

For discussion of realtime and/or embedded programming.

QNX on BBB: Unable to mount file system in read/write mode.

Postby m gate » Thu May 29, 2014 6:25 am

Hi There,

I have downloaded 'bsp-nto650-ti-am335x-starter-kit-trunk-201307050950.zip' and from this BSP I am able to boot default image (prebuilt-bsp-ti-am335x-starter-kit.ifs) on beaglebone balck board but it doesn't allow me to write anything, it runs in read-only mode.

When I try to create directory it says....
#mkdir test
mkdir: test: Function not implemented.


My SD card is detected so I tried to mount that.

#df -h
/dev/hd0 7.4G 7.4G 0 100%

I mounted this device as below, and it didn't gave any error...
#mount /dev/hd0 /

df command output is...
#df -h
/dev/hd0 7.4G 7.4G 0 100% (/)

Now if I try to run mkdir command it says,
#mkdir test
mkdir: test: Corrupted file system detected.

Please help me to mount filesystem in read/write mode? Or do I have to make some change in build script and then build image again using IDE?

Please Help!!


My build script is...

Code: Select all
###########################################################################
##
## QNX Neutrino trunk on the Texas Instruments AM335x Starter Kit Board
##
###########################################################################
##
## SUPPORTED DEVICES:
##
## SERIAL:   OMAP UART
##
##  - For detailed instructions on the default example configuration for
##    these devices see the "CONFIGURING ON-BOARD SUPPORTED HARDWARE"
##    section below the build script section, or refer to the BSP docs.
##  - Tip: Each sub-section which relates to a particular device is marked
##         with its tag (ex. SERIAL). You can use the search features of
##         your editor to quickly find and add or remove support for
##         these devices.
##  - For details on how build files work, please refer to the help
##    documentation for "mkifs" in the QNX Neutrino "Utilities Reference".
##
###########################################################################
##
## NOTES:
##
###########################################################################

###########################################################################
## START OF BUILD SCRIPT
###########################################################################

[image=0x81000000]
#[+compress]
[virtual=armle-v7,raw] .bootstrap = {
   
   startup-am335x-starter-kit -v -wb

   #######################################################################
   ## PATH set here is the *safe* path for executables.
   ## LD_LIBRARY_PATH set here is the *safe* path for libraries.
   ##     i.e. These are the paths searched by setuid/setgid binaries.
   ##          (confstr(_CS_PATH...) and confstr(_CS_LIBPATH...))
   #######################################################################
   PATH=:/proc/boot:/bin:/usr/bin LD_LIBRARY_PATH=:/proc/boot:/lib:/usr/lib:/lib/dll:/usr/lib/graphics procnto-instr -v
}
[+script] .script = {
   # Initialise the console
   procmgr_symlink ../../proc/boot/libc.so.3 /usr/lib/ldqnx.so.2

   display_msg Welcome to QNX Neutrino trunk on the Texas Instruments AM335x Starter Kit (ARMv7 Cortex-A8 core) - Board

   # Start some common servers
   slogger
   pipe

   #######################################################################
   ## SERIAL driver
   #######################################################################
   devc-seromap -e -F -b115200 -c48000000/16 0x44E09000^2,72
   waitfor /dev/ser1 4
   reopen /dev/ser1
   
   devc-seromap -e -F -b115200 -c48000000/16 0x48022000^2,73
   waitfor /dev/ser2 4
   
 
   #######################################################################
   ## MMC/SD driver
   #######################################################################
   display_msg Starting MMC/SD driver...
   # MMC 0 pio
   #devb-mmcsd-jacinto5 cam blk automount=hd0t12:/fs/sd0 mmcsd verbose=5,pio,ioport=0x48060100,irq=64,ioport=0x49000000,dma=24,dma=25
   # MMC 0 dma
   devb-mmcsd-jacinto5 cam blk automount=hd0t12:/fs/sd0 mmcsd verbose=5,ioport=0x48060100,irq=64,ioport=0x49000000,dma=24,dma=25

   #######################################################################
   ## I2C driver
   #######################################################################
   display_msg starting I2C driver...
   # Uncomment for /dev/i2c0
   i2c-omap35xx-j5 -i 70 -p0x44E0B000 --u0
   waitfor /dev/i2c0

   #######################################################################
   ## Watchdog timer
   #  -k    Kick time interval in milliseconds. (Default: 15000 ms)
   #  -t    Timeout Period of watchdog timer in milliseconds. (Default: 2x the kicktime)
   #######################################################################
   display_msg starting WDT reset utility...
   wdtkick
   
   #######################################################################
   ## Board id driver
   #######################################################################
   display_msg starting Board ID driver...
   ## Uncomment for board id
   bdid-am335x
   
   #######################################################################
   ## RTC driver (TPS65910) utility
   ##  - It requires I2C driver
   #######################################################################
   display_msg Setting OS Clock from on-board RTC
   rtc am335xrtc
   
   #######################################################################
   ## USB OTG Host Controller driver
   ## -
   #######################################################################
   display_msg Starting USB OTG Host driver...
   io-usb -v -d dm816x-mg ioport=0x47401c00,irq=19
   waitfor /dev/io-usb/io-usb 4
   devb-umass cam pnp

   #######################################################################
   ## SPI driver
   ## SPI 0 ioport 0x48030100 irq 65
   ## SPI 1 ioport 0x481a0100 irq 125
   #######################################################################
   display_msg Starting SPI driver...
   #  SPI0
   spi-master -d am335x base=0x48030100,irq=65,edma=1,edmairq=529,edmachannel=17
   
   #######################################################################
   ## AUDIO Driver - I2C must be running
   ## McASP2 or McASP5
      #######################################################################
   display_msg Starting Audio driver...
   ## For AM335x Starter Kit
   io-audio -vv -d mcasp-j5_aic3106 mcasp=1,i2c_dev=0,i2c_addr=0x1B,mclk=24000000

   #######################################################################
    ## Network driver
    #######################################################################
    # Start both using
    # "io-pkt-v4-hc -dam335x"
    # -Each device must be on a separate subnet and different IP address
    #
    # Start either 0 or 1 using
    # "io-pkt-v4-hc -dam335x deviceindex=0|1"
    # Whichever index is used, the driver will create dm0
    #
    display_msg Starting network driver for dm0 and dm1...
    io-pkt-v4-hc -dam335x
    waitfor /dev/socket
    ## Either:
   if_up -p -a dm0
    ifconfig dm0 10.150.224.93/16
    ## or:
   #display_msg Getting dm0 network address with DHCP...
    #dhcp.client -i dm0
   #if_up -r 15 dm0
   ## Optional depending on how many devices started
   ## Either:
   #display_msg Getting dm1 network address with DHCP...
    #dhcp.client -i dm1
   #if_up -r 15 dm1
   ## or:
   ifconfig dm1 192.168.0.222/24
   # Show ip address(es)
   ifconfig

   #######################################################################
   # Set the PATH and LD_LIBRARY_PATH depending on the graphics support
   # Photon:
   PATH=:/proc/boot:/bin:/usr/bin:/opt/bin:/usr/photon/bin
   LD_LIBRARY_PATH=:/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib

    #######################################################################
    ## GRAPHICS driver
    ##  (With Photon) 
    #######################################################################
    #PHOTON=/dev/photon
    #PHOTON_PATH=/usr/photon
    #PHOTON_PATH2=/usr/photon
    #PHFONT=/dev/phfont

    display_msg Starting Graphics driver ...
    io-display -dvid=0,did=0
    waitfor /dev/io-display/0000,0000,0 10

    #display_msg Starting Photon...
    #Photon
    #waitfor /dev/photon 5

   # Ensure /usr/photon/bin is in the startup path
    #display_msg Starting io-graphics ...
    #io-graphics
    #waitfor /dev/phfont 5
   
   #######################################################################
   ## INPUT drivers
   #######################################################################
    # To use with Photon:
   #devi-am335xTSC pro1 dev1
   #waitfor /dev/devi 4
   # For Screen:
   # devi-am335xTSC -Pr -R480,272 pro1 dev1
   # waitfor /dev/devi 4
   #devu-mouse &
   #waitfor /dev/usbmouse0
   #devi-hirun msoft fd -d/dev/usbmouse0
   #devu-kbd &
   #waitfor /dev/usbkbd0
   #devi-hirun kbd fd -d/dev/usbkbd0
   

    #######################################################################
    ## REMOTE_DEBUG (gdb or Momentics)
    ##  - refer to the help documentation for the gdb, qconn and the IDE
    ##    for more information on remote debugging
    ##  - the commands shown require that NETWORK is enabled too
    #######################################################################
    devc-pty
    waitfor /dev/ptyp0 4
    waitfor /dev/socket 4
    qconn port=8000
   
   #######################################################################
    ## INETD daemon
    #######################################################################
   display_msg Starting inetd daemon
   inetd
   
   #######################################################################
   ## These env variables are inherited by all the programs which follow
   #######################################################################
   SYSNAME=nto
   TERM=qansi
   HOME=/

   [+session] sh &
}


# Redirect console messages
[type=link] /bin/sh=/proc/boot/ksh
[type=link] /dev/console=/dev/ser1
[type=link] /tmp=/dev/shmem
[type=link] /var/log=/tmp
[type=link] /usr/tmp=/tmp

# Shared libraries:
# Programs require the runtime linker (ldqnx.so) to be at a fixed location

libc.so
libm.so

###########################
# Uncomment for QT programs
###########################
libcpp.so.4
libz.so.2
libbacktrace.so.1

###########################################################################
## uncomment for BLOCK device
###########################################################################
libcam.so
io-blk.so
cam-disk.so
cam-cdrom.so
fs-qnx6.so
fs-qnx4.so
fs-dos.so
fs-udf.so
fs-cd.so

###########################################################################
## uncomment for USB driver
###########################################################################
[perms=+r,+x] devu-dm816x-mg.so
libusbdi.so

###########################################################################
## uncomment for SPI driver
###########################################################################
spi-am335x.so

###########################################################################
## uncomment for DMA shared lib
###########################################################################
libdma-am335x.so

###########################################################################
## uncomment for NETWORKING
###########################################################################
[perms=+r,+x] devnp-am335x.so
libsocket.so

###########################################################################
## uncomment for Screen support
###########################################################################
libhiddi.so.1

###########################################################################
## uncomment for rcheck and mudflap support
###########################################################################
librcheck.so
libmudflap.so.0
libmudflapth.so.0


###########################################################################
## uncomment for GRAPHICS driver (Photon)
###########################################################################
devg-omapl1xx.so
devg-soft3d-fixed.so
libGLES_CL.so.1


###########################################################################
## uncomment for SPLASH/PHOTON support
###########################################################################
[data=uip]
/usr/lib/libdisputil.so.2 = libdisputil.so.2
/usr/lib/libffb.so.2 = libffb.so.2
/usr/lib/libgf.so.1 = libgf.so.1
/usr/lib/libphrender.so.2 = libphrender.so.2
/usr/lib/libAp.so.3 = libAp.so.3
/usr/lib/libph.so.3 = libph.so.3
/usr/lib/libphexlib.so.3 = libphexlib.so.3
/usr/lib/libphrender.so.2 = libphrender.so.2
/usr/lib/libblkcache.so.2 = libblkcache.so.2

## Font Loading
/lib/libfont.so.1 = libfont.so.1
/usr/lib/libFF-T2K.so = libFF-T2K.so
/lib/dll/font/FCcore.so = ${QNX_TARGET}/armle/lib/dll/font/FCcore.so
/lib/dll/font/PHFcore.so = ${QNX_TARGET}/armle/lib/dll/font/PHFcore.so
/lib/dll/font/ttfFFcore.so = ${QNX_TARGET}/armle/lib/dll/font/ttfFFcore.so
/lib/dll/phfont.so = phfont.so
/usr/photon/keyboard/en_US_101.kbd = ${QNX_TARGET}/usr/photon/keyboard/en_US_101.kbd
/usr/photon/palette/default.pal = ${QNX_TARGET}/usr/photon/palette/default.pal
/usr/photon/translations/8859-1.tab = ${QNX_TARGET}/usr/photon/translations/8859-1.tab
/usr/photon/translations/charsets = ${QNX_TARGET}/usr/photon/translations/charsets
/etc/system/config/crtc-settings = ${QNX_TARGET}/usr/photon/config/crtc-settings

# Fonts
/usr/photon/font_repository/tt2001m_.ttf=${QNX_TARGET}/usr/photon/font_repository/tt2001m_.ttf
/usr/photon/font_repository/phcursor.phf=${QNX_TARGET}/usr/photon/font_repository/phcursor.phf
/usr/photon/font_repository/pcterm12.phf=${QNX_TARGET}/usr/photon/font_repository/pcterm12.phf

# Code pages
/usr/photon/translations/8859-1.tab=${QNX_TARGET}/usr/photon/translations/8859-1.tab
/usr/photon/translations/charsets=${QNX_TARGET}/usr/photon/translations/charsets
/usr/photon/palette/default.pal=${QNX_TARGET}/usr/photon/palette/default.pal

# Font configuration files
/usr/photon/font_repository/fontdir = {
primasansbts,0@tt2001m_.ttf,PrimaSans BT,0,,0020-F002,p,192x170,162K
pcterm12,.phf,PC Terminal,12,,0000-00FF,Nf,6x12,13K
phcursor,.phf,Photon Cursor,0,,E900-E921,Np,32x31,3K
}

/usr/photon/font_repository/fontext = {
+normal = primasansbts, phcursor
}

/usr/photon/font_repository/fontmap = {
TextFont = primasansbts
term = pcterm
? = primasansbts
}

/usr/photon/font_repository/fontopts = {
[FontFusion Core 2.xx-numeral-dll]
cache=25600
[PFR-numeral-dll]
cache=25600
[PHF-numeral-dll]
cache=25600
}

## Image Loading
/etc/system/config/img.conf ={
[img_codec_jpg.so]
mime=image/jpeg:image/jpg:image/jp_:application/jpg:application/x-jpg:image/pjpeg:image/pipeg:image/vnd.swiftview-jpeg:image/x-xbitmap
ext=jpg:jpeg
[img_codec_png.so]
mime=image/png:application/png:application/x-png
ext=png
}

libimg.so
# img_codec_bmp.so
# img_codec_gif.so
img_codec_jpg.so
img_codec_png.so
# img_codec_sgi.so
# img_codec_tga.so

# Executables
[data=c]
#######################################################################
## SERIAL driver
#######################################################################
devc-seromap
/bin/stty=stty

###########################################################################
## uncomment for SD driver
###########################################################################
devb-mmcsd-jacinto5

#######################################################################
## I2C driver
#######################################################################
i2c-omap35xx-j5
bdid-am335x

#######################################################################
## Audio driver
#######################################################################
io-audio
deva-ctrl-mcasp-j5_aic3106.so
libasound.so.2

###########################################################################
## uncomment for GRAPHICS driver (Photon)
###########################################################################
vsync
egl-gears-lite
io-display

/etc/system/config/display.conf={
device \{
        drivername=omapl1xx
        vid=0
        did=0
        deviceindex=0
        modeopts=/etc/system/config/omapl1xx.conf
        display \{
                xres=480
                yres=272
                refresh=60
                pixel_format=argb8888
        \}
    \}
}
/etc/system/config/omapl1xx.conf=../src/hardware/devg/omapl1xx/omapl1xx.conf
# Required by Screen for touchscreen apps
/etc/system/config/scaling.conf=../prebuilt/etc/system/config/scaling.conf

#######################################################################
## INPUT drivers
#######################################################################
devi-am335xTSC
devu-kbd
devu-mouse
[search=../prebuilt/armle-v7/bin] /bin/sw-calib-gfi = sw-calib-gfi
libgf.so.1

/etc/system/config/calib.localhost = {
0x0:480x272:4005 110 3883 154 0
0x0:479x271:-841536 -11520 3382485840 3414 -503445 1940707908 6790167
}

###########################################################################
## RTC
###########################################################################
rtc
date

###########################################################################
## uncomment for SPI driver
###########################################################################
[perms=+r,+x] spi-master

###########################################################################
## uncomment for USB driver
###########################################################################
io-usb
usb
devb-umass

###########################################################################
## uncomment for NETWORKING
###########################################################################
io-pkt-v4-hc
ifconfig
if_up
nicinfo
netstat
ping
route
setkey
dhcp.client

#######################################################################
## INPUT drivers
#######################################################################
io-hid
devi-hid
devu-kbd
devu-mouse

###########################################################################
## uncomment for WATCHDOG TIMER utility
###########################################################################
wdtkick

###########################################################################
## uncomment for REMOTE_DEBUG (gdb or Momentics)
###########################################################################
devc-pty
qconn
/usr/bin/pdebug=pdebug

###########################################################################
## uncomment for required network clients and services
###########################################################################
fs-cifs
fs-nfs3
ftp
inetd
/usr/sbin/telnetd=telnetd
/usr/sbin/ftpd=ftpd
/bin/login=login

/etc/inetd.conf={
#
# Configuration file for inetd.
#
# To re-configure the running inetd process, edit this file, then
# send the inetd process a SIGHUP.
#
#
# Internet services syntax:
#  <service_name> <socket_type> <proto> <flags> <user> <server_pathname> <args>
#

telnet     stream tcp nowait root  /usr/sbin/telnetd        in.telnetd
ftp        stream tcp nowait root  /usr/sbin/ftpd           in.ftpd -l

# IPv6 services.
# The only difference with the above is "tcp6" instead of "tcp".
# Be sure to enable both "tcp" and "tcp6" when you need service for
# both IPv4/v6.
#
#telnet          stream  tcp6    nowait  root    /usr/sbin/telnetd    telnetd
}

/etc/passwd={
root::0:0:Superuser:/:/bin/sh
ftp:x:14:80:FTP User:/tmp:
}

/etc/ftpusers={
# list of users disallowed any ftp access.
# read by ftpd(8).
}

/etc/ftpd.conf={
checkportcmd all
classtype chroot CHROOT
classtype guest GUEST
classtype real REAL
display none
limit all -1 # unlimited connections
maxtimeout all 7200 # 2 hours
modify all
motd all motd
notify none
passive all
timeout all 900 # 15 minutes
umask all 027
upload all
modify guest off
umask guest 0707
}
 
/etc/services=${QNX_TARGET}/etc/services

###########################################################################
## general commands
###########################################################################
cat
ls
ksh
mount
pipe
pidin
uname
shutdown
sleep
slogger
sloginfo
slay
umount
mkdir
rmdir
mv
cp
rm
on
elvis
df
ln
chmod
more
hostname
use
kill
#gkermit
# for Touch screen testing
setconf
Photon
io-graphics
wave
waverec
mix_ctl

###########################################################################
## END OF BUILD SCRIPT
###########################################################################
m gate
New Member
 
Posts: 5
Joined: Wed May 28, 2014 11:50 am

Re: QNX on BBB: Unable to mount file system in read/write mo

Postby maschoen » Thu May 29, 2014 4:18 pm

I don't know what's in the image you put on the SD card. It's possible that there is no disk file system. The boot file has a memory file system found at /proc/boot, but it is read only.

The df command is not telling you anything. Is it possible that there is a partition on the disk in which case:

#mount -d /dev/hd0

will enumerate the partitions.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: QNX on BBB: Unable to mount file system in read/write mo

Postby denkelly » Fri May 30, 2014 12:46 am

>>> #mount /dev/hd0 /
This requests the mount of a qnx4 filesystem. If it were qnx4, the BBB would not boot - i.e. it must be fat. Try

# mount -tdos /dev/hd0 /
denkelly
Senior Member
 
Posts: 160
Joined: Sat Aug 02, 2008 3:27 pm

Re: QNX on BBB: Unable to mount file system in read/write mo

Postby m gate » Fri May 30, 2014 6:42 am

Thanks for reply.
Yes, you are right it is a fat filesystem. So I tried mounting as a dos filesystem type using "-t dos" option, and it didn't gave any error, after that I can see it is mounted as below.

/dev/hd0 7.4G 7.4G 0 100% (/)

But in this case also when I try to create any folder, it is saying "Corrupted file system detected".
Please have a look at build script, whether any change is needed in there in order to get read/write filesystem after boot.
m gate
New Member
 
Posts: 5
Joined: Wed May 28, 2014 11:50 am

Re: QNX on BBB: Unable to mount file system in read/write mo

Postby mario » Fri May 30, 2014 1:01 pm

You can`t mount /dev/hd0, you need to mount a partition, which would be mount /dev/hd0t11 for example, to see the list of partition do ls /dev/hd0* . If there is only /dev/hd0, you need to enumerate the partition with mount -d /dev/hd0 then the partition should show up.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: QNX on BBB: Unable to mount file system in read/write mo

Postby denkelly » Sun Jun 01, 2014 1:24 pm

>>>#df -h
>>>/dev/hd0 7.4G 7.4G 0 100%

Apparently there is no partition table - which is why I suggested previous mount command. However, you likely should reformat the card so there is a proper fat partition.
denkelly
Senior Member
 
Posts: 160
Joined: Sat Aug 02, 2008 3:27 pm

Re: QNX on BBB: Unable to mount file system in read/write mo

Postby m gate » Tue Jun 03, 2014 6:13 am

Thanks maschoen, denkelly & mario for your replies.
You guys are really very helpful.

First enumerated filesystem using -e option (in my case it is -e) and then mounted & it worked!!! Now I can mount filesystem and create directories and files.
m gate
New Member
 
Posts: 5
Joined: Wed May 28, 2014 11:50 am


Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 3 guests

cron