Skip to content

Commit

Permalink
Fix #5 and improve build flow for Arduino package
Browse files Browse the repository at this point in the history
 * Do not explicitly assign flash tool version
 * Separate package version from tool version
 * Update build script template
 * Fix #5 by setting upload.py executable flag
  • Loading branch information
pablosun committed Mar 31, 2017
1 parent df3e2db commit b049977
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
{
"name": "LinkIt 7697",
"architecture": "linkit_rtos",
"version": "1.0.0",
"version": "0.6.0",
"category": "Contributed",
"url": "http://localhost:8080/mediatek_linkit_7697-1.0.0.tar.bz2",
"archiveFileName": "mediatek_linkit_7697-1.0.0.tar.bz2",
"url": "http://localhost:8080/mediatek_linkit_7697-0.6.0.tar.bz2",
"archiveFileName": "mediatek_linkit_7697-0.6.0.tar.bz2",
"boards": [
{
"name": "LinkIt 7697"
Expand All @@ -30,7 +30,7 @@
{
"packager": "LinkIt",
"name": "flash_tool",
"version": "1.0.0"
"version": "0.6.0"
}
]
}
Expand Down Expand Up @@ -72,27 +72,27 @@
},
{
"name": "flash_tool",
"version": "1.0.0",
"version": "1.3.0",
"systems": [
{
"host": "i686-mingw32",
"url": "http://localhost:8080/mediatek_linkit_7697_flash_tool-1.0.0.tar.bz2",
"archiveFileName": "mediatek_linkit_7697_flash_tool-1.0.0.tar.bz2"
"url": "http://localhost:8080/mediatek_linkit_7697_flash_tool-1.3.0.tar.bz2",
"archiveFileName": "mediatek_linkit_7697_flash_tool-1.3.0.tar.bz2"
},
{
"host": "i386-apple-darwin11",
"url": "http://localhost:8080/mediatek_linkit_7697_flash_tool-1.0.0.tar.bz2",
"archiveFileName": "mediatek_linkit_7697_flash_tool-1.0.0.tar.bz2"
"url": "http://localhost:8080/mediatek_linkit_7697_flash_tool-1.3.0.tar.bz2",
"archiveFileName": "mediatek_linkit_7697_flash_tool-1.3.0.tar.bz2"
},
{
"host": "i686-linux-gnu",
"url": "http://localhost:8080/mediatek_linkit_7697_flash_tool-1.0.0.tar.bz2",
"archiveFileName": "mediatek_linkit_7697_flash_tool-1.0.0.tar.bz2"
"url": "http://localhost:8080/mediatek_linkit_7697_flash_tool-1.3.0.tar.bz2",
"archiveFileName": "mediatek_linkit_7697_flash_tool-1.3.0.tar.bz2"
},
{
"host": "x86_64-linux-gnu",
"url": "http://localhost:8080/mediatek_linkit_7697_flash_tool-1.0.0.tar.bz2",
"archiveFileName": "mediatek_linkit_7697_flash_tool-1.0.0.tar.bz2"
"url": "http://localhost:8080/mediatek_linkit_7697_flash_tool-1.3.0.tar.bz2",
"archiveFileName": "mediatek_linkit_7697_flash_tool-1.3.0.tar.bz2"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ recipe.size.regex.data=^(?:\.data|\.bss|\.heap|.\stack_dummy)\s+([0-9]+).*

# 5 Upload tools
# ------------------------
tools.flash_tool.path={runtime.tools.flash_tool-1.0.0.path}
tools.flash_tool.path={runtime.tools.flash_tool.path}
tools.flash_tool.cmd=upload.py
tools.flash_tool.cmd.windows=upload.exe

Expand Down
Empty file.
11 changes: 9 additions & 2 deletions mk_ide_pkg.pl
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,22 @@ sub main
{
my $outpath;
my $pkg_ver;
my $tool_ver;
my $show_help;

Getopt::Long::GetOptions(
'o=s' => \$outpath,
'v=s' => \$pkg_ver,
't=s' => \$tool_ver,
'help' => \$show_help,
);


if (defined($show_help)) {
print("USEAGE:
-o=xxx Indicate the output path
-v=xxx Indicate the package version\n");
-v=xxx Indicate the package version
-t=xxx Indicate the tool version\n");

exit(0);
}
Expand All @@ -173,6 +176,10 @@ sub main

$pkg_ver="0.1.0" if (not defined($pkg_ver));
print("The pgk_ver: $pkg_ver\n");

$tool_ver="1.3.0" if (not defined($tool_ver));
print("The tool_ver: $tool_ver\n");


# build packages
&build_base_pkg($outpath);
Expand All @@ -183,7 +190,7 @@ sub main

# pack into bz2
system("cd $outpath; tar -cvjf mediatek_linkit_7697-$pkg_ver.tar.bz2 mt7697; cd -");
system("cd $outpath; tar -cvjf mediatek_linkit_7697_flash_tool-$pkg_ver.tar.bz2 flash_tool; cd -");
system("cd $outpath; tar -cvjf mediatek_linkit_7697_flash_tool-$tool_ver.tar.bz2 flash_tool; cd -");

# TODO:
my $package_json="middleware/third_party/arduino/build/package_mtk_linkit_7697_index.json";
Expand Down

0 comments on commit b049977

Please sign in to comment.