Compare commits

..

7 Commits

Author SHA1 Message Date
173f582bce
Remove rearranging of repositories.conf
Some checks failed
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-08-07 05:43:29 +02:00
8da8d43609
Try to force an older collectd version
Some checks failed
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-08-07 05:12:13 +02:00
7c91c277ab
Remove remote sources
Some checks failed
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-08-07 04:46:22 +02:00
fa015b1dee
Debug
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-08-06 11:39:10 +02:00
0d5587f975
Debug
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
2023-08-06 11:04:12 +02:00
27012c9439
Build performance optimisation
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
- build on multiple cores
2023-08-06 10:26:23 +02:00
8c947490b5
Reorder package list sources
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.
buildbot/job/openwrt Build done.
- local packages should be prioritiezed if we have custom builds, like
  collectd
- the docs at
  https://openwrt.org/docs/guide-user/additional-software/imagebuilder#adding_package_repositories
  explain that the repos are searched in the order they are in the file
2023-08-06 10:16:58 +02:00
9 changed files with 52 additions and 253 deletions

View File

@ -1,28 +1,27 @@
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 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
gettext xsltproc wget unzip python
RUN mkdir /Downloads
RUN wget -qP /Downloads \
"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"
"https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/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/${OPENWRT_TARGET}/${OPENWRT_DEVICE}/openwrt-sdk-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}_${OPENWRT_CC}.Linux-x86_64.tar.xz"
"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"
# RUN wget -qP /Downloads \
# "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"
# "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"
ADD . .

View File

@ -10,9 +10,8 @@
# https://github.com/IchthysMaranatha/asterisk-chan-quectel/tree/master/openwrt
set -x
renice -n 19 $$
MAKE="make -j$(nproc)"
export MAKEOPTS="-j $(nproc)"
tar -xJf /Downloads/openwrt-sdk-${OPENWRT_VERSION}-*.tar.xz
@ -24,25 +23,19 @@ 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
make defconfig
make $MAKEOPTS defconfig
# Enable collectd network encryption
echo "CONFIG_PACKAGE_COLLECTD_ENCRYPTED_NETWORK=y" >> .config
${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/ansible-core/compile
${MAKE} package/asterisk-chan-quectel/compile
${MAKE} package/collectd/compile
make $MAKEOPTS package/kmod-nvme/compile
make $MAKEOPTS package/kmod-i2c-mux-pinctrl/compile
make $MAKEOPTS package/kmod-rtc-pcf85063/compile
make $MAKEOPTS package/nvme-cli/compile
make $MAKEOPTS package/asterisk-chan-quectel/compile
make $MAKEOPTS package/collectd/compile
sdkdir=$(pwd)
cd ${pwd}
@ -52,21 +45,27 @@ 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/${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/
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/
make info
ls -l ${sdkdir}/${BINPATH}/packages/*.ipk
ls -l ${sdkdir}/bin/packages/aarch64_cortex-a72/packages/*.ipk
ls -l ${sdkdir}/bin/packages/aarch64_cortex-a72/telephony/*.ipk
ls -l ${sdkdir}/bin/packages/aarch64_cortex-a72/local/*.ipk
ls -l packages/*.ipk
make $MAKEOPTS info
# Increase the size of the root partition
echo "CONFIG_TARGET_ROOTFS_PARTSIZE=308" >> .config
# Disable ext4 images
echo "CONFIG_TARGET_ROOTFS_EXT4FS=n" >> .config
# re-enable collectd encrypted network, it gets removed somewhere
echo "CONFIG_PACKAGE_COLLECTD_ENCRYPTED_NETWORK=y" >> .config
PACKAGES="kmod-i2c-bcm2835 kmod-i2c-mux kmod-i2c-mux-pinctrl \
kmod-nf-nathelper-extra \
@ -76,7 +75,7 @@ PACKAGES="kmod-i2c-bcm2835 kmod-i2c-mux kmod-i2c-mux-pinctrl \
kmod-usb-net-qmi-wwan libqmi qmi-utils uqmi luci-proto-qmi \
shadow-usermod \
ca-certificates \
collectd collectd-mod-contextswitch collectd-mod-cpu \
collectd=5.12.0-33 collectd-mod-contextswitch collectd-mod-cpu \
collectd-mod-curl collectd-mod-df \
collectd-mod-dhcpleases collectd-mod-disk \
collectd-mod-dns collectd-mod-entropy \
@ -97,8 +96,7 @@ 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-ansible-core python3-ansible-core-src \
python3-yaml \
python3-packages python3-yaml \
openssh-sftp-server tcpdump \
iptables-nft ip6tables-nft \
wireguard-tools wget-ssl \
@ -106,7 +104,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-${PKG_ARCH}_musl/linux-${OPENWRT_TARGET}_${OPENWRT_DEVICE}/linux-5.10.146
KERNELSOURCE=build_dir/target-aarch64_cortex-a72_musl/linux-${OPENWRT_TARGET}_${OPENWRT_DEVICE}/linux-5.10.146
OVERLAYSOURCE=${KERNELSOURCE}/arch/arm64/boot/dts/overlays
# Setup files
@ -114,9 +112,6 @@ 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
@ -137,20 +132,33 @@ pushd ${BOOTSOURCE}
git apply ${pwd}/patches/bootconfig-add.patch
popd
make image PROFILE=${PROFILE} EXTRA_IMAGE_NAME="dualeth" \
# reorder packages so the local ones have a higher priority
#sed -i -E 's/^(src imagebuilder file:packages.*)/#\1/
#sed -i -E 's/^(src\/gz openwrt_.*)/#\1/' repositories.conf
#5i src imagebuilder file:packages' \
# debug
#cat repositories.conf
make $MAKEOPTS image PROFILE=${PROFILE} \
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} EXTRA_IMAGE_NAME="waveshare" \
make $MAKEOPTS image PROFILE=${PROFILE} \
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}
@ -162,7 +170,8 @@ popd
sed -i "s/CONFIG_TARGET_ROOTFS_PARTSIZE=.*/CONFIG_TARGET_ROOTFS_PARTSIZE=308/g" .config
make image PROFILE=${PROFILE} EXTRA_IMAGE_NAME="sensing" \
make $MAKEOPTS image PROFILE=${PROFILE} \
PACKAGES="${PACKAGES} asterisk \
asterisk-app-sms asterisk-pjsip asterisk-bridge-simple \
asterisk-codec-alaw asterisk-codec-ulaw \
@ -170,6 +179,9 @@ make image PROFILE=${PROFILE} EXTRA_IMAGE_NAME="sensing" \
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

View File

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

View File

@ -1,14 +0,0 @@
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

@ -1,40 +0,0 @@
# 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))

View File

@ -1,38 +0,0 @@
# 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))

View File

@ -1,36 +0,0 @@
# 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))

View File

@ -1,40 +0,0 @@
# 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))

View File

@ -1,38 +0,0 @@
# 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))