DENX . DULG . ELDKRebuildingComponents
|
3.8.1. ELDK Source Distribution
The ELDK is distributed with the full sources of all the components,
so you may rebuild any ELDK package. The sources are provided in the
form of SRPM packages, distributed as a separate ISO image.
To rebuild a target or ELDT package, you must first install the
appropriate source RPM package from the ISO image into the ELDK
environment. This can be done using the following command:
$ ${CROSS_COMPILE}rpm -i /mnt/cdrom/SRPMS/<source_rpm_file_name>.src.rpm
After an ELDK source RPM is installed using the above command, its
spec file and sources can be found in the subdirectories of the
<ELDK_root>/usr/src/denx subdirectory.
The sections that follow provide detailed instructions on rebuilding
ELDT and target components of the ELDK.
All the target packages can be rebuilt
from the provided source RPM packages.
At first you have to install the Source RPM itself:
bash$ ${CROSS_COMPILE}rpm -iv <package_name>.src.rpm
Then you can rebuild the binary target RPM using the following command
from the ELDK environment:
bash$ ${CROSS_COMPILE}rpmbuild -ba <package_name>.spec
In order for the rebuilding process to work correctly, the following
conditions must be true:
- The $CROSS_COMPILE environment variable
must be set as appropriate for the target CPU family.
- The <ELDK_root>/usr/ppc-linux/bin
directory must be in
PATH
before the
/usr/bin directory. This is to make sure that
the command gcc
results in the fact that the
ELDK cross compiler is invoked, rather than the host
gcc
.
The newly built package can then be installed just as easily:
bash$ ${CROSS_COMPILE}rpm -i <package_name>.rpm
All the ELDT packages allow for rebuilding from the provided source
RPM packages using the following command from the ELDK environment:
$ unset CROSS_COMPILE
$ <ELDK_root>/usr/bin/rpmbuild -ba <package_name.spec>
In order for the rebuilding process to work correctly, make sure all of the following is
true:
- The <ELDK_root>/usr/ppc-linux/bin
directory must NOT be in
PATH
. This is to make sure that the command
gcc
causes invokation of the host
gcc
, rather than the ELDK cross compiler.
Note that the newly built package should be installed with the "global" rpm
,
not with the arch specific one:
bash$ <ELDK_root>/bin/rpm -i <package_name>.rpm
Copyright © 2002-2021 by DENX Software Engineering