Developing lightweight computation at the DSG edge

Commit cef19ba0 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

Merge branch 'master' into testing

parents cbe1e73d 3e7bd8f9
...@@ -22,6 +22,7 @@ VERSION_BUG_URL="${bug_url:-https://dev.qmp.cat/projects/qmp/issues}" ...@@ -22,6 +22,7 @@ VERSION_BUG_URL="${bug_url:-https://dev.qmp.cat/projects/qmp/issues}"
VERSION_SUPPORT_URL="${support_url:-https://qmp.cat/Documentation}" VERSION_SUPPORT_URL="${support_url:-https://qmp.cat/Documentation}"
QMP_CODENAME=$VERSION_NICK QMP_CODENAME=$VERSION_NICK
QMP_RELEASE=$VERSION_NUMBER QMP_RELEASE=$VERSION_NUMBER
QMP_DOWNLOADS_URL="${qmp_downloads_url:-http://fw.qmp.cat}"
usage() { usage() {
echo "Usage: $0 [-f [--force]] [-d <target> [--sdk|ib|force]] [-i <target> [--sdk-file=<file>|ib-file=<file>]] echo "Usage: $0 [-f [--force]] [-d <target> [--sdk|ib|force]] [-i <target> [--sdk-file=<file>|ib-file=<file>]]
...@@ -144,6 +145,8 @@ cook() { ...@@ -144,6 +145,8 @@ cook() {
} }
cp -rf ${myfiles}/* ${ib_files}/ 2>/dev/null cp -rf ${myfiles}/* ${ib_files}/ 2>/dev/null
[ "$qmp_release" == "1" ] && generate_qmp_feeds_file $target
# make binary using imagebuilder # make binary using imagebuilder
local fw_extra_name="$flavor" local fw_extra_name="$flavor"
[ -n "$community" ] && fw_extra_name="$community-$community_profile" [ -n "$community" ] && fw_extra_name="$community-$community_profile"
...@@ -429,6 +432,19 @@ list_flavors() { ...@@ -429,6 +432,19 @@ list_flavors() {
cat qmp.flavors.conf | egrep -v "^_|^#|^$" | awk -F= '{print $1}' cat qmp.flavors.conf | egrep -v "^_|^#|^$" | awk -F= '{print $1}'
} }
generate_qmp_feeds_file() {
local target=$1
local qmp_feeds_dir="${PWD}/files/etc/opkg"
[ ! -d "$qmp_feeds_dir" ] && mkdir -p "$qmp_feeds_dir"
[ -f $qmp_feeds_dir/qmpfeeds.conf ] && rm -f $qmp_feeds_dir/qmpfeeds.conf
for r in $sdk_install_repos; do
this_qmp_feed_url="$QMP_DOWNLOADS_URL/Releases/$VERSION_NUMBER/packages/$(get_arch_from_ib $target)/$r"
echo "src/gz qmp_$r $this_qmp_feed_url" >> $qmp_feeds_dir/qmpfeeds.conf
done
}
get_profile_names() { get_profile_names() {
local profiles="$(cat $release/$target/ib/.profiles.mk 2>/dev/null | grep ^PROFILE_NAMES | \ local profiles="$(cat $release/$target/ib/.profiles.mk 2>/dev/null | grep ^PROFILE_NAMES | \
sed -e s/"PROFILE_NAMES = Default"//g -e s/DEVICE_//g)" sed -e s/"PROFILE_NAMES = Default"//g -e s/DEVICE_//g)"
...@@ -470,12 +486,6 @@ make_qmp_release() { ...@@ -470,12 +486,6 @@ make_qmp_release() {
# Remove decompressed IB and SDK directories, if using trunk # Remove decompressed IB and SDK directories, if using trunk
[ -n "$refresh_release" ] && [ "$version" == "trunk" ] && rm -rf $release/*/*/sdk $release/*/*/ib [ -n "$refresh_release" ] && [ "$version" == "trunk" ] && rm -rf $release/*/*/sdk $release/*/*/ib
# Run snippets
./snippets/regdbus.sh
list_profiles "ar71xx/mikrotik"
./snippets/mikrotik-ath10k-ct.sh
# Build the SDK and the packages locally for each architecture # Build the SDK and the packages locally for each architecture
force_local=1 force_local=1
build_all_sdk build_all_sdk
...@@ -505,6 +515,7 @@ make_qmp_release() { ...@@ -505,6 +515,7 @@ make_qmp_release() {
flavor=$FLAVOR flavor=$FLAVOR
pre_PKG=$PKG
join_packages $EXTRAPKGS join_packages $EXTRAPKGS
cook "$ARCH/$SUBARCH" "$PROFILE" cook "$ARCH/$SUBARCH" "$PROFILE"
...@@ -540,12 +551,17 @@ make_qmp_release() { ...@@ -540,12 +551,17 @@ make_qmp_release() {
cp "$fw_file" "$output_file" cp "$fw_file" "$output_file"
} }
PKG=$pre_PKG
done done
cd "$bin_output" cd "$bin_output"
md5sum *.* >> IMAGES md5sum *.* >> IMAGES
cd .. cd ..
# Run repository snippet
./snippets/create_repository.sh
} }
[ -z "$1" ] && usage [ -z "$1" ] && usage
......
...@@ -13,7 +13,7 @@ files_dir=files ...@@ -13,7 +13,7 @@ files_dir=files
flavors_file=qmp.flavors.conf flavors_file=qmp.flavors.conf
sdk_config=qmp.sdk.config sdk_config=qmp.sdk.config
sdk_install_packages="libustream-openssl firewall kmod-mac80211 base-files" sdk_install_packages="libustream-openssl firewall kmod-mac80211 base-files"
sdk_install_repos="qmp libremap b6m ncr" sdk_install_repos="qmp libremap b6m"
remote_pkg_repos="qmp.repositories.conf" remote_pkg_repos="qmp.repositories.conf"
default_flavor="qmp_big" default_flavor="qmp_big"
targets_list=targets.list targets_list=targets.list
......
# Flavors # Flavors
openwrt_vanilla="luci" openwrt_vanilla="luci"
qmp_cli="qmp-system -opkg -kmod-usb-core -kmod-usb-ledtrig-usbport -kmod-usb2 -ppp -ppp-mod-pppoe -6relayd -odhcp6c -odhcpd -ip6tables -firewall" qmp_cli="qmp-system -opkg -kmod-usb-core -kmod-usb-ledtrig-usbport -kmod-usb2 -ppp -ppp-mod-pppoe -6relayd -odhcp6c -odhcpd -ip6tables -firewall -wpad-mini"
qmp_tiny="qmp-tiny-node -opkg -kmod-usb-core -kmod-usb-ledtrig-usbport -kmod-usb2 -ppp -ppp-mod-pppoe -6relayd -odhcp6c -odhcpd -ip6tables -firewall" qmp_tiny="qmp-tiny-node -opkg -kmod-usb-core -kmod-usb-ledtrig-usbport -kmod-usb2 -ppp -ppp-mod-pppoe -6relayd -odhcp6c -odhcpd -ip6tables -firewall -wpad-mini"
qmp_small="qmp-small-node opkg qmp-ncd" qmp_small="qmp-small-node opkg qmp-ncd -wpad-mini"
qmp_big="qmp-big-node opkg qmp-ncd qmp-ncgui" qmp_big="qmp-big-node opkg qmp-ncd qmp-ncgui -wpad-mini"
...@@ -41,6 +41,7 @@ EXT4IMAGE="" ...@@ -41,6 +41,7 @@ EXT4IMAGE=""
SUBARCH=generic SUBARCH=generic
PROFILE=Generic PROFILE=Generic
FLAVOR=qmp_big FLAVOR=qmp_big
EXTRAPKGS=kmod-ath9k
SQUASHIMAGE=$DISTCL-$FLAVOR-$ARCH-$SUBARCH-$COMBINEDSQUASHIMG SQUASHIMAGE=$DISTCL-$FLAVOR-$ARCH-$SUBARCH-$COMBINEDSQUASHIMG
EXT4IMAGE=$DISTCL-$FLAVOR-$ARCH-$SUBARCH-$COMBINEDEXT4IMG EXT4IMAGE=$DISTCL-$FLAVOR-$ARCH-$SUBARCH-$COMBINEDEXT4IMG
BINEXT=img.gz BINEXT=img.gz
......
#!/bin/bash #!/bin/bash
. options.conf . options.conf
OUTDIR="${1:-repository}" . options.conf.local
OUTDIR="${1:-output}"
[ ! -d $OUTDIR ] && mkdir -p $OUTDIR [ ! -d $OUTDIR ] && mkdir -p $OUTDIR
[ ! -d $OUTDIR/packages ] && mkdir -p $OUTDIR/packages
[ ! -d $OUTDIR/targers ] && mkdir -p $OUTDIR/targets
echo "-> Output directory: $OUTDIR" echo "-> Output directory: $OUTDIR"
for link in $OUTDIR/*; do
for link in $OUTDIR/packages/*; do
unlink $link 2>/dev/null unlink $link 2>/dev/null
done done
for link in $OUTDIR/targets/*; do
unlink $link 2>/dev/null
done
for target in $(cat $targets_list); do for target in $(cat $targets_list); do
for arch in $release/$target/sdk/bin/packages/*; do for arch in $release/$target/sdk/bin/packages/*; do
[ -d "$arch" ] && { [ -d "$arch" ] && {
echo "-> Creating symlink for $arch" echo "-> Creating symlink for $arch packages"
ln -s $PWD/$arch $OUTDIR/ 2>/dev/null ln -s $PWD/$arch $OUTDIR/packages/ 2>/dev/null
}
done
for arch in $release/$target/sdk/bin/targets/*; do
[ -d "$arch" ] && {
echo "-> Creating symlink for $arch targets"
ln -s $PWD/$arch $OUTDIR/targets/ 2>/dev/null
} }
done done
done done
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