Compare commits

...

No commits in common. "201705" and "hfreyther/wip" have entirely different histories.

12 changed files with 38 additions and 158 deletions

1
.gitignore vendored
View File

@ -2,4 +2,3 @@ cfg/*/99_do_not_commit
git/
build.*
*.sw?
downloads/

View File

@ -24,26 +24,17 @@ endif
# Variables
SYSMOCOM_RELEASE=201705
POKY_RELEASE=pyro
REPOS=poky meta-telephony meta-qt5 meta-sysmocom-bsp meta-smalltalk
MACHINES=sysmobts sysmobts2100 sysmocom-apu2 sysmocom-alix oc2g
REPOS=poky meta-telephony meta-sysmocom-bsp meta-qt5 meta-sysmocom-bsp
MACHINES=sysmobts sysmocom-apu2 sysmocom-alix
FEED_NAME=$(SYSMOCOM_RELEASE)-testing
# The default targets to pick depending on machine
BUILD_TARGET_sysmobts = meta-toolchain-osmo task-sysmocom-feed sysmocom-core-image sysmocom-nitb-image sysmocom-voice-sip-image sysmocom-core-rauc-image sysmocom-nitb-rauc-image image-rauc-rescue-initramfs image-rauc-slot-initramfs image-rauc-ubi
BUILD_TARGET_sysmobts2100 = meta-toolchain-osmo task-sysmocom-feed sysmocom-core-image sysmocom-nitb-image
BUILD_TARGET_oc2g = meta-toolchain-osmo task-sysmocom-feed sysmocom-core-image sysmocom-nitb-image
BUILD_TARGET_sysmocom-apu2 = core-image-minimal-initramfs meta-toolchain-osmo task-sysmocom-feed sysmocom-core-image sysmocom-nitb-image core-image-minimal-initramfs
BUILD_TARGET_sysmocom-alix = core-image-minimal-initramfs meta-toolchain-osmo task-sysmocom-feed sysmocom-core-image sysmocom-nitb-image core-image-minimal-initramfs
BUILD_TARGET_sysmobts = "meta-toolchain-osmo task-sysmocom-feed sysmocom-nitb-image sysmocom-nitb-rauc-image image-rauc-rescue-initramfs image-rauc-slot-initramfs image-rauc-ubi"
BUILD_TARGET_sysmocom-apu2 = "core-image-minimal-initramfs meta-toolchain-osmo task-sysmocom-feed sysmocom-nitb-image core-image-minimal-initramfs"
BUILD_TARGET_sysmocom-alix = "core-image-minimal-initramfs meta-toolchain-osmo task-sysmocom-feed sysmocom-nitb-image core-image-minimal-initramfs"
# Pick the one depending on $@. Not sure if .SECONDEXPANSION is more
# approiate here or not.
BUILD_TARGETS=$(BUILD_TARGET_$(CUR_MACHINE))
GIT_BRANCH_POKY = "$(POKY_RELEASE)"
GIT_BRANCH_SYSMOCOM_BSP = "$(SYSMOCOM_RELEASE)"
GIT_BRANCH_TELEPHONY = "$(SYSMOCOM_RELEASE)"
GIT_BRANCH_SMALLTALK = "$(SYSMOCOM_RELEASE)"
GIT_BRANCH_QT5 = "$(SYSMOCOM_RELEASE)"
# Pick the one depending on $@
BUILD_TARGETS=
#
usage:
@ -69,54 +60,50 @@ help:
printf " %-16s - Configure build directory\\n" $(machine)-build;)
@$(foreach machine, $(MACHINES), \
printf " %-16s - Configure build directory\\n" $(machine)-upload;)
@echo "Server targets:"
@echo " make-server-structure - Create directories for machine/release"
@echo "Available variables:"
@echo " V=1 - Enable verbose command output"
@echo " SYSMOCOM_RELEASE=name - Pick release branch during clone"
@echo " POKY_RELEASE=name - Pick release branch during clone"
@echo " GIT_BRANCH_* - Pick branch for a specific repository"
@echo " SYSMOCOM_RELEASE=name - Pick branch during clone"
@echo " POKY_RELEASE=name - Pick branch during clone"
# Fetch/update all repos... Expand REPOS and append -update to the rule
# e.g. poky-update meta-telephony-update
update: $(foreach repo, $(REPOS), $(repo)-update)
# helper rules
# crazy as I don't know a split()[0]
CUR_MACHINE=$(subst build.,,$(subst -upload,,$(subst -clean,,$(subst -build,,$@))))
CUR_MACHINE=""
## Create a new directory
git:
$(V)mkdir $@
mkdir $@
## Clone repositories. The other option is by variable something like BRNACH_poky, REPO_poky
git/poky: | git
$(V)cd git && git clone --branch=$(GIT_BRANCH_POKY) --depth=1 https://gitea.sysmocom.de/sysmo-bts/generic-poky poky
cd git && git clone --branch=$(POKY_RELEASE) --depth=1 git://git.yoctoproject.org/poky
git/meta-sysmocom-bsp: | git
cd git && git clone --branch=$(GIT_BRANCH_SYSMOCOM_BSP) https://gitea.sysmocom.de/sysmo-bts/meta-sysmocom-bsp
cd git && git clone --branch=$(SYSMOCOM_RELEASE) git://git.sysmocom.de/poky/meta-sysmocom-bsp
git/meta-telephony: | git
cd git && git clone --branch=$(GIT_BRANCH_TELEPHONY) https://gerrit.osmocom.org/meta-telephony
cd git && git clone --branch=$(SYSMOCOM_RELEASE) git://github.com/sysmocom/meta-telephony
git/meta-smalltalk: | git
cd git && git clone --branch=$(GIT_BRANCH_SMALLTALK) https://github.com/sysmocom/meta-smalltalk
cd git && git clone --branch=$(SYSMOCOM_RELEASE) git://github.com/sysmocom/meta-smalltalk
git/meta-qt5: | git
cd git && git clone --branch=$(GIT_BRANCH_QT5) https://github.com/sysmocom/meta-qt5
cd git && git clone --branch=$(SYSMOCOM_RELEASE) git://github.com/sysmocom/meta-qt5
## Create a build directory, e.g. build.sysmobts
## Use Poky to set-up the directory and then customize it. Copy files
## around and append to the local.conf and layers.conf
CFG_FILES = $(sort $(wildcard cfg/common/*)) $(sort $(wildcard cfg/$(CUR_MACHINE)/*))
CFG_FILES = $(sort $(notdir $(wildcard cfg/common/*))) $(sort $(notdir $(wildcard cfg/$(subst build.,,$@)/*)))
build.%: | git/poky
@echo "Creating build directory for $(CUR_MACHINE)"
$(Q)/bin/bash -c "source git/poky/oe-init-build-env $@"
@echo "Creating build directory for $(subst build.,,$@) ..."
@. git/poky/oe-init-build-env $@
# Append entries to conf/local.conf. Common first, machine second... filter
$(Q)$(foreach file,$(CFG_FILES), \
cat $(file) | sed s,BASE_DIR,${CURDIR}, >> $@/conf/local.conf;)
$(Q)$(foreach file,$(CFG_FILES), $(call cat $(file) | sed s,BASE_DIR,$(PWD), >> $@/conf/local.conf))
@echo "require conf/distro/include/sysmocom-defaults.conf" >> $@/conf/local.conf
$(Q)cat cfg/bblayers.conf | sed s,BASE_DIR,${CURDIR}, > $@/conf/bblayers.conf
# layers now..
mkdir -p $@/conf
$(Q)cat cfg/bblayers.conf | sed s,BASE_DIR,$(PWD), > $@/conf/bblayers.conf
# generic git pull --rebase rule. Let's assume this is matching poky-update
@ -131,35 +118,22 @@ build.%: | git/poky
# Start a build..
%-build: | build.$(subst -build,,%) git/poky
$(Q)/bin/bash -c "source git/poky/oe-init-build-env build.$(CUR_MACHINE) && bitbake $(BUILD_TARGETS) && bitbake package-index"
(. git/poky/oe-init-build-env build.$(subst -build $@) && bitbake $(BUILD_TARGETS)
%-upload: | build.$(subst -upload,,%) git/poky
$(Q)cd build.$(CUR_MACHINE) && ../scripts/upload-build.sh $(CUR_MACHINE) $(FEED_NAME)
%-clean: | build.$(subst -clean,,%) git/poky
$(Q)cd build.$(CUR_MACHINE) && ../git/poky/scripts/sstate-cache-management.sh --cache-dir=sstate-cache -y -L --stamps-dir=tmp/stamps/
$(Q)cd build.$(CUR_MACHINE) && rm -rf tmp
echo $(CUR_MACHINE)
#$(exit foo)
#(. git/poky/oe-init-build-env build.$(subst -build $@) && ../scripts/upload-build.sh $(CUR_MACHINE) $(FEED_NAME)
# Create all build directories, build everything, upload everything, clean everything
setup-all: | $(foreach machine, $(MACHINES), $(machine)-setup)
build-all: | $(foreach machine, $(MACHINES), $(machine)-build)
upload-all: | $(foreach machine, $(MACHINES), $(machine)-upload)
clean-all: | $(foreach machine, $(MACHINES), $(machine)-clean)
make-server-structure:
ifndef WEB_FILES
$(error "Please call with make make-server-structure WEB_FILES=...")
endif
$(Q)$(foreach machine, $(MACHINES), \
mkdir $(WEB_FILES)/$(machine); \
mkdir $(WEB_FILES)/$(machine)/$(SYSMOCOM_RELEASE); \
mkdir $(WEB_FILES)/$(machine)/$(SYSMOCOM_RELEASE)-testing; \
mkdir $(WEB_FILES)/$(machine)/$(SYSMOCOM_RELEASE)-nightly; \
)
install-ssh-config: | $(HOME)/.ssh
ifndef SSH_HOST

11
README
View File

@ -43,14 +43,3 @@ Example of building everything
$ make clean-all # Clean the tmp directory for all boards
...
Server side set-up:
On the server we need scripts to copy from -testing to -stable. It is a simple
script and it is the easiest if we bind it to ssh keys. It should be a self
service for the developers.
....
command="/home/user/system-images/scripts/dispatch.sh" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7ZJ339MQh1ctTP3UyRQSpdjcJmG8tafd+akq6cmplSuG6j8BZH38u38Zvf7+WLvMBsluujfj7lkuPA/vzP5c6YHBBWOoT+5moRxpEdLXzUPzxA2l+1Nfgd+pd4mvmV9WI22dY6mtDXtOZxXoG8sAXZe/RoUN9MTzayJVkUtp76SW5eiVT519kQGRRaHEFvEqis9t9K5wJN/CVD7uDudpel0ljtkRh4K0KFTUJLVG7bXu5CAOc61JGoeoAb0z/0DL5Nnlxe9P9eMHKqFSqC97xovtRGy1U+2EAVuWY2N32G0VuXpIisBrx/FGxChWp3V5q5KurlkrnV/Rq3dBmKwykAYTQRMrx6mMatiAxFnVnkXYnjFwGC5AdEO2iw865TJ1riv6uZsDviVxFK79BQnkLkFBNLWdfIiYP2j4mMSGsK4xpDXUFAP7xDoVzLO1ZyaJcqF/DCyS4sZ/cYcj0lW2pKxSkFE4Mv2zO4Zwgu7t1EmKjR6SDfzZ+wfSfcjAytwA9l6NfMlLvMy1bL+b5I4UHvZJD1nxpdzByKuTZ11/6o/BN+anrj+SqsXUrD7k9q3LhdMMAJf3lxG0ZVV81FZm6jh/XsO9FwoAzXwqezeJpnaNSqb4alYl/P/7xoFuNQjxZmomROIFMdOAOL8ius+Bz28k1va93tSgkPpr6YUJBaQ== .ssh/id_rsa-new
....

View File

@ -1,10 +0,0 @@
MACHINE = "oc2g"
# feed
PACKAGE_FEED_URIS = "https://autoupdate:eechiesuboot@downloads.sysmocom.de/generic/oc2g/201705/ipk/"
# HW doesn't have rtc
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
# Disable DAHDI support in libosmo-abis:
PACKAGECONFIG_remove_pn-libosmo-abis = "dahdi"

View File

@ -1,7 +1,7 @@
MACHINE = "sysmobts-v2"
# feed
PACKAGE_FEED_URIS="https://autoupdate:eechiesuboot@feeds.sysmocom.de/generic/sysmobts/201705/ipk/"
PACKAGE_FEED_URIS="https://autoupdate:eechiesuboot@downloads.sysmocom.de/generic/sysmobts/201705/ipk/"
# HW doesn't have rtc
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
@ -9,6 +9,3 @@ MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
# Ignore old kernels
BBMASK="recipes-bsp/linux/linux_2.6.39.bb recipes-bsp/linux/linux-sysmocom_3.10.bb"
PREFERRED_VERSION_linux-sysmocom = "4.9.14+git%"
# Disable DAHDI support in libosmo-abis:
PACKAGECONFIG_remove_pn-libosmo-abis = "dahdi"

View File

@ -1,10 +0,0 @@
MACHINE = "sysmobts2100"
# feed
PACKAGE_FEED_URIS = "https://autoupdate:eechiesuboot@feeds.sysmocom.de/generic/sysmobts2100/201705/ipk/"
# HW doesn't have rtc
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
# Disable DAHDI support in libosmo-abis:
PACKAGECONFIG_remove_pn-libosmo-abis = "dahdi"

View File

@ -1,6 +1,6 @@
MACHINE = "sysmocom-alix"
PACKAGE_FEED_URIS="https://autoupdate:eechiesuboot@feeds.sysmocom.de/generic/sysmocom-alix/201705/ipk/"
PACKAGE_FEED_URIS="https://autoupdate:eechiesuboot@downloads.sysmocom.de/generic/sysmocom-alix/201705/ipk/"
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
BBMASK="recipes-bsp/linux/linux_2.6.39.bb recipes-bsp/linux/linux-sysmocom_3.10.bb"
BBMASK="recipes-bsp/linux/linux_2.6.39.bb recipes-bsp/linux/linux-sysmocom_3.10.bb recipes-devtools/python/python-argparse_1.2.1.bbappend"

View File

@ -1,4 +1,4 @@
MACHINE = "sysmocom-apu2"
PACKAGE_FEED_URIS="https://autoupdate:eechiesuboot@feeds.sysmocom.de/generic/sysmocom-apu2/201705/ipk/"
PACKAGE_FEED_URIS="https://autoupdate:eechiesuboot@downloads.sysmocom.de/generic/sysmocom-apu2/201705/ipk/"
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
BBMASK="recipes-bsp/linux/linux_2.6.39.bb recipes-bsp/linux/linux-sysmocom_3.10.bb"
BBMASK="recipes-bsp/linux/linux_2.6.39.bb recipes-bsp/linux/linux-sysmocom_3.10.bb recipes-devtools/python/python-argparse_1.2.1.bbappend"

View File

@ -1 +0,0 @@
DISTRO_FEATURES_append = " iu "

View File

@ -1,17 +0,0 @@
#!/bin/sh
# Dispatch based on SSH_ORIGINAL_COMMAND. rsync, diff and merge.
# TODO: Make this interactive and show the diff before and then
# do the merge?
case "$SSH_ORIGINAL_COMMAND" in
"rsync")
exec /usr/local/bin/rrsync web-files
;;
"diff-testing")
exec `dirname $0`/make-stable.sh $1 $2 dry-run
;;
"merge-testing")
exec `dirname $0`/make-stable.sh $1 $2
;;
esac

View File

@ -1,41 +0,0 @@
#!/bin/sh
# Merge -testing into -stable by using hard links so we don't
# double the space requirement.
if [ $# -lt 2 ]; then
echo "Need to pass MACHINE RELEASE as argument for upload"
exit 1
fi
MACHINE=$1
RELEASE=$2
DRYRUN=$3
if [ "x$DRYRUN" != "x" ]; then
BASE_ARGS="--recursive --delete --links --verbose --dry-run "
else
BASE_ARGS="--delete -avH"
fi
DIRS="images ipk sdk tools cache-state sources cache conf"
for i in $DIRS;
do
if [ ! -e $PWD/web-files/$MACHINE/$RELEASE-testing/$i ]; then
echo "Skipping $i, directory doesn't exist"
echo ""
continue
fi
if [ "x$DRYRUN" != "x" ]; then
ARGS="$BASE_ARGS"
else
ARGS="$BASE_ARGS --link-dest=$PWD/web-files/$MACHINE/$RELEASE-testing/$i"
fi
echo "Checking $i"
rsync $ARGS \
web-files/$MACHINE/$RELEASE-testing/$i/ \
web-files/$MACHINE/$RELEASE/$i/ | egrep -v "sending incre|sent |total"
done

View File

@ -13,7 +13,7 @@ set -ex
rsync --delete -avz tmp/deploy/ipk/ sysmocom-downloads:$1/$2/ipk
rsync --delete -avz tmp/deploy/images/ sysmocom-downloads:$1/$2/images
rsync --delete -avz tmp/deploy/tools/ sysmocom-downloads:$1/$2/tools || true
rsync --delete -avz tmp/deploy/tools/ sysmocom-downloads:$1/$2/tools
rsync --delete -avz tmp/deploy/sdk/ sysmocom-downloads:$1/$2/sdk
rsync --delete -avz tmp/cache/ sysmocom-downloads:$1/$2/cache-state
rsync --delete -avz cache/ sysmocom-downloads:$1/$2/cache