I am doing this in order to boot a MC68040 based VME card, namely a MVME167 board. This requires that the 167 board has VxWorks boot proms installed (it does, and this was done long ago) and that the NVRAM has been configured for VxWorks.
These boards were shipped with battery encapsulated NVRAM chips, and after all this time, most of the batteries have long since gone dead. We have replaced these chips with EEPROM devices, which should be the subject of another set of pages. This is bulletproof, but inflexible. These chips must be "burned" in a prom burner, the 167 does not have the circuitry to support modifying them in circuit. As a result I will go through some contortions to support the boot setup that is in these chips.
picocom -b 9600 /dev/ttyUSB0
boot device : ei processor number : 0 host name : hacksaw file name : /home/vwuser/mmtcell/vxWorks inet on ethernet (e) : 128.196.100.14:ffffff00 host inet (h) : 128.196.100.19 user (u) : vwuser flags (f) : 0x0 target name (tn) : mmtcell startup script (s) : /home/vwuser/mmtcell/startup.cmdThis requires a definite setup on the server side. In particular, we dedicate a user "vwuser" to own and host all the files needed to boot VxWorks. Also note that fixed IP numbers are used. No DHCP or even BOOTP on these old machines.
I put the following command into /etc/rc.d/rc.local. Since this is Fedora, I use the idiotic "eno1" for my ethernet device. Most systems will use "eth0".
ip addr add 128.196.100.19/24 brd + dev eno1 label eno1:vxworksAfter issuing this command, I see:
ifconfig -a eno1:vxworks: flags=4163Along with adding the above line to rc.local, you will need to add the IP numbers for the two machines to the /etc/hosts file. DNS is not part of the game in the isolated system I am working with.mtu 1500 inet 128.196.100.19 netmask 255.255.255.0 broadcast 128.196.100.255 ether 90:2b:34:ff:55:ff txqueuelen 1000 (Ethernet) device interrupt 20 memory 0xf7d00000-f7d20000
# The following are to support VxWorks booting 128.196.100.19 hacksaw 128.196.100.14 mmtcell
My system is running Fedora, so to install this and start the various services I do:
dnf install rsh-server dnf install rsh systemctl restart rsh.socket systemctl restart rlogin.socket systemctl restart rexec.socketNote two things. One is that this used to be handled by xinetd and files within /etc/xinetd.d -- this is no longer the case. The second is that it seems to be necessary to run all three of this services for any one of them to work. It seems to be sort of an all or nothing family affair that I don't understand.
I install rsh also (the client), just for use in troubleshooting. For initial testing, I disable my firewall via:
systemctl stop iptables.service rsh localhostDoing this should prompt you for your password and then log you in.
Once you are done testing and want to make this a permanent part of your server whenever it boots up, do:
systemctl enable rsh.socket systemctl enable rlogin.socket systemctl enable rexec.socket
su dnf install ftp vsftpd firewall-cmd --add-service=ftp --permanent firewall-cmd --reload systemctl start vsftpd.service systemctl enable vsftpd.serviceYou will also need to set up a user and password that matches the boot settings in your vxworks machines. The "ftp" package is the client, you should use it from some other machine to verify operation.
You will need to open up TCP port 514, as well as the entire range of TCP ports 1011-1023 to use rsh. For initial testing, I am just turning off my firewall altogether via:
systemctl stop iptables.serviceThis would not be a good idea if your server is on the internet and not behind some departmental firewall or router.
useradd vwuserThis user does not need a password, and the current linux useradd does not give one to a user, so it is impossible for this user to login, which is good. It is all about the .rhosts file. In my case I make /home/vwuser a link to /u1/vwuser (which is on another partition). All the files there get backed up, and are owned by a regular user. The user "vwuser" simply needs to read them, and won't be able to write, modify, or delete files, unless the group or world permissions allow such a thing, which is hardly likely.
localhost vwuserDo the above with your own name (in your own home directory) when you are troubleshooting. It is also vital that this has restricted permissions, like so:
su cd /home/vwuser chown vwuser:vwuser .rhosts chmod 600 .rhostsAfter doing this, "rsh localhost date" should work without a password.
You can also do more global things using /etc/hosts.equiv, but I think this is a BAD idea, as it makes all users trusted between two machines. I only want the vwuser user to be trusted in order to boot vxworks.
Attaching network interface ei0... done. Attaching network interface lo0... done. Loading... Permission denied. Error loading file: errno = 0x250002. Can't load boot file!!A look at the end of /var/log/secure shows:
Jan 24 10:20:40 trona rshd[2045]: pam_rhosts(rsh:auth): denied access to vwuser@mmtcell as vwuserThis is encouraging in a way, it shows that the rsh protocol is at least trying to work and that packets are moving between the two machines. This problem turned out to be ownership and permissions on the .rhosts file. It was owned by user tom, but needed to be owned by user "vwuser".
[VxWorks Boot]: @ boot device : ei processor number : 0 host name : hacksaw file name : /home/vwuser/mmtcell/vxWorks inet on ethernet (e) : 128.196.100.14:ffffff00 host inet (h) : 128.196.100.19 user (u) : vwuser flags (f) : 0x0 target name (tn) : mmtcell startup script (s) : /home/vwuser/mmtcell/startup.cmd Attaching network interface ei0... done. Attaching network interface lo0... done. Loading... 406892 + 49488 + 25026 Starting at 0x20000... Attaching network interface ei0... done. Attaching network interface lo0... done. NFS not included. Loading symbol table from hacksaw:/home/vwuser/mmtcell/vxWorks.sym ...done ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]] ]]]] ]]]]]]]]]] ]] ]]]] (R) ] ]]]]]]]]] ]]]]]] ]]]]]]]] ]] ]]]] ]] ]]]]]]] ]]]]]]]] ]]]]]] ] ]] ]]]] ]]] ]]]]] ] ]]] ] ]]]] ]]] ]]]]]]]]] ]]]] ]] ]]]] ]] ]]]]] ]]]] ]]] ]] ] ]]] ]] ]]]]] ]]]]]] ]] ]]]]]]] ]]]] ]] ]]]] ]]]]] ] ]]]] ]]]]] ]]]]]]]] ]]]] ]] ]]]] ]]]]]]] ]]]] ]]]]]] ]]]]] ]]]]]] ] ]]]]] ]]]] ]] ]]]] ]]]]]]]] ]]]] ]]]]]]] ]]]]] ] ]]]]]] ] ]]] ]]]] ]] ]]]] ]]]] ]]]] ]]]] ]]]]]]]] ]]]]] ]]] ]]]]]]] ] ]]]]]]] ]]]] ]]]] ]]]] ]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]] Development System ]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]] VxWorks version 5.1.1 ]]]]]]]]]]]]]]]]]]]]]]]]]] KERNEL: WIND version 2.4 ]]]]]]]]]]]]]]]]]]]]]]]]] Copyright Wind River Systems, Inc., 1984-1993 CPU: Motorola MVME167. Processor #0. Memory Size: 0x1000000. BSP version 1.0. hacksaw:bash: /home/vwuser/mmtcell/startup.cmd: No such file or directory Unable to open startup script /home/vwuser/mmtcell/startup.cmd ->The message about being unable to open the startup script makes sense because I have not put that file in place yet.
loginUserAdd "tom", "xyzxyzxyzQ"Creating the password string is a topic for another page. This lets me do "rlogin mmtcell" and I get prompted for a password (which needs to work with the encrypted string in the startup file. Once I am in, I need to do this:
iam "vwuser"Since user "tom" does not have a .rhosts file that allows access by the vxworks system, or he probably shouldn't.
You will need to open up TCP port 514, as well as the entire range of TCP ports 1011-1023 to use rsh. Typically rsh uses just port 1022.
I do this by hand editing the /etc/sysconfig/iptables file, but you may prefer to use some GUI firewall manager.
The ports used by the rsh family of services are:
Adventures in Computing / [email protected]