INSTALLATION INSTRUCTIONS OF ULTRASPARCIIe FOR SOLARIS BSP The following instructions are for booting the Netra-1105 target board from network. Preliminary steps: A. Install the following packages as root: # pkgadd -d ETRpm.pkg # pkgadd -d ETSparc32.pkg # pkgadd -d ETsparc64.pkg # pkgadd -d gtools-v2.pkg # pkgadd -d bison-1.35-sol8-sparc-local B. Since the linux kernel depends on the gnu tools and bash, the following instructions will make it possible for the kernel to build. The gnu tools rely on some bash functionality to build the packages. There are two methods to allow the Solaris system to use bash as the shell. One is to change the root user to use /bin/bash. For this method, edit the /etc/passwd file so root uses /bin/bash insted of /bin/sh. Your root line would look somthing like the following: root:x:0:1:Super-User:/:/bin/bash You may also type bash at the command prompt, but you will need to remember to do this each time you open a new terminal window. You may need to copy the bash shell over the sh shell or create a link to /bin/bash called /bin/sh. Some of the tools to build linux use /bin/sh and expect some bash functionality. If you have problems building the linux source tree, try replacing sh with bash. To copy over /bin/sh do the following: # cp /bin/sh /bin/sh.old # cp /bin/bash /bin/sh Warning: on some systems, the boot up process as well as the root login process require the shell to be /bin/sh and not bash. When finished building the packages, it is advised to copy sh back using the following command: # cp /bin/sh.old /bin/sh There are a few more files that need to be replaced with gnu tools as well. Copy the following files to /usr/bin: # mv /usr/bin/sed /usr/bin/sed.old # mv /usr/bin/echo /usr/bin/echo.old # cp /opt/Embedix/gtools/bin/echo /usr/bin/echo # cp /opt/Embedix/gtools/bin/sed /usr/bin/sed C. Create a new path variable using the following command: # export PATH=/opt/Embedix/gtools/bin:$PATH:/usr/ucb Creating a kernel and root file systme and deploying to the Netra board over the network: 1. The linux-solaris.tar.gz file contains the kernel source code for sparc64 architecture. The kernel binaries can be created by using the following command sequence: From the directory you downloaded the linux-solaris.tar.gz file - # gunzip linux-solaris.tar.gz # tar xvf linux-solaris.tar # cd linux # make ARCH=sparc64 oldconfig dep vmlinux modules The vmlinux file is the image file of the kernel. Convert the vmlinux to the a.out format by using the elftoaout utility and copy this file into the "/tftpboot" directory on your host machine. We will call this file "vmlinux.bdk". To use elftoaout, type the following command: # elftoaout -o vmlinux.bdk vmlinux # cp vmlinux.bdk /tftpboot You will also need to transfer the modules into the root file system. This process will need to be repeated each time modules are rebuilt. Note that if you have not changed any of the source files, the modules are already built and included in the rootfs tar file. If you have modified any of the linux source files for the modules, you will need to perform the following step. Determine a temporary place to store the modules. An example of this would be the users home directory or the /tmp directory. In the top directory of the linux source tree type the following command: # make ARCH=sparc64 INSTALL_MOD_PATH= modules_install So, if the /tmp directory is to be used as the temporary install location, type the following: # make ARCH=sparc64 INSTALL_MOD_PATH=/tmp modules_install This will create a lib/ directory in /tmp that will contain all of the kernel modules. Change directory to the temporary directory and type the following: # tar cvf modules.tar lib/ The modules.tar file created here will be used later in the process. Note: There are two ways to boot the Netra board using NFS. The method detailed in this README describes a manual process for booting the NETRA from the OK prompt. See the file AUTOMATED_BOOT.txt for instructions on how to automate the boot process. 2. The rootfs-solaris.tar.gz file contains the root file system. Untar this file in any directory on your host machine. e.g. we untar this in /home/sparc64. Then /home/sparc64/root is your path for the root file system on your host machine. At this point you will need to untar the modules into the root file system. Note that if you have not changed any of the source files, the modules are already built and included in the rootfs tar file. If you have modified any of the linux source files for the modules, you will need to perform the following step. Untar the modules by typing the following command: # cd # tar xvf /modules.tar Following the example given steps one and two: # cd /home/sparc64/root # tar xvf /tmp/modules.tar 3. In the "/etc/ethers" file on the host machine add the following line: e.g if the target board IP is allocated as 172.27.166.4 and its HW addr is 00:03:ba:06:3e:b4 then add the following line to the "/etc/ethers" file: 00:03:ba:06:3e:b4 172.27.166.4 4. Type the following commands to set the rarp server: in.rarpd -a 5. Check if the tftp server is working. You may need to edit the /etc/inetd.conf file. Find the line that starts tftpd and make sure it is not commented out. 6. Start inetd if not started earlier, or restart it if you modified the inetd.conf file to include tftp. 7. Edit the /etc/dfs/dfstab file to include the directory where the root file system is. Using the above example with the host IP address 172.27.166.20, the dfstab file should look like this: share -F nfs -o rw,root=172.27.166.20 -d "/home/sparc64/root" /home/sparc64/root Execute the command "share" in the shell. 8. The "/tftpboot" directory is the default directory for tftp. Make a link of the hex version IP address of the target board pointing to the sparc kernel executable. e.g. make a link of AC1BA604 (hex version of 172.27.166.4) pointing to vmlinux in the /tftpboot directory. 9. Boot the target board and on its OK prompt type the following instruction: boot net root=/dev/nfs rw nfsroot=: ip=::::name:eth1:rarp init=/sbin/init e.g. from the above our command will look as follows: boot net root=/dev/nfs rw nfsroot=172.27.166.20:/home/sparc64 ip=172.27.166.4:172.27.166.20::255.255.0.0:netra:eth1:rarp init=/sbin/init The gateway is not added to the boot net line as the host machine and target board are on the same subnet. 10. The target board will boot with the boot parameters as described in point 9. After booting login as root, it should not prompt for a password. Note: For local booting of the file system, the following command will make the filesystem read-write: mount -o remount,rw / -------- All of the packages in the Netra directory are pre-built into RPM's upon delivery. If rebuiling the packages, there are a few issues to be aware of. - During building of the NFS server, it may ask if libwrap.a is installed. You will have to manually press 'y', then enter the fully quallified path to the libwrap.a file. The location is: /build/packages.sparc64/usr/lib/libwrap.a