|
To boot a kernel onto the target board through the JEI or ST Micro Connect, a utility called st40load is used. This will connect to the target, configure any registers needed to set up the memory interface and download the kernel. In addition it can download a RAM disk image and set up the kernel command line. Before you start, you will need to obtain some information about the host Linux PC and the network setup. Assuming your PC is correctly configured you can get most of this information by running a few commands on the PC:
Note that you must use addresses for all fields except the JEIIP, you cannot use names. The the rest of these instructions are tailored to recent versions (0.08 or later) of st40load. Older versions have a different interface, which is described here. st40load has full documentation available in PDF. You can also view the README which is part of the download. Before you can use st40load for the first time, it is necessary to create a file in your home directory: .st40loadrc. This is automatically read when st40load starts executing, and is normally used to read further configuration files and define targets. A target is used by st40load to combine the details of how to connect to the target board and any configuration which needs to be done. So for example, a simple .st40loadrc would contain:
The include statement pulls in the file vmlinuxprocs.cfg, which is provided with st40load, and which defines a number of procedures used to load the Linux kernel. The second line defines a target called fred, which is connected to the JEI called jei02 (an IP address could also be used here). Finally db457_HCMOS8_setup is the name of a command language procedure which will be called after connecting to the target, which configures memory interface registers for that board. A number of these are provided with st40load for ST boards. See the st40load documentation(PDF) for more details on the features available and the command language syntax. All necessary kernel configuration can be performed by passing command line options to st40load. All options which are recognised by st40load itself must appear first on the command line, all remaining options are passed through to the kernel as its command line. If there is any risk of conflict, the option -- can be used to separate st40load options from kernel options. As the number of options which have to be passed can be quite large, we recommend that you write a small shell script, similar to the one below:
If you want to change the serial port speed, simply add extra parameters to the console= option, for example:
The command language procedure BootLinuxKernel is called after connecting to the target and downloading the kernel image. It is used to set up the kernel parameters including the command line. These options can also be stored in the .st40loadrc file. See the st40load README for a simple example.
|
||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||