greensocs-package-manual.txt from GreenSocs at Krugle
Show greensocs-package-manual.txt syntax highlighted
//////////////////////////////
// //
// GreenSocs Package Manual //
// //
//////////////////////////////
1) Bootstrapping: the package gsroot
(clean)
rm -rf build-tmp/build-dpkg dpkg/dpkg-1.10.28/debian/tmp
rm -rf build-tmp/build-apt apt/apt-0.5.28.6/build
rm -rf build-tmp/build-gsroot
First build dpkg, then apt, the gsroot, like this:
make -f Makefile2 all-dpkg
make -f Makefile2 all-apt BUILD=build #set build to find environment.mak
make -f Makefile2 all-gsroot
(for subscribers --- check the password and version)
export SUBSCRIBERS_PASSWORD=change-me
make -f Makefile2 all-gsroot SOURCES.LIST="deb http://subscribers:${SUBSCRIBERS_PASSWORD}@subscribers.greensocs.com/restricted testing main\ndeb http://packages.greensocs.com/packages testing main" VERSION=2006.08-1subscribers
NOTE 1:
When the command "fakeroot" is not installed, it can be built with:
make -C fakeroot
then set one more variable in the make command line when creating
the packages:
FAKEROOT=$PWD/fakeroot/bin/fakeroot
NOTE 2:
dpkg and apt must be compiled with gcc3.x, so one must set the CC and CXX
variables in make command line. The default is to add the suffix "-3.3" to
gcc and g++. You may change the suffix with the GCC_3_SUFFIX variable.
NOTE 3:
To compile dpkg and apt statically:
LDFLAGS="-static -static-libgcc" make -f Makefile2 all-dpkg
LDFLAGS="-static -static-libgcc" ONLYSTATICLIBS=yes BUILD=build make -f Makefile2 all-apt
NOTE 4:
To APT compile for mac, use gcc4 to avoid "ld: Undefined symbols:__ZTI10FileMethod" that happens with gcc3.3
NOISY=1 make -f Makefile2 all-apt MSGCOMM=true MSGMERGE=true CC=/Users/bartho/packages/gcc/inst-gcc-4.0.3/local/gcc/4.0.3/bin/gcc CXX=/Users/bartho/packages/gcc/inst-gcc-4.0.3/local/gcc/4.0.3/bin/g++ 2>&1 | tee BUILD-apt12
NOTE 5:
FOR MAC: (note: maybe the build-%: rule needs to be forced to run
depending on an empty FORCE:; rule)
Pack dpkg and apt:
PROG=dpkg; fakeroot bash -c "chown -R root:root build-tmp/build-$PROG && dpkg-deb -b build-tmp/build-$PROG build-tmp"
Build gsroot:
make -k -f Makefile2 all-gsroot
Pack gsroot:
PROG=gsroot; fakeroot bash -c "chown -R root:root build-tmp/build-$PROG && dpkg-deb -b build-tmp/build-$PROG build-tmp"
rm build-tmp/build-gsroot/usr/share/gsroot/bin/gsh
fakeroot bash -c "chown -R root:root build-tmp/build-gsroot && cd build-tmp/build-gsroot/usr/share && tar czf ../../../gsroot_2006.08-1_powerpc-darwin7.9.0.tar.gz gsroot"
2) Compile gcc
(version 4.0.3 --- default)
make -C gcc ARCH=i386
(version 3.3.1 --- this version must be compiled with "old" gcc, so set suffix)
make -C gcc ARCH=i386 VERSION=3.3.1 COMPILER_SUFFIX=-3.3
(create the selector package --- see note on selector package on 3)systemc )
make -C gcc -f Makefile.selector
3) Compile systemc
There are the 2 modified sources for SystemC versions 2.2.05jun06 and
2.1.v1. The newer one is the default. It can be compiled with any g++,
and it will automatically depend on this version of gcc. After
installed, the systemc version to use can be selected with
"update-alternatives --config systemc". Examples of compilation:
(version 2.2.05jun06 --- default)
make -C systemc ARCH=i386
(selecting gcc 3.3.1 for compilation --- COMPILER_BASE will search for "/bin/gcc")
make -C systemc ARCH=i386 COMPILER_BASE=/tmp/build-tmp/inst-gcc-3.3.1/local/gcc/3.3.1
(selecting gcc by suffix)
make -C systemc ARCH=i386 COMPILER_SUFFIX=-3.3
(version 2.1.v1)
make -C systemc ARCH=i386 VERSION=2.1.v1
There is also a new concept of a "selector package". The package with
name "systemc" is a selector package. It depends on a specific systemc
real package OR the systemc-virtual package. So, there is a hint to
the package manager with systemc to install if there is none
installed.
(create the selector package)
make -C systemc -f Makefile.selector
4) Debconf
(clean)
rm -rf debconf/inst-debconf-1.4.30.13/
make -C debconf FAKEROOT=$PWD/fakeroot/bin/fakeroot DPKG-DEB=$PWD/build-tmp/build-dpkg/bin/dpkg-deb
5) gstlm
(clean)
rm -rf gstlm/gstlm-0.9/debian/tmp/
rm -rf build-tmp/build-gstlm/
(normal version)
make -f Makefile2 all-gstlm
(subscribers version)
*** Change templates
make -f Makefile2 all-gstlm RELICENSE=yes
-----------
RUNTIME
-----------
tar xzf packages/build-tmp/gsroot_2006.08-1_amd64.tar.gz
gsroot/bin/gsconfig
gsroot/bin/gsh
See more files for this project here