No subject
Thu Oct 11 07:38:59 CEST 2012
see your position about it being beyond the scope of this patch. It
would be great if someone who cares about this modem code would clean
up the mess.
>>
>>> + debug("DEBUG: main_loop: do_mdm_init=%d\n", do_mdm_init);
>>> + if (do_mdm_init) {
>>> + char *str = strdup(getenv("mdm_cmd"));
>>> +
>>> + setenv("preboot", str); /* set or delete definition */
>>> + if (str != NULL)
>>> + free(str);
>>> + mdm_init(); /* wait for modem connection */
>>> + }
>>> }
>>> -#endif /* CONFIG_MODEM_SUPPORT */
>>>
>>> -#ifdef CONFIG_VERSION_VARIABLE
>>> - {
>>> + if (autoconf_version_variable())
>>> setenv("ver", version_string); /* set version variable */
>>> - }
>>> -#endif /* CONFIG_VERSION_VARIABLE */
>>>
>>> -#ifdef CONFIG_SYS_HUSH_PARSER
>>> - u_boot_hush_start();
>>> -#endif
>>> + if (autoconf_sys_hush_parser())
>>> + u_boot_hush_start();
>>>
>>> -#if defined(CONFIG_HUSH_INIT_VAR)
>>> - hush_init_var();
>>> -#endif
>>> + if (autoconf_hush_init_var())
>>> + hush_init_var();
>>> +
>>> + if (autoconf_preboot()) {
>>> + char *p = getenv("preboot");
>>> +
>>> + if (p) {
>>> + int prev;
>>>
>>> -#ifdef CONFIG_PREBOOT
>>> - p = getenv("preboot");
>>> - if (p) {
>>> -# ifdef CONFIG_AUTOBOOT_KEYED
>>> - int prev = disable_ctrlc(1); /* disable Control C checking */
>>> -# endif
>>> + /* disable Control C checking */
>>> + if (autoconf_autoboot_keyed())
>>> + prev = disable_ctrlc(1);
>>>
>>> - run_command_list(p, -1, 0);
>>> + run_command_list(p, -1, 0);
>>>
>>> -# ifdef CONFIG_AUTOBOOT_KEYED
>>> - disable_ctrlc(prev); /* restore Control C checking */
>>> -# endif
>>> + /* restore Control C checking */
>>> + if (autoconf_autoboot_keyed())
>>> + disable_ctrlc(prev);
>>> + }
>>> }
>>> -#endif /* CONFIG_PREBOOT */
>>>
>>> if (autoconf_update_tftp())
>>> update_tftp(0UL);
>>> @@ -435,9 +428,8 @@ void main_loop(void)
>>> if (autoconf_has_bootdelay() && autoconf_bootdelay() >= 0)
>>> process_boot_delay();
>>>
>>> -#if defined CONFIG_OF_CONTROL
>>> - set_working_fdt_addr((void *)gd->fdt_blob);
>>> -#endif /* CONFIG_OF_CONTROL */
>>> + if (autoconf_of_control() && autoconf_of_libfdt())
>>
>> Why are you adding an additional condition on autoconf_of_libfdt()?
>
> I think I had a build warning somewhere - I will take another look,
> and then add a comment if it is still needed.
I guess you determined this to be superfluous.
<snip>
Cheers,
-Joe
More information about the U-Boot
mailing list