Index: ecos/packages/redboot/current/src/main.c =================================================================== --- ecos.orig/packages/redboot/current/src/main.c 2009-04-09 09:40:29.000000000 +0100 +++ ecos/packages/redboot/current/src/main.c 2009-04-09 09:41:33.000000000 +0100 @@ -176,6 +176,9 @@ #ifdef HAL_PLATFORM_CPU diag_printf("Platform: %s (%s) %s\n", HAL_PLATFORM_BOARD, HAL_PLATFORM_CPU, HAL_PLATFORM_EXTRA); #endif +#ifdef HAL_PLATFORM_MACHINE_REVISION + diag_printf("System type %d revision %d\n", HAL_PLATFORM_MACHINE_TYPE, HAL_PLATFORM_MACHINE_REVISION); +#endif diag_printf("Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.\n"); diag_printf("Copyright (C) 2003, 2004, 2005, 2006 eCosCentric Limited\n\n"); diag_printf("RAM: %p-%p, ", (void*)ram_start, (void*)ram_end); @@ -335,7 +338,20 @@ script = CYGDAT_REDBOOT_DEFAULT_BOOT_SCRIPT; } # endif + +#ifdef SQUEEZEOS_REDBOOT + if (script) { + extern int squeezeos_halt_boot; + + if (squeezeos_halt_boot) { + script = NULL; + } + } + if (script && script_timeout > 0) { + /* A physical button is used to stop boot, allow a zero timeout */ +#else if (script) { +#endif // SQUEEZEOS_REDBOOT // Give the guy a chance to abort any boot script unsigned char *hold_script = script; int script_timeout_ms = script_timeout * CYGNUM_REDBOOT_BOOT_SCRIPT_TIMEOUT_RESOLUTION; Index: ecos/packages/redboot/current/src/net/net_io.c =================================================================== --- ecos.orig/packages/redboot/current/src/net/net_io.c 2009-04-09 09:40:29.000000000 +0100 +++ ecos/packages/redboot/current/src/net/net_io.c 2009-04-09 09:41:33.000000000 +0100 @@ -718,6 +718,18 @@ #endif } #endif + +#ifdef SQUEEZEOS_REDBOOT + { + extern int squeezeos_halt_boot; + + // Don't use bootp if the reset button is not held + if (!squeezeos_halt_boot) { + use_bootp = false; + } + } +#endif + # ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG // Don't override if the user has deliberately set something more // verbose. @@ -849,11 +861,13 @@ #endif #endif int num_opts; - + +#ifndef SQUEEZEOS_REDBOOT if (!have_net) { diag_printf("Sorry, networking is not available.\n"); return; } +#endif init_opts(&opts[0], 'l', true, OPTION_ARG_TYPE_STR, (void *)&ip_addr, (bool *)&ip_addr_set, "local IP address"); Index: ecos/packages/redboot/current/src/fconfig.c =================================================================== --- ecos.orig/packages/redboot/current/src/fconfig.c 2009-04-09 09:40:29.000000000 +0100 +++ ecos/packages/redboot/current/src/fconfig.c 2009-04-09 09:41:33.000000000 +0100 @@ -129,14 +129,41 @@ boot_script, ALWAYS_ENABLED, true, CONFIG_BOOL, - false + CYGDAT_REDBOOT_FCONFIG_BOOT_SCRIPT ); RedBoot_config_option("Boot script", boot_script_data, "boot_script", true, CONFIG_SCRIPT, - "" + CYGDAT_REDBOOT_FCONFIG_BOOT_SCRIPT_DATA ); +#ifdef SQUEEZEOS_REDBOOT +/* RedBoot macros suck again, and don't allow you to set default aliases */ +struct config_option _config_option_alias_kernel_cmdline +CYG_HAL_TABLE_QUALIFIED_ENTRY(RedBoot_config_options,alias_kernel_cmdline) = { + "alias/os_cmdline", + "os_cmdline", + ALWAYS_ENABLED, true, + CONFIG_STRING, + CYGDAT_SQUEEZEOS_FCONFIG_OS_CMDLINE +}; +struct config_option _config_option_alias_kernel_roofts +CYG_HAL_TABLE_QUALIFIED_ENTRY(RedBoot_config_options,alias_os_cmdargs) = { + "alias/os_cmdargs", + "os_cmdargs", + ALWAYS_ENABLED, true, + CONFIG_STRING, + "" +}; +struct config_option _config_option_alias_kernel_cmdargs +CYG_HAL_TABLE_QUALIFIED_ENTRY(RedBoot_config_options,alias_os_backup) = { + "alias/os_backup", + "os_backup", + ALWAYS_ENABLED, true, + CONFIG_STRING, + "" +}; +#endif // Some preprocessor magic for building the [constant] prompt string #define __cat(s1,c2,s3) s1 #c2 s3 #define _cat(s1,c2,s3) __cat(s1,c2,s3) @@ -146,7 +173,7 @@ boot_script_timeout, "boot_script", true, CONFIG_INT, - 0 + CYGDAT_REDBOOT_FCONFIG_BOOT_SCRIPT_TIMEOUT ); #undef __cat #undef _cat @@ -1024,6 +1051,7 @@ memcpy(dp, (void *)opt->dflt, config_length(CONFIG_STRING)); break; case CONFIG_SCRIPT: + memcpy(dp, (void *)opt->dflt, config_length(CONFIG_SCRIPT)); break; } } @@ -1173,7 +1201,10 @@ diag_printf("**Warning** FLASH configuration checksum error or invalid key\n"); diag_printf("Use 'fconfig -i' to [re]initialize database\n"); config_init(); +#ifndef SQUEEZEOS_REDBOOT + /* We don't want to return here, let's use the defaults */ return; +#endif } config_ok = true; flash_get_config("boot_script", &use_boot_script, CONFIG_BOOL); Index: ecos/packages/redboot/current/cdl/redboot.cdl =================================================================== --- ecos.orig/packages/redboot/current/cdl/redboot.cdl 2009-04-09 09:40:29.000000000 +0100 +++ ecos/packages/redboot/current/cdl/redboot.cdl 2009-04-09 09:41:33.000000000 +0100 @@ -1224,6 +1224,12 @@ default_value 0 } + cdl_option CYGDAT_SQUEEZEOS_FCONFIG_OS_CMDLINE { + display "Default fconfig os_cmdline value" + flavor booldata + default_value 0 + } + cdl_option CYGSEM_REDBOOT_RTC { display "Support RTC for time & date functions" active_if { CYGPKG_IO_WALLCLOCK } Index: ecos/packages/redboot/current/src/flash.c =================================================================== --- ecos.orig/packages/redboot/current/src/flash.c 2009-04-09 09:40:29.000000000 +0100 +++ ecos/packages/redboot/current/src/flash.c 2009-04-09 09:41:33.000000000 +0100 @@ -1610,7 +1610,7 @@ fis_addr = (void *)((CYG_ADDRESS)flash_start + (CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK*flash_block_size)); } -#if defined(MXCFLASH_SELECT_NAND) +#if !defined(SQUEEZEOS_REDBOOT) && defined(MXCFLASH_SELECT_NAND) extern int mxc_nand_fis_start(void); if (IS_FIS_FROM_NAND()) { fis_addr = (void *)((CYG_ADDRESS)flash_start + mxc_nand_fis_start()); @@ -1721,4 +1721,4 @@ fis_usage("unrecognized command"); } -// EOF flash.c \ No newline at end of file +// EOF flash.c