update to 0.10.0
run relocation script remove installers
This commit is contained in:
parent
d543a95f2f
commit
7ad0945e7e
9
.SRCINFO
9
.SRCINFO
@ -1,8 +1,8 @@
|
||||
# Generated by mksrcinfo v8
|
||||
# Sat Jan 5 05:19:03 UTC 2019
|
||||
# Wed Mar 27 05:36:02 UTC 2019
|
||||
pkgbase = zephyr-sdk
|
||||
pkgdesc = SDK for Zephyr real-time operating system
|
||||
pkgver = 0.9.5
|
||||
pkgver = 0.10.0
|
||||
pkgrel = 1
|
||||
url = https://www.zephyrproject.org/
|
||||
install = zephyr-sdk.install
|
||||
@ -20,6 +20,7 @@ pkgbase = zephyr-sdk
|
||||
depends = python-pyelftools
|
||||
depends = python-pyserial
|
||||
depends = python-pykwalify
|
||||
depends = python-west
|
||||
depends = git-spindle
|
||||
depends = gitlint
|
||||
depends = ninja
|
||||
@ -32,9 +33,9 @@ pkgbase = zephyr-sdk
|
||||
optdepends = pyocd: programming and debugging ARM MCUs
|
||||
options = !strip
|
||||
backup = etc/zephyrrc
|
||||
source = https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/0.9.5/zephyr-sdk-0.9.5-setup.run
|
||||
source = https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.10.0/zephyr-sdk-0.10.0-setup.run
|
||||
source = zephyrrc
|
||||
sha256sums = a5c483c099382036a87c02c7b4b1f4b32a31572fcb4a890b474b46b6e8cec647
|
||||
sha256sums = 614e6d8e10842e899c513539c8b971caee4b79a14de3ebab38dbe2c120340e88
|
||||
sha256sums = 7a1257272c64bdec281283d391e3149cece065935c9e8394d6bece32d0f6fc05
|
||||
|
||||
pkgname = zephyr-sdk
|
||||
|
105
PKGBUILD
105
PKGBUILD
@ -1,7 +1,7 @@
|
||||
# Maintainer: Alexei Colin <ac@alexeicolin.com>
|
||||
|
||||
pkgname=zephyr-sdk
|
||||
pkgver=0.9.5
|
||||
pkgver=0.10.0
|
||||
pkgrel=1
|
||||
pkgdesc="SDK for Zephyr real-time operating system"
|
||||
arch=('x86_64')
|
||||
@ -10,11 +10,12 @@ license=('Apache')
|
||||
depends=('python-breathe' 'python-sphinx' 'python-docutils' 'python-pyaml'
|
||||
'python-ply' 'python-pip' 'python-setuptools' 'python-wheel'
|
||||
'python-pyelftools' 'python-pyserial' 'python-pykwalify'
|
||||
'python-west'
|
||||
'git-spindle' 'gitlint' 'ninja' 'gperf' 'ccache'
|
||||
'doxygen' 'dfu-util' 'dtc' 'cmake>=3.8.2')
|
||||
optdepends=('pyocd: programming and debugging ARM MCUs')
|
||||
makedepends=('patchelf')
|
||||
source=("https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/${pkgver}/zephyr-sdk-${pkgver}-setup.run"
|
||||
source=("https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${pkgver}/zephyr-sdk-${pkgver}-setup.run"
|
||||
"zephyrrc")
|
||||
|
||||
options=(!strip)
|
||||
@ -28,8 +29,11 @@ build() {
|
||||
cd "$srcdir"
|
||||
}
|
||||
|
||||
# Matches per-toolchain commands in $_installdir/setup.sh
|
||||
_TC_CMD="tar -C \\\$target_sdk_dir -xf .\/__TC__.tar.bz2 > \/dev\/null &"
|
||||
|
||||
_list_toolchains() {
|
||||
echo $(sed -n "s/\.\/zephyr-sdk-baremetal-x86_64-meta-toolchain-\([a-zA-Z0-9-]\+\)-toolchain-[0-9.]\+\.sh.*/\1/p" $1 | sort)
|
||||
echo $(sed -n "s@^$(echo $_TC_CMD | sed 's/__TC__/\\(.*\\)/g')@\1@p" $1 | sort)
|
||||
}
|
||||
|
||||
package ()
|
||||
@ -44,41 +48,84 @@ package ()
|
||||
sed -i 's#^\(\./zephyr-sdk-x86_64-hosttools-standalone-[0-9.]\+sh\)#\1 -R -S#' $pkgdir/$_installdir/setup.sh
|
||||
|
||||
# Install hosttools always, but let the toolchains be selectable below:
|
||||
echo ">>> Available toolchains: $(_list_toolchains $pkgdir/$_installdir/$_setupsh)"
|
||||
ALL_TOOLCHAINS=($(_list_toolchains $pkgdir/$_installdir/$_setupsh))
|
||||
echo ">>> To select a subset of toolchains set TOOLCHAINS in environment, like so:"
|
||||
echo ">>> TOOLCHAINS='arm arc' makepkg"
|
||||
echo ">>> Available toolchains: ${ALL_TOOLCHAINS[*]}"
|
||||
|
||||
local DISABLED_TOOLCHAINS=""
|
||||
#local DISABLED_TOOLCHAINS="i586 arc iamcu mips32r2 nios2 xtensa riscv32"
|
||||
# Validate selected toolchains
|
||||
if [ ! -z "$TOOLCHAINS" ]
|
||||
then
|
||||
TOOLCHAINS=(${TOOLCHAINS}) # convert to array
|
||||
|
||||
echo ">>> Disabled toolchains: $(echo ${DISABLED_TOOLCHAINS} | xargs -n 1 | sort | xargs)"
|
||||
for tc in "${TOOLCHAINS[@]}"
|
||||
do
|
||||
if ! echo "${ALL_TOOLCHAINS[@]}" | grep -q -w "$tc"
|
||||
then
|
||||
echo ">>> ERROR: unknown toolchain: $tc"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
else
|
||||
TOOLCHAINS=("${ALL_TOOLCHAINS[@]}")
|
||||
fi
|
||||
echo ">>> Selected toolchains: ${TOOLCHAINS[*]}"
|
||||
|
||||
for tc in $DISABLED_TOOLCHAINS
|
||||
# i586 is required because it is used as a hardcoded default
|
||||
# (for preprocessing) before target architecture is available
|
||||
echo ">>> Note: i586 was selected automatically because it is always required"
|
||||
if ! echo "${TOOLCHAINS[@]}" | grep -q -w "i586"
|
||||
then
|
||||
TOOLCHAINS+=("i586")
|
||||
fi
|
||||
|
||||
for tc in ${ALL_TOOLCHAINS[@]}
|
||||
do
|
||||
sed -i "/\.\/zephyr-sdk-baremetal-x86_64-meta-toolchain-${tc}-toolchain-[0-9.]\+\.sh.*/,+3d" $pkgdir/$_installdir/$_setupsh
|
||||
if ! echo "${TOOLCHAINS[@]}" | grep -q -w "$tc"
|
||||
then
|
||||
DISABLED_TOOLCHAINS+=("$tc")
|
||||
fi
|
||||
done
|
||||
|
||||
for tc in ${DISABLED_TOOLCHAINS[@]}
|
||||
do
|
||||
sed -i "/$(echo $_TC_CMD | sed s/__TC__/${tc}/g)/,+3d" $pkgdir/$_installdir/$_setupsh
|
||||
done
|
||||
|
||||
echo ">>> Installing toolchains: $(_list_toolchains $pkgdir/$_installdir/$_setupsh)"
|
||||
|
||||
# Because we chose not to relocate binaries, we need to make the default path work.
|
||||
# The version here is the toolchain version, in the filename of each toolchain.
|
||||
#
|
||||
# Alternatively, we can relocate the binaries, either using the stock relocation
|
||||
# script or using:
|
||||
#
|
||||
# find $pkgdir/$_installdir -type f -executable -exec \
|
||||
# patchelf --set-interpreter /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/lib/ld-linux-x86-64.so.2 \
|
||||
# --set-rpath /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/lib:/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/lib {} \;
|
||||
#
|
||||
local _ver="$(sed -n "s/^\.\/zephyr-sdk-baremetal-x86_64-meta-toolchain-[a-zA-Z0-9]\+-toolchain-\([0-9.]\+\)\.sh.*/\1/p" $pkgdir/$_installdir/$_setupsh | uniq)"
|
||||
for v in $_ver
|
||||
do
|
||||
ln -s $_installdir $pkgdir/$_installdir/$v
|
||||
done
|
||||
|
||||
bash -c "cd $pkgdir/$_installdir && ./$_setupsh -d $pkgdir/$_installdir"
|
||||
|
||||
install -Dm644 zephyrrc $pkgdir/etc/zephyrrc
|
||||
|
||||
cd $pkgdir/$_installdir
|
||||
|
||||
######### NOTE: we are in $_installdir after this point
|
||||
|
||||
./$_setupsh -d $pkgdir/$_installdir
|
||||
|
||||
# Strip package build path from prefix path
|
||||
sed -i "s@\(relocate_sdk.py\s\+\)$pkgdir@\1@g" relocate_sdk.sh
|
||||
./relocate_sdk.sh
|
||||
|
||||
rm zephyr-sdk-*-hosttools-standalone-*.sh
|
||||
rm "${ALL_TOOLCHAINS[@]/%/.tar.bz2}"
|
||||
rm -f mips.tar.bz2 # workaround: mips is part of archive but not in setup.sh
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
sha256sums=('a5c483c099382036a87c02c7b4b1f4b32a31572fcb4a890b474b46b6e8cec647'
|
||||
# Manual test procedure: get Zephyr Kernel, build an example, and run in Qemu:
|
||||
#
|
||||
# $ wget https://github.com/zephyrproject-rtos/zephyr/archive/master.tar.gz
|
||||
# $ tar xf master.tar.gz
|
||||
# $ cd zephyr-master/samples/synchronization
|
||||
# $ mkdir build && cd build
|
||||
# $ cmake -GNinja -DBOARD=qemu_cortex_m3 ..
|
||||
# $ ninja run
|
||||
#
|
||||
# Should get output like:
|
||||
# ***** BOOTING ZEPHYR OS v1.8.99 - BUILD: Jun 27 2017 13:09:26 *****
|
||||
# threadA: Hello World from arm!
|
||||
#
|
||||
# More info: https://docs.zephyrproject.org/latest/boards/arm/qemu_cortex_m3/doc/board.html
|
||||
|
||||
|
||||
sha256sums=('614e6d8e10842e899c513539c8b971caee4b79a14de3ebab38dbe2c120340e88'
|
||||
'7a1257272c64bdec281283d391e3149cece065935c9e8394d6bece32d0f6fc05')
|
||||
|
Loading…
Reference in New Issue
Block a user