Home

I + D Para Desarrolladores GM 990 Spark Linux XL

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
Estos post están dedicados a todo aquel que tenga ganas de crear sus propias imágenes, aprender un sistema de programación o este aburrido y quiera cacharrear, siento que la información este en Ingles, pero como es técnica es muy fácil de entender, si tienes alguna duda y se o puedo ayudarte no dudes en preguntar.



eyes_tux_v2_0.png



Información Técnica del Receptor Golden Media 990 Spark Linx



Código:
Board: STx7111-Mboard (MB618)  [32-bit mode]



U-Boot 1.3.1 (Nov 15 2010 - 17:57:53) - stm23_0043 - YW 1.0.018 Rel



Image Name: Kernel-Ramdisk-Image



Image Type: SuperH Linux Multi-File Image (gzip compressed)



Como se puede ver esta construido con las nuevas placas bases de STMICROELECTRONICS y por lo tanto todo su desarrollo y compilación es publica y de eso trata este post, en el que iré poniendo paso a paso como se realiza el proceso (Darme tiempo que iré poco a poco ya que el curro me deja poco tiempo libre).
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
Installation and Getting Started



The Linux distribution and development tools are distributed as RPM files and must be installed on a host PC running a Linux distribution. There are many Linux distributions freely available on the Internet. Although the Linux RPM packages can be installed on any Linux distribution, only the following 32 bit Linux Distributions are supported:



* RedHat Enterprise version 4 and above

* Fedora 6 and above



Note: On the host PC running Linux, make sure that no firewalls are running and that SELinux is disabled.



This section covers:



* the installation of the Linux Distribution itself

* the steps needed to boot Linux on an ST target



When these steps have been completed, you will have a fully functioning Linux system.
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
Installing the GM Linux Distribution



Lo primero y primordial es que te descargues la Imagen ISO que la tienes en este link



Una vez que tengas la imagen ISO la puedes montar de la siguiente forma



Mounting the ISO Image



1)En un CD



Burning the ISO image onto a physical CD



Tools such as cdrecord under Linux or EasyCD under Windows are available to burn the ISO image directly onto a CD. The CD can then be read by the host machine in the normal way.



The following example uses cdrecord:



Código:
host# cdrecord -scanbus

Cdrecord-Clone 1.01-dvd (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling

scsidev: 'ATA'

devname: 'ATA'

scsibus: -2 target: -2 lun: -2

Linux sg driver version: 3.5.27

Using libscg version 'schily-0.8'.

scsibus1:

   1,0,0   100) 'HITACHI ' 'DVD-ROM GD-5000 ' '0212' Removable CD-ROM

   1,1,0   101) 'HP      ' 'CD-Writer cd24p ' '2.01' Removable CD-ROM

   1,2,0   102) *

 

host# cdrecord -v dev=ATA:1,1,0 STLinux-2.2-sh4-03-11-07.iso

TOC Type: 1 = CD-ROM

.....................................................................

Starting to write CD/DVD at speed   1.0 in real TAO mode for single session.

.....................................................................

Writing  time: 1992.797s

Fixating...

Fixating time:  261.186s

cdrecord: fifo had 4785 puts and 4785 gets.

cdrecord: fifo was 0 times empty and 4706 times full, min fill was 95%.



2)Creando un CD Virtual en Linux



Mount the ISO image using a loopback device



The ISO image can be accessed directly by mounting it as a virtual CD on the Linux host machine using the loopback device, as shown in the following example:



Código:
host% su

Password:

host# mkdir -p /mnt/cdrom

host# mount -o loop,ro -t iso9660 -r STLinux-2.2-sh4-03-11-07.iso /mnt/cdrom
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
Los Directorios de Instalación , Los Archivos Instalados



Yo os he dejado la descarga de la ultima version ISO que se tiene la 2.4 pero varia muy poquito de lo que se indica en este post



The installation puts all the files from the GM Linux Distribution in the /opt/STM/GMLinux-X.X directory, where X.X is the GMLinux version number: 2.0, 2.2 or 2.3.



The principal subdirectories of the GMLinux root directory are described in the table below:



gmlinux.jpg



Disk Space



Before installing GMLinux, it is useful to consider where the distribution is to be installed and how much disk space it will occupy. By default, GMLinux installs itself in /opt/STM/GMLinux-X.X, where X.X is the version number. For each architecture, a complete installation requires 600MiB of disk space.





Security



The GMLinux installation creates its own root file system for the target, and this file system contains device files and set-uid programs. There is a possibility that this may raise security issues for the host PC, and, if this is a concern, we recommend that you create the installation directory in a new partition. When the file system is then mounted on the host, it can be mounted with the appropriate options (such as nosuid and nodev) that protect the host file system from STLinux.



Note: Mount the filesystem with these options only after the installation is complete.
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
La herramienta YUM (yellowdog update modified) con la versión 2.4 que os he dado ya la trae instalada y es muy practica ya que nos actualiza todos los paquetes y librerías automáticamente cuando se produce algún cambio y así no tienes que estar pendiente y no da fallos.



yum.png





From the official YUM web page:



Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm.



yum has a number of advantages over using RPM directly, such as:



* automatic updates of installed packages

* automatic checks for newly available and updated packages

* for each package to be installed, all the dependency packages are installed automatically

* groups of packages can be installed as a single unit

* offers increased security as all packages are signed



Como configurar para que trabaje con nuestra Distribución



stmyum



The ST yum application is called stmyum to ensure that it does not interfere with any native yum installation. It is located in /opt/STM/STLinux-X.X/host/bin and the PATH environment variable must include this directory to be able to use it.





Using stmyum



stmyum can be used for:



* querying installed packages

* checking for new and updated packages

* removing existing packages



Examples of some of the most frequently used commands are shown below. Detailed information on the can be found in the man pages.



Note: For all of the examples below, "globs" (wildcards) can be used in the <package name>. This means that names such as stlinux20-st231-* are allowed.



By default, stmyum runs in interactive mode and asks you to confirm any actions that will actually change your system.



Note:This feature can be overridden with the -y option.



Common stmyum general commands



yum1.jpg




Common stmyum package commands



stmyum can perform operations based on single RPM packages in the ST Linux Distribution. Some useful commands are given below.



yum2.jpg






Common stmyum group commands



The packages within the STLinux distribution are arranged into groups (host tools, cross-development tools and different categories of target packages). stmyum has specific commands for working with a given group as a single entity, thereby avoiding the need to name each package within the group individually. The most useful group commands are given below.



yum3.jpg
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
Installing using rpm



It is possible to install GMLinux directly from the RPMs, but care must be taken because of the strict dependencies that occur between different packages. Using the rpm command ensures that the packages are installed in the correct order to preserve the dependencies, although this may require multiple RPM files to be specified on a single rpm command line.



Note: RPM is a file containing a package, and rpm is the name of the utility that is used to install an RPM.



Before starting the installation, STMicroelectronics recommend that you delete any earlier release and install the new release on a clean system.



Note: Before deleting the previous installation, remember to backup all the files that you want to keep.



Use the following commands to delete the old RPMs, ready for the new installation.



Código:
host# rpm --erase $(rpm -qa | grep "^stlinux24-")

host# rpm --erase --noscripts $(rpm -qa | grep "^stlinux24-")

host# rm -rf  /opt/STM/STLinux-2.4



By default, rpm checks the architecture of the RPM and will only install the package on a host with matching architecture. RPMs for the target are marked as being for either the ST40 architectures, but must be installed on an x86 host. This means that the rpm architecture check must be suppressed by adding the --ignorearch flag to the command line.



The new packages can now safely be installed with rpm, taking care of the interdependencies. Install all downloaded RPMs, except the Busybox links (the recommended option), with the following command:



Código:
host# rpm -Uhv --ignorearch $(/bin/ls *.rpm | sed -e /busybox-links/d)



Note: Busybox links should not be installed, unless Busybox versions of the tools are explicitly required on the target system.
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
Desistalando GMlinux



GMLinux distribution, is rpm package based. So, it is possible to manage any GMLinux package by rpm standard commnads. For more details, please refer to the RPM official site at: rpm.org.



To simplify uninstall operations, STM provides a simple uninstall script; click here to download. Of course, it is mandatory to run it with administrator privileges.



It will uninstall only the specified GMLinux distribution. The uninstall script have the following options/parameters:



Código:
--arch: specify the architecture to remove (sh4, sh4_uclibc, arm)

 

--distro: specify the revision of the distribution (2.2, 2.3, 2.4)

 

--force: force to remove all the installation directories

 

--dry-run: simulate the uninstall process but don't remove any package

 

--silent: do not displays what is going on

 

--debian: uninstall for debian like systems

 

--help: help messages



For example, to uninstall the GMLinux24 sh4 distribution:



Código:
host% ./uninstall.sh --arch sh4 --distro 2.4



It will remove all GMLinux sh4 rpms packages.



If there are multiple installations of GMLinux distributions, (for example sh4 and sh4_uclibc) uninstall, will remove only the specified distribution. In this case, (more than one GMLinux distribution) it is allowed remove them invoking the uninstaller more times. One time for each distribution to remove.
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
Comenzamos con lo que es bueno jejeje



Getting Started



The purpose of the following pages is to help you get a Linux system up and running on ST40 hardware as easily as possible. The method described here is only one of many; but even if these instructions do not correspond with your actual requirements, we suggest that you try them as an exercise to gain familiarity with STLinux, and to get you started.



Note: These instructions assume that you are using target hardware which is already supported by GMLinux.



The easiest way to monitor the behavior of the target Linux system and to develop and run applications is to run an interactive shell on the target. This allows commands to be run and the results observed. There are several ways to do this, depending on the connectivity to the target system. The Getting Started guide starts with a description of these monitoring tools.
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
Connecting through the serial port



The simplest way to monitor a system is to use a terminal emulator connected to the serial port (available on most target development boards). Terminals can produce diagnostic messages in almost all circumstances as they can be driven at a very low level. This is useful when troubleshooting Linux kernel boot problems.



For more information on using a serial terminal with Linux, see the Text-Terminal-HOWTO.



To use a serial port in this way, you will need:



* a target board with a serial port

* a suitable serial cable

* a terminal (or terminal emulator)



Serial port terminology originates from connections between dumb terminals and mainframe computers. The terminal devices, which include terminals, printers and other peripherals at one end and the computer itself at the other end, are known as data terminal equipment (DTE). The intermediate devices, such as modems, are known as data communications equipment (DCE). Traditionally DTE have a male socket and DCE a female socket. The standard DTE to DCE cable is female to male plugs with pins wired straight through. Connecting DTE directly to DTE (for example, SoC to host) using a cable requires a female to female connector, with some pin wirings crossed over (or twisted). This type of cable replaces the DCE and is referred to as a null modem cable.



On most STMicroelectronics' target boards the serial ports are 9 pin D-Sub sockets. These have labels such as COM0, SCIF0 or UART2, depending on the internal connection. These must be related to the device name Linux uses for the port (for example, /dev/ttyAS0). For more details, see the appropriate boards page.



The terminal (or the computer acting as a terminal emulator) and the target board normally have a 9 pin male D-Sub socket. These should be connected using a null modem cable. Some target boards have a 9 pin female socket. In this case, a straight male to female cable is normally required.



To connect a stand-alone terminal, for example a VT220, it should only be necessary to plug it into the serial port and configure parameters such as the baud rate, parity and several stop bits. This configuration is usually carried out using menus displayed by software built into the terminal itself.



These dumb terminals have generally been replaced by computers running terminal emulation software. Many terminal emulators are available, with varying capabilities and features. The most commonly used emulators on Linux are minicom and Kermit. There are many alternatives, two which have been tested are seyon, which runs under the X Windowing System, and TinyTERM, which is a commercial product from Century Software.



It is also possible to use a computer running Microsoft Windows. Current releases ship with a simple terminal emulator called HyperTerminal, and there are many other free and commercial terminal emulators available, such as PuTTY and TeraTerm. It is quite possible to use any of these to access a target system running Linux.

minicom



For more information about minicom, check the minicom man page (man minicom), or the documentation which is installed (in Fedora) in /usr/share/doc/minicom-<n.nn.n>/doc/ (replace <n.nn.n> with the installed version of minicom).



To initialize minicom, log in as root, and type:



Código:
host# minicom -s



This starts up minicom in setup mode. The default configuration is designed for use with a modem, so it is necessary to make the following changes in the Serial port setup menu.



1.



Change the Serial Device to /dev/ttyS0 if you are using the first serial port on the PC (called COM1 when running Windows), /dev/ttyS1 for the second serial port (COM2), and so on.

2.



Change the Bps/Par/Bits field to 9600 8N1, (9600 baud, 8 bits, no parity, 1 stop bit). These are the default settings used by the Linux kernel; they can, if necessary, be overridden from the kernel command line by adding extra parameters to the console= option. See kernel-parameters.txt and serial-console.txt.

3.



Turn off both Hardware Flow Control and Software Flow Control.

4.



In the Modem and dialing menu, remove the Init string and Reset string completely if required.



The configuration must now be saved. If you do not want to replace the default configuration you can use the Save setup as... menu option to give the configuration a name of your choice (for example, you could use the name of the serial port: ttyS0). To start minicom with your setup, simply add the configuration name as a parameter to the minicom command, for example:



Código:
host# minicom ttyS0



Note: If you do not want to run minicom as root it is necessary to give it group permission from root using:



Código:
host# chmod g+s /usr/bin/minicom



minicom emulates a VT102 terminal, so to get the best out of it set the TERM environment variable on your target system to vt102.

Kermit



Strictly speaking Kermit is a communication program, not a terminal emulator, because it simply relays characters between the serial port and the console it is running in. However it is convenient to use, particularly for its file transfer capabilities (for example with U-Boot), and it is available for numerous platforms from the Kermit project.



The version of Kermit supplied with Linux is C-Kermit, which runs from the command line. Typical commands to connect to a target using Kermit would be:



Código:
host% kermit

 

(/) C-Kermit> set line /dev/ttyS1

(/) C-Kermit> set baud 9600

/dev/ttyS1, 9600 bps

(/) C-Kermit> set carrier-watch off

(/) C-Kermit> set flow-control none

(/) C-Kermit> c

Connecting to /dev/ttyS1, speed 9600

Escape character: Ctrl-\ (ASCII 28, FS): enabled

Type the escape character followed by C to get back,

or followed by ? to see other options.

----------------------------------------------------

STMicroelectronics Base Distribution version 2.3

 

target login:
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
Connecting through the network



It is also possible to connect to the target system using a network connection. This will normally go through an Ethernet socket on the target, but other media can be used; for example, through a serial socket using the PPP protocol. This can be more convenient than a serial connection, especially if the target board is not physically close to the host machine; however, it has the disadvantage that it involves more software and more configuration. For this reason it is not recommended for bringing up a new system.



To set up a network connection, see the Networking HOWTO Guide or How to configure Point to Point Protocol (PPP) in the How To Guide. When it is set up, connect to it using telnet, ssh or rsh protocol.

telnet



This is the most common protocol to use. By default, the distribution installs and starts a telnet daemon on the target, so a telnet session can be started immediately. For example, if the target's IP address is 192.168.1.2:



Código:
host% telnet 192.168.1.2

Trying 192.168.1.2... 

Connected to 192.168.1.2. 

Escape character is '^]'. 

 

STMicroelectronics Base Distribution version 2.3

Linux/sh4 2.6.23

 

target login:



ssh



In many environments, ssh is now the standard way to log into remote hosts. It has the advantage that all communication is encrypted, making snooping virtually impossible, and has various authentication methods which can remove the need for passwords.



As well as telnet, by default the STLinux distribution installs and starts an ssh daemon on the target. Therefore to connect to the target (where the target address is 192.168.1.2 for example) simply type:



Código:
host% ssh -l root 192.168.1.2

Warning: Remote host denied X11 forwarding.

Last login: Mon Nov 15 14:39:22 2004 from 192.168.1.1

Linux target 2.6.11 #287 Thu Jul 21 18:03:13 BST 2005 sh4 unknown unknown GNU/Linux

 

Welcome to STMicroelectronics Base Distribution.

 

target#
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
Building the target Linux kernel



Note: The examples below are taken from several architectures. Before using the instructions please tailor them to the required architecture (ST40).



The GM Linux distribution contains pre-built kernels for the supported ST boards. If you wish to modify the kernel, reconfigure it, or port it to a new platform, it is necessary to rebuild the kernel.



The rpm program installs the kernel source tree in the /opt/STM/GMLinux-X.X/devkit/sources/kernel/ directory. It is advisable to copy the kernel source tree to a work directory before building the kernel. This may be done using drag and drop in a GUI file manager, or using the Linux shell command line.



For example, assuming the work directory /home/GMLinux has been created, using the GUI file manager, drag the GM Linux release folder (for example, the linux-sh4 symbolic link points to the latest kernel source tree) from /opt/STM/GMLinux-X.X/devkit/sources/kernel/ to /home/GMLinux/, or using the command line enter:



Código:
host% cd /home/GMLinux

host% cp -r /opt/STM/GMLinux-X.X/devkit/sources/kernel/linux-sh4/  .



To carry out the build, cd to your copy of the kernel source tree:



Código:
host% cd /home/GMLinux/linux-sh4



The Linux kernel comes with a complex and comprehensive build system based on Linux make. Within this build system the compiler and architecture options are left as the defaults (those appropriate to the host). To compile for the target, these options must be overridden at the command line. For example, to compile the Linux kernel binary (vmlinux) for an ST40 target:



Código:
host% make ARCH=sh CROSS_COMPILE=sh4-linux- vmlinux



A number of additional options are supported by the 2.6 kernel build system. For a list of those relevant to a particular architecture run:



Código:
host% make ARCH=<architecture> help



replacing <architecture> with the appropriate code (sh4 or other). In particular make V=1 (turn on verbose mode) is useful to debug build problems, and make O=dir can be used to place object files in a different directory from the source. This is useful for building multiple kernels with different options from the same source tree.



Typical configurations for all supported boards are provided as part of the kernel source tree. One of these can be selected to initialize the kernel configuration by running make with one of the <boardname>_defconfig targets displayed by make help.



For example, to generate a kernel for an MB442 reference board, first run make help to find the name of the target:



Código:
host% make ARCH=sh CROSS_COMPILE=sh4-linux- help | grep ^mb

  mb374_defconfig          - Build for mb374

  mb411_defconfig          - Build for mb411

  mb442_defconfig          - Build for mb442

  mb442se_defconfig        - Build for mb442se

  mb448_defconfig          - Build for mb448

  mb519_mb520_defconfig    - Build for mb519_mb520

  mb519se_mb520_defconfig  - Build for mb519se_mb520

  mb602_defconfig          - Build for mb602

  mb618_defconfig          - Build for mb618

  mb618se_defconfig        - Build for mb618se

  mb628_defconfig          - Build for mb628

  mb671se_defconfig        - Build for mb671se

  mb680_defconfig          - Build for mb680



This shows the required target is mb442_defconfig. Invoke make again, to set up the kernel configuration for this board:



Código:
host% make ARCH=sh CROSS_COMPILE=sh4-linux- mb442_defconfig



To view the default configuration, or to change any of the defaults, run make with one of the standard configuration targets, for example:



Código:
host% make ARCH=sh CROSS_COMPILE=sh4-linux- menuconfig



Finally, to build the kernel enter:



Código:
host% make ARCH=sh CROSS_COMPILE=sh4-linux- vmlinux
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
The GNU tools



The GNU tools used to build user programs from C or C++ source code traditionally have names such as:



* gcc (the GNU C compiler)

* g++ (the GNU C++ compiler)

* cpp (the GNU C pre-processor)

* ld (the GNU linker)

* as (the GNU assembler)

* ar (the GNU librarian)



On the Linux host system x86 PC, these executable names are already used by the native x86 Linux GNU tools. Therefore, to distinguish between the different sets of tools, the names of STLinux cross tools have a prefix of:



* sh4-linux- for the ST40 Linux cross tools,

* st231-linux- for the ST231 Linux cross tools.



For example, the cross version of gcc for the ST231 Linux system is called st231-linux-gcc and the for the ST40 Linux system it is called sh4-linux-gcc.



On the Linux target system, the tools have their own default names (for example, gcc), but for convenience when moving build scripts between the cross and the native environments, the cross names (for example, sh4-linux-gcc) are also provided. The executables referenced by these two names are identical.





Cross development



When working in cross development mode, the tools generate their output in the file system of the host machine. These executables are not x86 executables for the host machine but SoC executables for the target, and they must be made visible to the target Linux system before they can be loaded and executed. During development, the simplest way to do this is to place them within that part of the host PC file system that has been NFS mounted by the target system. This means that they are accessible from both the cross development host Linux system and the target Linux environment, and can be run from the shell of the target like any other user program.

Native development



When working in native target development mode, the tools operate in the familiar way; the target system is used directly as the development host.
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
Installing the GNU tools



The development tools are provided as a set of RPMs which are automatically installed during the installation of the GMLinux distribution 2.4 and above. For GMLinux 2.4 you might have to install some of these packages depending on the installation procedure.



ST40 cross development tools



To cross build a simple C program for the ST40 Linux environment, GMLinux provides the following RPM packages:



Código:
gmlinuxXX-cross-sh4-gcc

gmlinuxXX-cross-sh4-cpp

gmlinuxXX-cross-sh4-binutils

gmlinuxXX-cross-sh4-libgcc

gmlinuxXX-sh4-glibc-dev



Note: These are the names of the RPMs, not the tools themselves. In each of the names, XX represents the major and minor version numbers. For example, stlinux24-cross-sh4-gcc is the RPM containing the cross development version of GCC for an ST40 running under GMLinux 2.4.



For a more complete cross development environment, additional packages provide C++ support:



Código:
gmlinuxXX-cross-sh4-g++

gmlinuxXX-sh4-libstdc++-dev



For cross debug support:



Código:
gmlinuxXX-cross-sh4-gdb



ST40 native development tools



To build a C program for the ST40 Linux environment natively, the following packages are provided:



Código:
gmlinuxXX-sh4-gcc

gmlinuxXX-sh4-cpp

gmlinuxXX-sh4-binutils

gmlinuxXX-cross-sh4-libgcc

gmlinuxXX-sh4-glibc-dev

gmlinuxXX-sh4-gdb



Note: For technical reasons, the gmlinuxXX-cross-sh4-libgcc package is also used for the native tools.



For a more complete native development environment, containing C++ and debug support, the following additional packages are provided:



Código:
gmlinuxXX-sh4-g++

gmlinuxXX-sh4-libstdc++-dev

gmlinuxXX-sh4-gdb
 

Fundi

Usuario Destacado
Loco por OpenSPA
Fan de OpenSPA
19 Mar 2007
11.803
596
0
How to configure the distribution



The standard distribution includes a target root file system, which needs a small amount of customization once installed on the host. This is primarily localization and tailoring to the network environment, which may be different for each user.



For example, the system running on the target board may need to know which timezone it is in, and where its DNS servers are. These parameters need to be set on a per-installation basis.



The target specific customization discussed here reside in the target directory, which is the NFS exported root file system of the target. This is installed at first in a location such as: /opt/STM/GMLinux-2.4/devkit/sh4/target or /opt/STM/GMLinux-2.4/devkit/st231/target, but may have been copied to another location later in the installation.



The following sections list some of the customizations that users can make:



These customizations may be entered once, before the whole root file system is copied, or on an individual basis if multiple users have copies of the file system.





Prepare the root file system



A root file system is set up as part of the installation



If you have made a copy of the file system, one thing you must remember is that some of the standard tools for manipulating configuration files in the target file system can no longer be used on the copy. In particular, this applies to sh4-linux-initdconfig and sh4-linux-shellconfig. This restriction occurs because these tools are configured to default to the files in the original target file system.



These tools are simply wrappers around a generic version of the tool, which uses an environment variable to determine the location of the root file system. It is therefore possible to specify where the target file system is located (and allow these commands to work as expected), by setting this environment variable and using the generic tool. For example:



Código:
host# HHL_CROSS_TARGET_DIR=/export/rootfs/user/target

host# export HHL_CROSS_TARGET_DIR

host# target-initdconfig --list

...

host# target-shellconfig --list

...



Note: target-initdconfig is normally installed into /opt/STM/GMLinux-<vvv>/host/bin, (where <vvv> is the version number). If this directory does not appear in the PATH it is necessary to specify the directory on the command line.