diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 77 |
1 files changed, 53 insertions, 24 deletions
@@ -1,25 +1,34 @@ # Maintainer: Alexei Colin <ac@alexeicolin.com> pkgname=zephyr-sdk -pkgver=0.10.3 +pkgver=0.11.2 pkgrel=1 pkgdesc="SDK for Zephyr real-time operating system" arch=('x86_64') url="https://www.zephyrproject.org/" license=('Apache') + +# Some of these are dependencies of Zephyr RTOS, but instructions for Zephyr +# tell user to pip install, so let's add them here instead. (See +# zephyr/scripts/requirements.txt in Zephyr distribution) +# missing: junit2html 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' + 'python-pillow' 'python-anytree' 'python-intelhex' 'python-packaging' + 'pyocd' 'python-pyserial' + 'python-pytest' 'python-sphinx_rtd_theme' + 'python-sphinxcontrib-svg2pdfconverter' 'python-tabulate' + 'python-west' + 'git-spindle' 'gitlint' 'ninja' 'gperf' 'gcovr' 'ccache' 'doxygen' 'dfu-util' 'dtc' 'cmake>=3.8.2') optdepends=('pyocd: programming and debugging ARM MCUs') makedepends=('patchelf') source=("https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${pkgver}/zephyr-sdk-${pkgver}-setup.run" - "zephyrrc") + "zephyrrc" + "setup-unattended.patch") options=(!strip) -backup=('etc/zephyrrc') install=$pkgname.install _installdir=/opt/zephyr-sdk @@ -41,7 +50,7 @@ package () cd "$srcdir" echo ">>> Tip: to avoid waiting for compression, build an uncompresed tar archive:" - echo ">>> PKGEXT='.tar' makepkg" + echo ">>> PKGEXT='.pkg.tar' makepkg" echo mkdir -p $pkgdir/$_installdir @@ -76,14 +85,6 @@ package () fi echo ">>> Selected toolchains: ${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 if ! echo "${TOOLCHAINS[@]}" | grep -q -w "$tc" @@ -99,13 +100,21 @@ package () echo ">>> Installing toolchains: $(_list_toolchains $pkgdir/$_installdir/$_setupsh)" - install -Dm644 zephyrrc $pkgdir/etc/zephyrrc + install -Dm644 zephyrrc $pkgdir/usr/share/zephyr-sdk/zephyrrc cd $pkgdir/$_installdir ######### NOTE: we are in $_installdir after this point - ./$_setupsh -d $pkgdir/$_installdir + echo PWD $PWD + echo patch ./$_setupsh $srcdir/setup-unattended.patch + patch ./$_setupsh $srcdir/setup-unattended.patch + ./$_setupsh -d $pkgdir/$_installdir -norc + + echo ">>>" + echo ">>> Ignore the environment variable values printed above, instead do this:" + echo ">>> cp /usr/share/zephyr-sdk/zephyrrc ~/.zephyrrc" + echo ">>>" # Strip package build path from prefix path sed -i "s@\(relocate_sdk.py\s\+\)${pkgdir}${_installdir} ${pkgdir}${_installdir}@\1 ${_installdir} ${_installdir}@g" relocate_sdk.sh @@ -122,17 +131,37 @@ package () # $ tar xf master.tar.gz # $ cd zephyr-master # $ source zephyr-env.sh -# $ cd samples/synchronization +# $ cd samples/hello_world # $ mkdir build && cd build -# $ cmake -GNinja -DBOARD=qemu_cortex_m3 .. +# $ cmake -GNinja -DBOARD=qemu_x86.. # $ ninja run + +# Alternative using West: +# +# $ west init testws +# $ cd testws +# $ west update +# $ cd zephyr +# $ west build --pristine -b qemu_x86 samples/hellow_world +# $ west -t run + +# Expected output (qemu_x86: # -# Should get output like: -# ***** BOOTING ZEPHYR OS v1.8.99 - BUILD: Jun 27 2017 13:09:26 ***** -# threadA: Hello World from arm! +# SeaBIOS (version rel-1.12.1-0-ga5cab58-dirty-20200214_052440-f7294c49af13-zephyr +# ) +# Booting from ROM..Optimal CONFIG_X86_MMU_PAGE_POOL_PAGES 7 +# *** Booting Zephyr OS build v2.2.0-rc3 *** +# Hello World! qemu_x86 # -# More info: https://docs.zephyrproject.org/latest/boards/arm/qemu_cortex_m3/doc/board.html +# Expected output (qemu_cortex_m3): +# +# qemu-system-arm: warning: nic stellaris_enet.0 has no peer +# *** Booting Zephyr OS version 2.2.0-rc3 *** +# Hello World! qemu_cortex_m3 + +# More info: https://docs.zephyrproject.org/latest/getting_started/index.html -sha256sums=('3af6de7432e02730ca11cb92d7a473d8391c80d1cc233f1a4d6d7496475cff13' - '7a1257272c64bdec281283d391e3149cece065935c9e8394d6bece32d0f6fc05') +sha256sums=('0f620b7bb03e951cb3c57bde6c2f2449e0fb0ae876828d832eff843d6d72f789' + '7a1257272c64bdec281283d391e3149cece065935c9e8394d6bece32d0f6fc05' + 'e4ed1da3cb5a64e99f2d0f2b3b83dba44b36c778c80ef0de57bd70a708ed3d5e') |