From 9768ef95eac9c36d96af554c20ab396a6b0a3d5f Mon Sep 17 00:00:00 2001 From: oyvind Date: Wed, 30 Dec 2009 10:09:41 +0000 Subject: [PATCH] bootloader: jffs2 config now comes from ecos.ecc MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit also fixed some formatting. Signed-off-by: Øyvind Harboe git-svn-id: http://www.ecosforge.net/ecosforge/trunk/nios2ecos@347 2333b21a-1c27-0410-8132-afba56cb5048 --- bootloader/bootloader/bootloader.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/bootloader/bootloader/bootloader.c b/bootloader/bootloader/bootloader.c index 55ce80c..7fe6e48 100644 --- a/bootloader/bootloader/bootloader.c +++ b/bootloader/bootloader/bootloader.c @@ -251,12 +251,7 @@ void mountJFFS2() } #endif - - char buffer[256]; - sprintf(buffer, "dev/flash/0/0X%x,0X%x", JFFS2_OFFSET, JFFS2_LENGTH); - fprintf(ser_fp, "%s\r\n", buffer); - - if ((err = mount(buffer, "/config", "jffs2")) < 0) + if ((err = mount(CYGDAT_IO_FLASH_BLOCK_DEVICE_NAME_1, "/config", "jffs2")) < 0) { fprintf(ser_fp, "Error: could not mount flash %d\r\n", err); return; @@ -316,7 +311,7 @@ void format(void) flash_erase_range((void *)(UNCACHED_EXT_FLASH_BASE + JFFS2_OFFSET), JFFS2_LENGTH); - fprintf(ser_fp, "%s\r\n", "Flash formatted successfully"); + fprintf(ser_fp, "/config formatted successfully\r\n"); reset(); } @@ -550,7 +545,7 @@ static void changeIP() char ip[81]; //get IP fprintf(ser_fp, - "\r\nEnter ip, mask and gateway(optional) (x.x.x.x,y.y.y.y[,z.z.z.z]): "); + "\r\nEnter ip, mask and gateway(optional) (x.x.x.x,y.y.y.y[,z.z.z.z]):\r\n"); readLine(ip, sizeof(ip)); writeFile(IP_FILE, ip); reset(); @@ -808,6 +803,7 @@ void menu(void) runfile("/ram/run"); break; case ' ': + fprintf(ser_fp, "\r\nAdvanced menu:\r\n\r\n"); fprintf(ser_fp, "Press format flash\r\n"); fprintf(ser_fp, "Press to start Ymodem upload of a file to a specified file name\r\n"); -- 2.11.4.GIT