![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: RiC++ v5.0.1 RedHat & MontaVista Linux adapter for RedHat hosted compiler Topic Summary: Created On: 21-Sep-2005 21:03 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|||
Rhapsody Environment for seamless Linux integration
by Martin Stockl, I-Logix What is it? What is the goal of this? The main goal is increasing the productivity of the individual developer in his daily work, when using a Windows hosted Rhapsody for modelling and code generation, but a Linux / Unix hosted compiler (e.g. gcc) to compile the generated code on the Linux / Unix host. Increasing productivity means, that everything works in a seamless workflow by just pressing buttons inside of Rhapsody. This has to include the features ?Generate?, ?Regenerate?, ?Build?, ?Rebuild?, ?Clean?, ?Run? and ?Generate/Make/Run? from Rhapsody?s code menu and navigating from compiler error message to corresponding model element. The administrative part of the work In order to allow Rhapsody reading and writing files on the Linux machine?s harddisk, we need a network drive. I?ve decided to use a Linux hosted Samba server to do so. This is, because Samba is already included with RedHat Linux 9.0 (no extra paying) and there are no additional tools needed for the Windows host. In order to invoke either the compiler or the compiled application on the Linux / Unix machine, I?ve decided to use a remote shell. Again the deamon (rshd) comes along with Linux and Windows already includes a client program (rsh.exe). In order to allow interoperability we need some additional administrative settings on both computers. These are: · a common user on both machines (recommended is using the same login name and password on both, otherwise you will have additional work). · if you are using a firewall between both machines you need to either disable it or go into an enhanced configuration mode to enable ports for telnet / rsh / samba. · allowance to invoke a remote shell on the Linux machine from the Windows machine · enabling the remote shell deamon on the Linux machine · enabling the samba server on the Linux machine · configuring the exported mount point on the Linux machine · creating a network drive on Windows to mount the exported Linux directory You need to have administrative rights on the Linux machine in order to configure the corresponding features. If you are not used to do administrative settings, the man pages on Linux might help. To open the man pages from a Unix / Linux shell prompt invoke e.g. ?man rshd? or ?man samba?. Steps and order for the steps to be done: 1. Create a common user on both machines. Typically you will use your local Windows user and create the same user with the same password on the Linux machine. This user should not be ?Administrator? or ?root?, but a user with normal access rights. Let us assume this user is named ?rhpuser?. I will reference this name later when talking about user specific settings. 2. Enter the services configuration menu on Linux / Unix (or change scriptfiles manually) and enable ?rsh?, ?rexec?, ?rlogin?, ?netfs?, ?smb?, ?telnet? and ?xinetd? to enable the most common remote services you might need. Restart the services or reboot the computer when done. 3. Each user will have a ?home? directory on Linux / Unix, typically located in ?/home/username?, in our case ?/home/rhpuser?. This will be created automatically, when adding the user to the system. Now create a file named ?.rhosts? in the users home directory, if not already existing (Yes, the name starts with a dot!). Now edit your ?/home/rhpuser/.rhosts? to contain at least one line with the hostname of your Windows computer. The hostname is the name of your computer in the network, typically resolved by a DNS server. If you want to access the Linux / Unix computer from multiple other machines using this username, you will have to add a line for each remote host, which shall be allowed to do so. If you need to use multiple logins (usernames) to do so, each user?s home directory needs to have a ?.rhosts? file, specifying from where this specific user may invoke a remote shell. 4. If you like to use your Linux / Unix and your Windows computer detached from the network, may be connected directly to each other via a cross link cable, you will have to add a local ?hosts? database on both machines to be able to resolve the names (mapping hostname to IP address). On Windows the ?hosts? database is typically located in a file named C:\WinNT\system32\drivers\etc\hosts, on Linux / Unix the corresponding database file is located in /etc/hosts. Both files should at least contain two lines, each one providing an IP-address and the corresponding hostname. 5. Configure the Samba Server. In order to be able to use Samba you need to add and define the ?allowed? Samba users first. RedHat Linux offers a comfortable Samba Server Configuration Utility to do so. Each Samba-User will have an own entry, which contains the Unix Username, the Windows Username, and a Samba password. After you have configured at least your ?rhpuser?, you may continue to now add directories to be exported via Samba. One little hint: The Samba password will be the password you have to enter, when connecting a network drive from Windows later. If it is the same password then your Windows user password, you will not need to enter a password when connecting the network drive. If you did not yet create a local working directory on the Linux / Unix machine to contain your Rhapsody development work, you should do so now. I would recommend to create either a directory ?/opt/rhp? or ?/usr/rhp? or even ?/rhp? at root level. Inside of your Samba Configuration Utility you may add this directory to the list of exported directories and configure access rights to it. I would recommend to limit the access to your predefined Samba user and not provide access to anybody. Save your settings and restart the Samba Server (or reboot the Linux machine) to enable Samba access to the Linux machine. 6. Configure the network drive on Windows. If the network connection between both computers is enabled and no firewall inhibits access you should now be able to search your Linux machine in the network neighbourhood, open it and find the exported directories available. Select your Rhapsody development directory, right-click on it and select connecting network drive. Now select a drive letter (I?ve been using ?L:? for Linux) and tick the box to automatically re-establish the connection after each login. Your administrative job is done. You may verify, whether everything is ok by browsing your new drive using the Windows Explorer and by opening a DOS box and issuing commands like ?rsh linuxmachine ls ?al?, which invokes a shell on the remote machine to invoke the local directory listing command there. Do not try to continue with the remaining work, before this has been established and verified to be ok! For more information please see the download below.
|
|||
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.