[QNX 7.0_x86_generic] Serial Port Data Receive Issue

Hi Tim,

You don’t have to do the automount command. You can do the manual mount on separate lines as you have done. You just have to include the mount command in your boot image.

[John] Yes, we have already tried by adding below mounting lines in the boot image and tested. Still no sucess with password changing and new user creation.

As per your input, instead of mounting under /fs/qnx6, we have mounted under “/” and tested. Still issue remains same.

We do not have any duplicate home folder. Only one home folder under / and second partition is mounted under that.

We have contacted Exar support team regarding QNX driver for the XR2838V4 UART device.

Also, we are trying to compile waverec.c example(qnx.com/developers/docs/7.0. … verec.html) application in QNX 7.0 IDE momentics. We are getting error as "undefined reference to snd_pcm_xx(open,plugin_flush,plugin_info, plugin_read) " functions.

It seems somewhere i need to point library for that snc_pcm functions. What are the libraries i need to add and where to add in QNX 7.0?

Expecting your ideas.

Thanks,
John

Hi Geoff,

As per your suggestions, we have added below command in boot image and checked. this is mounted under “/”. But it doesn’t help to change the password or new user creation.

Our device SATA based , so devb-ahci works fine.

devb-ahci cam quiet ahci nports=4 blk automount=hd0t178:/:qnx6 &

Thanks,
John

Hi John,

When you try to change the password using the passwd command are you still seeing the same error?
If you go to /etc/passwd can you manually edit those files and create a new user in /etc/passwd and /etc/shadow and so on. Jjust copy the root entries to root1 and see if you can log in as root1 (ie I want to see if you can save and then if the system is reading from those files correctly).

For waverec, this link
qnx.com/developers/docs/7.0. … write.html
says you need to add ‘-l asound’ to include the asound libraries. Hopefully you have those libraries.

Tim

Hi Tim,

When you try to change the password using the passwd command are you still seeing the same error?

Yes, we are facing issue in password changing and new user creation,

We can’t able to edit passwd, shadow, group files under /etc folder. Its giving file is read only. When i checked permissions using ls -l , root , user having read and write permissions. But we can’t able to edit those files.

-rw-rw-r-- 1 root root 138 oct 22 2019 passwd
-rw-rw-r-- 1 root root 478 oct 22 2019 shadow

Thanks,
John

Hi John,

Can you post your current build file that you are using now.

Can you also post what ‘ls -l /’ reports.

Finally, what are the contents of passwd, group and shadow.

Something is messed up someplace. It could be in the pam stuff too but lets look at the QNX part first. You should absolutely be able to edit the contents of ‘passwd’ and save a new version when you log in as root.

Tim

Hi Tim,

Can you post your current build file that you are using now.

Please find the build file as below,

[code][image=0x1400000]
#---------------------------------------------------------------------------------------------------

x86 32bits build for generic x86 platform

#---------------------------------------------------------------------------------------------------
[virtual=x86,multiboot +compress] boot = {
startup-x86 -v
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/proc/boot:/x86/sbin:/x86/usr/sbin:/x86/bin:/x86/usr/bin LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/lib/dll/pci:/x86/lib:/x86/usr/lib:/x86/lib/dll procnto-smp-instr -v
}

[+script] startup-script = {
procmgr_symlink …/…/proc/boot/libc.so /usr/lib/ldqnx.so.2

display_msg Welcome to Aries x86 system

#-------------------------------------------------------------------------------------------

Starting slogger2 server

#---------------------------------------------------------------------------------------------------
display_msg “Starting slogger2 server …”
slogger2 -s2048k &
waitfor /dev/slog2

#---------------------------------------------------------------------------------------------------

Settings env for PCI server and starting PCI server

#---------------------------------------------------------------------------------------------------
PCI_HW_MODULE=/lib/dll/pci/pci_hw-Intel_x86.so ## uncomment this line for Intel platform, comment out for other platform

PCI_HW_MODULE=/lib/dll/pci/pci_hw-AMD_x86.so ## uncomment this line for AMD platform, comment out for other platform

PCI_SLOG_MODULE=/lib/dll/pci/pci_slog2.so
PCI_DEBUG_MODULE=/lib/dll/pci/pci_debug2.so
PCI_BASE_VERBOSITY=3

PCI_HW_CONFIG_FILE=/etc/system/config/pci/pci_hw-VMware.cfg ## uncomment this line for VMWare image, comment out for other platform

#---------------------------------------------------------------------------------------------------
display_msg “Starting PCI server …”
pci-server --aspace-enable

Note: Specify the highest bus to be scanned during enumeration as below. See also pci-server ‘use’ information

pci-server --bus-scan-limit=16 --aspace-enable

waitfor /dev/pci

#---------------------------------------------------------------------------------------------------

Get the disk up and running

#---------------------------------------------------------------------------------------------------

sh /proc/boot/blk-start.sh

display_msg "Mounting Filesystems"

mount -t qnx6 -o sync=none /dev/hd0t178 /
mount -t qnx6 -o sync=none /dev/hd0t179 /home

#---------------------------------------------------------------------------------------------------

Note:

If there is a /x86 filesystem in hard disk, Please uncomment the line below,

further commands can now be run from the filesystem in hard disk.

#---------------------------------------------------------------------------------------------------

waitfor /x86

#---------------------------------------------------------------------------------------------------

Starting common services

#---------------------------------------------------------------------------------------------------
display_msg “Starting some common services …”
dumper
pipe
random -t
mqueue
devc-pty

#---------------------------------------------------------------------------------------------------

Starting network driver and services

#---------------------------------------------------------------------------------------------------
sh /proc/boot/net-start.sh

#---------------------------------------------------------------------------------------------------

Starting USB host driver and services

#---------------------------------------------------------------------------------------------------
display_msg “Starting USB host …”
io-usb-otg -d xhci -d ehci -d ohci -d uhci
waitfor /dev/usb/io-usb-otg

display_msg "Starting devb-umass ..."
devb-umass cam pnp &

#---------------------------------------------------------------------------------------------------

Starting audio driver

#---------------------------------------------------------------------------------------------------
sh /proc/boot/aud-start.sh

#---------------------------------------------------------------------------------------------------

Starting Input services

#---------------------------------------------------------------------------------------------------
display_msg “Starting input services …”
io-hid -d usb
waitfor /dev/io-hid/io-hid

#---------------------------------------------------------------------------------------------------

Starting serial driver

#---------------------------------------------------------------------------------------------------
display_msg “Starting serial driver …”
devc-ser8250 -b 115200 3f8,4 2f8,3 3e8,9 2e8,10 &
waitfor /dev/ser1

Note: If need a serial debug port, please uncomment the line below

Please change the device name to the actull debug port name

TERM=qansi on -t /dev/ser1 -l root

Note: If need a USB-serial debug port, please uncomment the line below

Please make sure the USB driver has been lauched first and you have the USB-serial device connected

display_msg “Starting serial USB driver …”

devc-serusb -e -b115200

waitfor /dev/serusb1

TERM=qansi on -t /dev/serusb1 -l root

#---------------------------------------------------------------------------------------------------

Starting consoles and shells

#---------------------------------------------------------------------------------------------------
display_msg “Starting consoles …”
devc-con-hid -n8
waitfor /dev/con1
waitfor /dev/con2
waitfor /dev/con3
waitfor /dev/con4

#---------------------------------------------------------------------------------------------------
display_msg “Starting shells …”
SYSNAME=nto
TERM=qansi

reopen /dev/con2
[+session] sh &

reopen /dev/con3
[+session] sh &

reopen /dev/con4
[+session] sh &

reopen /dev/con1
[+session] sh

}

[type=link] /bin/sh=/proc/boot/ksh
[type=link] /tmp=/dev/shmem
[type=link] /var/run=/dev/shmem
[type=link] /var/db=/dev/shmem

#---------------------------------------------------------------------------------------------------

shared library

#---------------------------------------------------------------------------------------------------
libc.so
libncursesw.so
libpanelw.so
libdevice-publisher.so

#---------------------------------------------------------------------------------------------------

libraries for new PCI driver

#---------------------------------------------------------------------------------------------------
libpci.so
[-followlink search=${QNX_TARGET}/${PROCESSOR}] /lib/dll/pci/=lib/dll/pci

#---------------------------------------------------------------------------------------------------

libraries for block drivers

#---------------------------------------------------------------------------------------------------
io-blk.so
libcam.so
fs-qnx6.so
fs-dos.so
cam-disk.so
cam-cdrom.so

#---------------------------------------------------------------------------------------------------

Note:

If there is a filesystem (/x86) that include the libariries list below

(before the line [data=copy]), you could comment them out to reduces the size of IFS images.

#---------------------------------------------------------------------------------------------------

#---------------------------------------------------------------------------------------------------

more shared libraries

#---------------------------------------------------------------------------------------------------
libm.so
libz.so
libslog2.so
libslog2parse.so
libtracelog.so
libpps.so
libbacktrace.so

#---------------------------------------------------------------------------------------------------

libraries for USB drivers

#---------------------------------------------------------------------------------------------------
libusbdi.so
libhiddi.so
devu-hcd-ehci.so
devu-hcd-ohci.so
devu-hcd-uhci.so
devu-hcd-xhci.so

#---------------------------------------------------------------------------------------------------

libraries for Audio drivers

#---------------------------------------------------------------------------------------------------
deva-ctrl-intel_hda.so
deva-mixer-hda.so
deva-ctrl-audiopci.so
deva-mixer-ac97.so
libasound.so

#---------------------------------------------------------------------------------------------------

libraries for io-hid drivers

#---------------------------------------------------------------------------------------------------
devh-usb.so
devh-ps2ser.so

#---------------------------------------------------------------------------------------------------

libraries for network drivers

#---------------------------------------------------------------------------------------------------
libsocket.so
devnp-e1000.so
devnp-rtl8169.so
libcrypto.so
librpc.so

#-------------------

libraries for drm

#---------------
libdrm.so
libdrm_intel.so

[data=copy]

#---------------------------------------------------------------------------------------------------

script for launching the network driver

#---------------------------------------------------------------------------------------------------
net-start.sh={
#!/bin/sh

PCI_DEVICE_LIST=/dev/shmem/pci_device.list
STD_NULL=/dev/null

supported list for the network devices

INTEL_8086_100f=8086/100f
INTEL_8086_1559=8086/1559
INTEL_8086_1570=8086/1570
INTEL_8086_15a3=8086/15a3
INTEL_8086_15a2=8086/15a2
INTEL_8086_1502=8086/1502
INTEL_8086_1503=8086/1503
INTEL_8086_1f41=8086/1f41
INTEL_8086_1533=8086/1533 #Aries
RTL_RTL8169=10ec/8168

uncomment the line below if any driver use the old PCI API’s

export PCI_BKWD_COMPAT_MODULE=/lib/dll/pci/pci_bkwd_compat.so

#check if there is the pci device list
if [ ! -r $PCI_DEVICE_LIST ]; then
echo “Get PCI device list …”
pci-tool -v > $PCI_DEVICE_LIST
fi

#check if there is the Intel E1000 Ethernet device in the list
if grep $INTEL_8086_100f $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_8086_1559 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_8086_1570 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_8086_15a3 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_8086_15a2 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_8086_1502 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_8086_1503 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_8086_1533 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_8086_1f41 $PCI_DEVICE_LIST > $STD_NULL
then
echo “Starting E1000 Ethernet driver …”
io-pkt-v6-hc -de1000 pci=0
if_up -r 10 -p wm0
ifconfig wm0 up
io-pkt-v6-hc -i1 -de1000 pci=1 -ptcpip prefix=/alt
SOCK=/alt if_up -r 10 -p wm0
SOCK=/alt ifconfig wm0 up

#check if there is the Realtek RTL8169 Ethernet device in the list
elif grep $RTL_RTL8169 $PCI_DEVICE_LIST > $STD_NULL
then
echo “Starting RTL8169 Ethernet driver …”
io-pkt-v6-hc -d rtl8169
if_up -r 10 -p rt0
ifconfig rt0 up

else
echo “No Ethernet device has been detected”
exit 0;

fi

echo "Starting network service ..."
dhclient -nw wm0
SOCK=/alt dhclient -nw wm0
qconn
inetd

}

#---------------------------------------------------------------------------------------------------

script for launching the audio driver

#---------------------------------------------------------------------------------------------------
aud-start.sh={
#!/bin/sh

PCI_DEVICE_LIST=/dev/shmem/pci_device.list
AUD_DEVICE=/dev/snd
STD_NULL=/dev/null

supported list for the intel_hda audio devices

INTEL_HDA_ICH6=8086/2668
INTEL_HDA_ICH7=8086/27d8
INTEL_HDA_ICH8=8086/284b
INTEL_HDA_ICH9=8086/293e
INTEL_HDA_ICH10=8086/3a3e
INTEL_HDA_ICH10_82801JD=8086/3a6e
INTEL_HDA_POULSBO=8086/811b
INTEL_HDA_CPT=8086/1c20
INTEL_HDA_H77=8086/1e20
INTEL_HDA_HASWELL=8086/8c20
INTEL_HDA_3400=8086/3b56
INTEL_HDA_VALLYVIEW=8086/0f04
INTEL_HDA_LYNXPLPHD=8086/9c20
INTEL_HDA_WCPLPHD=8086/9ca0
INTEL_HDA_CHERRYHILL=8086/2284
INTEL_HDA_SUNRISEPLHD=8086/9d70
ATI_HDA_SB600=1002/4383
AMD_HDA_FCH=1022/780d

supported list for the audiopci audio devices

ENSONIQ_1370=1274/5000
ENSONIQ_1371=1274/1371
ENSONIQ_5880=1274/5880
CREATIVE_EV1938=1102/8938

uncomment the line below if any driver use the old PCI API’s

export PCI_BKWD_COMPAT_MODULE=/lib/dll/pci/pci_bkwd_compat.so

#check if there is the pci device list
if [ ! -r $PCI_DEVICE_LIST ]; then
echo “Get PCI device list …”
pci-tool -v > $PCI_DEVICE_LIST
fi

#check if there is Intel HD Audio device in the list
if grep $INTEL_HDA_ICH6 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_ICH7 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_ICH8 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_ICH9 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_ICH10 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_ICH10_82801JD $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_POULSBO $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_CPT $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_H77 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_HASWELL $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_3400 $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_VALLYVIEW $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_LYNXPLPHD $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_WCPLPHD $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_CHERRYHILL $PCI_DEVICE_LIST > $STD_NULL ||
grep $INTEL_HDA_SUNRISEPLHD $PCI_DEVICE_LIST > $STD_NULL ||
grep $AMD_HDA_FCH $PCI_DEVICE_LIST > $STD_NULL ||
grep $ATI_HDA_SB600 $PCI_DEVICE_LIST > $STD_NULL
then
echo “Starting audio driver …”
io-audio -d intel_hda &

#check if there is audiopci device in the list
elif grep $ENSONIQ_1370 $PCI_DEVICE_LIST > $STD_NULL ||
grep $ENSONIQ_1371 $PCI_DEVICE_LIST > $STD_NULL ||
grep $ENSONIQ_5880 $PCI_DEVICE_LIST > $STD_NULL ||
grep $CREATIVE_EV1938 $PCI_DEVICE_LIST > $STD_NULL
then
echo “Starting audio driver …”
io-audio -d audiopci &

else
echo “No audio device has been detected”
exit 0;

fi

waitfor $AUD_DEVICE

}

#---------------------------------------------------------------------------------------------------

script for launching the block driver

#---------------------------------------------------------------------------------------------------
blk-start.sh={
#!/bin/sh

PCI_DEVICE_LIST=/dev/shmem/pci_device.list

please change the device name below to the actull name of block device

BLK_DEVICE=/dev/hd0
STD_NULL=/dev/null

supported list for the block devices

SATA_8086_0f23=8086/0f23
SATA_8086_9c03=8086/9c03
SATA_8086_9c83=8086/9c83
SATA_8086_9d03=8086/9d03
SATA_8086_1c02=8086/1c02
SATA_8086_1e03=8086/1e03
SATA_8086_1f22=8086/1f22
SATA_8086_1f32=8086/1f32
SATA_1022_7801=1022/7801
EIDE_8086_7111=8086/7111

uncomment the line below if any driver use the old PCI API’s

export PCI_BKWD_COMPAT_MODULE=/lib/dll/pci/pci_bkwd_compat.so

#check if there is the pci device list
if [ ! -r $PCI_DEVICE_LIST ]; then
echo “Get PCI device list …”
pci-tool -v > $PCI_DEVICE_LIST
fi

#check if there is the SATA device in the list
if grep $SATA_8086_0f23 $PCI_DEVICE_LIST > $STD_NULL ||
grep $SATA_8086_9c03 $PCI_DEVICE_LIST > $STD_NULL ||
grep $SATA_8086_9c83 $PCI_DEVICE_LIST > $STD_NULL ||
grep $SATA_8086_9d03 $PCI_DEVICE_LIST > $STD_NULL ||
grep $SATA_8086_1c02 $PCI_DEVICE_LIST > $STD_NULL ||
grep $SATA_8086_1e03 $PCI_DEVICE_LIST > $STD_NULL ||
grep $SATA_8086_1f22 $PCI_DEVICE_LIST > $STD_NULL ||
grep $SATA_8086_1f32 $PCI_DEVICE_LIST > $STD_NULL ||
grep $SATA_1022_7801 $PCI_DEVICE_LIST > $STD_NULL
then
echo “Starting AHCI block driver …”
#devb-ahci cam quiet ahci nports=4 blk automount=hd0t179:/:qnx6 &
devb-ahci cam quiet

#check if there is the EIDE device in the list
elif grep $EIDE_8086_7111 $PCI_DEVICE_LIST > $STD_NULL
then
echo “Starting EIDE block driver …”
devb-eide cam quiet blk automount=hd0t179:/:qnx6 &

else
echo “No block device has been detected”
exit 0;

fi

waitfor $BLK_DEVICE

}

#---------------------------------------------------------------------------------------------------

.profile for setting environment for PCI, graphic, etc.

#---------------------------------------------------------------------------------------------------
/root/.profile={

set PCI environment

export PCI_HW_MODULE=/lib/dll/pci/pci_hw-Intel_x86.so ## uncomment this line for Intel platform, comment out for other platform
#export PCI_HW_MODULE=/lib/dll/pci/pci_hw-AMD_x86.so ## uncomment this line for AMD platform, comment out for other platform
export PCI_BKWD_COMPAT_MODULE=/lib/dll/pci/pci_bkwd_compat.so ## uncomment this line if any driver use the old PCI API’s
export PCI_SLOG_MODULE=/lib/dll/pci/pci_slog2.so
export PCI_DEBUG_MODULE=/lib/dll/pci/pci_debug2.so
export PCI_BASE_VERBOSITY=3
#export PCI_HW_CONFIG_FILE=/etc/system/config/pci/pci_hw-VMware.cfg ## uncomment this line for VMWare image, comment out for other platform

set GRAPHICS environment

#export GRAPHICS_ROOT=/usr/lib/graphics/vmware ## uncomment this line for VMWare image, comment out for other platform

export LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/lib/dll/pci:/x86/lib:/x86/usr/lib:/x86/lib/dll:$GRAPHICS_ROOT
export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/proc/boot:/x86/sbin:/x86/usr/sbin:/x86/bin:/x86/usr/bin
}

#---------------------------------------------------------------------------------------------------

PCI support

#---------------------------------------------------------------------------------------------------
pci-server

Note: if you wish to use pci-tool interactive mode, add [+raw] to the pci-tool inclusion below

see ‘use’ information in pci-tool

pci-tool
rsrcdb_query
[search=${QNX_TARGET}/etc/system/config/pci] /etc/system/config/pci/pcidatabase.com-tab_delimited.txt=pcidatabase.com-tab_delimited.txt
#[search=${QNX_TARGET}/etc/system/config/pci] /etc/system/config/pci/pci_hw-VMware.cfg=pci_hw-VMware.cfg
#---------------------------------------------------------------------------------------------------

block driver

#---------------------------------------------------------------------------------------------------
devb-ahci
devb-eide

#---------------------------------------------------------------------------------------------------

general commands

#---------------------------------------------------------------------------------------------------
ksh
waitfor
grep
/sbin/ifconfig=ifconfig

#---------------------------------------------------------------------------------------------------

Network services (telnet) support

#---------------------------------------------------------------------------------------------------
devc-pty

/etc/hosts=${QNX_TARGET}/etc/hosts
/etc/services=${QNX_TARGET}/etc/services

/etc/inetd.conf = {
ftp stream tcp nowait root /usr/sbin/ftpd in.ftpd -l
telnet stream tcp nowait root /usr/sbin/telnetd in.telnetd
}

/etc/ftpusers=${QNX_TARGET}/etc/ftpusers

/etc/ftpd.conf = {
/* Make things a+rw by default */
umask all 0000
}

#[uid=0 gid=0 perms=0666] /etc/passwd = {
/etc/passwd = {
root:x:0:0:Superuser:/root:/bin/sh
qnxuser1:x:1000:1000:qnxuser:/home:/bin/sh
}

#[uid=0 gid=0 perms=0600] /etc/shadow = {
/etc/shadow = {
root:@S@vvd+OXAgwbeNLUt9nkOJll0cg/ikKmlUEQfitqQdsYoESduLX66l1EOKSXljfVvSlcAZNxw/KrFRWrkSe1juIw==@OTE5OTkxNGJjZWM5OGEzNTFjYjY4OTMxNGM0NzNhMzg=:1468494669:0:0
qnxuser1:@S@SH3K++tbdsf3SPVrtpsLUncU7FL4IJ0emlHofpEoYqIbKZVKYI8sAswWIcLmgM1uZMTMsL1IAwDAYCBs8SfnoQ==@Nzc5MDI1NmUzNWI1OWE1NGUwY2YyZTM5NWRhZjhmNzM=:1468488235:0:0
}

#[uid=0 gid=0 perms=0644] /etc/group = {
/etc/group = {
root:x:0:root
qnxuser1:x:1000
}

/etc/resolv.conf = {
search localdomain
nameserver 8.8.8.8
}

#---------------------------------------------------------------------------------------------------

PAM configurations addon build file

#---------------------------------------------------------------------------------------------------
[uid=0 gid=0 perms=4755] /bin/login=login
[uid=0 gid=0 perms=4755] /bin/passwd=passwd
[uid=0 gid=0 perms=4755] /bin/su=su
[uid=0 gid=0 perms=0755] /usr/sbin/sshd=sshd
[uid=0 gid=0 perms=0755] /usr/sbin/ftpd=ftpd
[uid=0 gid=0 perms=0755] /usr/sbin/inetd=inetd
[uid=0 gid=0 perms=0755] /usr/sbin/telnetd=telnetd

[uid=0 gid=0 type=dir dperms=0755] /usr
[uid=0 gid=0 type=dir dperms=0755] /usr/lib
[uid=0 gid=0 type=dir dperms=0755] /etc #aries
[uid=0 gid=0 type=dir dperms=0755] /etc/pam.d
[uid=0 gid=0 perms=0755] /etc/pam.d/login=${QNX_TARGET}/etc/pam.d/login
[uid=0 gid=0 perms=0755] /etc/pam.d/on=${QNX_TARGET}/etc/pam.d/on
[uid=0 gid=0 perms=0755] /etc/pam.d/passwd=${QNX_TARGET}/etc/pam.d/passwd
[uid=0 gid=0 perms=0755] /etc/pam.d/su=${QNX_TARGET}/etc/pam.d/su
[uid=0 gid=0 perms=0755] /etc/pam.d/ftpd=${QNX_TARGET}/etc/pam.d/ftpd

[uid=0 gid=0 perms=0755] /usr/lib/pam_ftpusers.so=pam_ftpusers.so
[uid=0 gid=0 perms=0755] /usr/lib/pam_rootok.so=pam_rootok.so
[uid=0 gid=0 perms=0755] /usr/lib/pam_qnx.so=pam_qnx.so
#[uid=0 gid=0 perms=0755] /usr/lib/pam_deny.so=pam_deny.so
#[uid=0 gid=0 perms=0755] /usr/lib/pam_echo.so=pam_echo.so
#[uid=0 gid=0 perms=0755] /usr/lib/pam_exec.so=pam_exec.so
#[uid=0 gid=0 perms=0755] /usr/lib/pam_group.so=pam_group.so
#[uid=0 gid=0 perms=0755] /usr/lib/pam_mac.so=pam_mac.so
#[uid=0 gid=0 perms=0755] /usr/lib/pam_permit.so=pam_permit.so
#[uid=0 gid=0 perms=0755] /usr/lib/pam_radius.so=pam_radius.so
#[uid=0 gid=0 perms=0755] /usr/lib/pam_self.so=pam_self.so

#---------------------------------------------------------------------------------------------------

serial drivers

#---------------------------------------------------------------------------------------------------
devc-con
devc-con-hid
devc-ser8250
devc-serusb

#---------------------------------------------------------------------------------------------------

audio driver and support

#---------------------------------------------------------------------------------------------------
io-audio
wave
waverec
mix_ctl

#---------------------------------------------------------------------------------------------------

network driver and support

#---------------------------------------------------------------------------------------------------
io-pkt-v6-hc
nicinfo
if_up
ftp
ping
ping6
fs-nfs3
qconn
dhclient
netstat
route
tcpdump
[search=${QNX_TARGET}/sbin perms=a+x] /sbin/dhclient-script=dhclient-script
[search=${QNX_TARGET}/etc] /etc/dhclient.conf=dhclient.conf

#---------------------------------------------------------------------------------------------------

USB driver and support

#---------------------------------------------------------------------------------------------------
io-usb-otg
usb
devb-umass
io-hid

#---------------------------------------------------------------------------------------------------

more general commands

#---------------------------------------------------------------------------------------------------
on
cat
cp
mkdir
ls
pipe
mqueue
random
pidin
rm
uname
slogger2
slog2info
slay
mount
umount
shutdown
less
rtc
date
fdisk
use
dumper
env
find
ln
sleep
tty
sync
coreinfo
mkqnx6fs
dd
dloader
pdebug
chmod
vi
mv
df
setfacl
chown
stty
[/code]

Can you also post what ‘ls -l /’ reports.

Please find the attached images ls -l details of /, etc and pam.d folders.

Thanks,
John

Have you tried Tim’s image?

The one you posted is pretty much the one that comes with the generic x86 BSP. I can see where you mount the two partitions. The photo of the root directory indicates that this was successful, so the correct block device driver is running.

Can you also post the outputs of ls -laF / and ls -laF /.boot please? ls -l / doesn’t show the “hidden” directories or files (that start with a period character like /.boot).

But I also see the default /etc files (passwd, shadow, group, resolv.conf, etc) and these will be contained in the image - thus be read only. I think it will take precedence over any /etc you have on the hard drive.

I removed all that stuff - including the pam stuff - from my image.

I don’t use the sync argument to mount on my hard drives - I use sync on the USB thumbdrive though as it doesn’t seem to work without it. But it’s:

mount -tqnx6 -i sync=optional /dev/hd1t178 /usb (after I start all the USB stuff of course).

However, since I am a control freak (or so I am told) I start my block devices myself rather than let the blk-start.sh script do it (in both cases it got it wrong).

My command to start and mount the external drive are simply:

devb-eide cam quiet blk automount=/dev/hd0t178:/:qnx6 &

(or devb-ahci on the other machine with the same arguments).

I suggest you try Tim’s image and see what happens. It is very much along the same lines as mine. To get /home I suppose do mount that partition manually. Maybe put a /home on the boot partition to get things back to simple basics, and once you are up and running then proceed to configure it further to the way you want it.

I have a basic boot image (that I call “emergency_boot”) that I stick in /.boot of the /dev/hd0t178 boot partition. It doesn’t do much other than start a shell with root priviliges. From there I can manually start the devb-eide manager and then the various mounts and anything else to my heart’s content. When it all screws up I simply reboot and select the emergency boot image on startup. This allowed me to play with the various files and permissions that were stopping me from logging in when I started all this with QNX7. I was basically where you are at.

Geoff.

John.

Where are you? In the world.

Geoff.

Hi Geoff,

Have you tried Tim’s image?

Yes, I have tried that image. Since it doesn’t boot with our platform (Byatrail), we have modified the boot section and booted the same image as Tim provided. In that image, there are no general commands like ls, passwd, login added. So I have added only 3 commands and tried to change the password for root. Since there is no root login, we can’t change.

Please find the attached boot image (just have the modification of Tim image).

[code][image=0x1400000]
#---------------------------------------------------------------------------------------------------

x86 32bits build for generic x86 platform

#---------------------------------------------------------------------------------------------------
[virtual=x86,multiboot +compress] boot = {
startup-x86 -v
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/proc/boot:/x86/sbin:/x86/usr/sbin:/x86/bin:/x86/usr/bin LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/lib/dll/pci:/x86/lib:/x86/usr/lib:/x86/lib/dll procnto-smp-instr -v
}

Start-up script

[+script] startup-script = {
procmgr_symlink …/…/proc/boot/libc.so /usr/lib/ldqnx.so.2

display_msg “Advantech Build V1.0”

Needed for pci-server

display_msg “Starting slogger2 server …”
slogger2 -s2048k &
waitfor /dev/slog2

# Needed for consoles   

display_msg “Starting some common services …”
pipe
devc-pty &

# Settings env for PCI server and starting PCI server

PCI_HW_MODULE=/lib/dll/pci/pci_hw-Intel_x86.so
PCI_SLOG_MODULE=/lib/dll/pci/pci_slog2.so
PCI_DEBUG_MODULE=/lib/dll/pci/pci_debug2.so
PCI_BASE_VERBOSITY=3

display_msg “Starting PCI Server …”
pci-server --aspace-enable
waitfor /dev/pci

Start the disk driver

display_msg “Starting Disk Driver …”
devb-ahci cam quiet ahci nports=4 blk automount=hd0t177:/:qnx6 &
waitfor /boot 10

# Starting USB host driver and services for keyboard / mouse

display_msg “Starting USB host …”
io-usb-otg -n /dev/io-usb/io-usb -d xhci -d ehci -d ohci -d uhci
waitfor /dev/io-usb/io-usb

devb-umass cam pnp &
io-hid -d usb /dev/io-usb/io-usb
waitfor /dev/io-hid/io-hid

Starting consoles and shells

display_msg “Starting consoles …”
devc-con-hid -r50 -n4
waitfor /dev/con1
waitfor /dev/con2
waitfor /dev/con3
waitfor /dev/con4

SYSNAME=nto
TERM=qansi-m

# Do custom system initialization
/etc/rc.d/rc.sysinit

reopen /dev/con1
[+session] sh

}

Components

[data=copy]
libc.so

PCI

pci-server
libpci.so
[-followlink search=${QNX_TARGET}/${PROCESSOR}] /lib/dll/pci/=lib/dll/pci

Sata

devb-ahci
io-blk.so
libcam.so
fs-qnx6.so
fs-dos.so
cam-disk.so
cam-cdrom.so

USB

io-usb-otg
usb
libusbdi.so
libhiddi.so
devu-hcd-ehci.so
devu-hcd-ohci.so
devu-hcd-uhci.so
devu-hcd-xhci.so
devb-umass

HID

io-hid
devh-usb.so
devh-ps2ser.so

Console

devc-con
devc-con-hid

SLogger

slogger2
slog2info
libslog2.so
libslog2parse.so
libtracelog.so
libpps.so
libbacktrace.so
devc-pty
pipe
ksh

Create virtual links to the Ram drive so temp files go in Ram

[type=link] /usr/lib/ldqnx.so.2 = /proc/boot/libc.so
[type=link] /bin/sh=/proc/boot/ksh
[type=link] /var/run=/dev/shmem
[type=link] /var/db=/dev/shmem

#---------------------------------------------------------------------------------------------------

serial drivers

#---------------------------------------------------------------------------------------------------
devc-con
devc-con-hid
devc-ser8250
devc-serusb

#---------------------------------------------------------------------------------------------------

audio driver and support

#---------------------------------------------------------------------------------------------------
io-audio
wave
waverec
mix_ctl

#---------------------------------------------------------------------------------------------------

network driver and support

#---------------------------------------------------------------------------------------------------
io-pkt-v6-hc
nicinfo
if_up
ftp
/sbin/ping=ping
ping6
fs-nfs3
qconn
dhclient
netstat
route
tcpdump
[search=${QNX_TARGET}/sbin perms=a+x] /sbin/dhclient-script=dhclient-script
[search=${QNX_TARGET}/etc] /etc/dhclient.conf=dhclient.conf

#---------------------------------------------------------------------------------------------------

USB driver and support

#---------------------------------------------------------------------------------------------------
io-usb-otg
usb
devb-umass
io-hid

login
passwd

#---------------------------------------------------------------------------------------------------

more general commands

#---------------------------------------------------------------------------------------------------
on
cat
cp
mkdir
ls
pipe
mqueue
random
pidin
rm
uname
slogger2
slog2info
slay
mount
umount
shutdown
less
rtc
date
fdisk
use
dumper
env
find
ln
sleep
tty
sync
coreinfo
mkqnx6fs
dd
dloader
pdebug
chmod
vi
mv
df
setfacl
chown
stty[/code]

We have attached the image of “ls -laF” of /etc , /.boot and / folders. Please find the images.

Thanks,
John

Hi Geoff,

We are in ASIA.

Thanks,
John

OK.

(I hope Tim doesn’t mind my following suggestions)! :slight_smile:

Please comment out the live that starts devb-ahci with the automount. Now build it and copy to the hard drive boot partition (/.boot).

Also comment out the line that refers to /etc/rc.d/rc.sysinit

Restart the machine. You should end up with a shell terminal with root privileges. At this stage you are operating within the realm of the boot image. Now start devb-ahci with no arguments. It should find the hard drive and after a bit of output and after a couple of seconds simply press to restore (to visibility) the # prompt.

Now enter:

ls /dev

You should (I hope) see listed /dev/hd0t177. This is your boot partition. You will also I think see /dev/hd0t178 - that will be the other partition that I think you eventually want to mount as /home.

Now enter:

mount -t qnx6 /dev/hd0t177 /hd

This mounts the boot partition as /hd and its contents will now be visible to you under /hd. For example, if you enter ls - laF /hd you will see the contents of the root directory of that partition. Please post this output.

I am also interested in the output of df -hk

This is really getting back to basics but that is a good place to start and move forward bit by bit. The ability to start/stop operating services (drivers such as devb-ahci, devc-ser8250, etc) and incrementally work towards a functional system is one of the great features of QNX, and one reason why I love working with it so much.

If here is a /hd/etc I’d like to see the long listing of that also.

Anyway, if you can post the long listing of /hd it will give me (and Tim I suppose) an idea of what’s what with it, hopefully allow a plan to move forward to be formulated.

Geoff.

Hi Geoff,

Yes, as you suggested we have comment the automount and rc.sysinit ijn build file and built the same. We have created two partitions (177 (boot) and 178) using fdisk and copied the .bin file to /.boot folder of hd0t177 partition.

We have booted the image and started the disk driver using devb-ahci and found that hd0t177 and hd0178 was listing under /dev.

Then we mounted using below command (mount -t qnx6 /dev/h0t177 /hd) and took ls -laF for /hd folder.

Also, using df -hP we have verified that partitions are mounted properly. We didn’t mount our second partition, since that will not necessary as of now for our issue.

We cant able to share the image. We are getting error as " Sorry, the board attachment quota has been reached"

#df -hP

Filesystem          size                  Used             Available           capacity           Mounted on
/dev/hd0             24G                    24G               0                        100%                 /dev/hd0t178
/dev/hd0              5.9G                    5.9G            0                        100%                 /dev/hd0t177
/dev/hd0               30G                      30G            0                        10%
#ls -laF /hd

drwrwxr-x                   ./
drwxr-xr-x                   ../
drwx-------                   .boot/

Thanks,
John

So the hard drive is effectively blank, apart from the .boot directory where you have your boot image file.

If you now ls -laF / I suspect that you will have no /etc, /home, anything like that, as Tim’s image (like mine) does not implicitly create them. You are operating completely off the /proc/boot image. If you look in /proc/boot you should find all your utility files, along with drivers, shared libraries, etc.

/proc/boot is also in your search path ($PATH). As a result you can use ls, df, etc from your shell terminal.

The trick now is to get the required file structures onto the hard drive so that when you start devb-ahci and mount /dev/hd0t177, it’s all there waiting for you when you do the automount. So you can now un-comment the line with devb-ahci cam quiet ahci nports=4 blk automount=/dev/hd0t177:/:qnx6 &, rebuild it, put the new .bin file into /.boot, and reboot.

When you get your shell back you should still be able to use the utilities but an ls -laF / will (or should) also show your .boot file with your .bin file in it. Along with /proc/boot.

As for building /etc and others, well I cheat a bit but it’s complicated. I am not sure how best to describe what I do as it involves another machine that is running QNX6.5. Basically I have an image of the QNX7 HD drive on the QNX6.5 machine, get QNET running on both, and then transfer the HD image across the network to the new QNX7 machine. This involves a few commands that can be manually entered to get the network up and running, and then QNET.

Tim’s rc.sysinit file has some good stuff in it and you should be able to create a /tmp directory, set a hostname, get the network configured, and QNET running:

mount -T io-pkt -o bind=wm0 lsm-qnet.so

The network interface wm0 is created when io-pkt-v6-hd -de1000 is run. My other QNX7 machine has a Realtek NIC so its command is io-pkt-v6-hc -d rtl, and the interface is then rtl0. You can also start QNET with io-pkt-v6-hc -p qnet but I prefer to do it seperately.

If you want to start QNET you will need to add lsm-qnet.so to the list of components in the image file. Maybe add #Qnet and then lsm-qnet.so to it say after the #Sata block so that it ends up in your binary image.

Once you get /etc created with working files and sub-directories, other things can be added to make life a bit more comfortable. Such as the terminal emulation stuff (so less and vi work properly), maybe ssh. Whatever.

I am inclined to take this “offline” but this forum doesn’t seem to have any private messaging facility. I am not keen on posting my email address here (same applies to you) so I’m not sure how we can communicate privately. If you want to do this maybe ask the forum administrator or one of the moderators for my email address. maschoen knows who I am.

Geoff.

Hi Geoff,

So the hard drive is effectively blank, apart from the .boot directory where you have your boot image file.

If you now ls -laF / I suspect that you will have no /etc, /home, anything like that, as Tim’s image (like mine) does not implicitly create them.

[John] No, it’s not blank. By default, bin,etc,dev, usr,sbin,var folders are created under /.

Also, .bin is in present under /hd/.boot folder.

Thanks,
John

Yes. A closer look at the image file shows me these directories will be created. But with little in them. For example, /etc contains only the dhclient.conf file. But it is not referencing the hard drive.

I built this image myself and installed it on a 32-bit x86 here. I then executed (noting that on this machine I use devb-eide and the boot partition is type 178):

devb-eide blk automount=/dev/hd0t178:/:qnx6 &

and the ls -laF / now shows the hard drive contents.

The /etc directory listing shows not only the real contents of the hard drive /etc but it also lists the dhclient.conf file (that isn’t in the HD /etc). So I suppose its a sort of unionisation of the two - and can be confusing. It’s to do with how QNX manages the path space (as I recall - it’s been a while since I had to deal with this).

There will be a similar effect on the other directories hanging off /.

I don’t know where the /.boot/.bin comes from.

Geoff.

Hi Geoff/Tim,

Regarding devc-8250, We are planning to poll the RX FIFO using QNX application in order to check whether data received in UART registers.

We are searching for devc-8250 driver source code (DDK) in google but not able to find it. How we can get the serial driver source ? Do we need to ask QNX team regarding source code for serial driver?

Thanks,
John

Let us know how you go with getting the source to both the io-char DDK and devc-ser8250! :slight_smile:

Did you draw a blank with the manufacturer of your CPU board in regards to a working driver?

But it’s probably not necessary at this stage. You don’t need a full blown driver to simply test whether or not UARTs are working, and their interrupts. A simple program can do that and depending on the results, then decide what to do about it. If there is a problem with devc-ser8250 with a particular set of hardware I’m not sure what can be done about it.

Geoff.

It was back in 2002 that I last had anything to do with devc-ser8250. So my memory is a bit hazy, but there is still some clarity (I think). What it was back then is probably vastly different to how it is now. I do not have any current source code for it.

But what I do remember is that back then all UART interactions took place inside the interrupt handler (ISR). This is not how I do my drivers as it makes debugging rather painful as you can’t put printf()'s (for example) in there. The ISR executes in kernel context so you are somewhat restricted in what you can do inside it. You don’t want to be spending any more time than is necessary inside an interrupt handler.

I think adapting the driver, as it was then at least, to poll the UART’s might not be a trivial affair.

What I do in my drivers (note they are NOT 8250 or 16550 UART’s) is have the ISR identify the source of the interrupt, the type of interrupt, and then bug out ASAP, returning with a pulse. I take care of the UART outside of the ISR in process (or thread) context which makes life very much easier. It certainly makes debugging easier. The drivers I have written support both interrupt driven and polling operation. It is trivial to move from polling to interrupt - with interrupt I have a pulse that is triggered by the return from the ISR: with polling I simply have the pulse triggered by a timer. The code that services the UART is identical for both. I can deal with 32 serial ports using this approach quite efficiently.

So, as I said i my previous post, it will probably be easier to simply write a program that initialises the UART(s) and allows you to send characters out and receive them back by use of a loopback plug. I think I would set it up so that I was polling for received characters and get that working first. I’d then introduce the interrupt handler and see what happens with that. You can test your interrupt on the timer interrupt, that I think is IRQ0 (one of the hazy bits of my memory)!

Geoff.