Commit 94de2764 authored by Yaroslav Petrov's avatar Yaroslav Petrov
Browse files

Merge branch 'master' into 'mesh-openssl'

# Conflicts:
#   openwrt-configs/19.07/config.ramips.mt7621.generic
parents 5d0f0ec5 7681f01e
Pipeline #1132 failed with stage
in 0 seconds
stages:
- build
- dl_stage
- test
- deploy
......
......@@ -37,8 +37,10 @@
{
"targets": [
# ------------- default values ------------------------------
# this block must come always first, because the first block is used
# as default
{
"name":"default", # must be "default", this block defines default values that are used
"name":"default", # currently just an unused name (only displayed)
# if following blocks do not specifiy there own value
"target":"ar71xx",
"subtarget":"generic",
......@@ -62,7 +64,7 @@
# generates the feeds/feeds-[selector].conf
# for short commit value use: git log --abbrev-commit
"feeds" : [
{"type":"src-link", "name":"ddmesh_own", "src":"../../../feeds/19.07/feeds-own" },
{"type":"src-link", "name":"ddmesh_own", "src":"feeds-own" }, # feeds/<selector>/feeds-own
{"type":"src-git", "name":"packages", "src":"https://git.openwrt.org/feed/packages.git", "rev":"4f717a6"},
# {"type":"src-git", "name":"luci", "src":"https://git.openwrt.org/project/luci.git", "rev":"204293a76"},
{"type":"src-git", "name":"routing", "src":"https://git.openwrt.org/feed/routing.git", "rev":"def3cd5"},
......@@ -87,7 +89,7 @@
"selector-feeds":"18.06", # used to select feeds
"selector-patches":"18.06", # used to select patches
"feeds" : [
{"type":"src-link", "name":"ddmesh_own", "src":"../../../feeds/18.06/feeds-own" },
{"type":"src-link", "name":"ddmesh_own", "src":"feeds-own" },
{"type":"src-git", "name":"packages", "src":"https://git.openwrt.org/feed/packages.git", "rev":"de3766173"},
{"type":"src-git", "name":"luci", "src":"https://git.openwrt.org/project/luci.git", "rev":"204293a76"},
{"type":"src-git", "name":"routing", "src":"https://git.openwrt.org/feed/routing.git", "rev":"ff5100e"},
......@@ -138,6 +140,11 @@
"name":"openwrt:ipq40xx.generic",
"target":"ipq40xx",
"subtarget":"generic"
},
{
"name":"openwrt:ath79.nand",
"target":"ath79",
"subtarget":"nand"
}
]
}
......@@ -15,6 +15,9 @@ WORK_DIR=workdir
CONFIG_DIR=openwrt-configs
OPENWRT_PATCHES_DIR=openwrt-patches
OPENWRT_PATCHES_TARGET_DIR=openwrt-patches-target
DDMESH_STATUS_DIR=".ddmesh" # used to store build infos like openwrt_patches_target states
DDMESH_PATCH_STATUS_DIR="$DDMESH_STATUS_DIR/patches-applied"
# -------------------------------------------------------------------
......@@ -97,9 +100,9 @@ listTargets()
fi
targetIdx=$(( targetIdx + 1 ))
printf -- '----------------------------------------------------------------------------------------------------------------------------\n'
printf " %-40s | %-40s | %-7s | %-7s | %-7s | %-s \n" target openwrt_rev config feeds files patches
printf -- '------------------------------------------+------------------------------------------+---------+---------+---------+--------\n'
printf -- '-------------------------------------------------------------------------------------------------\n'
printf " %-40s | %-13s | %-7s | %-7s | %-7s | %-s \n" target openwrt_rev config feeds files patches
printf -- '------------------------------------------+---------------+---------+---------+---------+--------\n'
# run through rest of json
while true
do
......@@ -137,10 +140,10 @@ listTargets()
test -n "$_variant" && target="$target.$_variant"
fi
test -z "$target" && break
printf " %-40s | %-40s | %-7s | %-7s | %-7s | %-7s \n" $target $openwrt_rev $_selector_config $_selector_feeds $_selector_files $_selector_patches
printf " %-40s | %-13s | %-7s | %-7s | %-7s | %-7s \n" $target "${openwrt_rev:0:10}..." $_selector_config $_selector_feeds $_selector_files $_selector_patches
targetIdx=$(( targetIdx + 1 ))
done
printf -- '----------------------------------------------------------------------------------------------------------------------------\n'
printf -- '-------------------------------------------------------------------------------------------------\n'
}
......@@ -263,7 +266,6 @@ setup_buildroot ()
rm -rf $buildroot
mkdir -p $buildroot
mkdir -p $openwrt_dl_dir
#check if we have already downloaded the openwrt revision
if [ -f $openwrt_dl_tgz ]
......@@ -341,6 +343,21 @@ setup_buildroot ()
} # setup_buildroot
# ---------- create directories: dl/workdir -----------
# only create top-level directories if thoses do not not
# exisist. I do not simply call 'mkdir -p'. This is because
# gitlab runner may store the content somewhere else to
# and creates a symlink to this location.
# This avoids using caching and artifacts copying between
# jobs and stages. cache and workdir are only stored on
# server where the runner is running.
# If owner of the runner doesn't setup a symlink then
# all files are stored within current directory (where build.sh
# is located)
test -L $DL_DIR || mkdir -p $DL_DIR
test -L $WORK_DIR || mkdir -p $WORK_DIR
# ---------- process all targets ------------
OPT="--raw-output" # do not excape values
......@@ -481,11 +498,18 @@ EOM
_feed_name=$(echo $feed | jq $OPT '.name')
_feed_src=$(echo $feed | jq $OPT '.src')
_feed_rev=$(echo $feed | jq $OPT '.rev')
# if we have a feed revision, then add it. "^° is a special character
# followed by a "commit" (hash). openwrt then checks out this revision
test "$_feed_rev" = "null" && _feed_rev=""
test -n "$_feed_rev" && _feed_rev="^$_feed_rev"
# for local feeds set correct absolute filename because when workdir is a symlink, relative
# path are note resolved correctly. Also we need to use $_selector_feeds
if [ "$_feed_type" = "src-link" ]; then
_feed_src="$RUN_DIR/feeds/$_selector_feeds/$_feed_src"
_feed_rev="" # src-link does not have a rev, because it is already in current git repo
else
# if we have a feed revision, then add it. "^° is a special character
# followed by a "commit" (hash). openwrt then checks out this revision
test "$_feed_rev" = "null" && _feed_rev=""
test -n "$_feed_rev" && _feed_rev="^$_feed_rev"
fi
printf "%s %s %s\n" $_feed_type $_feed_name $_feed_src$_feed_rev >>$feedConfFileName
......@@ -535,7 +559,8 @@ EOM
fi
#try to apply target patches
echo -e $C_PURPLE"apply target patches"$C_GREEN
mkdir -p $DDMESH_PATCH_STATUS_DIR
echo -e $C_PURPLE"apply target patches"$C_NONE
idx=0
while true
do
......@@ -546,13 +571,23 @@ EOM
# check patch
[ -f $RUN_DIR/$OPENWRT_PATCHES_TARGET_DIR/$_selector_config/$entry ] && echo -e "[$idx] $C_GREEN$entry$C_NONE" || break
if patch --dry-run -t --directory=$RUN_DIR/$buildroot -p0 < $RUN_DIR/$OPENWRT_PATCHES_TARGET_DIR/$_selector_config/$entry ; then
patch -t --directory=$RUN_DIR/$buildroot -p0 < $RUN_DIR/$OPENWRT_PATCHES_TARGET_DIR/$_selector_config/$entry
if [ -f $RUN_DIR/$OPENWRT_PATCHES_TARGET_DIR/$_selector_patches/$entry ]; then
printf "[$idx] $C_GREEN$entry$C_NONE"
# if patch is not applied yet
if [ ! -f $DDMESH_PATCH_STATUS_DIR/$entry ]; then
if patch -t --directory=$RUN_DIR/$buildroot -p0 < $RUN_DIR/$OPENWRT_PATCHES_TARGET_DIR/$_selector_patches/$entry >/dev/null; then
printf " -> $C_GREEN%s$C_NONE\n" "ok"
touch $DDMESH_PATCH_STATUS_DIR/$entry
else
printf " -> "$C_RED"failed"$C_NONE"\n"
exit 1
fi
else
printf " -> already applied\n"
fi
else
echo -e $C_RED"cannot apply last patch"$C_NONE
exit 1
echo -e $C_RED"Warning: patch [$_selector_patches/$entry] not found!"$C_NONE
fi
done
......@@ -587,7 +622,7 @@ EOM
# continue with next target in build.targets
if [ $error -ne 0 ]; then
echo -e $C_RED"Error: build error - make reported an error"$C_NONE
echo -e $C_RED"Error: build error"$C_NONE
if [ "$REBUILD_ON_FAILURE" = "1" ]; then
echo -e $C_PURPLE".......... rerun build with V=s ........................"$C_NONE
time -p make $BUILD_PARAMS V=s -j1
......
#!/bin/sh
logger -t ddmesh "network-hotplug iface: network:[$INTERFACE] interface:$DEVICE $ACTION"
logger -t ddmesh "network-hotplug iface: [$INTERFACE] $ACTION type:$DEVTYPE interface:[$DEVICENAME] devpath:$DEVPATH"
test -f /tmp/freifunk-running || exit 0
logger -t "hotplug 70-iface" "$INTERFACE - action:$ACTION"
logger -t "hotplug 70-firewall-addons" "$INTERFACE - action:$ACTION"
[ ifup = "$ACTION" -o ifdown = "$ACTION" ] && {
[ wan = "$INTERFACE" ] && /usr/lib/ddmesh/ddmesh-firewall-addons.sh update
[ lan = "$INTERFACE" ] && /usr/lib/ddmesh/ddmesh-firewall-addons.sh update
......
#!/bin/sh
logger -t ddmesh "network-hotplug net: [$INTERFACE] $ACTION type:$DEVTYPE"
logger -t ddmesh "network-hotplug net: [$INTERFACE] $ACTION type:$DEVTYPE interface:[$DEVICENAME] devpath:$DEVPATH"
......@@ -388,7 +388,7 @@ config_update() {
uci -q del ddmesh.@backbone_client[$i].password
uci -q set ddmesh.@backbone_client[$i].port="5002"
#lookup key
for k in $(seq 1 10)
for k in $(seq 1 30)
do
kk=$(( $k - 1))
h=$(uci -q get credentials.@backbone[$kk].host)
......@@ -789,11 +789,13 @@ setup_mesh_on_wire()
wan_phy="$(uci -q get network.wan.ifname)"
if [ "$mesh_on_lan" = "1" ]; then
logger -s -t "$LOGGER_TAG" "activate mesh-on-lan for $lan_phy"
brctl delif $lan_ifname $lan_phy
brctl addif $mesh_lan_ifname $lan_phy
fi
if [ "$mesh_on_wan" = "1" -a "$wan_iface_present" = "1" ]; then
logger -s -t "$LOGGER_TAG" "activate mesh-on-wan for $wan_phy"
brctl delif $wan_ifname $wan_phy
brctl addif $mesh_wan_ifname $wan_phy
fi
......
......@@ -69,6 +69,3 @@ esac
. /usr/lib/www/page-post.sh
fi #autosetup
......@@ -72,7 +72,8 @@ directory_suffix=$2
SAVED_SYSTEM_PATH=$PATH
#extract version files to extract directory components
fwversion=$(cat $firmwareroot/files/common/etc/version)
fwversion="$(cat $firmwareroot/files/common/etc/version)"
fwdate="$(date)"
if [ -z "$fwversion" ]; then
printf "ERROR: firmware version not detected (invalid path)\n"
......@@ -100,8 +101,9 @@ target_dir=$output_dir/$fwversion
gen_download_json_start()
{
output_path=$1 # output path "firmware/4.2.15"
fw_version=$2 # firmware version
output_path="$1" # output path "firmware/4.2.15"
fw_version="$2" # firmware version
fw_date="$3" # build date
printf $C_YELLOW"create download.json"$C_NONE"\n"
......@@ -110,6 +112,7 @@ gen_download_json_start()
printf "{\n" >> $output_path/$OUTPUT_DOWNLOAD_JSON_FILENAME
printf " \"json_version\":\"1\",\n" >> $output_path/$OUTPUT_DOWNLOAD_JSON_FILENAME
printf " \"firmware_version\":\"$fw_version\",\n" >> $output_path/$OUTPUT_DOWNLOAD_JSON_FILENAME
printf " \"firmware_date\":\"$fw_date\",\n" >> $output_path/$OUTPUT_DOWNLOAD_JSON_FILENAME
printf " \"fileinfo\": [\n" >> $output_path/$OUTPUT_DOWNLOAD_JSON_FILENAME
# generate new input file
......@@ -289,7 +292,7 @@ printf "$fwversion\n" >$target_dir/version
#################################################################################################
# start json
#################################################################################################
gen_download_json_start $target_dir $fwversion
gen_download_json_start "$target_dir" "$fwversion" "$fwdate"
#################################################################################################
......
######## m2runner ################
# there are two jobs, one for each commit and one for nightly scheduled job
# nightly is the one that keeps artifacts (result of built) and which
# then deployed later (see option "only").
# deploy stage should be added.
before_script:
- ln -s ~/mycache/dl
- ln -s ~/mycache/workdir
nightly:ar71xx.tiny:
only:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}-nightly
paths:
- dl
# don't keep workdir
script:
- ./build.sh ar71xx.tiny rerun -j8
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
expire_in: 2 days
paths:
- workdir/*/bin/targets/ar71xx/tiny
# - dl
tags:
- m2runner
......@@ -29,20 +17,8 @@ nightly:ar71xx.generic:
only:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}-nightly
paths:
- dl
# don't keep workdir
script:
- ./build.sh ar71xx.generic rerun -j8
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
expire_in: 2 days
paths:
- workdir/*/bin/targets/ar71xx/generic
# - dl
tags:
- m2runner
......@@ -50,20 +26,8 @@ nightly:x86.generic:
only:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}-nightly
paths:
- dl
# don't keep workdir
script:
- ./build.sh x86.generic rerun -j8
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
expire_in: 2 days
paths:
- workdir/*/bin/targets/x86/generic
# - dl
tags:
- m2runner
......@@ -71,20 +35,8 @@ nightly:ramips.mt7621:
only:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}-nightly
paths:
- dl
# don't keep workdir
script:
- ./build.sh ramips.mt7621 rerun -j8
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
expire_in: 2 days
paths:
- workdir/*/bin/targets/ramips
# - dl
tags:
- m2runner
......@@ -92,20 +44,8 @@ nightly:ipq40xx.generic:
only:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}-nightly
paths:
- dl
# don't keep workdir
script:
- ./build.sh ipq40xx.generic rerun -j8
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
expire_in: 2 days
paths:
- workdir/*/bin/targets/ipq40xx/generic
# - dl
tags:
- m2runner
......@@ -113,48 +53,17 @@ nightly:lantiq.xrx200:
only:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}-nightly
paths:
- dl
# don't keep workdir
script:
- ./build.sh lantiq.xrx200 rerun -j8
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
expire_in: 2 days
paths:
- workdir/*/bin/targets/lantiq/xrx200
# - dl
tags:
- m2runner
# this build job will wait for all other jobs to ensure
# that all downloaded packages are stored.
# beause jobs are run parallel (no specific order) I have
# to use a separae stage.
# all artifacts are passed to higher stage.
# because I use the same cache, I can simply pass the "dl" as
# artifact to next stage.
nightly:dl:
nightly:ath79.nand:
only:
- schedules
stage: dl_stage
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}-nightly
paths:
- dl
script:
- 'true'
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- dl
- workdir/*/bin/targets
stage: build
script:
- ./build.sh ath79.nand rerun -j8
tags:
- m2runner
......@@ -166,7 +75,7 @@ nightly:deploy:
- ./gen-upload.sh all
# runner must have ssh key that are added to download server. on download server there is a user "stephan" who owns the download directories
# add the runners public key to user stephan authorized_keys file
- rsync -avz --info=all1 --delete -EH --progress final_output/*/* stephan@download.lxc:/var/www/files/nightlybuilt/
- rsync -avz --info=all1 --delete -EH --progress final_output/*/* stephan@download.lxc:/var/www/files/nightly/
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
expire_in: 2 days
......
######## m2runner ################
before_script:
- ln -s ~/mycache/dl
- ln -s ~/mycache/workdir
ar71xx.tiny:
except:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}
paths:
- dl
- workdir/*
script:
- ./build.sh ar71xx.tiny rerun -j2
tags:
......@@ -19,12 +17,6 @@ ar71xx.generic:
except:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}
paths:
- dl
- workdir/*
script:
- ./build.sh ar71xx.generic rerun -j2
tags:
......@@ -34,12 +26,6 @@ x86.generic:
except:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}
paths:
- dl
- workdir/*
script:
- ./build.sh x86.generic rerun -j2
tags:
......@@ -49,12 +35,6 @@ ramips.mt7621:
except:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}
paths:
- dl
- workdir/*
script:
- ./build.sh ramips.mt7621 rerun -j2
tags:
......@@ -64,12 +44,6 @@ ipq40xx.generic:
except:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}
paths:
- dl
- workdir/*
script:
- ./build.sh ipq40xx.generic rerun -j2
tags:
......@@ -79,14 +53,17 @@ lantiq.xrx200:
except:
- schedules
stage: build
cache:
untracked: true
key: ${CI_COMMIT_REF_SLUG}
paths:
- dl
- workdir/*
script:
- ./build.sh lantiq.xrx200 rerun -j2
tags:
- m2runner
ath79.nand:
except:
- schedules
stage: build
script:
- ./build.sh ath79.nand rerun -j2
tags:
- m2runner
This diff is collapsed.
......@@ -2784,9 +2784,9 @@ CONFIG_PACKAGE_px5g-mbedtls=y
# CONFIG_PACKAGE_dmesg is not set
# CONFIG_PACKAGE_dropbearconvert is not set
# CONFIG_PACKAGE_flock is not set
CONFIG_PACKAGE_fritz-caldata=m
CONFIG_PACKAGE_fritz-tffs=m
# CONFIG_PACKAGE_fritz-tffs-nand is not set
CONFIG_PACKAGE_fritz-caldata=y
CONFIG_PACKAGE_fritz-tffs=y
CONFIG_PACKAGE_fritz-tffs-nand=y
# CONFIG_PACKAGE_getopt is not set
# CONFIG_PACKAGE_hwclock is not set
# CONFIG_PACKAGE_iconv is not set
......
......@@ -2829,9 +2829,9 @@ CONFIG_PACKAGE_bspatch=y
# CONFIG_PACKAGE_dmesg is not set
# CONFIG_PACKAGE_dropbearconvert is not set
# CONFIG_PACKAGE_flock is not set
# CONFIG_PACKAGE_fritz-caldata is not set
CONFIG_PACKAGE_fritz-caldata=y
CONFIG_PACKAGE_fritz-tffs=y
# CONFIG_PACKAGE_fritz-tffs-nand is not set
CONFIG_PACKAGE_fritz-tffs-nand=y
# CONFIG_PACKAGE_getopt is not set
# CONFIG_PACKAGE_hwclock is not set
# CONFIG_PACKAGE_iconv is not set
......
......@@ -2261,7 +2261,7 @@ CONFIG_PACKAGE_kmod-usb-wdm=m
# CONFIG_PACKAGE_kmod-usb-yealink is not set
CONFIG_PACKAGE_kmod-usb2=y
# CONFIG_PACKAGE_kmod-usb2-pci is not set
CONFIG_PACKAGE_kmod-usb3=m
# CONFIG_PACKAGE_kmod-usb3 is not set
# CONFIG_PACKAGE_kmod-usbip is not set
# CONFIG_PACKAGE_kmod-usbip-client is not set
# CONFIG_PACKAGE_kmod-usbip-server is not set
......
--- 1 2019-10-02 22:12:39.998865879 +0200
--- target/linux/lantiq/patches-4.14/0900-rollback.patch 2019-08-22 09:04:06.275497231 +0200
+++ target/linux/lantiq/patches-4.14/0900-rollback.patch 2019-08-22 09:04:06.275497231 +0200
@@ -0,0 +1,14 @@
+--- a/arch/mips/lantiq/irq.c 2019-08-09 17:53:37.000000000 +0200
......
--- 1 2019-10-02 22:12:39.998865879 +0200
--- target/linux/lantiq/patches-4.14/0901-add-icu-smp-support.patch 2019-08-01 13:38:23.386092302 +0200
+++ target/linux/lantiq/patches-4.14/0901-add-icu-smp-support.patch 2019-08-01 13:38:23.386092302 +0200
@@ -0,0 +1,436 @@
+--- a/arch/mips/lantiq/irq.c 2019-03-10 20:44:58.755134326 +0100
......
--- 1 2019-10-02 22:12:39.998865879 +0200
--- target/linux/lantiq/patches-4.14/0902-backport-vanilla-eth-driver.patch 2019-08-01 13:38:55.750166125 +0200
+++ target/linux/lantiq/patches-4.14/0902-backport-vanilla-eth-driver.patch 2019-08-01 13:38:55.750166125 +0200
@@ -0,0 +1,1688 @@
+--- a/drivers/net/ethernet/lantiq_xrx200.c 2019-03-10 20:44:58.797133801 +0100
......
--- feeds/packages/utils/qemu/Makefile 2019-10-02 15:18:02.441112167 +0200
+++ feeds/packages/utils/qemu/Makefile 2019-10-02 15:18:07.977006015 +0200
@@ -55,7 +55,7 @@
define Package/qemu-ga/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qemu-ga $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-ga $(1)/usr/bin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/qemu-ga.init $(1)/etc/init.d/qemu-ga
$(INSTALL_DIR) $(1)/etc/hotplug.d/virtio-ports
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment