Compare commits

...

14 Commits

Author SHA1 Message Date
d56af4d393
Replace packages branch literal by an expression
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-12-01 23:14:04 +02:00
a3d0b97c8f
Apply optimisations from #30
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-11-27 05:54:42 +02:00
42ca3e439b
Remove reverting of the i2c-tools package - fixed upstream
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-11-22 01:28:47 +02:00
2b5cbe32df
Use EXTRA_IMAGE_NAME Image Builder variable instead of moving
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-11-07 00:25:56 +02:00
5f8faea941
Add docker config
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-10-26 13:13:43 +08:00
86890bf436
Update resolvelib package
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-10-24 04:52:07 +03:00
b5eb13dcb6
Add python3-ansible-core-src package into base PACKAGES 2023-10-24 04:52:05 +03:00
dca142cb68
Add also GitPython package and its depends 2023-10-24 04:51:25 +03:00
9cb4cbebf4
Add missing dependencies 2023-10-24 04:51:25 +03:00
96883344fe
Add a package for ansible-core 2023-10-24 04:51:11 +03:00
400678c759
Revert i2c-tools to release 1 and make
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-10-19 05:56:35 +03:00
be26956e3e
Add a PKG_ARCH variable, reuse packages built from feed base
Some checks failed
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-08-07 22:26:30 +03:00
d876323952
Improve Dockerfile:
- fully parametrize downloads,
 - move env parameters down after apt packages install,
 - add python3-distutils for building without buildbot.
2023-08-07 22:25:56 +03:00
8fd3afcdb3
Try replacing a revision of packages feed by the branch name
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-08-07 07:29:30 +03:00
9 changed files with 248 additions and 29 deletions

View File

@ -1,27 +1,28 @@
FROM ubuntu:focal
ENV OPENWRT_VERSION=22.03.2
ENV OPENWRT_TARGET=bcm27xx
ENV OPENWRT_DEVICE=bcm2711
ENV OPENWRT_CC=gcc-11.2.0_musl
RUN apt -y update
RUN DEBIAN_FRONTEND=noninteractive TZ=UTC \
apt -yq install \
build-essential rsync git-core subversion mercurial libssl-dev \
libncurses5-dev unzip gawk zlib1g-dev libncursesw5-dev zlib1g-dev \
gettext xsltproc wget unzip python
gettext xsltproc wget unzip python python3-distutils
# Board build parameters
ENV OPENWRT_VERSION=22.03.2
ENV OPENWRT_TARGET=bcm27xx
ENV OPENWRT_DEVICE=bcm2711
ENV OPENWRT_CC=gcc-11.2.0_musl
RUN mkdir /Downloads
RUN wget -qP /Downloads \
"https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/openwrt-imagebuilder-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}.Linux-x86_64.tar.xz"
"https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/${OPENWRT_TARGET}/${OPENWRT_DEVICE}/openwrt-imagebuilder-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}.Linux-x86_64.tar.xz"
RUN wget -qP /Downloads \
"https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/openwrt-sdk-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}_${OPENWRT_CC}.Linux-x86_64.tar.xz"
"https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/${OPENWRT_TARGET}/${OPENWRT_DEVICE}/openwrt-sdk-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}_${OPENWRT_CC}.Linux-x86_64.tar.xz"
# RUN wget -qP /Downloads \
# "https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/openwrt-toolchain-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}_${OPENWRT_CC}.Linux-x86_64.tar.xz"
# "https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/${OPENWRT_TARGET}/${OPENWRT_DEVICE}/openwrt-toolchain-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}_${OPENWRT_CC}.Linux-x86_64.tar.xz"
ADD . .

View File

@ -11,6 +11,9 @@
set -x
renice -n 19 $$
MAKE="make -j$(nproc)"
tar -xJf /Downloads/openwrt-sdk-${OPENWRT_VERSION}-*.tar.xz
cp -r feed openwrt-sdk-*/
@ -21,6 +24,10 @@ cd openwrt-sdk-*/
cp feeds.conf.default feeds.conf
cat ${pwd}/feeds.conf >> feeds.conf
OPENWRT_BRANCH=$(echo ${OPENWRT_VERSION} | cut -d. -f 1,2)
sed -i "s/\(packages.git\)\^.*/\1;openwrt-${OPENWRT_BRANCH}/g" feeds.conf
./scripts/feeds update -a
./scripts/feeds install -a
@ -28,12 +35,14 @@ make defconfig
# Enable collectd network encryption
echo "CONFIG_PACKAGE_COLLECTD_ENCRYPTED_NETWORK=y" >> .config
make package/kmod-nvme/compile
${MAKE} package/i2c-tools/compile
make package/kmod-i2c-mux-pinctrl/compile
make package/kmod-nvme/compile
make package/kmod-rtc-pcf85063/compile
make package/nvme-cli/compile
make package/asterisk-chan-quectel/compile
make package/collectd/compile
make package/ansible-core/compile
${MAKE} package/asterisk-chan-quectel/compile
${MAKE} package/collectd/compile
sdkdir=$(pwd)
cd ${pwd}
@ -43,12 +52,14 @@ tar -xJf /Downloads/openwrt-imagebuilder-${OPENWRT_VERSION}-*.tar.xz
PROFILE=rpi-4
BINPATH=bin/targets/${OPENWRT_TARGET}/${OPENWRT_DEVICE}
IMAGE_PATH=${BINPATH}/openwrt-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}-${PROFILE}
PKG_ARCH=aarch64_cortex-a72
cd openwrt-imagebuilder-*/
cp ${sdkdir}/${BINPATH}/packages/*.ipk packages/
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/packages/*.ipk packages/
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/telephony/*.ipk packages/
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/local/*.ipk packages/
cp ${sdkdir}/bin/packages/${PKG_ARCH}/base/*.ipk packages/
cp ${sdkdir}/bin/packages/${PKG_ARCH}/packages/*.ipk packages/
cp ${sdkdir}/bin/packages/${PKG_ARCH}/telephony/*.ipk packages/
cp ${sdkdir}/bin/packages/${PKG_ARCH}/local/*.ipk packages/
make info
@ -86,7 +97,8 @@ PACKAGES="kmod-i2c-bcm2835 kmod-i2c-mux kmod-i2c-mux-pinctrl \
luci-app-mwan3 luci-app-upnp \
luci-proto-wireguard \
luci-ssl-nginx luci-app-acme \
python3-packages python3-yaml \
python3-ansible-core python3-ansible-core-src \
python3-yaml \
openssh-sftp-server tcpdump \
iptables-nft ip6tables-nft \
wireguard-tools wget-ssl \
@ -94,7 +106,7 @@ PACKAGES="kmod-i2c-bcm2835 kmod-i2c-mux kmod-i2c-mux-pinctrl \
BOOTSOURCE=target/linux/${OPENWRT_TARGET}/image
BOOTCONFIG=${BOOTSOURCE}/config.txt
KERNELSOURCE=build_dir/target-aarch64_cortex-a72_musl/linux-${OPENWRT_TARGET}_${OPENWRT_DEVICE}/linux-5.10.146
KERNELSOURCE=build_dir/target-${PKG_ARCH}_musl/linux-${OPENWRT_TARGET}_${OPENWRT_DEVICE}/linux-5.10.146
OVERLAYSOURCE=${KERNELSOURCE}/arch/arm64/boot/dts/overlays
# Setup files
@ -102,6 +114,9 @@ mkdir -p files/etc/dropbear
chmod 0750 files/etc/dropbear
cp ${pwd}/authorized_keys files/etc/dropbear
chmod 0400 files/etc/dropbear/authorized_keys
mkdir -p files/etc/docker
chmod 0750 files/etc/docker
cp ${pwd}/daemon.json files/etc/docker
mkdir -p files/etc/uci-defaults
cp ${pwd}/defaults/* files/etc/uci-defaults
@ -122,25 +137,20 @@ pushd ${BOOTSOURCE}
git apply ${pwd}/patches/bootconfig-add.patch
popd
make image PROFILE=${PROFILE} \
make image PROFILE=${PROFILE} EXTRA_IMAGE_NAME="dualeth" \
PACKAGES="${PACKAGES}" DISABLED_SERVICES="dropbear" FILES="files" || exit 1
mv ${IMAGE_PATH}-squashfs-factory.img.gz ${IMAGE_PATH}-squashfs-factory-dualeth.img.gz
mv ${IMAGE_PATH}-squashfs-sysupgrade.img.gz ${IMAGE_PATH}-squashfs-sysupgrade-dualeth.img.gz
sed -i "s|,i2c_csi_dsi||g" ${BOOTSOURCE}/current.txt
sed -i "s/CONFIG_TARGET_ROOTFS_PARTSIZE=.*/CONFIG_TARGET_ROOTFS_PARTSIZE=768/g" .config
make image PROFILE=${PROFILE} \
make image PROFILE=${PROFILE} EXTRA_IMAGE_NAME="waveshare" \
PACKAGES=" \
${PACKAGES} cryptsetup kmod-ata-ahci smartmontools hdparm fdisk parted \
kmod-hwmon-drivetemp btrfs-progs kmod-fs-btrfs kmod-nvme nvme-cli \
docker dockerd docker-compose block-mount" \
DISABLED_SERVICES="dropbear" FILES="files" || exit 1
mv ${IMAGE_PATH}-squashfs-factory.img.gz ${IMAGE_PATH}-squashfs-factory-waveshare.img.gz
mv ${IMAGE_PATH}-squashfs-sysupgrade.img.gz ${IMAGE_PATH}-squashfs-sysupgrade-waveshare.img.gz
cp ${pwd}/overlays/sensing.txt ${BOOTSOURCE}/current.txt
cp ${pwd}/overlays/*.dtbo ${OVERLAYSOURCE}
@ -152,8 +162,7 @@ popd
sed -i "s/CONFIG_TARGET_ROOTFS_PARTSIZE=.*/CONFIG_TARGET_ROOTFS_PARTSIZE=308/g" .config
make image PROFILE=${PROFILE} \
make image PROFILE=${PROFILE} EXTRA_IMAGE_NAME="sensing" \
PACKAGES="${PACKAGES} asterisk \
asterisk-app-sms asterisk-pjsip asterisk-bridge-simple \
asterisk-codec-alaw asterisk-codec-ulaw \
@ -161,9 +170,6 @@ make image PROFILE=${PROFILE} \
asterisk-chan-quectel" \
DISABLED_SERVICES="dropbear" FILES="files" || exit 1
mv ${IMAGE_PATH}-squashfs-factory.img.gz ${IMAGE_PATH}-squashfs-factory-sensing.img.gz
mv ${IMAGE_PATH}-squashfs-sysupgrade.img.gz ${IMAGE_PATH}-squashfs-sysupgrade-sensing.img.gz
cat ${BINPATH}/*.manifest

6
daemon.json Normal file
View File

@ -0,0 +1,6 @@
{
"log-level": "warn",
"userland-proxy": false,
"iptables": true,
"storage-driver": "btrfs"
}

14
defaults/48-docker Normal file
View File

@ -0,0 +1,14 @@
VERSION=1
[ "$(uci -q get defaults.version.docker)" -ge "$VERSION" ] && exit 0
# save version
/sbin/uci set defaults.version.docker="$VERSION"
/sbin/uci -q batch << EOF
set defaults.version.docker="$VERSION"
commit defaults
set docker.globals=globals
set docker.globals.alt_config_file=/etc/docker/daemon.json
commit docker
EOF

View File

@ -0,0 +1,40 @@
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ansible-core
PKG_VERSION:=2.14.2
PKG_RELEASE:=$(AUTORELEASE)
PYPI_NAME:=$(PKG_NAME)
PKG_HASH:=47f0d4b4125b58edba6435a47f37cbe6a18da54594d18f812958bb0cb58d4e65
PKG_MAINTAINER:=Lee Miller <lee.miller@tutanota.com>
PKG_LICENSE:=GPL-3.0-or-later
include $(TOPDIR)/feeds/packages/lang/python/pypi.mk
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
define Package/python3-$(PKG_NAME)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
TITLE:=Radically simple IT automation
URL:=https://ansible.com/
DEPENDS:=+python3 +python3-logging +python3-setuptools +python3-cryptography \
+python3-jinja2 +python3-yaml +python3-packaging \
+python3-git +python3-resolvelib
endef
define Package/python3-$(PKG_NAME)/description
Ansible is a radically simple IT automation system. It handles configuration
management, application deployment, cloud provisioning, ad-hoc task
execution, network automation, and multi-node orchestration. Ansible makes
complex changes like zero-downtime rolling updates with load balancers easy.
endef
$(eval $(call Py3Package,python3-$(PKG_NAME)))
$(eval $(call BuildPackage,python3-$(PKG_NAME)))
$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))

38
feed/gitdb/Makefile Normal file
View File

@ -0,0 +1,38 @@
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=gitdb
PKG_VERSION:=4.0.10
PKG_RELEASE:=$(AUTORELEASE)
PYPI_NAME:=$(PKG_NAME)
PKG_HASH:=6eb990b69df4e15bad899ea868dc46572c3f75339735663b81de79b06f17eb9a
PKG_MAINTAINER:=Lee Miller <lee.miller@tutanota.com>
PKG_LICENSE:=BSD
include $(TOPDIR)/feeds/packages/lang/python/pypi.mk
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
define Package/python3-$(PKG_NAME)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
TITLE:=Git Object Database
URL:=https://github.com/gitpython-developers/gitdb
DEPENDS:=+python3 +python3-setuptools +python3-smmap
endef
define Package/python3-$(PKG_NAME)/description
GitDB allows you to access bare git repositories for reading and writing.
It aims at allowing full access to loose objects as well as packs with
performance and scalability in mind. It operates exclusively on streams,
allowing to handle large objects with a small memory footprint.
endef
$(eval $(call Py3Package,python3-$(PKG_NAME)))
$(eval $(call BuildPackage,python3-$(PKG_NAME)))
$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))

36
feed/gitpython/Makefile Normal file
View File

@ -0,0 +1,36 @@
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=git
PKG_VERSION:=3.1.31
PKG_RELEASE:=$(AUTORELEASE)
PYPI_NAME:=GitPython
PKG_HASH:=8ce3bcf69adfdf7c7d503e78fd3b1c492af782d58893b650adb2ac8912ddd573
PKG_MAINTAINER:=Lee Miller <lee.miller@tutanota.com>
PKG_LICENSE:=BSD-3-Clause
include $(TOPDIR)/feeds/packages/lang/python/pypi.mk
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
define Package/python3-$(PKG_NAME)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
TITLE:=GitPython is a Python library used to interact with Git repositories
URL:=https://github.com/gitpython-developers/GitPython
DEPENDS:=+python3 +python3-setuptools +python3-gitdb
endef
define Package/python3-$(PKG_NAME)/description
GitPython is a python library used to interact with git repositories,
high-level like git-porcelain, or low-level like git-plumbing.
endef
$(eval $(call Py3Package,python3-$(PKG_NAME)))
$(eval $(call BuildPackage,python3-$(PKG_NAME)))
$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))

40
feed/resolvelib/Makefile Normal file
View File

@ -0,0 +1,40 @@
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=resolvelib
PKG_VERSION:=0.9.0
PKG_RELEASE:=2
PYPI_NAME:=$(PKG_NAME)
PKG_HASH:=40ab05117c3281b1b160105e10075094c5ab118315003c922b77673a365290e1
PKG_MAINTAINER:=Lee Miller <lee.miller@tutanota.com>
PKG_LICENSE:=ISC
PKG_BUILD_DEPENDS:=python-setuptools-scm/host python-toml/host
include $(TOPDIR)/feeds/packages/lang/python/pypi.mk
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
define Package/python3-$(PKG_NAME)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
TITLE:=Resolve abstract dependencies into concrete ones
URL:=https://github.com/sarugaku/resolvelib
DEPENDS:=+python3 +python3-setuptools
endef
define Package/python3-$(PKG_NAME)/description
ResolveLib at the highest level provides a Resolver class that includes
dependency resolution logic. You give it some things, and a little
information on how it should interact with them, and it will spit out
a resolution result.
endef
$(eval $(call Py3Package,python3-$(PKG_NAME)))
$(eval $(call BuildPackage,python3-$(PKG_NAME)))
$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))

38
feed/smmap/Makefile Normal file
View File

@ -0,0 +1,38 @@
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=smmap
PKG_VERSION:=5.0.0
PKG_RELEASE:=$(AUTORELEASE)
PYPI_NAME:=$(PKG_NAME)
PKG_HASH:=c840e62059cd3be204b0c9c9f74be2c09d5648eddd4580d9314c3ecde0b30936
PKG_MAINTAINER:=Lee Miller <lee.miller@tutanota.com>
PKG_LICENSE:=BSD-3-Clause
include $(TOPDIR)/feeds/packages/lang/python/pypi.mk
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
define Package/python3-$(PKG_NAME)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
TITLE:=A pure Python implementation of a sliding window memory map manager
URL:=https://github.com/gitpython-developers/smmap
DEPENDS:=+python3 +python3-setuptools
endef
define Package/python3-$(PKG_NAME)/description
Smmap wraps an interface around mmap and tracks the mapped files as well
as the amount of clients who use it. If the system runs out of resources,
or if a memory limit is reached, it will automatically unload unused maps
to allow continued operation.
endef
$(eval $(call Py3Package,python3-$(PKG_NAME)))
$(eval $(call BuildPackage,python3-$(PKG_NAME)))
$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))