Red Hat Docs > Manuals > EDK Manuals > |
To install the EDK software, see System Requirements and Installation Steps. The EDK software provides a full suite of tested tools, as well as many unsupported tools (even though those tools may successfully work).
To configure your host and target for embedded development work with these tools, see Setting Up for Embedded Work, Setting Up Servers on the Host, Creating a Target Filesystem Image and Setting Up Targets.
To start working, see Embedded DevKit Basics and Developing for Embedded Systems.
For basic understanding of GNUPro Toolkit, see Sources and Tools within Embedded DevKit, PowerPC Target-Specific issues for PowerPC-specific issues, and x86 Target-Specific Issues for x 86-specific issues.
For unfamiliar terms and concepts, see Glossary.
To use the EDK, you must have the following system requirements.
Red Hat Linux 6.1 host operating system for an x 86 environment (Pentium class) with X Windows and the standard development tools installed
Hub with cables for Ethernet connection to host and to target
Either of the following target processor boards and their connecting devices:
Motorola MBX board
(MBX860-006B is recommended) with the following devices for connecting to the host system.
A serial cable (9-pin DB9 null modem cable) to connect the MBX
board to a serial port on the host.
Intel Pentium II board with a minimum of 8MB of memory with the following devices for connecting to the host system:
Ethernet card such as a Novell® Ethernet NE2000 (PCI) card (see the README file on the CD or the Red Hat website for the most current hardware that's supported)
A floppy drive for testing and using the Etherboot software (it does not need to be programmed into an EPROM on the Ethernet card)
A video card to set up the BIOS (at least initially) and to see any problems that may occur
Cables to enable using the host operating system's keyboard, video monitor and mouse
A ribbon cable for connecting the floppy drive to the target
Keyboard and mouse may be required for the target's BIOS to boot (it may be possible to disable this requirement in the BIOS)
Information about your specific hardware configuration is available in your equipment manufacturer's documentation; be sure to observe all of its safety precautions. After installing, see Setting Up for Embedded Work, Creating a Target Filesystem Image, and Setting Up Targets.
Follow these steps to install the EDK software. See the README file on the CD or on ftp.redhat.com for the most current issues. The release will install in the /opt/redhat/edk-000221 directory.
If the RPM successfully installs, the command prompt will return with no output. For instance, if DHCP was already installed on your system, you will see a "package dhcp-2.0-3 is already installed" message.
To unmount the CD, type:
To mount the EDK CD, type:
mount /mnt/cdrom
cd /mnt/cdrom
To download by ftp, connect to ftp.redhat.com, copy the files to /tmp (or some other temporary directory), and change to that directory.
This directory should be added to the path of all users who want to run the EDK tools; if necessary, get assistance from your systems administrator.
It is not necessary to reboot your system to proceed with the configuration process.
If you are having problems installing the EDK software, go to http://www.redhat.com/.
Before you begin the configuration procedure, complete Your network information in Network Information. You might want to print a copy of Network Information for your convenience during the following procedures.
Do not set up your target hardware before the instructions suggest.
If you don't already know the values in Network Information, ask your system administrator for help or see Determining the Network Configuration.
For your embedded target's Ethernet address, see Find an x86 Ethernet Address; for PowerPC target board, look for a sticker on the target board or see Find a PowerPC Ethernet address.
You should already be familiar with the basic concepts of networking, such as working with Ethernet, TCP/IP, filesystems and logging in to the host system as root user.
Network information
router-IP-address 1 |
|
subnet2 |
|
target-ethernet-address 3 |
|
Be sure that Network information is complete before proceeding.
To do embedded development, your host machine must have services running on it so that the embedded target system can download software.
Set up the TFTP (Trivial File Transfer Protocol) and DHCP (Dynamic Host Configuration Protocol) services to allow network booting of a target. The DHCP services from the host system will provide the target with an IP address and the file name of a specific boot image to download from the host. The target will use the TFTP services, a simplified version of FTP (File Transfer Protocol), to download the boot image. In order to run, a root filesystem must be available to the target, using the NFS (networked filesystem) or RAM Disk6 method; the NFS method is more convenient than the RAM Disk method while you are developing. Once the root filesystem has been mounted, you can then execute the software on the target board.
You must complete Your network information in Network information; replace text in <angle brackets> with your values from Network information.
Create the directory and a sub-directory
like the following command shows for the TFTP server; replace
<target-IP-address>
with value in Network Information.
mkdir -p /tftpboot/<target-IP-address>
chmod -R o+x /tftpboot
Edit the
/etc/inetd.conf
file to uncomment the line that corresponds to the TFTP server; the
following example's last line is how the line should appear.
/etc/rc.d/init.d/inet restart
You should then see the following output.
Stopping INET services: [OK]
You may instead see the following output.
Stopping INET services: [FAILED]
This means that inet was not running, that you just started it; this is good. Be sure to configure your system to start the inet service starts at boot time; see your system administrator or the Red Hat Linux documentation.
Change to the /tftpboot/<target-IP-address> directory which you created in Log in as root to install and run the following commands.
cd /tftpboot/<target-IP-address>This creates a file called zImage and sets readable permissions by other so that the TFTP server can access it.
Use the following commands to test the TFTP server by attempting to download the zImage boot file with the TFTP client.
cd /tmpUse the following command at the tftp> prompt:
tftp> get /tftpboot/<target-IP-address>/zImage
If you see the previous output, your TFTP server is working properly; type quit to exit the TFTP client.
If you get a "Transfer timed out" message, the TFTP server is not running.
If you get a "access violation" message, your file or directory permissions are not correctly set.
The DHCP server assigns an IP address and provides a boot file name to a target. Type:
mkdir -p /var/state/dhcpIf you already have a /etc/dhcpd.conf file, get your system administrator to help merge the new target settings into your existing configuration. Otherwise, type:
cp /opt/redhat/edk-000221/examples/example_dhcpd.conf /etc/dhcpd.confOpen the /etc/dhcpd.conf file in an editor, and add your network settings; for instance, Red Hat employees would replace the following line:
option domain-name "<domain-name>";with:
option domain-name "redhat.com";
Go to Network information and substitute all your actual values from Network information into the dhcpd.conf file before continuing.
Once you set up the dhcpd.conf file, activate the dhcpd server. Type:
/etc/rc.d/init.d/dhcpd startIf the DHCP service starts successfully, the following output displays:
Starting dhcpd: [ OK ]The server now waits for a target to request an IP address during its boot process.
Enable NFS to export a root filesystem6
for the target board.
Be very careful to export only the parts of the host filesystem that you intend, since it could create a security risk. If you have questions about NFS security issues, see your system administator.
Edit the /etc/exports file, adding a line like the following example shows and substituting your value for <target-IP-address> from Network information.
/tftpboot/<target-IP-address> <target-IP-address>(rw,no_root_squash)Once you set up the /etc/exports file, activate the NFS server. Type:
/etc/rc.d/init.d/nfs restart
If the NFS service starts successfully, the following output displays:
done.rting NFS services: rpc.mountd [ OK ]
To verify that the NFS server is exporting the filesystem, run the exportfs command and the following displays.
/tftpboot/<target-IP-address>
<target-IP-address>
Now your host operating system is ready for setting up an embedded target.
The following documentation discusses special issues for configuring the x86 and MBX target boards for embedded development.
For further information on Linux hardware compatibility, see Red Hat's website: http://www.redhat.com/hardware.
For the x 86 target, after reviewing System Requirements, use the following steps to ensure that you have a working connection over the network.
The Ethernet address may need to be hard-coded into
the boot ROM that the x 86 target uses.
If you change network cards or if you change the slot for the card, you must
remake a boot ROM. For documentation, see:
/opt/redhat/edk-000221/src-redist/etherboot-4.5.6.tar.gz
Extract the files into the
/tmp
directory:
tar -xzvf /opt/redhat/edk-000221/src-redist/etherboot-4.5.6.tar.gz
See the README file in the etherboot-4.2/netboot-0.8.1/ directory.
To recompile the boot ROM, provide the hardware address of the slot in which the network card installs, the IRQ (interrupt request number) for the board and the Ethernet card address.
System log after a successful boot
dhcpd: BOOTREPLY for 205.180.4.5 to <target-hostname> (08:00:3e:2d:35:af) via eth0 |
tftpd[7121]: tftpd: trying to get file: /tftpboot/205.180.4.5/zImage |
If you do not see such output, see Troubleshooting boot problems with an x86 target.
The following discussion details some solutions to problems with your configuration.
If your target will not boot and you do not see an entry like Entry in system log of DHCP server in your system log, the DHCP server is not working.
Entry in system log of DHCP server
Verify DHCP is running and that your DHCP configuration is correct; see Set up the DHCP services.
If your target will not boot, and you do not see an entry like Entry in system log of TFTP server, the TFTP server is not working.
Entry in system log of TFTP server
tftpd[12616]: tftpd: trying to get file: /tftpboot/205.180.4.5/zImage |
Verify TFTP is running; if not, see Enable the TFTP service and Test the TFTP service.
If your target will not boot, another likely cause is an incorrect Ethernet address in the DHCP configuration file (/etc/dhcpd.conf). Such an unsuccessful boot would provide an entry in the system log like Unsuccessful boot because of incorect Ethernet address shows. You will have to be root in order to read the system log.
Unsuccessful boot because of incorect Ethernet address
dhcpd: No applicable record for BOOTP host 08:00:3e:2d:35:af via eth0 |
In our example, <target-ethernet-address> is 08:00:3e:2d:35:af. Double check that your <target-ethernet-address> matches the value you added in /etc/dhcpd.conf and Network information.
Now, see Creating the rhedk group.
For the PowerPC target (MBX motherboard), after reviewing System Requirements, use the following steps to ensure a network and serial connection. EPPCBug firmware handles bootstrapping. The MBX board provides Ethernet support and serial connection support; with Minicom7 or a similar program, the serial connection also serves as the Linux output console. For the following procedure, see MBX Board for locations of jumpers on the MBX board.
Connect it so that the edge with the red stripe is on the side of the connector with the Smc1/Com1 label, not on the side with the J18 label. If you plug the cable in backwards, you will be unable to connect over the serial port. Connect the null modem cable to the 9-pin cable adapter and to the serial port on the host (typically having the "com1" label).
Use Minicom, a terminal emulation program, to communicate with a PowerPC target board from the host system. The following directions set up the Minicom program.
Typing minicom should display the "Initializing Modem" message; if Minicom is able to access /dev/modem, you will see the following output.
Welcome to minicom 1.82To terminate a Minicom session, press C-A, X. Don't terminate now.
The LED indicators will illuminate when the power supply is on (see MBX board for the location on the board); if not, check all your connections to your power supply. Version and setting information will display in the Minicom window, you will get the EPPC-Bug> prompt. If you do not see the EPPC-Bug> prompt, the null modem cable connection or Minicom is not working. Ensure that your Minicom configuration is correctly set.
In the Minicom window, issue the NPING command at the EPPC-Bug> prompt:
NPING <CLUN> <DLUN> <Source IP> <Destination IP> <NUM-PACKETS>The MBX target uses a CLUN (Controller Logical Unit Number) of 20 and a DLUN (Device Logical Unit Number) of 0 as the device identifier for the network adapter. The following command is an example of what to use; use your values from Network information for the <target-IP-address> and <host-IP-address>.
nping 20 0 <target-IP-address> <host-IP-address>
If <target-IP-address> is
205.180.4.5
and <host-IP-address> is
205.180.4.8, you would see output
like the following example.
Wait for a few moments and press C-A, F to stop NPING. The number of packets transmitted depends on how long NPING runs. If the network connection fails and you get an "Error Status: 0014" message, check your connections, your IP address, or see your system administrator.
Test the TFTP and DHCP services by using the following procedure for the PowerPC target board.
By default, an MBX target will save and re-use the DHCP information which it got the very first time that it booted. Use the NIOT command at the EPPC-Bug> prompt. You will see output like the following example.
EPPC-BUG> NIOT Controller LUN =00?
Press Enter 14 times to accept the default value for the entries. You will then see the following prompt.
BOOTP/RARP Request Control: Always/When-Needed (A/W)=W?
Press A and press Enter. You will then see the following prompt.
BOOTP/RARP Reply Update Control: Yes/No (Y/N) Y?
Press N and press Enter. You will then see the following prompt.
Update Non-Volatile Memory (Y/N) =Y?
The last action saves the changes that you just made to NVRAM.
Downloading an image from the host system
Note that the contents of the zImage file were transferred (6 bytes, the five HELLO characters and the EOL character).
A successful boot would add entries to your /var/log/messages system log; see System log after a successful boot. You will have to be root in order to read the log.
System log after a successful boot
dhcpd: BOOTREPLY for 205.180.4.5 to < target > (08:00:3e:2d:35:af) via eth0 |
tftpd[7121]: tftpd: trying to get file: /tftpboot/205.180.4.5/zImage |
If you do not see output such as the previous samples show, see Troubleshooting boot problems with a PowerPC target. To exit Minicom, press C-A, X.
See the Motorola documentation, EPPCBug Firmware Package User's Manual, for more information on EPPCBug firmware commands.
The following discussion details some solutions to problems with your MBX target board's configuration.
If your target will not boot and you see lines like PLH output when DHCP server is not functioning, the DHCP server is not working.
PLH output when DHCP server is not functioning
Verify DHCP is running and that your DHCP configuration is correct; see Set up the DHCP services.
If your target will not boot, and you see lines like PLH output when TFTP server is not functioning, the TFTP server is not working.
PLH output when TFTP server is not functioning:
Verify TFTP is running; see Enable the TFTP service and Test the TFTP service.
If your target will not boot, another likely cause is an incorrect Ethernet address in the DHCP configuration file (/etc/dhcpd.conf). Such an unsuccessful boot would provide an entry in the system log like Unsuccessful boot because of incorrect Ethernet address shows. You will have to be root in order to read the system log.
Unsuccessful boot because of incorrect Ethernet address
dhcpd: No applicable record for BOOTP host 08:00:3e:2d:35:af via eth0 |
In our example, <target-ethernet-address> is 08:00:3e:2d:35:af. Verify that this matches the value you added in /etc/dhcpd.conf and Network information. You can print the board's Ethernet address using the NIOT command from a Minicom session; see Printing an Ethernet address with the NIOT command.
Printing an Ethernet address with the NIOT command
If you see a "Boot Logic error 20" error message, you have a permissions problem in the /tftpboot directory; see Enable the TFTP service and Test the TFTP service.
Now, see Creating the rhedk group.
rhedk
GroupCreate the rhedk group and add users to that group. Users in the rhedk group can then put kernels in the /tftpboot directory.
Create the basic filesystem that your embedded application will use.
The mktargetfs.sh command will create all the default directories that the target uses (/dev, /proc, /bin, and /etc) along with all the files necessary to run the Linux kernel.
If you used the su command to become root, fully log out and then log back in as normal user, so the rhedk group change will take effect.
If you are logged in to X Windows as a normal user, you may need to log out of your X session and then log back into X to get the new group permissions to work.
/opt/redhat/edk-000221/H-i686-pc-linux-gnulibc2.1/bin/ must be on your path. You must now be running as a non-root user.
Do not install the kernel with the make install or the make modules_install rules; the EDK will handle the copying of the kernel to the /tftpboot directory.
Now, see Embedded DevKit Basics.
1. Your router's IP address, also known as the default route. Return to text.
2. If host-IP-address is 205.180.4.8, the subnet would be 205.180.4.0, for instance. Return to text.
3. Enter the Ethernet address in ##:##:##:##:##:## format.Return to text.
4. If using RAM Disk as the target filesystem, see the description with Setting Up a Target Configuration; see also the User's Guide from the Source-Navigator's Help menu for information on configuring from the IDE; also, for information on using RAM Disk, see the Red Hat Linux documentation. Return to text.
5. Get more information by running the 'man tftpd' command for the man page documentation. Return to text.
6. If using RAM Disk as the target filesystem, see the description with Setting Up a Target Configuration; see also the User's Guide from the Source-Navigator's Help menu for information on configuring from the IDE; also, for information on using RAM Disk, see the Red Hat Linux documentation. Return to text.
7. To communicate with the PowerPC target board through the serial port, our recommendation is for using Minicom, the UNIX telecommunications program, to verify a connection. Minicom is part of the general Linux distribution. Return to text.
8. The EDK provides specially modified kernel sources for the MBX target board. When you distribute an application that uses this kernel, you must ship the kernel sources (from src-redist directory). Return to text.