Red Hat Docs > Manuals > EDK Manuals > |
This chapter lists commands you can use for creating a target board application and for accessing Source-Navigator from the command line.
Source-Navigator configuration and link scripts can be used directly from a command line, if preferred.
This section lists the arguments for the config.pl and link.pl scripts.
This sets the target board architecture. The default is x86. ppc is also supported. See also --tool-prefix.
Directory where architecture binaries (gdbserver and sh) are kept. The default is ../../lib/elix relative to the launcher sources.
Specify the output boot image file name. This is a mandatory argument.
[serial:target=<device>:host=<device>:baud=<baud>]
Debug target via an ethernet or serial connection. gdbinit specifies the name of the gdb script to use to automate the connection. The default is .gdbinit.
When specifying ethernet, port is the port the debug server is listening on. The default port number is 9999. See --net for specifying the hostname for the target when using ethernet.
When specifying serial, both the target board and host serial devices must be specified. The default baud rate is 9600. Legal values are 9600, 19200, 38400, 57600, and 115200.
Specify the file in which the configuration is saved. This is a mandatory argument.
Specify the path to the launcher sources. This is a mandatory argument.
Displays possible arguments to config.pl.
--kernel:[all-modules:][module=<name>.o[,options]:]
path is the directory containing the Linux sources. This is required to find the kernel image and modules. The kernel image name is computed based on the target board architecture, but can be overridden using the image option.
Using all-modules or module options cause modules to be installed in the <root>/lib/modules directory. Unless the all-modules option is used, only explicitly mentioned modules are allowed to remain in the filesystem. All other modules are removed from the <root>/lib/modules directory. A list of modules and their arguments is saved to cfg_modules.h.
Specifies the arguments to give the kernel at boot time. This can be necessary when including drivers in the kernel instead of as modules.
--mount:[mp=specialfile,dir,type,rwflags,data]
Adds the mount points. The specialfile, dir, and type fields are like a /etc/fstab entry. rwflags are defined in /usr/include/sys/mount.h. Use MS_MGC_VAL as the rwflags default. data is for optional filesystem arguments. Use NULL as the data default.
--net:[kernel:][dhcp:][hostname=<name>:]
[ip=<ip>:mask=<mask>:broadcast=<ip>[:gateway=<ip>]]
If kernel is specified as the network option, the Linux kernel must acquire the IP addresses. Use kernel with the nfsroot option (see --nfsroot) where the NFS Root filesystem must be mounted before the application runs.
For static IP, you must specify the IP address, mask, and broadcast numbers. Additionally, you can add the numeric gateway IP address. The target hostname can also be set. The networking options are saved to cfg_modules.h.
This enables the NFS Root startup. path is the directory which the target will mount as the root of its filesystem via NFS.
--ramdisk:[template=<path>:][type=<type>:][extra=<percentage>:]
[blocks=<# blocks>:inodes=<# inodes>:]
This enables the initrd startup. template specifies the root of the directory to be packed into the RAM Disk. When selecting the Minix filesystem type, the default is to create a disk 10% larger than required. It is possible to specify how much bigger (in percentages) to make the disk size. The absolute size (by disk blocks and inode count) can also be specified.
The tool prefix is automatically set according to the target architecture and the type of the host system. This option allows the prefix to be overridden.
Print out the shell commands executed by the script.
Specifies the application executable. This is a mandatory argument.
Instead of starting the application directly, it is started from gdbserver. Connect with gdb from the host according to configuration (ethernet/serial) to start debugging. If this argument is omitted, the application is stripped before downloaded to the target board.
Specifies the configuration file generated by config.pl. This is a mandatory argument.
Displays possible arguments to link.pl.
Print out the shell commands executed by the script.
This section describes the functionality of the config.pl and link.pl scripts.
This is a short description of what occurs in the config.pl script, allowing you to diagnose and fix unforeseen problems.
Read the config.pl script for the full details, located in the /opt/redhat/edk-000221/H-i686-pc-linux-gnulibc2.1/bin directory.
A few sanity checks are made on the arguments. Unspecified optional arguments are assigned computed values.
All specified and computed arguments are saved to the config.h file.
Install all modules on the target board filesystem, using the Linux makefile.
Go through the list of modules. Find each module's path and make cfg_module.h entry with absolute path and arguments, if any.
One of three execution branches; all output to cfg_network.h.
Kernel is responsible for acquiring the IP address. The config.pl script does not need to do anything for this option.
Dynamic IP via DHCP. Enable the DHCP support into the cfg_network.h file.
Static IP. Specify net interface configuration and enable code that will process it.
This is a short description of what occurs in the link.pl script, allowing you to diagnose and fix unforeseen problems.
Read the link.pl script for the full details, located in /bin.
Debugging startup:
gdbserver
is copied to the target board filesystem (/elix_gdbserver).
launcher_debug
is copied to the target board filesystem (/sbin/init).
A
gdb
command script is generated which allows
gdb
to automatically connect to the target board.
Application startup:
The application is copied to the target board filesystem
(/app).
/elix_gdbserver
is deleted from the target board filesystem.
launcher
is copied to the target board filesystem
(/sbin/init).
This is optional, depending upon your configuration.
x86 target:
The tool
mknbi-linux
is used to create a kernel image. This may include a RAM Disk. The output is saved to the boot image, as specified by the
--boot-image
argument.
RAM Disk:
The RAM Disk image is copied to the Linux kernel directory. The Linux
makefile
rule
zImage.initrd
is invoked. The resulting kernel image is copied to the boot image location, as specified by the
--boot-image
argument.
NFS Root:
The kernel image is copied to the boot image location, as specified by the
--boot-image
argument.
Source-Navigator supports the following command line options:
This forces batch mode to create a new project. If this is set, Source-Navigator will not launch. Instead the following command line options will be used to create a new project.
This command creates a project in the current directory using the directory path. For example, if the current directory is /home/foo and --projectname is run, the project name becomes /home/foo/foo.proj.
Sets preferences for an option used in project creation.
Lists options that can be set using --define.
(synonyms: -dbdir, -database, -db)
Defines the directory for the symbol databases. Without this, the symbol databases are put in a directory called .snprj at the same level as the project file.
Specifies a text file with a list of all files or directories to add to the project.
This option prevents the creation of cross-references. By default, Source-Navigator generates cross-reference information for the project.
This option is used to start the Auto-Create dialog. It is not normally used with --batchmode. Source-Navigator prompts the user for information used to create a project.
The following command creates a project named /home/smith/devo.proj using the files listed in devo-files in batch mode. The database files are stored in ~/db_files. Source-Navigator returns when the project has been created.
--import devo-files \
--databasedir ~/db_files \
--project /home/smith/devo
The following command creates a project in batch mode using the current directory. It adds all of the files in the current directory and in all of the subdirectories. The current working directory is /home/smith/devo/snedk. The generated project name is /home/smith/devo/snedk/snedk.proj.
The following command displays the Auto-Create dialog, initialized with the current directory, with foo.proj as the project name. To view the project, you must open Red Hat EDK.
| ||
---|---|---|