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?
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.
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.
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
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.
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
#---------------------------------------------------------------------------------------------------
display_msg “Starting some common services …”
dumper
pipe
random -t
mqueue
devc-pty
#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;
#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;
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
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:
(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.
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).
(I hope Tim doesn’t mind my following suggestions)!
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.
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%
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.
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 /.
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?
Let us know how you go with getting the source to both the io-char DDK and devc-ser8250!
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.
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)!