From: Grazvydas Ignotas Date: Mon, 13 Feb 2012 15:59:46 +0000 (+0200) Subject: update default boot commands X-Git-Tag: sz_175~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba154b9e057718606b80b670e073b67e2396e6f0;p=pandora-u-boot.git update default boot commands - read autoboot.txt from NAND too (boot partition) - stop sending system console to serial that almost nobody has - make ssource command more likely to work (if you pass size) --- diff --git a/board/pandora/menu.c b/board/pandora/menu.c index 15f5306b60d..8709a9c9caf 100644 --- a/board/pandora/menu.c +++ b/board/pandora/menu.c @@ -190,8 +190,7 @@ static void menu_init(void) const char *check_format1 = "%sload mmc1 0:%d ${loadaddr} boot.scr 4"; const char *check_format2 = "%sload mmc1 0:%d ${loadaddr} boot.txt 4"; const char *run_format1 = "%sload mmc1 0:%d ${loadaddr} boot.scr;source ${loadaddr}"; - const char *run_format2 = "mw.l ${loadaddr} 0 1024;%sload mmc1 0:%d ${loadaddr} boot.txt;" - "ssource ${loadaddr}"; + const char *run_format2 = "%sload mmc1 0:%d ${loadaddr} boot.txt;ssource ${loadaddr} ${filesize}"; disk_partition_t part_info; block_dev_desc_t *dev_desc; char tmp_name[32], tmp_cmd[128]; @@ -330,21 +329,25 @@ U_BOOT_CMD( /* helpers */ static int do_ssource(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - ulong addr; + ulong addr, size = 0; if (argc < 2) return 1; addr = simple_strtoul(argv[1], NULL, 16); + if (argc >= 3) { + size = simple_strtoul(argv[2], NULL, 16); + *(char *)(addr + size) = 0; + } - printf("## Executing plain script at %08lx\n", addr); + printf("## Executing plain script at %08lx, size %ld\n", addr, size); return parse_string_outer((char *)addr, FLAG_PARSE_SEMICOLON); } U_BOOT_CMD( - ssource, 2, 0, do_ssource, + ssource, 3, 0, do_ssource, "run script from memory (no header)", - "" + " [size_hex]" /* note: without size may parse trash after the script */ ); static int do_usbinit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h index de69291d4ff..8fb39578154 100644 --- a/include/configs/omap3_pandora.h +++ b/include/configs/omap3_pandora.h @@ -184,15 +184,18 @@ "usbtty=cdc_acm\0" \ "loadaddr=0x82000000\0" \ "bootargs=ubi.mtd=4 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs " \ - "rw rootflags=bulk_read vram=6272K omapfb.vram=0:3000K\0" \ + "rw rootflags=bulk_read vram=6272K omapfb.vram=0:3000K quiet\0" \ "mtdparts=" MTDPARTS_DEFAULT "\0" \ #define CONFIG_BOOTCOMMAND \ "if mmc rescan && fatload mmc1 0 ${loadaddr} autoboot.txt || " \ "ext2load mmc1 0 ${loadaddr} autoboot.txt; then " \ - "ssource ${loadaddr}; " \ + "ssource ${loadaddr} ${filesize}; " \ + "fi; " \ + "if ubi part boot && ubifsmount boot; then " \ + "ubifsload ${loadaddr} autoboot.txt && ssource ${loadaddr} ${filesize}; " \ + "ubifsload ${loadaddr} uImage && bootm ${loadaddr}; " \ "fi; " \ - "ubi part boot && ubifsmount boot && ubifsload ${loadaddr} uImage && bootm ${loadaddr}; " \ "setenv stdout lcd; echo Failed to load kernel, you may need to reflash the firmware.; " \ "pmenu"