porting: Update targets and updating script

We need to update pkg names to represent at path to the targets.
Also update the update_generated_files.sh script to
refer to the targets using a path. This is required
after recent change to Newt.
This commit is contained in:
Michał Narajowski
2020-06-09 10:31:22 +02:00
parent f8a396662d
commit c1597ec775
5 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
# under the License.
#
pkg.name: "targets/linux"
pkg.name: "porting/targets/linux"
pkg.type: "target"
pkg.description: This target is used to generate syscfg.h file and other artifacts for linux example app.
pkg.author:
+1 -1
View File
@@ -16,7 +16,7 @@
# under the License.
#
pkg.name: "targets/linux_blemesh"
pkg.name: "porting/targets/linux_blemesh"
pkg.type: "target"
pkg.description: This target is used to generate syscfg.h file and other artifacts for linux_blemesh example app.
pkg.author:
+1 -1
View File
@@ -16,7 +16,7 @@
# under the License.
#
pkg.name: "targets/porting_default"
pkg.name: "porting/targets/porting_default"
pkg.type: "target"
pkg.description: This target is used to generate syscfg.h file and other artifacts for default Nimble port includes.
pkg.author:
+1 -1
View File
@@ -16,7 +16,7 @@
# under the License.
#
pkg.name: "targets/riot"
pkg.name: "porting/targets/riot"
pkg.type: "target"
pkg.description: This target is used to generate syscfg.h file and other artifacts for RIOT Nimble port.
pkg.author:
+7 -2
View File
@@ -31,6 +31,11 @@ declare -A targets=(
for target in "${!targets[@]}"; do
echo "Updating target $target"
newt build "$target" > /dev/null 2>&1
cp "bin/@apache-mynewt-nimble/targets/${target}/generated/include" "${targets[$target]}" -r
newt build "@apache-mynewt-nimble/porting/targets/$target" > /dev/null 2>&1
cp "bin/@apache-mynewt-nimble/porting/targets/${target}/generated/include" "${targets[$target]}" -r
# Remove repo version and hash MYNEWT_VALS as it doesn't make much sense to commit them and they
# defeat the purpose of this script.
find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '/MYNEWT_VAL_REPO_*/,/#endif/d' {} \;
find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '/\/\*\*\* Repository/,/\*\//d' {} \;
find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '$!N;/^\n$/{$q;D;};P;D;' {} \;
done