mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-15 16:07:26 +00:00
move layer into meta-oe in preparation for future splits
As per TSC decision Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,7 @@
|
||||
This layer depends on:
|
||||
|
||||
URI: git://git.pokylinux.org/poky
|
||||
branch: master
|
||||
revision: HEAD
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
inherit gnomebase gtk-icon-cache gconf mime
|
||||
|
||||
EXTRA_OECONF += "--enable-introspection=no"
|
||||
BBCLASSEXTEND += "native"
|
||||
@@ -0,0 +1,30 @@
|
||||
def gnome_verdir(v):
|
||||
import re
|
||||
m = re.match("^([0-9]+)\.([0-9]+)", v)
|
||||
return "%s.%s" % (m.group(1), m.group(2))
|
||||
|
||||
SECTION ?= "x11/gnome"
|
||||
SRC_URI = "${GNOME_MIRROR}/${BPN}/${@gnome_verdir("${PV}")}/${BPN}-${PV}.tar.bz2;name=archive"
|
||||
|
||||
DEPENDS += "gnome-common"
|
||||
|
||||
FILES_${PN} += "${datadir}/application-registry \
|
||||
${datadir}/mime-info \
|
||||
${datadir}/mime/packages \
|
||||
${datadir}/mime/application \
|
||||
${datadir}/gnome-2.0 \
|
||||
${datadir}/polkit* \
|
||||
"
|
||||
|
||||
FILES_${PN}-doc += "${datadir}/devhelp"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
AUTOTOOLS_STAGE_PKGCONFIG = "1"
|
||||
|
||||
do_install_append() {
|
||||
rm -rf ${D}${localstatedir}/lib/scrollkeeper/*
|
||||
rm -rf ${D}${localstatedir}/scrollkeeper/*
|
||||
rm -f ${D}${datadir}/applications/*.cache
|
||||
}
|
||||
|
||||
@@ -0,0 +1,560 @@
|
||||
inherit linux-kernel-base module_strip
|
||||
|
||||
PROVIDES += "virtual/kernel"
|
||||
DEPENDS += "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}depmod-${@get_kernelmajorversion('${PV}')} virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX} update-modules"
|
||||
|
||||
# we include gcc above, we dont need virtual/libc
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
KERNEL_IMAGETYPE ?= "zImage"
|
||||
|
||||
python __anonymous () {
|
||||
kerneltype = bb.data.getVar('KERNEL_IMAGETYPE', d, 1) or ''
|
||||
if kerneltype == 'uImage':
|
||||
depends = bb.data.getVar("DEPENDS", d, 1)
|
||||
depends = "%s u-boot-mkimage-native" % depends
|
||||
bb.data.setVar("DEPENDS", depends, d)
|
||||
|
||||
image = bb.data.getVar('INITRAMFS_IMAGE', d, True)
|
||||
if image != '' and image is not None:
|
||||
bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d)
|
||||
|
||||
machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
|
||||
|
||||
if machine_kernel_pr:
|
||||
bb.data.setVar('PR', machine_kernel_pr, d)
|
||||
}
|
||||
|
||||
INITRAMFS_IMAGE ?= ""
|
||||
INITRAMFS_TASK ?= ""
|
||||
|
||||
inherit kernel-arch deploy
|
||||
|
||||
PACKAGES_DYNAMIC += "kernel-module-*"
|
||||
PACKAGES_DYNAMIC += "kernel-image-*"
|
||||
PACKAGES_DYNAMIC += "kernel-firmware-*"
|
||||
|
||||
export OS = "${TARGET_OS}"
|
||||
export CROSS_COMPILE = "${TARGET_PREFIX}"
|
||||
|
||||
KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}"
|
||||
|
||||
KERNEL_RELEASE ?= "${KERNEL_VERSION}"
|
||||
|
||||
KERNEL_CCSUFFIX ?= ""
|
||||
KERNEL_LDSUFFIX ?= ""
|
||||
|
||||
# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
|
||||
# specific options necessary for building the kernel and modules.
|
||||
#FIXME: should be this: TARGET_CC_KERNEL_ARCH ?= "${TARGET_CC_ARCH}"
|
||||
TARGET_CC_KERNEL_ARCH ?= ""
|
||||
HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
|
||||
TARGET_LD_KERNEL_ARCH ?= ""
|
||||
HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
|
||||
|
||||
KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
|
||||
KERNEL_LD = "${LD}${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
|
||||
|
||||
# Where built kernel lies in the kernel tree
|
||||
KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
|
||||
KERNEL_IMAGEDEST = "boot"
|
||||
|
||||
#
|
||||
# configuration
|
||||
#
|
||||
export CMDLINE_CONSOLE = "console=${@bb.data.getVar("KERNEL_CONSOLE",d,1) or "ttyS0"}"
|
||||
|
||||
KERNEL_VERSION = "${@get_kernelversion('${B}')}"
|
||||
KERNEL_MAJOR_VERSION = "${@get_kernelmajorversion('${KERNEL_VERSION}')}"
|
||||
|
||||
KERNEL_LOCALVERSION ?= ""
|
||||
|
||||
# kernels are generally machine specific
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
# U-Boot support
|
||||
UBOOT_ENTRYPOINT ?= "20008000"
|
||||
UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
|
||||
|
||||
# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE.
|
||||
# We don't want to override kernel Makefile variables from the environment
|
||||
EXTRA_OEMAKE = ""
|
||||
|
||||
KERNEL_ALT_IMAGETYPE ??= ""
|
||||
|
||||
kernel_do_compile() {
|
||||
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
|
||||
oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}"
|
||||
if [ "${KERNEL_MAJOR_VERSION}" != "2.6" ]; then
|
||||
oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}"
|
||||
fi
|
||||
oe_runmake ${KERNEL_IMAGETYPE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"
|
||||
}
|
||||
|
||||
do_compile_kernelmodules() {
|
||||
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
|
||||
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
|
||||
oe_runmake modules CC="${KERNEL_CC}" LD="${KERNEL_LD}"
|
||||
else
|
||||
oenote "no modules to compile"
|
||||
fi
|
||||
}
|
||||
addtask compile_kernelmodules after do_compile before do_install
|
||||
|
||||
kernel_do_install() {
|
||||
#
|
||||
# First install the modules
|
||||
#
|
||||
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
|
||||
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
|
||||
oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
|
||||
else
|
||||
oenote "no modules to install"
|
||||
fi
|
||||
|
||||
#
|
||||
# Install various kernel output (zImage, map file, config, module support files)
|
||||
#
|
||||
install -d ${D}/${KERNEL_IMAGEDEST}
|
||||
install -d ${D}/boot
|
||||
install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
|
||||
install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
|
||||
install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
|
||||
install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
|
||||
[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
|
||||
install -d ${D}/etc/modutils
|
||||
if [ "${KERNEL_MAJOR_VERSION}" = "2.6" ]; then
|
||||
install -d ${D}/etc/modprobe.d
|
||||
fi
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Support for external module building - create a minimal copy of the kernel source tree
|
||||
#
|
||||
kerneldir=${D}/kernel/
|
||||
|
||||
# Take care of arch specific headers
|
||||
# Kernel 2.6.27 moved headers from includes/asm-${ARCH} to arch/${ARCH}/include/asm
|
||||
if [ -e arch/${ARCH}/include/asm/ ] ; then
|
||||
install -d $kerneldir/arch/${ARCH}/
|
||||
cp -fR arch/${ARCH}/* $kerneldir/arch/${ARCH}/
|
||||
|
||||
# Check for arch/x86 on i386
|
||||
elif [ -d arch/x86/include/asm/ ]; then
|
||||
if [ -e include/asm ] ; then
|
||||
install -d $kerneldir/include/asm/
|
||||
cp -fR arch/x86/include/asm/* $kerneldir/include/asm/
|
||||
fi
|
||||
install -d $kerneldir/arch/x86/include
|
||||
cp -fR arch/x86/* $kerneldir/arch/x86/
|
||||
fi
|
||||
|
||||
# Take care of the rest of the main directories we need
|
||||
for entry in drivers/crypto drivers/media include scripts; do
|
||||
if [ -d $entry ]; then
|
||||
mkdir -p $kerneldir/$entry
|
||||
cp -fR $entry/* $kerneldir/$entry/
|
||||
fi
|
||||
done
|
||||
|
||||
install -m 0644 .config $kerneldir/config-${KERNEL_VERSION}
|
||||
ln -sf config-${KERNEL_VERSION} $kerneldir/.config
|
||||
ln -sf config-${KERNEL_VERSION} $kerneldir/kernel-config
|
||||
echo "${KERNEL_VERSION}" >$kerneldir/kernel-abiversion
|
||||
echo "${S}" >$kerneldir/kernel-source
|
||||
echo "${KERNEL_CCSUFFIX}" >$kerneldir/kernel-ccsuffix
|
||||
echo "${KERNEL_LDSUFFIX}" >$kerneldir/kernel-ldsuffix
|
||||
[ -e vmlinux ] && install -m 0644 vmlinux $kerneldir/
|
||||
install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE}
|
||||
install -m 0644 System.map $kerneldir/System.map-${KERNEL_VERSION}
|
||||
[ -e Module.symvers ] && install -m 0644 Module.symvers $kerneldir/
|
||||
|
||||
# Copy over the main Makefiles
|
||||
[ -e Rules.make ] && install -m 0644 Rules.make $kerneldir/
|
||||
[ -e Makefile ] && install -m 0644 Makefile $kerneldir/
|
||||
# Check if arch/${ARCH}/Makefile exists and install it
|
||||
if [ -e arch/${ARCH}/Makefile ]; then
|
||||
install -d $kerneldir/arch/${ARCH}
|
||||
install -m 0644 arch/${ARCH}/Makefile* $kerneldir/arch/${ARCH}
|
||||
# Otherwise check arch/x86/Makefile for i386 and x86_64 on kernels >= 2.6.24
|
||||
elif [ -e arch/x86/Makefile ]; then
|
||||
install -d $kerneldir/arch/x86
|
||||
install -m 0644 arch/x86/Makefile* $kerneldir/arch/x86
|
||||
fi
|
||||
|
||||
# Remove the following binaries which cause strip errors
|
||||
# during do_package for cross-compiled platforms
|
||||
bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
|
||||
arch/powerpc/boot/mktree scripts/bin2c scripts/conmakehash \
|
||||
scripts/ihex2fw scripts/kallsyms scripts/pnmtologo scripts/basic/docproc \
|
||||
scripts/basic/fixdep scripts/basic/hash scripts/dtc/dtc \
|
||||
scripts/genksyms/genksyms scripts/kconfig/conf scripts/mod/mk_elfconfig \
|
||||
scripts/mod/modpost scripts/recordmcount"
|
||||
rm -rf $kerneldir/scripts/*.o
|
||||
rm -rf $kerneldir/scripts/basic/*.o
|
||||
rm -rf $kerneldir/scripts/kconfig/*.o
|
||||
rm -rf $kerneldir/scripts/mod/*.o
|
||||
rm -rf $kerneldir/scripts/dtc/*.o
|
||||
for entry in $bin_files; do
|
||||
rm -f $kerneldir/$entry
|
||||
done
|
||||
}
|
||||
|
||||
sysroot_stage_all_append() {
|
||||
sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}/kernel
|
||||
}
|
||||
|
||||
|
||||
kernel_do_configure() {
|
||||
# Copy defconfig to .config if .config does not exist. This allows
|
||||
# recipes to manage the .config themselves in do_configure_prepend().
|
||||
if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${S}/.config" ]; then
|
||||
cp "${WORKDIR}/defconfig" "${S}/.config"
|
||||
fi
|
||||
|
||||
yes '' | oe_runmake oldconfig
|
||||
|
||||
if [ ! -z "${INITRAMFS_IMAGE}" ]; then
|
||||
for img in cpio.gz cpio.lzo cpio.lzma; do
|
||||
if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then
|
||||
cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
kernel_do_configure[depends] += "${INITRAMFS_TASK}"
|
||||
|
||||
do_menuconfig() {
|
||||
export DISPLAY='${DISPLAY}'
|
||||
export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}'
|
||||
export XAUTHORITY='${XAUTHORITY}'
|
||||
export TERMWINDOWTITLE="${PN} Kernel Configuration"
|
||||
export SHELLCMDS="make menuconfig"
|
||||
${TERMCMDRUN}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
do_menuconfig[nostamp] = "1"
|
||||
addtask menuconfig after do_patch
|
||||
|
||||
pkg_postinst_kernel () {
|
||||
cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
|
||||
}
|
||||
|
||||
pkg_postrm_kernel () {
|
||||
cd /${KERNEL_IMAGEDEST}; update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
|
||||
}
|
||||
|
||||
inherit cml1
|
||||
|
||||
EXPORT_FUNCTIONS do_compile do_install do_configure
|
||||
|
||||
# kernel-base becomes kernel-${KERNEL_VERSION}
|
||||
# kernel-image becomes kernel-image-${KERNEL_VERISON}
|
||||
PACKAGES = "kernel kernel-base kernel-image kernel-dev kernel-vmlinux kernel-misc"
|
||||
FILES = ""
|
||||
FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
|
||||
FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config*"
|
||||
FILES_kernel-vmlinux = "/boot/vmlinux*"
|
||||
# misc is a package to contain files we need in staging
|
||||
FILES_kernel-misc = "/kernel/include/config /kernel/scripts /kernel/drivers/crypto /kernel/drivers/media"
|
||||
RDEPENDS_kernel = "kernel-base"
|
||||
# Allow machines to override this dependency if kernel image files are
|
||||
# not wanted in images as standard
|
||||
RDEPENDS_kernel-base ?= "kernel-image"
|
||||
PKG_kernel-image = "kernel-image-${KERNEL_VERSION}"
|
||||
PKG_kernel-base = "kernel-${KERNEL_VERSION}"
|
||||
ALLOW_EMPTY_kernel = "1"
|
||||
ALLOW_EMPTY_kernel-base = "1"
|
||||
ALLOW_EMPTY_kernel-image = "1"
|
||||
|
||||
# Userspace workarounds for kernel modules issues
|
||||
# This is shame, fix the kernel instead!
|
||||
DEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround"
|
||||
RDEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround"
|
||||
|
||||
pkg_postinst_kernel-image () {
|
||||
if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
|
||||
mkdir -p $D/lib/modules/${KERNEL_VERSION}
|
||||
fi
|
||||
if [ -n "$D" ]; then
|
||||
${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
|
||||
else
|
||||
depmod -a
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst_modules () {
|
||||
if [ -n "$D" ]; then
|
||||
${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
|
||||
else
|
||||
depmod -a
|
||||
update-modules || true
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm_modules () {
|
||||
update-modules || true
|
||||
}
|
||||
|
||||
autoload_postinst_fragment() {
|
||||
if [ x"$D" = "x" ]; then
|
||||
modprobe %s || true
|
||||
fi
|
||||
}
|
||||
|
||||
# autoload defaults (alphabetically sorted)
|
||||
module_autoload_hidp = "hidp"
|
||||
module_autoload_ipv6 = "ipv6"
|
||||
module_autoload_ipsec = "ipsec"
|
||||
module_autoload_ircomm-tty = "ircomm-tty"
|
||||
module_autoload_rfcomm = "rfcomm"
|
||||
module_autoload_sa1100-rtc = "sa1100-rtc"
|
||||
# sa1100-rtc was renamed in 2.6.23 onwards
|
||||
module_autoload_rtc-sa1100 = "rtc-sa1100"
|
||||
|
||||
# alias defaults (alphabetically sorted)
|
||||
module_conf_af_packet = "alias net-pf-17 af_packet"
|
||||
module_conf_bluez = "alias net-pf-31 bluez"
|
||||
module_conf_bnep = "alias bt-proto-4 bnep"
|
||||
module_conf_hci_uart = "alias tty-ldisc-15 hci_uart"
|
||||
module_conf_l2cap = "alias bt-proto-0 l2cap"
|
||||
module_conf_sco = "alias bt-proto-2 sco"
|
||||
module_conf_rfcomm = "alias bt-proto-3 rfcomm"
|
||||
|
||||
python populate_packages_prepend () {
|
||||
def extract_modinfo(file):
|
||||
import tempfile, re
|
||||
tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1)
|
||||
tf = tempfile.mkstemp()
|
||||
tmpfile = tf[1]
|
||||
cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile)
|
||||
os.system(cmd)
|
||||
f = open(tmpfile)
|
||||
l = f.read().split("\000")
|
||||
f.close()
|
||||
os.close(tf[0])
|
||||
os.unlink(tmpfile)
|
||||
exp = re.compile("([^=]+)=(.*)")
|
||||
vals = {}
|
||||
for i in l:
|
||||
m = exp.match(i)
|
||||
if not m:
|
||||
continue
|
||||
vals[m.group(1)] = m.group(2)
|
||||
return vals
|
||||
|
||||
def parse_depmod():
|
||||
import re
|
||||
|
||||
dvar = bb.data.getVar('PKGD', d, 1)
|
||||
if not dvar:
|
||||
bb.error("PKGD not defined")
|
||||
return
|
||||
|
||||
kernelver = bb.data.getVar('KERNEL_VERSION', d, 1)
|
||||
kernelver_stripped = kernelver
|
||||
m = re.match('^(.*-hh.*)[\.\+].*$', kernelver)
|
||||
if m:
|
||||
kernelver_stripped = m.group(1)
|
||||
path = bb.data.getVar("PATH", d, 1)
|
||||
host_prefix = bb.data.getVar("HOST_PREFIX", d, 1) or ""
|
||||
major_version = bb.data.getVar('KERNEL_MAJOR_VERSION', d, 1)
|
||||
|
||||
cmd = "PATH=\"%s\" %sdepmod-%s -n -a -r -b %s -F %s/boot/System.map-%s %s" % (path, host_prefix, major_version, dvar, dvar, kernelver, kernelver_stripped)
|
||||
f = os.popen(cmd, 'r')
|
||||
|
||||
deps = {}
|
||||
pattern0 = "^(.*\.k?o):..*$"
|
||||
pattern1 = "^(.*\.k?o):\s*(.*\.k?o)\s*$"
|
||||
pattern2 = "^(.*\.k?o):\s*(.*\.k?o)\s*\\\$"
|
||||
pattern3 = "^\t(.*\.k?o)\s*\\\$"
|
||||
pattern4 = "^\t(.*\.k?o)\s*$"
|
||||
|
||||
line = f.readline()
|
||||
while line:
|
||||
if not re.match(pattern0, line):
|
||||
line = f.readline()
|
||||
continue
|
||||
m1 = re.match(pattern1, line)
|
||||
if m1:
|
||||
deps[m1.group(1)] = m1.group(2).split()
|
||||
else:
|
||||
m2 = re.match(pattern2, line)
|
||||
if m2:
|
||||
deps[m2.group(1)] = m2.group(2).split()
|
||||
line = f.readline()
|
||||
m3 = re.match(pattern3, line)
|
||||
while m3:
|
||||
deps[m2.group(1)].extend(m3.group(1).split())
|
||||
line = f.readline()
|
||||
m3 = re.match(pattern3, line)
|
||||
m4 = re.match(pattern4, line)
|
||||
deps[m2.group(1)].extend(m4.group(1).split())
|
||||
line = f.readline()
|
||||
f.close()
|
||||
return deps
|
||||
|
||||
def get_dependencies(file, pattern, format):
|
||||
# file no longer includes PKGD
|
||||
file = file.replace(bb.data.getVar('PKGD', d, 1) or '', '', 1)
|
||||
# instead is prefixed with /lib/modules/${KERNEL_VERSION}
|
||||
file = file.replace("/lib/modules/%s/" % bb.data.getVar('KERNEL_VERSION', d, 1) or '', '', 1)
|
||||
|
||||
if module_deps.has_key(file):
|
||||
import re
|
||||
dependencies = []
|
||||
for i in module_deps[file]:
|
||||
m = re.match(pattern, os.path.basename(i))
|
||||
if not m:
|
||||
continue
|
||||
on = legitimize_package_name(m.group(1))
|
||||
dependency_pkg = format % on
|
||||
dependencies.append(dependency_pkg)
|
||||
return dependencies
|
||||
return []
|
||||
|
||||
def frob_metadata(file, pkg, pattern, format, basename):
|
||||
import re
|
||||
vals = extract_modinfo(file)
|
||||
|
||||
dvar = bb.data.getVar('PKGD', d, 1)
|
||||
|
||||
# If autoloading is requested, output /etc/modutils/<name> and append
|
||||
# appropriate modprobe commands to the postinst
|
||||
autoload = bb.data.getVar('module_autoload_%s' % basename, d, 1)
|
||||
if autoload:
|
||||
name = '%s/etc/modutils/%s' % (dvar, basename)
|
||||
f = open(name, 'w')
|
||||
for m in autoload.split():
|
||||
f.write('%s\n' % m)
|
||||
f.close()
|
||||
postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1)
|
||||
if not postinst:
|
||||
bb.fatal("pkg_postinst_%s not defined" % pkg)
|
||||
postinst += bb.data.getVar('autoload_postinst_fragment', d, 1) % autoload
|
||||
bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
|
||||
|
||||
# Write out any modconf fragment
|
||||
modconf = bb.data.getVar('module_conf_%s' % basename, d, 1)
|
||||
if modconf:
|
||||
if bb.data.getVar("KERNEL_MAJOR_VERSION", d, 1) == "2.6":
|
||||
name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
|
||||
else:
|
||||
name = '%s/etc/modutils/%s.conf' % (dvar, basename)
|
||||
f = open(name, 'w')
|
||||
f.write("%s\n" % modconf)
|
||||
f.close()
|
||||
|
||||
files = bb.data.getVar('FILES_%s' % pkg, d, 1)
|
||||
files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename)
|
||||
bb.data.setVar('FILES_%s' % pkg, files, d)
|
||||
|
||||
if vals.has_key("description"):
|
||||
old_desc = bb.data.getVar('DESCRIPTION_' + pkg, d, 1) or ""
|
||||
bb.data.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"], d)
|
||||
|
||||
rdepends_str = bb.data.getVar('RDEPENDS_' + pkg, d, 1)
|
||||
if rdepends_str:
|
||||
rdepends = rdepends_str.split()
|
||||
else:
|
||||
rdepends = []
|
||||
rdepends.extend(get_dependencies(file, pattern, format))
|
||||
bb.data.setVar('RDEPENDS_' + pkg, ' '.join(rdepends), d)
|
||||
|
||||
module_deps = parse_depmod()
|
||||
module_regex = '^(.*)\.k?o$'
|
||||
module_pattern = 'kernel-module-%s'
|
||||
|
||||
postinst = bb.data.getVar('pkg_postinst_modules', d, 1)
|
||||
postrm = bb.data.getVar('pkg_postrm_modules', d, 1)
|
||||
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
|
||||
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
|
||||
do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-%s' % bb.data.getVar("KERNEL_VERSION", d, 1))
|
||||
|
||||
import re
|
||||
metapkg = "kernel-modules"
|
||||
bb.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d)
|
||||
bb.data.setVar('FILES_' + metapkg, "", d)
|
||||
blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'perf' ]
|
||||
for l in module_deps.values():
|
||||
for i in l:
|
||||
pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
|
||||
blacklist.append(pkg)
|
||||
metapkg_rdepends = []
|
||||
packages = bb.data.getVar('PACKAGES', d, 1).split()
|
||||
for pkg in packages[1:]:
|
||||
if not pkg in blacklist and not pkg in metapkg_rdepends:
|
||||
metapkg_rdepends.append(pkg)
|
||||
bb.data.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends), d)
|
||||
bb.data.setVar('DESCRIPTION_' + metapkg, 'Kernel modules meta package', d)
|
||||
packages.append(metapkg)
|
||||
bb.data.setVar('PACKAGES', ' '.join(packages), d)
|
||||
}
|
||||
|
||||
# Support checking the kernel size since some kernels need to reside in partitions
|
||||
# with a fixed length or there is a limit in transferring the kernel to memory
|
||||
do_sizecheck() {
|
||||
if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then
|
||||
size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'`
|
||||
if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
|
||||
rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
|
||||
die "This kernel (size=$size > ${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
addtask sizecheck before do_install after do_compile
|
||||
|
||||
do_uboot_mkimage() {
|
||||
if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
|
||||
ENTRYPOINT=${UBOOT_ENTRYPOINT}
|
||||
if test -n "${UBOOT_ENTRYSYMBOL}"; then
|
||||
ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
|
||||
awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
|
||||
fi
|
||||
if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
|
||||
${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
|
||||
uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
|
||||
rm -f linux.bin
|
||||
else
|
||||
${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
|
||||
rm -f linux.bin.gz
|
||||
gzip -9 linux.bin
|
||||
uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
|
||||
rm -f linux.bin.gz
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
addtask uboot_mkimage before do_install after do_compile
|
||||
|
||||
KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
|
||||
# Don't include the DATETIME variable in the sstate package signatures
|
||||
KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
|
||||
KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
|
||||
|
||||
kernel_do_deploy() {
|
||||
install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
|
||||
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
|
||||
tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
|
||||
fi
|
||||
|
||||
cd ${DEPLOYDIR}
|
||||
rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
|
||||
ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
|
||||
}
|
||||
do_deploy[dirs] = "${DEPLOYDIR} ${B}"
|
||||
|
||||
addtask deploy before do_package after do_install
|
||||
|
||||
EXPORT_FUNCTIONS do_deploy
|
||||
|
||||
# perf must be enabled in individual kernel recipes
|
||||
PACKAGES =+ "perf"
|
||||
FILES_perf = "${bindir}/* \
|
||||
${libexecdir}"
|
||||
@@ -0,0 +1,56 @@
|
||||
DEPENDS += "shared-mime-info-native shared-mime-info"
|
||||
|
||||
mime_postinst() {
|
||||
if [ "$1" = configure ]; then
|
||||
if [ -x ${bindir}/update-mime-database ] ; then
|
||||
echo "Updating MIME database... this may take a while."
|
||||
update-mime-database $D${datadir}/mime
|
||||
else
|
||||
echo "Missing ${bindir}/update-mime-database, update of mime database failed!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
mime_postrm() {
|
||||
if [ "$1" = remove ] || [ "$1" = upgrade ]; then
|
||||
if [ -x ${bindir}/update-mime-database ] ; then
|
||||
echo "Updating MIME database... this may take a while."
|
||||
update-mime-database $D${datadir}/mime
|
||||
else
|
||||
echo "Missing ${bindir}/update-mime-database, update of mime database failed!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
python ppopulate_packages_append () {
|
||||
import os.path, re
|
||||
packages = bb.data.getVar('PACKAGES', d, 1).split()
|
||||
pkgdest = bb.data.getVar('PKGDEST', d, 1)
|
||||
|
||||
for pkg in packages:
|
||||
mime_dir = '%s/%s/usr/share/mime/packages' % (pkgdest, pkg)
|
||||
mimes = []
|
||||
mime_re = re.compile(".*\.xml$")
|
||||
if os.path.exists(mime_dir):
|
||||
for f in os.listdir(mime_dir):
|
||||
if mime_re.match(f):
|
||||
mimes.append(f)
|
||||
if mimes != []:
|
||||
bb.note("adding mime postinst and postrm scripts to %s" % pkg)
|
||||
postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1)
|
||||
if not postinst:
|
||||
postinst = '#!/bin/sh\n'
|
||||
postinst += bb.data.getVar('mime_postinst', d, 1)
|
||||
bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
|
||||
postrm = bb.data.getVar('pkg_postrm_%s' % pkg, d, 1) or bb.data.getVar('pkg_postrm', d, 1)
|
||||
if not postrm:
|
||||
postrm = '#!/bin/sh\n'
|
||||
postrm += bb.data.getVar('mime_postrm', d, 1)
|
||||
bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
|
||||
bb.note("adding freedesktop-mime-info dependency to %s" % pkg)
|
||||
rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
|
||||
rdepends.append("freedesktop-mime-info")
|
||||
bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
|
||||
OE_QMAKE_PLATFORM = "${TARGET_OS}-oe-g++"
|
||||
QMAKESPEC = "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}"
|
||||
|
||||
# We override this completely to eliminate the -e normally passed in
|
||||
EXTRA_OEMAKE = ' MAKEFLAGS= '
|
||||
|
||||
export OE_QMAKE_CC="${CC}"
|
||||
export OE_QMAKE_CFLAGS="${CFLAGS}"
|
||||
export OE_QMAKE_CXX="${CXX}"
|
||||
export OE_QMAKE_LDFLAGS="${LDFLAGS}"
|
||||
export OE_QMAKE_AR="${AR}"
|
||||
export OE_QMAKE_STRIP="echo"
|
||||
export OE_QMAKE_RPATH="-Wl,-rpath-link,"
|
||||
|
||||
# do not export STRIP to the environment
|
||||
STRIP[unexport] = "1"
|
||||
|
||||
# default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11
|
||||
|
||||
oe_qmake_mkspecs () {
|
||||
mkdir -p mkspecs/${OE_QMAKE_PLATFORM}
|
||||
for f in ${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}/*; do
|
||||
if [ -L $f ]; then
|
||||
lnk=`readlink $f`
|
||||
if [ -f mkspecs/${OE_QMAKE_PLATFORM}/$lnk ]; then
|
||||
ln -s $lnk mkspecs/${OE_QMAKE_PLATFORM}/`basename $f`
|
||||
else
|
||||
cp $f mkspecs/${OE_QMAKE_PLATFORM}/
|
||||
fi
|
||||
else
|
||||
cp $f mkspecs/${OE_QMAKE_PLATFORM}/
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
qmake_base_do_configure() {
|
||||
case ${QMAKESPEC} in
|
||||
*linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++|*linux-uclibceabi-oe-g++)
|
||||
;;
|
||||
*-oe-g++)
|
||||
die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
|
||||
;;
|
||||
*)
|
||||
oenote Searching for qmake spec file
|
||||
paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++"
|
||||
paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths"
|
||||
|
||||
if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then
|
||||
paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-x86-g++ $paths"
|
||||
fi
|
||||
for i in $paths; do
|
||||
if test -e $i; then
|
||||
export QMAKESPEC=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
oenote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'"
|
||||
|
||||
if [ -z "${QMAKE_PROFILES}" ]; then
|
||||
PROFILES="`ls *.pro`"
|
||||
else
|
||||
PROFILES="${QMAKE_PROFILES}"
|
||||
fi
|
||||
|
||||
if [ -z "$PROFILES" ]; then
|
||||
die "QMAKE_PROFILES not set and no profiles found in $PWD"
|
||||
fi
|
||||
|
||||
if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then
|
||||
AFTER="-after"
|
||||
QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}"
|
||||
oenote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
|
||||
fi
|
||||
|
||||
if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then
|
||||
QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}"
|
||||
oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
|
||||
fi
|
||||
|
||||
#oenote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'"
|
||||
unset QMAKESPEC || true
|
||||
${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
|
||||
}
|
||||
|
||||
EXPORT_FUNCTIONS do_configure
|
||||
|
||||
addtask configure after do_unpack do_patch before do_compile
|
||||
@@ -0,0 +1,17 @@
|
||||
DEPENDS_prepend = "${@["qt4-embedded ", ""][(bb.data.getVar('PN', d, 1)[:12] == 'qt4-embedded')]}"
|
||||
inherit qmake2
|
||||
|
||||
QT_DIR_NAME = "qtopia"
|
||||
QT_LIBINFIX = "E"
|
||||
# override variables set by qmake-base to compile Qt/Embedded apps
|
||||
#
|
||||
export QMAKESPEC = "${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++"
|
||||
export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/${QT_DIR_NAME}"
|
||||
export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}"
|
||||
export OE_QMAKE_LIBS_QT = "qt"
|
||||
export OE_QMAKE_LIBS_X11 = ""
|
||||
export OE_QMAKE_EXTRA_MODULES = "network"
|
||||
EXTRA_QMAKEVARS_PRE += " QT_LIBINFIX=${QT_LIBINFIX} "
|
||||
|
||||
# Qt4 uses atomic instructions not supported in thumb mode
|
||||
ARM_INSTRUCTION_SET = "arm"
|
||||
@@ -0,0 +1,218 @@
|
||||
# This class exists to provide information about the targets that
|
||||
# may be needed by other classes and/or recipes. If you add a new
|
||||
# target this will probably need to be updated.
|
||||
|
||||
#
|
||||
# Returns information about 'what' for the named target 'target'
|
||||
# where 'target' == "<arch>-<os>"
|
||||
#
|
||||
# 'what' can be one of
|
||||
# * target: Returns the target name ("<arch>-<os>")
|
||||
# * endianess: Return "be" for big endian targets, "le" for little endian
|
||||
# * bits: Returns the bit size of the target, either "32" or "64"
|
||||
# * libc: Returns the name of the c library used by the target
|
||||
#
|
||||
# It is an error for the target not to exist.
|
||||
# If 'what' doesn't exist then an empty value is returned
|
||||
#
|
||||
def siteinfo_data(d):
|
||||
archinfo = {
|
||||
"arm": "endian-little bit-32 arm-common",
|
||||
"armeb": "endian-big bit-32 arm-common",
|
||||
"avr32": "endian-big bit-32 avr32-common",
|
||||
"bfin": "endian-little bit-32 bfin-common",
|
||||
"i386": "endian-little bit-32 ix86-common",
|
||||
"i486": "endian-little bit-32 ix86-common",
|
||||
"i586": "endian-little bit-32 ix86-common",
|
||||
"i686": "endian-little bit-32 ix86-common",
|
||||
"ia64": "endian-little bit-64",
|
||||
"mips": "endian-big bit-32 mips-common",
|
||||
"mips64": "endian-big bit-64 mips64-common",
|
||||
"mips64el": "endian-little bit-64 mips64-common",
|
||||
"mipsel": "endian-little bit-32 mips-common",
|
||||
"powerpc": "endian-big bit-32 powerpc-common",
|
||||
"nios2": "endian-little bit-32 nios2-common",
|
||||
"powerpc64": "endian-big bit-64 powerpc-common powerpc64-linux",
|
||||
"ppc": "endian-big bit-32 powerpc-common",
|
||||
"ppc64": "endian-big bit-64 powerpc-common powerpc64-linux",
|
||||
"sh3": "endian-little bit-32 sh-common",
|
||||
"sh4": "endian-little bit-32 sh-common",
|
||||
"sparc": "endian-big bit-32",
|
||||
"viac3": "endian-little bit-32 ix86-common",
|
||||
"x86_64": "endian-little bit-64",
|
||||
}
|
||||
osinfo = {
|
||||
"darwin": "common-darwin",
|
||||
"darwin9": "common-darwin",
|
||||
"linux": "common-linux common-glibc",
|
||||
"linux-gnueabi": "common-linux common-glibc",
|
||||
"linux-gnuspe": "common-linux common-glibc",
|
||||
"linux-uclibc": "common-linux common-uclibc",
|
||||
"linux-uclibceabi": "common-linux common-uclibc",
|
||||
"linux-uclibcspe": "common-linux common-uclibc",
|
||||
"uclinux-uclibc": "common-uclibc",
|
||||
"cygwin": "common-cygwin",
|
||||
"mingw32": "common-mingw",
|
||||
}
|
||||
targetinfo = {
|
||||
"arm-linux-gnueabi": "arm-linux",
|
||||
"arm-linux-uclibceabi": "arm-linux-uclibc",
|
||||
"armeb-linux-gnueabi": "armeb-linux",
|
||||
"armeb-linux-uclibceabi": "armeb-linux-uclibc",
|
||||
"powerpc-linux-gnuspe": "powerpc-linux",
|
||||
"powerpc-linux-uclibcspe": "powerpc-linux-uclibc",
|
||||
}
|
||||
|
||||
arch = d.getVar("HOST_ARCH", True)
|
||||
os = d.getVar("HOST_OS", True)
|
||||
target = "%s-%s" % (arch, os)
|
||||
|
||||
sitedata = []
|
||||
if arch in archinfo:
|
||||
sitedata.extend(archinfo[arch].split())
|
||||
if os in osinfo:
|
||||
sitedata.extend(osinfo[os].split())
|
||||
if target in targetinfo:
|
||||
sitedata.extend(targetinfo[target].split())
|
||||
sitedata.append(target)
|
||||
sitedata.append("common")
|
||||
|
||||
return sitedata
|
||||
|
||||
python () {
|
||||
sitedata = set(siteinfo_data(d))
|
||||
if "endian-little" in sitedata:
|
||||
d.setVar("SITEINFO_ENDIANNESS", "le")
|
||||
elif "endian-big" in sitedata:
|
||||
d.setVar("SITEINFO_ENDIANNESS", "be")
|
||||
else:
|
||||
bb.error("Unable to determine endianness for architecture '%s'" %
|
||||
d.getVar("HOST_ARCH", True))
|
||||
bb.fatal("Please add your architecture to siteinfo.bbclass")
|
||||
|
||||
if "bit-32" in sitedata:
|
||||
d.setVar("SITEINFO_BITS", "32")
|
||||
elif "bit-64" in sitedata:
|
||||
d.setVar("SITEINFO_BITS", "64")
|
||||
else:
|
||||
bb.error("Unable to determine bit size for architecture '%s'" %
|
||||
d.getVar("HOST_ARCH", True))
|
||||
bb.fatal("Please add your architecture to siteinfo.bbclass")
|
||||
}
|
||||
|
||||
# Old class from yocto pasted in below for compat
|
||||
|
||||
def get_siteinfo_list(d):
|
||||
target = bb.data.getVar('HOST_ARCH', d, 1) + "-" + bb.data.getVar('HOST_OS', d, 1)
|
||||
|
||||
targetinfo = {\
|
||||
"armeb-linux": "endian-big bit-32 common-glibc arm-common",\
|
||||
"armeb-linux-gnueabi": "endian-big bit-32 common-glibc arm-common armeb-linux",\
|
||||
"armeb-linux-uclibc": "endian-big bit-32 common-uclibc arm-common",\
|
||||
"armeb-linux-uclibcgnueabi": "endian-big bit-32 common-uclibc arm-common armeb-linux-uclibc",\
|
||||
"arm-darwin": "endian-little bit-32 common-darwin",\
|
||||
"arm-darwin8": "endian-little bit-32 common-darwin",\
|
||||
"arm-linux": "endian-little bit-32 common-glibc arm-common",\
|
||||
"arm-linux-gnueabi": "endian-little bit-32 common-glibc arm-common arm-linux",\
|
||||
"arm-linux-uclibc": "endian-little bit-32 common-uclibc arm-common",\
|
||||
"arm-linux-uclibcgnueabi": "endian-little bit-32 common-uclibc arm-common arm-linux-uclibc",\
|
||||
"avr32-linux": "endian-big bit-32 common-glibc avr32-common",\
|
||||
"avr32-linux-uclibc": "endian-big bit-32 common-uclibc avr32-common",\
|
||||
"bfin-uclinux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\
|
||||
"i386-linux": "endian-little bit-32 common-glibc ix86-common",\
|
||||
"i486-linux": "endian-little bit-32 common-glibc ix86-common",\
|
||||
"i586-linux": "endian-little bit-32 common-glibc ix86-common",\
|
||||
"i686-linux": "endian-little bit-32 common-glibc ix86-common",\
|
||||
"i386-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\
|
||||
"i486-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\
|
||||
"i586-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\
|
||||
"i686-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\
|
||||
"mipsel-linux": "endian-little bit-32 common-glibc mips-common",\
|
||||
"mipsel-linux-uclibc": "endian-little bit-32 common-uclibc mips-common",\
|
||||
"mips-linux": "endian-big bit-32 common-glibc mips-common",\
|
||||
"mips-linux-uclibc": "endian-big bit-32 common-uclibc mips-common",\
|
||||
"powerpc-darwin": "endian-big bit-32 common-darwin",\
|
||||
"ppc-linux": "endian-big bit-32 common-glibc powerpc-common",\
|
||||
"powerpc-linux": "endian-big bit-32 common-glibc powerpc-common",\
|
||||
"powerpc-linux-uclibc": "endian-big bit-32 common-uclibc powerpc-common",\
|
||||
"sh3-linux": "endian-little bit-32 common-glibc sh-common",\
|
||||
"sh4-linux": "endian-little bit-32 common-glibc sh-common",\
|
||||
"sh4-linux-uclibc": "endian-little bit-32 common-uclibc sh-common",\
|
||||
"sparc-linux": "endian-big bit-32 common-glibc",\
|
||||
"x86_64-linux": "endian-little bit-64 common-glibc",\
|
||||
"x86_64-linux-uclibc": "endian-little bit-64 common-uclibc"}
|
||||
if target in targetinfo:
|
||||
info = targetinfo[target].split()
|
||||
info.append(target)
|
||||
info.append("common")
|
||||
return info
|
||||
else:
|
||||
bb.error("Information not available for target '%s'" % target)
|
||||
|
||||
|
||||
#
|
||||
# Define which site files to use. We check for several site files and
|
||||
# use each one that is found, based on the list returned by get_siteinfo_list()
|
||||
#
|
||||
# Search for the files in the following directories:
|
||||
# 1) ${BBPATH}/site (in reverse) - app specific, then site wide
|
||||
# 2) ${FILE_DIRNAME}/site-${PV} - app version specific
|
||||
#
|
||||
def siteinfo_get_files(d):
|
||||
sitefiles = ""
|
||||
|
||||
# Determine which site files to look for
|
||||
sites = get_siteinfo_list(d)
|
||||
|
||||
# Check along bbpath for site files and append in reverse order so
|
||||
# the application specific sites files are last and system site
|
||||
# files first.
|
||||
path_bb = bb.data.getVar('BBPATH', d, 1)
|
||||
for p in (path_bb or "").split(':'):
|
||||
tmp = ""
|
||||
for i in sites:
|
||||
fname = os.path.join(p, 'site', i)
|
||||
if os.path.exists(fname):
|
||||
tmp += fname + " "
|
||||
sitefiles = tmp + sitefiles;
|
||||
|
||||
# Now check for the applications version specific site files
|
||||
path_pkgv = os.path.join(bb.data.getVar('FILE_DIRNAME', d, 1), "site-" + bb.data.getVar('PV', d, 1))
|
||||
for i in sites:
|
||||
fname = os.path.join(path_pkgv, i)
|
||||
if os.path.exists(fname):
|
||||
sitefiles += fname + " "
|
||||
|
||||
# Now check for siteconfig cache files
|
||||
path_siteconfig = bb.data.getVar('SITECONFIG_SYSROOTCACHE', d, 1)
|
||||
if os.path.isdir(path_siteconfig):
|
||||
for i in os.listdir(path_siteconfig):
|
||||
fname = os.path.join(path_siteconfig, i)
|
||||
sitefiles += fname + " "
|
||||
|
||||
bb.debug(1, "SITE files " + sitefiles);
|
||||
return sitefiles
|
||||
|
||||
def siteinfo_get_endianess(d):
|
||||
info = get_siteinfo_list(d)
|
||||
if 'endian-little' in info:
|
||||
return "le"
|
||||
elif 'endian-big' in info:
|
||||
return "be"
|
||||
bb.error("Site info could not determine endianess for target")
|
||||
|
||||
def siteinfo_get_bits(d):
|
||||
info = get_siteinfo_list(d)
|
||||
if 'bit-32' in info:
|
||||
return "32"
|
||||
elif 'bit-64' in info:
|
||||
return "64"
|
||||
bb.error("Site info could not determine bit size for target")
|
||||
|
||||
#
|
||||
# Make some information available via variables
|
||||
#
|
||||
SITEINFO_ENDIANESS = "${@siteinfo_get_endianess(d)}"
|
||||
SITEINFO_BITS = "${@siteinfo_get_bits(d)}"
|
||||
SITECONFIG_SYSROOTCACHE = "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# We have a conf and classes directory, prepend to BBPATH to prefer our versions
|
||||
BBPATH := "${LAYERDIR}:${BBPATH}"
|
||||
|
||||
# We have a recipes directory, add to BBFILES
|
||||
BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||
|
||||
BBFILE_COLLECTIONS += "openembedded-layer"
|
||||
BBFILE_PATTERN_openembedded-layer := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_openembedded-layer = "6"
|
||||
@@ -0,0 +1,25 @@
|
||||
require conf/machine/include/tune-arm926ejs.inc
|
||||
|
||||
# Increase this everytime you change something in the kernel
|
||||
MACHINE_KERNEL_PR = "r50"
|
||||
|
||||
TARGET_ARCH = "arm"
|
||||
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-davinci"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||
UBOOT_MACHINE = "davinci_dvevm_config"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
EXTRA_IMAGEDEPENDS += "u-boot"
|
||||
|
||||
SERIAL_CONSOLE ?= "115200 ttyS0"
|
||||
EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --eraseblock=0x20000 -n"
|
||||
|
||||
#ROOT_FLASH_SIZE = "29"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 serial ethernet usbhost usbgadget mmc alsa"
|
||||
@@ -0,0 +1,15 @@
|
||||
SOC_FAMILY = "omap3"
|
||||
TARGET_ARCH = "arm"
|
||||
|
||||
require conf/machine/include/tune-cortexa8.inc
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-omap"
|
||||
# Increase this everytime you change something in the kernel
|
||||
MACHINE_KERNEL_PR = "r99"
|
||||
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
EXTRA_IMAGEDEPENDS += "u-boot x-load"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
SOC_FAMILY = "omapl138"
|
||||
@@ -0,0 +1,7 @@
|
||||
FEED_ARCH = "armv5te"
|
||||
PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te"
|
||||
# For gcc 3.x you need:
|
||||
#TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ejs"
|
||||
# For gcc 4.x you need:
|
||||
TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ej-s"
|
||||
BASE_PACKAGE_ARCH = "armv5te"
|
||||
@@ -0,0 +1,17 @@
|
||||
# Instead of using -mfpu=vfp[2] we can use -mfpu=neon to make use of gcc intrinsics[1] and vectorize loops with -ftree-vectorize[3]
|
||||
# [1] http://gcc.gnu.org/onlinedocs/gcc/ARM-NEON-Intrinsics.html
|
||||
# [2] http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
|
||||
# [3] https://support.codesourcery.com/GNUToolchain/kbentry29
|
||||
|
||||
# Can be 'softfp' or 'hardfp'
|
||||
ARM_FP_MODE ?= "softfp"
|
||||
|
||||
ARM_FP_OPT = "${@['-mfloat-abi=softfp', '-mfloat-abi=hard'][bb.data.getVar('ARM_FP_MODE', d, 1) == 'hardfp']}"
|
||||
ARM_FP_PACKAGESUFFIX = "${@['', '-hardfp'][bb.data.getVar('ARM_FP_MODE', d, 1) == 'hardfp']}"
|
||||
|
||||
TARGET_CC_ARCH = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon ${ARM_FP_OPT}"
|
||||
|
||||
FEED_ARCH = "armv7a${ARM_FP_PACKAGESUFFIX}"
|
||||
BASE_PACKAGE_ARCH = "armv7a${ARM_FP_PACKAGESUFFIX}"
|
||||
|
||||
PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6 armv7 armv7a${ARM_FP_PACKAGESUFFIX}"
|
||||
@@ -0,0 +1,109 @@
|
||||
From 65780d06117be92941b3c5404dc31597b6807263 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Sun, 23 Jan 2011 10:58:46 +0100
|
||||
Subject: [PATCH] kernel bbclass: merge in OE improvements for mkimage, PR and initramfs
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
classes/kernel.bbclass | 60 +++++++++++++++++++++++++++++++++++------------
|
||||
1 files changed, 44 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
|
||||
index 827046e..d94930b 100644
|
||||
--- a/classes/kernel.bbclass
|
||||
+++ b/classes/kernel.bbclass
|
||||
@@ -14,8 +14,20 @@ python __anonymous () {
|
||||
depends = bb.data.getVar("DEPENDS", d, 1)
|
||||
depends = "%s u-boot-mkimage-native" % depends
|
||||
bb.data.setVar("DEPENDS", depends, d)
|
||||
+
|
||||
+ image = bb.data.getVar('INITRAMFS_IMAGE', d, True)
|
||||
+ if image != '' and image is not None:
|
||||
+ bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d)
|
||||
+
|
||||
+ machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
|
||||
+
|
||||
+ if machine_kernel_pr:
|
||||
+ bb.data.setVar('PR', machine_kernel_pr, d)
|
||||
}
|
||||
|
||||
+INITRAMFS_IMAGE ?= ""
|
||||
+INITRAMFS_TASK ?= ""
|
||||
+
|
||||
inherit kernel-arch deploy
|
||||
|
||||
PACKAGES_DYNAMIC += "kernel-module-*"
|
||||
@@ -196,8 +208,17 @@ sysroot_stage_all_append() {
|
||||
|
||||
kernel_do_configure() {
|
||||
yes '' | oe_runmake oldconfig
|
||||
+ if [ ! -z "${INITRAMFS_IMAGE}" ]; then
|
||||
+ for img in cpio.gz cpio.lzo cpio.lzma; do
|
||||
+ if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then
|
||||
+ cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img
|
||||
+ fi
|
||||
+ done
|
||||
+ fi
|
||||
}
|
||||
|
||||
+kernel_do_configure[depends] += "${INITRAMFS_TASK}"
|
||||
+
|
||||
do_menuconfig() {
|
||||
export TERMWINDOWTITLE="${PN} Kernel Configuration"
|
||||
export SHELLCMDS="make menuconfig"
|
||||
@@ -476,6 +497,29 @@ do_sizecheck() {
|
||||
|
||||
addtask sizecheck before do_install after do_compile
|
||||
|
||||
+do_uboot_mkimage() {
|
||||
+ if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
|
||||
+ ENTRYPOINT=${UBOOT_ENTRYPOINT}
|
||||
+ if test -n "${UBOOT_ENTRYSYMBOL}"; then
|
||||
+ ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
|
||||
+ awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
|
||||
+ fi
|
||||
+ if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
|
||||
+ ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
|
||||
+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
|
||||
+ rm -f linux.bin
|
||||
+ else
|
||||
+ ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
|
||||
+ rm -f linux.bin.gz
|
||||
+ gzip -9 linux.bin
|
||||
+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
|
||||
+ rm -f linux.bin.gz
|
||||
+ fi
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+addtask uboot_mkimage before do_install after do_compile
|
||||
+
|
||||
KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
|
||||
# Don't include the DATETIME variable in the sstate package signatures
|
||||
KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
|
||||
@@ -487,22 +531,6 @@ kernel_do_deploy() {
|
||||
tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
|
||||
fi
|
||||
|
||||
- if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
|
||||
- if test -e arch/${ARCH}/boot/uImage ; then
|
||||
- cp arch/${ARCH}/boot/uImage ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
|
||||
- elif test -e arch/${ARCH}/boot/compressed/vmlinux ; then
|
||||
- ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
|
||||
- uboot-mkimage -A ${ARCH} -O linux -T kernel -C none -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
|
||||
- rm -f linux.bin
|
||||
- else
|
||||
- ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
|
||||
- rm -f linux.bin.gz
|
||||
- gzip -9 linux.bin
|
||||
- uboot-mkimage -A ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
|
||||
- rm -f linux.bin.gz
|
||||
- fi
|
||||
- fi
|
||||
-
|
||||
cd ${DEPLOYDIR}
|
||||
rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
|
||||
ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
|
||||
index d94930b..2a0f3da 100644
|
||||
--- a/classes/kernel.bbclass
|
||||
+++ b/classes/kernel.bbclass
|
||||
@@ -220,6 +196,9 @@ kernel_do_configure() {
|
||||
kernel_do_configure[depends] += "${INITRAMFS_TASK}"
|
||||
|
||||
do_menuconfig() {
|
||||
+ export DISPLAY='${DISPLAY}'
|
||||
+ export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}'
|
||||
+ export XAUTHORITY='${XAUTHORITY}'
|
||||
export TERMWINDOWTITLE="${PN} Kernel Configuration"
|
||||
export SHELLCMDS="make menuconfig"
|
||||
${TERMCMDRUN}
|
||||
@@ -318,13 +297,16 @@ module_conf_rfcomm = "alias bt-proto-3 rfcomm"
|
||||
|
||||
python populate_packages_prepend () {
|
||||
def extract_modinfo(file):
|
||||
- import re
|
||||
- tmpfile = os.tmpnam()
|
||||
+ import tempfile, re
|
||||
+ tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1)
|
||||
+ tf = tempfile.mkstemp()
|
||||
+ tmpfile = tf[1]
|
||||
cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile)
|
||||
os.system(cmd)
|
||||
f = open(tmpfile)
|
||||
l = f.read().split("\000")
|
||||
f.close()
|
||||
+ os.close(tf[0])
|
||||
os.unlink(tmpfile)
|
||||
exp = re.compile("([^=]+)=(.*)")
|
||||
vals = {}
|
||||
@@ -0,0 +1,46 @@
|
||||
DESCRIPTION = "GNU Radio"
|
||||
URL = "http://gnuradio.org"
|
||||
SECTION = "apps"
|
||||
PRIORITY = "optional"
|
||||
LICENSE = "GPLv3"
|
||||
DEPENDS = "uhd gsl guile-native fftwf python alsa-lib boost cppunit swig-native python-numpy"
|
||||
INC_PR = "r8"
|
||||
|
||||
inherit distutils-base autotools pkgconfig
|
||||
|
||||
export BUILD_SYS
|
||||
export HOST_SYS=${MULTIMACH_TARGET_SYS}
|
||||
|
||||
EXTRA_OECONF = " \
|
||||
--program-prefix= \
|
||||
--disable-gr-atsc \
|
||||
--enable-gr-audio-alsa \
|
||||
--disable-gr-audio-jack \
|
||||
--disable-html-docs \
|
||||
--with-boost=${STAGING_DIR_TARGET}/usr \
|
||||
--disable-usrp1 \
|
||||
--disable-usrp2 \
|
||||
--with-pythondir=${PYTHON_SITEPACKAGES_DIR} \
|
||||
PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR} \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN} = "python-core python-audio python-threading python-codecs python-lang python-textutils \
|
||||
python-shell python-pickle python-compiler python-pkgutil python-pydoc python-mmap \
|
||||
python-netclient python-unittest python-difflib python-pprint python-numpy \
|
||||
"
|
||||
|
||||
PACKAGES =+ "\
|
||||
${PN}-examples \
|
||||
${PN}-grc \
|
||||
${PN}-conf \
|
||||
"
|
||||
|
||||
FILES_${PN}-examples = "${datadir}/gnuradio/examples"
|
||||
FILES_${PN}-grc = "${datadir}/gnuradio/grc"
|
||||
FILES_${PN}-conf = "${sysconfdir}/gnuradio"
|
||||
|
||||
FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/gnuradio/*"
|
||||
FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/gnuradio/.debug \
|
||||
${PYTHON_SITEPACKAGES_DIR}/gnuradio/*/.debug \
|
||||
"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
require gnuradio.inc
|
||||
|
||||
PR = "${INC_PR}.1"
|
||||
PV = "3.3.0-${PR}+gitr${SRCREV}"
|
||||
|
||||
SRCREV = "cdca1c917626f7c63f820da921a17187efc92cd5"
|
||||
|
||||
# Make it easy to test against developer repos and branches
|
||||
GIT_REPO = "gnuradio.git"
|
||||
GIT_BRANCH = "next"
|
||||
|
||||
SRC_URI = "git://gnuradio.org/git/${GIT_REPO};branch=${GIT_BRANCH};protocol=http \
|
||||
"
|
||||
|
||||
S="${WORKDIR}/git"
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
DESCRIPTION = "Install required headers to enable OCF Linux support"
|
||||
LICENSE = "BSD"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://README;md5=b02a793c9b7893b4ce1f39f0b231ccd7"
|
||||
|
||||
INC_PR = "r3"
|
||||
|
||||
SRC_URI = "http://sourceforge.net/projects/ocf-linux/files/ocf-linux/${PV}/ocf-linux-${PV}.tar.gz"
|
||||
|
||||
S = "${WORKDIR}/ocf-linux-${PV}"
|
||||
|
||||
# Need to unpack the the ocf-linux.tar.gz file contained inside the
|
||||
# downloaded tarball
|
||||
# Install the OCF Linux headers so that other packages such as openssl
|
||||
# can find them. The headers must be in a crypto directory according to
|
||||
# the README file.
|
||||
do_install() {
|
||||
cd ${S}
|
||||
tar xzf ocf-linux.tar.gz
|
||||
install -d ${D}${includedir}/crypto
|
||||
install -m 0644 ${S}/ocf/*.h ${D}${includedir}/crypto/
|
||||
}
|
||||
|
||||
ALLOW_EMPTY = "1"
|
||||
@@ -0,0 +1,6 @@
|
||||
require ocf-linux.inc
|
||||
|
||||
PR = "${INC_PR}.0"
|
||||
|
||||
SRC_URI[md5sum] = "ce5ad54aa94226d496df1f0f3cf0c11f"
|
||||
SRC_URI[sha256sum] = "9d17cbd13849939c70699b520280e3b94cf77401cdc131108d4aeaaeea587f6b"
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
The number of colons are important :)
|
||||
|
||||
Index: openssl-0.9.8g/Configure
|
||||
===================================================================
|
||||
--- openssl-0.9.8g.orig/Configure 2008-04-12 04:27:22.000000000 +0200
|
||||
+++ openssl-0.9.8g/Configure 2008-04-12 04:38:56.000000000 +0200
|
||||
@@ -395,6 +395,16 @@
|
||||
"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
|
||||
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
|
||||
|
||||
+ # Linux on ARM
|
||||
+"linux-elf-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-elf-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-gnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-uclibcgnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-uclibcgnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+
|
||||
+"linux-avr32","$ENV{'CC'}:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).",
|
||||
+
|
||||
#### *BSD [do see comment about ${BSDthreads} above!]
|
||||
"BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -0,0 +1,546 @@
|
||||
Index: openssl-0.9.8m/Makefile
|
||||
===================================================================
|
||||
--- openssl-0.9.8m.orig/Makefile 2010-02-26 01:21:14.000000000 +0800
|
||||
+++ openssl-0.9.8m/Makefile 2010-03-09 20:17:26.515664333 +0800
|
||||
@@ -26,10 +26,10 @@
|
||||
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
|
||||
# Normally it is left empty.
|
||||
INSTALL_PREFIX=
|
||||
-INSTALLTOP=/usr/local/ssl
|
||||
+INSTALLTOP=/usr
|
||||
|
||||
# Do not edit this manually. Use Configure --openssldir=DIR do change this!
|
||||
-OPENSSLDIR=/usr/local/ssl
|
||||
+OPENSSLDIR=/usr/lib/ssl
|
||||
|
||||
# NO_IDEA - Define to build without the IDEA algorithm
|
||||
# NO_RC4 - Define to build without the RC4 algorithm
|
||||
@@ -155,10 +155,11 @@
|
||||
|
||||
MAKEFILE= Makefile
|
||||
|
||||
-MANDIR=$(OPENSSLDIR)/man
|
||||
+MANDIR=/usr/share/man
|
||||
MAN1=1
|
||||
MAN3=3
|
||||
-MANSUFFIX=
|
||||
+MANSUFFIX=ssl
|
||||
+MANSECTION=SSL
|
||||
SHELL=/bin/sh
|
||||
|
||||
TOP= .
|
||||
@@ -170,8 +171,8 @@
|
||||
SHARED_SSL=libssl$(SHLIB_EXT)
|
||||
SHARED_FIPS=
|
||||
SHARED_LIBS=
|
||||
-SHARED_LIBS_LINK_EXTS=
|
||||
-SHARED_LDFLAGS=
|
||||
+SHARED_LIBS_LINK_EXTS=.so
|
||||
+SHARED_LDFLAGS=-m64 -Wl,--version-script=openssl.ld
|
||||
|
||||
GENERAL= Makefile
|
||||
BASENAME= openssl
|
||||
@@ -447,7 +448,8 @@
|
||||
echo 'Description: OpenSSL cryptography library'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lcrypto'; \
|
||||
+ echo 'Libs.private: $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
|
||||
|
||||
libssl.pc: Makefile
|
||||
@@ -460,7 +462,8 @@
|
||||
echo 'Description: Secure Sockets Layer and cryptography libraries'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lssl'; \
|
||||
+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
|
||||
|
||||
openssl.pc: Makefile
|
||||
@@ -473,7 +476,8 @@
|
||||
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
|
||||
+ echo 'Libs.private: $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
||||
|
||||
Makefile: Makefile.org Configure config
|
||||
@@ -622,7 +626,7 @@
|
||||
install_sw:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
|
||||
- $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
|
||||
+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||
@@ -700,7 +704,7 @@
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
- --section=$$sec --center=OpenSSL \
|
||||
+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
@@ -717,7 +721,7 @@
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
- --section=$$sec --center=OpenSSL \
|
||||
+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
Index: openssl-0.9.8m/Configure
|
||||
===================================================================
|
||||
--- openssl-0.9.8m.orig/Configure 2010-03-09 16:15:42.000000000 +0800
|
||||
+++ openssl-0.9.8m/Configure 2010-03-09 20:18:16.566914027 +0800
|
||||
@@ -1,4 +1,4 @@
|
||||
-:
|
||||
+#!/usr/local/bin/perl
|
||||
eval 'exec perl -S $0 ${1+"$@"}'
|
||||
if $running_under_some_shell;
|
||||
##
|
||||
@@ -326,6 +326,47 @@
|
||||
"osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
|
||||
"tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
|
||||
|
||||
+# Debian GNU/* (various architectures)
|
||||
+"debian-alpha","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-alpha-ev4","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev4 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-alpha-ev5","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev5 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-arm","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-armeb","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-armel","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+#"debian-amd64","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+#"debian-freebsd-alpha","gcc:-DTERMIOS -O -Wa,--noexecstack -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-hppa","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-ia64","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+#"debian-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC",
|
||||
+"debian-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i486 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i686 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-m68k","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mv8 -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-openbsd-alpha","gcc:-DTERMIOS -O3 -Wa,--noexecstack -g::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-openbsd-mips","gcc:-O2 -Wa,--noexecstack -g -DL_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_UNROLL DES_RISC2 DES_PTR MD2_CHAR RC4_INDEX::linux_ppc32.o::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-s390","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sh3", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sh4", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sh3eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sh4eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-m32r","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sparc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -mcpu=v8 -g -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO -O3 -mcpu=v9 -Wa,--noexecstack -Wa,-Av8plus -g -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+
|
||||
####
|
||||
#### Variety of LINUX:-)
|
||||
####
|
||||
@@ -505,7 +546,7 @@
|
||||
# Cygwin
|
||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
|
||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_coff_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
|
||||
-"debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
|
||||
+-"debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
|
||||
|
||||
# NetWare from David Ward (dsward@novell.com)
|
||||
# requires either MetroWerks NLM development tools, or gcc / nlmconv
|
||||
@@ -1477,6 +1518,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
+$shared_ldflag .= " -Wl,--version-script=openssl.ld";
|
||||
+
|
||||
open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
|
||||
unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
|
||||
open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
|
||||
@@ -1576,7 +1619,8 @@
|
||||
elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
|
||||
{
|
||||
my $sotmp = $1;
|
||||
- s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
|
||||
+# s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
|
||||
+ s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
|
||||
}
|
||||
elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
|
||||
{
|
||||
@@ -1706,7 +1750,7 @@
|
||||
# $foo is to become "$prefix/lib$multilib/engines";
|
||||
# as Makefile.org and engines/Makefile are adapted for
|
||||
# $multilib suffix.
|
||||
- my $foo = "$prefix/lib/engines";
|
||||
+ my $foo = "$prefix/lib/ssl/engines";
|
||||
$foo =~ s/\\/\\\\/g;
|
||||
print OUT "#define ENGINESDIR \"$foo\"\n";
|
||||
}
|
||||
Index: openssl-0.9.8m/config
|
||||
===================================================================
|
||||
--- openssl-0.9.8m.orig/config 2009-10-15 20:58:00.000000000 +0800
|
||||
+++ openssl-0.9.8m/config 2010-03-09 20:16:50.506902007 +0800
|
||||
@@ -162,8 +162,8 @@
|
||||
echo "${MACHINE}-whatever-linux1"; exit 0
|
||||
;;
|
||||
|
||||
- GNU*)
|
||||
- echo "hurd-x86"; exit 0;
|
||||
+ GNU:*|GNU/*:*)
|
||||
+ echo "${MACHINE}-gnuish"; exit 0;
|
||||
;;
|
||||
|
||||
LynxOS:*)
|
||||
Index: openssl-0.9.8m/Makefile.org
|
||||
===================================================================
|
||||
--- openssl-0.9.8m.orig/Makefile.org 2010-03-09 16:15:42.000000000 +0800
|
||||
+++ openssl-0.9.8m/Makefile.org 2010-03-09 20:18:44.095663922 +0800
|
||||
@@ -153,10 +153,11 @@
|
||||
|
||||
MAKEFILE= Makefile
|
||||
|
||||
-MANDIR=$(OPENSSLDIR)/man
|
||||
+MANDIR=/usr/share/man
|
||||
MAN1=1
|
||||
MAN3=3
|
||||
-MANSUFFIX=
|
||||
+MANSUFFIX=ssl
|
||||
+MANSECTION=SSL
|
||||
SHELL=/bin/sh
|
||||
|
||||
TOP= .
|
||||
@@ -445,7 +446,8 @@
|
||||
echo 'Description: OpenSSL cryptography library'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lcrypto'; \
|
||||
+ echo 'Libs.private: $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
|
||||
|
||||
libssl.pc: Makefile
|
||||
@@ -458,7 +460,8 @@
|
||||
echo 'Description: Secure Sockets Layer and cryptography libraries'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lssl'; \
|
||||
+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
|
||||
|
||||
openssl.pc: Makefile
|
||||
@@ -471,7 +474,8 @@
|
||||
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
|
||||
+ echo 'Libs.private: $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
||||
|
||||
Makefile: Makefile.org Configure config
|
||||
@@ -620,7 +624,7 @@
|
||||
install_sw:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
|
||||
- $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
|
||||
+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||
@@ -698,7 +702,7 @@
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
- --section=$$sec --center=OpenSSL \
|
||||
+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
@@ -715,7 +719,7 @@
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
- --section=$$sec --center=OpenSSL \
|
||||
+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
Index: openssl-0.9.8m/openssl.ld
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ openssl-0.9.8m/openssl.ld 2010-03-09 20:16:50.506902007 +0800
|
||||
@@ -0,0 +1,5 @@
|
||||
+OPENSSL_0.9.8 {
|
||||
+ global:
|
||||
+ *;
|
||||
+};
|
||||
+
|
||||
Index: openssl-0.9.8m/apps/s_time.c
|
||||
===================================================================
|
||||
--- openssl-0.9.8m.orig/apps/s_time.c 2003-12-27 22:40:17.000000000 +0800
|
||||
+++ openssl-0.9.8m/apps/s_time.c 2010-03-09 20:16:50.516901237 +0800
|
||||
@@ -117,6 +117,7 @@
|
||||
|
||||
/* The following if from times(3) man page. It may need to be changed
|
||||
*/
|
||||
+#undef HZ
|
||||
#ifndef HZ
|
||||
# ifdef _SC_CLK_TCK
|
||||
# define HZ ((double)sysconf(_SC_CLK_TCK))
|
||||
Index: openssl-0.9.8m/engines/openssl.ld
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ openssl-0.9.8m/engines/openssl.ld 2010-03-09 20:16:50.516901237 +0800
|
||||
@@ -0,0 +1,5 @@
|
||||
+OPENSSL_0.9.8 {
|
||||
+ global:
|
||||
+ *;
|
||||
+};
|
||||
+
|
||||
Index: openssl-0.9.8m/doc/Makefile
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ openssl-0.9.8m/doc/Makefile 2010-03-09 20:16:50.516901237 +0800
|
||||
@@ -0,0 +1,40 @@
|
||||
+VERSION =
|
||||
+
|
||||
+#PODS = $(wildcard *.pod)
|
||||
+#MANS = $(addsuffix .man, $(basename $(PODS)))
|
||||
+
|
||||
+MANS = openssl.1 ssl.3 crypto.3
|
||||
+
|
||||
+P2M = pod2man --center='OpenSSL Documentation' --release="OpenSSL $(VERSION)"
|
||||
+
|
||||
+all: manpages
|
||||
+
|
||||
+.PHONY: manpages
|
||||
+
|
||||
+manpages: openssl.1 crypto.3 ssl.3
|
||||
+
|
||||
+openssl.1:
|
||||
+ $(P2M) --section=1 openssl.pod > openssl.1
|
||||
+
|
||||
+crypto.3:
|
||||
+ $(P2M) --section=3 crypto.pod > crypto.3
|
||||
+
|
||||
+ssl.3:
|
||||
+ $(P2M) --section=3 ssl.pod > ssl.3
|
||||
+
|
||||
+.PHONY: install
|
||||
+install:
|
||||
+ mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
|
||||
+ mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
|
||||
+ install -m 644 -p openssl.1 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
|
||||
+ install -m 644 -p crypto.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
|
||||
+ install -m 644 -p ssl.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
|
||||
+ rm -f $(MANS)
|
||||
+
|
||||
+.PHONY: clean
|
||||
+clean:
|
||||
+ rm -f $(MANS)
|
||||
+
|
||||
+.PHONY: realclean
|
||||
+realclean:
|
||||
+ -$(MAKE) clean
|
||||
Index: openssl-0.9.8m/doc/apps/c_rehash.pod
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ openssl-0.9.8m/doc/apps/c_rehash.pod 2010-03-09 20:16:50.516901237 +0800
|
||||
@@ -0,0 +1,55 @@
|
||||
+
|
||||
+=pod
|
||||
+
|
||||
+=head1 NAME
|
||||
+
|
||||
+c_rehash - Create symbolic links to files named by the hash values
|
||||
+
|
||||
+=head1 SYNOPSIS
|
||||
+
|
||||
+B<c_rehash>
|
||||
+[directory] ...
|
||||
+
|
||||
+=head1 DESCRIPTION
|
||||
+
|
||||
+c_rehash scans directories and takes a hash value of each .pem and .crt file in the directory. It then creates symbolic links for each of the files named by the hash value. This is useful as many programs require directories to be set up like this in order to find the certificates they require.
|
||||
+
|
||||
+If any directories are named on the command line then these directories are processed in turn. If not then and the environment variable SSL_CERT_DIR is defined then that is consulted. This variable should be a colon (:) separated list of directories, all of which will be processed. If neither of these conditions are true then /usr/lib/ssl/certs is processed.
|
||||
+
|
||||
+For each directory that is to be processed he user must have write permissions on the directory, if they do not then nothing will be printed for that directory.
|
||||
+
|
||||
+Note that this program deletes all the symbolic links that look like ones that it creates before processing a directory. Beware that if you run the program on a directory that contains symbolic links for other purposes that are named in the same format as those created by this program they will be lost.
|
||||
+
|
||||
+The hashes for certificate files are of the form <hash>.<n> where n is an integer. If the hash value already exists then n will be incremented, unless the file is a duplicate. Duplicates are detected using the fingerprint of the certificate. A warning will be printed if a duplicate is detected. The hashes for CRL files are of the form <hash>.r<n> and have the same behavior.
|
||||
+
|
||||
+The program will also warn if there are files with extension .pem which are not certificate or CRL files.
|
||||
+
|
||||
+The program uses the openssl program to compute the hashes and fingerprints. It expects the executable to be named openssl and be on the PATH, or in the /usr/lib/ssl/bin directory. If the OPENSSL environment variable is defined then this is used instead as the executable that provides the hashes and fingerprints. When called as $OPENSSL x509 -hash -fingerprint -noout -in $file it must output the hash of $file on the first line followed by the fingerprint on the second line, optionally prefixed with some text and an equals sign (=).
|
||||
+
|
||||
+=head1 OPTIONS
|
||||
+
|
||||
+None
|
||||
+
|
||||
+=head1 ENVIRONMENT
|
||||
+
|
||||
+=over 4
|
||||
+
|
||||
+=item B<OPENSSL>
|
||||
+
|
||||
+The name (and path) of an executable to use to generate hashes and fingerprints (see above).
|
||||
+
|
||||
+=item B<SSL_CERT_DIR>
|
||||
+
|
||||
+Colon separated list of directories to operate on. Ignored if directories are listed on the command line.
|
||||
+
|
||||
+=head1 SEE ALSO
|
||||
+
|
||||
+L<openssl(1)|openssl(1)>, L<x509(1)|x509(1)>
|
||||
+
|
||||
+=back
|
||||
+
|
||||
+=head1 BUGS
|
||||
+
|
||||
+No known bugs
|
||||
+
|
||||
+=cut
|
||||
Index: openssl-0.9.8m/crypto/Makefile
|
||||
===================================================================
|
||||
--- openssl-0.9.8m.orig/crypto/Makefile 2010-03-09 16:15:42.000000000 +0800
|
||||
+++ openssl-0.9.8m/crypto/Makefile 2010-03-09 20:16:50.516901237 +0800
|
||||
@@ -57,7 +57,7 @@
|
||||
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
|
||||
echo '#endif' ) >buildinf.h
|
||||
|
||||
-x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
|
||||
+x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl
|
||||
$(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
|
||||
x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
|
||||
$(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
|
||||
@@ -70,7 +70,7 @@
|
||||
uplink-cof.s: ../ms/uplink.pl
|
||||
$(PERL) ../ms/uplink.pl coff > $@
|
||||
|
||||
-x86_64cpuid.s: x86_64cpuid.pl
|
||||
+x86_64cpuid.S: x86_64cpuid.pl
|
||||
$(PERL) x86_64cpuid.pl $@
|
||||
ia64cpuid.s: ia64cpuid.S
|
||||
$(CC) $(CFLAGS) -E ia64cpuid.S > $@
|
||||
Index: openssl-0.9.8m/crypto/opensslconf.h
|
||||
===================================================================
|
||||
--- openssl-0.9.8m.orig/crypto/opensslconf.h 2010-02-26 01:21:14.000000000 +0800
|
||||
+++ openssl-0.9.8m/crypto/opensslconf.h 2010-03-09 20:16:50.516901237 +0800
|
||||
@@ -20,6 +20,9 @@
|
||||
#ifndef OPENSSL_NO_JPAKE
|
||||
# define OPENSSL_NO_JPAKE
|
||||
#endif
|
||||
+#ifndef OPENSSL_NO_IDEA
|
||||
+# define OPENSSL_NO_IDEA
|
||||
+#endif
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
# define OPENSSL_NO_KRB5
|
||||
#endif
|
||||
@@ -62,6 +65,9 @@
|
||||
# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE)
|
||||
# define NO_JPAKE
|
||||
# endif
|
||||
+# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA)
|
||||
+# define NO_IDEA
|
||||
+# endif
|
||||
# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
|
||||
# define NO_KRB5
|
||||
# endif
|
||||
@@ -101,8 +107,8 @@
|
||||
|
||||
#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
|
||||
#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
|
||||
-#define ENGINESDIR "/usr/local/ssl/lib/engines"
|
||||
-#define OPENSSLDIR "/usr/local/ssl"
|
||||
+#define ENGINESDIR "/usr/lib/ssl/engines"
|
||||
+#define OPENSSLDIR "/usr/lib/ssl"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -133,14 +139,14 @@
|
||||
* - Intel P6 because partial register stalls are very expensive;
|
||||
* - elder Alpha because it lacks byte load/store instructions;
|
||||
*/
|
||||
-#define RC4_INT unsigned int
|
||||
+#define RC4_INT unsigned char
|
||||
#endif
|
||||
#if !defined(RC4_CHUNK)
|
||||
/*
|
||||
* This enables code handling data aligned at natural CPU word
|
||||
* boundary. See crypto/rc4/rc4_enc.c for further details.
|
||||
*/
|
||||
-#undef RC4_CHUNK
|
||||
+#define RC4_CHUNK unsigned long
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -148,7 +154,7 @@
|
||||
/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
|
||||
* %20 speed up (longs are 8 bytes, int's are 4). */
|
||||
#ifndef DES_LONG
|
||||
-#define DES_LONG unsigned long
|
||||
+#define DES_LONG unsigned int
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -162,9 +168,9 @@
|
||||
/* The prime number generation stuff may not work when
|
||||
* EIGHT_BIT but I don't care since I've only used this mode
|
||||
* for debuging the bignum libraries */
|
||||
-#undef SIXTY_FOUR_BIT_LONG
|
||||
+#define SIXTY_FOUR_BIT_LONG
|
||||
#undef SIXTY_FOUR_BIT
|
||||
-#define THIRTY_TWO_BIT
|
||||
+#undef THIRTY_TWO_BIT
|
||||
#undef SIXTEEN_BIT
|
||||
#undef EIGHT_BIT
|
||||
#endif
|
||||
@@ -178,7 +184,7 @@
|
||||
|
||||
#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
|
||||
#define CONFIG_HEADER_BF_LOCL_H
|
||||
-#undef BF_PTR
|
||||
+#define BF_PTR2
|
||||
#endif /* HEADER_BF_LOCL_H */
|
||||
|
||||
#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
|
||||
@@ -208,7 +214,7 @@
|
||||
/* Unroll the inner loop, this sometimes helps, sometimes hinders.
|
||||
* Very mucy CPU dependant */
|
||||
#ifndef DES_UNROLL
|
||||
-#undef DES_UNROLL
|
||||
+#define DES_UNROLL
|
||||
#endif
|
||||
|
||||
/* These default values were supplied by
|
||||
Index: openssl-0.9.8m/crypto/sha/sha.h
|
||||
===================================================================
|
||||
--- openssl-0.9.8m.orig/crypto/sha/sha.h 2008-09-16 18:47:28.000000000 +0800
|
||||
+++ openssl-0.9.8m/crypto/sha/sha.h 2010-03-09 20:16:50.516901237 +0800
|
||||
@@ -59,6 +59,7 @@
|
||||
#ifndef HEADER_SHA_H
|
||||
#define HEADER_SHA_H
|
||||
|
||||
+#include <stddef.h>
|
||||
#include <openssl/e_os2.h>
|
||||
#include <stddef.h>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
diff -urN openssl-0.9.8j.orig/Makefile.shared openssl-0.9.8j/Makefile.shared
|
||||
--- openssl-0.9.8j.orig/Makefile.shared 2008-09-17 15:56:40.000000000 +0000
|
||||
+++ openssl-0.9.8j/Makefile.shared 2009-04-02 13:44:48.000000000 +0000
|
||||
@@ -90,7 +90,7 @@
|
||||
LINK_APP= \
|
||||
( $(SET_X); \
|
||||
LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
|
||||
- LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
|
||||
+ LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$(OE_LDFLAGS) $${LDFLAGS:-$(CFLAGS)}"; \
|
||||
LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
@@ -100,7 +100,7 @@
|
||||
( $(SET_X); \
|
||||
LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
|
||||
SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
|
||||
- SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
|
||||
+ SHAREDFLAGS="$(OE_LDFLAGS) $${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
|
||||
LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
@@ -0,0 +1,48 @@
|
||||
Index: openssl-0.9.8m/crypto/Makefile
|
||||
===================================================================
|
||||
--- openssl-0.9.8m.orig/crypto/Makefile 2008-09-18 01:10:55.000000000 +0800
|
||||
+++ openssl-0.9.8m/crypto/Makefile 2010-03-09 16:13:16.055652727 +0800
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
shared: buildinf.h lib subdirs
|
||||
if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
- (cd ..; $(MAKE) $(SHARED_LIB)); \
|
||||
+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
|
||||
fi
|
||||
|
||||
libs:
|
||||
Index: openssl-0.9.8m/Makefile.org
|
||||
===================================================================
|
||||
--- openssl-0.9.8m.orig/Makefile.org 2010-01-28 00:06:36.000000000 +0800
|
||||
+++ openssl-0.9.8m/Makefile.org 2010-03-09 16:14:22.065664019 +0800
|
||||
@@ -355,7 +355,7 @@
|
||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||
if [ "$(FIPSCANLIB)" = "libfips" ]; then \
|
||||
$(ARD) libcrypto.a fipscanister.o ; \
|
||||
- $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
|
||||
+ $(MAKE) -e SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
|
||||
$(AR) libcrypto.a fips/fipscanister.o ; \
|
||||
else \
|
||||
if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
|
||||
@@ -373,7 +373,7 @@
|
||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||
shlibdeps=-lcrypto; \
|
||||
[ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
|
||||
- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
|
||||
+ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
|
||||
else \
|
||||
echo "There's no support for shared libraries on this platform" >&2 ; \
|
||||
exit 1; \
|
||||
Index: openssl-0.9.8m/ssl/Makefile
|
||||
===================================================================
|
||||
--- openssl-0.9.8m.orig/ssl/Makefile 2010-01-21 00:35:30.000000000 +0800
|
||||
+++ openssl-0.9.8m/ssl/Makefile 2010-03-09 16:13:16.065664772 +0800
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
shared: lib
|
||||
if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
- (cd ..; $(MAKE) $(SHARED_LIB)); \
|
||||
+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
|
||||
fi
|
||||
|
||||
files:
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
The number of colons are important :)
|
||||
|
||||
|
||||
Index: openssl-1.0.0a/Configure
|
||||
===================================================================
|
||||
--- openssl-1.0.0a.orig/Configure
|
||||
+++ openssl-1.0.0a/Configure
|
||||
@@ -380,6 +380,22 @@ my %table=(
|
||||
"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
|
||||
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
|
||||
|
||||
+ # Linux on ARM
|
||||
+"linux-elf-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-elf-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-gnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-uclibceabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-uclibceabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+
|
||||
+"linux-avr32","$ENV{'CC'}:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).",
|
||||
+
|
||||
+#### Linux on MIPS/MIPS64
|
||||
+"linux-mips","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-mips64","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -mabi=64 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-mips64el","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -mabi=64 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-mipsel","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+
|
||||
#### *BSD [do see comment about ${BSDthreads} above!]
|
||||
"BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -0,0 +1,515 @@
|
||||
Index: openssl-1.0.0/Makefile
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/Makefile
|
||||
+++ openssl-1.0.0/Makefile
|
||||
@@ -26,10 +26,10 @@ HERE=.
|
||||
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
|
||||
# Normally it is left empty.
|
||||
INSTALL_PREFIX=
|
||||
-INSTALLTOP=/usr/local/ssl
|
||||
+INSTALLTOP=/usr
|
||||
|
||||
# Do not edit this manually. Use Configure --openssldir=DIR do change this!
|
||||
-OPENSSLDIR=/usr/local/ssl
|
||||
+OPENSSLDIR=/usr/lib/ssl
|
||||
|
||||
# NO_IDEA - Define to build without the IDEA algorithm
|
||||
# NO_RC4 - Define to build without the RC4 algorithm
|
||||
@@ -133,12 +133,13 @@ TESTS = alltests
|
||||
|
||||
MAKEFILE= Makefile
|
||||
|
||||
-MANDIR=$(OPENSSLDIR)/man
|
||||
+MANDIR=/usr/share/man
|
||||
MAN1=1
|
||||
MAN3=3
|
||||
-MANSUFFIX=
|
||||
+MANSUFFIX=ssl
|
||||
+MANSECTION=SSL
|
||||
HTMLSUFFIX=html
|
||||
-HTMLDIR=$(OPENSSLDIR)/html
|
||||
+HTMLDIR=/usr/share/doc/openssl/html
|
||||
SHELL=/bin/sh
|
||||
|
||||
TOP= .
|
||||
@@ -149,8 +150,8 @@ LIBS= libcrypto.a libssl.a
|
||||
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
||||
SHARED_SSL=libssl$(SHLIB_EXT)
|
||||
SHARED_LIBS=
|
||||
-SHARED_LIBS_LINK_EXTS=
|
||||
-SHARED_LDFLAGS=
|
||||
+SHARED_LIBS_LINK_EXTS=.so
|
||||
+SHARED_LDFLAGS=-m64 -Wl,--version-script=openssl.ld
|
||||
|
||||
GENERAL= Makefile
|
||||
BASENAME= openssl
|
||||
@@ -324,7 +325,8 @@ libcrypto.pc: Makefile
|
||||
echo 'Description: OpenSSL cryptography library'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lcrypto'; \
|
||||
+ echo 'Libs.private: $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
|
||||
|
||||
libssl.pc: Makefile
|
||||
@@ -337,7 +339,8 @@ libssl.pc: Makefile
|
||||
echo 'Description: Secure Sockets Layer and cryptography libraries'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lssl'; \
|
||||
+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
|
||||
|
||||
openssl.pc: Makefile
|
||||
@@ -350,7 +353,8 @@ openssl.pc: Makefile
|
||||
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
|
||||
+ echo 'Libs.private: $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
||||
|
||||
Makefile: Makefile.org Configure config
|
||||
@@ -499,7 +503,7 @@ install: all install_docs install_sw
|
||||
install_sw:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
|
||||
- $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
|
||||
+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||
@@ -608,7 +612,7 @@ install_docs:
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
- --section=$$sec --center=OpenSSL \
|
||||
+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
@@ -625,7 +629,7 @@ install_docs:
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
- --section=$$sec --center=OpenSSL \
|
||||
+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
Index: openssl-1.0.0/Configure
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/Configure
|
||||
+++ openssl-1.0.0/Configure
|
||||
@@ -1,4 +1,4 @@
|
||||
-:
|
||||
+#!/usr/local/bin/perl
|
||||
eval 'exec perl -S $0 ${1+"$@"}'
|
||||
if $running_under_some_shell;
|
||||
##
|
||||
@@ -331,6 +331,44 @@ my %table=(
|
||||
"osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
|
||||
"tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
|
||||
|
||||
+# Debian GNU/* (various architectures)
|
||||
+"debian-alpha","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-alpha-ev4","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev4 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-alpha-ev5","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev5 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-arm","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-armeb","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-armel","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-hppa","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-ia64","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO -fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -ggdb3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i686 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-m68k","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mv8 -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-openbsd-alpha","gcc:-DTERMIOS -O3 -Wa,--noexecstack -g::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:::::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-openbsd-mips","gcc:-O2 -Wa,--noexecstack -g -DL_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR::::::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_UNROLL DES_RISC2 DES_PTR MD2_CHAR RC4_INDEX::linux_ppc32.o:::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o:::::::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-s390","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sh3", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sh4", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sh3eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sh4eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-m32r","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sparc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -mcpu=v8 -g -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO -O3 -mcpu=v9 -Wa,--noexecstack -Wa,-Av8plus -g -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::md5-sparcv8plus.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+
|
||||
####
|
||||
#### Variety of LINUX:-)
|
||||
####
|
||||
@@ -529,7 +567,7 @@ my %table=(
|
||||
# Cygwin
|
||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
|
||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:coff:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
|
||||
-"debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
|
||||
+-"debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
|
||||
|
||||
# NetWare from David Ward (dsward@novell.com)
|
||||
# requires either MetroWerks NLM development tools, or gcc / nlmconv
|
||||
@@ -1465,6 +1503,8 @@ if ($strict_warnings)
|
||||
}
|
||||
}
|
||||
|
||||
+$shared_ldflag .= " -Wl,--version-script=openssl.ld";
|
||||
+
|
||||
open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
|
||||
unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
|
||||
open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
|
||||
@@ -1555,7 +1595,8 @@ while (<IN>)
|
||||
elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
|
||||
{
|
||||
my $sotmp = $1;
|
||||
- s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
|
||||
+# s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
|
||||
+ s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
|
||||
}
|
||||
elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
|
||||
{
|
||||
@@ -1683,7 +1724,7 @@ while (<IN>)
|
||||
}
|
||||
elsif (/^#define\s+ENGINESDIR/)
|
||||
{
|
||||
- my $foo = "$prefix/$libdir/engines";
|
||||
+ my $foo = "$prefix/lib/ssl/engines";
|
||||
$foo =~ s/\\/\\\\/g;
|
||||
print OUT "#define ENGINESDIR \"$foo\"\n";
|
||||
}
|
||||
Index: openssl-1.0.0/config
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/config
|
||||
+++ openssl-1.0.0/config
|
||||
@@ -170,8 +170,8 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${
|
||||
echo "${MACHINE}-whatever-linux1"; exit 0
|
||||
;;
|
||||
|
||||
- GNU*)
|
||||
- echo "hurd-x86"; exit 0;
|
||||
+ GNU:*|GNU/*:*)
|
||||
+ echo "${MACHINE}-gnuish"; exit 0;
|
||||
;;
|
||||
|
||||
LynxOS:*)
|
||||
Index: openssl-1.0.0/Makefile.org
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/Makefile.org
|
||||
+++ openssl-1.0.0/Makefile.org
|
||||
@@ -131,12 +131,13 @@ TESTS = alltests
|
||||
|
||||
MAKEFILE= Makefile
|
||||
|
||||
-MANDIR=$(OPENSSLDIR)/man
|
||||
+MANDIR=/usr/share/man
|
||||
MAN1=1
|
||||
MAN3=3
|
||||
-MANSUFFIX=
|
||||
+MANSUFFIX=ssl
|
||||
+MANSECTION=SSL
|
||||
HTMLSUFFIX=html
|
||||
-HTMLDIR=$(OPENSSLDIR)/html
|
||||
+HTMLDIR=/usr/share/doc/openssl/html
|
||||
SHELL=/bin/sh
|
||||
|
||||
TOP= .
|
||||
@@ -322,7 +323,8 @@ libcrypto.pc: Makefile
|
||||
echo 'Description: OpenSSL cryptography library'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lcrypto'; \
|
||||
+ echo 'Libs.private: $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
|
||||
|
||||
libssl.pc: Makefile
|
||||
@@ -335,7 +337,8 @@ libssl.pc: Makefile
|
||||
echo 'Description: Secure Sockets Layer and cryptography libraries'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lssl'; \
|
||||
+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
|
||||
|
||||
openssl.pc: Makefile
|
||||
@@ -348,7 +351,8 @@ openssl.pc: Makefile
|
||||
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
||||
+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
|
||||
+ echo 'Libs.private: $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
||||
|
||||
Makefile: Makefile.org Configure config
|
||||
@@ -497,7 +501,7 @@ install: all install_docs install_sw
|
||||
install_sw:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
|
||||
- $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
|
||||
+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||
@@ -606,7 +610,7 @@ install_docs:
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
- --section=$$sec --center=OpenSSL \
|
||||
+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
@@ -623,7 +627,7 @@ install_docs:
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
- --section=$$sec --center=OpenSSL \
|
||||
+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
Index: openssl-1.0.0/openssl.ld
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ openssl-1.0.0/openssl.ld
|
||||
@@ -0,0 +1,5 @@
|
||||
+OPENSSL_0.9.8 {
|
||||
+ global:
|
||||
+ *;
|
||||
+};
|
||||
+
|
||||
Index: openssl-1.0.0/engines/openssl.ld
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ openssl-1.0.0/engines/openssl.ld
|
||||
@@ -0,0 +1,5 @@
|
||||
+OPENSSL_0.9.8 {
|
||||
+ global:
|
||||
+ *;
|
||||
+};
|
||||
+
|
||||
Index: openssl-1.0.0/doc/Makefile
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ openssl-1.0.0/doc/Makefile
|
||||
@@ -0,0 +1,40 @@
|
||||
+VERSION =
|
||||
+
|
||||
+#PODS = $(wildcard *.pod)
|
||||
+#MANS = $(addsuffix .man, $(basename $(PODS)))
|
||||
+
|
||||
+MANS = openssl.1 ssl.3 crypto.3
|
||||
+
|
||||
+P2M = pod2man --center='OpenSSL Documentation' --release="OpenSSL $(VERSION)"
|
||||
+
|
||||
+all: manpages
|
||||
+
|
||||
+.PHONY: manpages
|
||||
+
|
||||
+manpages: openssl.1 crypto.3 ssl.3
|
||||
+
|
||||
+openssl.1:
|
||||
+ $(P2M) --section=1 openssl.pod > openssl.1
|
||||
+
|
||||
+crypto.3:
|
||||
+ $(P2M) --section=3 crypto.pod > crypto.3
|
||||
+
|
||||
+ssl.3:
|
||||
+ $(P2M) --section=3 ssl.pod > ssl.3
|
||||
+
|
||||
+.PHONY: install
|
||||
+install:
|
||||
+ mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
|
||||
+ mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
|
||||
+ install -m 644 -p openssl.1 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
|
||||
+ install -m 644 -p crypto.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
|
||||
+ install -m 644 -p ssl.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
|
||||
+ rm -f $(MANS)
|
||||
+
|
||||
+.PHONY: clean
|
||||
+clean:
|
||||
+ rm -f $(MANS)
|
||||
+
|
||||
+.PHONY: realclean
|
||||
+realclean:
|
||||
+ -$(MAKE) clean
|
||||
Index: openssl-1.0.0/doc/apps/c_rehash.pod
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ openssl-1.0.0/doc/apps/c_rehash.pod
|
||||
@@ -0,0 +1,55 @@
|
||||
+
|
||||
+=pod
|
||||
+
|
||||
+=head1 NAME
|
||||
+
|
||||
+c_rehash - Create symbolic links to files named by the hash values
|
||||
+
|
||||
+=head1 SYNOPSIS
|
||||
+
|
||||
+B<c_rehash>
|
||||
+[directory] ...
|
||||
+
|
||||
+=head1 DESCRIPTION
|
||||
+
|
||||
+c_rehash scans directories and takes a hash value of each .pem and .crt file in the directory. It then creates symbolic links for each of the files named by the hash value. This is useful as many programs require directories to be set up like this in order to find the certificates they require.
|
||||
+
|
||||
+If any directories are named on the command line then these directories are processed in turn. If not then and the environment variable SSL_CERT_DIR is defined then that is consulted. This variable should be a colon (:) separated list of directories, all of which will be processed. If neither of these conditions are true then /usr/lib/ssl/certs is processed.
|
||||
+
|
||||
+For each directory that is to be processed he user must have write permissions on the directory, if they do not then nothing will be printed for that directory.
|
||||
+
|
||||
+Note that this program deletes all the symbolic links that look like ones that it creates before processing a directory. Beware that if you run the program on a directory that contains symbolic links for other purposes that are named in the same format as those created by this program they will be lost.
|
||||
+
|
||||
+The hashes for certificate files are of the form <hash>.<n> where n is an integer. If the hash value already exists then n will be incremented, unless the file is a duplicate. Duplicates are detected using the fingerprint of the certificate. A warning will be printed if a duplicate is detected. The hashes for CRL files are of the form <hash>.r<n> and have the same behavior.
|
||||
+
|
||||
+The program will also warn if there are files with extension .pem which are not certificate or CRL files.
|
||||
+
|
||||
+The program uses the openssl program to compute the hashes and fingerprints. It expects the executable to be named openssl and be on the PATH, or in the /usr/lib/ssl/bin directory. If the OPENSSL environment variable is defined then this is used instead as the executable that provides the hashes and fingerprints. When called as $OPENSSL x509 -hash -fingerprint -noout -in $file it must output the hash of $file on the first line followed by the fingerprint on the second line, optionally prefixed with some text and an equals sign (=).
|
||||
+
|
||||
+=head1 OPTIONS
|
||||
+
|
||||
+None
|
||||
+
|
||||
+=head1 ENVIRONMENT
|
||||
+
|
||||
+=over 4
|
||||
+
|
||||
+=item B<OPENSSL>
|
||||
+
|
||||
+The name (and path) of an executable to use to generate hashes and fingerprints (see above).
|
||||
+
|
||||
+=item B<SSL_CERT_DIR>
|
||||
+
|
||||
+Colon separated list of directories to operate on. Ignored if directories are listed on the command line.
|
||||
+
|
||||
+=head1 SEE ALSO
|
||||
+
|
||||
+L<openssl(1)|openssl(1)>, L<x509(1)|x509(1)>
|
||||
+
|
||||
+=back
|
||||
+
|
||||
+=head1 BUGS
|
||||
+
|
||||
+No known bugs
|
||||
+
|
||||
+=cut
|
||||
Index: openssl-1.0.0/crypto/opensslconf.h
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/crypto/opensslconf.h
|
||||
+++ openssl-1.0.0/crypto/opensslconf.h
|
||||
@@ -11,6 +11,9 @@
|
||||
#ifndef OPENSSL_NO_JPAKE
|
||||
# define OPENSSL_NO_JPAKE
|
||||
#endif
|
||||
+#ifndef OPENSSL_NO_IDEA
|
||||
+# define OPENSSL_NO_IDEA
|
||||
+#endif
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
# define OPENSSL_NO_KRB5
|
||||
#endif
|
||||
@@ -44,6 +47,9 @@
|
||||
# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE)
|
||||
# define NO_JPAKE
|
||||
# endif
|
||||
+# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA)
|
||||
+# define NO_IDEA
|
||||
+# endif
|
||||
# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
|
||||
# define NO_KRB5
|
||||
# endif
|
||||
@@ -68,8 +74,8 @@
|
||||
|
||||
#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
|
||||
#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
|
||||
-#define ENGINESDIR "/usr/local/ssl/lib/engines"
|
||||
-#define OPENSSLDIR "/usr/local/ssl"
|
||||
+#define ENGINESDIR "/usr/lib/ssl/engines"
|
||||
+#define OPENSSLDIR "/usr/lib/ssl"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -100,14 +106,14 @@
|
||||
* - Intel P6 because partial register stalls are very expensive;
|
||||
* - elder Alpha because it lacks byte load/store instructions;
|
||||
*/
|
||||
-#define RC4_INT unsigned int
|
||||
+#define RC4_INT unsigned char
|
||||
#endif
|
||||
#if !defined(RC4_CHUNK)
|
||||
/*
|
||||
* This enables code handling data aligned at natural CPU word
|
||||
* boundary. See crypto/rc4/rc4_enc.c for further details.
|
||||
*/
|
||||
-#undef RC4_CHUNK
|
||||
+#define RC4_CHUNK unsigned long
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -115,7 +121,7 @@
|
||||
/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
|
||||
* %20 speed up (longs are 8 bytes, int's are 4). */
|
||||
#ifndef DES_LONG
|
||||
-#define DES_LONG unsigned long
|
||||
+#define DES_LONG unsigned int
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -126,9 +132,9 @@
|
||||
/* Should we define BN_DIV2W here? */
|
||||
|
||||
/* Only one for the following should be defined */
|
||||
-#undef SIXTY_FOUR_BIT_LONG
|
||||
+#define SIXTY_FOUR_BIT_LONG
|
||||
#undef SIXTY_FOUR_BIT
|
||||
-#define THIRTY_TWO_BIT
|
||||
+#undef THIRTY_TWO_BIT
|
||||
#endif
|
||||
|
||||
#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
|
||||
@@ -140,7 +146,7 @@
|
||||
|
||||
#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
|
||||
#define CONFIG_HEADER_BF_LOCL_H
|
||||
-#undef BF_PTR
|
||||
+#define BF_PTR2
|
||||
#endif /* HEADER_BF_LOCL_H */
|
||||
|
||||
#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
|
||||
@@ -170,7 +176,7 @@ YOU SHOULD NOT HAVE BOTH DES_RISC1 AND D
|
||||
/* Unroll the inner loop, this sometimes helps, sometimes hinders.
|
||||
* Very mucy CPU dependant */
|
||||
#ifndef DES_UNROLL
|
||||
-#undef DES_UNROLL
|
||||
+#define DES_UNROLL
|
||||
#endif
|
||||
|
||||
/* These default values were supplied by
|
||||
Index: openssl-1.0.0/crypto/sha/sha.h
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/crypto/sha/sha.h
|
||||
+++ openssl-1.0.0/crypto/sha/sha.h
|
||||
@@ -59,6 +59,7 @@
|
||||
#ifndef HEADER_SHA_H
|
||||
#define HEADER_SHA_H
|
||||
|
||||
+#include <stddef.h>
|
||||
#include <openssl/e_os2.h>
|
||||
#include <stddef.h>
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
Index: openssl-1.0.0/engines/Makefile
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/engines/Makefile
|
||||
+++ openssl-1.0.0/engines/Makefile
|
||||
@@ -107,7 +107,7 @@
|
||||
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
set -e; \
|
||||
- $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \
|
||||
+ $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines; \
|
||||
for l in $(LIBNAMES); do \
|
||||
( echo installing $$l; \
|
||||
pfx=lib; \
|
||||
@@ -119,13 +119,13 @@
|
||||
*DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
|
||||
*) sfx=".bad";; \
|
||||
esac; \
|
||||
- cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
||||
+ cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \
|
||||
else \
|
||||
sfx=".so"; \
|
||||
- cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
||||
+ cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \
|
||||
fi; \
|
||||
- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
||||
- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
|
||||
+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \
|
||||
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx ); \
|
||||
done; \
|
||||
fi
|
||||
@target=install; $(RECURSIVE_MAKE)
|
||||
Index: openssl-1.0.0/engines/ccgost/Makefile
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/engines/ccgost/Makefile
|
||||
+++ openssl-1.0.0/engines/ccgost/Makefile
|
||||
@@ -53,13 +53,13 @@
|
||||
*DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
|
||||
*) sfx=".bad";; \
|
||||
esac; \
|
||||
- cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
||||
+ cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
||||
else \
|
||||
sfx=".so"; \
|
||||
- cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
||||
+ cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
||||
fi; \
|
||||
- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
||||
- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \
|
||||
+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
||||
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx; \
|
||||
fi
|
||||
|
||||
links:
|
||||
@@ -0,0 +1,27 @@
|
||||
Links to previously staged 0.9.8* easily otherwise
|
||||
|
||||
Index: openssl-1.0.0/Makefile.shared
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/Makefile.shared
|
||||
+++ openssl-1.0.0/Makefile.shared
|
||||
@@ -96,7 +96,7 @@
|
||||
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
- $${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS} )
|
||||
+ $${LDCMD} $${LIBDEPS} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) )
|
||||
|
||||
LINK_SO= \
|
||||
( $(SET_X); \
|
||||
@@ -106,9 +106,9 @@
|
||||
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
- $${SHAREDCMD} $${SHAREDFLAGS} \
|
||||
+ $${SHAREDCMD} $$LIBDEPS $${SHAREDFLAGS} \
|
||||
-o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
|
||||
- $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
|
||||
+ $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS \
|
||||
) && $(SYMLINK_SO)
|
||||
|
||||
SYMLINK_SO= \
|
||||
@@ -0,0 +1,22 @@
|
||||
Index: openssl-1.0.0/Makefile.shared
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/Makefile.shared
|
||||
+++ openssl-1.0.0/Makefile.shared
|
||||
@@ -92,7 +92,7 @@
|
||||
LINK_APP= \
|
||||
( $(SET_X); \
|
||||
LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
|
||||
- LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
|
||||
+ LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$(OE_LDFLAGS) $${LDFLAGS:-$(CFLAGS)}"; \
|
||||
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
@@ -102,7 +102,7 @@
|
||||
( $(SET_X); \
|
||||
LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
|
||||
SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
|
||||
- SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
|
||||
+ SHAREDFLAGS="$(OE_LDFLAGS) $${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
|
||||
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
@@ -0,0 +1,48 @@
|
||||
Index: openssl-1.0.0/crypto/Makefile
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/crypto/Makefile
|
||||
+++ openssl-1.0.0/crypto/Makefile
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
shared: buildinf.h lib subdirs
|
||||
if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
- (cd ..; $(MAKE) $(SHARED_LIB)); \
|
||||
+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
|
||||
fi
|
||||
|
||||
libs:
|
||||
Index: openssl-1.0.0/Makefile.org
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/Makefile.org
|
||||
+++ openssl-1.0.0/Makefile.org
|
||||
@@ -260,7 +260,7 @@
|
||||
|
||||
libcrypto$(SHLIB_EXT): libcrypto.a
|
||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||
- $(MAKE) SHLIBDIRS=crypto build-shared; \
|
||||
+ $(MAKE) -e SHLIBDIRS=crypto build-shared; \
|
||||
else \
|
||||
echo "There's no support for shared libraries on this platform" >&2; \
|
||||
exit 1; \
|
||||
@@ -268,7 +268,7 @@
|
||||
|
||||
libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
|
||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||
- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
|
||||
+ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
|
||||
else \
|
||||
echo "There's no support for shared libraries on this platform" >&2; \
|
||||
exit 1; \
|
||||
Index: openssl-1.0.0/ssl/Makefile
|
||||
===================================================================
|
||||
--- openssl-1.0.0.orig/ssl/Makefile
|
||||
+++ openssl-1.0.0/ssl/Makefile
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
shared: lib
|
||||
if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
- (cd ..; $(MAKE) $(SHARED_LIB)); \
|
||||
+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
|
||||
fi
|
||||
|
||||
files:
|
||||
@@ -0,0 +1,27 @@
|
||||
require openssl.inc
|
||||
|
||||
inherit pkgconfig native
|
||||
|
||||
SRC_URI[src.md5sum] = "ff8fb85610aef328315a9decbb2712e4"
|
||||
SRC_URI[src.sha256sum] = "f731b36de3edaa361179ae6f449668b248a360e34e31e92902d976e9b9d604eb"
|
||||
PR = "${INC_PR}.0"
|
||||
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
export DIRS = "crypto ssl apps engines"
|
||||
|
||||
# This flag can contain target options (e.g -mfpu=neon for armv7-a systems)
|
||||
export FULL_OPTIMIZATION = " "
|
||||
export BUILD_OPTIMIZATION = " "
|
||||
|
||||
SRC_URI += "file://configure-targets.patch \
|
||||
file://shared-libs.patch \
|
||||
file://debian.patch \
|
||||
file://libdeps-first.patch \
|
||||
"
|
||||
|
||||
PARALLEL_MAKE = ""
|
||||
|
||||
CFLAG += " -Wa,--noexecstack "
|
||||
|
||||
NATIVE_INSTALL_WORKS = "1"
|
||||
@@ -0,0 +1,127 @@
|
||||
DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
|
||||
HOMEPAGE = "http://www.openssl.org/"
|
||||
SECTION = "libs/network"
|
||||
|
||||
# "openssl | SSLeay" dual license
|
||||
LICENSE = "openssl"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=83d26c69f6f0172ee7f795790424b453"
|
||||
|
||||
SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz;name=src"
|
||||
S = "${WORKDIR}/openssl-${PV}"
|
||||
|
||||
inherit siteinfo
|
||||
|
||||
INC_PR = "r13"
|
||||
|
||||
AR_append = " r"
|
||||
CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
|
||||
-DTERMIO ${FULL_OPTIMIZATION} -Wall"
|
||||
|
||||
# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom
|
||||
CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}"
|
||||
CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}"
|
||||
|
||||
export DIRS = "crypto ssl apps"
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
export EX_LIBS = "-lgcc -ldl"
|
||||
export AS = "${CC} -c"
|
||||
|
||||
PACKAGES =+ "libcrypto libssl ${PN}-misc"
|
||||
FILES_libcrypto = "${libdir}/libcrypto.so.*"
|
||||
FILES_libssl = "${libdir}/libssl.so.*"
|
||||
FILES_${PN}-misc = "${libdir}/ssl/misc ${libdir}/ssl/openssl.cnf"
|
||||
|
||||
do_configure_prepend_darwin () {
|
||||
sed -i -e '/version-script=openssl\.ld/d' Configure
|
||||
}
|
||||
|
||||
do_configure () {
|
||||
cd util
|
||||
perl perlpath.pl ${STAGING_BINDIR_NATIVE}
|
||||
cd ..
|
||||
ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
|
||||
|
||||
os=${HOST_OS}
|
||||
if [ "x$os" = "xlinux-uclibc" ]; then
|
||||
os=linux
|
||||
elif [ "x$os" = "xlinux-uclibceabi" ]; then
|
||||
os=linux
|
||||
elif [ "x$os" = "xlinux-gnueabi" ]; then
|
||||
os=linux
|
||||
fi
|
||||
target="$os-${HOST_ARCH}"
|
||||
case $target in
|
||||
linux-arm)
|
||||
target=linux-elf-arm
|
||||
;;
|
||||
linux-armeb)
|
||||
target=linux-elf-armeb
|
||||
;;
|
||||
linux-sh3)
|
||||
target=debian-sh3
|
||||
;;
|
||||
linux-sh4)
|
||||
target=debian-sh4
|
||||
;;
|
||||
linux-i486)
|
||||
target=debian-i386-i486
|
||||
;;
|
||||
linux-i586 | linux-viac3)
|
||||
target=debian-i386-i586
|
||||
;;
|
||||
linux-i686)
|
||||
target=debian-i386-i686/cmov
|
||||
;;
|
||||
linux-mips)
|
||||
target=debian-mips
|
||||
;;
|
||||
linux-mipsel)
|
||||
target=debian-mipsel
|
||||
;;
|
||||
linux-powerpc)
|
||||
target=linux-ppc
|
||||
;;
|
||||
linux-gnuspe-powerpc)
|
||||
target=linux-ppc
|
||||
;;
|
||||
linux-supersparc)
|
||||
target=linux-sparcv8
|
||||
;;
|
||||
linux-sparc)
|
||||
target=linux-sparcv8
|
||||
;;
|
||||
darwin-i386)
|
||||
target=darwin-i386-cc
|
||||
;;
|
||||
esac
|
||||
# inject machine-specific flags
|
||||
sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure
|
||||
useprefix=${prefix}
|
||||
if [ "x$useprefix" == "x" ]; then
|
||||
useprefix=/
|
||||
fi
|
||||
perl ./Configure shared --prefix=$useprefix --openssldir=${libdir}/ssl $target
|
||||
}
|
||||
|
||||
do_compile () {
|
||||
oe_runmake
|
||||
}
|
||||
|
||||
do_install () {
|
||||
oe_runmake INSTALL_PREFIX="${D}" install
|
||||
|
||||
# On x86_64, move lib/* to lib64
|
||||
if [ "${libdir}" != "${prefix}/lib" ]
|
||||
then
|
||||
install -d ${D}${libdir} ${D}${libdir}/pkgconfig
|
||||
mv ${D}${prefix}/lib/lib* ${D}${libdir}
|
||||
mv ${D}${prefix}/lib/pkgconfig/*.pc ${D}${libdir}/pkgconfig
|
||||
fi
|
||||
|
||||
oe_libinstall -so libcrypto ${D}${libdir}
|
||||
oe_libinstall -so libssl ${D}${libdir}
|
||||
|
||||
install -d ${D}${includedir}
|
||||
cp --dereference -R include/openssl ${D}${includedir}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
inherit pkgconfig
|
||||
|
||||
require openssl.inc
|
||||
SRC_URI[src.md5sum] = "898bf125370926d5f692a2201124f8ec"
|
||||
SRC_URI[src.sha256sum] = "36037160281cf4977d964e403d2bc0680fbca0a7ff9f65e33136d75fae12cb5b"
|
||||
|
||||
PR = "${INC_PR}.0"
|
||||
|
||||
export OE_LDFLAGS="${LDFLAGS}"
|
||||
|
||||
SRC_URI += "file://configure-targets.patch \
|
||||
file://shared-libs.patch \
|
||||
file://debian.patch \
|
||||
file://oe-ldflags.patch"
|
||||
|
||||
PARALLEL_MAKE = ""
|
||||
@@ -0,0 +1,36 @@
|
||||
inherit pkgconfig
|
||||
|
||||
require openssl.inc
|
||||
|
||||
# For target side versions of openssl enable support for OCF Linux driver
|
||||
# if they are available.
|
||||
DEPENDS += "ocf-linux"
|
||||
CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
|
||||
|
||||
SRC_URI[src.md5sum] = "ff8fb85610aef328315a9decbb2712e4"
|
||||
SRC_URI[src.sha256sum] = "f731b36de3edaa361179ae6f449668b248a360e34e31e92902d976e9b9d604eb"
|
||||
|
||||
PR = "${INC_PR}.2"
|
||||
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
export DIRS = "crypto ssl apps engines"
|
||||
export OE_LDFLAGS="${LDFLAGS}"
|
||||
|
||||
SRC_URI += "file://configure-targets.patch \
|
||||
file://shared-libs.patch \
|
||||
file://debian.patch \
|
||||
file://oe-ldflags.patch \
|
||||
file://libdeps-first.patch \
|
||||
file://engines-install-in-libdir-ssl.patch \
|
||||
"
|
||||
|
||||
PARALLEL_MAKE = ""
|
||||
|
||||
PACKAGES += " \
|
||||
${PN}-engines \
|
||||
${PN}-engines-dbg \
|
||||
"
|
||||
|
||||
FILES_${PN}-engines = "${libdir}/ssl/engines/*.so"
|
||||
FILES_${PN}-engines-dbg = "${libdir}/ssl/engines/.debug"
|
||||
@@ -0,0 +1,20 @@
|
||||
DESCRIPTION = "Universal Hardware Driver Firmware"
|
||||
HOMEPAGE = "http://www.ettus.com"
|
||||
LICENSE = "GPLv3"
|
||||
|
||||
INC_PR = "r0"
|
||||
|
||||
PACKAGE_ARCH = "all"
|
||||
|
||||
SRC_URI = "http://www.ettus.com/downloads/uhd_images/UHD-images-${PV}/UHD-images-${PV}-Linux.tar.gz"
|
||||
|
||||
S = ${WORKDIR}/UHD-images-${PV}-Linux
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${datadir}/uhd/images
|
||||
install -m 0644 ${S}/share/uhd/images/* ${D}${datadir}/uhd/images
|
||||
}
|
||||
|
||||
PACKAGES = "${PN}"
|
||||
FILES_${PN} = ${datadir}/uhd/images
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
require uhd-firmware.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://share/uhd/images/usrp_e100_fpga.bin;md5=38e997b0ea38503d7d7f389ba76d39df"
|
||||
|
||||
PR = "${INC_PR}.0"
|
||||
|
||||
SRC_URI[md5sum] = "6db20f93e3c4646395bd6e8260e2261f"
|
||||
SRC_URI[sha256sum] = "4c73655519cd9f4e49e5727f094b463850b03db13d91a8b0429b789e74a9deea"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
DESCRIPTION = "Universal Hardware Driver for Ettus Research products."
|
||||
HOMEPAGE = "http://www.ettus.com"
|
||||
LICENSE = "GPLV3+"
|
||||
|
||||
DEPENDS = "git-native python-cheetah-native boost libusb1 uhd-firmware"
|
||||
RDEPENDS_${PN} += "uhd-firmware"
|
||||
|
||||
INC_PR = "r4"
|
||||
|
||||
inherit cmake
|
||||
|
||||
PACKAGES =+ "${PN}-tests ${PN}-examples"
|
||||
|
||||
FILES_${PN} += "${libdir}/libuhd.so"
|
||||
FILES_${PN} += "${datadir}/uhd/utils/*"
|
||||
FILES_${PN}-tests += "${datadir}/uhd/tests/*"
|
||||
FILES_${PN}-dbg += "${datadir}/uhd/examples/.debug/*"
|
||||
FILES_${PN}-dbg += "${datadir}/uhd/utils/.debug/*"
|
||||
FILES_${PN}-dbg += "${datadir}/uhd/tests/.debug/*"
|
||||
FILES_${PN}-examples = "${datadir}/uhd/examples/*"
|
||||
|
||||
OECMAKE_BUILDPATH = "${S}/build"
|
||||
OECMAKE_SOURCEPATH = "${S}"
|
||||
|
||||
EXTRA_OECMAKE = "-DENABLE_USRP_E100=TRUE"
|
||||
|
||||
EXTRA_OEMAKE = "-C ${OECMAKE_BUILDPATH}"
|
||||
@@ -0,0 +1,8 @@
|
||||
require uhd.inc
|
||||
|
||||
PR = "${INC_PR}.2"
|
||||
|
||||
SRC_URI = "git://ettus.sourcerepo.com/ettus/uhd.git;protocol=git"
|
||||
S = "${WORKDIR}/git/host"
|
||||
|
||||
SRCREV = "cc639e876f326e958dace8438ae41b8cd9563780"
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
From fb546488e93a1638d377b228bbb0d2ab58462168 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Willmann <daniel@totalueberwachung.de>
|
||||
Date: Thu, 2 Oct 2008 15:50:17 +0800
|
||||
Subject: [PATCH] Make the default DBus reply timeout configurable
|
||||
|
||||
This patch adds an option --with-dbus-default-reply-timeout to configure
|
||||
that will set the default reply timeout used by libdbus in milliseconds.
|
||||
autoconf and autoheader need to be rerun in order to regenerate the
|
||||
correct configure and config.h.in files.
|
||||
---
|
||||
configure.in | 9 +++++++++
|
||||
dbus/dbus-connection-internal.h | 3 ---
|
||||
dbus/dbus-pending-call.c | 1 +
|
||||
3 files changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 62ac387..5c912d7 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -88,6 +88,7 @@ AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]]
|
||||
AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filename]],[file whose owner determines current console owner]))
|
||||
AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)]))
|
||||
AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon]))
|
||||
+AC_ARG_WITH(dbus_default_reply_timeout, AS_HELP_STRING([--with-dbus-default-reply-timeout=[milliseconds]],[Default reply timeout for DBus method calls]))
|
||||
|
||||
AC_DEFINE(DBUS_UNIX,1,[dbus on unix])
|
||||
|
||||
@@ -986,6 +987,13 @@ if test x$have_libaudit = xyes ; then
|
||||
AC_DEFINE(HAVE_LIBAUDIT,1,[audit daemon SELinux support])
|
||||
fi
|
||||
|
||||
+if test -z "$with_dbus_default_reply_timeout" ; then
|
||||
+ DBUS_DEFAULT_REPLY_TIMEOUT=25000
|
||||
+else
|
||||
+ DBUS_DEFAULT_REPLY_TIMEOUT=$with_dbus_default_reply_timeout
|
||||
+fi
|
||||
+AC_DEFINE_UNQUOTED(_DBUS_DEFAULT_TIMEOUT_VALUE,$DBUS_DEFAULT_REPLY_TIMEOUT,[default timeout value for dbus calls])
|
||||
+
|
||||
#### Set up final flags
|
||||
DBUS_CLIENT_CFLAGS=
|
||||
DBUS_CLIENT_LIBS="$THREAD_LIBS"
|
||||
@@ -1348,6 +1356,7 @@ echo "
|
||||
Gettext libs (empty OK): ${INTLLIBS}
|
||||
Using XML parser: ${with_xml}
|
||||
Init scripts style: ${with_init_scripts}
|
||||
+ Default reply timeout: ${DBUS_DEFAULT_REPLY_TIMEOUT}
|
||||
Abstract socket names: ${ac_cv_have_abstract_sockets}
|
||||
System bus socket: ${DBUS_SYSTEM_SOCKET}
|
||||
System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
|
||||
diff --git a/dbus/dbus-connection-internal.h b/dbus/dbus-connection-internal.h
|
||||
index df54412..5fe536b 100644
|
||||
--- a/dbus/dbus-connection-internal.h
|
||||
+++ b/dbus/dbus-connection-internal.h
|
||||
@@ -41,9 +41,6 @@ typedef enum
|
||||
DBUS_ITERATION_BLOCK = 1 << 2 /**< Block if nothing to do. */
|
||||
} DBusIterationFlags;
|
||||
|
||||
-/** default timeout value when waiting for a message reply, 25 seconds */
|
||||
-#define _DBUS_DEFAULT_TIMEOUT_VALUE (25 * 1000)
|
||||
-
|
||||
void _dbus_connection_lock (DBusConnection *connection);
|
||||
void _dbus_connection_unlock (DBusConnection *connection);
|
||||
DBusConnection * _dbus_connection_ref_unlocked (DBusConnection *connection);
|
||||
diff --git a/dbus/dbus-pending-call.c b/dbus/dbus-pending-call.c
|
||||
index 51b9378..5a7a5f4 100644
|
||||
--- a/dbus/dbus-pending-call.c
|
||||
+++ b/dbus/dbus-pending-call.c
|
||||
@@ -21,6 +21,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
+#include <config.h>
|
||||
#include "dbus-internals.h"
|
||||
#include "dbus-connection-internal.h"
|
||||
#include "dbus-pending-call-internal.h"
|
||||
--
|
||||
1.5.6.4
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
Index: dbus-0.94/bus/Makefile.am
|
||||
===================================================================
|
||||
--- dbus-0.94.orig/bus/Makefile.am 2006-10-01 17:36:18.000000000 +0200
|
||||
+++ dbus-0.94/bus/Makefile.am 2006-10-14 21:40:05.000000000 +0200
|
||||
@@ -110,7 +110,7 @@
|
||||
$(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \
|
||||
chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \
|
||||
fi
|
||||
- $(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR)
|
||||
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR)
|
||||
$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
|
||||
$(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
|
||||
@@ -0,0 +1,17 @@
|
||||
require dbus-c++_git.bb
|
||||
inherit native
|
||||
|
||||
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/dbus-c++"
|
||||
# actually dbus-native and expat-native, but even the bearest build machine should have that nowadays...
|
||||
DEPENDS = ""
|
||||
|
||||
do_compile() {
|
||||
oe_runmake -C src libdbus-c++-1.la
|
||||
oe_runmake -C tools dbusxx-xml2cpp
|
||||
install -m 0755 tools/dbusxx-xml2cpp ${STAGING_BINDIR_NATIVE}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
:
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
Index: dbus/tools/Makefile.am
|
||||
===================================================================
|
||||
--- dbus.orig/tools/Makefile.am
|
||||
+++ dbus/tools/Makefile.am
|
||||
@@ -16,7 +16,7 @@ endif
|
||||
bin_PROGRAMS = dbusxx-xml2cpp dbusxx-introspect
|
||||
|
||||
dbusxx_xml2cpp_SOURCES = xml.h xml.cpp xml2cpp.h xml2cpp.cpp
|
||||
-dbusxx_xml2cpp_LDADD = $(libdbus_cxx_la)
|
||||
+dbusxx_xml2cpp_LDADD = $(libdbus_cxx_la) -lexpat
|
||||
|
||||
dbusxx_introspect_SOURCES = introspect.h introspect.cpp
|
||||
dbusxx_introspect_LDADD = $(libdbus_cxx_la)
|
||||
@@ -0,0 +1,23 @@
|
||||
DESCRIPTION = "C++ bindings for dbus"
|
||||
LICENSE = "LGPLv2.1+"
|
||||
SECTION = "libs"
|
||||
DEPENDS = "dbus dbus-c++-native expat"
|
||||
SRCREV = "530a887913d3b0dd7091eabb8eef8e3c279e3bb8"
|
||||
|
||||
PE = "1"
|
||||
PV = "0.5.0+gitr${SRCPV}"
|
||||
|
||||
SRC_URI = "git://gitorious.org/dbus-cplusplus/mainline.git;protocol=git"
|
||||
# file://fix-linking.patch"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
do_compile_prepend() {
|
||||
find . -name "Makefile.am" |xargs sed -i -e 's,$(top_builddir)/tools/dbusxx-xml2cpp,dbusxx-xml2cpp,'
|
||||
}
|
||||
|
||||
FILES_${PN}-dbg += "${bindir}/dbusxx-xml2cpp ${bindir}/dbusxx-introspect"
|
||||
FILES_${PN}-dev += "${bindir}/.dev"
|
||||
FILES_${PN} = "${libdir}/*.so.*"
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
DESCRIPTION = "dbus forwarding daemon"
|
||||
LICENSE = "LGPLv2.1+"
|
||||
DEPENDS = "dbus dbus-glib"
|
||||
SRCREV = "1226a0a1374628ff191f6d8a56000be5e53e7608"
|
||||
PV = "0.0.0+gitr${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://git.collabora.co.uk/git/user/alban/dbus-daemon-proxy;protocol=git"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
do_compile() {
|
||||
${CC} ${LDFLAGS} `pkg-config --cflags --libs dbus-glib-1` -o dbus-daemon-proxy dbus-daemon-proxy.c
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 dbus-daemon-proxy ${D}${bindir}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
DESCRIPTION = "A message bus system for inter-process communication"
|
||||
HOMEPAGE = "http://dbus.freedesktop.org"
|
||||
SECTION = "base"
|
||||
LICENSE = "AFL2.1 | GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
|
||||
file://dbus/dbus.h;firstline=6;endline=20;md5=6eea2e0c7750dd8e620dcb1437312fa5"
|
||||
DEPENDS = "expat virtual/libintl libsm libice virtual/libx11"
|
||||
|
||||
INC_PR = "r20"
|
||||
|
||||
SRC_URI = "\
|
||||
http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz;name=dbus \
|
||||
file://cross.patch \
|
||||
file://tmpdir.patch \
|
||||
file://fix-install-daemon.patch \
|
||||
file://0001-Make-the-default-DBus-reply-timeout-configurable.patch \
|
||||
file://dbus-1.init \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/dbus-${PV}"
|
||||
|
||||
inherit autotools pkgconfig update-rc.d gettext
|
||||
|
||||
EXTRA_OECONF_X = "--with-x"
|
||||
|
||||
EXTRA_OECONF = "\
|
||||
--disable-qt \
|
||||
--disable-qt3 \
|
||||
--disable-gtk \
|
||||
--disable-tests \
|
||||
--disable-checks \
|
||||
--disable-xml-docs \
|
||||
--disable-doxygen-docs \
|
||||
--disable-libaudit \
|
||||
--with-xml=expat \
|
||||
--with-dbus-default-reply-timeout=200000 \
|
||||
${EXTRA_OECONF_X} \
|
||||
"
|
||||
|
||||
# On mipsel, D-Bus fails to link with --gc-sections and segfaults before main()
|
||||
# when built with -fPIE/-pie.
|
||||
do_configure_prepend_mipsel() {
|
||||
sed -i -e 's/\-fPIE//' \
|
||||
-e 's/\-pie\ \-Wl\,\-z\,relro//' \
|
||||
-e 's/-Wl,--gc-sections//' \
|
||||
${S}/configure.in
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/dbus-1.init ${D}${sysconfdir}/init.d/dbus-1
|
||||
# the stock install seems to install the libtool wrapper script, so we have to copy this manually :M:
|
||||
if [ -e bus/.libs/dbus-daemon-launch-helper ]; then
|
||||
install -d ${D}${libexecdir}/
|
||||
install -m 0755 bus/.libs/dbus-daemon-launch-helper ${D}${libexecdir}/
|
||||
fi
|
||||
}
|
||||
|
||||
RDEPENDS_${PN}-x11 = "${PN}"
|
||||
RRECOMMENDS_${PN}-lib = "${PN}"
|
||||
RCONFLICTS_${PN} = "dbus-1"
|
||||
RREPLACES_${PN} = "dbus-1"
|
||||
RPROVIDES_${PN} = "dbus-1"
|
||||
|
||||
PACKAGES =+ "${PN}-lib ${PN}-x11"
|
||||
|
||||
FILES_${PN} = "\
|
||||
${bindir}/dbus-daemon* \
|
||||
${bindir}/dbus-uuidgen \
|
||||
${bindir}/dbus-cleanup-sockets \
|
||||
${bindir}/dbus-send \
|
||||
${bindir}/dbus-monitor \
|
||||
${libexecdir}/dbus* \
|
||||
${sysconfdir} \
|
||||
${datadir}/dbus-1/services \
|
||||
${datadir}/dbus-1/system-services \
|
||||
"
|
||||
FILES_${PN}-lib = "${libdir}/lib*.so.*"
|
||||
FILES_${PN}-x11 = "\
|
||||
${bindir}/dbus-launch \
|
||||
"
|
||||
FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool ${libdir}/"
|
||||
|
||||
pkg_postinst_${PN}() {
|
||||
#!/bin/sh
|
||||
# can't do adduser stuff offline
|
||||
if [ "x$D" != "x" ]; then
|
||||
exit 1
|
||||
fi
|
||||
MESSAGEUSER=messagebus
|
||||
MESSAGEHOME=/var/run/dbus
|
||||
mkdir -p $MESSAGEHOME || true
|
||||
grep -q ^$MESSAGEUSER: /etc/group || addgroup "$MESSAGEUSER"
|
||||
chgrp "$MESSAGEUSER" "$MESSAGEHOME"
|
||||
grep -q ^$MESSAGEUSER: /etc/passwd || adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password --ingroup "$MESSAGEUSER" "$MESSAGEUSER"
|
||||
chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME"
|
||||
grep -q netdev: /etc/group || addgroup netdev
|
||||
chmod u+s /usr/libexec/dbus-daemon-launch-helper
|
||||
}
|
||||
|
||||
CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
|
||||
|
||||
INITSCRIPT_NAME = "dbus-1"
|
||||
INITSCRIPT_PARAMS = "start 02 5 2 . stop 20 0 1 6 ."
|
||||
@@ -0,0 +1,48 @@
|
||||
Index: dbus-1.3.1/configure.in
|
||||
===================================================================
|
||||
--- dbus-1.3.1.orig/configure.in
|
||||
+++ dbus-1.3.1/configure.in
|
||||
@@ -137,6 +137,7 @@
|
||||
AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filename]],[file whose owner determines current console owner]))
|
||||
AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)]))
|
||||
AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon]))
|
||||
+AC_ARG_WITH(dbus_default_reply_timeout, AS_HELP_STRING([--with-dbus-default-reply-timeout=[milliseconds]],[Default reply timeout for DBus method calls]))
|
||||
|
||||
dnl DBUS_BUILD_TESTS controls unit tests built in to .c files
|
||||
dnl and also some stuff in the test/ subdir
|
||||
@@ -984,6 +985,13 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+if test -z "$with_dbus_default_reply_timeout" ; then
|
||||
+ DBUS_DEFAULT_REPLY_TIMEOUT=25000
|
||||
+else
|
||||
+ DBUS_DEFAULT_REPLY_TIMEOUT=$with_dbus_default_reply_timeout
|
||||
+fi
|
||||
+AC_DEFINE_UNQUOTED(_DBUS_DEFAULT_TIMEOUT_VALUE,$DBUS_DEFAULT_REPLY_TIMEOUT,[default timeout value for dbus calls])
|
||||
+
|
||||
#### Set up final flags
|
||||
DBUS_CLIENT_CFLAGS=
|
||||
DBUS_CLIENT_LIBS="$THREAD_LIBS $NETWORK_libs"
|
||||
@@ -1625,6 +1633,7 @@
|
||||
Gettext libs (empty OK): ${INTLLIBS}
|
||||
Using XML parser: ${with_xml}
|
||||
Init scripts style: ${with_init_scripts}
|
||||
+ Default reply timeout: ${DBUS_DEFAULT_REPLY_TIMEOUT}
|
||||
Abstract socket names: ${ac_cv_have_abstract_sockets}
|
||||
System bus socket: ${DBUS_SYSTEM_SOCKET}
|
||||
System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
|
||||
Index: dbus-1.3.1/dbus/dbus-connection-internal.h
|
||||
===================================================================
|
||||
--- dbus-1.3.1.orig/dbus/dbus-connection-internal.h
|
||||
+++ dbus-1.3.1/dbus/dbus-connection-internal.h
|
||||
@@ -41,9 +41,6 @@
|
||||
DBUS_ITERATION_BLOCK = 1 << 2 /**< Block if nothing to do. */
|
||||
} DBusIterationFlags;
|
||||
|
||||
-/** default timeout value when waiting for a message reply, 25 seconds */
|
||||
-#define _DBUS_DEFAULT_TIMEOUT_VALUE (25 * 1000)
|
||||
-
|
||||
void _dbus_connection_lock (DBusConnection *connection);
|
||||
void _dbus_connection_unlock (DBusConnection *connection);
|
||||
DBusConnection * _dbus_connection_ref_unlocked (DBusConnection *connection);
|
||||
@@ -0,0 +1,13 @@
|
||||
diff -Naur dbus-1.2.1.orig/dbus/dbus-transport.c dbus-1.2.1/dbus/dbus-transport.c
|
||||
--- dbus-1.2.1.orig/dbus/dbus-transport.c 2008-09-16 15:10:02.000000000 +0000
|
||||
+++ dbus-1.2.1/dbus/dbus-transport.c 2008-09-16 15:10:10.000000000 +0000
|
||||
@@ -747,6 +747,9 @@
|
||||
dbus_bool_t allow;
|
||||
DBusCredentials *auth_identity;
|
||||
|
||||
+ // allow anonymous connections
|
||||
+ _dbus_transport_set_allow_anonymous(transport, TRUE);
|
||||
+
|
||||
auth_identity = _dbus_auth_get_identity (transport->auth);
|
||||
_dbus_assert (auth_identity != NULL);
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
#! /bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Debian init.d script for D-BUS
|
||||
# Copyright © 2003 Colin Walters <walters@debian.org>
|
||||
# Copyright 2008 OE Team
|
||||
|
||||
set -e
|
||||
|
||||
DAEMON=/usr/bin/dbus-daemon
|
||||
NAME=dbus
|
||||
DAEMONUSER=messagebus
|
||||
RUNDIR=/var/run/dbus
|
||||
PIDFILE=/var/run/dbus/pid
|
||||
UUIDDIR=/var/lib/dbus
|
||||
DESC="system message bus"
|
||||
EVENTDIR=/etc/dbus-1/event.d
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
# Source defaults file; edit that file to configure this script.
|
||||
ENABLED=1
|
||||
PARAMS=""
|
||||
if [ -e /etc/default/dbus ]; then
|
||||
. /etc/default/dbus
|
||||
fi
|
||||
|
||||
test "$ENABLED" != "0" || exit 0
|
||||
|
||||
start_it_up()
|
||||
{
|
||||
if [ ! -d $RUNDIR ]; then
|
||||
mkdir -p $RUNDIR
|
||||
chown $DAEMONUSER $RUNDIR
|
||||
chgrp $DAEMONUSER $RUNDIR
|
||||
fi
|
||||
if [ -e $PIDFILE ]; then
|
||||
PIDDIR=/proc/$(cat $PIDFILE)
|
||||
if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
|
||||
echo "$DESC already started; not starting."
|
||||
else
|
||||
echo "Removing stale PID file $PIDFILE."
|
||||
rm -f $PIDFILE
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d $UUIDDIR ]; then
|
||||
mkdir -p $UUIDDIR
|
||||
chown $DAEMONUSER $UUIDDIR
|
||||
chgrp $DAEMONUSER $UUIDDIR
|
||||
fi
|
||||
|
||||
dbus-uuidgen --ensure
|
||||
|
||||
echo -n "Starting $DESC: "
|
||||
start-stop-daemon --start --pidfile $PIDFILE \
|
||||
--user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
|
||||
echo "$NAME."
|
||||
if [ -d $EVENTDIR ]; then
|
||||
run-parts --arg=start $EVENTDIR
|
||||
fi
|
||||
}
|
||||
|
||||
shut_it_down()
|
||||
{
|
||||
if [ -d $EVENTDIR ]; then
|
||||
# TODO: --reverse when busybox supports it
|
||||
run-parts --arg=stop $EVENTDIR
|
||||
fi
|
||||
echo -n "Stopping $DESC: "
|
||||
start-stop-daemon --stop --oknodo --pidfile $PIDFILE \
|
||||
--user $DAEMONUSER
|
||||
# We no longer include these arguments so that start-stop-daemon
|
||||
# can do its job even given that we may have been upgraded.
|
||||
# We rely on the pidfile being sanely managed
|
||||
# --exec $DAEMON -- --system $PARAMS
|
||||
echo "$NAME."
|
||||
rm -f $PIDFILE
|
||||
}
|
||||
|
||||
reload_it()
|
||||
{
|
||||
echo -n "Reloading $DESC config: "
|
||||
dbus-send --print-reply --system --type=method_call \
|
||||
--dest=org.freedesktop.DBus \
|
||||
/ org.freedesktop.DBus.ReloadConfig > /dev/null
|
||||
# hopefully this is enough time for dbus to reload it's config file.
|
||||
echo "done."
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start_it_up
|
||||
;;
|
||||
stop)
|
||||
shut_it_down
|
||||
;;
|
||||
reload|force-reload)
|
||||
reload_it
|
||||
;;
|
||||
restart)
|
||||
shut_it_down
|
||||
sleep 1
|
||||
start_it_up
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,64 @@
|
||||
From 8f5f340b77b51fed1f036a9ee9f70a31b201f2c9 Mon Sep 17 00:00:00 2001
|
||||
From: Sledz <sledz@MOBIL-400-586.intern.dresearch.de>
|
||||
Date: Tue, 29 Jun 2010 21:04:15 +0000
|
||||
Subject: sysdeps-unix: enable address reuse on TCP sockets
|
||||
|
||||
This helps to avoid 'Address already in use' problems if server has been shut
|
||||
down, and then restarted while sockets are still active on its port.
|
||||
|
||||
Signed-off-by: Steffen Sledz <sledz@dresearch.de>
|
||||
---
|
||||
diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
|
||||
index ce3475a..b58d09a 100644
|
||||
--- a/dbus/dbus-sysdeps-unix.c
|
||||
+++ b/dbus/dbus-sysdeps-unix.c
|
||||
@@ -623,6 +623,7 @@ _dbus_listen_unix_socket (const char *path,
|
||||
int listen_fd;
|
||||
struct sockaddr_un addr;
|
||||
size_t path_len;
|
||||
+ unsigned int reuseaddr;
|
||||
|
||||
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
|
||||
|
||||
@@ -696,7 +697,15 @@ _dbus_listen_unix_socket (const char *path,
|
||||
|
||||
strncpy (addr.sun_path, path, path_len);
|
||||
}
|
||||
-
|
||||
+
|
||||
+ reuseaddr = 1;
|
||||
+ if (setsockopt (listen_fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr))==-1)
|
||||
+ {
|
||||
+ dbus_set_error (error, _dbus_error_from_errno (errno),
|
||||
+ "Failed to set socket option\"%s\": %s",
|
||||
+ path, _dbus_strerror (errno));
|
||||
+ }
|
||||
+
|
||||
if (bind (listen_fd, (struct sockaddr*) &addr, _DBUS_STRUCT_OFFSET (struct sockaddr_un, sun_path) + path_len) < 0)
|
||||
{
|
||||
dbus_set_error (error, _dbus_error_from_errno (errno),
|
||||
@@ -870,6 +879,7 @@ _dbus_listen_tcp_socket (const char *host,
|
||||
int nlisten_fd = 0, *listen_fd = NULL, res, i;
|
||||
struct addrinfo hints;
|
||||
struct addrinfo *ai, *tmp;
|
||||
+ unsigned int reuseaddr;
|
||||
|
||||
*fds_p = NULL;
|
||||
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
|
||||
@@ -915,6 +925,14 @@ _dbus_listen_tcp_socket (const char *host,
|
||||
}
|
||||
_DBUS_ASSERT_ERROR_IS_CLEAR(error);
|
||||
|
||||
+ reuseaddr = 1;
|
||||
+ if (setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr))==-1)
|
||||
+ {
|
||||
+ dbus_set_error (error, _dbus_error_from_errno (errno),
|
||||
+ "Failed to set socket option \"%s:%s\": %s",
|
||||
+ host ? host : "*", port, _dbus_strerror (errno));
|
||||
+ }
|
||||
+
|
||||
if (bind (fd, (struct sockaddr*) tmp->ai_addr, tmp->ai_addrlen) < 0)
|
||||
{
|
||||
_dbus_close(fd, NULL);
|
||||
--
|
||||
cgit v0.8.3-6-g21f6
|
||||
@@ -0,0 +1,38 @@
|
||||
From d365dd8141e709222f3a619d7b04ec4ded6429fd Mon Sep 17 00:00:00 2001
|
||||
From: Havoc Pennington <hp@pobox.com>
|
||||
Date: Tue, 31 Aug 2010 15:59:09 +0000
|
||||
Subject: Change failure of setsockopt SO_REUSEADDR to be a warning, not set an error
|
||||
|
||||
It was previously setting an error but then continuing, which is
|
||||
not allowed since errors can't be "piled up"
|
||||
---
|
||||
diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
|
||||
index e4ff6ee..3205bed 100644
|
||||
--- a/dbus/dbus-sysdeps-unix.c
|
||||
+++ b/dbus/dbus-sysdeps-unix.c
|
||||
@@ -980,9 +980,8 @@ _dbus_listen_unix_socket (const char *path,
|
||||
reuseaddr = 1;
|
||||
if (setsockopt (listen_fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr))==-1)
|
||||
{
|
||||
- dbus_set_error (error, _dbus_error_from_errno (errno),
|
||||
- "Failed to set socket option\"%s\": %s",
|
||||
- path, _dbus_strerror (errno));
|
||||
+ _dbus_warn ("Failed to set socket option\"%s\": %s",
|
||||
+ path, _dbus_strerror (errno));
|
||||
}
|
||||
|
||||
if (bind (listen_fd, (struct sockaddr*) &addr, _DBUS_STRUCT_OFFSET (struct sockaddr_un, sun_path) + path_len) < 0)
|
||||
@@ -1335,9 +1334,8 @@ _dbus_listen_tcp_socket (const char *host,
|
||||
reuseaddr = 1;
|
||||
if (setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr))==-1)
|
||||
{
|
||||
- dbus_set_error (error, _dbus_error_from_errno (errno),
|
||||
- "Failed to set socket option \"%s:%s\": %s",
|
||||
- host ? host : "*", port, _dbus_strerror (errno));
|
||||
+ _dbus_warn ("Failed to set socket option \"%s:%s\": %s",
|
||||
+ host ? host : "*", port, _dbus_strerror (errno));
|
||||
}
|
||||
|
||||
if (bind (fd, (struct sockaddr*) tmp->ai_addr, tmp->ai_addrlen) < 0)
|
||||
--
|
||||
cgit v0.8.3-6-g21f6
|
||||
@@ -0,0 +1,30 @@
|
||||
--- dbus-0.22/configure.in.orig 2004-08-13 00:57:16.000000000 +0200
|
||||
+++ dbus-0.22/configure.in 2004-12-30 21:15:57.000000000 +0100
|
||||
@@ -1047,15 +1048,18 @@
|
||||
AC_SUBST(ABSOLUTE_TOP_BUILDDIR)
|
||||
|
||||
#### Find socket directories
|
||||
-if ! test -z "$TMPDIR" ; then
|
||||
- DEFAULT_SOCKET_DIR=$TMPDIR
|
||||
-elif ! test -z "$TEMP" ; then
|
||||
- DEFAULT_SOCKET_DIR=$TEMP
|
||||
-elif ! test -z "$TMP" ; then
|
||||
- DEFAULT_SOCKET_DIR=$TMP
|
||||
-else
|
||||
- DEFAULT_SOCKET_DIR=/tmp
|
||||
-fi
|
||||
+#if ! test -z "$TMPDIR" ; then
|
||||
+# DEFAULT_SOCKET_DIR=$TMPDIR
|
||||
+#elif ! test -z "$TEMP" ; then
|
||||
+# DEFAULT_SOCKET_DIR=$TEMP
|
||||
+#elif ! test -z "$TMP" ; then
|
||||
+# DEFAULT_SOCKET_DIR=$TMP
|
||||
+#else
|
||||
+# DEFAULT_SOCKET_DIR=/tmp
|
||||
+#fi
|
||||
+
|
||||
+# checks disabled to avoid expanding this at build time
|
||||
+DEFAULT_SOCKET_DIR=/tmp
|
||||
|
||||
if ! test -z "$with_test_socket_dir" ; then
|
||||
TEST_SOCKET_DIR="$with_test_socket_dir"
|
||||
@@ -0,0 +1,19 @@
|
||||
include dbus.inc
|
||||
|
||||
PR = "${INC_PR}.1"
|
||||
|
||||
SRC_URI = "\
|
||||
http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz;name=dbus \
|
||||
file://tmpdir.patch \
|
||||
file://fix-install-daemon.patch \
|
||||
file://0001-Make-the-default-DBus-reply-timeout-configurable.patch \
|
||||
file://dbus-1.init \
|
||||
file://reuseaddr01.patch \
|
||||
file://reuseaddr02.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_hipox = "file://anon.patch"
|
||||
|
||||
SRC_URI[dbus.md5sum] = "565346cecd9cfecf1463540c6086cc2c"
|
||||
SRC_URI[dbus.sha256sum] = "f12c748f4a703655e3d4c3db94cdf5a752a0cd0b36958c715804373bd3595c48"
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
include dbus.inc
|
||||
PR = "${INC_PR}.0"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
SRC_URI = "\
|
||||
http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
|
||||
\
|
||||
file://tmpdir.patch \
|
||||
file://add-configurable-reply-timeouts.patch \
|
||||
file://dbus-1.init \
|
||||
"
|
||||
|
||||
# This needs more testing before pushing as default dbus
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
SRC_URI[md5sum] = "f59618b18d2fb2bd1fce9e1c5a2a3282"
|
||||
SRC_URI[sha256sum] = "c96d2f86d40e158e2bf405925a0a42cce0533a8466098e2f2238aa1614926652"
|
||||
@@ -0,0 +1,21 @@
|
||||
require fakeroot_${PV}.bb
|
||||
|
||||
SRC_URI += "file://fix-prefix.patch"
|
||||
S = "${WORKDIR}/fakeroot-${PV}"
|
||||
|
||||
inherit native
|
||||
|
||||
EXTRA_OECONF = "--program-prefix="
|
||||
|
||||
# Compatability for the rare systems not using or having SYSV
|
||||
python () {
|
||||
if bb.data.getVar('HOST_NONSYSV', d, True) and bb.data.getVar('HOST_NONSYSV', d, True) != '0':
|
||||
bb.data.setVar('EXTRA_OECONF', ' --with-ipc=tcp --program-prefix= ', d)
|
||||
}
|
||||
|
||||
NATIVE_INSTALL_WORKS = "1"
|
||||
|
||||
RDEPENDS_${PN} = "util-linux-native"
|
||||
|
||||
SRC_URI[md5sum] = "aaefede2405a40c87438e7e833d69b70"
|
||||
SRC_URI[sha256sum] = "dbcab1f495b857e67feff882e018ca59958b8d189ff1f76684d28e35463ec29d"
|
||||
@@ -0,0 +1,20 @@
|
||||
Index: fakeroot-1.12.1/configure.ac
|
||||
===================================================================
|
||||
--- fakeroot-1.12.1.orig/configure.ac
|
||||
+++ fakeroot-1.12.1/configure.ac
|
||||
@@ -2,14 +2,12 @@
|
||||
AC_INIT([fakeroot],[FAKEROOT_VERSION],[schizo@debian.org],[fakeroot])
|
||||
AC_PREREQ(2.61)
|
||||
AC_CONFIG_MACRO_DIR([build-aux])
|
||||
-LT_PREREQ(2.1a)
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_MAINTAINER_MODE
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_PROG_MAKE_SET
|
||||
-LT_INIT
|
||||
-LT_LANG(C)
|
||||
+AC_PROG_LIBTOOL
|
||||
|
||||
AH_BOTTOM([#if ! HAVE_BUILTIN_EXPECT
|
||||
#define __builtin_expect(x, expected_value) (x)
|
||||
@@ -0,0 +1,15 @@
|
||||
Index: fakeroot-1.12.1/scripts/fakeroot.in
|
||||
===================================================================
|
||||
--- fakeroot-1.12.1.orig/scripts/fakeroot.in
|
||||
+++ fakeroot-1.12.1/scripts/fakeroot.in
|
||||
@@ -30,8 +30,8 @@
|
||||
}
|
||||
|
||||
# strip /bin/fakeroot to find install prefix
|
||||
-PREFIX=@prefix@
|
||||
-BINDIR=@bindir@
|
||||
+BINDIR=`dirname $0`
|
||||
+PREFIX=`dirname ${BINDIR}`
|
||||
|
||||
USEABSLIBPATH=@LDPRELOADABS@
|
||||
LIB=lib@fakeroot_transformed@@DLSUFFIX@
|
||||
@@ -0,0 +1,26 @@
|
||||
DESCRIPTION = "Gives a fake root environment"
|
||||
HOMEPAGE = "http://fakeroot.alioth.debian.org"
|
||||
SECTION = "base"
|
||||
LICENSE = "GPL"
|
||||
PR = "r2"
|
||||
|
||||
SRC_URI = "\
|
||||
${DEBIAN_MIRROR}/main/f/fakeroot/fakeroot_${PV}.tar.gz \
|
||||
file://configure-libtool.patch \
|
||||
"
|
||||
|
||||
inherit autotools
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}${includedir}/fakeroot
|
||||
install -m 644 *.h ${D}${includedir}/fakeroot
|
||||
install -d ${D}${libdir}/libfakeroot/
|
||||
oe_libinstall -so libfakeroot ${D}${libdir}/libfakeroot/
|
||||
}
|
||||
|
||||
# fakeroot needs getopt which is provided by the util-linux package
|
||||
RDEPENDS_${PN} = "util-linux"
|
||||
|
||||
|
||||
SRC_URI[md5sum] = "aaefede2405a40c87438e7e833d69b70"
|
||||
SRC_URI[sha256sum] = "dbcab1f495b857e67feff882e018ca59958b8d189ff1f76684d28e35463ec29d"
|
||||
@@ -0,0 +1,4 @@
|
||||
# Default for /etc/init.d/udev
|
||||
|
||||
# Comment this out to disable device cache
|
||||
#DEVCACHE="/etc/dev.tar"
|
||||
@@ -0,0 +1,49 @@
|
||||
KERNEL=="ttyS[0-9]", NAME="tts/%n", SYMLINK+="tts%n"
|
||||
KERNEL=="ttymxc[0-9]", NAME="ttymxc/%n", SYMLINK+="ttymxc%n"
|
||||
|
||||
KERNEL=="mxc_mu[0-9]", NAME="mxc_mu/%n", SYMLINK+="mxc_mu%n"
|
||||
KERNEL=="fb*", NAME="fb/%n", SYMLINK+="fb%n"
|
||||
KERNEL=="i2c*", NAME="i2c/%n"
|
||||
KERNEL=="mxc_ipc*", NAME="mxc_ipc/%n"
|
||||
KERNEL=="video*", NAME="v4l/video%n"
|
||||
|
||||
KERNEL=="rtc", NAME="misc/rtc"
|
||||
KERNEL=="watchdog", NAME="misc/watchdog"
|
||||
|
||||
KERNEL=="mc13783_adc", NAME="mc13783_adc", SYMLINK+="ts"
|
||||
KERNEL=="pmic_adc", NAME="pmic_adc", SYMLINK+="ts"
|
||||
|
||||
# The long class name gets cut off to be mc13783_connectiv in
|
||||
# /sys/class/mc13783_connectivity/mc13783_connectivit
|
||||
KERNEL=="mc13783_connectiv*", NAME="mc13783_connectivity"
|
||||
|
||||
KERNEL=="mxc_ssi[0-9]*", NAME="mxc_ssi/%n", SYMLINK+="mxc_ssi%n"
|
||||
KERNEL=="spi[0-9]*", NAME="spi/%n", SYMLINK+="spi%n"
|
||||
|
||||
KERNEL=="mtdblock*", NAME="mtdblock/%n" SYMLINK+="mtdblock%n"
|
||||
KERNEL=="mtd[0-9]", NAME="mtd/%n"
|
||||
|
||||
# A more elegant way of doing this must exist...
|
||||
KERNEL=="mtd0ro", NAME="mtd/0ro"
|
||||
KERNEL=="mtd1ro", NAME="mtd/1ro"
|
||||
KERNEL=="mtd2ro", NAME="mtd/2ro"
|
||||
KERNEL=="mtd3ro", NAME="mtd/3ro"
|
||||
KERNEL=="mtd4ro", NAME="mtd/4ro"
|
||||
KERNEL=="mtd5ro", NAME="mtd/5ro"
|
||||
KERNEL=="mtd6ro", NAME="mtd/6ro"
|
||||
KERNEL=="mtd7ro", NAME="mtd/7ro"
|
||||
KERNEL=="mtd8ro", NAME="mtd/8ro"
|
||||
KERNEL=="mtd9ro", NAME="mtd/9ro"
|
||||
|
||||
# Note that we want /dev/dsp linked to /dev/sound/dsp1...
|
||||
KERNEL=="dsp", NAME="sound/dsp"
|
||||
KERNEL=="dspW", NAME="sound/dspW"
|
||||
KERNEL=="dsp1", NAME="sound/dsp1", SYMLINK+="dsp"
|
||||
KERNEL=="mixer", NAME="sound/mixer", SYMLINK+="mixer"
|
||||
KERNEL=="sequencer", NAME="sound/sequencer"
|
||||
KERNEL=="sequencer2", NAME="sound/sequencer2"
|
||||
|
||||
KERNEL=="ram[0-9]*", NAME="ram/%n", SYMLINK+="ram%n"
|
||||
|
||||
KERNEL=="dvfs_dptc", NAME="dvfs_dptc", SYMLINK+="dptc dvfs"
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
##
|
||||
## BUG/BMI specific
|
||||
##
|
||||
KERNEL=="event*", ATTRS{name}=="bugnav", SYMLINK+="input/bugnav"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_motion", SYMLINK+="input/bmi_motion"
|
||||
KERNEL=="event*", ATTRS{name}=="bug_cam", SYMLINK+="input/bmi_cam"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m1", SYMLINK+="input/bmi_audio_m1"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m2", SYMLINK+="input/bmi_audio_m2"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m3", SYMLINK+="input/bmi_audio_m3"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m4", SYMLINK+="input/bmi_audio_m4"
|
||||
DEVPATH=="/devices/platform/bugfb.0", SYMLINK+="bugfb"
|
||||
KERNEL=="rtc0", SYMLINK+="rtc"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts0", SYMLINK+="input/bmi_lcd_ts0"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts1", SYMLINK+="input/bmi_lcd_ts1"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts2", SYMLINK+="input/bmi_lcd_ts2"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts3", SYMLINK+="input/bmi_lcd_ts3"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts4", SYMLINK+="input/bmi_lcd_ts4"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts5", SYMLINK+="input/bmi_lcd_ts5"
|
||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts6", SYMLINK+="input/bmi_lcd_ts6"
|
||||
ACTION=="add", DEVPATH=="/devices/conn*", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
|
||||
ACTION=="remove", DEVPATH=="/devices/conn*", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
|
||||
#
|
||||
# For USB PBPSD, which we've arbitrarily decided will be module F001
|
||||
#
|
||||
ACTION=="remove", SUBSYSTEM=="usb", DRIVERS=="psd_driver", ENV{BMIBUS_PRODUCT}="F001", ENV{BMIBUS_SLOT}="%n", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
|
||||
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="psd_driver", ENV{BMIBUS_PRODUCT}="F001", ENV{BMIBUS_SLOT}="%n", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script passes BMI state variables to the running JVM.
|
||||
#
|
||||
if [ ${BMIBUS_PRODUCT} != "" ] && [ ${BMIBUS_SLOT} != "" ] && [ ${ACTION} != "" ];
|
||||
then
|
||||
echo $BMIBUS_PRODUCT 0 $BMIBUS_SLOT $ACTION > /tmp/eventpipe
|
||||
fi
|
||||
@@ -0,0 +1,4 @@
|
||||
# Default for /etc/init.d/udev
|
||||
|
||||
# Comment this out to disable device cache
|
||||
#DEVCACHE="/etc/dev.tar"
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
export TZ=/etc/localtime
|
||||
|
||||
[ -f /etc/default/udev ] && . /etc/default/udev
|
||||
|
||||
echo "Caching udev devnodes"
|
||||
|
||||
if [ "$DEVCACHE" != "" ]; then
|
||||
echo -n "Populating dev cache"
|
||||
(cd /; tar cf $DEVCACHE dev)
|
||||
mv /tmp/uname /etc/udev/saved.uname
|
||||
mv /tmp/cmdline /etc/udev/saved.cmdline
|
||||
mv /tmp/atags /etc/udev/saved.atags
|
||||
echo
|
||||
else
|
||||
rm -f /tmp/uname
|
||||
rm -f /tmp/cmdline
|
||||
rm -f /tmp/atags
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,4 @@
|
||||
# Default for /etc/init.d/udev
|
||||
|
||||
# Comment this out to disable device cache
|
||||
DEVCACHE="/etc/dev.tar"
|
||||
@@ -0,0 +1,73 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: udev
|
||||
# Required-Start: mountvirtfs
|
||||
# Required-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop:
|
||||
# Short-Description: Start udevd, populate /dev and load drivers.
|
||||
### END INIT INFO
|
||||
|
||||
export TZ=/etc/localtime
|
||||
|
||||
[ -d /sys/class ] || exit 1
|
||||
[ -r /proc/mounts ] || exit 1
|
||||
[ -x /sbin/udevd ] || exit 1
|
||||
[ -f /etc/default/udev ] && . /etc/default/udev
|
||||
[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
|
||||
|
||||
kill_udevd() {
|
||||
if [ -x /sbin/pidof ]; then
|
||||
pid=`/sbin/pidof -x udevd`
|
||||
[ -n "$pid" ] && kill $pid
|
||||
fi
|
||||
}
|
||||
|
||||
export ACTION=add
|
||||
# propagate /dev from /sys
|
||||
echo "Starting udev"
|
||||
|
||||
# mount the tmpfs on /dev, if not already done
|
||||
LANG=C awk "\$2 == \"/dev\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && {
|
||||
mount -n -o mode=0755 -t tmpfs none "/dev"
|
||||
mkdir -m 0755 /dev/pts
|
||||
mkdir -m 1777 /dev/shm
|
||||
}
|
||||
|
||||
if [ "$DEVCACHE" != "" ]; then
|
||||
# Invalidate udev cache if the kernel or its bootargs/cmdline have changed
|
||||
[ -x /bin/uname ] && /bin/uname -mrspv > /tmp/uname || touch /tmp/uname
|
||||
[ -r /proc/cmdline ] && cat /proc/cmdline > /tmp/cmdline || touch /tmp/cmdline
|
||||
[ -r /proc/atags ] && cat /proc/atags > /tmp/atags || touch /tmp/atags
|
||||
if [ -e $DEVCACHE ] && \
|
||||
cmp -s /tmp/uname /etc/udev/saved.uname && \
|
||||
cmp -s /tmp/cmdline /etc/udev/saved.cmdline && \
|
||||
cmp -s /tmp/atags /etc/udev/saved.atags; then
|
||||
(cd /; tar xf $DEVCACHE > /dev/null 2>&1)
|
||||
not_first_boot=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -e "/lib/modules/$(uname -r)"/modules.dep ] ; then
|
||||
mkdir -p /lib/modules/$(uname -r)
|
||||
depmod -ae
|
||||
fi
|
||||
|
||||
# make_extra_nodes
|
||||
kill_udevd > "/dev/null" 2>&1
|
||||
|
||||
# trigger the sorted events
|
||||
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
|
||||
/sbin/udevd -d
|
||||
|
||||
/sbin/udevadm control --env STARTUP=1
|
||||
if [ "$not_first_boot" != "" ];then
|
||||
/sbin/udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform
|
||||
(/sbin/udevadm settle --timeout=8; /sbin/udevadm control --env STARTUP=)&
|
||||
else
|
||||
/sbin/udevadm trigger
|
||||
/sbin/udevadm settle
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,35 @@
|
||||
# There are a number of modifiers that are allowed to be used in some
|
||||
# of the different fields. They provide the following subsitutions:
|
||||
#
|
||||
# %n the "kernel number" of the device.
|
||||
# For example, 'sda3' has a "kernel number" of '3'
|
||||
# %e the smallest number for that name which does not matches an existing node
|
||||
# %k the kernel name for the device
|
||||
# %M the kernel major number for the device
|
||||
# %m the kernel minor number for the device
|
||||
# %b the bus id for the device
|
||||
# %c the string returned by the PROGRAM
|
||||
# %s{filename} the content of a sysfs attribute
|
||||
# %% the '%' char itself
|
||||
#
|
||||
|
||||
# Media automounting
|
||||
SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh"
|
||||
SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
|
||||
|
||||
# Handle network interface setup
|
||||
SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
|
||||
SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
|
||||
|
||||
# The first rtc device is symlinked to /dev/rtc
|
||||
KERNEL=="rtc0", SYMLINK+="rtc"
|
||||
|
||||
#The first framebuffer is symlinked to /dev/fb
|
||||
KERNEL=="fb0", SYMLINK+="fb"
|
||||
|
||||
# Try and modprobe for drivers for new hardware
|
||||
ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
|
||||
|
||||
# Create a symlink to any touchscreen input device
|
||||
SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0"
|
||||
SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", SYMLINK+="input/touchscreen0"
|
||||
@@ -0,0 +1,40 @@
|
||||
# There are a number of modifiers that are allowed to be used in some
|
||||
# of the different fields. They provide the following subsitutions:
|
||||
#
|
||||
# %n the "kernel number" of the device.
|
||||
# For example, 'sda3' has a "kernel number" of '3'
|
||||
# %e the smallest number for that name which does not matches an existing node
|
||||
# %k the kernel name for the device
|
||||
# %M the kernel major number for the device
|
||||
# %m the kernel minor number for the device
|
||||
# %b the bus id for the device
|
||||
# %c the string returned by the PROGRAM
|
||||
# %s{filename} the content of a sysfs attribute
|
||||
# %% the '%' char itself
|
||||
#
|
||||
|
||||
# Media automounting
|
||||
SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh"
|
||||
SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
|
||||
|
||||
# Handle network interface setup
|
||||
SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
|
||||
SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
|
||||
|
||||
# The first rtc device is symlinked to /dev/rtc
|
||||
KERNEL=="rtc0", SYMLINK+="rtc"
|
||||
|
||||
#The first framebuffer is symlinked to /dev/fb
|
||||
KERNEL=="fb0", SYMLINK+="fb"
|
||||
|
||||
# Try and modprobe for drivers for new hardware
|
||||
ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
|
||||
|
||||
# Create a symlink to any touchscreen input device
|
||||
SUBSYSTEM=="input", KERNEL=="event[0-9]*", SYSFS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0"
|
||||
SUBSYSTEM=="input", KERNEL=="event[0-9]*", SYSFS{modalias}=="ads7846", SYMLINK+="input/touchscreen0"
|
||||
|
||||
# Local UDEV rule changes for the Pandora system.
|
||||
|
||||
# Let all users access the event devices using EVDEV (the OpenPandora is not multiuser after all).
|
||||
KERNEL=="event[0-9]",MODE="0666"
|
||||
@@ -0,0 +1,110 @@
|
||||
ACTION!="add", GOTO="permissions_end"
|
||||
|
||||
# devices needed to load the drivers providing them
|
||||
KERNEL=="tun", OPTIONS+="ignore_remove"
|
||||
KERNEL=="ppp", OPTIONS+="ignore_remove"
|
||||
KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove"
|
||||
|
||||
# default permissions for block devices
|
||||
SUBSYSTEM=="block", GROUP="disk"
|
||||
# the aacraid driver is broken and reports that disks removable (see #404927)
|
||||
SUBSYSTEM=="block", ATTRS{removable}=="1", \
|
||||
DRIVERS!="aacraid", GROUP="floppy"
|
||||
# all block devices on these buses are "removable"
|
||||
SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy"
|
||||
|
||||
# IDE devices
|
||||
KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \
|
||||
IMPORT{program}="cdrom_id --export $tempnode"
|
||||
ENV{ID_CDROM}=="?*", GROUP="cdrom"
|
||||
KERNEL=="ht[0-9]*", GROUP="tape"
|
||||
KERNEL=="nht[0-9]*", GROUP="tape"
|
||||
|
||||
# SCSI devices
|
||||
KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
|
||||
SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape"
|
||||
SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom"
|
||||
SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom"
|
||||
SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape"
|
||||
|
||||
# USB devices
|
||||
KERNEL=="legousbtower*", MODE="0666"
|
||||
KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp"
|
||||
|
||||
# usbfs-like devices
|
||||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
|
||||
MODE="0664"
|
||||
|
||||
# iRiver music players
|
||||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \
|
||||
ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]"
|
||||
|
||||
# serial devices
|
||||
SUBSYSTEM=="tty", GROUP="dialout"
|
||||
SUBSYSTEM=="capi", GROUP="dialout"
|
||||
SUBSYSTEM=="slamr", GROUP="dialout"
|
||||
SUBSYSTEM=="zaptel", GROUP="dialout"
|
||||
|
||||
# vc devices (all members of the tty subsystem)
|
||||
KERNEL=="ptmx", MODE="0666", GROUP="root"
|
||||
KERNEL=="console", MODE="0600", GROUP="root"
|
||||
KERNEL=="tty", MODE="0666", GROUP="root"
|
||||
KERNEL=="tty[0-9]*", GROUP="root"
|
||||
KERNEL=="pty*", MODE="0666", GROUP="tty"
|
||||
|
||||
# video devices
|
||||
SUBSYSTEM=="video4linux", GROUP="video"
|
||||
SUBSYSTEM=="drm", GROUP="video"
|
||||
SUBSYSTEM=="dvb", GROUP="video"
|
||||
SUBSYSTEM=="em8300", GROUP="video"
|
||||
SUBSYSTEM=="graphics", GROUP="video"
|
||||
SUBSYSTEM=="nvidia", GROUP="video"
|
||||
|
||||
# misc devices
|
||||
KERNEL=="random", MODE="0666"
|
||||
KERNEL=="urandom", MODE="0666"
|
||||
KERNEL=="mem", MODE="0640", GROUP="kmem"
|
||||
KERNEL=="kmem", MODE="0640", GROUP="kmem"
|
||||
KERNEL=="port", MODE="0640", GROUP="kmem"
|
||||
KERNEL=="full", MODE="0666"
|
||||
KERNEL=="null", MODE="0666"
|
||||
KERNEL=="zero", MODE="0666"
|
||||
KERNEL=="inotify", MODE="0666"
|
||||
KERNEL=="sgi_fetchop", MODE="0666"
|
||||
KERNEL=="sonypi", MODE="0666"
|
||||
KERNEL=="agpgart", GROUP="video"
|
||||
KERNEL=="rtc|rtc[0-9]*", GROUP="audio"
|
||||
KERNEL=="kqemu", MODE="0666"
|
||||
KERNEL=="tun", MODE="0666",
|
||||
|
||||
KERNEL=="cdemu[0-9]*", GROUP="cdrom"
|
||||
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
|
||||
KERNEL=="pktcdvd", MODE="0644"
|
||||
|
||||
# printers and parallel devices
|
||||
SUBSYSTEM=="printer", GROUP="lp"
|
||||
SUBSYSTEM=="ppdev", GROUP="lp"
|
||||
KERNEL=="irlpt*", GROUP="lp"
|
||||
KERNEL=="pt[0-9]*", GROUP="tape"
|
||||
KERNEL=="pht[0-9]*", GROUP="tape"
|
||||
|
||||
# sound devices
|
||||
SUBSYSTEM=="sound", GROUP="audio"
|
||||
|
||||
# ieee1394 devices
|
||||
KERNEL=="raw1394", GROUP="disk"
|
||||
KERNEL=="dv1394*", GROUP="video"
|
||||
KERNEL=="video1394*", GROUP="video"
|
||||
|
||||
# input devices
|
||||
KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \
|
||||
MODE="0664", GROUP="video"
|
||||
KERNEL=="js[0-9]*", MODE="0664"
|
||||
KERNEL=="lirc[0-9]*", GROUP="video"
|
||||
|
||||
# AOE character devices
|
||||
SUBSYSTEM=="aoe", MODE="0220", GROUP="disk"
|
||||
SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
|
||||
|
||||
LABEL="permissions_end"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# debugging monitor
|
||||
RUN+="socket:/org/kernel/udev/monitor"
|
||||
|
||||
# run a command on remove events
|
||||
ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}"
|
||||
|
||||
# ignore the events generated by virtual consoles
|
||||
KERNEL=="ptmx", OPTIONS+="last_rule"
|
||||
KERNEL=="console", OPTIONS+="last_rule"
|
||||
KERNEL=="tty" , OPTIONS+="last_rule"
|
||||
KERNEL=="tty[0-9]*", OPTIONS+="last_rule"
|
||||
KERNEL=="pty*", OPTIONS+="last_rule"
|
||||
SUBSYSTEM=="vc", OPTIONS+="last_rule"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Default for /etc/init.d/udev
|
||||
|
||||
# Comment this out to disable device cache
|
||||
#DEVCACHE="/etc/dev.tar"
|
||||
@@ -0,0 +1,4 @@
|
||||
# Default for /etc/init.d/udev
|
||||
|
||||
# Comment this out to disable device cache
|
||||
#DEVCACHE="/etc/dev.tar"
|
||||
@@ -0,0 +1,21 @@
|
||||
This patch is needed on uclibc.
|
||||
|
||||
-Khem
|
||||
|
||||
Index: udev-151/extras/ata_id/ata_id.c
|
||||
===================================================================
|
||||
--- udev-151.orig/extras/ata_id/ata_id.c 2010-06-04 14:08:41.912730501 -0700
|
||||
+++ udev-151/extras/ata_id/ata_id.c 2010-06-04 14:09:31.492734527 -0700
|
||||
@@ -168,7 +168,11 @@ static void disk_identify_fixup_uint16 (
|
||||
uint16_t *p;
|
||||
|
||||
p = (uint16_t *) identify;
|
||||
- p[offset_words] = le16toh (p[offset_words]);
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+ p[offset_words] = p[offset_words];
|
||||
+#else
|
||||
+ p[offset_words] = __bswap_16 (p[offset_words]);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,25 @@
|
||||
This patch is needed on uclibc
|
||||
|
||||
-Khem
|
||||
Index: udev-151/udev/udev-node.c
|
||||
===================================================================
|
||||
--- udev-151.orig/udev/udev-node.c 2010-06-04 14:18:59.082727182 -0700
|
||||
+++ udev-151/udev/udev-node.c 2010-06-04 14:20:27.485282812 -0700
|
||||
@@ -57,7 +57,7 @@ int udev_node_mknod(struct udev_device *
|
||||
preserve = 1;
|
||||
udev_selinux_lsetfilecon(udev, file, mode);
|
||||
/* update time stamp when we re-use the node, like on media change events */
|
||||
- utimes(file, NULL);
|
||||
+ utimensat(AT_FDCWD, file, NULL, 0);
|
||||
} else {
|
||||
char file_tmp[UTIL_PATH_SIZE + sizeof(TMP_FILE_EXT)];
|
||||
|
||||
@@ -178,7 +178,7 @@ static int node_symlink(struct udev *ude
|
||||
info(udev, "preserve already existing symlink '%s' to '%s'\n",
|
||||
slink, target);
|
||||
udev_selinux_lsetfilecon(udev, slink, S_IFLNK);
|
||||
- lutimes(slink, NULL);
|
||||
+ utimensat(AT_FDCWD, slink, NULL, AT_SYMLINK_NOFOLLOW);
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
# There are a number of modifiers that are allowed to be used in some
|
||||
# of the different fields. They provide the following subsitutions:
|
||||
#
|
||||
# %n the "kernel number" of the device.
|
||||
# For example, 'sda3' has a "kernel number" of '3'
|
||||
# %e the smallest number for that name which does not matches an existing node
|
||||
# %k the kernel name for the device
|
||||
# %M the kernel major number for the device
|
||||
# %m the kernel minor number for the device
|
||||
# %b the bus id for the device
|
||||
# %c the string returned by the PROGRAM
|
||||
# %s{filename} the content of a sysfs attribute
|
||||
# %% the '%' char itself
|
||||
#
|
||||
|
||||
# workaround for devices which do not report media changes
|
||||
SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \
|
||||
ENV{ID_MODEL}=="IOMEGA_ZIP*", OPTIONS+="all_partitions"
|
||||
SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
|
||||
OPTIONS+="all_partitions"
|
||||
|
||||
# SCSI devices
|
||||
SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
|
||||
|
||||
# USB devices
|
||||
SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
|
||||
SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
|
||||
SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
|
||||
SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
|
||||
SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
|
||||
SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
|
||||
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
|
||||
ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \
|
||||
SYMLINK+="pilot"
|
||||
|
||||
# usbfs-like devices
|
||||
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
|
||||
NAME="%c"
|
||||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}"
|
||||
|
||||
# serial devices
|
||||
KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
|
||||
KERNEL=="capi[0-9]*", NAME="capi/%n"
|
||||
|
||||
# video devices
|
||||
KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
|
||||
NAME="%c"
|
||||
KERNEL=="card[0-9]*", NAME="dri/%k"
|
||||
|
||||
# misc devices
|
||||
KERNEL=="hw_random", NAME="hwrng"
|
||||
KERNEL=="tun", NAME="net/%k"
|
||||
KERNEL=="evtchn", NAME="xen/%k"
|
||||
|
||||
KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
|
||||
KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"
|
||||
KERNEL=="pktcdvd", NAME="pktcdvd/control"
|
||||
|
||||
KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
|
||||
KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
|
||||
KERNEL=="microcode", NAME="cpu/microcode"
|
||||
|
||||
KERNEL=="umad*", NAME="infiniband/%k"
|
||||
KERNEL=="issm*", NAME="infiniband/%k"
|
||||
KERNEL=="uverbs*", NAME="infiniband/%k"
|
||||
KERNEL=="ucm*", NAME="infiniband/%k"
|
||||
KERNEL=="rdma_ucm", NAME="infiniband/%k"
|
||||
|
||||
# ALSA devices
|
||||
KERNEL=="controlC[0-9]*", NAME="snd/%k"
|
||||
KERNEL=="hwC[D0-9]*", NAME="snd/%k"
|
||||
KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
|
||||
KERNEL=="midiC[D0-9]*", NAME="snd/%k"
|
||||
KERNEL=="timer", NAME="snd/%k"
|
||||
KERNEL=="seq", NAME="snd/%k"
|
||||
|
||||
# ieee1394 devices
|
||||
KERNEL=="dv1394*", NAME="dv1394/%n"
|
||||
KERNEL=="video1394*", NAME="video1394/%n"
|
||||
|
||||
# input devices
|
||||
KERNEL=="mice", NAME="input/%k"
|
||||
KERNEL=="mouse[0-9]*", NAME="input/%k"
|
||||
KERNEL=="event[0-9]*", NAME="input/%k"
|
||||
KERNEL=="js[0-9]*", NAME="input/%k"
|
||||
KERNEL=="ts[0-9]*", NAME="input/%k"
|
||||
KERNEL=="uinput", NAME="input/%k"
|
||||
|
||||
# Zaptel
|
||||
KERNEL=="zapctl", NAME="zap/ctl"
|
||||
KERNEL=="zaptimer", NAME="zap/timer"
|
||||
KERNEL=="zapchannel", NAME="zap/channel"
|
||||
KERNEL=="zappseudo", NAME="zap/pseudo"
|
||||
KERNEL=="zap[0-9]*", NAME="zap/%n"
|
||||
|
||||
# AOE character devices
|
||||
SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k"
|
||||
SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k"
|
||||
SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
|
||||
SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k"
|
||||
|
||||
# device mapper creates its own device nodes, so ignore these
|
||||
KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"
|
||||
KERNEL=="device-mapper", NAME="mapper/control"
|
||||
|
||||
KERNEL=="rfcomm[0-9]*", GROUP="users", MODE="0660"
|
||||
|
||||
# Samsung UARTS
|
||||
KERNEL=="s3c2410_serial[0-9]", NAME="ttySAC%n"
|
||||
|
||||
# MXC UARTs
|
||||
KERNEL=="ttymxc[0-4]", NAME="ttymxc%n"
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
DESCRIPTION ?= "udev is a program which dynamically creates and removes device nodes from \
|
||||
/dev/. It responds to /sbin/hotplug device events and requires a 2.6 kernel."
|
||||
|
||||
LICENSE = "GPLv2+"
|
||||
|
||||
SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
|
||||
file://udev.rules \
|
||||
file://devfs-udev.rules \
|
||||
file://links.conf \
|
||||
file://permissions.rules \
|
||||
file://mount.sh \
|
||||
file://network.sh \
|
||||
file://local.rules \
|
||||
file://init \
|
||||
file://udev-compat-wrapper-patch"
|
||||
|
||||
INC_PR = "r30"
|
||||
|
||||
inherit update-rc.d autotools pkgconfig
|
||||
|
||||
PARALLEL_MAKE = ""
|
||||
UDEV_DEVFS_RULES ?= "0"
|
||||
PKG_libvolume-id-dev = "libvolume-id-dev"
|
||||
|
||||
RDEPENDS_${PN} += "module-init-tools-depmod udev-utils"
|
||||
|
||||
INITSCRIPT_NAME = "udev"
|
||||
INITSCRIPT_PARAMS = "start 03 S ."
|
||||
|
||||
export CROSS = "${TARGET_PREFIX}"
|
||||
export HOSTCC = "${BUILD_CC}"
|
||||
export udevdir ?= "/dev"
|
||||
# Put stuff in /lib and /sbin
|
||||
export bindir := "${base_bindir}"
|
||||
export sbindir := "${base_sbindir}"
|
||||
export usrbindir := "${bindir}"
|
||||
export usrsbindir := "${sbindir}"
|
||||
export etcdir := "${sysconfdir}"
|
||||
|
||||
TARGET_CC_ARCH += "${LDFLAGS}"
|
||||
UDEV_EXTRAS = "<override me>"
|
||||
EXTRA_OEMAKE = "-e \
|
||||
'EXTRAS=${UDEV_EXTRAS}' \
|
||||
'STRIP=echo'"
|
||||
|
||||
RPROVIDES_udev_append = " udev-compat-wrapper"
|
||||
RDEPENDS_udev_spitz += "udev-compat"
|
||||
do_unpack_append_spitz() {
|
||||
bb.build.exec_func('do_apply_compat_wrapper', d)
|
||||
}
|
||||
RDEPENDS_udev_akita += "udev-compat"
|
||||
do_unpack_append_akita() {
|
||||
bb.build.exec_func('do_apply_compat_wrapper', d)
|
||||
}
|
||||
RDEPENDS_udev_c7x0 += "udev-compat"
|
||||
do_unpack_append_c7x0() {
|
||||
bb.build.exec_func('do_apply_compat_wrapper', d)
|
||||
}
|
||||
RDEPENDS_udev_poodle += "udev-compat"
|
||||
do_unpack_append_poodle() {
|
||||
bb.build.exec_func('do_apply_compat_wrapper', d)
|
||||
}
|
||||
|
||||
# Modify init script on platforms that need to boot old kernels:
|
||||
do_apply_compat_wrapper() {
|
||||
cd ${WORKDIR}
|
||||
sed -i "s:/sbin/udevd:\$UDEVD:g;s:/sbin/udevadm:\$UDEVADM:g" init
|
||||
patch <udev-compat-wrapper-patch
|
||||
cd -
|
||||
}
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${usrsbindir} \
|
||||
${D}${sbindir}
|
||||
oe_runmake 'DESTDIR=${D}' INSTALL=install install
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
|
||||
|
||||
install -d ${D}${sysconfdir}/udev/rules.d/
|
||||
|
||||
install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
|
||||
install -m 0644 ${WORKDIR}/permissions.rules ${D}${sysconfdir}/udev/rules.d/permissions.rules
|
||||
install -m 0644 ${WORKDIR}/udev.rules ${D}${sysconfdir}/udev/rules.d/udev.rules
|
||||
if [ "${UDEV_DEVFS_RULES}" = "1" ]; then
|
||||
install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules
|
||||
fi
|
||||
|
||||
install -d ${D}${sysconfdir}/udev/scripts/
|
||||
|
||||
install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
|
||||
install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
|
||||
install -m 0644 ${S}/extras/volume_id/lib/libvolume_id.h ${D}${includedir}
|
||||
oe_libinstall -C extras/volume_id/lib libvolume_id ${D}${libdir}
|
||||
}
|
||||
|
||||
PACKAGES =+ "udev-utils libvolume-id libvolume-id-dev"
|
||||
FILES_libvolume-id-dev = "${includedir}/libvolume_id.h ${libdir}/libvolume_id.a ${libdir}/libvolume_id.so ${libdir}/pkgconfig/libvolume_id.pc"
|
||||
FILES_udev-utils = "${usrbindir}/udevinfo ${usrbindir}/udevtest ${sbindir}/udevadm"
|
||||
FILES_libvolume-id = "${base_libdir}/libvolume_id.so.*"
|
||||
FILES_${PN} += "${usrbindir}/* ${usrsbindir}/udevd"
|
||||
FILES_${PN}-dbg += "${usrbindir}/.debug ${usrsbindir}/.debug"
|
||||
@@ -0,0 +1,4 @@
|
||||
# hostap_cs needs ignore_cis_vcc=1 set - this should handle all cards
|
||||
#
|
||||
ACTION=="add", DEVICE=="hostap_cs", \
|
||||
SYSFS{func_id}=="0x06", RUN+="/sbin/modprobe hostap_cs ignore_cis_vcc=1"
|
||||
@@ -0,0 +1,6 @@
|
||||
# This is a grep pattern matched against the device name
|
||||
# Any matched pattern will _not_ be mounted / removed by udevd
|
||||
|
||||
/dev/mtdblock
|
||||
/dev/loop
|
||||
/dev/ram
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Called from udev
|
||||
# Attemp to mount any added block devices
|
||||
# and remove any removed devices
|
||||
#
|
||||
|
||||
MOUNT="/bin/mount"
|
||||
PMOUNT="/usr/bin/pmount"
|
||||
UMOUNT="/bin/umount"
|
||||
name="`basename "$DEVNAME"`"
|
||||
|
||||
for line in `cat /etc/udev/mount.blacklist | grep -v ^#`
|
||||
do
|
||||
if ( echo "$DEVNAME" | grep -q "$line" )
|
||||
then
|
||||
logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
automount() {
|
||||
! test -d "/media/$name" && mkdir -p "/media/$name"
|
||||
|
||||
if ! $MOUNT -t auto -o async,relatime $DEVNAME "/media/$name"
|
||||
then
|
||||
#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
|
||||
rm_dir "/media/$name"
|
||||
else
|
||||
logger "mount.sh/automount" "Auto-mount of [/media/$name] successful"
|
||||
touch "/tmp/.automount-$name"
|
||||
fi
|
||||
}
|
||||
|
||||
rm_dir() {
|
||||
# We do not want to rm -r populated directories
|
||||
if test "`find "$1" | wc -l | tr -d " "`" -lt 2 -a -d "$1"
|
||||
then
|
||||
! test -z "$1" && rm -r "$1"
|
||||
else
|
||||
logger "mount.sh/automount" "Not removing non-empty directory [$1]"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ]; then
|
||||
if [ -x "$PMOUNT" ]; then
|
||||
$PMOUNT $DEVNAME 2> /dev/null
|
||||
elif [ -x $MOUNT ]; then
|
||||
$MOUNT $DEVNAME 2> /dev/null
|
||||
fi
|
||||
|
||||
# If the device isn't mounted at this point, it isn't configured in fstab
|
||||
# 20061107: Small correction: The rootfs partition may be called just "rootfs" and not by
|
||||
# its true device name so this would break. If the rootfs is mounted on two places
|
||||
# during boot, it confuses the heck out of fsck. So Im auto-adding the root-partition
|
||||
# to /etc/udev/mount.blacklist via postinst
|
||||
|
||||
cat /proc/mounts | awk '{print $1}' | grep -q "^$DEVNAME$" || automount
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
|
||||
for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
|
||||
do
|
||||
$UMOUNT -l $mnt
|
||||
done
|
||||
|
||||
# Remove empty directories from auto-mounter
|
||||
test -e "/tmp/.automount-$name" && rm_dir "/media/$name"
|
||||
fi
|
||||
@@ -0,0 +1,6 @@
|
||||
# This is a grep pattern matched against the device name
|
||||
# Any matched pattern will _not_ be mounted / removed by udevd
|
||||
|
||||
/dev/mtdblock
|
||||
/dev/loop
|
||||
/dev/ram
|
||||
@@ -0,0 +1,108 @@
|
||||
# The use of these rules is not recommended or supported.
|
||||
# In a world where devices can come and go at any time, the devfs scheme
|
||||
# of simple device enumeration does not help _anything_. Just forget about
|
||||
# it. Use custom rules to name your device or look at the persistent device
|
||||
# naming scheme, which is implemented for disks and add your subsystem.
|
||||
|
||||
# ide block devices
|
||||
BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}"
|
||||
|
||||
# md block devices
|
||||
KERNEL="md[0-9]*", NAME="md/%n"
|
||||
|
||||
# floppy devices
|
||||
KERNEL="fd[0-9]*", NAME="floppy/%n"
|
||||
|
||||
# tty devices
|
||||
KERNEL="tty[0-9]*", NAME="vc/%n", SYMLINK="%k"
|
||||
KERNEL="ttyS[0-9]*", NAME="tts/%n", SYMLINK="%k"
|
||||
KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
|
||||
|
||||
# vc devices
|
||||
KERNEL="vcs", NAME="vcc/0"
|
||||
KERNEL="vcs[0-9]*", NAME="vcc/%n"
|
||||
KERNEL="vcsa", NAME="vcc/a0"
|
||||
KERNEL="vcsa[0-9]*", NAME="vcc/a%n"
|
||||
|
||||
# v4l devices
|
||||
KERNEL="video[0-9]*", NAME="v4l/video%n"
|
||||
KERNEL="radio[0-9]*", NAME="v4l/radio%n"
|
||||
KERNEL="vbi[0-9]*", NAME="v4l/vbi%n"
|
||||
KERNEL="vtx[0-9]*", NAME="v4l/vtx%n"
|
||||
|
||||
# dm devices (ignore them)
|
||||
KERNEL="dm-[0-9]*", NAME=""
|
||||
|
||||
# i2c devices
|
||||
KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
|
||||
|
||||
# loop devices
|
||||
KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k"
|
||||
|
||||
# ramdisks
|
||||
KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
|
||||
|
||||
# framebuffer devices
|
||||
KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
|
||||
|
||||
# misc
|
||||
KERNEL="rtc", NAME="misc/%k", SYMLINK="%k"
|
||||
KERNEL="psaux", NAME="misc/%k", SYMLINK="%k"
|
||||
KERNEL="agpgart", NAME="misc/%k", SYMLINK="%k"
|
||||
KERNEL="rtc", NAME="misc/%k", SYMLINK="%k"
|
||||
KERNEL="psaux", NAME="misc/%k", SYMLINK="%k"
|
||||
KERNEL="uinput", NAME="misc/%k", SYMLINK="%k"
|
||||
|
||||
# alsa devices
|
||||
KERNEL="controlC[0-9]*", NAME="snd/%k"
|
||||
KERNEL="hw[CD0-9]*", NAME="snd/%k"
|
||||
KERNEL="pcm[CD0-9cp]*", NAME="snd/%k"
|
||||
KERNEL="midi[CD0-9]*", NAME="snd/%k"
|
||||
KERNEL="timer", NAME="snd/%k"
|
||||
KERNEL="seq", NAME="snd/%k"
|
||||
|
||||
# oss devices
|
||||
KERNEL="audio*", NAME="sound/%k", SYMLINK="%k"
|
||||
KERNEL="dmmidi", NAME="sound/%k", SYMLINK="%k"
|
||||
KERNEL="dsp*", NAME="sound/%k", SYMLINK="%k"
|
||||
KERNEL="midi*", NAME="sound/%k", SYMLINK="%k"
|
||||
KERNEL="mixer*", NAME="sound/%k", SYMLINK="%k"
|
||||
KERNEL="sequencer*", NAME="sound/%k", SYMLINK="%k"
|
||||
|
||||
# input devices
|
||||
KERNEL="mice", NAME="input/%k"
|
||||
KERNEL="mouse*", NAME="input/%k"
|
||||
KERNEL="event*", NAME="input/%k"
|
||||
KERNEL="js*", NAME="input/%k"
|
||||
KERNEL="ts*", NAME="input/%k"
|
||||
|
||||
# USB devices
|
||||
KERNEL="hiddev*", NAME="usb/%k"
|
||||
KERNEL="auer*", NAME="usb/%k"
|
||||
KERNEL="legousbtower*", NAME="usb/%k"
|
||||
KERNEL="dabusb*", NAME="usb/%k"
|
||||
BUS="usb", KERNEL="lp[0-9]*", NAME="usb/%k"
|
||||
|
||||
# netlink devices
|
||||
KERNEL="route", NAME="netlink/%k"
|
||||
KERNEL="skip", NAME="netlink/%k"
|
||||
KERNEL="usersock", NAME="netlink/%k"
|
||||
KERNEL="fwmonitor", NAME="netlink/%k"
|
||||
KERNEL="tcpdiag", NAME="netlink/%k"
|
||||
KERNEL="nflog", NAME="netlink/%k"
|
||||
KERNEL="xfrm", NAME="netlink/%k"
|
||||
KERNEL="arpd", NAME="netlink/%k"
|
||||
KERNEL="route6", NAME="netlink/%k"
|
||||
KERNEL="ip6_fw", NAME="netlink/%k"
|
||||
KERNEL="dnrtmsg", NAME="netlink/%k"
|
||||
KERNEL="tap*", NAME="netlink/%k"
|
||||
|
||||
# CAPI devices
|
||||
KERNEL="capi", NAME="capi20", SYMLINK="isdn/capi20"
|
||||
KERNEL="capi*", NAME="capi/%n"
|
||||
|
||||
# Network devices
|
||||
KERNEL="tun", NAME="net/%k"
|
||||
|
||||
# raw devices
|
||||
KERNEL="raw[0-9]*", NAME="raw/%k"
|
||||
Executable
+212
@@ -0,0 +1,212 @@
|
||||
#!/bin/sh
|
||||
|
||||
UDEVSTART=/sbin/udevstart
|
||||
|
||||
# defaults
|
||||
tmpfs_size="2M"
|
||||
udev_root="/dev"
|
||||
|
||||
[ -x $UDEVSTART ] || exit 0
|
||||
|
||||
. /etc/udev/udev.conf
|
||||
|
||||
##############################################################################
|
||||
|
||||
# we need to unmount /dev/pts/ and remount it later over the tmpfs
|
||||
unmount_devpts() {
|
||||
if mountpoint -q /dev/pts/; then
|
||||
umount -l /dev/pts/
|
||||
fi
|
||||
|
||||
if mountpoint -q /dev/shm/; then
|
||||
umount -l /dev/shm/
|
||||
fi
|
||||
}
|
||||
|
||||
# mount a tmpfs over /dev, if somebody did not already do it
|
||||
mount_tmpfs() {
|
||||
if grep -E -q "^[^[:space:]]+ /dev tmpfs" /proc/mounts; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# /dev/.static/dev/ is used by MAKEDEV to access the real /dev/ directory.
|
||||
# /etc/udev/ is recycled as a temporary mount point because it's the only
|
||||
# directory which is guaranteed to be available.
|
||||
mount -n -o bind /dev /etc/udev
|
||||
|
||||
if ! mount -n -o size=$tmpfs_size,mode=0755 -t tmpfs tmpfs /dev; then
|
||||
umount /etc/udev
|
||||
echo "udev requires tmpfs support, not started."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# using ln to test if /dev works, because touch is in /usr/bin/
|
||||
if ln -s test /dev/test-file; then
|
||||
rm /dev/test-file
|
||||
else
|
||||
echo "udev requires tmpfs support, not started."
|
||||
umount /etc/udev
|
||||
umount /dev
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p /dev/.static/dev
|
||||
chmod 700 /dev/.static/
|
||||
# The mount options in busybox are non-standard...
|
||||
if test -x /bin/mount.util-linux
|
||||
then
|
||||
/bin/mount.util-linux --move /etc/udev /dev/.static/dev
|
||||
elif test -x /bin/busybox
|
||||
then
|
||||
busybox mount -n -o move /etc/udev /dev/.static/dev
|
||||
else
|
||||
echo "udev requires an identifiable mount command, not started."
|
||||
umount /etc/udev
|
||||
umount /dev
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# I hate this hack. -- Md
|
||||
make_extra_nodes() {
|
||||
[ -e /etc/udev/links.conf ] || return 0
|
||||
grep '^[^#]' /etc/udev/links.conf | \
|
||||
while read type name arg1; do
|
||||
[ "$type" -a "$name" -a ! -e "/dev/$name" -a ! -L "/dev/$name" ] ||continue
|
||||
case "$type" in
|
||||
L) ln -s $arg1 /dev/$name ;;
|
||||
D) mkdir -p /dev/$name ;;
|
||||
M) mknod -m 600 /dev/$name $arg1 ;;
|
||||
*) echo "links.conf: unparseable line ($type $name $arg1)" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# this function is duplicated in preinst, postinst and d-i
|
||||
supported_kernel() {
|
||||
case "$(uname -r)" in
|
||||
2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]*) return 1 ;;
|
||||
2.6.1[01]|2.6.1[01][!0-9]*) return 1 ;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
|
||||
# shell version of /usr/bin/tty
|
||||
my_tty() {
|
||||
[ -x /bin/readlink ] || return 0
|
||||
[ -e /proc/self/fd/0 ] || return 0
|
||||
readlink --silent /proc/self/fd/0 || true
|
||||
}
|
||||
|
||||
warn_if_interactive() {
|
||||
if [ "$RUNLEVEL" = "S" -a "$PREVLEVEL" = "N" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
TTY=$(my_tty)
|
||||
if [ -z "$TTY" -o "$TTY" = "/dev/console" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
printf "\n\n\nIt has been detected that the command\n\n\t$0 $*\n\n"
|
||||
printf "has been run from an interactive shell.\n"
|
||||
printf "It will probably not do what you expect, so this script will wait\n"
|
||||
printf "60 seconds before continuing. Press ^C to stop it.\n"
|
||||
printf "RUNNING THIS COMMAND IS HIGHLY DISCOURAGED!\n\n\n\n"
|
||||
sleep 60
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
|
||||
if ! supported_kernel; then
|
||||
echo "udev requires a kernel >= 2.6.12, not started."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e /proc/filesystems ]; then
|
||||
echo "udev requires a mounted procfs, not started."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -q '[[:space:]]tmpfs$' /proc/filesystems; then
|
||||
echo "udev requires tmpfs support, not started."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d /sys/class/ ]; then
|
||||
echo "udev requires a mounted sysfs, not started."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e /proc/sys/kernel/hotplug ] && [ ! -e /sys/kernel/uevent_helper ]; then
|
||||
echo "udev requires hotplug support, not started."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
##############################################################################
|
||||
|
||||
# When modifying this script, do not forget that between the time that
|
||||
# the new /dev has been mounted and udevstart has been run there will be
|
||||
# no /dev/null. This also means that you cannot use the "&" shell command.
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -e "$udev_root/.udevdb" ]; then
|
||||
if mountpoint -q /dev/; then
|
||||
TMPFS_MOUNTED=1
|
||||
else
|
||||
echo ".udevdb already exists on the old $udev_root!"
|
||||
fi
|
||||
fi
|
||||
warn_if_interactive
|
||||
|
||||
#echo /sbin/udevsend > /proc/sys/kernel/hotplug
|
||||
if [ -e /sys/kernel/uevent_helper ] ; then
|
||||
echo "" > /sys/kernel/uevent_helper
|
||||
else
|
||||
echo "" > /proc/sys/kernel/hotplug
|
||||
fi
|
||||
udevsend
|
||||
if [ "$UDEV_DISABLED" = "yes" ]; then
|
||||
echo "udev disabled on the kernel command line, not started."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! "$TMPFS_MOUNTED" ]; then
|
||||
unmount_devpts
|
||||
mount_tmpfs
|
||||
[ -d /proc/1 ] || mount -n /proc
|
||||
# if this directory is not present /dev will not be updated by udev
|
||||
mkdir /dev/.udevdb/
|
||||
echo "Creating initial device nodes..."
|
||||
udevstart
|
||||
fi
|
||||
make_extra_nodes
|
||||
;;
|
||||
stop)
|
||||
warn_if_interactive
|
||||
start-stop-daemon --stop --exec /sbin/udevd --quiet
|
||||
unmount_devpts
|
||||
if [ -d /dev/.static/dev/ ]; then
|
||||
umount -l /dev/.static/dev/ || true
|
||||
fi
|
||||
echo "Unmounting /dev..."
|
||||
# unmounting with -l should never fail
|
||||
if ! umount -l /dev; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
restart|force-reload)
|
||||
start-stop-daemon --stop --exec /sbin/udevd --quiet
|
||||
log_begin_msg "Recreating device nodes..."
|
||||
udevstart
|
||||
make_extra_nodes
|
||||
log_end_msg 0
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/udev {start|stop|restart|force-reload}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,24 @@
|
||||
# This file does not exist. Please do not ask the debian maintainer about it.
|
||||
# You may use it to do strange and wonderful things, at your risk.
|
||||
|
||||
L fd /proc/self/fd
|
||||
L stdin /proc/self/fd/0
|
||||
L stdout /proc/self/fd/1
|
||||
L stderr /proc/self/fd/2
|
||||
L core /proc/kcore
|
||||
L sndstat /proc/asound/oss/sndstat
|
||||
L MAKEDEV /sbin/MAKEDEV
|
||||
|
||||
D pts
|
||||
D shm
|
||||
|
||||
M null c 1 3
|
||||
M console c 5 1
|
||||
|
||||
# Hic sunt leones.
|
||||
M ppp c 108 0
|
||||
D loop
|
||||
M loop/0 b 7 0
|
||||
D net
|
||||
M net/tun c 10 200
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# There are a number of modifiers that are allowed to be used in some
|
||||
# of the different fields. They provide the following subsitutions:
|
||||
#
|
||||
# %n the "kernel number" of the device.
|
||||
# For example, 'sda3' has a "kernel number" of '3'
|
||||
# %e the smallest number for that name which does not matches an existing node
|
||||
# %k the kernel name for the device
|
||||
# %M the kernel major number for the device
|
||||
# %m the kernel minor number for the device
|
||||
# %b the bus id for the device
|
||||
# %c the string returned by the PROGRAM
|
||||
# %s{filename} the content of a sysfs attribute
|
||||
# %% the '%' char itself
|
||||
#
|
||||
|
||||
# Media automounting
|
||||
SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh"
|
||||
SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
|
||||
|
||||
# Handle network interface setup
|
||||
SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
|
||||
SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
|
||||
@@ -0,0 +1,3 @@
|
||||
/dev/loop
|
||||
/dev/ram
|
||||
/dev/mtdblock
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Called from udev
|
||||
# Attemp to mount any added block devices
|
||||
# and remove any removed devices
|
||||
#
|
||||
|
||||
MOUNT="/bin/mount"
|
||||
PMOUNT="/usr/bin/pmount"
|
||||
UMOUNT="/bin/umount"
|
||||
name="`basename "$DEVNAME"`"
|
||||
|
||||
for line in `cat /etc/udev/mount.blacklist | grep -v ^#`
|
||||
do
|
||||
if ( echo "$DEVNAME" | grep -q "$line" )
|
||||
then
|
||||
logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
automount() {
|
||||
! test -d "/media/$name" && mkdir -p "/media/$name"
|
||||
|
||||
if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
|
||||
then
|
||||
#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
|
||||
rm_dir "/media/$name"
|
||||
else
|
||||
logger "mount.sh/automount" "Auto-mount of [/media/$name] successful"
|
||||
touch "/tmp/.automount-$name"
|
||||
fi
|
||||
}
|
||||
|
||||
rm_dir() {
|
||||
# We do not want to rm -r populated directories
|
||||
if test "`find "$1" | wc -l | tr -d " "`" -lt 2 -a -d "$1"
|
||||
then
|
||||
! test -z "$1" && rm -r "$1"
|
||||
else
|
||||
logger "mount.sh/automount" "Not removing non-empty directory [$1]"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ]; then
|
||||
if [ -x "$PMOUNT" ]; then
|
||||
$PMOUNT $DEVNAME 2> /dev/null
|
||||
elif [ -x $MOUNT ]; then
|
||||
$MOUNT $DEVNAME 2> /dev/null
|
||||
fi
|
||||
|
||||
# If the device isn't mounted at this point, it isn't configured in fstab
|
||||
# 20061107: Small correction: The rootfs partition may be called just "rootfs" and not by
|
||||
# its true device name so this would break. If the rootfs is mounted on two places
|
||||
# during boot, it confuses the heck out of fsck. So Im auto-adding the root-partition
|
||||
# to /etc/udev/mount.blacklist via postinst
|
||||
|
||||
cat /proc/mounts | awk '{print $1}' | grep -q "^$DEVNAME$" || automount
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
|
||||
for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
|
||||
do
|
||||
$UMOUNT -l $mnt
|
||||
done
|
||||
|
||||
# Remove empty directories from auto-mounter
|
||||
test -e "/tmp/.automount-$name" && rm_dir "/media/$name"
|
||||
fi
|
||||
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
|
||||
# udevd does clearenv(). Export shell PATH to children.
|
||||
export PATH
|
||||
|
||||
# Do not run when pcmcia-cs is installed
|
||||
test -x /sbin/cardctl && exit 0
|
||||
|
||||
# We get two "add" events for hostap cards due to wifi0
|
||||
echo "$INTERFACE" | grep -q wifi && exit 0
|
||||
|
||||
|
||||
# Check if /etc/init.d/network has been run yet to see if we are
|
||||
# called by starting /etc/rcS.d/S03udev and not by hotplugging a device
|
||||
#
|
||||
# At this stage, network interfaces should not be brought up
|
||||
# automatically because:
|
||||
# a) /etc/init.d/network has not been run yet (security issue)
|
||||
# b) /var has not been populated yet so /etc/resolv,conf points to
|
||||
# oblivion, making the network unusable
|
||||
#
|
||||
|
||||
spoofp="`grep ^spoofprotect /etc/network/options`"
|
||||
if test -z "$spoofp"
|
||||
then
|
||||
# This is the default from /etc/init.d/network
|
||||
spoofp_val=yes
|
||||
else
|
||||
spoofp_val=${spoofp#spoofprotect=}
|
||||
fi
|
||||
|
||||
test "$spoofp_val" = yes && spoofp_val=1 || spoofp_val=0
|
||||
|
||||
# I think it is safe to assume that "lo" will always be there ;)
|
||||
if test "`cat /proc/sys/net/ipv4/conf/lo/rp_filter`" != "$spoofp_val" -a -n "$spoofp_val"
|
||||
then
|
||||
echo "$INTERFACE" >> /dev/udev_network_queue
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#
|
||||
# Code taken from pcmcia-cs:/etc/pcmcia/network
|
||||
#
|
||||
|
||||
# if this interface has an entry in /etc/network/interfaces, let ifupdown
|
||||
# handle it
|
||||
if grep -q "iface \+$INTERFACE" /etc/network/interfaces; then
|
||||
case $ACTION in
|
||||
add)
|
||||
ifconfig | grep -q "^$INTERFACE" || ifup $INTERFACE
|
||||
;;
|
||||
remove)
|
||||
ifdown $INTERFACE
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
fi
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
#
|
||||
# Patch managed by http://www.holgerschurig.de/patcher.html
|
||||
#
|
||||
|
||||
--- udev-062/udev.c~noasmlinkage.patch
|
||||
+++ udev-062/udev.c
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-static void asmlinkage sig_handler(int signum)
|
||||
+static void sig_handler(int signum)
|
||||
{
|
||||
switch (signum) {
|
||||
case SIGALRM:
|
||||
--- udev-062/udevd.c~noasmlinkage.patch
|
||||
+++ udev-062/udevd.c
|
||||
@@ -639,7 +639,7 @@
|
||||
return msg;
|
||||
}
|
||||
|
||||
-static void asmlinkage sig_handler(int signum)
|
||||
+static void sig_handler(int signum)
|
||||
{
|
||||
int rc;
|
||||
|
||||
--- udev-062/udevstart.c~noasmlinkage.patch
|
||||
+++ udev-062/udevstart.c
|
||||
@@ -323,7 +323,7 @@
|
||||
exec_list(&device_list);
|
||||
}
|
||||
|
||||
-static void asmlinkage sig_handler(int signum)
|
||||
+static void sig_handler(int signum)
|
||||
{
|
||||
switch (signum) {
|
||||
case SIGALRM:
|
||||
@@ -0,0 +1 @@
|
||||
KERNEL=="cmt_speech", MODE="0777"
|
||||
@@ -0,0 +1,9 @@
|
||||
# This file was automatically generated by the /lib/udev/write_net_rules
|
||||
# # program, run by the persistent-net-generator.rules rules file.
|
||||
# #
|
||||
# # You can modify it, as long as you keep each rule on a single
|
||||
# # line, and change only the value of the NAME= key.
|
||||
#
|
||||
# # net device ()
|
||||
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:df:*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Usage: $0 iface newmac"
|
||||
echo " newmac is only saved if /etc/<iface>MAC is not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
iface="$1"
|
||||
newmac="$2"
|
||||
macfile=/etc/"$iface"mac
|
||||
|
||||
# If no MAC is found, save the one given as argument
|
||||
if [ ! -e $macfile ]; then
|
||||
/bin/echo "$newmac" > $macfile
|
||||
# Otherwise load MAC from file
|
||||
else
|
||||
newmac=`/bin/cat $macfile`
|
||||
fi
|
||||
|
||||
# Configure interface
|
||||
/sbin/ifconfig "$iface" down
|
||||
/sbin/ifconfig "$iface" hw ether $newmac
|
||||
@@ -0,0 +1,8 @@
|
||||
# MAC address hack
|
||||
# forces n900 to always use the same MAC address that is generated in the first boot
|
||||
SUBSYSTEM=="net",KERNEL=="wlan0", RUN+="/etc/udev/scripts/nokia-n900-mac-hack.sh %k $attr{address}"
|
||||
|
||||
# Create inputdev symlinks for kbslider contextkit plugin
|
||||
SUBSYSTEM=="input" ATTRS{name}=="TWL4030 Keypad" SYMLINK+="input/keypad"
|
||||
SUBSYSTEM=="input" ATTRS{name}=="gpio-keys" SYMLINK+="input/gpio-keys"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# ALSA devices
|
||||
KERNEL=="controlC[0-9]*", NAME="snd/%k"
|
||||
KERNEL=="hwC[D0-9]*", NAME="snd/%k"
|
||||
KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
|
||||
KERNEL=="midiC[D0-9]*", NAME="snd/%k"
|
||||
KERNEL=="timer", NAME="snd/%k"
|
||||
KERNEL=="seq", NAME="snd/%k"
|
||||
|
||||
KERNEL=="snd", SUBSYSTEM=="module", ACTION=="add", \
|
||||
RUN+="/bin/ln -sf /proc/asound/oss/sndstat $root/sndstat"
|
||||
@@ -0,0 +1,27 @@
|
||||
# There are a number of modifiers that are allowed to be used in some
|
||||
# of the different fields. They provide the following subsitutions:
|
||||
#
|
||||
# %n the "kernel number" of the device.
|
||||
# For example, 'sda3' has a "kernel number" of '3'
|
||||
# %e the smallest number for that name which does not matches an existing node
|
||||
# %k the kernel name for the device
|
||||
# %M the kernel major number for the device
|
||||
# %m the kernel minor number for the device
|
||||
# %b the bus id for the device
|
||||
# %c the string returned by the PROGRAM
|
||||
# %s{filename} the content of a sysfs attribute
|
||||
# %% the '%' char itself
|
||||
#
|
||||
|
||||
# Media automounting
|
||||
SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh"
|
||||
SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
|
||||
|
||||
# Handle network interface setup
|
||||
SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
|
||||
SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
|
||||
|
||||
# Local UDEV rule changes for the Pandora system.
|
||||
|
||||
# Let all users access the event devices using EVDEV (the OpenPandora is not multiuser after all).
|
||||
KERNEL=="event[0-9]",MODE="0666"
|
||||
@@ -0,0 +1,79 @@
|
||||
# default permissions for block devices
|
||||
SUBSYSTEM=="block", GROUP="disk"
|
||||
SUBSYSTEM=="block", SYSFS{removable}=="1", GROUP="floppy"
|
||||
|
||||
# IDE devices
|
||||
BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}="1", \
|
||||
PROGRAM="/bin/cat /proc/ide/%k/media", RESULT=="cdrom*", GROUP="cdrom"
|
||||
BUS=="ide", KERNEL=="ht[0-9]*", GROUP="tape"
|
||||
BUS=="ide", KERNEL=="nht[0-9]*", GROUP="tape"
|
||||
|
||||
# SCSI devices
|
||||
BUS=="scsi", SYSFS{type}=="1", GROUP="tape"
|
||||
BUS=="scsi", SYSFS{type}=="5", GROUP="cdrom"
|
||||
|
||||
# USB devices
|
||||
BUS=="usb", KERNEL=="legousbtower*", MODE="0666"
|
||||
BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp"
|
||||
|
||||
# serial devices
|
||||
SUBSYSTEM=="tty", GROUP="dialout"
|
||||
SUBSYSTEM=="capi", GROUP="dialout"
|
||||
SUBSYSTEM=="slamr", GROUP="dialout"
|
||||
|
||||
# vc devices (all members of the tty subsystem)
|
||||
KERNEL=="ptmx", MODE="0666", GROUP="root"
|
||||
KERNEL=="console", MODE="0600", GROUP="root"
|
||||
KERNEL=="tty", MODE="0666", GROUP="root"
|
||||
KERNEL=="tty[0-9]*", GROUP="root"
|
||||
KERNEL=="pty*", MODE="0666", GROUP="tty"
|
||||
|
||||
# video devices
|
||||
SUBSYSTEM=="video4linux", GROUP="video"
|
||||
SUBSYSTEM=="drm", GROUP="video"
|
||||
SUBSYSTEM=="dvb", GROUP="video"
|
||||
SUBSYSTEM=="em8300", GROUP="video"
|
||||
SUBSYSTEM=="graphics", GROUP="video"
|
||||
SUBSYSTEM=="nvidia", GROUP="video"
|
||||
|
||||
# misc devices
|
||||
KERNEL=="random", MODE="0666"
|
||||
KERNEL=="urandom", MODE="0444"
|
||||
KERNEL=="mem", MODE="0640", GROUP="kmem"
|
||||
KERNEL=="kmem", MODE="0640", GROUP="kmem"
|
||||
KERNEL=="port", MODE="0640", GROUP="kmem"
|
||||
KERNEL=="full", MODE="0666"
|
||||
KERNEL=="null", MODE="0666"
|
||||
KERNEL=="zero", MODE="0666"
|
||||
KERNEL=="inotify", MODE="0666"
|
||||
KERNEL=="sgi_fetchop", MODE="0666"
|
||||
KERNEL=="sonypi", MODE="0666"
|
||||
KERNEL=="agpgart", GROUP="video"
|
||||
KERNEL=="rtc", MODE="0660", GROUP="audio"
|
||||
|
||||
KERNEL=="cdemu[0-9]*", GROUP="cdrom"
|
||||
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
|
||||
KERNEL=="pktcdvd", MODE="0644"
|
||||
|
||||
# printers and parallel devices
|
||||
SUBSYSTEM=="printer", GROUP="lp"
|
||||
SUBSYSTEM=="ppdev", GROUP="lp"
|
||||
KERNEL=="pt[0-9]*", GROUP="tape"
|
||||
KERNEL=="pht[0-9]*", GROUP="tape"
|
||||
|
||||
# sound devices
|
||||
SUBSYSTEM=="sound", GROUP="audio"
|
||||
|
||||
# ieee1394 devices
|
||||
KERNEL=="raw1394", GROUP="disk"
|
||||
KERNEL=="dv1394*", GROUP="video"
|
||||
KERNEL=="video1394*", GROUP="video"
|
||||
|
||||
# input devices
|
||||
KERNEL=="event[0-9]*", MODE="0664"
|
||||
KERNEL=="js[0-9]*", MODE="0664"
|
||||
|
||||
# AOE character devices
|
||||
SUBSYSTEM=="aoe", MODE="0220", GROUP="disk"
|
||||
SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/dev/loop
|
||||
/dev/ram
|
||||
/dev/mtdblock
|
||||
/dev/mmcblk
|
||||
@@ -0,0 +1,5 @@
|
||||
ram[0-9]$
|
||||
mtdblock[0-9]$
|
||||
hd[a-z]$
|
||||
sd[a-z]$
|
||||
loop[0-9]$
|
||||
@@ -0,0 +1,83 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Called from udev
|
||||
# Attemp to mount any added block devices
|
||||
# and remove any removed devices
|
||||
#
|
||||
|
||||
MOUNT="/bin/mount"
|
||||
PMOUNT="/usr/bin/pmount"
|
||||
UMOUNT="/bin/umount"
|
||||
name="`basename "$DEVNAME"`"
|
||||
|
||||
if ( blkid "$DEVNAME" | grep -q 'TYPE="mdraid"' )
|
||||
then
|
||||
logger "udev/mount.sh" "[$DEVNAME] is a member of an array, ignoring"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for line in `cat /etc/udev/mount.blacklist | grep -v ^#`
|
||||
do
|
||||
if ( echo "$DEVNAME" | grep -q "$line" )
|
||||
then
|
||||
logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
automount() {
|
||||
! test -d "/media/$name" && mkdir -p "/media/$name"
|
||||
|
||||
if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
|
||||
then
|
||||
#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
|
||||
rm_dir "/media/$name"
|
||||
else
|
||||
logger "mount.sh/automount" "Auto-mount of [/media/$name] successful"
|
||||
touch "/tmp/.automount-$name"
|
||||
fi
|
||||
}
|
||||
|
||||
rm_dir() {
|
||||
# We do not want to rm -r populated directories
|
||||
if test "`find "$1" | wc -l | tr -d " "`" -lt 2 -a -d "$1"
|
||||
then
|
||||
! test -z "$1" && rm -r "$1"
|
||||
else
|
||||
logger "mount.sh/automount" "Not removing non-empty directory [$1]"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ]; then
|
||||
# SlugOS: we pivot to the rootfs based on UUID, not on fstab -- so the fstab may not
|
||||
# be correct at this point in the boot. So we must not let udev mount devices based
|
||||
# soley on the fstab, lest we mount overtop the real rootfs. For now we just comment
|
||||
# out the logic below and let the automount logic (far below) deal with all udev mount
|
||||
# operations.
|
||||
#if [ -x "$PMOUNT" ]; then
|
||||
# $PMOUNT $DEVNAME 2> /dev/null
|
||||
#elif [ -x $MOUNT ]; then
|
||||
# $MOUNT $DEVNAME 2> /dev/null
|
||||
#fi
|
||||
|
||||
# If the device isn't mounted at this point, it isn't configured in fstab
|
||||
# 20061107: Small correction: The rootfs partition may be called just "rootfs" and not by
|
||||
# its true device name so this would break. If the rootfs is mounted on two places
|
||||
# during boot, it confuses the heck out of fsck. So Im auto-adding the root-partition
|
||||
# to /etc/udev/mount.blacklist via postinst
|
||||
|
||||
cat /proc/mounts | awk '{print $1}' | grep -q "^$DEVNAME$" || automount
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
|
||||
for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
|
||||
do
|
||||
$UMOUNT -l $mnt
|
||||
done
|
||||
|
||||
# Remove empty directories from auto-mounter
|
||||
test -e "/tmp/.automount-$name" && rm_dir "/media/$name"
|
||||
fi
|
||||
@@ -0,0 +1,7 @@
|
||||
# This is a grep pattern matched against the device name
|
||||
# Any matched pattern will _not_ be mounted / removed by udevd
|
||||
|
||||
/dev/mtdblock
|
||||
/dev/hda
|
||||
/dev/loop
|
||||
/dev/ram
|
||||
@@ -0,0 +1,6 @@
|
||||
# This is a grep pattern matched against the device name
|
||||
# Any matched pattern will _not_ be mounted / removed by udevd
|
||||
|
||||
/dev/mtdblock
|
||||
/dev/loop
|
||||
/dev/ram
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user