Developing lightweight computation at the DSG edge
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Quick Mesh Project
qMp firmware cooker
Commits
cef19ba0
Commit
cef19ba0
authored
Jun 22, 2018
by
Roger Pueyo Centelles
Browse files
Merge branch 'master' into testing
parents
cbe1e73d
3e7bd8f9
Changes
5
Show whitespace changes
Inline
Side-by-side
cooker
View file @
cef19ba0
...
...
@@ -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
}
"
QMP_CODENAME
=
$VERSION_NICK
QMP_RELEASE
=
$VERSION_NUMBER
QMP_DOWNLOADS_URL
=
"
${
qmp_downloads_url
:-
http
://fw.qmp.cat
}
"
usage
()
{
echo
"Usage:
$0
[-f [--force]] [-d <target> [--sdk|ib|force]] [-i <target> [--sdk-file=<file>|ib-file=<file>]]
...
...
@@ -144,6 +145,8 @@ cook() {
}
cp
-rf
${
myfiles
}
/
*
${
ib_files
}
/ 2>/dev/null
[
"
$qmp_release
"
==
"1"
]
&&
generate_qmp_feeds_file
$target
# make binary using imagebuilder
local
fw_extra_name
=
"
$flavor
"
[
-n
"
$community
"
]
&&
fw_extra_name
=
"
$community
-
$community_profile
"
...
...
@@ -429,6 +432,19 @@ list_flavors() {
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
()
{
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
)
"
...
...
@@ -470,12 +486,6 @@ make_qmp_release() {
# Remove decompressed IB and SDK directories, if using trunk
[
-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
force_local
=
1
build_all_sdk
...
...
@@ -505,6 +515,7 @@ make_qmp_release() {
flavor
=
$FLAVOR
pre_PKG
=
$PKG
join_packages
$EXTRAPKGS
cook
"
$ARCH
/
$SUBARCH
"
"
$PROFILE
"
...
...
@@ -540,12 +551,17 @@ make_qmp_release() {
cp
"
$fw_file
"
"
$output_file
"
}
PKG
=
$pre_PKG
done
cd
"
$bin_output
"
md5sum
*
.
*
>>
IMAGES
cd
..
# Run repository snippet
./snippets/create_repository.sh
}
[
-z
"
$1
"
]
&&
usage
...
...
options.conf.local
View file @
cef19ba0
...
...
@@ -13,7 +13,7 @@ files_dir=files
flavors_file=qmp.flavors.conf
sdk_config=qmp.sdk.config
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"
default_flavor="qmp_big"
targets_list=targets.list
...
...
qmp.flavors.conf
View file @
cef19ba0
# Flavors
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_tiny
=
"qmp-tiny-node -opkg -kmod-usb-core -kmod-usb-ledtrig-usbport -kmod-usb2 -ppp -ppp-mod-pppoe -6relayd -odhcp6c -odhcpd -ip6tables -firewall"
qmp_small
=
"qmp-small-node opkg qmp-ncd"
qmp_big
=
"qmp-big-node opkg qmp-ncd qmp-ncgui"
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
-wpad-mini
"
qmp_small
=
"qmp-small-node opkg qmp-ncd
-wpad-mini
"
qmp_big
=
"qmp-big-node opkg qmp-ncd qmp-ncgui
-wpad-mini
"
qmp.profiles.conf
View file @
cef19ba0
...
...
@@ -41,6 +41,7 @@ EXT4IMAGE=""
SUBARCH
=
generic
PROFILE
=
Generic
FLAVOR
=
qmp_big
EXTRAPKGS
=
kmod
-
ath9k
SQUASHIMAGE
=$
DISTCL
-$
FLAVOR
-$
ARCH
-$
SUBARCH
-$
COMBINEDSQUASHIMG
EXT4IMAGE
=$
DISTCL
-$
FLAVOR
-$
ARCH
-$
SUBARCH
-$
COMBINEDEXT4IMG
BINEXT
=
img
.
gz
...
...
snippets/create_repository.sh
View file @
cef19ba0
#!/bin/bash
.
options.conf
OUTDIR
=
"
${
1
:-
repository
}
"
.
options.conf.local
OUTDIR
=
"
${
1
:-
output
}
"
[
!
-d
$OUTDIR
]
&&
mkdir
-p
$OUTDIR
[
!
-d
$OUTDIR
/packages
]
&&
mkdir
-p
$OUTDIR
/packages
[
!
-d
$OUTDIR
/targers
]
&&
mkdir
-p
$OUTDIR
/targets
echo
"-> Output directory:
$OUTDIR
"
for
link
in
$OUTDIR
/
*
;
do
for
link
in
$OUTDIR
/packages/
*
;
do
unlink
$link
2>/dev/null
done
for
link
in
$OUTDIR
/targets/
*
;
do
unlink
$link
2>/dev/null
done
for
target
in
$(
cat
$targets_list
)
;
do
for
arch
in
$release
/
$target
/sdk/bin/packages/
*
;
do
[
-d
"
$arch
"
]
&&
{
echo
"-> Creating symlink for
$arch
"
ln
-s
$PWD
/
$arch
$OUTDIR
/ 2>/dev/null
echo
"-> Creating symlink for
$arch
packages"
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment