summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-05-12 18:10:00 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-05-12 18:10:00 +0000
commit598a95367cf4f72616f36c14b5e30dfeaecf45a9 (patch)
tree0d3a338526df5d2c55fc9e15fa1b2b62cb0abe01
parentba3204e1dc162a7f4c22d81d1ea0b821ad9b108f (diff)
install updates from Uros
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3597 7fd9a85b-ad96-42d3-883c-3090e2eb8679
-rwxr-xr-xapps/system/install/install.c19
-rw-r--r--apps/vsn/Makefile2
2 files changed, 11 insertions, 10 deletions
diff --git a/apps/system/install/install.c b/apps/system/install/install.c
index f1fe7207ee..2f11c64340 100755
--- a/apps/system/install/install.c
+++ b/apps/system/install/install.c
@@ -64,7 +64,7 @@ const char *install_help =
"Installs XIP program into flash and creates a start-up script in the\n"
"destination directory.\n\n"
"Usage:\t%s [options] source-file.xip destination-directory\n\n"
- "Example:\n\t%s --stack 1024 demo.xip /usr/bin\n\n"
+ "Example:\n\t%s --stack 1024 /sdcard/demo.xip /usr/bin\n\n"
"Options:\n"
"\t--stack <required_stack_space>\n"
"\t--priority <priority>\n"
@@ -77,7 +77,7 @@ const char *install_script_text =
"# XIP stacksize=%x priority=%x size=%x\n";
const char *install_script_exec =
- "exec %x\n";
+ "exec 0x%x\n";
/****************************************************************************
@@ -88,12 +88,13 @@ int install_getstartpage(int startpage, int pagemargin, int desiredsize)
{
uint16_t page = 0, stpage = 0xFFFF;
uint16_t pagesize = 0;
- int maxlen = 0, maxlen_start = 0xFFFF;
- int status;
+ int maxlen = -1;
+ int maxlen_start = 0xFFFF;
+ int status;
for (status=0, page=0; status >= 0; page++) {
- status = up_progmem_ispageerased(page);
+ status = up_progmem_ispageerased(page);
pagesize = up_progmem_pagesize(page);
/* Is this beginning of new free space section */
@@ -102,10 +103,10 @@ int install_getstartpage(int startpage, int pagemargin, int desiredsize)
}
else if (status != 0) {
- if (stpage != 0xFFFF && up_progmem_isuniform()) {
+ if (stpage != 0xFFFF) {
if ( (page - stpage) > maxlen) {
-
+
if (maxlen==-1) { /* First time found sth? */
stpage += pagemargin;
maxlen = 0;
@@ -293,7 +294,7 @@ int install_remove(const char *scriptname)
int install_main(int argc, char *argv[])
{
- int i;
+ int i;
int progsize;
int scrsta;
int stacksize = 4096;
@@ -302,7 +303,7 @@ int install_main(int argc, char *argv[])
int startpage = 0;
int startaddr = 0;
int action = ACTION_INSTALL;
- char scriptname[2*CONFIG_NAME_MAX];
+ char scriptname[128];
/* Supported? */
diff --git a/apps/vsn/Makefile b/apps/vsn/Makefile
index 8917ef1474..5e9aa843c2 100644
--- a/apps/vsn/Makefile
+++ b/apps/vsn/Makefile
@@ -37,7 +37,7 @@
# Sub-directories
-SUBDIRS = free hello poweroff ramtron sdcard sysinfo
+SUBDIRS = hello poweroff ramtron sdcard sysinfo
all: nothing
.PHONY: nothing context depend clean distclean