Skip to content

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
radxnl committed May 21, 2012
0 parents commit 2d104e7
Show file tree
Hide file tree
Showing 669 changed files with 356,231 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/build-*
/.deps/
/meta-*/
!/meta-openpli/
/openembedded-core/
/sources/
*.swp
site.conf
16 changes: 16 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[submodule "openembedded-core"]
path = openembedded-core
url = git://git.openembedded.org/openembedded-core-contrib
ignore = dirty
[submodule "meta-openembedded"]
path = meta-openembedded
url = git://git.openembedded.org/meta-openembedded-contrib
ignore = dirty
[submodule "bitbake"]
path = bitbake
url = git://git.openembedded.org/bitbake
ignore = dirty
[submodule "meta-openpli/recipes-openpli/e2openplugins"]
path = meta-openpli/recipes-openpli/e2openplugins
url = git://github.com/E2OpenPlugins/e2openplugins.git
ignore = dirty
340 changes: 340 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

153 changes: 153 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
#!/usr/bin/make -f

# MACHINE examples: et5x00 et6x00 et9x00 dm500hd dm800se dm7020hd dm8000
MACHINE ?= et9x00

# Adjust according to the number CPU cores to use for parallel build.
# Default: Number of processors in /proc/cpuinfo, if present, or 1.
NR_CPU := $(shell [ -f /proc/cpuinfo ] && grep -c '^processor\s*:' /proc/cpuinfo || echo 1)
BB_NUMBER_THREADS ?= $(NR_CPU)
PARALLEL_MAKE ?= -j $(NR_CPU)

XSUM ?= md5sum

BUILD_DIR = $(CURDIR)/build-$(MACHINE)
TOPDIR = $(BUILD_DIR)
DL_DIR = $(CURDIR)/sources
SSTATE_DIR = $(TOPDIR)/sstate-cache
TMPDIR = $(TOPDIR)/tmp
DEPDIR = $(TOPDIR)/.deps

BBLAYERS ?= \
$(CURDIR)/meta-openembedded/meta-oe \
$(CURDIR)/openembedded-core/meta \
$(CURDIR)/meta-openpli \

CONFFILES = \
$(TOPDIR)/env.source \
$(TOPDIR)/conf/openpli.conf \
$(TOPDIR)/conf/bblayers.conf \
$(TOPDIR)/conf/local.conf \
$(TOPDIR)/conf/site.conf

CONFDEPS = \
$(DEPDIR)/.env.source.$(BITBAKE_ENV_HASH) \
$(DEPDIR)/.openpli.conf.$(OPENPLI_CONF_HASH) \
$(DEPDIR)/.bblayers.conf.$(MACHINE).$(BBLAYERS_CONF_HASH) \
$(DEPDIR)/.local.conf.$(MACHINE).$(LOCAL_CONF_HASH)

GIT ?= git
GIT_REMOTE := $(shell $(GIT) remote)
GIT_USER_NAME := $(shell $(GIT) config user.name)
GIT_USER_EMAIL := $(shell $(GIT) config user.email)

hash = $(shell echo $(1) | $(XSUM) | awk '{print $$1}')

.DEFAULT_GOAL := all
all: init
@echo
@echo "Openembedded for the OpenPLi 3.0 environment has been initialized"
@echo "properly. Now you can start building your image, by doing either:"
@echo
@echo " make -f Makefile image"
@echo " or"
@echo " cd $(BUILDDIR) ; source env.source ; bitbake openpli-enigma2-image"
@echo

$(BBLAYERS):
[ -d $@ ] || $(MAKE) $(MFLAGS) update

init: $(BBLAYERS) $(CONFFILES)

image: init
@echo 'Building image for $(MACHINE)'
@. $(TOPDIR)/env.source && cd $(TOPDIR) && bitbake openpli-enigma2-image

update:
@echo 'Updating Git repositories...'
@HASH=`$(XSUM) $(MAKEFILE_LIST)`; \
if [ -n "$(GIT_REMOTE)" ]; then \
$(GIT) pull --ff-only || $(GIT) pull --rebase; \
fi; \
if [ "$$HASH" != "`$(XSUM) $(MAKEFILE_LIST)`" ]; then \
echo 'Makefile changed. Restarting...'; \
$(MAKE) $(MFLAGS) --no-print-directory $(MAKECMDGOALS); \
else \
$(GIT) submodule sync && \
$(GIT) submodule update --init && \
echo "The openpli OE is now up-to-date."; \
fi

.PHONY: all image init update usage

BITBAKE_ENV_HASH := $(call hash, \
'BITBAKE_ENV_VERSION = "0"' \
'CURDIR = "$(CURDIR)"' \
)

$(TOPDIR)/env.source: $(DEPDIR)/.env.source.$(BITBAKE_ENV_HASH)
@echo 'Generating $@'
@echo 'export PATH=$(CURDIR)/openembedded-core/scripts:$(CURDIR)/bitbake/bin:$${PATH}' >> $@

OPENPLI_CONF_HASH := $(call hash, \
'OPENPLI_CONF_VERSION = "1"' \
'CURDIR = "$(CURDIR)"' \
'BB_NUMBER_THREADS = "$(BB_NUMBER_THREADS)"' \
'PARALLEL_MAKE = "$(PARALLEL_MAKE)"' \
'DL_DIR = "$(DL_DIR)"' \
'SSTATE_DIR = "$(SSTATE_DIR)"' \
'TMPDIR = "$(TMPDIR)"' \
)

$(TOPDIR)/conf/openpli.conf: $(DEPDIR)/.openpli.conf.$(OPENPLI_CONF_HASH)
@echo 'Generating $@'
@test -d $(@D) || mkdir -p $(@D)
@echo 'SSTATE_DIR = "$(SSTATE_DIR)"' >> $@
@echo 'TMPDIR = "$(TMPDIR)"' >> $@
@echo 'BB_GENERATE_MIRROR_TARBALLS = "0"' >> $@
@echo 'BBINCLUDELOGS = "yes"' >> $@
@echo 'CONF_VERSION = "1"' >> $@
@echo 'DISTRO = "openpli"' >> $@
@echo 'EXTRA_IMAGE_FEATURES = "debug-tweaks"' >> $@
@echo 'USER_CLASSES = "buildstats"' >> $@

LOCAL_CONF_HASH := $(call hash, \
'LOCAL_CONF_VERSION = "0"' \
'CURDIR = "$(CURDIR)"' \
'TOPDIR = "$(TOPDIR)"' \
'MACHINE = "$(MACHINE)"' \
)

$(TOPDIR)/conf/local.conf: $(DEPDIR)/.local.conf.$(MACHINE).$(LOCAL_CONF_HASH)
@echo 'Generating $@'
@test -d $(@D) || mkdir -p $(@D)
@echo 'TOPDIR = "$(TOPDIR)"' >> $@
@echo 'MACHINE = "$(MACHINE)"' >> $@
@echo 'require $(TOPDIR)/conf/openpli.conf' >> $@

$(TOPDIR)/conf/site.conf: $(CURDIR)/site.conf
@ln -s ../../site.conf $@

$(CURDIR)/site.conf:
@echo 'SCONF_VERSION = "1"' >> $@
@echo 'BB_NUMBER_THREADS = "$(BB_NUMBER_THREADS)"' >> $@
@echo 'PARALLEL_MAKE = "$(PARALLEL_MAKE)"' >> $@
@echo 'DL_DIR = "$(DL_DIR)"' >> $@

BBLAYERS_CONF_HASH := $(call hash, \
'BBLAYERS_CONF_VERSION = "0"' \
'CURDIR = "$(CURDIR)"' \
'BBLAYERS = "$(BBLAYERS)"' \
)

$(TOPDIR)/conf/bblayers.conf: $(DEPDIR)/.bblayers.conf.$(MACHINE).$(BBLAYERS_CONF_HASH)
@echo 'Generating $@'
@test -d $(@D) || mkdir -p $(@D)
@echo 'LCONF_VERSION = "4"' >> $@
@echo 'BBFILES = ""' >> $@
@echo 'BBLAYERS = "$(BBLAYERS)"' >> $@

$(CONFDEPS):
@test -d $(@D) || mkdir -p $(@D)
@$(RM) $(basename $@).*
@touch $@
1 change: 1 addition & 0 deletions bitbake
Submodule bitbake added at 270a05
1 change: 1 addition & 0 deletions meta-openembedded
Submodule meta-openembedded added at 99f125
7 changes: 7 additions & 0 deletions meta-openpli/classes/git-project.bbclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
S = "${WORKDIR}/git"

inherit gitpkgv

VERSION := "${PV}"
PV = "${VERSION}+git${SRCPV}"
PKGV = "${VERSION}+git${GITPKGV}"
61 changes: 61 additions & 0 deletions meta-openpli/classes/image_types_nfi.bbclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
inherit image_types

IMAGE_CMD_jffs2.nfi = " \
mkfs.jffs2 \
--root=${IMAGE_ROOTFS}/boot \
--disable-compressor=lzo \
--compression-mode=size \
--output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.boot.jffs2 \
${EXTRA_IMAGECMD}; \
rm -rf ${IMAGE_ROOTFS}/boot/*; \
printf '/dev/mtdblock2\t/boot\t\tjffs2\tro\t\t\t\t0 0\n' >> ${IMAGE_ROOTFS}/etc/fstab; \
mkfs.jffs2 \
--root=${IMAGE_ROOTFS} \
--disable-compressor=lzo \
--compression-mode=size \
--output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
${EXTRA_IMAGECMD}; \
${DREAMBOX_BUILDIMAGE} \
--boot-partition ${DREAMBOX_PART0_SIZE}:${STAGING_DATADIR}/dreambox-secondstage/secondstage-${MACHINE}.bin \
--data-partition ${DREAMBOX_PART1_SIZE}:${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.boot.jffs2 \
--data-partition ${DREAMBOX_PART2_SIZE}:${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfi; \
"

IMAGE_CMD_sum.jffs2.nfi = " \
mkfs.jffs2 \
--root=${IMAGE_ROOTFS}/boot \
--disable-compressor=lzo \
--compression-mode=size \
--output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.boot.jffs2 \
${EXTRA_IMAGECMD}; \
sumtool \
-i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.boot.jffs2 \
-o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.boot.sum.jffs2 \
${EXTRA_IMAGECMD}; \
rm -rf ${IMAGE_ROOTFS}/boot/*; \
printf '/dev/mtdblock2\t/boot\t\tjffs2\tro\t\t\t\t0 0\n' >> ${IMAGE_ROOTFS}/etc/fstab; \
mkfs.jffs2 \
--root=${IMAGE_ROOTFS} \
--disable-compressor=lzo \
--compression-mode=size \
--output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
${EXTRA_IMAGECMD}; \
sumtool \
-i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
-o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sum.jffs2 \
${EXTRA_IMAGECMD}; \
${DREAMBOX_BUILDIMAGE} \
--boot-partition ${DREAMBOX_PART0_SIZE}:${STAGING_DATADIR}/dreambox-secondstage/secondstage-${MACHINE}.bin \
--data-partition ${DREAMBOX_PART1_SIZE}:${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.boot.sum.jffs2 \
--data-partition ${DREAMBOX_PART2_SIZE}:${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sum.jffs2 \
> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfi; \
"

EXTRA_IMAGECMD_jffs2.nfi ?= "-e ${DREAMBOX_ERASE_BLOCK_SIZE} -n -l"
EXTRA_IMAGECMD_sum.jffs2.nfi ?= "-e ${DREAMBOX_ERASE_BLOCK_SIZE} -n -l"

IMAGE_DEPENDS_jffs2.nfi = "${IMAGE_DEPENDS_jffs2} dreambox-buildimage-native"
IMAGE_DEPENDS_sum.jffs2.nfi = "${IMAGE_DEPENDS_sum.jffs2} dreambox-buildimage-native"

IMAGE_TYPES += "jffs2.nfi sum.jffs2.nfi"
111 changes: 111 additions & 0 deletions meta-openpli/classes/openpli-distutils.bbclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
inherit distutils-base

DISTUTILS_BUILD_ARGS ?= ""
DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
--install-data=${STAGING_DATADIR}"
DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
--install-data=${D}/${datadir}"

distutils_do_compile() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
bbfatal "python setup.py build_ext execution failed."
}

distutils_stage_headers() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/python setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
bbfatal "python setup.py install_headers execution failed."
}

distutils_stage_all() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
bbfatal "python setup.py install (stage) execution failed."
}

distutils_do_install() {
install -d ${D}${PYTHON_SITEPACKAGES_DIR}
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_INSTALL_ARGS} || \
bbfatal "python setup.py install execution failed."

for i in `find ${D} -name "*.py"` ; do \
sed -i -e s:${D}::g $i
done

if test -e ${D}${bindir} ; then
for i in ${D}${bindir}/* ; do \
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
done
fi

if test -e ${D}${sbindir}; then
for i in ${D}${sbindir}/* ; do \
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
done
fi

rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth

#
# FIXME: Bandaid against wrong datadir computation
#
if test -e ${D}${datadir}/share; then
mv -f ${D}${datadir}/share/* ${D}${datadir}/
fi

# These are generated files, on really slow systems the storage/speed trade off
# might be worth it, but in general it isn't
find ${D}${libdir}/${PYTHON_DIR}/site-packages -iname '*.pyo' -exec rm {} \;
}

distutils_do_install_keep() {
install -d ${D}${PYTHON_SITEPACKAGES_DIR}
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_INSTALL_ARGS} || \
bbfatal "python setup.py install execution failed."

for i in `find ${D} -name "*.py"` ; do \
sed -i -e s:${D}::g $i
done

if test -e ${D}${bindir} ; then
for i in ${D}${bindir}/* ; do \
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
done
fi

if test -e ${D}${sbindir}; then
for i in ${D}${sbindir}/* ; do \
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
done
fi

rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth

#
# FIXME: Bandaid against wrong datadir computation
#
if test -e ${D}${datadir}/share; then
mv -f ${D}${datadir}/share/* ${D}${datadir}/
fi
}

EXPORT_FUNCTIONS do_compile do_install do_install_keep

export LDSHARED="${CCLD} -shared"
5 changes: 5 additions & 0 deletions meta-openpli/classes/schwerkraft-git.bbclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SCHWERKRAFT_PROJECT ?= "${BPN}"

SRC_URI += "git://schwerkraft.elitedvb.net/${SCHWERKRAFT_PROJECT}/${SCHWERKRAFT_PROJECT}.git;protocol=git"

inherit git-project
26 changes: 26 additions & 0 deletions meta-openpli/conf/distro/include/openpli-unstable-versions.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# git
SRCREV_pn-enigma2-plugin-skins-magic ?= "${AUTOREV}"
SRCREV_pn-enigma2 ?= "${AUTOREV}"
SRCREV_pn-aio-grab ?= "${AUTOREV}"
SRCREV_pn-ambx ?= "${AUTOREV}"
SRCREV_pn-python-pyambx ?= "${AUTOREV}"
SRCREV_pn-enigma2-plugin-extensions-ambx ?= "${AUTOREV}"
SRCREV_pn-enigma2-pliplugins ?= "${AUTOREV}"
SRCREV_pn-enigma2-plugin-extensions-xmltvimport ?= "${AUTOREV}"
SRCREV_pn-enigma2-plugins ?= "${AUTOREV}"
SRCREV_pn-enigma2-skins ?= "${AUTOREV}"
SRCREV_pn-hotplug-e2-helper ?= "${AUTOREV}"
SRCREV_pn-libdreamdvd ?= "${AUTOREV}"
SRCREV_pn-usbtunerhelper ?= "${AUTOREV}"
SRCREV_pn-gst-plugin-dvbmediasink ?= "${AUTOREV}"
SRCREV_pn-libtuxtxt ?= "${AUTOREV}"
SRCREV_pn-tuxtxt-enigma2 ?= "${AUTOREV}"
SRCREV_pn-libdvbsi++ ?= "bf0c2bb7b326b93713629dbf74f63a0a54ffe59d"
SRCREV_pn-gst-plugin-subsink ?= "${AUTOREV}"
SRCREV_pn-librtmp ?= "${AUTOREV}"

# svn
SRCREV_pn-tuxbox-common ?= "${AUTOREV}"
SRCREV_pn-tuxterm ?= "${AUTOREV}"
SRCREV_pn-enigma2-plugin-extensions-tuxcom ?= "${AUTOREV}"
SRCREV_pn-enigma2-plugin-extensions-tuxterm ?= "${AUTOREV}"
Loading

0 comments on commit 2d104e7

Please sign in to comment.