[U-Boot,v2,00/18] autoboot: Tidy up autoboot code
mbox series

Message ID 20190721025128.30351-1-sjg@chromium.org
Headers show
Series
  • autoboot: Tidy up autoboot code
Related show

Message

Simon Glass July 21, 2019, 2:51 a.m. UTC
This series cleans up autoboot.c a bit to:

- Convert options to Kconfig
- Use C code instead of C preprocessor where possible
- Add a few comments

Changes in v2:
- Rebase to master

Simon Glass (18):
  main: Use conditional run_preboot_environment_command()
  Convert CONFIG_SHOW_BOOT_PROGRESS to Kconfig
  Add CONFIG_USE_PREBOOT to boards that use CONFIG_PREBOOT
  Convert CONFIG_USE_PREBOOT and CONFIG_PREBOOT to Kconfig
  autoboot: Use CONFIG_AUTOBOOT_STOP_STR_SHA256 indirectly
  autoboot: Drop #ifdef for CONFIG_AUTOBOOT_ENCRYPTION
  autoboot: Improve docs for CONFIG_AUTOBOOT_ENCRYPTION
  autoboot: Use if() for CONFIG_SILENT_CONSOLE
  autoboot: Drop #ifdef CONFIG_AUTOBOOT_KEYED
  autoboot: Drop unused CONFIG_MENUPROMPT
  autoboot: Rename CONFIG_MENUKEY to CONFIG_AUTOBOOT_MENUKEY
  snow: Define CONFIG_AUTOBOOT_MENUKEY
  autoboot: Tidy up use of menukey
  autoboot: Rename CONFIG_MENU_SHOW to include AUTOBOOT
  Convert CONFIG_AUTOBOOT_MENU_SHOW to Kconfig
  autoboot: Add comments for menu_show()
  autoboot: Move a few more options from #ifdef to if()
  autoboot: Adjust the implementation in autoboot_command()

 README                                        | 167 +-----------------
 cmd/Kconfig                                   |  34 +++-
 cmd/bootmenu.c                                |   2 +-
 common/Kconfig                                | 162 +++++++++++++++++
 common/autoboot.c                             | 121 +++++++------
 common/main.c                                 |   5 +-
 configs/A10-OLinuXino-Lime_defconfig          |   1 +
 configs/A10s-OLinuXino-M_defconfig            |   1 +
 configs/A13-OLinuXinoM_defconfig              |   1 +
 configs/A13-OLinuXino_defconfig               |   1 +
 configs/A20-OLinuXino-Lime2-eMMC_defconfig    |   1 +
 configs/A20-OLinuXino-Lime2_defconfig         |   1 +
 configs/A20-OLinuXino-Lime_defconfig          |   1 +
 configs/A20-OLinuXino_MICRO-eMMC_defconfig    |   1 +
 configs/A20-OLinuXino_MICRO_defconfig         |   1 +
 configs/A20-Olimex-SOM-EVB_defconfig          |   1 +
 configs/A20-Olimex-SOM204-EVB-eMMC_defconfig  |   1 +
 configs/A20-Olimex-SOM204-EVB_defconfig       |   1 +
 configs/A33-OLinuXino_defconfig               |   1 +
 configs/Ainol_AW1_defconfig                   |   1 +
 configs/Ampe_A76_defconfig                    |   1 +
 configs/Auxtek-T003_defconfig                 |   1 +
 configs/Auxtek-T004_defconfig                 |   1 +
 configs/Bananapi_M2_Ultra_defconfig           |   1 +
 configs/Bananapi_defconfig                    |   1 +
 configs/Bananapi_m2m_defconfig                |   1 +
 configs/Bananapro_defconfig                   |   1 +
 configs/CHIP_defconfig                        |   1 +
 configs/CHIP_pro_defconfig                    |   1 +
 configs/CSQ_CS908_defconfig                   |   1 +
 configs/Chuwi_V7_CW0825_defconfig             |   1 +
 configs/Colombus_defconfig                    |   1 +
 configs/Cubieboard2_defconfig                 |   1 +
 configs/Cubieboard4_defconfig                 |   1 +
 configs/Cubieboard_defconfig                  |   1 +
 configs/Cubietruck_defconfig                  |   1 +
 configs/Cubietruck_plus_defconfig             |   1 +
 configs/Empire_electronix_d709_defconfig      |   1 +
 configs/Empire_electronix_m712_defconfig      |   1 +
 configs/Hummingbird_A31_defconfig             |   1 +
 configs/Hyundai_A7HD_defconfig                |   1 +
 configs/Itead_Ibox_A20_defconfig              |   1 +
 configs/Lamobo_R1_defconfig                   |   1 +
 configs/LicheePi_Zero_defconfig               |   1 +
 configs/Linksprite_pcDuino3_Nano_defconfig    |   1 +
 configs/Linksprite_pcDuino3_defconfig         |   1 +
 configs/Linksprite_pcDuino_defconfig          |   1 +
 configs/MK808C_defconfig                      |   1 +
 configs/MPC8349EMDS_PCI64_defconfig           |   2 +
 configs/MPC8349EMDS_SLAVE_defconfig           |   2 +
 configs/MPC8349EMDS_defconfig                 |   2 +
 configs/MSI_Primo73_defconfig                 |   1 +
 configs/MSI_Primo81_defconfig                 |   1 +
 configs/Marsboard_A10_defconfig               |   1 +
 configs/Mele_A1000G_quad_defconfig            |   1 +
 configs/Mele_A1000_defconfig                  |   1 +
 configs/Mele_I7_defconfig                     |   1 +
 configs/Mele_M3_defconfig                     |   1 +
 configs/Mele_M5_defconfig                     |   1 +
 configs/Mele_M9_defconfig                     |   1 +
 configs/Merrii_A80_Optimus_defconfig          |   1 +
 configs/Mini-X_defconfig                      |   1 +
 .../Nintendo_NES_Classic_Edition_defconfig    |   1 +
 configs/Orangepi_defconfig                    |   1 +
 configs/Orangepi_mini_defconfig               |   1 +
 configs/Sinlinx_SinA31s_defconfig             |   1 +
 configs/Sinlinx_SinA33_defconfig              |   1 +
 configs/Sinovoip_BPI_M2_defconfig             |   1 +
 configs/Sinovoip_BPI_M3_defconfig             |   1 +
 configs/Sunchip_CX-A99_defconfig              |   1 +
 configs/TQM834x_defconfig                     |   2 +
 configs/UTOO_P66_defconfig                    |   1 +
 configs/Wexler_TAB7200_defconfig              |   1 +
 configs/Wits_Pro_A20_DKT_defconfig            |   1 +
 configs/Wobo_i5_defconfig                     |   1 +
 configs/Yones_Toptech_BD1078_defconfig        |   1 +
 configs/Yones_Toptech_BS1078_V2_defconfig     |   1 +
 configs/a64-olinuxino_defconfig               |   1 +
 configs/am335x_shc_defconfig                  |   1 +
 configs/am335x_shc_ict_defconfig              |   1 +
 configs/am335x_shc_netboot_defconfig          |   1 +
 configs/am335x_shc_sdboot_defconfig           |   1 +
 configs/amarula_a64_relic_defconfig           |   1 +
 configs/apf27_defconfig                       |   2 +
 configs/arndale_defconfig                     |   1 +
 configs/aspenite_defconfig                    |   1 +
 configs/ba10_tv_box_defconfig                 |   1 +
 configs/bananapi_m1_plus_defconfig            |   1 +
 configs/bananapi_m2_berry_defconfig           |   1 +
 configs/bananapi_m2_plus_h3_defconfig         |   1 +
 configs/bananapi_m2_plus_h5_defconfig         |   1 +
 configs/bananapi_m2_zero_defconfig            |   1 +
 configs/bananapi_m64_defconfig                |   1 +
 configs/bayleybay_defconfig                   |   1 +
 configs/bcm7260_defconfig                     |   2 +
 configs/bcm7445_defconfig                     |   2 +
 configs/beelink_gs1_defconfig                 |   1 +
 configs/beelink_x2_defconfig                  |   5 +-
 configs/bitmain_antminer_s9_defconfig         |   1 +
 configs/bk4r1_defconfig                       |   1 +
 configs/brppt1_mmc_defconfig                  |   2 +
 configs/brppt1_nand_defconfig                 |   2 +
 configs/brppt1_spi_defconfig                  |   4 +-
 configs/brxre1_defconfig                      |   2 +
 configs/cherryhill_defconfig                  |   1 +
 configs/chromebit_mickey_defconfig            |   2 +-
 configs/chromebook_jerry_defconfig            |   2 +-
 configs/chromebook_link64_defconfig           |   1 +
 configs/chromebook_link_defconfig             |   1 +
 configs/chromebook_minnie_defconfig           |   2 +-
 configs/chromebook_samus_defconfig            |   1 +
 configs/chromebook_samus_tpl_defconfig        |   1 +
 configs/chromebook_speedy_defconfig           |   2 +-
 configs/chromebox_panther_defconfig           |   1 +
 configs/clearfog_defconfig                    |   1 +
 configs/clearfog_gt_8k_defconfig              |   1 +
 configs/cm_fx6_defconfig                      |   2 +
 configs/colorfly_e708_q1_defconfig            |   1 +
 ...-qeval20-qa3-e3845-internal-uart_defconfig |   2 +
 configs/conga-qeval20-qa3-e3845_defconfig     |   2 +
 configs/controlcenterdc_defconfig             |   1 +
 configs/coreboot_defconfig                    |   1 +
 configs/cougarcanyon2_defconfig               |   1 +
 configs/crownbay_defconfig                    |   1 +
 configs/crs305-1g-4s_defconfig                |   3 +-
 configs/d2net_v2_defconfig                    |   1 +
 configs/db-88f6720_defconfig                  |   1 +
 configs/db-88f6820-amc_defconfig              |   1 +
 configs/db-88f6820-gp_defconfig               |   1 +
 configs/db-mv784mp-gp_defconfig               |   1 +
 configs/db-xc3-24g4xg_defconfig               |   1 +
 configs/dfi-bt700-q7x-151_defconfig           |   2 +
 configs/difrnce_dit4350_defconfig             |   1 +
 configs/dns325_defconfig                      |   1 +
 configs/dockstar_defconfig                    |   1 +
 configs/draco_defconfig                       |   1 +
 configs/dreamplug_defconfig                   |   1 +
 configs/ds109_defconfig                       |   1 +
 configs/ds414_defconfig                       |   2 +
 configs/dserve_dsrv9703c_defconfig            |   1 +
 configs/efi-x86_app_defconfig                 |   1 +
 configs/efi-x86_payload32_defconfig           |   1 +
 configs/efi-x86_payload64_defconfig           |   1 +
 configs/emlid_neutis_n5_devboard_defconfig    |   1 +
 configs/etamin_defconfig                      |   1 +
 configs/evb-rk3036_defconfig                  |   1 +
 configs/evb-rk3229_defconfig                  |   3 +-
 configs/evb-rk3288_defconfig                  |   2 +-
 configs/fennec-rk3288_defconfig               |   2 +-
 configs/firefly-rk3288_defconfig              |   2 +-
 configs/ga10h_v1_1_defconfig                  |   1 +
 configs/galileo_defconfig                     |   1 +
 configs/goflexhome_defconfig                  |   1 +
 configs/gplugd_defconfig                      |   1 +
 configs/gt90h_v4_defconfig                    |   1 +
 configs/guruplug_defconfig                    |   1 +
 configs/gwventana_emmc_defconfig              |   1 +
 configs/gwventana_gw5904_defconfig            |   1 +
 configs/gwventana_nand_defconfig              |   1 +
 configs/h8_homlet_v2_defconfig                |   1 +
 configs/helios4_defconfig                     |   1 +
 configs/hrcon_defconfig                       |   1 +
 configs/hrcon_dh_defconfig                    |   1 +
 configs/i12-tvbox_defconfig                   |   1 +
 configs/iNet_3F_defconfig                     |   1 +
 configs/iNet_3W_defconfig                     |   1 +
 configs/iNet_86VS_defconfig                   |   1 +
 configs/iNet_D978_rev2_defconfig              |   1 +
 configs/ib62x0_defconfig                      |   1 +
 configs/icnova-a20-swac_defconfig             |   1 +
 configs/iconnect_defconfig                    |   1 +
 configs/ids8313_defconfig                     |   2 +
 configs/inet1_defconfig                       |   1 +
 configs/inet86dz_defconfig                    |   1 +
 configs/inet97fv2_defconfig                   |   1 +
 configs/inet98v_rev2_defconfig                |   1 +
 configs/inet9f_rev03_defconfig                |   1 +
 configs/inet_q972_defconfig                   |   1 +
 configs/inetspace_v2_defconfig                |   1 +
 configs/jesurun_q5_defconfig                  |   1 +
 configs/kylin-rk3036_defconfig                |   1 +
 configs/libretech-ac_defconfig                |   2 +
 configs/libretech_all_h3_cc_h2_plus_defconfig |   1 +
 configs/libretech_all_h3_cc_h3_defconfig      |   1 +
 configs/libretech_all_h3_cc_h5_defconfig      |   1 +
 configs/lschlv2_defconfig                     |   2 +
 configs/lsxhl_defconfig                       |   2 +
 configs/m53menlo_defconfig                    |   2 +
 configs/maxbcm_defconfig                      |   1 +
 configs/meesc_dataflash_defconfig             |   3 +-
 configs/meesc_defconfig                       |   1 +
 configs/microblaze-generic_defconfig          |   2 +
 configs/minnowmax_defconfig                   |   1 +
 configs/miqi-rk3288_defconfig                 |   2 +-
 configs/mixtile_loftq_defconfig               |   1 +
 configs/mk802_a10s_defconfig                  |   1 +
 configs/mk802_defconfig                       |   1 +
 configs/mk802ii_defconfig                     |   1 +
 configs/mvebu_db-88f3720_defconfig            |   1 +
 configs/mvebu_db_armada8k_defconfig           |   1 +
 configs/mvebu_espressobin-88f3720_defconfig   |   1 +
 configs/mvebu_mcbin-88f8040_defconfig         |   1 +
 configs/mx51evk_defconfig                     |   1 +
 configs/mx53cx9020_defconfig                  |   1 +
 configs/mx53loco_defconfig                    |   1 +
 configs/mx6cuboxi_defconfig                   |   2 +
 configs/mx6qsabrelite_defconfig               |   1 +
 configs/nanopi_a64_defconfig                  |   1 +
 configs/nanopi_m1_defconfig                   |   1 +
 configs/nanopi_m1_plus_defconfig              |   1 +
 configs/nanopi_neo2_defconfig                 |   1 +
 configs/nanopi_neo_air_defconfig              |   1 +
 configs/nanopi_neo_defconfig                  |   1 +
 configs/nanopi_neo_plus2_defconfig            |   1 +
 configs/nas220_defconfig                      |   1 +
 configs/net2big_v2_defconfig                  |   1 +
 configs/netspace_lite_v2_defconfig            |   1 +
 configs/netspace_max_v2_defconfig             |   1 +
 configs/netspace_mini_v2_defconfig            |   1 +
 configs/netspace_v2_defconfig                 |   1 +
 configs/nitrogen6dl2g_defconfig               |   1 +
 configs/nitrogen6dl_defconfig                 |   1 +
 configs/nitrogen6q2g_defconfig                |   1 +
 configs/nitrogen6q_defconfig                  |   1 +
 configs/nitrogen6s1g_defconfig                |   1 +
 configs/nitrogen6s_defconfig                  |   1 +
 configs/nokia_rx51_defconfig                  |   3 +
 configs/nsa310s_defconfig                     |   1 +
 configs/oceanic_5205_5inmfd_defconfig         |   1 +
 configs/omap35_logic_defconfig                |   2 +
 configs/omap35_logic_somlv_defconfig          |   2 +
 configs/omap3_beagle_defconfig                |   2 +
 configs/omap3_evm_defconfig                   |   1 +
 configs/omap3_logic_defconfig                 |   2 +
 configs/omap3_logic_somlv_defconfig           |   2 +
 configs/openrd_base_defconfig                 |   1 +
 configs/openrd_client_defconfig               |   1 +
 configs/openrd_ultimate_defconfig             |   1 +
 configs/opos6uldev_defconfig                  |   2 +
 configs/orangepi_2_defconfig                  |   1 +
 configs/orangepi_lite2_defconfig              |   1 +
 configs/orangepi_lite_defconfig               |   1 +
 configs/orangepi_one_defconfig                |   1 +
 configs/orangepi_one_plus_defconfig           |   1 +
 configs/orangepi_pc2_defconfig                |   1 +
 configs/orangepi_pc_defconfig                 |   1 +
 configs/orangepi_pc_plus_defconfig            |   1 +
 configs/orangepi_plus2e_defconfig             |   1 +
 configs/orangepi_plus_defconfig               |   1 +
 configs/orangepi_prime_defconfig              |   1 +
 configs/orangepi_r1_defconfig                 |   1 +
 configs/orangepi_win_defconfig                |   1 +
 configs/orangepi_zero_defconfig               |   1 +
 configs/orangepi_zero_plus2_defconfig         |   1 +
 configs/orangepi_zero_plus_defconfig          |   1 +
 configs/ot1200_defconfig                      |   1 +
 configs/ot1200_spl_defconfig                  |   1 +
 configs/parrot_r16_defconfig                  |   1 +
 configs/phycore-rk3288_defconfig              |   2 +-
 configs/pine64-lts_defconfig                  |   1 +
 configs/pine64_plus_defconfig                 |   1 +
 configs/pine_h64_defconfig                    |   3 +-
 configs/pinebook_defconfig                    |   1 +
 configs/platinum_picon_defconfig              |   1 +
 configs/platinum_titanium_defconfig           |   1 +
 configs/pogo_e02_defconfig                    |   1 +
 configs/polaroid_mid2407pxe03_defconfig       |   1 +
 configs/polaroid_mid2809pxe04_defconfig       |   1 +
 configs/popmetal-rk3288_defconfig             |   2 +-
 configs/pov_protab2_ips9_defconfig            |   1 +
 configs/pxm2_defconfig                        |   1 +
 configs/q8_a13_tablet_defconfig               |   1 +
 configs/q8_a23_tablet_800x480_defconfig       |   1 +
 configs/q8_a33_tablet_1024x600_defconfig      |   1 +
 configs/q8_a33_tablet_800x480_defconfig       |   1 +
 configs/qemu-x86_64_defconfig                 |   1 +
 configs/qemu-x86_defconfig                    |   1 +
 configs/qemu_arm64_defconfig                  |   2 +
 configs/qemu_arm_defconfig                    |   2 +
 configs/r7-tv-dongle_defconfig                |   1 +
 configs/rastaban_defconfig                    |   1 +
 configs/rock2_defconfig                       |   2 +-
 configs/rock_defconfig                        |   1 +
 configs/rpi_0_w_defconfig                     |   2 +
 configs/rpi_2_defconfig                       |   2 +
 configs/rpi_3_32b_defconfig                   |   2 +
 configs/rpi_3_b_plus_defconfig                |   4 +-
 configs/rpi_3_defconfig                       |   2 +
 configs/rpi_defconfig                         |   2 +
 configs/rut_defconfig                         |   1 +
 configs/seaboard_defconfig                    |   2 +
 configs/sheevaplug_defconfig                  |   1 +
 configs/snow_defconfig                        |   2 +
 configs/socfpga_dbm_soc1_defconfig            |   2 +
 configs/socfpga_vining_fpga_defconfig         |   2 +
 configs/socrates_defconfig                    |   2 +
 configs/som-db5800-som-6867_defconfig         |   1 +
 configs/sopine_baseboard_defconfig            |   1 +
 configs/strider_con_defconfig                 |   1 +
 configs/strider_con_dp_defconfig              |   1 +
 configs/strider_cpu_defconfig                 |   1 +
 configs/strider_cpu_dp_defconfig              |   1 +
 configs/sun8i_a23_evb_defconfig               |   1 +
 configs/sunxi_Gemei_G9_defconfig              |   1 +
 configs/syzygy_hub_defconfig                  |   1 +
 configs/tbs2910_defconfig                     |   2 +
 configs/tbs_a711_defconfig                    |   1 +
 configs/teres_i_defconfig                     |   1 +
 ...able-x86-conga-qa3-e3845-pcie-x4_defconfig |   2 +
 .../theadorable-x86-conga-qa3-e3845_defconfig |   2 +
 configs/theadorable-x86-dfi-bt700_defconfig   |   2 +
 configs/theadorable_debug_defconfig           |   1 +
 configs/thuban_defconfig                      |   1 +
 configs/tinker-rk3288_defconfig               |   2 +-
 configs/topic_miami_defconfig                 |   1 +
 configs/topic_miamilite_defconfig             |   1 +
 configs/topic_miamiplus_defconfig             |   1 +
 configs/turris_mox_defconfig                  |   1 +
 configs/turris_omnia_defconfig                |   1 +
 configs/uDPU_defconfig                        |   1 +
 configs/ventana_defconfig                     |   2 +
 configs/vyasa-rk3288_defconfig                |   2 +-
 configs/xpedite517x_defconfig                 |   1 +
 configs/xpedite520x_defconfig                 |   1 +
 configs/xpedite537x_defconfig                 |   1 +
 configs/xpedite550x_defconfig                 |   1 +
 configs/xtfpga_defconfig                      |   1 +
 configs/zmx25_defconfig                       |   1 +
 configs/zynq_cc108_defconfig                  |   1 +
 configs/zynq_cse_nand_defconfig               |   1 +
 configs/zynq_cse_nor_defconfig                |   1 +
 configs/zynq_cse_qspi_defconfig               |   1 +
 configs/zynq_dlc20_rev1_0_defconfig           |   1 +
 configs/zynq_microzed_defconfig               |   1 +
 configs/zynq_minized_defconfig                |   1 +
 configs/zynq_picozed_defconfig                |   1 +
 configs/zynq_z_turn_defconfig                 |   1 +
 configs/zynq_zc702_defconfig                  |   1 +
 configs/zynq_zc706_defconfig                  |   1 +
 configs/zynq_zc770_xm010_defconfig            |   1 +
 configs/zynq_zc770_xm011_defconfig            |   1 +
 configs/zynq_zc770_xm011_x16_defconfig        |   1 +
 configs/zynq_zc770_xm012_defconfig            |   1 +
 configs/zynq_zc770_xm013_defconfig            |   1 +
 configs/zynq_zed_defconfig                    |   1 +
 configs/zynq_zybo_defconfig                   |   1 +
 configs/zynq_zybo_z7_defconfig                |   1 +
 doc/README.autoboot                           |  23 +++
 doc/README.bootmenu                           |   2 +-
 doc/README.menu                               |   2 +-
 include/autoboot.h                            |   2 +-
 include/configs/MPC8349EMDS.h                 |   4 -
 include/configs/MPC8349EMDS_SDRAM.h           |   4 -
 include/configs/MigoR.h                       |   1 -
 include/configs/TQM834x.h                     |   4 -
 include/configs/am335x_shc.h                  |   2 -
 include/configs/am3517_crane.h                |   9 -
 include/configs/am3517_evm.h                  |  12 --
 include/configs/apf27.h                       |   1 -
 include/configs/armadillo-800eva.h            |   2 -
 include/configs/arndale.h                     |   2 -
 include/configs/bcmstb.h                      |   4 -
 include/configs/bk4r1.h                       |   1 -
 include/configs/bur_cfg_common.h              |   2 -
 include/configs/cm_fx6.h                      |   2 -
 include/configs/conga-qeval20-qa3-e3845.h     |   2 -
 include/configs/controlcenterdc.h             |   2 -
 include/configs/dfi-bt700.h                   |   2 -
 include/configs/ds414.h                       |   2 -
 include/configs/gazerbeam.h                   |   2 -
 include/configs/gw_ventana.h                  |   1 -
 include/configs/hrcon.h                       |   2 -
 include/configs/ids8313.h                     |   3 -
 include/configs/kzm9g.h                       |   2 -
 include/configs/lsxl.h                        |   1 -
 include/configs/m53menlo.h                    |   1 -
 include/configs/meesc.h                       |   2 -
 include/configs/meson64.h                     |   1 -
 include/configs/microblaze-generic.h          |   2 -
 include/configs/mv-common.h                   |   1 -
 include/configs/mvebu_armada-37xx.h           |   1 -
 include/configs/mvebu_armada-8k.h             |   1 -
 include/configs/mx51evk.h                     |   1 -
 include/configs/mx53cx9020.h                  |   1 -
 include/configs/mx53loco.h                    |   1 -
 include/configs/mx6cuboxi.h                   |  11 --
 include/configs/nitrogen6x.h                  |   2 -
 include/configs/nokia_rx51.h                  |  26 ---
 include/configs/omap3_beagle.h                |   2 -
 include/configs/omap3_logic.h                 |   4 -
 include/configs/opos6uldev.h                  |   1 -
 include/configs/ot1200.h                      |   2 -
 include/configs/platinum.h                    |   1 -
 include/configs/qemu-arm.h                    |   1 -
 include/configs/qemu-riscv.h                  |   4 -
 include/configs/rcar-gen2-common.h            |   2 -
 include/configs/rcar-gen3-common.h            |   2 -
 include/configs/rk3036_common.h               |   2 -
 include/configs/rk3188_common.h               |   2 -
 include/configs/rk322x_common.h               |   2 -
 include/configs/rk3288_common.h               |   2 -
 include/configs/rpi.h                         |   1 -
 include/configs/sbc8548.h                     |   2 -
 include/configs/sh7752evb.h                   |   1 -
 include/configs/sh7753evb.h                   |   1 -
 include/configs/sh7757lcr.h                   |   1 -
 include/configs/sh7763rdp.h                   |   1 -
 include/configs/siemens-am33x-common.h        |   1 -
 include/configs/socfpga_dbm_soc1.h            |   1 -
 include/configs/socfpga_mcvevk.h              |   1 -
 include/configs/socfpga_vining_fpga.h         |  10 --
 include/configs/socrates.h                    |   5 -
 include/configs/strider.h                     |   2 -
 include/configs/sunxi-common.h                |   4 -
 include/configs/tbs2910.h                     |   9 -
 include/configs/tegra-common-post.h           |   1 -
 include/configs/theadorable-x86-common.h      |   2 -
 include/configs/theadorable.h                 |   2 -
 include/configs/topic_miami.h                 |   2 -
 include/configs/turris_mox.h                  |   1 -
 include/configs/vexpress_aemv8a.h             |   2 -
 include/configs/x86-common.h                  |   1 -
 include/configs/xpedite517x.h                 |   1 -
 include/configs/xpedite520x.h                 |   1 -
 include/configs/xpedite537x.h                 |   1 -
 include/configs/xpedite550x.h                 |   1 -
 include/configs/xtfpga.h                      |   1 -
 include/configs/zmx25.h                       |   2 -
 include/configs/zynq-common.h                 |   1 -
 include/menu.h                                |  17 +-
 scripts/config_whitelist.txt                  |   5 +-
 431 files changed, 709 insertions(+), 458 deletions(-)

Comments

Lukasz Majewski July 23, 2019, 10 p.m. UTC | #1
Hi Simon,

> This series cleans up autoboot.c a bit to:
> 
> - Convert options to Kconfig
> - Use C code instead of C preprocessor where possible
> - Add a few comments
> 

Thanks Simon for this clean up series.

Reviewed-by: Lukasz Majewski <lukma@denx.de>

> Changes in v2:
> - Rebase to master
> 
> Simon Glass (18):
>   main: Use conditional run_preboot_environment_command()
>   Convert CONFIG_SHOW_BOOT_PROGRESS to Kconfig
>   Add CONFIG_USE_PREBOOT to boards that use CONFIG_PREBOOT
>   Convert CONFIG_USE_PREBOOT and CONFIG_PREBOOT to Kconfig
>   autoboot: Use CONFIG_AUTOBOOT_STOP_STR_SHA256 indirectly
>   autoboot: Drop #ifdef for CONFIG_AUTOBOOT_ENCRYPTION
>   autoboot: Improve docs for CONFIG_AUTOBOOT_ENCRYPTION
>   autoboot: Use if() for CONFIG_SILENT_CONSOLE
>   autoboot: Drop #ifdef CONFIG_AUTOBOOT_KEYED
>   autoboot: Drop unused CONFIG_MENUPROMPT
>   autoboot: Rename CONFIG_MENUKEY to CONFIG_AUTOBOOT_MENUKEY
>   snow: Define CONFIG_AUTOBOOT_MENUKEY
>   autoboot: Tidy up use of menukey
>   autoboot: Rename CONFIG_MENU_SHOW to include AUTOBOOT
>   Convert CONFIG_AUTOBOOT_MENU_SHOW to Kconfig
>   autoboot: Add comments for menu_show()
>   autoboot: Move a few more options from #ifdef to if()
>   autoboot: Adjust the implementation in autoboot_command()
> 
>  README                                        | 167
> +----------------- cmd/Kconfig                                   |
> 34 +++- cmd/bootmenu.c                                |   2 +-
>  common/Kconfig                                | 162 +++++++++++++++++
>  common/autoboot.c                             | 121 +++++++------
>  common/main.c                                 |   5 +-
>  configs/A10-OLinuXino-Lime_defconfig          |   1 +
>  configs/A10s-OLinuXino-M_defconfig            |   1 +
>  configs/A13-OLinuXinoM_defconfig              |   1 +
>  configs/A13-OLinuXino_defconfig               |   1 +
>  configs/A20-OLinuXino-Lime2-eMMC_defconfig    |   1 +
>  configs/A20-OLinuXino-Lime2_defconfig         |   1 +
>  configs/A20-OLinuXino-Lime_defconfig          |   1 +
>  configs/A20-OLinuXino_MICRO-eMMC_defconfig    |   1 +
>  configs/A20-OLinuXino_MICRO_defconfig         |   1 +
>  configs/A20-Olimex-SOM-EVB_defconfig          |   1 +
>  configs/A20-Olimex-SOM204-EVB-eMMC_defconfig  |   1 +
>  configs/A20-Olimex-SOM204-EVB_defconfig       |   1 +
>  configs/A33-OLinuXino_defconfig               |   1 +
>  configs/Ainol_AW1_defconfig                   |   1 +
>  configs/Ampe_A76_defconfig                    |   1 +
>  configs/Auxtek-T003_defconfig                 |   1 +
>  configs/Auxtek-T004_defconfig                 |   1 +
>  configs/Bananapi_M2_Ultra_defconfig           |   1 +
>  configs/Bananapi_defconfig                    |   1 +
>  configs/Bananapi_m2m_defconfig                |   1 +
>  configs/Bananapro_defconfig                   |   1 +
>  configs/CHIP_defconfig                        |   1 +
>  configs/CHIP_pro_defconfig                    |   1 +
>  configs/CSQ_CS908_defconfig                   |   1 +
>  configs/Chuwi_V7_CW0825_defconfig             |   1 +
>  configs/Colombus_defconfig                    |   1 +
>  configs/Cubieboard2_defconfig                 |   1 +
>  configs/Cubieboard4_defconfig                 |   1 +
>  configs/Cubieboard_defconfig                  |   1 +
>  configs/Cubietruck_defconfig                  |   1 +
>  configs/Cubietruck_plus_defconfig             |   1 +
>  configs/Empire_electronix_d709_defconfig      |   1 +
>  configs/Empire_electronix_m712_defconfig      |   1 +
>  configs/Hummingbird_A31_defconfig             |   1 +
>  configs/Hyundai_A7HD_defconfig                |   1 +
>  configs/Itead_Ibox_A20_defconfig              |   1 +
>  configs/Lamobo_R1_defconfig                   |   1 +
>  configs/LicheePi_Zero_defconfig               |   1 +
>  configs/Linksprite_pcDuino3_Nano_defconfig    |   1 +
>  configs/Linksprite_pcDuino3_defconfig         |   1 +
>  configs/Linksprite_pcDuino_defconfig          |   1 +
>  configs/MK808C_defconfig                      |   1 +
>  configs/MPC8349EMDS_PCI64_defconfig           |   2 +
>  configs/MPC8349EMDS_SLAVE_defconfig           |   2 +
>  configs/MPC8349EMDS_defconfig                 |   2 +
>  configs/MSI_Primo73_defconfig                 |   1 +
>  configs/MSI_Primo81_defconfig                 |   1 +
>  configs/Marsboard_A10_defconfig               |   1 +
>  configs/Mele_A1000G_quad_defconfig            |   1 +
>  configs/Mele_A1000_defconfig                  |   1 +
>  configs/Mele_I7_defconfig                     |   1 +
>  configs/Mele_M3_defconfig                     |   1 +
>  configs/Mele_M5_defconfig                     |   1 +
>  configs/Mele_M9_defconfig                     |   1 +
>  configs/Merrii_A80_Optimus_defconfig          |   1 +
>  configs/Mini-X_defconfig                      |   1 +
>  .../Nintendo_NES_Classic_Edition_defconfig    |   1 +
>  configs/Orangepi_defconfig                    |   1 +
>  configs/Orangepi_mini_defconfig               |   1 +
>  configs/Sinlinx_SinA31s_defconfig             |   1 +
>  configs/Sinlinx_SinA33_defconfig              |   1 +
>  configs/Sinovoip_BPI_M2_defconfig             |   1 +
>  configs/Sinovoip_BPI_M3_defconfig             |   1 +
>  configs/Sunchip_CX-A99_defconfig              |   1 +
>  configs/TQM834x_defconfig                     |   2 +
>  configs/UTOO_P66_defconfig                    |   1 +
>  configs/Wexler_TAB7200_defconfig              |   1 +
>  configs/Wits_Pro_A20_DKT_defconfig            |   1 +
>  configs/Wobo_i5_defconfig                     |   1 +
>  configs/Yones_Toptech_BD1078_defconfig        |   1 +
>  configs/Yones_Toptech_BS1078_V2_defconfig     |   1 +
>  configs/a64-olinuxino_defconfig               |   1 +
>  configs/am335x_shc_defconfig                  |   1 +
>  configs/am335x_shc_ict_defconfig              |   1 +
>  configs/am335x_shc_netboot_defconfig          |   1 +
>  configs/am335x_shc_sdboot_defconfig           |   1 +
>  configs/amarula_a64_relic_defconfig           |   1 +
>  configs/apf27_defconfig                       |   2 +
>  configs/arndale_defconfig                     |   1 +
>  configs/aspenite_defconfig                    |   1 +
>  configs/ba10_tv_box_defconfig                 |   1 +
>  configs/bananapi_m1_plus_defconfig            |   1 +
>  configs/bananapi_m2_berry_defconfig           |   1 +
>  configs/bananapi_m2_plus_h3_defconfig         |   1 +
>  configs/bananapi_m2_plus_h5_defconfig         |   1 +
>  configs/bananapi_m2_zero_defconfig            |   1 +
>  configs/bananapi_m64_defconfig                |   1 +
>  configs/bayleybay_defconfig                   |   1 +
>  configs/bcm7260_defconfig                     |   2 +
>  configs/bcm7445_defconfig                     |   2 +
>  configs/beelink_gs1_defconfig                 |   1 +
>  configs/beelink_x2_defconfig                  |   5 +-
>  configs/bitmain_antminer_s9_defconfig         |   1 +
>  configs/bk4r1_defconfig                       |   1 +
>  configs/brppt1_mmc_defconfig                  |   2 +
>  configs/brppt1_nand_defconfig                 |   2 +
>  configs/brppt1_spi_defconfig                  |   4 +-
>  configs/brxre1_defconfig                      |   2 +
>  configs/cherryhill_defconfig                  |   1 +
>  configs/chromebit_mickey_defconfig            |   2 +-
>  configs/chromebook_jerry_defconfig            |   2 +-
>  configs/chromebook_link64_defconfig           |   1 +
>  configs/chromebook_link_defconfig             |   1 +
>  configs/chromebook_minnie_defconfig           |   2 +-
>  configs/chromebook_samus_defconfig            |   1 +
>  configs/chromebook_samus_tpl_defconfig        |   1 +
>  configs/chromebook_speedy_defconfig           |   2 +-
>  configs/chromebox_panther_defconfig           |   1 +
>  configs/clearfog_defconfig                    |   1 +
>  configs/clearfog_gt_8k_defconfig              |   1 +
>  configs/cm_fx6_defconfig                      |   2 +
>  configs/colorfly_e708_q1_defconfig            |   1 +
>  ...-qeval20-qa3-e3845-internal-uart_defconfig |   2 +
>  configs/conga-qeval20-qa3-e3845_defconfig     |   2 +
>  configs/controlcenterdc_defconfig             |   1 +
>  configs/coreboot_defconfig                    |   1 +
>  configs/cougarcanyon2_defconfig               |   1 +
>  configs/crownbay_defconfig                    |   1 +
>  configs/crs305-1g-4s_defconfig                |   3 +-
>  configs/d2net_v2_defconfig                    |   1 +
>  configs/db-88f6720_defconfig                  |   1 +
>  configs/db-88f6820-amc_defconfig              |   1 +
>  configs/db-88f6820-gp_defconfig               |   1 +
>  configs/db-mv784mp-gp_defconfig               |   1 +
>  configs/db-xc3-24g4xg_defconfig               |   1 +
>  configs/dfi-bt700-q7x-151_defconfig           |   2 +
>  configs/difrnce_dit4350_defconfig             |   1 +
>  configs/dns325_defconfig                      |   1 +
>  configs/dockstar_defconfig                    |   1 +
>  configs/draco_defconfig                       |   1 +
>  configs/dreamplug_defconfig                   |   1 +
>  configs/ds109_defconfig                       |   1 +
>  configs/ds414_defconfig                       |   2 +
>  configs/dserve_dsrv9703c_defconfig            |   1 +
>  configs/efi-x86_app_defconfig                 |   1 +
>  configs/efi-x86_payload32_defconfig           |   1 +
>  configs/efi-x86_payload64_defconfig           |   1 +
>  configs/emlid_neutis_n5_devboard_defconfig    |   1 +
>  configs/etamin_defconfig                      |   1 +
>  configs/evb-rk3036_defconfig                  |   1 +
>  configs/evb-rk3229_defconfig                  |   3 +-
>  configs/evb-rk3288_defconfig                  |   2 +-
>  configs/fennec-rk3288_defconfig               |   2 +-
>  configs/firefly-rk3288_defconfig              |   2 +-
>  configs/ga10h_v1_1_defconfig                  |   1 +
>  configs/galileo_defconfig                     |   1 +
>  configs/goflexhome_defconfig                  |   1 +
>  configs/gplugd_defconfig                      |   1 +
>  configs/gt90h_v4_defconfig                    |   1 +
>  configs/guruplug_defconfig                    |   1 +
>  configs/gwventana_emmc_defconfig              |   1 +
>  configs/gwventana_gw5904_defconfig            |   1 +
>  configs/gwventana_nand_defconfig              |   1 +
>  configs/h8_homlet_v2_defconfig                |   1 +
>  configs/helios4_defconfig                     |   1 +
>  configs/hrcon_defconfig                       |   1 +
>  configs/hrcon_dh_defconfig                    |   1 +
>  configs/i12-tvbox_defconfig                   |   1 +
>  configs/iNet_3F_defconfig                     |   1 +
>  configs/iNet_3W_defconfig                     |   1 +
>  configs/iNet_86VS_defconfig                   |   1 +
>  configs/iNet_D978_rev2_defconfig              |   1 +
>  configs/ib62x0_defconfig                      |   1 +
>  configs/icnova-a20-swac_defconfig             |   1 +
>  configs/iconnect_defconfig                    |   1 +
>  configs/ids8313_defconfig                     |   2 +
>  configs/inet1_defconfig                       |   1 +
>  configs/inet86dz_defconfig                    |   1 +
>  configs/inet97fv2_defconfig                   |   1 +
>  configs/inet98v_rev2_defconfig                |   1 +
>  configs/inet9f_rev03_defconfig                |   1 +
>  configs/inet_q972_defconfig                   |   1 +
>  configs/inetspace_v2_defconfig                |   1 +
>  configs/jesurun_q5_defconfig                  |   1 +
>  configs/kylin-rk3036_defconfig                |   1 +
>  configs/libretech-ac_defconfig                |   2 +
>  configs/libretech_all_h3_cc_h2_plus_defconfig |   1 +
>  configs/libretech_all_h3_cc_h3_defconfig      |   1 +
>  configs/libretech_all_h3_cc_h5_defconfig      |   1 +
>  configs/lschlv2_defconfig                     |   2 +
>  configs/lsxhl_defconfig                       |   2 +
>  configs/m53menlo_defconfig                    |   2 +
>  configs/maxbcm_defconfig                      |   1 +
>  configs/meesc_dataflash_defconfig             |   3 +-
>  configs/meesc_defconfig                       |   1 +
>  configs/microblaze-generic_defconfig          |   2 +
>  configs/minnowmax_defconfig                   |   1 +
>  configs/miqi-rk3288_defconfig                 |   2 +-
>  configs/mixtile_loftq_defconfig               |   1 +
>  configs/mk802_a10s_defconfig                  |   1 +
>  configs/mk802_defconfig                       |   1 +
>  configs/mk802ii_defconfig                     |   1 +
>  configs/mvebu_db-88f3720_defconfig            |   1 +
>  configs/mvebu_db_armada8k_defconfig           |   1 +
>  configs/mvebu_espressobin-88f3720_defconfig   |   1 +
>  configs/mvebu_mcbin-88f8040_defconfig         |   1 +
>  configs/mx51evk_defconfig                     |   1 +
>  configs/mx53cx9020_defconfig                  |   1 +
>  configs/mx53loco_defconfig                    |   1 +
>  configs/mx6cuboxi_defconfig                   |   2 +
>  configs/mx6qsabrelite_defconfig               |   1 +
>  configs/nanopi_a64_defconfig                  |   1 +
>  configs/nanopi_m1_defconfig                   |   1 +
>  configs/nanopi_m1_plus_defconfig              |   1 +
>  configs/nanopi_neo2_defconfig                 |   1 +
>  configs/nanopi_neo_air_defconfig              |   1 +
>  configs/nanopi_neo_defconfig                  |   1 +
>  configs/nanopi_neo_plus2_defconfig            |   1 +
>  configs/nas220_defconfig                      |   1 +
>  configs/net2big_v2_defconfig                  |   1 +
>  configs/netspace_lite_v2_defconfig            |   1 +
>  configs/netspace_max_v2_defconfig             |   1 +
>  configs/netspace_mini_v2_defconfig            |   1 +
>  configs/netspace_v2_defconfig                 |   1 +
>  configs/nitrogen6dl2g_defconfig               |   1 +
>  configs/nitrogen6dl_defconfig                 |   1 +
>  configs/nitrogen6q2g_defconfig                |   1 +
>  configs/nitrogen6q_defconfig                  |   1 +
>  configs/nitrogen6s1g_defconfig                |   1 +
>  configs/nitrogen6s_defconfig                  |   1 +
>  configs/nokia_rx51_defconfig                  |   3 +
>  configs/nsa310s_defconfig                     |   1 +
>  configs/oceanic_5205_5inmfd_defconfig         |   1 +
>  configs/omap35_logic_defconfig                |   2 +
>  configs/omap35_logic_somlv_defconfig          |   2 +
>  configs/omap3_beagle_defconfig                |   2 +
>  configs/omap3_evm_defconfig                   |   1 +
>  configs/omap3_logic_defconfig                 |   2 +
>  configs/omap3_logic_somlv_defconfig           |   2 +
>  configs/openrd_base_defconfig                 |   1 +
>  configs/openrd_client_defconfig               |   1 +
>  configs/openrd_ultimate_defconfig             |   1 +
>  configs/opos6uldev_defconfig                  |   2 +
>  configs/orangepi_2_defconfig                  |   1 +
>  configs/orangepi_lite2_defconfig              |   1 +
>  configs/orangepi_lite_defconfig               |   1 +
>  configs/orangepi_one_defconfig                |   1 +
>  configs/orangepi_one_plus_defconfig           |   1 +
>  configs/orangepi_pc2_defconfig                |   1 +
>  configs/orangepi_pc_defconfig                 |   1 +
>  configs/orangepi_pc_plus_defconfig            |   1 +
>  configs/orangepi_plus2e_defconfig             |   1 +
>  configs/orangepi_plus_defconfig               |   1 +
>  configs/orangepi_prime_defconfig              |   1 +
>  configs/orangepi_r1_defconfig                 |   1 +
>  configs/orangepi_win_defconfig                |   1 +
>  configs/orangepi_zero_defconfig               |   1 +
>  configs/orangepi_zero_plus2_defconfig         |   1 +
>  configs/orangepi_zero_plus_defconfig          |   1 +
>  configs/ot1200_defconfig                      |   1 +
>  configs/ot1200_spl_defconfig                  |   1 +
>  configs/parrot_r16_defconfig                  |   1 +
>  configs/phycore-rk3288_defconfig              |   2 +-
>  configs/pine64-lts_defconfig                  |   1 +
>  configs/pine64_plus_defconfig                 |   1 +
>  configs/pine_h64_defconfig                    |   3 +-
>  configs/pinebook_defconfig                    |   1 +
>  configs/platinum_picon_defconfig              |   1 +
>  configs/platinum_titanium_defconfig           |   1 +
>  configs/pogo_e02_defconfig                    |   1 +
>  configs/polaroid_mid2407pxe03_defconfig       |   1 +
>  configs/polaroid_mid2809pxe04_defconfig       |   1 +
>  configs/popmetal-rk3288_defconfig             |   2 +-
>  configs/pov_protab2_ips9_defconfig            |   1 +
>  configs/pxm2_defconfig                        |   1 +
>  configs/q8_a13_tablet_defconfig               |   1 +
>  configs/q8_a23_tablet_800x480_defconfig       |   1 +
>  configs/q8_a33_tablet_1024x600_defconfig      |   1 +
>  configs/q8_a33_tablet_800x480_defconfig       |   1 +
>  configs/qemu-x86_64_defconfig                 |   1 +
>  configs/qemu-x86_defconfig                    |   1 +
>  configs/qemu_arm64_defconfig                  |   2 +
>  configs/qemu_arm_defconfig                    |   2 +
>  configs/r7-tv-dongle_defconfig                |   1 +
>  configs/rastaban_defconfig                    |   1 +
>  configs/rock2_defconfig                       |   2 +-
>  configs/rock_defconfig                        |   1 +
>  configs/rpi_0_w_defconfig                     |   2 +
>  configs/rpi_2_defconfig                       |   2 +
>  configs/rpi_3_32b_defconfig                   |   2 +
>  configs/rpi_3_b_plus_defconfig                |   4 +-
>  configs/rpi_3_defconfig                       |   2 +
>  configs/rpi_defconfig                         |   2 +
>  configs/rut_defconfig                         |   1 +
>  configs/seaboard_defconfig                    |   2 +
>  configs/sheevaplug_defconfig                  |   1 +
>  configs/snow_defconfig                        |   2 +
>  configs/socfpga_dbm_soc1_defconfig            |   2 +
>  configs/socfpga_vining_fpga_defconfig         |   2 +
>  configs/socrates_defconfig                    |   2 +
>  configs/som-db5800-som-6867_defconfig         |   1 +
>  configs/sopine_baseboard_defconfig            |   1 +
>  configs/strider_con_defconfig                 |   1 +
>  configs/strider_con_dp_defconfig              |   1 +
>  configs/strider_cpu_defconfig                 |   1 +
>  configs/strider_cpu_dp_defconfig              |   1 +
>  configs/sun8i_a23_evb_defconfig               |   1 +
>  configs/sunxi_Gemei_G9_defconfig              |   1 +
>  configs/syzygy_hub_defconfig                  |   1 +
>  configs/tbs2910_defconfig                     |   2 +
>  configs/tbs_a711_defconfig                    |   1 +
>  configs/teres_i_defconfig                     |   1 +
>  ...able-x86-conga-qa3-e3845-pcie-x4_defconfig |   2 +
>  .../theadorable-x86-conga-qa3-e3845_defconfig |   2 +
>  configs/theadorable-x86-dfi-bt700_defconfig   |   2 +
>  configs/theadorable_debug_defconfig           |   1 +
>  configs/thuban_defconfig                      |   1 +
>  configs/tinker-rk3288_defconfig               |   2 +-
>  configs/topic_miami_defconfig                 |   1 +
>  configs/topic_miamilite_defconfig             |   1 +
>  configs/topic_miamiplus_defconfig             |   1 +
>  configs/turris_mox_defconfig                  |   1 +
>  configs/turris_omnia_defconfig                |   1 +
>  configs/uDPU_defconfig                        |   1 +
>  configs/ventana_defconfig                     |   2 +
>  configs/vyasa-rk3288_defconfig                |   2 +-
>  configs/xpedite517x_defconfig                 |   1 +
>  configs/xpedite520x_defconfig                 |   1 +
>  configs/xpedite537x_defconfig                 |   1 +
>  configs/xpedite550x_defconfig                 |   1 +
>  configs/xtfpga_defconfig                      |   1 +
>  configs/zmx25_defconfig                       |   1 +
>  configs/zynq_cc108_defconfig                  |   1 +
>  configs/zynq_cse_nand_defconfig               |   1 +
>  configs/zynq_cse_nor_defconfig                |   1 +
>  configs/zynq_cse_qspi_defconfig               |   1 +
>  configs/zynq_dlc20_rev1_0_defconfig           |   1 +
>  configs/zynq_microzed_defconfig               |   1 +
>  configs/zynq_minized_defconfig                |   1 +
>  configs/zynq_picozed_defconfig                |   1 +
>  configs/zynq_z_turn_defconfig                 |   1 +
>  configs/zynq_zc702_defconfig                  |   1 +
>  configs/zynq_zc706_defconfig                  |   1 +
>  configs/zynq_zc770_xm010_defconfig            |   1 +
>  configs/zynq_zc770_xm011_defconfig            |   1 +
>  configs/zynq_zc770_xm011_x16_defconfig        |   1 +
>  configs/zynq_zc770_xm012_defconfig            |   1 +
>  configs/zynq_zc770_xm013_defconfig            |   1 +
>  configs/zynq_zed_defconfig                    |   1 +
>  configs/zynq_zybo_defconfig                   |   1 +
>  configs/zynq_zybo_z7_defconfig                |   1 +
>  doc/README.autoboot                           |  23 +++
>  doc/README.bootmenu                           |   2 +-
>  doc/README.menu                               |   2 +-
>  include/autoboot.h                            |   2 +-
>  include/configs/MPC8349EMDS.h                 |   4 -
>  include/configs/MPC8349EMDS_SDRAM.h           |   4 -
>  include/configs/MigoR.h                       |   1 -
>  include/configs/TQM834x.h                     |   4 -
>  include/configs/am335x_shc.h                  |   2 -
>  include/configs/am3517_crane.h                |   9 -
>  include/configs/am3517_evm.h                  |  12 --
>  include/configs/apf27.h                       |   1 -
>  include/configs/armadillo-800eva.h            |   2 -
>  include/configs/arndale.h                     |   2 -
>  include/configs/bcmstb.h                      |   4 -
>  include/configs/bk4r1.h                       |   1 -
>  include/configs/bur_cfg_common.h              |   2 -
>  include/configs/cm_fx6.h                      |   2 -
>  include/configs/conga-qeval20-qa3-e3845.h     |   2 -
>  include/configs/controlcenterdc.h             |   2 -
>  include/configs/dfi-bt700.h                   |   2 -
>  include/configs/ds414.h                       |   2 -
>  include/configs/gazerbeam.h                   |   2 -
>  include/configs/gw_ventana.h                  |   1 -
>  include/configs/hrcon.h                       |   2 -
>  include/configs/ids8313.h                     |   3 -
>  include/configs/kzm9g.h                       |   2 -
>  include/configs/lsxl.h                        |   1 -
>  include/configs/m53menlo.h                    |   1 -
>  include/configs/meesc.h                       |   2 -
>  include/configs/meson64.h                     |   1 -
>  include/configs/microblaze-generic.h          |   2 -
>  include/configs/mv-common.h                   |   1 -
>  include/configs/mvebu_armada-37xx.h           |   1 -
>  include/configs/mvebu_armada-8k.h             |   1 -
>  include/configs/mx51evk.h                     |   1 -
>  include/configs/mx53cx9020.h                  |   1 -
>  include/configs/mx53loco.h                    |   1 -
>  include/configs/mx6cuboxi.h                   |  11 --
>  include/configs/nitrogen6x.h                  |   2 -
>  include/configs/nokia_rx51.h                  |  26 ---
>  include/configs/omap3_beagle.h                |   2 -
>  include/configs/omap3_logic.h                 |   4 -
>  include/configs/opos6uldev.h                  |   1 -
>  include/configs/ot1200.h                      |   2 -
>  include/configs/platinum.h                    |   1 -
>  include/configs/qemu-arm.h                    |   1 -
>  include/configs/qemu-riscv.h                  |   4 -
>  include/configs/rcar-gen2-common.h            |   2 -
>  include/configs/rcar-gen3-common.h            |   2 -
>  include/configs/rk3036_common.h               |   2 -
>  include/configs/rk3188_common.h               |   2 -
>  include/configs/rk322x_common.h               |   2 -
>  include/configs/rk3288_common.h               |   2 -
>  include/configs/rpi.h                         |   1 -
>  include/configs/sbc8548.h                     |   2 -
>  include/configs/sh7752evb.h                   |   1 -
>  include/configs/sh7753evb.h                   |   1 -
>  include/configs/sh7757lcr.h                   |   1 -
>  include/configs/sh7763rdp.h                   |   1 -
>  include/configs/siemens-am33x-common.h        |   1 -
>  include/configs/socfpga_dbm_soc1.h            |   1 -
>  include/configs/socfpga_mcvevk.h              |   1 -
>  include/configs/socfpga_vining_fpga.h         |  10 --
>  include/configs/socrates.h                    |   5 -
>  include/configs/strider.h                     |   2 -
>  include/configs/sunxi-common.h                |   4 -
>  include/configs/tbs2910.h                     |   9 -
>  include/configs/tegra-common-post.h           |   1 -
>  include/configs/theadorable-x86-common.h      |   2 -
>  include/configs/theadorable.h                 |   2 -
>  include/configs/topic_miami.h                 |   2 -
>  include/configs/turris_mox.h                  |   1 -
>  include/configs/vexpress_aemv8a.h             |   2 -
>  include/configs/x86-common.h                  |   1 -
>  include/configs/xpedite517x.h                 |   1 -
>  include/configs/xpedite520x.h                 |   1 -
>  include/configs/xpedite537x.h                 |   1 -
>  include/configs/xpedite550x.h                 |   1 -
>  include/configs/xtfpga.h                      |   1 -
>  include/configs/zmx25.h                       |   2 -
>  include/configs/zynq-common.h                 |   1 -
>  include/menu.h                                |  17 +-
>  scripts/config_whitelist.txt                  |   5 +-
>  431 files changed, 709 insertions(+), 458 deletions(-)
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Tom Rini Aug. 2, 2019, 10:06 p.m. UTC | #2
On Sat, Jul 20, 2019 at 08:51:10PM -0600, Simon Glass wrote:

> This series cleans up autoboot.c a bit to:
> 
> - Convert options to Kconfig
> - Use C code instead of C preprocessor where possible
> - Add a few comments
> 
> Changes in v2:
> - Rebase to master
> 
> Simon Glass (18):
>   main: Use conditional run_preboot_environment_command()
>   Convert CONFIG_SHOW_BOOT_PROGRESS to Kconfig
>   Add CONFIG_USE_PREBOOT to boards that use CONFIG_PREBOOT
>   Convert CONFIG_USE_PREBOOT and CONFIG_PREBOOT to Kconfig
>   autoboot: Use CONFIG_AUTOBOOT_STOP_STR_SHA256 indirectly
>   autoboot: Drop #ifdef for CONFIG_AUTOBOOT_ENCRYPTION
>   autoboot: Improve docs for CONFIG_AUTOBOOT_ENCRYPTION
>   autoboot: Use if() for CONFIG_SILENT_CONSOLE
>   autoboot: Drop #ifdef CONFIG_AUTOBOOT_KEYED
>   autoboot: Drop unused CONFIG_MENUPROMPT
>   autoboot: Rename CONFIG_MENUKEY to CONFIG_AUTOBOOT_MENUKEY
>   snow: Define CONFIG_AUTOBOOT_MENUKEY
>   autoboot: Tidy up use of menukey
>   autoboot: Rename CONFIG_MENU_SHOW to include AUTOBOOT
>   Convert CONFIG_AUTOBOOT_MENU_SHOW to Kconfig
>   autoboot: Add comments for menu_show()
>   autoboot: Move a few more options from #ifdef to if()
>   autoboot: Adjust the implementation in autoboot_command()

For the series, applied to u-boot/master, thanks!