Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions classes/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ checkoutSCM:
dir: kmod-script

buildVars: [LINUX_ARCH, ARCH, CROSS_COMPILE, CC]
buildTools: [m4, bison, flex, target-toolchain, host-toolchain]
buildTools: [m4, bison, flex, target-toolchain, host-toolchain, perl]
buildSetup: |
# make sure we find our kmod-dist script in the package step
ln -sf $1/kmod-script .
Expand All @@ -92,28 +92,32 @@ buildSetup: |
#
# $1: linux kernel source directory
# $2: defconfig (optional)
# - if omitted, use the kernel defconfig
# - if this is an actual file, use it as the config
# - if this is not a file, check if a defconfig for the target arch by
# that name exists and if yes, use that one
# - if this is not a file, treat it as a defconfig of the target arch
linuxConfig()
{
DEF_CFG=${2:-$1/arch/${LINUX_ARCH}/configs/defconfig}
if [[ -f "$1/arch/${LINUX_ARCH}/configs/${DEF_CFG}" ]] ; then
DEF_CFG=$1/arch/${LINUX_ARCH}/configs/${DEF_CFG}
fi
# check if the defconfig file exists
if [[ ! -f "$DEF_CFG" ]]; then
>&2 echo "Don't know how to use '$DEF_CFG' as linux kernel config!"
false
fi
# check if the source file is newer than .config
if [[ -f .config && .config -nt $DEF_CFG ]]; then
return 0
if [[ ${2+set} ]] ; then
local DEF_CFG
if [[ -f "$2" ]] ; then
DEF_CFG="$2"
else
DEF_CFG="$1/arch/${LINUX_ARCH}/configs/$2"
fi

if [[ ! -f "$DEF_CFG" ]]; then
>&2 echo "Specified kernel defconfig '$DEF_CFG' does not exist!"
false
fi

# check if the source file is newer than .config
if [[ ! -f .config || .config -ot $DEF_CFG ]]; then
cp -u "$DEF_CFG" .config
makeSequential -C "$1" O="$PWD" olddefconfig
fi
elif [[ ! -f .config ]] ; then
makeSequential -C "$1" O="$PWD" defconfig
fi
# redo the .config file
cp -u "$DEF_CFG" .config
makeSequential -C $1 O=$PWD \
olddefconfig
}

# Build the actual target linux image and all configured modules
Expand Down
1 change: 1 addition & 0 deletions recipes/bsp/uboot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ multiPackage:
- if: "${UBOOT_CUSTOM_CONFIG:-}"
name: "${UBOOT_CUSTOM_CONFIG_PKG:-uboot-custom-cfg}"

buildToolsWeak: [perl]
buildVars: [UBOOT_CONFIG, UBOOT_TARGETS, UBOOT_CUSTOM_CONFIG, UBOOT_CUSTOM_CONFIG_PKG]
buildScript: |
# Use plain "defconfig" if we have no specific target. Otherwise check if
Expand Down
7 changes: 5 additions & 2 deletions recipes/core/busybox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ buildScript: |
elif [[ ${BUSYBOX_CONFIG:+true} ]] ; then
CFG="$1/configs/${BUSYBOX_CONFIG}"
else
CFG="defconfig"
if [ ! -e .config ]; then
make -C $1 O=$PWD defconfig
fi
CFG=".config"
fi

# check if the defconfig exists
if [[ ! -f "$CFG" ]]; then
>&2 echo "Don't know how to use '$CFG' as busybox config!"
>&2 echo "Specified busybox defconfig '$CFG' does not exist!"
false
fi

Expand Down
10 changes: 9 additions & 1 deletion recipes/devel/intltool.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
inherit: [autotools]
inherit: [autotools, perl5]

metaEnvironment:
PKG_VERSION: "0.50.2"

depends:
- perl::xml-parser-dev
- use: []
depends:
- perl::xml-parser-tgt

checkoutSCM:
scm: url
url: http://launchpad.net/intltool/trunk/${PKG_VERSION}/+download/intltool-${PKG_VERSION}.tar.gz
Expand All @@ -14,3 +20,5 @@ buildScript: |

packageScript: |
autotoolsPackageTgt

provideDeps: ['*-tgt']
2 changes: 1 addition & 1 deletion recipes/devel/squashfs-tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ depends:

checkoutSCM:
scm: url
url: ${GITHUB_MIRROR}/plougher/squashfs-tools/archive/${PKG_VERSION}.tar.gz
url: ${GITHUB_MIRROR}/plougher/squashfs-tools/releases/download/${PKG_VERSION}/squashfs-tools-${PKG_VERSION}.tar.gz
digestSHA256: "94201754b36121a9f022a190c75f718441df15402df32c2b520ca331a107511c"
stripComponents: 1

Expand Down
14 changes: 7 additions & 7 deletions recipes/kernel/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ buildScript: |
export KCONFIG_NOTIMESTAMP=1
export KBUILD_BUILD_TIMESTAMP='Mon Dec 28 22:49:40 CET 2015'

# Use plain "defconfig" if we have no specific target. Otherwise check if
# defconfig has changed.
LCFG=( "$1/linux" )

# Use plain "defconfig" if we have no specific target. Otherwise, pick up
# the requested config.
if [[ ${LINUX_CUSTOM_CONFIG:+true} ]] ; then
PKG="${LINUX_CUSTOM_CONFIG_PKG:-kernel::linux-custom-config}"
LCFG="${BOB_DEP_PATHS[$PKG]}/$LINUX_CUSTOM_CONFIG"
LCFG+=( "${BOB_DEP_PATHS[$PKG]}/$LINUX_CUSTOM_CONFIG" )
elif [[ ${LINUX_CONFIG:+true} ]] ; then
LCFG="${LINUX_CONFIG}"
else
LCFG="defconfig"
LCFG+=( "${LINUX_CONFIG}" )
fi

linuxConfig $1/linux $LCFG
linuxConfig "${LCFG[@]}"

multiPackage:
"":
Expand Down
5 changes: 3 additions & 2 deletions recipes/libs/botan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ depends:

checkoutSCM:
scm: url
url: https://botan.randombit.net/releases/Botan-${PKG_VERSION}.tar.xz
digestSHA256: fc0620463461caaea8e60f06711d7e437a3ad1eebd6de4ac29c14bbd901ccd1b
url: ${GITHUB_MIRROR}/randombit/botan/archive/refs/tags/${PKG_VERSION}.tar.gz
digestSHA256: 8d2a072c7cdca6cadd16f89bb966fce1b3ec77cb4614bf1d87dec1337a3d2330
stripComponents: 1

checkoutDeterministic: True
checkoutScript: |
patchApplySeries $<@botan/*@>

Expand Down
7 changes: 7 additions & 0 deletions recipes/libs/libseccomp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ checkoutSCM:
digestSHA1: c0349aca443ec0807528d088a3f2e2e0d5d1b17b
stripComponents: 1

depends:
- name: devel::gperf
use: [tools]
tools:
target-toolchain: host-compat-toolchain

buildTools: [gperf]
buildScript: |
autotoolsBuild $1

Expand Down
19 changes: 0 additions & 19 deletions recipes/libs/libxcrypt.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions recipes/net/ifupdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ checkoutSCM:
stripComponents: 1

buildVars: [CC]
buildTools: [perl]
buildScript: |
mkdir -p build
cp -a $1/* build/
sed -i 's#/usr/bin/perl#/usr/bin/env -S perl#' build/defn2*.pl

# fake this
mkdir -p bin
Expand Down
36 changes: 36 additions & 0 deletions recipes/perl/cache-memcached.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
inherit: [install, make, "perl5::build"]

metaEnvironment:
PKG_DESCRIPTION: "Perl memcached module"
PKG_VERSION: "1.30"
PKG_LICENSE: "GPL"

depends:
- perl::string-crc32-dev
- use: []
depends:
- perl::string-crc32-tgt

checkoutSCM:
scm: url
url: https://cpan.metacpan.org/authors/id/D/DO/DORMANDO/Cache-Memcached-${PKG_VERSION}.tar.gz
digestSHA1: "e439c698a9ff17bba0eae06db39b6bb36fc6fa75"
stripComponents: 1

buildTools: [target-toolchain]
buildScript: |
mkdir -p build && pushd build
rsync -a --delete $1/ .
perl Makefile.PL static

makeParallel
makeSequential install DESTDIR=$(pwd)/../install
popd

multiPackage:
dev:
provideDeps: ['*-dev']
packageScript: installPackageDev $1/install/ "/usr/lib/***"
tgt:
provideDeps: ['*-tgt']
packageScript: installPackageTgt $1/install/ "/usr/lib/***"
28 changes: 28 additions & 0 deletions recipes/perl/string-crc32.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
inherit: ["perl5::build", make, install]

metaEnvironment:
PKG_DESCRIPTION: "Perl string CRC32 module"
PKG_VERSION: "2.100"
PKG_LICENSE: "Public Domain"

checkoutSCM:
scm: url
url: https://cpan.metacpan.org/authors/id/L/LE/LEEJO/String-CRC32-${PKG_VERSION}.tar.gz
digestSHA1: "09a0dafc1bc49f7cc04122a6859eb007e86ec22c"
stripComponents: 1

buildTools: [target-toolchain]
buildScript: |
mkdir -p build && pushd build
rsync -a --delete $1/ .
perl Makefile.PL static

makeParallel
make install DESTDIR=$(pwd)/../install
popd

multiPackage:
dev:
packageScript: installPackageDev $1/install/ "/usr/lib/***"
tgt:
packageScript: installPackageTgt $1/install/ "/usr/lib/***"
44 changes: 44 additions & 0 deletions recipes/perl/xml-parser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
inherit: [install, make, "perl5::build"]

metaEnvironment:
PKG_DESCRIPTION: "A perl module for parsing XML documents"
PKG_VERSION: "2.47"
PKG_LICENSE: "GPL"

depends:
- libs::libxcrypt-dev
- libs::expat-dev
- libs::libxml2-dev
- use: []
depends:
- libs::libxcrypt-tgt
- libs::libxml2-tgt
- libs::expat-tgt

checkoutSCM:
scm: url
url: https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-${PKG_VERSION}.tar.gz
digestSHA1: caa4cc51930cc6bd14c1d5bb1dbf5aeae4ab952b
stripComponents: 1

buildTools: [target-toolchain]
buildScript: |
mkdir -p build && pushd build
rsync -a --delete $1/ .
perl Makefile.PL \
EXPATLIBPATH=${BOB_DEP_PATHS['libs::expat-dev']}/usr/lib \
EXPATINCPATH=${BOB_DEP_PATHS['libs::expat-dev']}/usr/include \
static

makeParallel
makeSequential install DESTDIR=$(pwd)/../install
popd # build

multiPackage:
dev:
provideDeps: ['*-dev']
packageScript: installPackageDev $1/install/ "/usr/lib/***"

tgt:
provideDeps: ['*-tgt']
packageScript: installPackageTgt $1/install/ "/usr/lib/***"
4 changes: 4 additions & 0 deletions tests/buildall/recipes/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ depends:
- net::tcpdump
- net::wget

- perl::cache-memcached-tgt
- perl::string-crc32-tgt
- perl::xml-parser-tgt

- python::build
- python::calver
- python::colorama
Expand Down
2 changes: 1 addition & 1 deletion tests/buildall/recipes/buildall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ depends:
# devel stuff (usually) not deployed to targets -> host compat toolchain
- devel::byacc
- devel::dtc
# - devel::intltool # FIXME: configure: error: XML::Parser perl module is required for intltool
- devel::intltool
- devel::lua-bin
- devel::makedepend
- devel::nasm
Expand Down