Skip to content

Commit

Permalink
Merge pull request OpenXT#44 from flihp/OXT-94and24
Browse files Browse the repository at this point in the history
OXT-24 & OXT-94
  • Loading branch information
cjp256 committed Dec 21, 2014
2 parents f88e3ec + dd2a10b commit 9666500
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
misc/*
build/bitbake.lock
build/conf/local.conf
build/conf/sanity_info
Expand All @@ -8,5 +7,6 @@ build/oe
build/oeenv
build/pseudodone
build/repos
build/sstate-cache
build/tmp-eglibc
build-output/*
2 changes: 1 addition & 1 deletion build/conf/bblayers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ LCONF_VERSION = "4"

BBFILES ?= ""
BBLAYERS ?= " \
${TOPDIR}/repos/xenclient-oe/xenclient \
${TOPDIR}/repos/extra \
${TOPDIR}/oe/xenclient \
${TOPDIR}/repos/openembedded-core/meta \
${TOPDIR}/repos/meta-openembedded/meta-xfce \
${TOPDIR}/repos/meta-openembedded/meta-oe \
Expand Down
149 changes: 149 additions & 0 deletions build/conf/local.conf-dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# 1) Basic config

DISTRO_FEATURES = "alsa ext2 largefile usbhost wifi xattr pci x11 ipv4 ipv6 ${DISTRO_FEATURES_LIBC} multiarch pam"
BB_NUMBER_THREADS = "4"
PARALLEL_MAKE = "-j 4"
PACKAGE_CLASSES ?= "package_ipk"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
#USER_CLASSES ?= "buildstats image-mklibs image-prelink"
# disable prelink and mklibs as it does not play nicely with part 2 installer image
# TODO: enable it for selected images
USER_CLASSES = "buildstats"

PATCHRESOLVE = "noop"
CONF_VERSION = "1"
TMPDIR ?= "${TOPDIR}/build"
#DL_DIR ?= "${TOPDIR}/downloads"
#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"

STAGING_IDLDIR = "${STAGING_DATADIR}/idl"

ENABLE_BINARY_LOCALE_GENERATION = "1"
LOCALE_UTF8_ONLY = "1"

# ocaml
SYSROOT_OCAML_PATH = "${STAGING_DIR_NATIVE}${libdir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}/ocaml"
OCAML_STDLIBDIR = "${SYSROOT_OCAML_PATH}/site-lib"
OCAML_HEADERS = "${SYSROOT_OCAML_PATH}"
export ocamllibdir = "${libdir}/ocaml"
STAGING_LIBDIR_OCAML = "${STAGING_LIBDIR}/ocaml"
OCAML_FINDLIB_CONF = "${STAGING_DIR_HOST}${sysconfdir}/findlib.conf"

# vhd image format support
# 100M - safe default, overwrite in the recipe
VHD_MAX_SIZE = "100"
IMAGE_CMD_ext3.vhd = "install -d ${DEPLOY_DIR_IMAGE}/tmp.vhd ; genext2fs -b ${ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/tmp.vhd/${IMAGE_NAME}.rootfs.ext3 ${EXTRA_IMAGECMD}; tune2fs -j ${DEPLOY_DIR_IMAGE}/tmp.vhd/${IMAGE_NAME}.rootfs.ext3; vhd convert ${DEPLOY_DIR_IMAGE}/tmp.vhd/${IMAGE_NAME}.rootfs.ext3 ${DEPLOY_DIR_IMAGE}/tmp.vhd/${IMAGE_NAME}.rootfs.ext3.vhd ${VHD_MAX_SIZE}; rm -f ${DEPLOY_DIR_IMAGE}/tmp.vhd/${IMAGE_NAME}.rootfs.ext3; mv ${DEPLOY_DIR_IMAGE}/tmp.vhd/${IMAGE_NAME}.rootfs.ext3.vhd ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3.vhd"
IMAGE_DEPENDS_ext3.vhd = "hs-vhd-native genext2fs-native e2fsprogs-native"

# raw image - simply copy rootfs tree to deploy directory
IMAGE_CMD_raw = "cp -a ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.raw"

XC_EXT3_SIZE="327155712"
XC_EXT3_VHD_SIZE="312"
XC_EXT3_BVHD_BLOCKS="319488"

IMAGE_CMD_xc.ext3 = "( set -x; I=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.xc.ext3; truncate -s ${XC_EXT3_SIZE} $I; mke2fs -F -t ext3 $I; tune2fs -c -1 -i 0 $I; gene3fs -i $I -d ${IMAGE_ROOTFS}; e2fsck -f -y $I || true)"
IMAGE_DEPENDS_xc.ext3 = "gene3fs-native e2fsprogs-native"

# sadly the vhd stack in XC doesn't seem to [yet] understand libbudgetvhd's vhds
IMAGE_CMD_xc.ext3.vhd = "( set -x; I=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.xc.ext3.vhd; truncate -s ${XC_EXT3_SIZE} $I.tmp; mke2fs -F -t ext3 $I.tmp; tune2fs -c -1 -i 0 $I.tmp; gene3fs -i $I.tmp -d ${IMAGE_ROOTFS}; e2fsck -f -y $I.tmp || true ; vhd convert $I.tmp $I ${XC_EXT3_VHD_SIZE} ; rm -f $I.tmp )"
IMAGE_DEPENDS_xc.ext3.vhd = "hs-vhd-native gene3fs-native e2fsprogs-native"

IMAGE_CMD_xc.ext3.bvhd = "( set -x ; I=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.xc.ext3.bvhd; bvhd_create $I ${XC_EXT3_BVHD_BLOCKS}; mke2fs -Z -F -t ext3 $I; tune2fs -Z -c -1 -i 0 $I; gene3fs -V -i $I -d ${IMAGE_ROOTFS}; e2fsck -Z -f -y $I || true )"
IMAGE_DEPENDS_xc.ext3.bvhd = "gene3fs-native e2fsprogs-native"

# Build source packages if XENCLIENT_BUILD_SRC_PACKAGES is set to 1.
INHERIT += "xenclient-src-package"

# Collect info about sources used in build if XENCLIENT_COLLECT_SRC_INFO is
# set to 1.
INHERIT += "xenclient-src-info"


# 2) Build tweaks/hacks

PREFERRED_VERSION_linux-libc-headers = "3.11"
PREFERRED_VERSION_linux-libc-headers-nativesdk = "${PREFERRED_VERSION_linux-libc-headers}"
PREFERRED_VERSION_dojosdk-native = "1.7.2"

PREFERRED_PROVIDER_console-tools = "console-tools"
PREFERRED_PROVIDER_virtual/libx11 = "libx11"

VIRTUAL-RUNTIME_keymaps = "xenclient-console-keymaps"

FILESYSTEM_PERMS_TABLES = "files/xc-fs-perms.txt"
POLKITAUTH = ""
BBMASK = "busybox_1.19"

# prevent tasks from creating empty "${S}" dir
do_clean[dirs] = "${WORKDIR}"
do_cleansstate[dirs] = "${WORKDIR}"
do_cleanall[dirs] = "${WORKDIR}"
do_fetch[dirs] = "${WORKDIR}"
#do_unpack[dirs] = "${WORKDIR}"
sstate_cleanall[dirs] = "${WORKDIR}"
sstate_unpack_package[dirs] = "${WORKDIR}"
do_populate_lic_setscene[dirs] = "${WORKDIR}"
do_populate_sysroot_setscene[dirs] = "${WORKDIR}"
do_make_scripts[dirs] = "${WORKDIR}"
#do_repo_clean[dirs] = "${WORKDIR}"


# overwrite debian mirror for screen, as the debian version it's based on (lenny) is in oldstable now
DEBIAN_MIRROR_pn-screen = "http://archive.debian.org/debian/pool"

# disable --as-needed flag for the recipes
ASNEEDED_pn-acpi-helper = ""
ASNEEDED_pn-pci-dm-helper = ""
ASNEEDED_pn-audio-helper = ""
ASNEEDED_pn-atapi-pt-helper = ""
ASNEEDED_pn-libxcxenstore = ""
ASNEEDED_pn-libsurfman = ""
ASNEEDED_pn-libdmbus = ""
ASNEEDED_pn-vbetool-xc = ""
ASNEEDED_pn-qemu-wrappers = ""
ASNEEDED_pn-pmutil = ""
ASNEEDED_pn-xcpmd = ""
ASNEEDED_pn-tboot = ""
ASNEEDED_pn-selinux-load = ""
ASNEEDED_pn-svirt-interpose = ""
ASNEEDED_pn-xenclient-input-daemon = ""
ASNEEDED_pn-bootage = ""
ASNEEDED_pn-surfman = ""
ASNEEDED_pn-audio-daemon = ""
ASNEEDED_pn-xenclient-sha1sum = ""
ASNEEDED_pn-midori = ""
ASNEEDED_pn-busybox-static = ""
ASNEEDED_pn-dm-wrapper = ""
ASNEEDED_pn-dm-wrapper-static = ""
ASNEEDED_pn-xenclient-dbusbouncer = ""
ASNEEDED_pn-sysvinit = ""
#ASNEEDED_pn-xdotool = ""

# CFLAGS/LDFLAGS hacks
LDFLAGS_pn-xdotool += "-lX11"
LDFLAGS_pn-midori += "-ljavascriptcoregtk-1.0"

LDFLAGS_pn-compleat += "-pthread"
CFLAGS_pn-compleat += "-pthread"

LDFLAGS_pn-xenclient-rpcgen += "-pthread"
CFLAGS_pn-xenclient-rpcgen += "-pthread"

LDFLAGS_pn-xenclient-input-daemon += "-lm -lcrypto"

LDFLAGS_pn-devilspie += "-lX11"

CFLAGS_pn-networkmanager-applet += "-Wno-error=unused-but-set-variable"

# make hacks
PARALLEL_MAKE_pn-libxclogging = "-j 1"
PARALLEL_MAKE_pn-gnumail = "-j 1"
PARALLEL_MAKE_pn-gnumail-native = "-j 1"
PARALLEL_MAKE_pn-shared-mime-info = "-j 1"
PARALLEL_MAKE_pn-shared-mime-info-native = "-j 1"


# 3) Proprietary licenses we can ship
LICENSE_FLAGS_WHITELIST = "commercial_broadcom-wifi"
LICENSE_FLAGS_WHITELIST += "commercial_microcode-ctl"
22 changes: 7 additions & 15 deletions do_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@ VERBOSE=0
SOURCE=0
BUILD_USER="`whoami`"
OE_BB_THREADS="8"
MISC_DIR="$TOPDIR/misc"
CACHE_DIR="$MISC_DIR/ccache"
HOME="$MISC_DIR/home"
export HOME
# make git not complain about user not being set
export GIT_AUTHOR_NAME="Build user at `hostname`"
OE_BUILD_CACHE="$MISC_DIR/oe"
CACHE_DIR="$TOPDIR/build/cache"
OE_BUILD_CACHE="$TOPDIR/build"
BRANCH=master
export HOME
BUILD_UID=`id -u`
export BUILD_UID

Expand Down Expand Up @@ -121,8 +115,6 @@ do_oe_setup()
mkdir -p "$path"
pushd "$path" > /dev/null

git_clone "oe" "$OPENXT_GIT_PROTOCOL://$OPENXT_GIT_MIRROR/xenclient-oe.git" "$BRANCH" "$ALLOW_SWITCH_BRANCH_FAIL"

echo "*:$BRANCH" > "manifest"

if [ ! -f "local.settings" ]; then
Expand All @@ -131,6 +123,8 @@ META_SELINUX_REPO=$OPENXT_GIT_PROTOCOL://$OPENXT_GIT_MIRROR/meta-selinux.git
EXTRA_REPO=$OPENXT_GIT_PROTOCOL://$OPENXT_GIT_MIRROR/xenclient-oe-extra.git
EXTRA_DIR=extra
EXTRA_TAG="$BRANCH"
XENCLIENT_REPO=$OPENXT_GIT_PROTOCOL://$OPENXT_GIT_MIRROR/xenclient-oe.git
XENCLIENT_TAG="$BRANCH"
EOF

if [ "$OE_GIT_MIRROR" ] ; then
Expand Down Expand Up @@ -163,7 +157,7 @@ EOF

[ "x$ORIGIN_BRANCH" != "x" ] && branch="$ORIGIN_BRANCH"

oedl="$OE_BUILD_CACHE/oe-download"
oedl="$OE_BUILD_CACHE/downloads"
[ "x$OE_BUILD_CACHE_DL" != "x" ] && oedl="$OE_BUILD_CACHE_DL"

EXTRA_CLASSES=""
Expand All @@ -174,7 +168,7 @@ EOF
fi

if [ ! -f "conf/local.conf" ]; then
cp oe/xenclient/conf/local.conf-dist conf/local.conf
cp conf/local.conf-dist conf/local.conf

if [ ! -z "${OE_TARBALL_MIRROR}" ] ; then
cat >> conf/local.conf <<EOF
Expand All @@ -189,7 +183,7 @@ XENCLIENT_PACKAGE_FEED_URI="${NETBOOT_HTTP_URL}/${ORIGIN_BRANCH}/${NAME}/package
# Local generated configuration for build $ID
INHERIT += "$EXTRA_CLASSES"
SSTATE_DIR = "$OE_BUILD_CACHE/oe-sstate/$branch"
SSTATE_DIR = "$OE_BUILD_CACHE/sstate-cache/$branch"
DL_DIR = "$oedl"
export CCACHE_DIR = "${CACHE_DIR}"
Expand Down Expand Up @@ -1450,8 +1444,6 @@ do_build()
export CCACHE_DIR_TARGET="$CACHE_DIR"
mkdir -p "$OUTPUT_DIR/$NAME/raw"

mkdir -p $HOME

OLDIFS="$IFS"
IFS="," ; export IFS
# work out number of steps
Expand Down
3 changes: 2 additions & 1 deletion setup_build
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ REPOS=$OE_XENCLIENT_DIR/repos
if [ "$1" != "env" ]; then
mkdir -p $REPOS || die "Could not create local build dir"

getgit $REPOS/xenclient-oe $XENCLIENT_REPO $XENCLIENT_TAG
getgit $REPOS/bitbake $BITBAKE_REPO $BITBAKE_TAG
for p in `pwd`/oe/patches/bitbake/*.patch; do
for p in `pwd`/repos/xenclient-oe/patches/bitbake/*.patch; do
if [ ! -f "$p.APPLIED" ]; then
echo "Applying BitBake patch: $p"
pushd $REPOS/bitbake
Expand Down

0 comments on commit 9666500

Please sign in to comment.