Imported sources from subversion.
This commit is contained in:
commit
12d63d1569
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
downloads
|
5
architectures/arm-11.cfg
Normal file
5
architectures/arm-11.cfg
Normal file
@ -0,0 +1,5 @@
|
||||
cfg_target_canonical="armv11-$cfg_glued_vendor-linux-gnueabi"
|
||||
cfg_target_linux='arm'
|
||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=softfp -mfpu=vfpv3'
|
||||
cfg_target_gcc_configure_flags='--with-arch=armv7-a --with-cpu=arm1176jzf-s --with-tune=arm1176jzf-s --with-fpu=vfpv3 --with-float=softfp'
|
||||
cfg_target_ar_flags='elf32-littlearm'
|
4
architectures/atom.cfg
Normal file
4
architectures/atom.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
cfg_target_canonical="atom-$cfg_glued_vendor-linux-gnu"
|
||||
cfg_target_linux='x86'
|
||||
cfg_target_linux_kernel='arch/x86/boot/bzImage'
|
||||
cfg_target_gcc_configure_flags='--with-arch=atom --with-cpu=atom --with-tune=atom'
|
6
architectures/atom64.cfg
Normal file
6
architectures/atom64.cfg
Normal file
@ -0,0 +1,6 @@
|
||||
cfg_target_canonical="atom64-$cfg_glued_vendor-linux-gnu"
|
||||
cfg_target_linux='x86'
|
||||
cfg_target_gcc_flags='-O2 -pipe -march=atom -funit-at-a-time'
|
||||
cfg_target_gcc_configure_flags='--with-cpu=x86-64 --with-tune=atom'
|
||||
cfg_target_linux_kernel='arch/x86/boot/bzImage'
|
||||
cfg_target_lib64='yes'
|
6
architectures/cortex-a8.cfg
Normal file
6
architectures/cortex-a8.cfg
Normal file
@ -0,0 +1,6 @@
|
||||
cfg_target_canonical="armv7-$cfg_glued_vendor-linux-gnueabi"
|
||||
cfg_target_linux='arm'
|
||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp -mfpu=vfpv3'
|
||||
cfg_target_gcc_configure_flags='--with-arch=armv7-a --with-cpu=cortex-a8 --with-tune=cortex-a8 --with-fpu=vfpv3 --with-float=softfp'
|
||||
cfg_target_ar_flags='elf32-littlearm'
|
||||
cfg_target_uboot_arch='arm'
|
3
architectures/geode.cfg
Normal file
3
architectures/geode.cfg
Normal file
@ -0,0 +1,3 @@
|
||||
cfg_target_canonical="geode-$cfg_glued_vendor-linux-gnu"
|
||||
cfg_target_linux='x86'
|
||||
cfg_target_gcc_configure_flags='--with-arch=geode --with-cpu=geode --with-tune=geode'
|
5
architectures/i586.cfg
Normal file
5
architectures/i586.cfg
Normal file
@ -0,0 +1,5 @@
|
||||
cfg_target_canonical="i586-$cfg_glued_vendor-linux-gnu"
|
||||
cfg_target_linux='x86'
|
||||
cfg_target_gcc_configure_flags='--with-arch=i586 --with-cpu=i586 --with-tune=i586'
|
||||
cfg_target_gcc_flags='-O2 -pipe -march=i586 -funit-at-a-time'
|
||||
cfg_target_eglibc_configure_flags='--with-cpu=i586'
|
6
architectures/i686.cfg
Normal file
6
architectures/i686.cfg
Normal file
@ -0,0 +1,6 @@
|
||||
cfg_target_canonical="i686-$cfg_glued_vendor-linux-gnu"
|
||||
cfg_target_linux='x86'
|
||||
cfg_target_gcc_flags='-O2 -pipe -march=i686 -funit-at-a-time'
|
||||
cfg_target_gcc_configure_flags='--with-cpu=i686'
|
||||
cfg_target_eglibc_configure_flags='--with-cpu=i686'
|
||||
cfg_target_linux_kernel='arch/x86/boot/bzImage'
|
5
architectures/mips32r2.cfg
Normal file
5
architectures/mips32r2.cfg
Normal file
@ -0,0 +1,5 @@
|
||||
cfg_target_canonical="mipsisa32r2-$cfg_glued_vendor-linux-gnu"
|
||||
cfg_target_linux='mips'
|
||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mabi=32 -mips32r2 -mtune=mips32r2 -msoft-float'
|
||||
cfg_target_gcc_configure_flags='--with-abi=32 --with-tune=mips32r2 --with-float=soft'
|
||||
cfg_target_eglibc_configure_flags='--without-fp'
|
4
architectures/xscale-iwmmxt.cfg
Normal file
4
architectures/xscale-iwmmxt.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
cfg_target_canonical="armv5-$cfg_glued_vendor-linux-gnueabi"
|
||||
cfg_target_linux='arm'
|
||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mcpu=iwmmxt -mtune=iwmmxt -mfloat-abi=soft'
|
||||
cfg_target_gcc_configure_flags='--with-arch=iwmmxt --with-cpu=iwmmxt --with-tune=iwmmxt --with-float=soft'
|
4
architectures/xscale.cfg
Normal file
4
architectures/xscale.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
cfg_target_canonical="armv5-$cfg_glued_vendor-linux-gnueabi"
|
||||
cfg_target_linux='arm'
|
||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mtune=xscale -mfloat-abi=soft'
|
||||
cfg_target_gcc_configure_flags='--with-arch=armv5te --with-tune=xscale --with-float=soft'
|
87
doc/Manual.md
Normal file
87
doc/Manual.md
Normal file
@ -0,0 +1,87 @@
|
||||
Introduction
|
||||
============
|
||||
|
||||
GLUED (GNU/Linux Uniform Environment Distribution) is a minimal Linux
|
||||
distribution targeted at embedded systems.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
The first step to build GLUED for a particular system is to create a
|
||||
configuration file. This configuration file contains details about the
|
||||
system's architecture, packages that will be part of the distribution,
|
||||
network configuration, etc.
|
||||
|
||||
To list all available systems issue the following command on a
|
||||
terminal:
|
||||
|
||||
./mkconfig.bash list
|
||||
|
||||
Once you have identified the name of the system you want to build,
|
||||
issue the following command, replacing <system_name> with the name of
|
||||
that system:
|
||||
|
||||
./mkconfig.bash <system_name>
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
After creating a configuration file, you are ready to compile all the
|
||||
necessary packages.
|
||||
|
||||
To start the compilation process, issue the following command:
|
||||
|
||||
./mksystem.bash <config_file>
|
||||
|
||||
Archives
|
||||
========
|
||||
|
||||
After the system is compiled you can create archives for distributing,
|
||||
developing or upgrading existing installations.
|
||||
|
||||
Toolchain Archive
|
||||
-----------------
|
||||
|
||||
To create a package containing all the necessary tools to
|
||||
cross-compile C/C++ programs for you target system, issue the
|
||||
following command:
|
||||
|
||||
./pktoolchain.bash <config_file>
|
||||
|
||||
Root Filesystem Archive
|
||||
-----------------------
|
||||
|
||||
The root filesystem archive contains all files necessary to run a
|
||||
GLUED system. It allows you to upgrade existing GLUED systems and
|
||||
initialize storage devices. To create a root filesystem archive, issue
|
||||
the following command:
|
||||
|
||||
./pkrootfs.bash <config_file>
|
||||
|
||||
Initializing Storage Devices
|
||||
============================
|
||||
|
||||
Initializing storage devices for GLUED involves:
|
||||
|
||||
* Partitioning the storage device
|
||||
* Creating filesystems
|
||||
* Populating filesystems
|
||||
* Installing a bootloader if applicable
|
||||
|
||||
To perform all of the previous steps, you must first identify the
|
||||
target block device file and then issue the following command (as
|
||||
root):
|
||||
|
||||
./mkmaster.bash <config_file> <block_device>
|
||||
|
||||
Example
|
||||
=======
|
||||
|
||||
Building GLUED for the system LAUV Seacon 1 and initializing a compact
|
||||
flash card with the block device file /dev/sdd:
|
||||
|
||||
./mkconfig.bash lauv-seacon-1 &&
|
||||
./mksystem.bash lctr-a6xx/lauv-seacon-1.bash &&
|
||||
./pktoolchain.bash lctr-a6xx/lauv-seacon-1.bash &&
|
||||
./pkrootfs.bash lctr-a6xx/lauv-seacon-1.bash &&
|
||||
sudo ./mkmaster.bash lctr-a6xx/lauv-seacon-1.bash /dev/sdd
|
39
doc/Systems.txt
Normal file
39
doc/Systems.txt
Normal file
@ -0,0 +1,39 @@
|
||||
LCTR-A100
|
||||
Gumstix Connex
|
||||
Gumstix NetCF
|
||||
Gumstix Robostix
|
||||
|
||||
LCTR-A101
|
||||
Gumstix Connex
|
||||
Gumstix NetDUO-MMC
|
||||
|
||||
LCTR-A200
|
||||
Eurotech VIPER V2L3
|
||||
|
||||
LCTR-A201
|
||||
Eurotech VIPER V2L4A
|
||||
|
||||
LCTR-A210
|
||||
Eurotech VIPER V2L3
|
||||
Eurotech AIM104-COM8 V1L1
|
||||
Eurotech AIM104MULTI-IO V1L3
|
||||
Kingston CF 8Gb
|
||||
|
||||
LCTR-A220
|
||||
Eurotech VIPER V2L4A
|
||||
Eurotech AIM104-COM8 V1L1
|
||||
Diamond Systems DMM-NA
|
||||
Transcend CF 8Gb
|
||||
|
||||
LCTR-A300
|
||||
Kontron MOPSlcd6 - 01023-0000-27-3
|
||||
|
||||
LCTR-A400
|
||||
IEI PM-LX800-R11-V1.1
|
||||
|
||||
LCTR-A500
|
||||
Ubiquiti RouterStation
|
||||
|
||||
LCRT-A600
|
||||
IEI PM-LX2
|
||||
|
4
doc/qemu-i686.txt
Normal file
4
doc/qemu-i686.txt
Normal file
@ -0,0 +1,4 @@
|
||||
modprobe tun
|
||||
vde_switch -tap tap0 -daemon -mod 660 -group kvm
|
||||
ifconfig tap0 10.0.2.1 netmask 255.255.255.0
|
||||
qemu-system-i386 -enable-kvm -serial telnet:localhost:1200,server -net nic,macaddr=52:54:00:00:EE:03 -net vde -hda disk.img
|
19
functions.bash
Normal file
19
functions.bash
Normal file
@ -0,0 +1,19 @@
|
||||
nfo1()
|
||||
{
|
||||
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] \033[0m\033[1;34m* $*\033[0m"
|
||||
}
|
||||
|
||||
nfo2()
|
||||
{
|
||||
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] \033[0m\033[0;35m** $*\033[0m"
|
||||
}
|
||||
|
||||
ok()
|
||||
{
|
||||
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] \033[0m\033[0;32m** $*\033[0m"
|
||||
}
|
||||
|
||||
err()
|
||||
{
|
||||
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] \033[0m\033[1;31mERROR: $*\033[0m"
|
||||
}
|
33
mkbackup.bash
Executable file
33
mkbackup.bash
Executable file
@ -0,0 +1,33 @@
|
||||
#! /bin/bash
|
||||
|
||||
backupsystem="glued"
|
||||
backupfile=$(date -u "+%F.tar.gz")
|
||||
|
||||
if [ ! -d "$1" ]; then
|
||||
echo " "$1" does not exist... "
|
||||
echo " Usage ./mkbackup.bash \<target folder\>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e "$1/${backupsystem}_backup" ]; then
|
||||
echo " Creating folder... : $1/${backupsystem}_backup "
|
||||
mkdir -p "$1/${backupsystem}_backup"
|
||||
fi
|
||||
|
||||
echo " Backup in progress... ($1/${backupsystem}_backup/${backupfile}) "
|
||||
|
||||
|
||||
if [ ! -e "scripts" ]; then
|
||||
echo " Creating folder scripts... "
|
||||
mkdir "scripts"
|
||||
fi
|
||||
cp *.bash scripts
|
||||
|
||||
tar czf "$1/${backupsystem}_backup/${backupfile}" \
|
||||
architectures \
|
||||
scripts \
|
||||
product \
|
||||
packages \
|
||||
systems
|
||||
|
||||
echo "Done ... "
|
165
mkconfig.bash
Executable file
165
mkconfig.bash
Executable file
@ -0,0 +1,165 @@
|
||||
#! /bin/bash
|
||||
#############################################################################
|
||||
# Copyright (C) 2007-2012 Laboratório de Sistemas e Tecnologia Subaquática #
|
||||
# Departamento de Engenharia Electrotécnica e de Computadores #
|
||||
# Rua Dr. Roberto Frias, 4200-465 Porto, Portugal #
|
||||
#############################################################################
|
||||
# Author: Ricardo Martins #
|
||||
#############################################################################
|
||||
# $Id:: mkconfig.bash 1629 2013-06-30 11:39:30Z rasm $:#
|
||||
#############################################################################
|
||||
|
||||
# Config: GLUED version.
|
||||
cfg_glued_version='1.9.0'
|
||||
# Config: GLUED vendor.
|
||||
cfg_glued_vendor='lsts'
|
||||
|
||||
# Check shell type.
|
||||
if [ -z "$BASH_VERSION" ]; then
|
||||
echo "ERROR: you must use bash to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate command line parameters.
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <system>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if user requested system list.
|
||||
if [ "$1" = "list" ]; then
|
||||
for family in $(ls -1 systems | sort); do
|
||||
echo -e "\n + Family $family"
|
||||
find "systems/$family" -name '*.cfg' | egrep -v "devlinks|linux-[0-9.]*.cfg" | while read s; do
|
||||
echo " - $(basename "$s" .cfg)"
|
||||
done | sort
|
||||
done
|
||||
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check number of CPU cores.
|
||||
if [ -f /proc/cpuinfo ]; then
|
||||
cfg_host_cores="$(grep "processor[^:]:" /proc/cpuinfo | wc -l)"
|
||||
fi
|
||||
|
||||
if [ -z "$cfg_host_cores" ]; then
|
||||
cfg_host_cores=1
|
||||
fi
|
||||
|
||||
# Find system configuration files.
|
||||
if [ -f "systems/"*"/$1.cfg" ]; then
|
||||
system_cfg="$(echo "systems/"*"/$1.cfg")"
|
||||
|
||||
family_cfg="$(dirname $system_cfg)/config"
|
||||
if ! [ -f "$family_cfg" ]; then
|
||||
echo "ERROR: no base configuration available for system '$1'"
|
||||
exit 1
|
||||
fi
|
||||
family_dir="$(dirname $family_cfg)"
|
||||
family_name="$(basename $family_dir)"
|
||||
source "$family_cfg"
|
||||
|
||||
if ! [ -f "$system_cfg" ]; then
|
||||
echo "ERROR: no configuration available for system '$1'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source "$system_cfg"
|
||||
|
||||
fi
|
||||
|
||||
# Read architecture configuration.
|
||||
if ! [ -f "architectures/$cfg_architecture.cfg" ]; then
|
||||
echo "ERROR: configuration for '$1' architecture does not exist"
|
||||
exit 1
|
||||
fi
|
||||
source "architectures/$cfg_architecture.cfg"
|
||||
|
||||
# Creating the mac address if not set in configuration file we create one derivated from the IP address:
|
||||
if [ -n $cfg_eth_ext_ip ]; then
|
||||
ips=(`echo $cfg_eth_ext_ip | sed -e 's/\./\n/g'`)
|
||||
for i in "${ips[@]}"
|
||||
do
|
||||
hip=("${hip[@]}" `printf '%x' $i`)
|
||||
done
|
||||
cfg_eth_ext_mac="80:c1:${hip[0]}:${hip[1]}:${hip[2]}:${hip[3]}"
|
||||
fi
|
||||
|
||||
# Config: system name.
|
||||
if [ -z $cfg_sys_name ]; then
|
||||
cfg_sys_name="$1"
|
||||
fi
|
||||
# Config: system family.
|
||||
cfg_sys_family="$family_name"
|
||||
# Config: GLUED source tree base path.
|
||||
cfg_dir_base="$PWD"
|
||||
# Config: system configuration folder.
|
||||
cfg_dir_system="$cfg_dir_base/$family_dir"
|
||||
# Config: package rules folder.
|
||||
cfg_dir_packages="$cfg_dir_base/packages"
|
||||
# Config: configuration rules folder.
|
||||
cfg_dir_postconfiguration="$cfg_dir_base/postconfiguration"
|
||||
# Config: package sources folder.
|
||||
cfg_dir_downloads="$cfg_dir_base/downloads"
|
||||
# Config: build folder.
|
||||
cfg_dir_builds="$cfg_dir_base/$cfg_sys_family/builds"
|
||||
# Config: toolchain destination folder.
|
||||
cfg_dir_toolchain="$cfg_dir_base/$cfg_sys_family/toolchain"
|
||||
# Config: root filesystem folder.
|
||||
cfg_dir_rootfs="$cfg_dir_base/$cfg_sys_family/rootfs"
|
||||
# Config: system root folder.
|
||||
cfg_dir_toolchain_sysroot="$cfg_dir_toolchain/$cfg_target_canonical/sysroot"
|
||||
# Target prefix:
|
||||
cmd_target_prefix="$cfg_dir_toolchain/bin/$cfg_target_canonical-"
|
||||
# Config: target C compiler executable.
|
||||
cmd_target_cc="$cfg_dir_toolchain/bin/$cfg_target_canonical-gcc"
|
||||
# Config: target C pre-processor executable.
|
||||
cmd_target_cpp="$cfg_dir_toolchain/bin/$cfg_target_canonical-cpp"
|
||||
# Config: target C++ compiler executable.
|
||||
cmd_target_cxx="$cfg_dir_toolchain/bin/$cfg_target_canonical-g++"
|
||||
# Config: target archiver executable.
|
||||
cmd_target_ar="$cfg_dir_toolchain/bin/$cfg_target_canonical-ar"
|
||||
# Config: target linker executable.
|
||||
cmd_target_ld="$cfg_dir_toolchain/bin/$cfg_target_canonical-ld"
|
||||
# Config: target strip executable.
|
||||
cmd_target_strip="$cfg_dir_toolchain/bin/$cfg_target_canonical-strip"
|
||||
# Config: target archive indexer executable.
|
||||
cmd_target_ranlib="$cfg_dir_toolchain/bin/$cfg_target_canonical-ranlib"
|
||||
# Config: host compiler executable.
|
||||
cmd_host_cc="gcc"
|
||||
# Command: strip command.
|
||||
cmd_target_strip="$cmd_target_strip --strip-unneeded"
|
||||
# Command: command to create folders.
|
||||
cmd_mkdir="mkdir -pv"
|
||||
# Command: copy data.
|
||||
cmd_cp="cp -avr"
|
||||
# Command: allow execution.
|
||||
cmd_chmod755="chmod 755"
|
||||
# Config: host canonical name.
|
||||
cfg_host_canonical="$($cmd_host_cc -dumpmachine 2> /dev/null)"
|
||||
# Command: make command with one process.
|
||||
cmd_make_single="make -j1"
|
||||
# Command: make command.
|
||||
cmd_make="make -j$cfg_host_cores"
|
||||
# Config: rootfs tar file.
|
||||
if [ -z $cfg_rootfs_tar ]; then
|
||||
cfg_rootfs_tar="$cfg_dir_base/$cfg_sys_family/glued-$cfg_glued_version-$cfg_sys_name-rootfs.tar.bz2"
|
||||
fi
|
||||
# Config: toolchain tar file.
|
||||
if [ -z $cfg_toolchain_tar ]; then
|
||||
cfg_toolchain_tar="$cfg_dir_base/$cfg_sys_family/glued-$cfg_glued_version-$cfg_sys_family-toolchain-$cfg_host_canonical-$cfg_target_canonical.tar.bz2"
|
||||
fi
|
||||
|
||||
if ! [ -d "$cfg_sys_family" ]; then
|
||||
mkdir -p "$cfg_sys_family"
|
||||
fi &&
|
||||
|
||||
# Save configuration values to file.
|
||||
set \
|
||||
| egrep '^cfg_|^cmd_' \
|
||||
| awk '{print "export " $0}' \
|
||||
> "$cfg_sys_family/$1.bash"
|
||||
|
||||
echo "Configuration file written to '$cfg_sys_family/$1.bash'"
|
241
mkdisk.bash
Executable file
241
mkdisk.bash
Executable file
@ -0,0 +1,241 @@
|
||||
#! /bin/bash
|
||||
#############################################################################
|
||||
# Copyright (C) 2007-2012 Laboratório de Sistemas e Tecnologia Subaquática #
|
||||
# Departamento de Engenharia Electrotécnica e de Computadores #
|
||||
# Rua Dr. Roberto Frias, 4200-465 Porto, Portugal #
|
||||
#############################################################################
|
||||
# Author: Ricardo Martins #
|
||||
#############################################################################
|
||||
# $Id:: $:#
|
||||
#############################################################################
|
||||
|
||||
cmd_parted()
|
||||
{
|
||||
dev="$1"; shift
|
||||
"$cmd_parted" "$dev" -a cylinder -s -- $@
|
||||
}
|
||||
|
||||
cmd_mount()
|
||||
{
|
||||
fs="$1"
|
||||
dev="$2"
|
||||
mkdir -p mount &&
|
||||
mount -t "$fs" "$dev" mount
|
||||
}
|
||||
|
||||
cmd_unmount()
|
||||
{
|
||||
while [ 1 ]; do
|
||||
(umount mount && rmdir mount) > /dev/null 2>&1
|
||||
[ $? -eq 0 ] && break
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
die()
|
||||
{
|
||||
umount mount > /dev/null 2>&1
|
||||
rmdir mount > /dev/null 2>&1
|
||||
[ -n "$dev_loop" ] && losetup -d "$dev_loop"
|
||||
exit 1
|
||||
}
|
||||
|
||||
create_part_xboot()
|
||||
{
|
||||
nfo1 "X-Boot partition ($part_label)"
|
||||
|
||||
nfo2 "Creating partition"
|
||||
cmd_parted "$dev_loop" \
|
||||
mkpart primary fat32 "$part_start" "$part_end" \
|
||||
set "$part_nr" boot on \
|
||||
align-check minimal "$part_nr" \
|
||||
|| die
|
||||
|
||||
nfo2 "Creating filesystem"
|
||||
$cmd_mkdosfs -n "$part_label" "$part_dev" > /dev/null || die
|
||||
|
||||
nfo2 "Populating filesystem"
|
||||
cmd_mount vfat "$part_dev" || die
|
||||
|
||||
for f in MLO u-boot.img uEnv.txt; do
|
||||
if [ -f "$cfg_sys_family/rootfs/boot/$f" ]; then
|
||||
nfo2 installing $f to boot partition
|
||||
cp "$cfg_sys_family/rootfs/boot/$f" mount || die
|
||||
fi
|
||||
done
|
||||
|
||||
cmd_parted "$dev_loop" \
|
||||
set "$part_nr" lba on \
|
||||
|| die
|
||||
|
||||
cmd_parted "$dev_loop" print > /dev/null
|
||||
}
|
||||
|
||||
create_part_root()
|
||||
{
|
||||
nfo1 "Root partition ($part_label)"
|
||||
|
||||
nfo2 "Creating partition"
|
||||
cmd_parted "$dev_loop" \
|
||||
mkpart primary ext2 "$part_start" "$part_end" \
|
||||
align-check minimal "$part_nr" \
|
||||
|| die
|
||||
|
||||
nfo2 "Creating filesystem"
|
||||
mkfs.ext2 -q -L "$part_label" "$part_dev" || die
|
||||
|
||||
nfo2 "Populating filesystem"
|
||||
cmd_mount ext2 "$part_dev" || die
|
||||
tar -C mount -pxf "$cfg_rootfs_tar" || die
|
||||
|
||||
# Install bootloader.
|
||||
if [ -f "$cfg_sys_family/toolchain/bin/extlinux" ]; then
|
||||
nfo2 "Installing extlinux to root partition"
|
||||
"$cfg_sys_family/toolchain/bin/extlinux" -S 63 -H 255 -i mount/boot/extlinux || die
|
||||
fi
|
||||
|
||||
cmd_unmount || die
|
||||
|
||||
# Mark partition bootable if needed.
|
||||
if [ -f "$cfg_sys_family/toolchain/bin/extlinux" ]; then
|
||||
cmd_parted "$dev_loop" \
|
||||
set "$part_nr" boot on \
|
||||
|| die
|
||||
fi
|
||||
}
|
||||
|
||||
create_part_data()
|
||||
{
|
||||
nfo1 "Data partition ($part_label)"
|
||||
|
||||
nfo2 "Creating partition"
|
||||
cmd_parted "$dev_loop" \
|
||||
mkpart primary ext4 "$part_start" "$part_end" \
|
||||
align-check minimal "$part_nr" \
|
||||
|| die
|
||||
|
||||
nfo2 "Creating filesystem"
|
||||
mkfs.ext4 -q -L "$part_label" -O dir_index "$part_dev" || die
|
||||
|
||||
nfo2 "Populating filesystem"
|
||||
cmd_mount ext4 "$part_dev" || die
|
||||
mkdir mount/lsts || die
|
||||
cmd_unmount || die
|
||||
}
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
if [ -z "$BASH_VERSION" ]; then
|
||||
echo "ERROR: you must use bash to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(whoami)" != 'root' ]; then
|
||||
echo "ERROR: you must be root to execute this target."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Usage: $0 <config> <disk> [disk_size]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source "$1"
|
||||
|
||||
if ! [ -f "$cfg_rootfs_tar" ]; then
|
||||
echo "ERROR: you must run pkrootfs.bash first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -x "$cfg_dir_toolchain/sbin/parted" ]; then
|
||||
cmd_parted="$cfg_dir_toolchain/sbin/parted"
|
||||
else
|
||||
echo "Warning: using system parted, this might lead to errors"
|
||||
cmd_parted="parted"
|
||||
fi
|
||||
|
||||
if [ -x "$cfg_dir_toolchain/sbin/mkdosfs" ]; then
|
||||
cmd_mkdosfs="$cfg_dir_toolchain/sbin/mkdosfs"
|
||||
else
|
||||
echo "Warning: using system mkdosfs, this might lead to errors"
|
||||
cmd_mkdosfs="mkdosfs"
|
||||
fi
|
||||
|
||||
source "functions.bash"
|
||||
|
||||
dev="$2"
|
||||
|
||||
# unmounting partitions on target device
|
||||
mounted_partition=$(mount | grep $dev | cut -f1 -d " ");
|
||||
if [ ${#mounted_partition} -gt 0 ]; then
|
||||
echo "Warning: some partitions of $hd_dev are mounted:"
|
||||
for p in ${mounted_partition};
|
||||
do
|
||||
echo " unmounting $p";
|
||||
umount $p;
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -z "$cfg_partitions" ]; then
|
||||
cfg_partitions=( \
|
||||
'root' 'root0' '512B' '532MiB'
|
||||
'data' 'data0' '532MiB' '-1'
|
||||
)
|
||||
fi
|
||||
|
||||
# Loop device.
|
||||
dev_loop="$(losetup -f)"
|
||||
|
||||
nfo1 "Attaching $dev to $dev_loop"
|
||||
losetup -v "$dev_loop" "$dev"
|
||||
if [ $? -ne 0 ]; then
|
||||
unset dev_loop
|
||||
die
|
||||
fi
|
||||
|
||||
nfo1 "Obliterating partition table"
|
||||
dd if=/dev/zero of="$dev_loop" bs=1 count=1M count=32 > /dev/null 2>&1 || die
|
||||
|
||||
nfo1 "Creating empty partition table"
|
||||
cmd_parted "$dev_loop" \
|
||||
mklabel msdos \
|
||||
|| die
|
||||
|
||||
part_nr=1
|
||||
for ((i = 0; i < ${#cfg_partitions[@]}; i += 4)); do
|
||||
part_type="${cfg_partitions[$i+0]}"
|
||||
part_label="${cfg_partitions[$i+1]}"
|
||||
part_start="${cfg_partitions[$i+2]}"
|
||||
part_end="${cfg_partitions[$i+3]}"
|
||||
part_dev="${dev_loop}p${part_nr}"
|
||||
|
||||
case $part_type in
|
||||
'x-boot')
|
||||
create_part_xboot
|
||||
;;
|
||||
'root')
|
||||
create_part_root
|
||||
;;
|
||||
'data')
|
||||
create_part_data
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: unknown partition type '$part_type'"
|
||||
die
|
||||
;;
|
||||
esac
|
||||
|
||||
let part_nr++
|
||||
done
|
||||
|
||||
if [ -f "$cfg_sys_family/rootfs/boot/extlinux/mbr.bin" ]; then
|
||||
nfo1 "Installing bootloader in MBR..."
|
||||
dd if="$cfg_sys_family/rootfs/boot/extlinux/mbr.bin" of="$dev_loop" > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
nfo1 "Synchronizing caches"
|
||||
sync && sync && sync && sync && sync && sync
|
||||
blockdev --flushbufs "$dev_loop" || die
|
||||
|
||||
nfo1 "Detaching loop device $dev_loop"
|
||||
losetup -v -d "$dev_loop"
|
175
mkmaster.bash
Executable file
175
mkmaster.bash
Executable file
@ -0,0 +1,175 @@
|
||||
#! /bin/bash
|
||||
#############################################################################
|
||||
# Copyright (C) 2007-2012 Laboratório de Sistemas e Tecnologia Subaquática #
|
||||
# Departamento de Engenharia Electrotécnica e de Computadores #
|
||||
# Rua Dr. Roberto Frias, 4200-465 Porto, Portugal #
|
||||
#############################################################################
|
||||
# Author: Ricardo Martins #
|
||||
#############################################################################
|
||||
# $Id:: mkmaster.bash 1370 2012-12-18 08:50:49Z rasm $:#
|
||||
#############################################################################
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
if [ -z "$BASH_VERSION" ]; then
|
||||
echo "ERROR: you must use bash to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(whoami)" != 'root' ]; then
|
||||
echo "ERROR: you must be root to execute this target."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Usage: $0 <config> <disk> [disk_size]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source "$1"
|
||||
|
||||
if ! [ -f "$cfg_rootfs_tar" ]; then
|
||||
echo "ERROR: you must run pkrootfs.bash first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
hd_dev="$2"
|
||||
hd_size="$3"
|
||||
hd_sects=63
|
||||
hd_heads=255
|
||||
hd_sectorsize=512
|
||||
fs1_blocksize=1024
|
||||
fs2_blocksize=4096
|
||||
log="master.log"
|
||||
|
||||
if [ ! -e "$cfg_sys_family" ]; then
|
||||
echo "ERROR: $cfg_sys_family system does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
detach()
|
||||
{
|
||||
dev="$1"
|
||||
|
||||
while [ 1 ]; do
|
||||
losetup -vd "$dev" >> "$log" 2>&1
|
||||
str="$(losetup -a 2>&1 | grep "$dev")"
|
||||
if [ -z "$str" ]; then
|
||||
echo "* Detached"
|
||||
break
|
||||
fi
|
||||
echo "* Detaching..."
|
||||
sync; sync; sync; sync
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
if [ -x "$cfg_sys_family/toolchain/sbin/fdisk" ]; then
|
||||
fdisk="$cfg_sys_family/toolchain/sbin/fdisk"
|
||||
else
|
||||
echo "Warning: using system fdisk, this might lead to errors"
|
||||
fdisk="fdisk"
|
||||
fi
|
||||
|
||||
echo "* Starting..." > "$log"
|
||||
|
||||
if [ -b "$hd_dev" ]; then
|
||||
hd_size=$($fdisk -l $hd_dev | grep ^Disk | head -n 1 | cut -f2 -d, | cut -f2 -d' ')
|
||||
else
|
||||
if [ -z "$hd_size" ]; then
|
||||
echo "ERROR: disk_size is a mandatory argument for creating disk images."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dd if=/dev/zero of="$hd_dev" bs=1 count=0 seek=$hd_size >> "$log" 2>&1
|
||||
fi
|
||||
|
||||
# Compute number of cylinders.
|
||||
hd_cyls=$[$hd_size/($hd_sectorsize*$hd_heads*$hd_sects)]
|
||||
|
||||
echo "* Searching for available loop device..."
|
||||
hd_loop=$(losetup -f)
|
||||
|
||||
echo "* Attaching target device/image to loop device $hd_loop..."
|
||||
losetup -v $hd_loop "$hd_dev" >> "$log" 2>&1
|
||||
|
||||
fdisk_args="-b $hd_sectorsize -C $hd_cyls -H $hd_heads -S $hd_sects $hd_loop"
|
||||
|
||||
echo "* Erasing first sectors."
|
||||
dd if=/dev/zero of="$hd_loop" bs=1M count=32 >> "$log" 2>&1
|
||||
|
||||
echo "* Creating empty partition table."
|
||||
(echo "o"; echo "w") | $fdisk $fdisk_args >> "$log" 2>&1
|
||||
|
||||
echo "* Creating root0 partition."
|
||||
(echo "n"; echo "p"; echo "1"; echo ""; echo "+1024M"; echo "w") \
|
||||
| $fdisk $fdisk_args >> "$log" 2>&1
|
||||
|
||||
echo "* Marking root0 partition as bootable..."
|
||||
(echo "a"; echo "1"; echo "w") \
|
||||
| $fdisk $fdisk_args >> "$log" 2>&1
|
||||
|
||||
echo "* Creating data0 partition."
|
||||
(echo "n"; echo "p"; echo "2"; echo ""; echo ""; echo "w") \
|
||||
| $fdisk $fdisk_args >> "$log" 2>&1
|
||||
|
||||
hd1_start=$($fdisk -u -l $fdisk_args | grep "$hd_loop"p1 | awk '{print $3}')
|
||||
hd1_end=$($fdisk -u -l $fdisk_args | grep "$hd_loop"p1 | awk '{print $4}')
|
||||
hd2_start=$($fdisk -u -l $fdisk_args | grep "$hd_loop"p2 | awk '{print $2}')
|
||||
hd2_end=$($fdisk -u -l $fdisk_args | grep "$hd_loop"p2 | awk '{print $3}')
|
||||
hd1_offs=$[$hd1_start*$hd_sectorsize]
|
||||
hd2_offs=$[$hd2_start*$hd_sectorsize]
|
||||
hd1_size=$[($hd1_end*$hd_sectorsize)-$hd1_offs]
|
||||
hd2_size=$[($hd2_end*$hd_sectorsize)-$hd2_offs]
|
||||
fs1_blocks=$[$hd1_size/$fs1_blocksize]
|
||||
fs2_blocks=$[$hd2_size/$fs2_blocksize]
|
||||
|
||||
# Create root0
|
||||
echo "* Searching for available loop devices..."
|
||||
hd1_loop=$(losetup -f)
|
||||
|
||||
echo "* Attaching root0 partition to loop device $hd1_loop..."
|
||||
losetup -vo "$hd1_offs" "$hd1_loop" "$hd_dev" >> "$log" 2>&1
|
||||
|
||||
echo "* Creating root0 filesystem..."
|
||||
mkfs.ext2 -b $fs1_blocksize -L root0 "$hd1_loop" "$fs1_blocks" >> "$log" 2>&1
|
||||
tune2fs -c 0 "$hd1_loop" >> "$log" 2>&1
|
||||
|
||||
echo "* Populating root filesystem..."
|
||||
mkdir -p mount && mount -t ext2 "$hd1_loop" mount &&
|
||||
tar -C mount -pxf $cfg_sys_family/glued-*-$cfg_sys_name-rootfs.tar.bz2 &&
|
||||
if [ -f "$cfg_sys_family/toolchain/bin/extlinux" ]; then
|
||||
echo "* Installing bootloader in root partition..."
|
||||
"$cfg_sys_family/toolchain/bin/extlinux" -S $hd_sects -H $hd_heads -i mount/boot/extlinux >> "$log" 2>&1
|
||||
fi
|
||||
|
||||
while [ 1 ]; do
|
||||
umount mount && rmdir mount && break
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "* Detaching root0 partition from loop device $hd1_loop..."
|
||||
detach "$hd1_loop"
|
||||
|
||||
# Create data0
|
||||
echo "* Searching for available loop devices..."
|
||||
hd2_loop=$(losetup -f)
|
||||
|
||||
echo "* Attaching data partition to loop device $hd2_loop..."
|
||||
losetup -vo "$hd2_offs" "$hd2_loop" "$hd_dev" >> "$log" 2>&1
|
||||
|
||||
echo "* Creating data filesystem..."
|
||||
mkfs.ext4 -b $fs2_blocksize -O sparse_super,dir_index -L data0 "$hd2_loop" "$fs2_blocks" >> "$log" 2>&1
|
||||
mkdir mount && mount -t ext4 "$hd2_loop" mount && mkdir -p mount/lsts/{glued,dune} && umount mount && rmdir mount
|
||||
blockdev --flushbufs "$hd2_loop"
|
||||
|
||||
echo "* Detaching data partition from loop device $hd2_loop..."
|
||||
detach "$hd2_loop"
|
||||
|
||||
if [ -f "$cfg_sys_family/rootfs/boot/extlinux/mbr.bin" ]; then
|
||||
echo "* Installing bootloader in MBR..."
|
||||
dd if="$cfg_sys_family/rootfs/boot/extlinux/mbr.bin" of=$hd_loop >> "$log" 2>&1
|
||||
fi
|
||||
|
||||
echo "* Detaching disk/image from loop device $hd_loop..."
|
||||
detach $hd_loop
|
37
mknfs.bash
Executable file
37
mknfs.bash
Executable file
@ -0,0 +1,37 @@
|
||||
#! /bin/bash
|
||||
#############################################################################
|
||||
# $Id:: Helps deploying an archive to a folder in an easy way. $:#
|
||||
#############################################################################
|
||||
|
||||
# Check shell type.
|
||||
if [ -z "$BASH_VERSION" ]; then
|
||||
echo "ERROR: you must use bash to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <config>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [ -f "$1" ]; then
|
||||
echo "ERROR: configuration file '$1' does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source "$1"
|
||||
|
||||
# Creating a new folder:
|
||||
target="${cfg_dir_base}/nfs/${cfg_hostname}"
|
||||
sudo rm -rf ${target}
|
||||
mkdir -p ${target}
|
||||
|
||||
# Copy the content of the file to our NFS folder:
|
||||
sudo tar -pxf ${cfg_rootfs_tar} -C ${target}
|
||||
|
||||
# We want our resolve file and host file:
|
||||
sudo rm "${target}/etc/resolv.conf"
|
||||
sudo cp "/etc/resolv.conf" "${target}/etc/resolv.conf"
|
||||
sudo rm "${target}/etc/hosts"
|
||||
sudo cp "/etc/hosts" "${target}/etc/hosts"
|
||||
|
321
mkpackage.bash
Executable file
321
mkpackage.bash
Executable file
@ -0,0 +1,321 @@
|
||||
#! /bin/bash
|
||||
#############################################################################
|
||||
# Copyright (C) 2007-2012 Laboratório de Sistemas e Tecnologia Subaquática #
|
||||
# Departamento de Engenharia Electrotécnica e de Computadores #
|
||||
# Rua Dr. Roberto Frias, 4200-465 Porto, Portugal #
|
||||
#############################################################################
|
||||
# Author: Ricardo Martins #
|
||||
#############################################################################
|
||||
# $Id:: mkpackage.bash 1408 2013-02-06 14:10:34Z nurc $:#
|
||||
#############################################################################
|
||||
|
||||
source "functions.bash"
|
||||
|
||||
download_tool()
|
||||
{
|
||||
wget -c "$1" -O "$2"
|
||||
if [ $? -eq 0 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
curl -C - "$1" -o "$2"
|
||||
if [ $? -eq 0 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
md5sum_tool()
|
||||
{
|
||||
sum="$(md5sum < "$cfg_dir_downloads/$file" 2> /dev/null | cut -f1 -d' ')"
|
||||
|
||||
if [ -n "$sum" ]; then
|
||||
echo "$sum"
|
||||
fi
|
||||
|
||||
sum="$(md5 < "$cfg_dir_downloads/$file" 2> /dev/null)"
|
||||
if [ -n "$sum" ]; then
|
||||
echo "$sum"
|
||||
fi
|
||||
}
|
||||
|
||||
download()
|
||||
{
|
||||
n=0; while [ -n "${url[$n]}" ]; do
|
||||
u="${url[$n]}"
|
||||
s="${md5[$n]}"
|
||||
file=$(basename "$u")
|
||||
|
||||
if [ -f "$cfg_dir_downloads/$file" ]; then
|
||||
md5=$(md5sum_tool "$cfg_dir_downloads/$file")
|
||||
|
||||
if [ "$s" = "$md5" ]; then
|
||||
let n++
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
download_tool "$u" "$cfg_dir_downloads/$file"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: download failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
md5="$(md5sum_tool "$cfg_dir_downloads/$file")"
|
||||
if [ "$s" != "$md5" ]; then
|
||||
echo "ERROR: MD5 checksum mismatch: $s vs $md5"
|
||||
return 1
|
||||
fi
|
||||
|
||||
let n++
|
||||
done
|
||||
|
||||
n=0; while [ -n "${svn[$n]}" ]; do
|
||||
u="$(echo ${svn[$n]} | cut -f1 -d'#')"
|
||||
r="$(echo ${svn[$n]} | cut -f2 -d'#')"
|
||||
dir=$(basename $u)
|
||||
|
||||
svn export -r "$r" "$u" "$cfg_dir_downloads/$dir"
|
||||
let n++
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
echo "using dummy 'post_unpack' hook."
|
||||
}
|
||||
|
||||
unpack()
|
||||
{
|
||||
n=0; while [ -n "${url[$n]}" ]; do
|
||||
u="${url[$n]}"
|
||||
s="${md5[$n]}"
|
||||
file=$(basename "$u")
|
||||
|
||||
case $file in
|
||||
*tar*|*tgz|*tbz*)
|
||||
tar -C "$cfg_dir_builds/$PKG" -x -f "$cfg_dir_downloads/$file" || exit 1
|
||||
;;
|
||||
*zip)
|
||||
unzip "$cfg_dir_downloads/$file" -d "$cfg_dir_builds/$PKG" || exit 1
|
||||
;;
|
||||
*)
|
||||
echo "File $file can't be handled."
|
||||
;;
|
||||
esac
|
||||
let n++
|
||||
done
|
||||
|
||||
find "$cfg_dir_builds/$PKG" -name config.sub -exec install -v -m 0755 "$cfg_dir_downloads"/config.sub '{}' \;
|
||||
find "$cfg_dir_builds/$PKG" -name config.guess -exec install -v -m 0755 "$cfg_dir_downloads"/config.guess '{}' \;
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
refresh()
|
||||
{
|
||||
echo "Using dummy 'refresh' rule."
|
||||
}
|
||||
|
||||
configure()
|
||||
{
|
||||
echo "Using dummy 'configure' rule."
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
echo "Using dummy 'build' rule."
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
echo "Using dummy 'host_install' rule."
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
echo "Using dummy 'target_install' rule."
|
||||
}
|
||||
|
||||
postconfigure()
|
||||
{
|
||||
echo "Using dummy 'postconfigure' rule."
|
||||
}
|
||||
|
||||
perform_clean()
|
||||
{
|
||||
rm -rf "$cfg_dir_builds/$PKG/$PKG_VAR"
|
||||
}
|
||||
|
||||
perform_all()
|
||||
{
|
||||
start="$(date +%s)"
|
||||
nfo1 "$PKG / $PKG_VAR"
|
||||
|
||||
export pkg_build_dir="$cfg_dir_builds/$PKG/$PKG_VAR"
|
||||
|
||||
for rule in download unpack post_unpack refresh configure build host_install target_install postconfigure; do
|
||||
case $rule in
|
||||
download | unpack | post_unpack)
|
||||
marker="$cfg_dir_builds/$PKG/.$rule"
|
||||
;;
|
||||
*)
|
||||
marker="$cfg_dir_builds/$PKG/$PKG_VAR/.$rule"
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir -p "$cfg_dir_builds/$PKG/$PKG_VAR" && cd "$cfg_dir_builds/$PKG/$PKG_VAR"
|
||||
|
||||
if [ -z "$build_dir" ]; then
|
||||
build_dir="$PKG-$version"
|
||||
fi
|
||||
|
||||
if [ -n "$build_dir" ]; then
|
||||
mkdir -p "$cfg_dir_builds/$PKG/$build_dir" && cd "$cfg_dir_builds/$PKG/$build_dir"
|
||||
fi
|
||||
|
||||
if [ -n "$build_always" ] || [ "$rule" = 'refresh' ]; then
|
||||
nfo2 "$rule"
|
||||
$rule > "$cfg_dir_builds/$PKG/$PKG_VAR/$rule.log" 2>&1
|
||||
else
|
||||
if ! [ -f "$marker" ]; then
|
||||
nfo2 "$rule"
|
||||
$rule > "$cfg_dir_builds/$PKG/$PKG_VAR/$rule.log" 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
touch "$marker"
|
||||
else
|
||||
err "failed to execute rule $rule of $PKG / $PKG_VAR"
|
||||
tail "$cfg_dir_builds/$PKG/$PKG_VAR/$rule.log"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
elapsed=$[ $(date +%s)-$start ]
|
||||
ok "completed in ${elapsed}s"
|
||||
touch "$cfg_dir_builds/$PKG/$PKG_VAR/.complete"
|
||||
}
|
||||
|
||||
# Check shell.
|
||||
if [ -z "$BASH_VERSION" ]; then
|
||||
echo "ERROR: you must use bash to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check command line arguments.
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Usage: $0 <config> <package> [all|clean|download|unpack|configure|build|install]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Read system configuration file.
|
||||
if ! [ -f "$1" ]; then
|
||||
echo "ERROR: invalid configuration file '$1'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Read system configuration file.
|
||||
source "$1"
|
||||
|
||||
# Unset variables that may be a problem to this script.
|
||||
unset LD_LIBRARY_PATH
|
||||
unset CFLAGS
|
||||
unset LDFLAGS
|
||||
unset CXXFLAGS
|
||||
export PKG_CONFIG_PATH="$cfg_dir_toolchain_sysroot/usr/lib/pkgconfig"
|
||||
export LD_LIBRARY_PATH="$cfg_dir_toolchain/lib"
|
||||
|
||||
# Sanitize PATH.
|
||||
paths="$(echo $PATH | sed 's%/\{1,\}%/%g')"
|
||||
clean_path=""
|
||||
while [ -n "$paths" ]; do
|
||||
path=$(echo "$paths" | cut -f1 -d:)
|
||||
paths=$(echo "$paths" | cut -f2- -d:)
|
||||
|
||||
if [ "$path" = "$paths" ]; then
|
||||
paths=""
|
||||
fi
|
||||
|
||||
if [ "$path" = "" ] || [ "$path" = "." ] || [ "$path" = "./" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ "$path" = "$cfg_dir_toolchain/$cfg_target_canonical/bin" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ "$path" = "$cfg_sys_family/toolchain/$cfg_target_canonical/bin" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
clean_path="$clean_path:$path"
|
||||
done
|
||||
|
||||
export PATH="$cfg_dir_toolchain/bin$clean_path"
|
||||
|
||||
pkg="$(echo $2 | cut -f1 -d'/')"
|
||||
pkg_var="$(echo $2 | cut -f2 -d'/')"
|
||||
|
||||
if [ "$pkg_var" = "$pkg" ]; then
|
||||
pkg_var='default'
|
||||
fi
|
||||
|
||||
export PKG="$pkg"
|
||||
export PKG_VAR="$pkg_var"
|
||||
export PKG_COMMON="$cfg_dir_packages/$PKG/common.bash"
|
||||
|
||||
if ! [ -d "$cfg_dir_packages/$PKG" ]; then
|
||||
echo "ERROR: package '$PKG' does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [ -f "$cfg_dir_packages/$PKG/$PKG_VAR.bash" ]; then
|
||||
echo "ERROR: variant '$PKG_VAR' of package '$PKG' does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$3" ]; then
|
||||
rule="all"
|
||||
else
|
||||
rule="$3"
|
||||
fi
|
||||
|
||||
mkdir -p "$cfg_dir_downloads" "$cfg_dir_rootfs" "$cfg_dir_toolchain" "$cfg_dir_builds/$PKG"
|
||||
|
||||
export cfg_package_spec_dir="$cfg_dir_base/packages/$PKG"
|
||||
|
||||
. "$cfg_dir_packages/$PKG/$PKG_VAR.bash"
|
||||
|
||||
# Postconfiguration:
|
||||
if [ -e "$cfg_dir_postconfiguration/$PKG/$cfg_sys_name.bash" ]; then
|
||||
# echo "ERROR: postconfiguration exists '$PKG'."
|
||||
# echo "$cfg_dir_postconfiguration/$PKG/$cfg_sys_name.bash"
|
||||
# exit 1
|
||||
. "$cfg_dir_postconfiguration/$PKG/$cfg_sys_name.bash"
|
||||
fi
|
||||
|
||||
# Handle dependencies.
|
||||
n=0; while [ -n "${requires[$n]}" ]; do
|
||||
req="${requires[$n]}"
|
||||
let n++
|
||||
|
||||
if [ -z "$req" ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
if [ -f "$cfg_dir_builds/$req/.complete" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
"$0" "$1" "$req"
|
||||
if [ $? -ne 0 ]; then
|
||||
err "failed to build dependecy for package $PKG / $PKG_VAR"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
perform_"$rule"
|
39
mksystem.bash
Executable file
39
mksystem.bash
Executable file
@ -0,0 +1,39 @@
|
||||
#! /bin/bash
|
||||
#############################################################################
|
||||
# Copyright (C) 2007-2012 Laboratório de Sistemas e Tecnologia Subaquática #
|
||||
# Departamento de Engenharia Electrotécnica e de Computadores #
|
||||
# Rua Dr. Roberto Frias, 4200-465 Porto, Portugal #
|
||||
#############################################################################
|
||||
# Author: Ricardo Martins #
|
||||
#############################################################################
|
||||
# $Id:: mksystem.bash 1152 2012-09-14 02:06:10Z rasm $:#
|
||||
#############################################################################
|
||||
|
||||
# Check shell type.
|
||||
if [ -z "$BASH_VERSION" ]; then
|
||||
echo "ERROR: you must use bash to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <config>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [ -f "$1" ]; then
|
||||
echo "ERROR: configuration file '$1' does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source "$1"
|
||||
|
||||
start="$(date +%s)"
|
||||
|
||||
./mkpackage.bash "$1" 'base' || exit 1
|
||||
|
||||
for pkg in $cfg_packages; do
|
||||
./mkpackage.bash "$1" "$pkg" || exit 1
|
||||
done
|
||||
|
||||
elapsed=$[ $(date +%s)-$start ]
|
||||
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] \033[0m\033[1;34mcompleted in ${elapsed}s\033[0m"
|
20
packages/LVM2/common.bash
Normal file
20
packages/LVM2/common.bash
Normal file
@ -0,0 +1,20 @@
|
||||
version=\
|
||||
(
|
||||
"2.02.98"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"ftp://sources.redhat.com/pub/lvm2/LVM2.${version}.tgz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"1ce5b7f9981e1d02dfd1d3857c8d9fbe"
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'util-linux'
|
||||
)
|
||||
|
42
packages/LVM2/default.bash
Normal file
42
packages/LVM2/default.bash
Normal file
@ -0,0 +1,42 @@
|
||||
source $PKG_COMMON
|
||||
|
||||
configure()
|
||||
{
|
||||
cd "../LVM2.${version}"
|
||||
./configure \
|
||||
--prefix="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--build="${cfg_host_canonical}" \
|
||||
--host="${cfg_target_canonical}"
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
cd "../LVM2.${version}"
|
||||
|
||||
export ac_cv_func_malloc_0_nonnull=yes
|
||||
export ac_cv_func_realloc_0_nonnull=yes
|
||||
|
||||
# Configuration is buggy so we have to do this...
|
||||
export CC="$cfg_target_canonical-gcc"
|
||||
export CXX="$cfg_target_canonical-g++"
|
||||
export AR="$cfg_target_canonical-ar"
|
||||
export RANLIB="$cfg_target_canonical-ranlib"
|
||||
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
cd "../LVM2.${version}"
|
||||
sed "s#\$(confdir)/\$(CONFDEST)#${cfg_dir_toolchain_sysroot}\$(confdir)/\$(CONFDEST)#g" "doc/Makefile" -i
|
||||
$cmd_make install
|
||||
}
|
||||
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_mkdir "${cfg_dir_rootfs}/etc/lvm"
|
||||
$cmd_cp "${cfg_dir_toolchain_sysroot}/etc/lvm" "${cfg_dir_rootfs}/etc/lvm"
|
||||
$cmd_cp "${cfg_dir_toolchain_sysroot}/usr/lib/"libdevmapper* "${cfg_dir_rootfs}/usr/lib"
|
||||
# More to be done.
|
||||
}
|
57
packages/alsa-lib/default.bash
Normal file
57
packages/alsa-lib/default.bash
Normal file
@ -0,0 +1,57 @@
|
||||
version=\
|
||||
(
|
||||
"1.0.26"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://alsa.cybermirror.org/lib/alsa-lib-${version}.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"2dfa35d28471d721e592b616beedf965"
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'ncurses/default'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
CC="$cmd_target_cc" ./configure \
|
||||
--prefix="/usr" \
|
||||
--with-configdir="/usr/share/alsa" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--disable-alsatest \
|
||||
--disable-python \
|
||||
--with-debug
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make DESTDIR="$cfg_dir_toolchain_sysroot" install
|
||||
sed "s%/usr/lib%$cfg_dir_toolchain_sysroot/usr/lib%g" "$cfg_dir_toolchain_sysroot/usr/lib/libasound.la" -i
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
cp -av \
|
||||
"$cfg_dir_toolchain_sysroot/usr/lib/alsa-lib" \
|
||||
"$cfg_dir_rootfs/usr/lib" &&
|
||||
|
||||
cp -av \
|
||||
"$cfg_dir_toolchain_sysroot/usr/lib/libasound.so"* \
|
||||
"$cfg_dir_rootfs/usr/lib" &&
|
||||
|
||||
cp -av \
|
||||
"$cfg_dir_toolchain_sysroot/usr/share/alsa" \
|
||||
"$cfg_dir_rootfs/usr/share/"
|
||||
}
|
63
packages/alsa-utils/default.bash
Normal file
63
packages/alsa-utils/default.bash
Normal file
@ -0,0 +1,63 @@
|
||||
version=\
|
||||
(
|
||||
"1.0.26"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://alsa.cybermirror.org/utils/alsa-utils-${version}.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"4dcf1017fafc91603af96705c073eca9"
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'ncurses/default'
|
||||
'alsa-lib/default'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
CC="$cmd_target_cc" ./configure \
|
||||
--prefix="/usr" \
|
||||
--build="${cfg_host_canonical}" \
|
||||
--host="${cfg_target_canonical}" \
|
||||
--disable-alsatest \
|
||||
--disable-alsamixer \
|
||||
--disable-xmlto
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make DESTDIR="$cfg_dir_toolchain_sysroot" install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
cp -avr "${cfg_dir_toolchain_sysroot}/usr/share/alsa/init" "${cfg_dir_rootfs}/usr/share/alsa"
|
||||
|
||||
mkdir -p "${cfg_dir_rootfs}/lib/udev/"
|
||||
cp -avr "${cfg_dir_toolchain_sysroot}/lib/udev/rules.d" "${cfg_dir_rootfs}/lib/udev/rules.d"
|
||||
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/sbin/alsactl" "${cfg_dir_rootfs}/usr/sbin/"
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/bin/alsaloop" "${cfg_dir_rootfs}/usr/bin/"
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/bin/amidi" "${cfg_dir_rootfs}/usr/bin/"
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/bin/amixer" "${cfg_dir_rootfs}/usr/bin/"
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/bin/aplay" "${cfg_dir_rootfs}/usr/bin/"
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/bin/speaker-test" "${cfg_dir_rootfs}/usr/bin/"
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/bin/alsaconf" "${cfg_dir_rootfs}/usr/bin/"
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/bin/alsaucm" "${cfg_dir_rootfs}/usr/bin/"
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/bin/aconnect" "${cfg_dir_rootfs}/usr/bin/"
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/bin/aplaymidi" "${cfg_dir_rootfs}/usr/bin/"
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/bin/aseqdump" "${cfg_dir_rootfs}/usr/bin/"
|
||||
cp -av "${cfg_dir_toolchain_sysroot}/usr/bin/aseqnet" "${cfg_dir_rootfs}/usr/bin/"
|
||||
}
|
||||
|
26
packages/apache-ant/host.bash
Normal file
26
packages/apache-ant/host.bash
Normal file
@ -0,0 +1,26 @@
|
||||
version=\
|
||||
(
|
||||
'1.9.1'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.eu.apache.org/dist/ant/binaries/apache-ant-$version-bin.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'a027cadf06422ebc8367632d93331beb'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
host_install()
|
||||
{
|
||||
cp -a ../apache-ant-$version/lib $cfg_dir_toolchain &&
|
||||
cp -a ../apache-ant-$version/etc $cfg_dir_toolchain &&
|
||||
cp -a ../apache-ant-$version/bin $cfg_dir_toolchain
|
||||
}
|
71
packages/apache-log4cxx/default.bash
Normal file
71
packages/apache-log4cxx/default.bash
Normal file
@ -0,0 +1,71 @@
|
||||
version=\
|
||||
(
|
||||
"0.10.0"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://apache.fis.uniroma2.it/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"b30ffb8da3665178e68940ff7a61084c"
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
"apr/default"
|
||||
"apr-util/default"
|
||||
)
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
patches=$(ls "$cfg_package_spec_dir/patches-$version/"*.patch 2>/dev/null)
|
||||
if [ -n "$patches" ]; then
|
||||
cat $patches | patch -p1
|
||||
fi
|
||||
}
|
||||
|
||||
configure()
|
||||
{
|
||||
./configure \
|
||||
--prefix="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--target=${cfg_target_canonical} \
|
||||
--host=${cfg_target_canonical} \
|
||||
--build=${cfg_host_canonical} \
|
||||
--with-apr="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--with-apr-util="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
ac_cv_file__dev_zero=yes \
|
||||
ac_cv_func_setpgrp_void=yes \
|
||||
apr_cv_tcp_nodelay_with_cork=no \
|
||||
apr_cv_process_shared_works=no \
|
||||
apr_cv_mutex_robust_shared=no \
|
||||
ac_cv_sizeof_struct_iovec=8
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
cd ../log4cpp
|
||||
$cmd_make install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
# Libs:
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/lib/"liblog4cxx*.so*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/lib"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
12
packages/apache-log4cxx/patches-0.10.0/00-patches-gcc4.7-console.cpp.patch
vendored
Normal file
12
packages/apache-log4cxx/patches-0.10.0/00-patches-gcc4.7-console.cpp.patch
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
--- apache-log4cxx-0.10.0/src/examples/cpp/console.cpp 2008-04-01 00:34:52.000000000 +0200
|
||||
+++ apache-log4cxx-0.10.0/src/examples/cpp/console.cpp 2013-04-16 12:59:03.149931476 +0200
|
||||
@@ -15,7 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
+#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include <log4cxx/logger.h>
|
||||
#include <log4cxx/consoleappender.h>
|
||||
#include <log4cxx/simplelayout.h>
|
19
packages/apache-log4cxx/patches-0.10.0/00-patches-gcc4.7-inputstreamreader.cpp.patch
vendored
Normal file
19
packages/apache-log4cxx/patches-0.10.0/00-patches-gcc4.7-inputstreamreader.cpp.patch
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
--- apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp 2008-04-01 00:34:09.000000000 +0200
|
||||
+++ apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp 2013-04-16 12:57:58.153931747 +0200
|
||||
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
+#include <cstring>
|
||||
#include <log4cxx/logstring.h>
|
||||
#include <log4cxx/helpers/inputstreamreader.h>
|
||||
#include <log4cxx/helpers/exception.h>
|
||||
@@ -63,7 +64,7 @@ LogString InputStreamReader::read(Pool&
|
||||
throw IOException(stat);
|
||||
}
|
||||
if (buf.remaining() > 0) {
|
||||
- memmove(buf.data(), buf.current(), buf.remaining());
|
||||
+ std::memmove(buf.data(), buf.current(), buf.remaining());
|
||||
buf.limit(buf.remaining());
|
||||
} else {
|
||||
buf.clear();
|
19
packages/apache-log4cxx/patches-0.10.0/00-patches-gcc4.7-socketoutputstream.cpp.patch
vendored
Normal file
19
packages/apache-log4cxx/patches-0.10.0/00-patches-gcc4.7-socketoutputstream.cpp.patch
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
--- apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp 2008-04-01 00:34:09.000000000 +0200
|
||||
+++ apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp 2013-04-16 12:53:30.646181613 +0200
|
||||
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
+#include <cstring>
|
||||
#include <log4cxx/logstring.h>
|
||||
#include <log4cxx/helpers/socketoutputstream.h>
|
||||
#include <log4cxx/helpers/socket.h>
|
||||
@@ -49,7 +50,7 @@ void SocketOutputStream::write(ByteBuffe
|
||||
if (buf.remaining() > 0) {
|
||||
size_t sz = array.size();
|
||||
array.resize(sz + buf.remaining());
|
||||
- memcpy(&array[sz], buf.current(), buf.remaining());
|
||||
+ std::memcpy(&array[sz], buf.current(), buf.remaining());
|
||||
buf.position(buf.limit());
|
||||
}
|
||||
}
|
65
packages/apr-util/default.bash
Normal file
65
packages/apr-util/default.bash
Normal file
@ -0,0 +1,65 @@
|
||||
version=\
|
||||
(
|
||||
'1.5.2'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.eu.apache.org/dist/apr/apr-util-$version.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'89c1348aa79e898d7c34a6206311c9c2'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'apr/default'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
export ac_cv_file__dev_zero='yes'
|
||||
export ac_cv_func_setpgrp_void='yes'
|
||||
export apr_cv_process_shared_works='yes'
|
||||
export apr_cv_mutex_robust_shared='no'
|
||||
export apr_cv_tcp_nodelay_with_cork='yes'
|
||||
export ac_cv_sizeof_struct_iovec='8'
|
||||
export apr_cv_mutex_recursive='yes'
|
||||
|
||||
"../apr-util-$version/configure" \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--prefix="$cfg_dir_toolchain_sysroot/usr" \
|
||||
--with-apr="$cfg_dir_toolchain_sysroot/usr" \
|
||||
--disable-static
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
# Libs:
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/lib/libaprutil"*".so"*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/lib"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
}
|
64
packages/apr-util/ros.bash
Normal file
64
packages/apr-util/ros.bash
Normal file
@ -0,0 +1,64 @@
|
||||
version=\
|
||||
(
|
||||
'1.3.12'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"ftp://cis.uniroma2.it/unix/packages/APACHE/apr/apr-util-${version}.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'0f671b037ca62751a8a7005578085560'
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'apr/ros'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
cd apr-util-${version}
|
||||
./configure \
|
||||
--prefix="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--target="${cfg_target_canonical}" \
|
||||
--host="${cfg_target_canonical}" \
|
||||
--build="${cfg_host_canonical}" \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--without-pgsql \
|
||||
--without-sqlite2 \
|
||||
--without-sqlite3 \
|
||||
--with-apr="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--with-expat=builtin \
|
||||
ac_cv_file__dev_zero=yes \
|
||||
ac_cv_func_setpgrp_void=yes \
|
||||
apr_cv_tcp_nodelay_with_cork=no \
|
||||
apr_cv_process_shared_works=no \
|
||||
apr_cv_mutex_robust_shared=no \
|
||||
ac_cv_sizeof_struct_iovec=8
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
# Libs: @todo
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/lib/"libaprutil-*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/lib"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
}
|
60
packages/apr/default.bash
Normal file
60
packages/apr/default.bash
Normal file
@ -0,0 +1,60 @@
|
||||
version=\
|
||||
(
|
||||
'1.4.6'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.eu.apache.org/dist/apr/apr-$version.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'ffee70a111fd07372982b0550bbb14b7'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
export ac_cv_file__dev_zero='yes'
|
||||
export ac_cv_func_setpgrp_void='yes'
|
||||
export apr_cv_process_shared_works='yes'
|
||||
export apr_cv_mutex_robust_shared='no'
|
||||
export apr_cv_tcp_nodelay_with_cork='yes'
|
||||
export ac_cv_sizeof_struct_iovec='8'
|
||||
export apr_cv_mutex_recursive='yes'
|
||||
|
||||
"../apr-$version/configure" \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--prefix="$cfg_dir_toolchain_sysroot/usr" \
|
||||
--disable-static
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
# Libs:
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/lib/libapr"*".so"*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/lib"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
58
packages/apr/ros.bash
Normal file
58
packages/apr/ros.bash
Normal file
@ -0,0 +1,58 @@
|
||||
version=\
|
||||
(
|
||||
'1.4.6'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://mirror.nohup.it/apache/apr/apr-$version.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'ffee70a111fd07372982b0550bbb14b7'
|
||||
)
|
||||
|
||||
# @todo patch.
|
||||
|
||||
|
||||
configure()
|
||||
{
|
||||
cd apr-${version}
|
||||
./configure \
|
||||
--prefix="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
ac_cv_file__dev_zero=yes \
|
||||
ac_cv_func_setpgrp_void=yes \
|
||||
apr_cv_tcp_nodelay_with_cork=no \
|
||||
apr_cv_process_shared_works=no \
|
||||
apr_cv_mutex_robust_shared=no \
|
||||
ac_cv_sizeof_struct_iovec=8 \
|
||||
apr_cv_mutex_recursive=yes
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
# Libs: @todo
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/lib/"libapr-*.so*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/lib"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
}
|
40
packages/atk/default.bash
Executable file
40
packages/atk/default.bash
Executable file
@ -0,0 +1,40 @@
|
||||
version=\
|
||||
(
|
||||
'2.9.2'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://ftp.gnome.org/pub/gnome/sources/atk/2.9/atk-$version.tar.xz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'd6de35003815569508bf0a4e3ed598f4'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
export PKG_CONFIG_PATH="$cfg_dir_toolchain_sysroot/usr/lib/pkgconfig"
|
||||
|
||||
"../atk-$version/configure" \
|
||||
--prefix="$cfg_dir_toolchain_sysroot/usr" \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--build="$cfg_host_canonical"
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
40
packages/autoconf/host.bash
Normal file
40
packages/autoconf/host.bash
Normal file
@ -0,0 +1,40 @@
|
||||
version=\
|
||||
(
|
||||
'2.69'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://ftp.gnu.org/gnu/autoconf/autoconf-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"82d05e03b93e45f5a39b828dc9c6c29b"
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
"Ricardo Martins <rasm@fe.up.pt>"
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'm4/host'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
"../autoconf-$version/configure" \
|
||||
--prefix="$cfg_dir_toolchain"
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
39
packages/automake/host.bash
Normal file
39
packages/automake/host.bash
Normal file
@ -0,0 +1,39 @@
|
||||
version=\
|
||||
(
|
||||
'1.11.1'
|
||||
)
|
||||
url=\
|
||||
(
|
||||
"http://ftp.gnu.org/gnu/automake/automake-$version.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'c2972c4d9b3e29c03d5f2af86249876f'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'autoconf/host'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
"../automake-$version/configure" \
|
||||
--prefix="$cfg_dir_toolchain"
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
9
packages/base/common.bash
Normal file
9
packages/base/common.bash
Normal file
@ -0,0 +1,9 @@
|
||||
version=\
|
||||
(
|
||||
'1.0'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
8
packages/base/cross.bash
Normal file
8
packages/base/cross.bash
Normal file
@ -0,0 +1,8 @@
|
||||
source $PKG_COMMON
|
||||
|
||||
requires=\
|
||||
(
|
||||
'base/host'
|
||||
'gcc/cross'
|
||||
'gdb/cross'
|
||||
)
|
8
packages/base/default.bash
Normal file
8
packages/base/default.bash
Normal file
@ -0,0 +1,8 @@
|
||||
source $PKG_COMMON
|
||||
|
||||
requires=\
|
||||
(
|
||||
'base/host'
|
||||
'base/cross'
|
||||
'filesystem/target'
|
||||
)
|
27
packages/base/host.bash
Normal file
27
packages/base/host.bash
Normal file
@ -0,0 +1,27 @@
|
||||
version=\
|
||||
(
|
||||
'1.0'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'bzip2/host'
|
||||
'xz/host'
|
||||
'zip/host'
|
||||
'unzip/host'
|
||||
'patch/host'
|
||||
'fakeroot/host'
|
||||
'pkg-config/host'
|
||||
'util-linux/host'
|
||||
'automake/host'
|
||||
'make/host'
|
||||
'gawk/host'
|
||||
'texinfo/host'
|
||||
'parted/host'
|
||||
'dosfstools/host'
|
||||
)
|
48
packages/binutils/cross.bash
Normal file
48
packages/binutils/cross.bash
Normal file
@ -0,0 +1,48 @@
|
||||
version=\
|
||||
(
|
||||
"2.22"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://mirrors.kernel.org/gnu/binutils/binutils-$version.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"ee0f10756c84979622b992a4a61ea3f5"
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
"Ricardo Martins <rasm@fe.up.pt>"
|
||||
)
|
||||
|
||||
build_dir=$PKG_VAR
|
||||
|
||||
configure()
|
||||
{
|
||||
../binutils-$version/configure $extra_flags \
|
||||
--prefix=$cfg_dir_toolchain \
|
||||
--target=${cfg_target_canonical} \
|
||||
--host=${cfg_host_canonical} \
|
||||
--build=${cfg_host_canonical} \
|
||||
--with-sysroot=$cfg_dir_toolchain_sysroot \
|
||||
--with-mpfr=${cfg_dir_toolchain} \
|
||||
--with-gmp=${cfg_dir_toolchain} \
|
||||
--with-mpc=${cfg_dir_toolchain} \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--disable-multilib
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
rm -rf $cfg_dir_toolchain/{info,man}
|
||||
}
|
37
packages/bison/host.bash
Normal file
37
packages/bison/host.bash
Normal file
@ -0,0 +1,37 @@
|
||||
version=\
|
||||
(
|
||||
'2.5.1'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://ftp.gnu.org/gnu/bison/bison-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'8fedf916f1aa2c4a31441d8f8bbc603c'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
./configure \
|
||||
--prefix="$cfg_dir_toolchain" \
|
||||
--disable-shared \
|
||||
--enable-static
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
93
packages/boost/default.bash
Normal file
93
packages/boost/default.bash
Normal file
@ -0,0 +1,93 @@
|
||||
version=\
|
||||
(
|
||||
"1.53.0"
|
||||
)
|
||||
|
||||
vendor_version="$(echo $version | tr . _)"
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://downloads.sourceforge.net/project/boost/boost/$version/boost_$vendor_version.tar.bz2"
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Jose Pinto <zepinto@fe.up.pt>'
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"a00d22605d5dbcfb4c9936a9b35bc4c2"
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'bzip2/default'
|
||||
)
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
patches=$(ls "$cfg_package_spec_dir/patches-${version}/"*.patch)
|
||||
if [ -n "$patches" ]; then
|
||||
cd "../boost_$vendor_version" && cat $patches | patch -p1
|
||||
fi
|
||||
}
|
||||
|
||||
configure()
|
||||
{
|
||||
cd "../boost_$vendor_version" &&
|
||||
./bootstrap.sh \
|
||||
--with-icu="$cfg_dir_toolchain_sysroot/usr"
|
||||
|
||||
GXX_VER=$(${cmd_target_cxx} -dumpversion)
|
||||
echo "using gcc : ${GXX_VER} : ${cmd_target_cxx} : <cxxflags>\"-pipe -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ${cfg_target_gcc_flags} \" <linkflags>\"\" ;" > user-config.jam
|
||||
echo "" >> user-config.jam
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
cd "../boost_$vendor_version" &&
|
||||
./bjam -d+2 \
|
||||
toolset=gcc \
|
||||
variant=release \
|
||||
link=shared \
|
||||
threading=multi \
|
||||
runtime-link=shared \
|
||||
-sICU_PATH="$cfg_dir_toolchain_sysroot/usr" \
|
||||
--user-config=user-config.jam \
|
||||
--prefix="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--without-python \
|
||||
--layout=tagged
|
||||
}
|
||||
|
||||
|
||||
host_install()
|
||||
{
|
||||
cd "../boost_$vendor_version" &&
|
||||
./bjam -d+2 \
|
||||
toolset=gcc \
|
||||
variant=release \
|
||||
link=shared \
|
||||
threading=multi \
|
||||
runtime-link=shared \
|
||||
-sICU_PATH="$cfg_dir_toolchain_sysroot/usr" \
|
||||
--user-config=user-config.jam \
|
||||
--prefix="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--without-python \
|
||||
--layout=tagged \
|
||||
install
|
||||
|
||||
mkdir -p "${cfg_dir_toolchain_sysroot}/usr/share"
|
||||
cp -rvd "../boost_$vendor_version/boost" \
|
||||
"${cfg_dir_toolchain_sysroot}/usr/share"
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
base="$cfg_dir_toolchain_sysroot/usr/lib"
|
||||
for f in "$base/libboost_"*.so*; do
|
||||
dst="$cfg_dir_rootfs/lib/$(basename "$f")"
|
||||
cp -v -d "$f" "$dst" &&
|
||||
$cmd_target_strip "$dst"
|
||||
done
|
||||
}
|
11
packages/boost/patches-1.47.0/00-issue-with-thread.patch
vendored
Normal file
11
packages/boost/patches-1.47.0/00-issue-with-thread.patch
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
--- boost_1_47_0/boost/config/stdlib/libstdcpp3.hpp 2011-04-25 14:10:48.000000000 +0200
|
||||
+++ boost_1_47_0/boost/config/stdlib/libstdcpp3.hpp 2013-04-08 16:26:05.222543782 +0200
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#ifdef __GLIBCXX__ // gcc 3.4 and greater:
|
||||
# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
|
||||
- || defined(_GLIBCXX__PTHREADS)
|
||||
+ || defined(_GLIBCXX__PTHREADS) || defined(_GLIBCXX_HAS_GTHREADS)
|
||||
//
|
||||
// If the std lib has thread support turned on, then turn it on in Boost
|
||||
// as well. We do this because some gcc-3.4 std lib headers define _REENTANT
|
46
packages/bridge-utils/default.bash
Normal file
46
packages/bridge-utils/default.bash
Normal file
@ -0,0 +1,46 @@
|
||||
version=\
|
||||
(
|
||||
"1.4"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://downloads.sourceforge.net/project/bridge/bridge/bridge-utils-$version/bridge-utils-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"0182fcac3a2b307113bbec34e5f1c673"
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
"Ricardo Martins <rasm@fe.up.pt>"
|
||||
)
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
cd ../bridge-utils-$version && autoreconf
|
||||
}
|
||||
|
||||
configure()
|
||||
{
|
||||
cd ../bridge-utils-$version &&
|
||||
./configure \
|
||||
--prefix="$cfg_dir_rootfs/usr" \
|
||||
--target=$cfg_target_canonical \
|
||||
--host=$cfg_target_canonical \
|
||||
--build=$cfg_host_canonical
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
cd ../bridge-utils-$version &&
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
cd ../bridge-utils-$version &&
|
||||
$cmd_target_strip brctl/brctl -o $cfg_dir_rootfs/usr/bin/brctl
|
||||
}
|
1016
packages/busybox/config
Normal file
1016
packages/busybox/config
Normal file
File diff suppressed because it is too large
Load Diff
40
packages/busybox/default.bash
Normal file
40
packages/busybox/default.bash
Normal file
@ -0,0 +1,40 @@
|
||||
version=\
|
||||
(
|
||||
"1.20.2"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://busybox.net/downloads/busybox-$version.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"e025414bc6cd79579cc7a32a45d3ae1c"
|
||||
)
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
patches=$(ls "$cfg_package_spec_dir"/patches/*.patch)
|
||||
|
||||
if [ -n "$patches" ]; then
|
||||
cat $patches | patch -p1
|
||||
fi
|
||||
}
|
||||
|
||||
configure()
|
||||
{
|
||||
cp "$cfg_package_spec_dir"/config .config &&
|
||||
yes '' | $cmd_make CROSS_COMPILE="$cfg_target_canonical"- oldconfig
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make CROSS_COMPILE="$cfg_target_canonical"-
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_make CROSS_COMPILE="$cfg_target_canonical"- CONFIG_PREFIX=$cfg_dir_rootfs install &&
|
||||
tar -C "$cfg_package_spec_dir/fs" --exclude .svn -c -f - . | tar -C "$cfg_dir_rootfs" -x -v -f -
|
||||
}
|
1
packages/busybox/fs/etc/inetd.conf
Normal file
1
packages/busybox/fs/etc/inetd.conf
Normal file
@ -0,0 +1 @@
|
||||
21 stream tcp nowait root /usr/sbin/ftpd /usr/sbin/ftpd -w /opt/lsts
|
25
packages/bzip2/common.bash
Normal file
25
packages/bzip2/common.bash
Normal file
@ -0,0 +1,25 @@
|
||||
version=\
|
||||
(
|
||||
"1.0.6"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://bzip.org/1.0.6/bzip2-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"00b516f4704d4a7cb50a1d97e6e8e15b"
|
||||
)
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
sed -i 's/CFLAGS=/CFLAGS+=/;' Makefile Makefile-libbz2_so
|
||||
}
|
||||
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
"Ricardo Martins <rasm@fe.up.pt>"
|
||||
)
|
57
packages/bzip2/default.bash
Normal file
57
packages/bzip2/default.bash
Normal file
@ -0,0 +1,57 @@
|
||||
source $PKG_COMMON
|
||||
|
||||
|
||||
configure()
|
||||
{
|
||||
sources_dir=${PWD}
|
||||
${cmd_cp} Makefile Makefile-libbz2_so words* "$pkg_build_dir"
|
||||
cd "$pkg_build_dir" &&
|
||||
sed -i 's!-c \(.*\)*\.c$!-c '${sources_dir}'/\1.c!;s!: \(.*\)\.c$!: '${sources_dir}'/\1.c!;s!shared bzip2.c !shared '${sources_dir}'/bzip2.c !' Makefile Makefile-libbz2_so
|
||||
}
|
||||
|
||||
|
||||
build()
|
||||
{
|
||||
sources_dir=${PWD}
|
||||
cd "$pkg_build_dir"
|
||||
export CFLAGS="${CFLAGS} ${cfg_target_gcc_flags} -fPIC"
|
||||
# Static library.
|
||||
$cmd_make \
|
||||
LD=${cmd_target_ld} \
|
||||
CC=${cmd_target_cc} \
|
||||
AR=${cmd_target_ar} \
|
||||
RANLIB=${cmd_target_ranlib} \
|
||||
libbz2.a &&
|
||||
|
||||
# Shared library.
|
||||
$cmd_make \
|
||||
LD=${cmd_target_ld} \
|
||||
CC=${cmd_target_cc} \
|
||||
AR=${cmd_target_ar} \
|
||||
RANLIB=${cmd_target_ranlib} \
|
||||
-f Makefile-libbz2_so &&
|
||||
ln -fs libbz2.so.$version libbz2.so.1
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
cp bzlib.h "${cfg_dir_toolchain_sysroot}/usr/include" &&
|
||||
chmod a+r "${cfg_dir_toolchain_sysroot}/usr/include/bzlib.h" &&
|
||||
cd "$pkg_build_dir" &&
|
||||
cp libbz2.a "${cfg_dir_toolchain_sysroot}/usr/lib" &&
|
||||
chmod a+r "${cfg_dir_toolchain_sysroot}/usr/lib/libbz2.a" &&
|
||||
cp -d libbz2.so* "${cfg_dir_toolchain_sysroot}/usr/lib" &&
|
||||
chmod a+rx "${cfg_dir_toolchain_sysroot}/usr/lib/libbz2.so"*
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
cd "$pkg_build_dir" &&
|
||||
for f in "${cfg_dir_toolchain_sysroot}/usr/lib/libbz2.so"* ; do
|
||||
dst="$cfg_dir_rootfs/lib/$(basename "$f")"
|
||||
cp -v -d "$f" "$dst" &&
|
||||
$cmd_target_strip "$dst"
|
||||
done
|
||||
|
||||
chmod a+x $cfg_dir_rootfs/lib/libbz2.so*
|
||||
}
|
23
packages/bzip2/host.bash
Normal file
23
packages/bzip2/host.bash
Normal file
@ -0,0 +1,23 @@
|
||||
source $PKG_COMMON
|
||||
|
||||
build()
|
||||
{
|
||||
export CFLAGS="${CFLAGS} -fPIC"
|
||||
# Static library.
|
||||
$cmd_make \
|
||||
bzip2 &&
|
||||
|
||||
# Shared library.
|
||||
$cmd_make \
|
||||
-f Makefile-libbz2_so &&
|
||||
ln -fs libbz2.so.$version libbz2.so.1
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_mkdir "${cfg_dir_toolchain}/include"
|
||||
$cmd_mkdir "${cfg_dir_toolchain}/lib"
|
||||
$cmd_cp libbz2.a "${cfg_dir_toolchain}/lib"
|
||||
$cmd_cp libbz2.so* "${cfg_dir_toolchain}/lib"
|
||||
$cmd_cp bzlib.h "${cfg_dir_toolchain}/include"
|
||||
}
|
62
packages/cairo/default.bash
Normal file
62
packages/cairo/default.bash
Normal file
@ -0,0 +1,62 @@
|
||||
version=\
|
||||
(
|
||||
'1.12.14'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://cairographics.org/releases/cairo-$version.tar.xz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'27b634113d0f52152d60ae8e2ec7daa7'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'libpng/default'
|
||||
'pixman/default'
|
||||
'libxrender/default'
|
||||
'libxext/default'
|
||||
'freetype2/default'
|
||||
'libxft/default'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
export PKG_CONFIG_PATH="$cfg_dir_toolchain_sysroot/usr/lib/pkgconfig"
|
||||
|
||||
"../cairo-$version/configure" \
|
||||
--prefix="$cfg_dir_toolchain_sysroot/usr" \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--build="$cfg_host_canonical"
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
# Libs:
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/lib/"libcairo*.so*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/lib"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
}
|
53
packages/cdk/default.bash
Normal file
53
packages/cdk/default.bash
Normal file
@ -0,0 +1,53 @@
|
||||
version=\
|
||||
(
|
||||
"5.0-20120323"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"ftp://invisible-island.net/cdk/cdk.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"929969d06ce034e862976bb7d1a36b25"
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'ncurses/default'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
# --target="${cfg_target_canonical}" \
|
||||
./configure \
|
||||
--prefix="$cfg_dir_toolchain_sysroot/usr" \
|
||||
--host="${cfg_target_canonical}" \
|
||||
--build="${cfg_host_canonical}" \
|
||||
--target="${cfg_target_canonical}" \
|
||||
--with-ncursesw \
|
||||
--with-shared \
|
||||
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/lib/libcdk"* ; do
|
||||
if [ -L "$f" ]; then
|
||||
cp -av "$f" "$cfg_dir_rootfs/usr/lib"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
}
|
35
packages/cmake/host.bash
Normal file
35
packages/cmake/host.bash
Normal file
@ -0,0 +1,35 @@
|
||||
version=\
|
||||
(
|
||||
"2.8.8"
|
||||
)
|
||||
|
||||
version_major=\
|
||||
(
|
||||
"$(echo $version | cut -d. -f1-2)"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.cmake.org/files/v$version_major/cmake-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"ba74b22c788a0c8547976b880cd02b17"
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
./configure \
|
||||
--prefix="$cfg_dir_toolchain"
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
135
packages/collectd/default.bash
Normal file
135
packages/collectd/default.bash
Normal file
@ -0,0 +1,135 @@
|
||||
version=\
|
||||
(
|
||||
"5.3.0"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://collectd.org/files/collectd-$version.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"1f0eb7b27ada94b22ed881daf788958b"
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
"libpcap/default"
|
||||
"libxml2/default"
|
||||
"curl/default"
|
||||
"perl/default"
|
||||
"ntp/default"
|
||||
"liboping/default"
|
||||
"rrdtool/default"
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
./configure \
|
||||
LIBGCRYPT_CONFIG="$cfg_dir_toolchain_sysroot/usr/bin/libgcrypt-config" \
|
||||
with_perl_bindings=no \
|
||||
--prefix="${cfg_dir_toolchain_sysroot}/usr" \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--with-fp-layout="nothing"
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
# Libs: /usr/lib/
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/lib/"libcollectd*.so*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/lib"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
|
||||
# Libs in collectd folder: /usr/lib/collectd
|
||||
$cmd_mkdir "$cfg_dir_rootfs/usr/lib/collectd"
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/lib/collectd/"*.so*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/lib/collectd"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/collectd/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
|
||||
# /usr/bin:
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/bin/"collectd*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/bin"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/bin/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
|
||||
# /usr/sbin:
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/sbin/"collectd*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/bin"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/bin/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
|
||||
# Collectd:
|
||||
$cmd_mkdir "$cfg_dir_rootfs/usr/share/"
|
||||
$cmd_cp "$cfg_dir_toolchain_sysroot/usr/share/collectd/" "$cfg_dir_rootfs/usr/share/"
|
||||
$cmd_cp "${cfg_package_spec_dir}/fs/etc/rc.d/collectd" "$cfg_dir_rootfs/etc/rc.d/"
|
||||
|
||||
# Configuration:
|
||||
echo "# Client
|
||||
BaseDir \"/opt/lsts/\"
|
||||
PluginDir \"/usr/lib/collectd/\"
|
||||
TypesDB \"/usr/share/collectd/types.db\"
|
||||
|
||||
# Interface:
|
||||
Interval 60
|
||||
ReadThreads 10
|
||||
Hostname \"${cfg_hostname}\"
|
||||
|
||||
# Modules:
|
||||
LoadPlugin \"cpu\"
|
||||
LoadPlugin \"memory\"
|
||||
LoadPlugin \"df\"
|
||||
LoadPlugin \"disk\"
|
||||
LoadPlugin \"load\"
|
||||
LoadPlugin \"processes\"
|
||||
LoadPlugin \"syslog\"
|
||||
LoadPlugin \"tcpconns\"
|
||||
|
||||
# Interface:
|
||||
LoadPlugin interface
|
||||
<Plugin interface>
|
||||
Interface \"eth0\"
|
||||
</Plugin>
|
||||
|
||||
# Client
|
||||
LoadPlugin \"network\"
|
||||
<Plugin \"network\">
|
||||
Server \"192.168.0.60\"
|
||||
</Plugin>
|
||||
|
||||
# Logfile:
|
||||
LoadPlugin \"logfile\"
|
||||
<Plugin \"logfile\">
|
||||
LogLevel \"info\"
|
||||
File \"/opt/lsts/log/collectd/collectd_client.log\"
|
||||
Timestamp true
|
||||
</Plugin>
|
||||
" > "$cfg_dir_rootfs/etc/collectd_client.cfg"
|
||||
}
|
||||
|
48
packages/collectd/fs/etc/rc.d/collectd
Normal file
48
packages/collectd/fs/etc/rc.d/collectd
Normal file
@ -0,0 +1,48 @@
|
||||
# Program options
|
||||
|
||||
NAME=collectd
|
||||
DAEMON=/usr/bin/collectd
|
||||
CONFIG=/etc/collectd_client.cfg
|
||||
|
||||
test -f $DAEMON || exit 5
|
||||
|
||||
start()
|
||||
{
|
||||
pid=$(pidof ${NAME})
|
||||
if [ ! -z "$pid" ]; then
|
||||
echo " Impossible: already running (pid $(pidof ${NAME}))"
|
||||
else
|
||||
# Create log folder:
|
||||
mkdir -p /opt/lsts/log/collectd/
|
||||
|
||||
# Run it
|
||||
$DAEMON -f -C ${CONFIG} &> /dev/null &
|
||||
|
||||
# Sleep a while ...
|
||||
sleep 2
|
||||
|
||||
if [ ! -z "`pidof ${NAME}`" ]; then
|
||||
echo " Starting ${NAME} (PID=$(pidof ${NAME})) [OK]"
|
||||
else
|
||||
echo " Starting ${NAME} [KO]"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
pid=$(pidof ${NAME})
|
||||
|
||||
if [ -z "${pid}" ]; then
|
||||
echo " Impossible: process ${NAME} is not running..."
|
||||
else
|
||||
echo -n " Stopping ${NAME}... "
|
||||
kill ${pid}
|
||||
|
||||
while [ -n "`pidof ${NAME}`" ]; do
|
||||
sleep 1
|
||||
done
|
||||
echo " Done! "
|
||||
fi
|
||||
}
|
||||
|
72
packages/crypto++/default.bash
Normal file
72
packages/crypto++/default.bash
Normal file
@ -0,0 +1,72 @@
|
||||
version=\
|
||||
(
|
||||
"5.6.2"
|
||||
)
|
||||
|
||||
vendor_version=$(echo $version | sed 's/\.//g')
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://downloads.sourceforge.net/project/cryptopp/cryptopp/$version/cryptopp$vendor_version.zip"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"7ed022585698df48e65ce9218f6c6a67"
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
"Ricardo Martins <rasm@fe.up.pt>"
|
||||
)
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
cd ..
|
||||
|
||||
sed "40s/^/#/" GNUmakefile > Makefile
|
||||
sed -i '4s/^# //' Makefile
|
||||
sed -i "147s/^/#/" Makefile
|
||||
sed -i "s,\-march=native,${cfg_target_gcc_flags},g" Makefile
|
||||
mv GNUmakefile GNUmakefile.orig
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make \
|
||||
LD="$cmd_target_ld" \
|
||||
CC="$cmd_target_cc" \
|
||||
CXX="$cmd_target_cxx" \
|
||||
AR="$cmd_target_ar" \
|
||||
RANLIB="$cmd_target_ranlib" \
|
||||
-C .. \
|
||||
libcryptopp.a \
|
||||
libcryptopp.so
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make \
|
||||
LD="$cmd_target_ld" \
|
||||
CC="$cmd_target_cc" \
|
||||
CXX="$cmd_target_cxx" \
|
||||
AR="$cmd_target_ar" \
|
||||
RANLIB="$cmd_target_ranlib" \
|
||||
PREFIX="$cfg_dir_toolchain_sysroot/usr" \
|
||||
-C .. \
|
||||
install &&
|
||||
ln -vfs cryptopp "$cfg_dir_toolchain_sysroot/usr/include/crypto++" &&
|
||||
ln -vfs libcryptopp.so "$cfg_dir_toolchain_sysroot/usr/lib/libcrypto++.so"
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
# Libs:
|
||||
for f in "$cfg_dir_toolchain_sysroot/usr/lib/"libcrypto*.so*; do
|
||||
if [ -L "$f" ]; then
|
||||
$cmd_cp "$f" "$cfg_dir_rootfs/usr/lib"
|
||||
else
|
||||
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
||||
fi
|
||||
done
|
||||
}
|
46
packages/curl/default.bash
Normal file
46
packages/curl/default.bash
Normal file
@ -0,0 +1,46 @@
|
||||
version=\
|
||||
(
|
||||
7.28.0
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
http://curl.haxx.se/download/curl-${version}.tar.bz2
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
7fc605a13d1420b16bd03a2a6b5d7e8e
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
export CC="$cfg_target_canonical-gcc"
|
||||
export CXX="$cfg_target_canonical-g++"
|
||||
export AR="$cfg_target_canonical-ar"
|
||||
export RANLIB="$cfg_target_canonical-ranlib"
|
||||
|
||||
# cd ../curl-$version/
|
||||
./configure \
|
||||
--host="${cfg_target_canonical}" \
|
||||
--build="${cfg_host_canonical}" \
|
||||
--prefix="${cfg_dir_toolchain_sysroot}/usr"
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
for f in "${cfg_dir_toolchain_sysroot}/usr/lib/"libcurl*so*; do
|
||||
echo "Doing $f"
|
||||
$cmd_target_strip "$f" -o "${cfg_dir_rootfs}/lib/$(basename "$f")"
|
||||
done
|
||||
}
|
43
packages/db/default.bash
Normal file
43
packages/db/default.bash
Normal file
@ -0,0 +1,43 @@
|
||||
version=\
|
||||
(
|
||||
"4.8.26"
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"ftp://mirror.ovh.net/gentoo-distfiles/distfiles/db-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
"3476bac9ec0f3c40729c8a404151d5e3"
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
mkdir -p ../build && cd ../build &&
|
||||
../db-$version/dist/configure \
|
||||
--prefix="$cfg_dir_toolchain_sysroot/usr" \
|
||||
--enable-cxx \
|
||||
--target=$cfg_target_canonical \
|
||||
--host=$cfg_target_canonical \
|
||||
--build=$cfg_host_canonical
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make -C ../build
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make -C ../build install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
cp -a "$cfg_dir_toolchain_sysroot/usr/lib/"libdb*so $cfg_dir_rootfs/lib
|
||||
for f in "$cfg_dir_rootfs/lib/"libdb*so; do
|
||||
$cmd_target_strip "$f"
|
||||
done
|
||||
}
|
104
packages/dei80211mr/default.bash
Normal file
104
packages/dei80211mr/default.bash
Normal file
@ -0,0 +1,104 @@
|
||||
version=\
|
||||
(
|
||||
'1.1.4'
|
||||
)
|
||||
|
||||
ns_version=\
|
||||
(
|
||||
'2.34'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.lsts.pt/glued/dei80211mr-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'8ad1adcd02fc41933d6528c093e1c3d9'
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'ns/default'
|
||||
)
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
patches=$(ls "$cfg_package_spec_dir/patches/"*.patch)
|
||||
if [ -n "$patches" ]; then
|
||||
cat $patches | patch -p0
|
||||
fi
|
||||
}
|
||||
|
||||
configure()
|
||||
{
|
||||
prefix="/ns2_lib"
|
||||
|
||||
cd ../dei80211mr-$version/
|
||||
|
||||
make distclean
|
||||
rm -fr autom4te.cache/
|
||||
rm config.*
|
||||
rm missing
|
||||
rm Makefile.in
|
||||
rm install-sh
|
||||
rm depcomp
|
||||
rm configure
|
||||
rm ltmain.sh
|
||||
rm m4/libtool*
|
||||
rm m4/Makefile
|
||||
rm m4/Makefile.in
|
||||
rm aclocal.m4
|
||||
rm m4/lt*
|
||||
|
||||
find . -name "*.o" -exec rm {} \;
|
||||
|
||||
cd -
|
||||
|
||||
/usr/bin/aclocal -I m4 --force && /usr/bin/libtoolize --force && /usr/bin/automake --foreign --add-missing && /usr/bin/autoconf
|
||||
|
||||
sed "s#@TCL2CPP@#qemu-arm -L ${cfg_dir_rootfs} ${cfg_dir_rootfs}/lib/ld-linux.so.3 ${cfg_dir_toolchain_sysroot}/usr/bin/tcl2c++#g" "./m4/Makefile.in" -i
|
||||
|
||||
sed "s#@TCL2CPP@#qemu-arm -L ${cfg_dir_rootfs} ${cfg_dir_rootfs}/lib/ld-linux.so.3 ${cfg_dir_toolchain_sysroot}/usr/bin/tcl2c++#g" "./Makefile.in" -i
|
||||
|
||||
sed "s#@TCL2CPP@#qemu-arm -L ${cfg_dir_rootfs} ${cfg_dir_rootfs}/lib/ld-linux.so.3 ${cfg_dir_toolchain_sysroot}/usr/bin/tcl2c++#g" "./src/Makefile.in" -i
|
||||
|
||||
"../dei80211mr-$version/configure" \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--prefix="$prefix" \
|
||||
--disable-static \
|
||||
--enable-shared \
|
||||
--with-ns-allinone=${cfg_dir_builds}/ns/ \
|
||||
--x-includes=no --x-libraries=no
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
|
||||
$cmd_make -j1
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_mkdir \
|
||||
"$cfg_dir_toolchain_sysroot/ns2/ns2_lib/lib" \
|
||||
"$cfg_dir_toolchain_sysroot/ns2/ns2_lib/share" &&
|
||||
|
||||
$cmd_make \
|
||||
DESTDIR="$cfg_dir_toolchain_sysroot/ns2" \
|
||||
install
|
||||
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_mkdir \
|
||||
"${cfg_dir_rootfs}/usr/ns2/lib/"
|
||||
|
||||
for f in "$cfg_dir_toolchain_sysroot/ns2/ns2_lib/lib/"lib*.so*; do
|
||||
$cmd_target_strip "$f" -o ${cfg_dir_rootfs}/usr/ns2/lib/"$(basename "$f")"
|
||||
done
|
||||
}
|
19
packages/dei80211mr/patches/000-lib.patch
Normal file
19
packages/dei80211mr/patches/000-lib.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- m4/nsallinone.m4 2012-09-21 14:09:26.000000000 +0200
|
||||
+++ m4/nsallinone.m4 2012-09-21 17:08:21.807075643 +0200
|
||||
@@ -49,12 +49,10 @@
|
||||
NS_ALLINONE_PATH=$withval
|
||||
|
||||
NS_PATH=$NS_ALLINONE_PATH/`cd $NS_ALLINONE_PATH; ls -d ns-* | head -n 1`
|
||||
- TCL_PATH=$NS_ALLINONE_PATH/`cd $NS_ALLINONE_PATH; ls -d * | grep -e 'tcl[0-9].*' | head -n 1`
|
||||
- TCLCL_PATH=$NS_ALLINONE_PATH/`cd $NS_ALLINONE_PATH; ls -d tclcl-* | head -n 1`
|
||||
- OTCL_PATH=$NS_ALLINONE_PATH/`cd $NS_ALLINONE_PATH; ls -d otcl-* | head -n 1`
|
||||
-
|
||||
- NS_CPPFLAGS="-I$NS_ALLINONE_PATH/include -I$NS_PATH -I$TCLCL_PATH -I$OTCL_PATH"
|
||||
-
|
||||
+ TCL_PATH="${cfg_dir_builds}/tcl/"`cd "${cfg_dir_builds}/tcl/"; ls -d * | grep -e 'tcl[0-9].*' | head -n 1`
|
||||
+ TCLCL_PATH="${cfg_dir_builds}/tclcl/"`cd "${cfg_dir_builds}/tclcl"; ls -d tclcl-* | head -n 1`
|
||||
+ OTCL_PATH="${cfg_dir_builds}/otcl/"`cd "${cfg_dir_builds}/otcl/"; ls -d otcl-* | head -n 1`
|
||||
+ NS_CPPFLAGS="${cfg_dir_toolchain_sysroot}/usr/include -I$NS_PATH -I$TCLCL_PATH -I$OTCL_PATH"
|
||||
|
||||
NS_ALLINONE_DISTCHECK_CONFIGURE_FLAGS="--with-ns-allinone=$withval"
|
||||
AC_SUBST(NS_ALLINONE_DISTCHECK_CONFIGURE_FLAGS)
|
79
packages/desert/default.bash
Normal file
79
packages/desert/default.bash
Normal file
@ -0,0 +1,79 @@
|
||||
version=\
|
||||
(
|
||||
'1.0'
|
||||
)
|
||||
|
||||
ns_version=\
|
||||
(
|
||||
'2.34'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.lsts.pt/glued/desert-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'5b83d1d6e5390a44f1dc0c5a3794581c'
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'ns-miracle/default'
|
||||
)
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
patches=$(ls "$cfg_package_spec_dir/patches/"*.patch)
|
||||
if [ -n "$patches" ]; then
|
||||
cat $patches | patch -p0
|
||||
fi
|
||||
}
|
||||
|
||||
configure()
|
||||
{
|
||||
find . -name "*.o" -exec rm {} \;
|
||||
/usr/bin/aclocal -I m4 --force && /usr/bin/libtoolize --force && /usr/bin/automake --foreign --add-missing && /usr/bin/autoconf
|
||||
|
||||
prefix="/DESERT_lib"
|
||||
|
||||
sed "s#@TCL2CPP@#qemu-arm -L ${cfg_dir_rootfs} ${cfg_dir_rootfs}/lib/ld-linux.so.3 ${cfg_dir_toolchain_sysroot}/usr/bin/tcl2c++#g" "./m4/Makefile.in" -i
|
||||
sed "s#@TCL2CPP@#qemu-arm -L ${cfg_dir_rootfs} ${cfg_dir_rootfs}/lib/ld-linux.so.3 ${cfg_dir_toolchain_sysroot}/usr/bin/tcl2c++#g" "./Makefile.in" -i
|
||||
|
||||
"./configure" \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--with-ns-allinone=${cfg_dir_builds}/ns/ \
|
||||
--with-nsmiracle=${cfg_dir_builds}/ns-miracle/ns-miracle-1.0/trunk/main/ \
|
||||
--prefix="$prefix"
|
||||
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make -j1 \
|
||||
TCL2CPP="qemu-arm -L ${cfg_dir_rootfs} ${cfg_dir_rootfs}/lib/ld-linux.so.3 ${cfg_dir_toolchain_sysroot}/usr/bin/tcl2c++"
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_mkdir \
|
||||
"$cfg_dir_toolchain_sysroot/ns2/DESERT_lib/lib" &&
|
||||
|
||||
$cmd_make \
|
||||
DESTDIR="$cfg_dir_toolchain_sysroot/ns2/" \
|
||||
install
|
||||
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
cp -r "${cfg_dir_toolchain_sysroot}/ns2/DESERT_lib/lib" "${cfg_dir_rootfs}/usr/ns2/DESERT/"
|
||||
|
||||
for f in "$cfg_dir_toolchain_sysroot/ns2/DESERT_lib/lib/"lib*.so.0.0.0; do
|
||||
$cmd_target_strip "$f" -o ${cfg_dir_rootfs}/usr/ns2/DESERT/"$(basename "$f")"
|
||||
done
|
||||
|
||||
}
|
19
packages/desert/patches/000-lib.patch
Normal file
19
packages/desert/patches/000-lib.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- ./m4/nsallinone.m4 2012-09-21 14:09:26.000000000 +0200
|
||||
+++ ./m4/nsallinone.m4 2012-09-21 17:08:21.807075643 +0200
|
||||
@@ -49,12 +49,10 @@
|
||||
NS_ALLINONE_PATH=$withval
|
||||
|
||||
NS_PATH=$NS_ALLINONE_PATH/`cd $NS_ALLINONE_PATH; ls -d ns-* | head -n 1`
|
||||
- TCL_PATH=$NS_ALLINONE_PATH/`cd $NS_ALLINONE_PATH; ls -d * | grep -e 'tcl[0-9].*' | head -n 1`
|
||||
- TCLCL_PATH=$NS_ALLINONE_PATH/`cd $NS_ALLINONE_PATH; ls -d tclcl-* | head -n 1`
|
||||
- OTCL_PATH=$NS_ALLINONE_PATH/`cd $NS_ALLINONE_PATH; ls -d otcl-* | head -n 1`
|
||||
-
|
||||
- NS_CPPFLAGS="-I$NS_ALLINONE_PATH/include -I$NS_PATH -I$TCLCL_PATH -I$OTCL_PATH"
|
||||
-
|
||||
+ TCL_PATH="${cfg_dir_builds}/tcl/"`cd "${cfg_dir_builds}/tcl/"; ls -d * | grep -e 'tcl[0-9].*' | head -n 1`
|
||||
+ TCLCL_PATH="${cfg_dir_builds}/tclcl/"`cd "${cfg_dir_builds}/tclcl"; ls -d tclcl-* | head -n 1`
|
||||
+ OTCL_PATH="${cfg_dir_builds}/otcl/"`cd "${cfg_dir_builds}/otcl/"; ls -d otcl-* | head -n 1`
|
||||
+ NS_CPPFLAGS="${cfg_dir_toolchain_sysroot}/usr/include -I$NS_PATH -I$TCLCL_PATH -I$OTCL_PATH"
|
||||
|
||||
NS_ALLINONE_DISTCHECK_CONFIGURE_FLAGS="--with-ns-allinone=$withval"
|
||||
AC_SUBST(NS_ALLINONE_DISTCHECK_CONFIGURE_FLAGS)
|
11
packages/desert/patches/001-lib.patch
Normal file
11
packages/desert/patches/001-lib.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- configure.ac 2012-09-27 11:57:58.190424449 +0200
|
||||
+++ configure.ac 2012-09-27 12:03:02.599357310 +0200
|
||||
@@ -42,6 +42,8 @@
|
||||
DESERT_CPPFLAGS="$DESERT_CPPFLAGS "'-I$(top_srcdir)/mobility/uwdriftposition'
|
||||
DESERT_CPPFLAGS="$DESERT_CPPFLAGS "'-I$(top_srcdir)/mobility/uwgmposition'
|
||||
|
||||
+TCL2CPP="qemu-arm -L ${cfg_dir_rootfs} ${cfg_dir_rootfs}/lib/ld-linux.so.3 ${cfg_dir_toolchain_sysroot}/usr/bin/tcl2c++"
|
||||
+
|
||||
AC_SUBST(DESERT_CPPFLAGS)
|
||||
|
||||
AC_SUBST(DESERT_LDFLAGS)
|
30
packages/dnsmasq/default.bash
Normal file
30
packages/dnsmasq/default.bash
Normal file
@ -0,0 +1,30 @@
|
||||
version=\
|
||||
(
|
||||
'2.63'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.thekelleys.org.uk/dnsmasq/dnsmasq-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'43e771997615ebcd8f6c6ffa60c3e40b'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make \
|
||||
CC="$cmd_target_cc"
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_target_strip src/dnsmasq -o "$cfg_dir_rootfs/usr/sbin/dnsmasq"
|
||||
}
|
33
packages/dosfstools/host.bash
Executable file
33
packages/dosfstools/host.bash
Executable file
@ -0,0 +1,33 @@
|
||||
version=\
|
||||
(
|
||||
'3.0.20'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://daniel-baumann.ch/files/software/dosfstools/dosfstools-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'7f1c1afd4ae4622e07b24ec0ddfc4184'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
build()
|
||||
{
|
||||
CC="$cmd_host_cc" \
|
||||
$cmd_make \
|
||||
PREFIX="$cfg_dir_toolchain"
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
CC="$cmd_host_cc" \
|
||||
$cmd_make \
|
||||
PREFIX="$cfg_dir_toolchain" install
|
||||
}
|
66
packages/dropbear/default.bash
Normal file
66
packages/dropbear/default.bash
Normal file
@ -0,0 +1,66 @@
|
||||
version=\
|
||||
(
|
||||
'2012.55'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"https://matt.ucc.asn.au/dropbear/releases/dropbear-$version.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'8c784baec3054cdb1bb4bfa792c87812'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'zlib/default'
|
||||
)
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
patches=$(ls "$cfg_package_spec_dir/patches/"*.patch)
|
||||
if [ -n "$patches" ]; then
|
||||
cat $patches | patch -p1
|
||||
fi
|
||||
}
|
||||
|
||||
configure()
|
||||
{
|
||||
"../dropbear-$version/configure" \
|
||||
--prefix="$cfg_dir_rootfs/usr" \
|
||||
--disable-utmp \
|
||||
--disable-utmpx \
|
||||
--disable-wtmp \
|
||||
--disable-wtmpx \
|
||||
--disable-lastlog \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--with-zlib="$cfg_dir_toolchain"
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make \
|
||||
PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" \
|
||||
MULTI=1
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_target_strip dropbearmulti -o "$cfg_dir_rootfs/usr/bin/dropbearmulti" &&
|
||||
ln -fs dropbearmulti "$cfg_dir_rootfs/usr/bin/dropbearconvert" &&
|
||||
ln -fs dropbearmulti "$cfg_dir_rootfs/usr/bin/dropbearkey" &&
|
||||
ln -fs dropbearmulti "$cfg_dir_rootfs/usr/bin/scp" &&
|
||||
ln -fs dropbearmulti "$cfg_dir_rootfs/usr/bin/ssh" &&
|
||||
ln -fs dropbearmulti "$cfg_dir_rootfs/usr/bin/dbclient" &&
|
||||
ln -fs ../bin/dropbearmulti "$cfg_dir_rootfs/usr/sbin/dropbear" &&
|
||||
tar -C "$cfg_package_spec_dir/fs" --exclude .svn -c -f - . | tar -C "$cfg_dir_rootfs" -x -v -f -
|
||||
}
|
21
packages/dropbear/fs/etc/rc.d/dropbear
Normal file
21
packages/dropbear/fs/etc/rc.d/dropbear
Normal file
@ -0,0 +1,21 @@
|
||||
start()
|
||||
{
|
||||
if [ -x /usr/bin/dropbearmulti ]; then
|
||||
if ! [ -f /etc/dropbear/dropbear_rsa_host_key ]; then
|
||||
mount -o remount,rw /
|
||||
dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
|
||||
mount -o remount,ro /
|
||||
fi
|
||||
|
||||
if ! [ -f /etc/dropbear/dropbear_dss_host_key ]; then
|
||||
mount -o remount,rw /
|
||||
dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
|
||||
mount -o remount,ro /
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
echo ""
|
||||
}
|
30
packages/dropbear/patches/000-cryptlib-link.patch
Normal file
30
packages/dropbear/patches/000-cryptlib-link.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index cec35f1..46a9365 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -56,7 +56,7 @@ HEADERS=options.h dbutil.h session.h packet.h algo.h ssh.h buffer.h kex.h \
|
||||
loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd.h compat.h \
|
||||
listener.h fake-rfc2553.h
|
||||
|
||||
-dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS) @CRYPTLIB@
|
||||
+dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS)
|
||||
dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS)
|
||||
dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS)
|
||||
dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS)
|
||||
@@ -169,14 +169,14 @@ scp: $(SCPOBJS) $(HEADERS) Makefile
|
||||
# multi-binary compilation.
|
||||
MULTIOBJS=
|
||||
ifeq ($(MULTI),1)
|
||||
- MULTIOBJS=dbmulti.o $(sort $(foreach prog, $(PROGRAMS), $($(prog)objs))) @CRYPTLIB@
|
||||
+ MULTIOBJS=dbmulti.o $(sort $(foreach prog, $(PROGRAMS), $($(prog)objs)))
|
||||
CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI
|
||||
endif
|
||||
|
||||
dropbearmulti: multilink
|
||||
|
||||
multibinary: $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile
|
||||
- $(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
|
||||
+ $(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS) @CRYPTLIB@
|
||||
|
||||
multilink: multibinary $(addprefix link, $(PROGRAMS))
|
||||
|
80
packages/dtn/default.bash
Normal file
80
packages/dtn/default.bash
Normal file
@ -0,0 +1,80 @@
|
||||
version=\
|
||||
(
|
||||
'2.9.0'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://downloads.sourceforge.net/dtn/dtn-$version.tgz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'adfc25b561c1eeda30d9b68a6b088bd8'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'db/default'
|
||||
'tcl/default'
|
||||
'xerces-c/default'
|
||||
'oasys/default'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
"../dtn-$version/configure" \
|
||||
--prefix="/usr" \
|
||||
--sysconfdir="/etc/dtn" \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--with-oasys="$cfg_dir_toolchain_sysroot/usr" \
|
||||
--enable-ecl \
|
||||
--without-python \
|
||||
--disable-python
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make -j1 -C servlib &&
|
||||
$cmd_make -j1 -C applib libdtnapi.a &&
|
||||
$cmd_make -j1 -C applib libdtnapi++.a &&
|
||||
$cmd_make -j1 -C applib libdtnapisrv.a &&
|
||||
$cmd_make -j1 -C daemon &&
|
||||
$cmd_make -j1 -C apps
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
cp -a servlib/libdtnserv.a "$cfg_dir_toolchain_sysroot/usr/lib" &&
|
||||
cp -a applib/libdtnapi++.a "$cfg_dir_toolchain_sysroot/usr/lib" &&
|
||||
cp -a applib/libdtnapi++-$version.a "$cfg_dir_toolchain_sysroot/usr/lib" &&
|
||||
cp -a applib/libdtnapi-$version.a "$cfg_dir_toolchain_sysroot/usr/lib" &&
|
||||
cp -a applib/libdtnapi.a "$cfg_dir_toolchain_sysroot/usr/lib" &&
|
||||
cp -a applib/libdtnapisrv.a "$cfg_dir_toolchain_sysroot/usr/lib" &&
|
||||
|
||||
mkdir -p "$cfg_dir_toolchain_sysroot/usr/include/dtn" &&
|
||||
cp -a applib/dtn_ipc.h "$cfg_dir_toolchain_sysroot/usr/include/dtn" &&
|
||||
cp -a applib/dtn_errno.h "$cfg_dir_toolchain_sysroot/usr/include/dtn" &&
|
||||
cp -a applib/sdnv-c.h "$cfg_dir_toolchain_sysroot/usr/include/dtn" &&
|
||||
cp -a applib/dtn_api.h "$cfg_dir_toolchain_sysroot/usr/include/dtn" &&
|
||||
cp -a applib/dtn_types.h "$cfg_dir_toolchain_sysroot/usr/include/dtn"
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_target_strip apps/dtnsend/dtnsend -o "$cfg_dir_rootfs/usr/bin/dtnsend" &&
|
||||
$cmd_target_strip apps/dtnrecv/dtnrecv -o "$cfg_dir_rootfs/usr/bin/dtnrecv" &&
|
||||
$cmd_target_strip apps/dtncp/dtncp -o "$cfg_dir_rootfs/usr/bin/dtncp" &&
|
||||
$cmd_target_strip apps/dtnping/dtnping -o "$cfg_dir_rootfs/usr/bin/dtnping" &&
|
||||
$cmd_target_strip daemon/dtnd -o "$cfg_dir_rootfs/usr/bin/dtnd" &&
|
||||
$cmd_mkdir "$cfg_dir_rootfs/etc/dtn" "$cfg_dir_rootfs/usr/share/dtn" &&
|
||||
cp servlib/conv_layers/clevent.xsd "$cfg_dir_rootfs/usr/share/dtn" &&
|
||||
tar -C "$cfg_package_spec_dir/fs" --exclude .svn -c -f - . | tar -C "$cfg_dir_rootfs" -x -v -f -
|
||||
}
|
29
packages/dtn/fs/etc/rc.d/dtnd
Normal file
29
packages/dtn/fs/etc/rc.d/dtnd
Normal file
@ -0,0 +1,29 @@
|
||||
# Configuration parameters
|
||||
# cfg_dtnd_config: DTN Daemon configuration file.
|
||||
# cfg_dtnd_name: DTN node name.
|
||||
|
||||
start()
|
||||
{
|
||||
export DTN_NODE="$cfg_dtnd_name"
|
||||
db="/opt/lsts/dtn/var/$DTN_NODE/db"
|
||||
|
||||
if [ -f "$cfg_dtnd_config" ]; then
|
||||
mkdir -p /opt/lsts/dtn
|
||||
|
||||
if ! [ -d "$db" ]; then
|
||||
mkdir -p "$db"
|
||||
/usr/bin/dtnd \
|
||||
-c "$cfg_dtnd_config" \
|
||||
--init-db
|
||||
fi
|
||||
|
||||
/usr/bin/dtnd -d \
|
||||
-c "$cfg_dtnd_config" \
|
||||
-o /opt/lsts/dtn/log.txt
|
||||
fi
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
killall dtnd > /dev/null 2>&1
|
||||
}
|
37
packages/e2fsprogs/default.bash
Normal file
37
packages/e2fsprogs/default.bash
Normal file
@ -0,0 +1,37 @@
|
||||
version=\
|
||||
(
|
||||
'1.41.9'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://downloads.sourceforge.net/e2fsprogs/e2fsprogs-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'52f60a9e19a02f142f5546f1b5681927'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
export CC=$cmd_target_cc
|
||||
export CROSS_COMPILE=$cfg_target_canonical
|
||||
"../e2fsprogs-$version/configure" \
|
||||
--prefix="$cfg_dir_rootfs" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--disable-nls
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_target_strip --strip-unneeded ../e2fsprogs-$version/e2fsck/e2fsck -o $cfg_dir_rootfs/sbin/e2fsck &&
|
||||
$cmd_target_strip --strip-unneeded ../e2fsprogs-$version/misc/mke2fs -o $cfg_dir_rootfs/sbin/mke2fs &&
|
||||
$cmd_target_strip --strip-unneeded ../e2fsprogs-$version/misc/tune2fs -o $cfg_dir_rootfs/sbin/tune2fs
|
||||
}
|
57
packages/eglibc/common.bash
Normal file
57
packages/eglibc/common.bash
Normal file
@ -0,0 +1,57 @@
|
||||
version=\
|
||||
(
|
||||
'2.15.17955'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.lsts.pt/glued/eglibc-$version.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'0694f304863e3c97562857388137a83e'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
build_dir=$PKG_VAR
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
ln -fs ../ports ../eglibc-$version/libc/ports
|
||||
|
||||
patches=$(ls "$cfg_package_spec_dir"/patches/*.patch)
|
||||
|
||||
cd ../eglibc-$version
|
||||
if [ -n "$patches" ]; then
|
||||
cat $patches | patch -p1
|
||||
fi
|
||||
}
|
||||
|
||||
configure()
|
||||
{
|
||||
export libc_cv_slibdir='/lib'
|
||||
BUILD_CC=$cmd_host_cc \
|
||||
AR="$cfg_dir_toolchain/bin/$cfg_target_canonical-ar" \
|
||||
RANLIB="$cfg_dir_toolchain/bin/$cfg_target_canonical-ranlib" \
|
||||
CC="$cfg_dir_toolchain/bin/$cfg_target_canonical-gcc" \
|
||||
CXX="$cfg_dir_toolchain/bin/$cfg_target_canonical-g++" \
|
||||
CFLAGS=$cfg_target_gcc_flags \
|
||||
"../eglibc-$version/libc/configure" \
|
||||
$cfg_target_eglibc_configure_flags \
|
||||
--prefix=/usr \
|
||||
--with-headers="$cfg_dir_toolchain_sysroot/usr/include" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--disable-profile \
|
||||
--without-gd \
|
||||
--without-cvs \
|
||||
--enable-add-ons \
|
||||
--with-tls \
|
||||
--enable-kernel=2.6.32 \
|
||||
--disable-nls
|
||||
}
|
37
packages/eglibc/cross.bash
Normal file
37
packages/eglibc/cross.bash
Normal file
@ -0,0 +1,37 @@
|
||||
source $PKG_COMMON
|
||||
|
||||
requires=\
|
||||
(
|
||||
'gcc/cross_stage2'
|
||||
)
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make -j1
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install_root="$cfg_dir_toolchain_sysroot" -j1 install &&
|
||||
cp "$cfg_package_spec_dir"/files/timepps.h "$cfg_dir_toolchain_sysroot/usr/include"
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_mkdir \
|
||||
"$cfg_dir_rootfs/sbin" \
|
||||
"$cfg_dir_rootfs/usr/lib" &&
|
||||
|
||||
for f in "$cfg_dir_toolchain_sysroot/lib"/*; do
|
||||
base="$(basename $f)"
|
||||
if [ -L "$f" ]; then
|
||||
cp -vd "$f" "$cfg_dir_rootfs/usr/lib/$base"
|
||||
elif [ -f "$f" ]; then
|
||||
$cmd_target_strip -v --strip-unneeded -o "$cfg_dir_rootfs/usr/lib/$base" "$f"
|
||||
fi
|
||||
done
|
||||
|
||||
$cmd_target_strip -v --strip-unneeded "elf/ldconfig" \
|
||||
-o "$cfg_dir_rootfs/sbin/ldconfig" &&
|
||||
tar -C "$cfg_package_spec_dir/fs" --exclude .svn -c -f - . | tar -C "$cfg_dir_rootfs" -x -v -f -
|
||||
}
|
199
packages/eglibc/files/timepps.h
Normal file
199
packages/eglibc/files/timepps.h
Normal file
@ -0,0 +1,199 @@
|
||||
/*
|
||||
* timepps.h -- PPS API main header
|
||||
*
|
||||
* Copyright (C) 2005-2007 Rodolfo Giometti <giometti@linux.it>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_TIMEPPS_H_
|
||||
#define _SYS_TIMEPPS_H_
|
||||
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/pps.h>
|
||||
|
||||
#define LINUXPPS 1 /* signal we are using LinuxPPS */
|
||||
|
||||
/*
|
||||
* New data structures
|
||||
*/
|
||||
|
||||
struct ntp_fp {
|
||||
unsigned int integral;
|
||||
unsigned int fractional;
|
||||
};
|
||||
|
||||
union pps_timeu {
|
||||
struct timespec tspec;
|
||||
struct ntp_fp ntpfp;
|
||||
unsigned long longpad[3];
|
||||
};
|
||||
|
||||
struct pps_info {
|
||||
unsigned long assert_sequence; /* seq. num. of assert event */
|
||||
unsigned long clear_sequence; /* seq. num. of clear event */
|
||||
union pps_timeu assert_tu; /* time of assert event */
|
||||
union pps_timeu clear_tu; /* time of clear event */
|
||||
int current_mode; /* current mode bits */
|
||||
};
|
||||
|
||||
struct pps_params {
|
||||
int api_version; /* API version # */
|
||||
int mode; /* mode bits */
|
||||
union pps_timeu assert_off_tu; /* offset compensation for assert */
|
||||
union pps_timeu clear_off_tu; /* offset compensation for clear */
|
||||
};
|
||||
|
||||
typedef int pps_handle_t; /* represents a PPS source */
|
||||
typedef unsigned long pps_seq_t; /* sequence number */
|
||||
typedef struct ntp_fp ntp_fp_t; /* NTP-compatible time stamp */
|
||||
typedef union pps_timeu pps_timeu_t; /* generic data type for time stamps */
|
||||
typedef struct pps_info pps_info_t;
|
||||
typedef struct pps_params pps_params_t;
|
||||
|
||||
#define assert_timestamp assert_tu.tspec
|
||||
#define clear_timestamp clear_tu.tspec
|
||||
|
||||
#define assert_timestamp_ntpfp assert_tu.ntpfp
|
||||
#define clear_timestamp_ntpfp clear_tu.ntpfp
|
||||
|
||||
#define assert_offset assert_off_tu.tspec
|
||||
#define clear_offset clear_off_tu.tspec
|
||||
|
||||
#define assert_offset_ntpfp assert_off_tu.ntpfp
|
||||
#define clear_offset_ntpfp clear_off_tu.ntpfp
|
||||
|
||||
/*
|
||||
* The PPS API
|
||||
*/
|
||||
|
||||
static __inline int time_pps_create(int source, pps_handle_t *handle)
|
||||
{
|
||||
int ret;
|
||||
struct pps_kparams dummy;
|
||||
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* First we check if current device is a valid PPS one by
|
||||
* doing a dummy PPS_GETPARAMS...
|
||||
*/
|
||||
ret = ioctl(source, PPS_GETPARAMS, &dummy);
|
||||
if (ret) {
|
||||
errno = EOPNOTSUPP;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* ... then since in LinuxPPS there are no differences between a
|
||||
* "PPS source" and a "PPS handle", we simply return the same value.
|
||||
*/
|
||||
*handle = source;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static __inline int time_pps_destroy(pps_handle_t handle)
|
||||
{
|
||||
return close(handle);
|
||||
}
|
||||
|
||||
static __inline int time_pps_getparams(pps_handle_t handle,
|
||||
pps_params_t *ppsparams)
|
||||
{
|
||||
int ret;
|
||||
struct pps_kparams __ppsparams;
|
||||
|
||||
ret = ioctl(handle, PPS_GETPARAMS, &__ppsparams);
|
||||
|
||||
ppsparams->api_version = __ppsparams.api_version;
|
||||
ppsparams->mode = __ppsparams.mode;
|
||||
ppsparams->assert_off_tu.tspec.tv_sec = __ppsparams.assert_off_tu.sec;
|
||||
ppsparams->assert_off_tu.tspec.tv_nsec = __ppsparams.assert_off_tu.nsec;
|
||||
ppsparams->clear_off_tu.tspec.tv_sec = __ppsparams.clear_off_tu.sec;
|
||||
ppsparams->clear_off_tu.tspec.tv_nsec = __ppsparams.clear_off_tu.nsec;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static __inline int time_pps_setparams(pps_handle_t handle,
|
||||
const pps_params_t *ppsparams)
|
||||
{
|
||||
struct pps_kparams __ppsparams;
|
||||
|
||||
__ppsparams.api_version = ppsparams->api_version;
|
||||
__ppsparams.mode = ppsparams->mode;
|
||||
__ppsparams.assert_off_tu.sec = ppsparams->assert_off_tu.tspec.tv_sec;
|
||||
__ppsparams.assert_off_tu.nsec = ppsparams->assert_off_tu.tspec.tv_nsec;
|
||||
__ppsparams.clear_off_tu.sec = ppsparams->clear_off_tu.tspec.tv_sec;
|
||||
__ppsparams.clear_off_tu.nsec = ppsparams->clear_off_tu.tspec.tv_nsec;
|
||||
|
||||
return ioctl(handle, PPS_SETPARAMS, &__ppsparams);
|
||||
}
|
||||
|
||||
/* Get capabilities for handle */
|
||||
static __inline int time_pps_getcap(pps_handle_t handle, int *mode)
|
||||
{
|
||||
return ioctl(handle, PPS_GETCAP, mode);
|
||||
}
|
||||
|
||||
static __inline int time_pps_fetch(pps_handle_t handle, const int tsformat,
|
||||
pps_info_t *ppsinfobuf,
|
||||
const struct timespec *timeout)
|
||||
{
|
||||
struct pps_fdata __fdata;
|
||||
int ret;
|
||||
|
||||
/* Sanity checks */
|
||||
if (tsformat != PPS_TSFMT_TSPEC) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (timeout) {
|
||||
__fdata.timeout.sec = timeout->tv_sec;
|
||||
__fdata.timeout.nsec = timeout->tv_nsec;
|
||||
__fdata.timeout.flags = ~PPS_TIME_INVALID;
|
||||
} else
|
||||
__fdata.timeout.flags = PPS_TIME_INVALID;
|
||||
|
||||
ret = ioctl(handle, PPS_FETCH, &__fdata);
|
||||
|
||||
ppsinfobuf->assert_sequence = __fdata.info.assert_sequence;
|
||||
ppsinfobuf->clear_sequence = __fdata.info.clear_sequence;
|
||||
ppsinfobuf->assert_tu.tspec.tv_sec = __fdata.info.assert_tu.sec;
|
||||
ppsinfobuf->assert_tu.tspec.tv_nsec = __fdata.info.assert_tu.nsec;
|
||||
ppsinfobuf->clear_tu.tspec.tv_sec = __fdata.info.clear_tu.sec;
|
||||
ppsinfobuf->clear_tu.tspec.tv_nsec = __fdata.info.clear_tu.nsec;
|
||||
ppsinfobuf->current_mode = __fdata.info.current_mode;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static __inline int time_pps_kcbind(pps_handle_t handle,
|
||||
const int kernel_consumer,
|
||||
const int edge, const int tsformat)
|
||||
{
|
||||
/* LinuxPPS doesn't implement kernel consumer feature */
|
||||
errno = EOPNOTSUPP;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* _SYS_TIMEPPS_H_ */
|
1
packages/eglibc/fs/etc/hosts
Normal file
1
packages/eglibc/fs/etc/hosts
Normal file
@ -0,0 +1 @@
|
||||
127.0.0.1 localhost.localdomain localhost
|
1
packages/eglibc/fs/etc/ld.so.conf
Normal file
1
packages/eglibc/fs/etc/ld.so.conf
Normal file
@ -0,0 +1 @@
|
||||
/usr/lib
|
15
packages/eglibc/fs/etc/nsswitch.conf
Normal file
15
packages/eglibc/fs/etc/nsswitch.conf
Normal file
@ -0,0 +1,15 @@
|
||||
passwd: files
|
||||
group: files
|
||||
shadow: files
|
||||
|
||||
publickey: files
|
||||
|
||||
hosts: files dns
|
||||
networks: files
|
||||
|
||||
protocols: files
|
||||
services: files
|
||||
ethers: files
|
||||
rpc: files
|
||||
|
||||
netgroup: files
|
24
packages/eglibc/headers.bash
Normal file
24
packages/eglibc/headers.bash
Normal file
@ -0,0 +1,24 @@
|
||||
source $PKG_COMMON
|
||||
|
||||
requires=\
|
||||
(
|
||||
'gcc/cross_stage1'
|
||||
'linux-headers/cross'
|
||||
)
|
||||
|
||||
host_install()
|
||||
{
|
||||
cat >> configparms << EOF
|
||||
install-bootstrap-headers=yes
|
||||
cross-compiling=yes
|
||||
install_root="$cfg_dir_toolchain_sysroot"
|
||||
EOF
|
||||
|
||||
$cmd_make \
|
||||
install_root="$cfg_dir_toolchain_sysroot" \
|
||||
install-bootstrap-headers=yes install-headers &&
|
||||
$cmd_mkdir "$cfg_dir_toolchain_sysroot/usr/lib" &&
|
||||
$cmd_make csu/subdir_lib &&
|
||||
cp csu/crt1.o csu/crti.o csu/crtn.o "$cfg_dir_toolchain_sysroot/usr/lib" &&
|
||||
$cmd_target_cc -nostdlib -nostartfiles -shared -x c /dev/null -o "$cfg_dir_toolchain_sysroot/usr/lib/libc.so"
|
||||
}
|
24
packages/eglibc/patches/000-reexport-rpc-interface.patch
Normal file
24
packages/eglibc/patches/000-reexport-rpc-interface.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -Nru eglibc-2.15-16611/libc/include/libc-symbols.h eglibc-2.15-16611-rasm/libc/include/libc-symbols.h
|
||||
--- eglibc-2.15-16611/libc/include/libc-symbols.h 2012-01-09 21:16:30.000000000 +0000
|
||||
+++ eglibc-2.15-16611-rasm/libc/include/libc-symbols.h 2012-01-10 23:37:36.863616530 +0000
|
||||
@@ -647,7 +647,7 @@
|
||||
# define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
|
||||
# define libc_hidden_def(name) hidden_def (name)
|
||||
# define libc_hidden_weak(name) hidden_weak (name)
|
||||
-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
|
||||
+# define libc_hidden_nolink(name, version) hidden_def (name)
|
||||
# define libc_hidden_ver(local, name) hidden_ver (local, name)
|
||||
# define libc_hidden_data_def(name) hidden_data_def (name)
|
||||
# define libc_hidden_data_weak(name) hidden_data_weak (name)
|
||||
diff -Nru eglibc-2.15-16611/libc/sunrpc/Makefile eglibc-2.15-16611-rasm/libc/sunrpc/Makefile
|
||||
--- eglibc-2.15-16611/libc/sunrpc/Makefile 2012-01-09 21:16:30.000000000 +0000
|
||||
+++ eglibc-2.15-16611-rasm/libc/sunrpc/Makefile 2012-01-10 23:38:14.574076188 +0000
|
||||
@@ -55,7 +55,7 @@
|
||||
des_crypt.h)
|
||||
headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
|
||||
$(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
|
||||
-headers = rpc/netdb.h
|
||||
+headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
|
||||
generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
|
||||
$(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
|
||||
generated-dirs := rpcsvc
|
15
packages/eglibc/patches/001-reinstall-nis-rpc-headers.patch
Normal file
15
packages/eglibc/patches/001-reinstall-nis-rpc-headers.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -Nru eglibc-2.15-16611/libc/nis/Makefile eglibc-2.15-16611-rasm/libc/nis/Makefile
|
||||
--- eglibc-2.15-16611/libc/nis/Makefile 2012-01-09 21:16:30.000000000 +0000
|
||||
+++ eglibc-2.15-16611-rasm/libc/nis/Makefile 2012-01-10 23:40:26.409018009 +0000
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
aux := nis_hash
|
||||
|
||||
+headers := $(wildcard rpcsvc/*.[hx])
|
||||
distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
|
||||
- nisplus-parser.h nis_xdr.h nss \
|
||||
- $(wildcard rpcsvc/*.[hx])
|
||||
+ nisplus-parser.h nis_xdr.h nss
|
||||
|
||||
# These are the databases available for the nis (and perhaps later nisplus)
|
||||
# service. This must be a superset of the services in nss.
|
107
packages/eglibc/patches/002-dl-close-fix.patch
Normal file
107
packages/eglibc/patches/002-dl-close-fix.patch
Normal file
@ -0,0 +1,107 @@
|
||||
diff -Nru eglibc-2.15.17955/libc/elf/dl-close.c eglibc-2.15.17955.rasm/libc/elf/dl-close.c
|
||||
--- eglibc-2.15.17955/libc/elf/dl-close.c 2012-04-07 20:58:55.000000000 +0100
|
||||
+++ eglibc-2.15.17955.rasm/libc/elf/dl-close.c 2012-10-23 22:33:33.351846745 +0100
|
||||
@@ -119,17 +119,8 @@
|
||||
if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
|
||||
|| dl_close_state != not_pending)
|
||||
{
|
||||
- if (map->l_direct_opencount == 0)
|
||||
- {
|
||||
- if (map->l_type == lt_loaded)
|
||||
- dl_close_state = rerun;
|
||||
- else if (map->l_type == lt_library)
|
||||
- {
|
||||
- struct link_map **oldp = map->l_initfini;
|
||||
- map->l_initfini = map->l_orig_initfini;
|
||||
- _dl_scope_free (oldp);
|
||||
- }
|
||||
- }
|
||||
+ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
|
||||
+ dl_close_state = rerun;
|
||||
|
||||
/* There are still references to this object. Do nothing more. */
|
||||
if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
|
||||
diff -Nru eglibc-2.15.17955/libc/elf/dl-deps.c eglibc-2.15.17955.rasm/libc/elf/dl-deps.c
|
||||
--- eglibc-2.15.17955/libc/elf/dl-deps.c 2012-04-07 20:58:55.000000000 +0100
|
||||
+++ eglibc-2.15.17955.rasm/libc/elf/dl-deps.c 2012-10-23 22:38:17.124208092 +0100
|
||||
@@ -689,6 +689,7 @@
|
||||
l_initfini[nlist] = NULL;
|
||||
atomic_write_barrier ();
|
||||
map->l_initfini = l_initfini;
|
||||
+ map->l_free_initfini = 1;
|
||||
if (l_reldeps != NULL)
|
||||
{
|
||||
atomic_write_barrier ();
|
||||
@@ -697,7 +698,7 @@
|
||||
_dl_scope_free (old_l_reldeps);
|
||||
}
|
||||
if (old_l_initfini != NULL)
|
||||
- map->l_orig_initfini = old_l_initfini;
|
||||
+ _dl_scope_free (old_l_initfini);
|
||||
|
||||
if (errno_reason)
|
||||
_dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
|
||||
diff -Nru eglibc-2.15.17955/libc/elf/dl-libc.c eglibc-2.15.17955.rasm/libc/elf/dl-libc.c
|
||||
--- eglibc-2.15.17955/libc/elf/dl-libc.c 2012-04-07 20:58:55.000000000 +0100
|
||||
+++ eglibc-2.15.17955.rasm/libc/elf/dl-libc.c 2012-10-23 22:39:02.388449874 +0100
|
||||
@@ -270,13 +270,13 @@
|
||||
|
||||
for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
|
||||
{
|
||||
- /* Remove all additional names added to the objects. */
|
||||
for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
|
||||
{
|
||||
struct libname_list *lnp = l->l_libname->next;
|
||||
|
||||
l->l_libname->next = NULL;
|
||||
|
||||
+ /* Remove all additional names added to the objects. */
|
||||
while (lnp != NULL)
|
||||
{
|
||||
struct libname_list *old = lnp;
|
||||
@@ -284,6 +284,10 @@
|
||||
if (! old->dont_free)
|
||||
free (old);
|
||||
}
|
||||
+
|
||||
+ /* Free the initfini dependency list. */
|
||||
+ if (l->l_free_initfini)
|
||||
+ free (l->l_initfini);
|
||||
}
|
||||
|
||||
if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
|
||||
diff -Nru eglibc-2.15.17955/libc/elf/rtld.c eglibc-2.15.17955.rasm/libc/elf/rtld.c
|
||||
--- eglibc-2.15.17955/libc/elf/rtld.c 2012-04-07 20:58:55.000000000 +0100
|
||||
+++ eglibc-2.15.17955.rasm/libc/elf/rtld.c 2012-10-23 22:39:30.692348894 +0100
|
||||
@@ -2277,6 +2277,8 @@
|
||||
lnp->dont_free = 1;
|
||||
lnp = lnp->next;
|
||||
}
|
||||
+ /* Also allocated with the fake malloc(). */
|
||||
+ l->l_free_initfini = 0;
|
||||
|
||||
if (l != &GL(dl_rtld_map))
|
||||
_dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
|
||||
diff -Nru eglibc-2.15.17955/libc/include/link.h eglibc-2.15.17955.rasm/libc/include/link.h
|
||||
--- eglibc-2.15.17955/libc/include/link.h 2012-04-07 20:58:55.000000000 +0100
|
||||
+++ eglibc-2.15.17955.rasm/libc/include/link.h 2012-10-23 22:40:31.526900046 +0100
|
||||
@@ -192,6 +192,9 @@
|
||||
during LD_TRACE_PRELINKING=1
|
||||
contains any DT_SYMBOLIC
|
||||
libraries. */
|
||||
+ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
|
||||
+ freed, ie. not allocated with
|
||||
+ the dummy malloc in ld.so. */
|
||||
|
||||
/* Collected information about own RPATH directories. */
|
||||
struct r_search_path_struct l_rpath_dirs;
|
||||
@@ -240,9 +243,6 @@
|
||||
|
||||
/* List of object in order of the init and fini calls. */
|
||||
struct link_map **l_initfini;
|
||||
- /* The init and fini list generated at startup, saved when the
|
||||
- object is also loaded dynamically. */
|
||||
- struct link_map **l_orig_initfini;
|
||||
|
||||
/* List of the dependencies introduced through symbol binding. */
|
||||
struct link_map_reldeps
|
12
packages/eglibc/patches/003-make382-install_root.patch
Normal file
12
packages/eglibc/patches/003-make382-install_root.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -Naur eglibc-2.15-16526.orig/config.make.in eglibc-2.15-16526/config.make.in
|
||||
--- eglibc-2.15-16526.orig/libc/config.make.in 2012-07-24 17:49:58.000000000 -0400
|
||||
+++ eglibc-2.15-16526/libc/config.make.in 2012-07-24 17:51:01.000000000 -0400
|
||||
@@ -5,7 +5,7 @@
|
||||
release = @RELEASE@
|
||||
|
||||
# Installation prefixes.
|
||||
-install_root = $(DESTDIR)
|
||||
+install_root ?= $(DESTDIR)
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = @datadir@
|
48
packages/escc/default.bash
Normal file
48
packages/escc/default.bash
Normal file
@ -0,0 +1,48 @@
|
||||
version=\
|
||||
(
|
||||
'1.0.3'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.lsts.pt/glued/escc-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'd8729636cc2d7f46f62141d392898bfa'
|
||||
)
|
||||
|
||||
if [ -d "$cfg_dir_builds/linux/linux-"* ]; then
|
||||
kernel="$(echo $cfg_dir_builds/linux/linux-*)"
|
||||
fi
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make \
|
||||
ARCH=$cfg_target_linux \
|
||||
CROSS_COMPILE=$cfg_target_canonical- \
|
||||
M=`pwd` \
|
||||
-C "$kernel" &&
|
||||
|
||||
for util in setescc esccclock esccsettings; do
|
||||
make CC="$cmd_target_cc" -C "utils/$util"
|
||||
done
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_make \
|
||||
ARCH=$cfg_target_linux \
|
||||
CROSS_COMPILE=$cfg_target_canonical- \
|
||||
M=`pwd` \
|
||||
INSTALL_MOD_PATH=$cfg_dir_rootfs \
|
||||
-C "$kernel" \
|
||||
modules_install &&
|
||||
|
||||
for util in setescc esccclock esccsettings; do
|
||||
$cmd_target_strip "utils/$util/$util" -o "$cfg_dir_rootfs/usr/bin/$util"
|
||||
done &&
|
||||
|
||||
tar -C "$cfg_package_spec_dir/fs" --exclude .svn -c -f - . | tar -C "$cfg_dir_rootfs" -x -v -f -
|
||||
}
|
20
packages/escc/fs/etc/escc/hg1700.cfg
Normal file
20
packages/escc/fs/etc/escc/hg1700.cfg
Normal file
@ -0,0 +1,20 @@
|
||||
mode = 0x88
|
||||
ccr0 = 0x80
|
||||
ccr1 = 0x10
|
||||
ccr2 = 0x38
|
||||
bgr = 0x07
|
||||
n_rbufs = 600
|
||||
n_tbufs = 5
|
||||
n_rfsize_max = 64
|
||||
n_tfsize_max = 64
|
||||
timr = 0x1f
|
||||
ipc = 0x03
|
||||
imr0 = 0x44
|
||||
pim = 0xff
|
||||
pcr = 0xe0
|
||||
xad1 = 0xff
|
||||
xad2 = 0xff
|
||||
rah1 = 0xff
|
||||
rah2 = 0xff
|
||||
ral1 = 0xff
|
||||
ral2 = 0xff
|
3
packages/escc/fs/etc/escc/hg1700.sh
Executable file
3
packages/escc/fs/etc/escc/hg1700.sh
Executable file
@ -0,0 +1,3 @@
|
||||
/usr/bin/setescc 0 0x200 5 0 0 0
|
||||
/usr/bin/esccclock 0 0x5d1460 23
|
||||
/usr/bin/esccsettings 0 /etc/escc/hg1700.cfg
|
43
packages/escc/fs/etc/escc/ifog-imu-1-a.cfg
Normal file
43
packages/escc/fs/etc/escc/ifog-imu-1-a.cfg
Normal file
@ -0,0 +1,43 @@
|
||||
mode = 0x88
|
||||
ccr0 = 0xc0
|
||||
ccr1 = 0x10
|
||||
ccr2 = 0x38
|
||||
ccr3 = 0x00
|
||||
ccr4 = 0x00
|
||||
bgr = 0xbf
|
||||
timr = 0x03
|
||||
imr0 = 0x04
|
||||
imr1 = 0x00
|
||||
pim = 0xff
|
||||
ipc = 0x03
|
||||
iva = 0x00
|
||||
pcr = 0xe0
|
||||
n_rbufs = 0x0a
|
||||
n_rfsize_max = 0x1000
|
||||
n_tbufs = 0x0a
|
||||
n_tfsize_max = 0x1000
|
||||
xbcl = 0x00
|
||||
xbch = 0x00
|
||||
tsax = 0x00
|
||||
tsar = 0x00
|
||||
xccr = 0x00
|
||||
rccr = 0x00
|
||||
xad1 = 0xff
|
||||
xad2 = 0xff
|
||||
ral1 = 0xff
|
||||
ral2 = 0xff
|
||||
rah1 = 0xff
|
||||
rah2 = 0xff
|
||||
rlcr = 0x00
|
||||
aml = 0x00
|
||||
amh = 0x00
|
||||
pre = 0x00
|
||||
mxn = 0x00
|
||||
mxf = 0x00
|
||||
xon = 0x00
|
||||
xoff = 0x00
|
||||
tcr = 0x00
|
||||
dafo = 0x00
|
||||
rfc = 0x00
|
||||
synl = 0x00
|
||||
synh = 0x00
|
8
packages/escc/fs/etc/escc/ifog-imu-1-a.sh
Executable file
8
packages/escc/fs/etc/escc/ifog-imu-1-a.sh
Executable file
@ -0,0 +1,8 @@
|
||||
# IMU
|
||||
/usr/bin/setescc 0 0x200 5 0 0 0
|
||||
/usr/bin/esccsettings 0 /etc/escc/ifog-imu-1-a.cfg
|
||||
|
||||
# PSIMAR
|
||||
/usr/bin/setescc 1 0x200 5 0 0 1
|
||||
/usr/bin/esccsettings 1 /etc/escc/psimar.cfg
|
||||
/usr/bin/esccclock 1 0xc8920 22
|
47
packages/escc/fs/etc/escc/psimar.cfg
Normal file
47
packages/escc/fs/etc/escc/psimar.cfg
Normal file
@ -0,0 +1,47 @@
|
||||
#################################################################################
|
||||
# Standard RS-422, 8n1, 115200 baud from a 25804800 Hz clock. #
|
||||
#################################################################################
|
||||
|
||||
mode = 0x08
|
||||
ccr0 = 0xc3
|
||||
ccr1 = 0x1f
|
||||
ccr2 = 0x38
|
||||
ccr3 = 0x00
|
||||
ccr4 = 0x80
|
||||
bgr = 0x6
|
||||
timr = 0x03
|
||||
imr0 = 0x04
|
||||
imr1 = 0x00
|
||||
pim = 0xff
|
||||
ipc = 0x03
|
||||
iva = 0x00
|
||||
pcr = 0xe0
|
||||
n_rbufs = 0x0a
|
||||
n_rfsize_max = 0x1000
|
||||
n_tbufs = 0x0a
|
||||
n_tfsize_max = 0x1000
|
||||
xbcl = 0x00
|
||||
xbch = 0x00
|
||||
tsax = 0x00
|
||||
tsar = 0x00
|
||||
xccr = 0x00
|
||||
rccr = 0x00
|
||||
xad1 = 0xff
|
||||
xad2 = 0xff
|
||||
ral1 = 0xff
|
||||
ral2 = 0xff
|
||||
rah1 = 0xff
|
||||
rah2 = 0xff
|
||||
rlcr = 0x00
|
||||
aml = 0x00
|
||||
amh = 0x00
|
||||
pre = 0x00
|
||||
mxn = 0x00
|
||||
mxf = 0x00
|
||||
xon = 0x00
|
||||
xoff = 0x00
|
||||
tcr = 0x00
|
||||
dafo = 0x00
|
||||
rfc = 0x0c
|
||||
synl = 0x00
|
||||
synh = 0x00
|
18
packages/escc/fs/etc/rc.d/escc
Normal file
18
packages/escc/fs/etc/rc.d/escc
Normal file
@ -0,0 +1,18 @@
|
||||
start()
|
||||
{
|
||||
modprobe escc &&
|
||||
rm -f /dev/escc0 &&
|
||||
mknod /dev/escc0 c 261 0 &&
|
||||
rm -f /dev/escc1 &&
|
||||
mknod /dev/escc1 c 261 1 &&
|
||||
if [ -f "$cfg_escc_script" ]; then
|
||||
source "$cfg_escc_script"
|
||||
fi
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
rmmod escc &&
|
||||
rm -f /dev/escc0 &&
|
||||
rm -f /dev/escc1
|
||||
}
|
3
packages/europa/compat/ar
Executable file
3
packages/europa/compat/ar
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
"$cmd_target_ar" $*
|
3
packages/europa/compat/c++
Executable file
3
packages/europa/compat/c++
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
"$cmd_target_cxx" $*
|
3
packages/europa/compat/cc
Executable file
3
packages/europa/compat/cc
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
"$cmd_target_cc" $*
|
3
packages/europa/compat/g++
Executable file
3
packages/europa/compat/g++
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
"$cmd_target_cxx" $*
|
3
packages/europa/compat/gcc
Executable file
3
packages/europa/compat/gcc
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
"$cmd_target_cc" $*
|
3
packages/europa/compat/ranlib
Executable file
3
packages/europa/compat/ranlib
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
"$cmd_target_ranlib" $*
|
91
packages/europa/default.bash
Normal file
91
packages/europa/default.bash
Normal file
@ -0,0 +1,91 @@
|
||||
version=\
|
||||
(
|
||||
'2.6-6693'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.lsts.pt/glued/europa-$version.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'da9ac50c01696a822e47c6abbc722579'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Jose Pinto <zepinto@fe.up.pt>'
|
||||
)
|
||||
|
||||
requires=\
|
||||
(
|
||||
'ftjam/host'
|
||||
'apache-ant/host'
|
||||
'libantlr3c/default'
|
||||
)
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
patches=$(ls "$cfg_package_spec_dir"/patches-$version/*.patch)
|
||||
|
||||
if [ -n "$patches" ]; then
|
||||
cat $patches | patch -p1
|
||||
fi
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
OLD_PATH="$PATH"
|
||||
export PATH="$cfg_package_spec_dir/compat:$PATH"
|
||||
export PLASMA_HOME="$PWD/../europa-$version"
|
||||
export EUROPA_HOME="$cfg_dir_toolchain_sysroot/usr"
|
||||
|
||||
cd $PLASMA_HOME/src/PLASMA &&
|
||||
|
||||
jam -dx \
|
||||
-sLOGGER_TYPE= \
|
||||
-sVARIANTS=OPTIMIZED \
|
||||
-sLIBRARIES=SHARED \
|
||||
-sPLATFORM_FLAGS="-I$cfg_dir_toolchain_sysroot/usr/include" \
|
||||
-sLINKLIBS="-Wl,-L$cfg_dir_toolchain_sysroot/usr/lib" \
|
||||
-j1 \
|
||||
build &&
|
||||
|
||||
cd $PLASMA_HOME &&
|
||||
|
||||
ant \
|
||||
-Djam.args="-dx" \
|
||||
-Djam.num.cores="$cfg_host_cores" \
|
||||
-Djam.variant=OPTIMIZED \
|
||||
-Djam.libraries=SHARED dist \
|
||||
-Dantlr.lib="$cfg_dir_toolchain_sysroot/usr/lib" \
|
||||
-Dantlr.include="$cfg_dir_toolchain_sysroot/usr/include" \
|
||||
dist &&
|
||||
|
||||
rm dist/europa/lib/libantlr3c.* &&
|
||||
|
||||
export PATH="$OLD_PATH"
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
cp -av dist/europa/{bin,lib,include} "$cfg_dir_toolchain_sysroot/usr"
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
# Install configuration files.
|
||||
$cmd_mkdir "$cfg_dir_rootfs/usr/share/europa" &&
|
||||
$cmd_mkdir "$cfg_dir_rootfs/usr/share/europa/config" &&
|
||||
$cmd_mkdir "$cfg_dir_rootfs/usr/share/europa/include" &&
|
||||
cp -av "../europa-$version/dist/europa/config/"* "$cfg_dir_rootfs/usr/share/europa/config" &&
|
||||
cp -av "../europa-$version/dist/europa/include/"* "$cfg_dir_rootfs/usr/share/europa/include" &&
|
||||
|
||||
# Install libraries.
|
||||
for f in "../europa-$version/dist/europa/lib/"*.so; do
|
||||
dst="$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
||||
cp -v -d "$f" "$dst" &&
|
||||
$cmd_target_strip "$dst"
|
||||
done
|
||||
}
|
16
packages/europa/patches-2.6-6693/001-no-swig.patch
Normal file
16
packages/europa/patches-2.6-6693/001-no-swig.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff -Nru europa-2.6-6693/src/PLASMA/System/base/Jamfile europa-2.6-6693/src/PLASMA/System/base/Jamfile.old
|
||||
--- europa-2.6-6693/src/PLASMA/System/base/Jamfile 2013-06-09 18:14:15.956332621 +0100
|
||||
+++ europa-2.6-6693/src/PLASMA/System/base/Jamfile.old 2013-06-09 18:15:36.907863466 +0100
|
||||
@@ -17,8 +17,8 @@
|
||||
PSEngineImpl.cc
|
||||
;
|
||||
|
||||
-SwigJava PSEngine.i : psengine : [ FDirName $(PLASMA_HOME) src Java PSEngine generated psengine ] : cpp : TinyXml Utils ConstraintEngine PlanDatabase RulesEngine NDDL TemporalNetwork Solvers System : PSEngine ;
|
||||
-
|
||||
-ModuleBaseSwig System : [ FSwigWrapperName PSEngine.i : cpp ] ;
|
||||
+#SwigJava PSEngine.i : psengine : [ FDirName $(PLASMA_HOME) src Java PSEngine generated psengine ] : cpp : TinyXml Utils ConstraintEngine PlanDatabase RulesEngine NDDL TemporalNetwork Solvers System : PSEngine ;
|
||||
+#
|
||||
+#ModuleBaseSwig System : [ FSwigWrapperName PSEngine.i : cpp ] ;
|
||||
|
||||
} # PLASMA_READY
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user