View topic - [QNX 7.0_x86_generic] Serial Port Data Receive Issue

[QNX 7.0_x86_generic] Serial Port Data Receive Issue

QNX7 release

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby johnbevy » Mon Oct 21, 2019 5:12 pm

Tim wrote:Hi John,

If you want to be able to create accounts and change password you have to run everything from the harddrive and not from the boot image. Running in the boot image is normally only for systems that don't have a hard drive and that you want to prevent users from modifying the system in any way.

Below is my boot image. It essentially just starts the disk driver, USB driver, 4 consoles and the calls a custom startup script called rc.sysinit located in /etc/rc.d (a directory we created).I could have simplified this even further and put the USB driver and consoles in the rc.sysinit file.

You need to do something similar. Your boot file should do just what mine does (start the disk driver then call a custom sysinit script you create that mounts your 2nd hard drive, starts your own networking info, your serial driver and so on). Just make sure that your sysinit file is set to rwx (ie the execute bit is set) or it won't execute :P

Code: Select all
[virtual=x86,bios +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
}

# 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


My rc.sysinit looks like
Code: Select all
#!/bin/sh
echo
echo Executing rc.sysinit Ver 1.0

# A useful function
function waitfor {
   typeset -i i=0
   while test $i -lt 60 -a ! $1 -ef $1 ; do
      sleep 1;
      let i=i+1;
   done
   unset i
}

# Start some common services
random -t
mqueue
devc-ser8250 -e -b115200 &
waitfor /dev/ser1
   
# Make dir and allow all to use it
if ! test -d /var/dumps
then
mkdir -p /var/dumps
chmod -R 777 /var
fi
dumper -d /var/dumps &

# Allow ftp to use /tmp and telnet to login
if ! test -d /tmp
then
mkdir /tmp
fi
chmod 777 /tmp
ln -sP /x86/bin/login /bin/login

# Start networking
# This is the setting for the ethernet chips on the 2 intel ethernet cards on
# the Advantech controller
hostname SURFACE
io-pkt-v6-hc -d e1000 &
if_up -r 10 -p wm0
ifconfig wm0 172.27.12.3 netmask 255.255.255.0 up
ifconfig wm1 up
route add default 172.27.12.1

# Start the ftp/telnet daemon
# Uncomment line below to get dhcp address for wm1
#dhclient -nw
inetd &

# Start qconn to enable momentics to connect (for remote debugging)
qconn qconn_prio=11 &

# Create a 50 meg RAM drive for holding Control System log files
devb-ram ram capacity=1 blk ramdisk=50m,cache=512k,vnode=256 &
waitfor /dev/ram0
mkqnx6fs -q /dev/ram0
mount -t qnx6 /dev/ram0 /fs/ram

# Start SAMBA so Windows can mount QNX drives as Windows network drives
rm -f /usr/local/samba/var/locks/smbd.pid
rm -f /usr/local/samba/var/locks/nmbd.pid
rm -f /usr/local/samba/log.*
/x86/usr/bin/samba/smbd -D
/x86/usr/bin/samba/nmbd -D

# Start gns to enable registering of unique names in the system global name
# space
gns -s

export TERM=qansi-m

# Start the login shell (which auto logs in as root which will then run our S/W)
PATH=/bin:/usr/bin:/sbin exec `which tinit`

exec sh
exec fesh


Back to your board. Can you post a link to the hardware specs of the board. I want to confirm it has 8250 UARTS.

Tim


Hi Tim,

Thanks for your inputs.

>>If you want to be able to create accounts and change password you have to run everything from the harddrive and not from the boot image. Running in the boot image is normally only for systems that don't have a hard drive and that you want to prevent users from modifying the system in any way

We are booting the image from SATADOM 32 Gb (30 GB usable) and we are creating 2 partitions ( Partition 1 (type: 178) 3 GB , mounted under /fs/qnx6 , Partition 2 (type :179) 27 GB , mounted under /home) and storing the x86-generic.bin file in .boot folder and booting from the disk.

It seems we are running the boot image. But we woud need to give provisions for user to change the password and new user account creation.

We have referred our code and noticed that you did automount for HDD. Do we need to follow the same ? Because in our build file, we just mount the partition 1 under /fs/qnx6

Please advise.

Your code

Code: Select all
Start the disk driver
   display_msg "Starting Disk Driver ..."
   devb-ahci cam quiet ahci nports=4 blk automount=hd0t177:/:qnx6 &
   waitfor /boot 10
 


Our code

Code: Select all
mount -t qnx6 -o sync=none /dev/hd0t178 /fs/qnx6
   
    mount -t qnx6 -o sync=none /dev/hd0t179 /home


>>Can you post a link to the hardware specs of the board. I want to confirm it has 8250 UARTS.

Our Board is using Exar XR28V384 LPC UART chip.

Thanks,
John
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby Tim » Mon Oct 21, 2019 6:30 pm

Hi John,

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.

Note that you are mounting the default file system as /fs/qnx6 and I am mounting as the default /. If you *must* keep the /fs/qnx6 then you may (likely) have to change the default PATH environment variables since QNX will be looking for / as the root folder when searching for things like the /bin folder instead of /fs/qnx6/bin. I would strongly suggest you change yours to /.

I've noted that you have mounted the 2nd partition as /home. Does this mean there is no /home folder on your /fs/qnx partition? I just want to be sure there isn't if you change your /fs/qnx6 to / because otherwise you'd get duplicate /home directories.

I googled your board. It is NOT using a default 8250 UART. It's using a V384 low pin count UART. Furthermore in their docs here:
https://www.maxlinear.com/document?id=22076
on page 8 they talk about having custom QNX drivers. That makes me think you can't use devc-ser8250. You should contact them directly and ask for the custom QNX driver. I suspect that is what you require or at the very least they can help you setup your board BIOS correctly for QNX.

Tim
Tim
Senior Member
 
Posts: 1461
Joined: Wed Mar 10, 2004 12:28 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby ger » Mon Oct 21, 2019 10:33 pm

The image that Tim has posted is pretty much the same as mine. My rc. file also, although mine there are obviously differences in our startup configurations.

I have two x86 systems to work with - one uses devb-ahci and the other devb-eide. If in your case one doesn't work try the other. The automount is important but make sure it uses the correct partition type. QNX6 partitions can be type 177, 178, and/or 179)

I call my initialisation file rc.local whereas Tim's is rc.sysinit. But we both have an /etc/rc.d directory. rc.d is to me a Linux (or UNIX) convention. Likewise rc.local. Perhaps rc.sysinit is a reference back to the old QNX4 days Tim? :-)

I suspect your next question John is about how to create the external hard (or SSD) drive in the first place. I have built up a bootable USB to do this - the generic x86 can do this for you.

I don't have an x86 based machine here with more than two 8250 (or derivative) UART's so I can't verify that devc-ser8250 actually works with more than two. I have found other QNX7 drivers and utilities that don't work quite as advertised. Given that all four work with Ubuntu and presumably with the same Linux driver, I suspect something is not working quite right in the QNX driver. I guess we shall soon see.

Geoff.
ger
Active Member
 
Posts: 29
Joined: Tue Jul 15, 2014 9:24 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby ger » Tue Oct 22, 2019 3:39 am

Maybe I'm barking up the wrong tree but on Page 9 (that has a table reference to the XR28V384) under LPC UARTs it states that:

The LPC bus, which replaced the ISA bus is a local bus found on system boards that connects to serial ports and other peripheral devices. MaxLinear offers 2-channel and 4-channel LPC UARTs that are I/O mapped to traditional COM port addresses of 0x3F8, 0x2F8, 0x3E8 and 0x2E8 by default. If those addresses are not available, the BIOS can program other I/O addresses in the base address registers at boot-up. The UARTs in the XR28V38x are software compatible with the industry-standard 16550 and can use the standard serial port drivers found in almost all operating systems.


To me that says that the four UARTs are 16550 compatible. The 16x50 UARTs were derived from the original Intel 8250 and are register compatible. The 16x50 UARTs did have some enhancements (buffer related as I recall) but are backward compatible to the 8250. devc-ser8250 should, in my opinion, work with them. From what John says it does with the first pair but not the second pair. The default I/O addresses correspond to those John says he's using.

It doesn't mention interrupts at all however. Perhaps this is an interrupt related issue?

It has been many years since I looked at the source for devc-ser8250 but as I recall it was dependent on working IRQ's (interrupts) to at least receive. I can't remember about transmission (and the other two interrupt types of the 8250). It seems to me that John is able to transmit on all four UART's but simply cannot receive. This also implies to me that devc-ser8250 is indeed compatible with these UARTs and the fact that they transmit backs this up - references that I can find to the V384 state that it is register compatible with the 16550/8250 UARTs.

I don't think it is possible for devc-ser8250 to poll UARTs.

Maybe a look at the BIOS will show what addresses and IRQ's have been assigned to the UART? On a machine I just fired up that uses an Award BIOS it shows me the two UARTs being 3f8,4 and 2f8,3 (/dev/ser1 & /dev/ser2 respectively). If your BIOS indicates the assigned addresses and IRQ's for all four UART perhaps try them and see what happens? And let us know! :-) (either way).

I'd also like to know what happens with a loopback plug connected to the serial port connector with the qtalk terminal program opening them. Just in case this is a timing related issue between two different machines (I suspect it's not but it's still a good test). Is it a DB9 male connector or something else? It's easy to fabricate an RS232 loopback plug - simply tie the TxD and RxD pins (2 & 3 on a D9 connector) together and disable hardware flow control on the serial port.

Or as Tim suggests, simply ask MaxLinear for the QNX7 driver this I presume will work for you.

Cheers,

Geoff.
ger
Active Member
 
Posts: 29
Joined: Tue Jul 15, 2014 9:24 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby ger » Tue Oct 22, 2019 3:44 am

I just went on to the MaxLinear website and can't find any QNX drivers at all - let alone a QNX7 driver. I wonder what version of QNX they refer to on Page 9 of the document. If one is available it has to be for QNX7 - any earlier version most likely will not work.

Geoff.
ger
Active Member
 
Posts: 29
Joined: Tue Jul 15, 2014 9:24 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby johnbevy » Tue Oct 22, 2019 1:27 pm

Tim wrote:Hi John,

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.

Note that you are mounting the default file system as /fs/qnx6 and I am mounting as the default /. If you *must* keep the /fs/qnx6 then you may (likely) have to change the default PATH environment variables since QNX will be looking for / as the root folder when searching for things like the /bin folder instead of /fs/qnx6/bin. I would strongly suggest you change yours to /.

I've noted that you have mounted the 2nd partition as /home. Does this mean there is no /home folder on your /fs/qnx partition? I just want to be sure there isn't if you change your /fs/qnx6 to / because otherwise you'd get duplicate /home directories.

I googled your board. It is NOT using a default 8250 UART. It's using a V384 low pin count UART. Furthermore in their docs here:
https://www.maxlinear.com/document?id=22076
on page 8 they talk about having custom QNX drivers. That makes me think you can't use devc-ser8250. You should contact them directly and ask for the custom QNX driver. I suspect that is what you require or at the very least they can help you setup your board BIOS correctly for QNX.

Tim


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(http://www.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
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby johnbevy » Tue Oct 22, 2019 1:44 pm

ger wrote:The image that Tim has posted is pretty much the same as mine. My rc. file also, although mine there are obviously differences in our startup configurations.

I have two x86 systems to work with - one uses devb-ahci and the other devb-eide. If in your case one doesn't work try the other. The automount is important but make sure it uses the correct partition type. QNX6 partitions can be type 177, 178, and/or 179)

I call my initialisation file rc.local whereas Tim's is rc.sysinit. But we both have an /etc/rc.d directory. rc.d is to me a Linux (or UNIX) convention. Likewise rc.local. Perhaps rc.sysinit is a reference back to the old QNX4 days Tim? :-)

I suspect your next question John is about how to create the external hard (or SSD) drive in the first place. I have built up a bootable USB to do this - the generic x86 can do this for you.

I don't have an x86 based machine here with more than two 8250 (or derivative) UART's so I can't verify that devc-ser8250 actually works with more than two. I have found other QNX7 drivers and utilities that don't work quite as advertised. Given that all four work with Ubuntu and presumably with the same Linux driver, I suspect something is not working quite right in the QNX driver. I guess we shall soon see.

Geoff.


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.

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


Thanks,
John
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby Tim » Tue Oct 22, 2019 1:46 pm

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
http://www.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
Tim
Senior Member
 
Posts: 1461
Joined: Wed Mar 10, 2004 12:28 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby johnbevy » Tue Oct 22, 2019 2:05 pm

Tim wrote: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
http://www.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
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby Tim » Tue Oct 22, 2019 5:53 pm

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
Tim
Senior Member
 
Posts: 1461
Joined: Wed Mar 10, 2004 12:28 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby johnbevy » Wed Oct 23, 2019 6:59 am

Tim wrote: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: Select all
[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


>>Can you also post what 'ls -l /' reports.

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

Thanks,
John
Attachments
ls-l-details-pam.d_folder.jpg
pam.d folder
(787.51 KiB) Not downloaded yet
ls-l-details-root.jpg
"/" folder details
(1.02 MiB) Not downloaded yet
ls-l-details-etc_folder.jpg
etc folder
(965.15 KiB) Not downloaded yet
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby ger » Wed Oct 23, 2019 9:21 am

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.
ger
Active Member
 
Posts: 29
Joined: Tue Jul 15, 2014 9:24 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby ger » Wed Oct 23, 2019 11:20 am

John.

Where are you? In the world.

Geoff.
ger
Active Member
 
Posts: 29
Joined: Tue Jul 15, 2014 9:24 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby johnbevy » Thu Oct 24, 2019 7:17 am

ger wrote: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.


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: Select all
[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


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

Thanks,
John
Attachments
ls-laf-root.jpg
root
(132.89 KiB) Not downloaded yet
ls-laf-etc.jpg
etc
(70.32 KiB) Not downloaded yet
ls-laf-boot.jpg
boot
(990.07 KiB) Not downloaded yet
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

Re: [QNX 7.0_x86_generic] Serial Port Data Receive Issue

Postby johnbevy » Thu Oct 24, 2019 7:18 am

ger wrote:John.

Where are you? In the world.

Geoff.


Hi Geoff,

We are in ASIA.

Thanks,
John
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

PreviousNext

Return to QNX7

Who is online

Users browsing this forum: No registered users and 1 guest