source: rtems/scripts/README @ 18408af

4.104.114.84.95
Last change on this file since 18408af was 18408af, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 15, 1999 at 2:11:02 PM

Ralf Corsepius (corsepiu@…) submitted these scripts to
help build RPMs.

  • Property mode set to 100644
File size: 3.3 KB
Line 
1
2        RPM support for BSPs
3        ====================
4
5Introduction
6------------
7
8Building an rpm requires to have a tar archive of the sources, and a
9rpm-spec files specifying the details of building.
10
11To support per bsp rpms, one rpm-spec is used per BSP.
12Instead of writing one rpm-spec for each BSP, I have written a shell script
13(mkspec) which generates one *.spec (rtems-<target_alias>-<bsp>.spec) per BSP
14bsp from an rpm-spec template (rtems.spec.in).
15
16A second shell script (mkrpms) is a convienience script which invokes a
17sequence of building rpms for several bsps.
18
19mkspec
20------
21
22mkspec takes two arguments:
23$1 ... the bsp to be built
24$2 ... the target_alias this bsp belongs to
25
26Invoking mkspecs will generate a rtems-<target_alias>-<bsp>.spec either in
27/usr/src/packages/SPECS (SuSE convention) or
28/usr/src/redhat/SPECS (Redhat convention) or
29/usr/src/SPECS
30
31Eg. ./mkspec gensh1 sh-rtemself generates
32/usr/src/packages/SPECS/rtems-sh-rtemself-gensh1.spec on SuSE-6.2.
33
34Building BSP-rpms
35-----------------
36
370. Login as root.
38
391. Install a tarball of RTEMS's sources (with version number attached!) to
40/usr/src/[packages|redhat]/SOURCES
41Eg.
42tar czvf /usr/src/packages/SOURCES/rtems-<VERSION>.tar.gz rtems-<VERSION>
43
442. Generate and install the required rpm-spec file[s]
45cd rtems-<VERSION>/scripts/
46mkspec <bsp> <target_alias>
47
483. Build the rpms
49Building a binary rpm:
50rpm -bb /usr/src/[packages|redhat]/SPECS/rtems-<target_alias>-<bsp>.spec
51
52Building a source and binary rpm
53rpm -ba /usr/src/[packages|redhat]/SPECS/rtems-<target_alias>-<bsp>.spec
54
55Note: a BSP's src.rpm contains its spec-file and the tar-archive of the
56sources (approx. 4-5MB per BSP).
57
58Known Bugs/Deficiencies
59-----------------------
60
61* All files mentioned in here are in its early infancy ;-)
62
63* Building for a single bsp requires an own copy of the source tree inside
64rpm's build directory.
65* Building inside the RTEMS source tree doesn't work.
66* Dependencies on toolchain-rpms not yet supported in rtems.spec.in.
67* Installing multiple binary bsp rpms for the same target can cause
68warnings from rpm, because these bsp-rpms share files.
69* rtems.spec.in is prepared for rpm relocation support, but RTEMS is not
70relocatible (yet?)
71* rtems.spec.in deserves to be extended (description, authors etc)
72* The final packaging stage to build a binary rpm takes an awful lot of
73time - deserves to be investigated.
74* Some RTEMS's cross executables (eg. hello.exe for sparc-rtems/erc32) cause
75warnings from rpm and/or objdump. AFAIS, this is a bug in rpm.
76* Probably many more ...
77
78* Last but not least: RTEMS should be split.
79
80Remarks
81-------
82* It would make sense to split RTEMS host/cross-tools and files depending on
83the target only (<target_alias>/make/*.cfg -- Whow, RTEMS really has files
84which depend on the target only :) into separate rpms.
85* Instead of using a single rpm-spec for each bsp, RTEMS could also use a
86single rpm-spec for all (or at least a given subset of all) bsps of a target.
87* rpm -b[b|a] leaves its built trees unpacked in
88/usr/src/[packages|redhat]/BUILD. Therefore you will rather soon run out of disc
89space if not removing them. (Use rpm --clean -b[a|b] for cleaning them up
90automatically after building)
91* The size of binary rpms can differ up to one magnitude depending on the
92target/bsp (eg. sh-rtems/gensh1 ~10MB vs. sh-rtemself/gensh1 ~32MB)
93
94Ralf Corsepius, 1999/10/14
Note: See TracBrowser for help on using the repository browser.