mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 02:15:45 +01:00 
			
		
		
		
	Create a new boot/ directory
Quite a lot of the code in common/relates to booting and images. Before adding more it seems like a good time to move the code into its own directory. Most files with 'boot' or 'image' in them are moved, except: - autoboot.c which relates to U-Boot automatically running a script - bootstage.c which relates to U-Boot timing Drop the removal of boot* files from the output directory, since this interfers with the symlinks created by tools and there does not appear to be any such file from my brief testing. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com>
This commit is contained in:
		
							
								
								
									
										2
									
								
								Kconfig
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Kconfig
									
									
									
									
									
								
							| @@ -466,6 +466,8 @@ endmenu		# General setup | |||||||
|  |  | ||||||
| source "api/Kconfig" | source "api/Kconfig" | ||||||
|  |  | ||||||
|  | source "boot/Kconfig" | ||||||
|  |  | ||||||
| source "common/Kconfig" | source "common/Kconfig" | ||||||
|  |  | ||||||
| source "cmd/Kconfig" | source "cmd/Kconfig" | ||||||
|   | |||||||
							
								
								
									
										3
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								Makefile
									
									
									
									
									
								
							| @@ -808,6 +808,7 @@ HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makef | |||||||
|  |  | ||||||
| libs-$(CONFIG_API) += api/ | libs-$(CONFIG_API) += api/ | ||||||
| libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ | libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ | ||||||
|  | libs-y += boot/ | ||||||
| libs-y += cmd/ | libs-y += cmd/ | ||||||
| libs-y += common/ | libs-y += common/ | ||||||
| libs-$(CONFIG_OF_EMBED) += dts/ | libs-$(CONFIG_OF_EMBED) += dts/ | ||||||
| @@ -2104,7 +2105,7 @@ CLEAN_DIRS  += $(MODVERDIR) \ | |||||||
| 			$(filter-out include, $(shell ls -1 $d 2>/dev/null)))) | 			$(filter-out include, $(shell ls -1 $d 2>/dev/null)))) | ||||||
|  |  | ||||||
| CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h tools/version.h \ | CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h tools/version.h \ | ||||||
| 	       boot* u-boot* MLO* SPL System.map fit-dtb.blob* \ | 	       u-boot* MLO* SPL System.map fit-dtb.blob* \ | ||||||
| 	       u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log \ | 	       u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log \ | ||||||
| 	       lpc32xx-* bl31.c bl31.elf bl31_*.bin image.map tispl.bin* \ | 	       lpc32xx-* bl31.c bl31.elf bl31_*.bin image.map tispl.bin* \ | ||||||
| 	       idbloader.img flash.bin flash.log defconfig keep-syms-lto.c | 	       idbloader.img flash.bin flash.log defconfig keep-syms-lto.c | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								README
									
									
									
									
									
								
							| @@ -144,6 +144,7 @@ Directory Hierarchy: | |||||||
|   /xtensa		Files generic to Xtensa architecture |   /xtensa		Files generic to Xtensa architecture | ||||||
| /api			Machine/arch-independent API for external apps | /api			Machine/arch-independent API for external apps | ||||||
| /board			Board-dependent files | /board			Board-dependent files | ||||||
|  | /boot			Support for images and booting | ||||||
| /cmd			U-Boot commands functions | /cmd			U-Boot commands functions | ||||||
| /common			Misc architecture-independent functions | /common			Misc architecture-independent functions | ||||||
| /configs		Board default configuration files | /configs		Board default configuration files | ||||||
|   | |||||||
							
								
								
									
										34
									
								
								boot/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								boot/Makefile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | |||||||
|  | # SPDX-License-Identifier: GPL-2.0+ | ||||||
|  | # | ||||||
|  | # (C) Copyright 2004-2006 | ||||||
|  | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | ||||||
|  |  | ||||||
|  | ifndef CONFIG_SPL_BUILD | ||||||
|  |  | ||||||
|  | # This option is not just y/n - it can have a numeric value | ||||||
|  | ifdef CONFIG_BOOT_RETRY_TIME | ||||||
|  | obj-y += bootretry.o | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | obj-$(CONFIG_CMD_BOOTM) += bootm.o bootm_os.o | ||||||
|  | obj-$(CONFIG_CMD_BOOTZ) += bootm.o bootm_os.o | ||||||
|  | obj-$(CONFIG_CMD_BOOTI) += bootm.o bootm_os.o | ||||||
|  |  | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | obj-y += image.o image-board.o | ||||||
|  | obj-$(CONFIG_ANDROID_AB) += android_ab.o | ||||||
|  | obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o image-android-dt.o | ||||||
|  | obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o | ||||||
|  | obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += fdt_region.o | ||||||
|  | obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o | ||||||
|  | obj-$(CONFIG_$(SPL_)MULTI_DTB_FIT) += boot_fit.o common_fit.o | ||||||
|  | obj-$(CONFIG_$(SPL_TPL_)IMAGE_SIGN_INFO) += image-sig.o | ||||||
|  | obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += image-fit-sig.o | ||||||
|  | obj-$(CONFIG_$(SPL_TPL_)FIT_CIPHER) += image-cipher.o | ||||||
|  |  | ||||||
|  | obj-$(CONFIG_CMD_ADTIMG) += image-android-dt.o | ||||||
|  |  | ||||||
|  | ifdef CONFIG_SPL_BUILD | ||||||
|  | obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o | ||||||
|  | endif | ||||||
| @@ -1,5 +1,3 @@ | |||||||
| source "common/Kconfig.boot" |  | ||||||
|  |  | ||||||
| menu "Console" | menu "Console" | ||||||
|  |  | ||||||
| config MENU | config MENU | ||||||
|   | |||||||
| @@ -11,21 +11,12 @@ obj-y += exports.o | |||||||
| obj-$(CONFIG_HUSH_PARSER) += cli_hush.o | obj-$(CONFIG_HUSH_PARSER) += cli_hush.o | ||||||
| obj-$(CONFIG_AUTOBOOT) += autoboot.o | obj-$(CONFIG_AUTOBOOT) += autoboot.o | ||||||
|  |  | ||||||
| # This option is not just y/n - it can have a numeric value |  | ||||||
| ifdef CONFIG_BOOT_RETRY_TIME |  | ||||||
| obj-y += bootretry.o |  | ||||||
| endif |  | ||||||
|  |  | ||||||
| # # boards | # # boards | ||||||
| obj-y += board_f.o | obj-y += board_f.o | ||||||
| obj-y += board_r.o | obj-y += board_r.o | ||||||
| obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o | obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o | ||||||
| obj-$(CONFIG_DISPLAY_BOARDINFO_LATE) += board_info.o | obj-$(CONFIG_DISPLAY_BOARDINFO_LATE) += board_info.o | ||||||
|  |  | ||||||
| obj-$(CONFIG_CMD_BOOTM) += bootm.o bootm_os.o |  | ||||||
| obj-$(CONFIG_CMD_BOOTZ) += bootm.o bootm_os.o |  | ||||||
| obj-$(CONFIG_CMD_BOOTI) += bootm.o bootm_os.o |  | ||||||
|  |  | ||||||
| obj-$(CONFIG_CMD_BEDBUG) += bedbug.o | obj-$(CONFIG_CMD_BEDBUG) += bedbug.o | ||||||
| obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o | obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o | ||||||
| obj-$(CONFIG_MII) += miiphyutil.o | obj-$(CONFIG_MII) += miiphyutil.o | ||||||
| @@ -65,7 +56,6 @@ ifdef CONFIG_SPL_BUILD | |||||||
| ifdef CONFIG_SPL_DFU | ifdef CONFIG_SPL_DFU | ||||||
| obj-$(CONFIG_DFU_OVER_USB) += dfu.o | obj-$(CONFIG_DFU_OVER_USB) += dfu.o | ||||||
| endif | endif | ||||||
| obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o |  | ||||||
| obj-$(CONFIG_SPL_NET) += miiphyutil.o | obj-$(CONFIG_SPL_NET) += miiphyutil.o | ||||||
| obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o | obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o | ||||||
|  |  | ||||||
| @@ -101,23 +91,11 @@ obj-y += malloc_simple.o | |||||||
| endif | endif | ||||||
| endif | endif | ||||||
|  |  | ||||||
| obj-y += image.o image-board.o |  | ||||||
| obj-$(CONFIG_$(SPL_TPL_)HASH) += hash.o | obj-$(CONFIG_$(SPL_TPL_)HASH) += hash.o | ||||||
| obj-$(CONFIG_ANDROID_AB) += android_ab.o |  | ||||||
| obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o image-android-dt.o |  | ||||||
| obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o |  | ||||||
| obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += fdt_region.o |  | ||||||
| obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o |  | ||||||
| obj-$(CONFIG_$(SPL_)MULTI_DTB_FIT) += boot_fit.o common_fit.o |  | ||||||
| obj-$(CONFIG_$(SPL_TPL_)IMAGE_SIGN_INFO) += image-sig.o |  | ||||||
| obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += image-fit-sig.o |  | ||||||
| obj-$(CONFIG_$(SPL_TPL_)FIT_CIPHER) += image-cipher.o |  | ||||||
| obj-$(CONFIG_IO_TRACE) += iotrace.o | obj-$(CONFIG_IO_TRACE) += iotrace.o | ||||||
| obj-y += memsize.o | obj-y += memsize.o | ||||||
| obj-y += stdio.o | obj-y += stdio.o | ||||||
|  |  | ||||||
| obj-$(CONFIG_CMD_ADTIMG) += image-android-dt.o |  | ||||||
|  |  | ||||||
| ifdef CONFIG_CMD_EEPROM_LAYOUT | ifdef CONFIG_CMD_EEPROM_LAYOUT | ||||||
| obj-y += eeprom/eeprom_field.o eeprom/eeprom_layout.o | obj-y += eeprom/eeprom_field.o eeprom/eeprom_layout.o | ||||||
| endif | endif | ||||||
|   | |||||||
| @@ -139,7 +139,7 @@ overview on the whole Android 10 boot process can be found at [8]_. | |||||||
| C API for working with Android Boot Image format | C API for working with Android Boot Image format | ||||||
| ------------------------------------------------ | ------------------------------------------------ | ||||||
|  |  | ||||||
| .. kernel-doc:: common/image-android.c | .. kernel-doc:: boot/image-android.c | ||||||
|    :internal: |    :internal: | ||||||
|  |  | ||||||
| References | References | ||||||
|   | |||||||
| @@ -92,10 +92,10 @@ libs-y += common/init/ | |||||||
|  |  | ||||||
| # Special handling for a few options which support SPL/TPL | # Special handling for a few options which support SPL/TPL | ||||||
| ifeq ($(CONFIG_TPL_BUILD),y) | ifeq ($(CONFIG_TPL_BUILD),y) | ||||||
| libs-$(CONFIG_TPL_LIBCOMMON_SUPPORT) += common/ cmd/ env/ | libs-$(CONFIG_TPL_LIBCOMMON_SUPPORT) += boot/ common/ cmd/ env/ | ||||||
| libs-$(CONFIG_TPL_LIBGENERIC_SUPPORT) += lib/ | libs-$(CONFIG_TPL_LIBGENERIC_SUPPORT) += lib/ | ||||||
| else | else | ||||||
| libs-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/ cmd/ env/ | libs-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += boot/ common/ cmd/ env/ | ||||||
| libs-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/ | libs-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/ | ||||||
| ifdef CONFIG_SPL_FRAMEWORK | ifdef CONFIG_SPL_FRAMEWORK | ||||||
| libs-$(CONFIG_PARTITIONS) += disk/ | libs-$(CONFIG_PARTITIONS) += disk/ | ||||||
|   | |||||||
| @@ -76,9 +76,9 @@ hostprogs-$(CONFIG_TOOLS_LIBCRYPTO) += fit_info fit_check_sign | |||||||
|  |  | ||||||
| hostprogs-$(CONFIG_CMD_BOOTEFI_SELFTEST) += file2include | hostprogs-$(CONFIG_CMD_BOOTEFI_SELFTEST) += file2include | ||||||
|  |  | ||||||
| FIT_OBJS-y := fit_common.o fit_image.o image-host.o common/image-fit.o | FIT_OBJS-y := fit_common.o fit_image.o image-host.o boot/image-fit.o | ||||||
| FIT_SIG_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := image-sig-host.o common/image-fit-sig.o | FIT_SIG_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := image-sig-host.o boot/image-fit-sig.o | ||||||
| FIT_CIPHER_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := common/image-cipher.o | FIT_CIPHER_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := boot/image-cipher.o | ||||||
|  |  | ||||||
| # The following files are synced with upstream DTC. | # The following files are synced with upstream DTC. | ||||||
| # Use synced versions from scripts/dtc/libfdt/. | # Use synced versions from scripts/dtc/libfdt/. | ||||||
| @@ -106,14 +106,14 @@ dumpimage-mkimage-objs := aisimage.o \ | |||||||
| 			$(FIT_OBJS-y) \ | 			$(FIT_OBJS-y) \ | ||||||
| 			$(FIT_SIG_OBJS-y) \ | 			$(FIT_SIG_OBJS-y) \ | ||||||
| 			$(FIT_CIPHER_OBJS-y) \ | 			$(FIT_CIPHER_OBJS-y) \ | ||||||
| 			common/fdt_region.o \ | 			boot/fdt_region.o \ | ||||||
| 			common/bootm.o \ | 			boot/bootm.o \ | ||||||
| 			lib/crc32.o \ | 			lib/crc32.o \ | ||||||
| 			default_image.o \ | 			default_image.o \ | ||||||
| 			lib/fdtdec_common.o \ | 			lib/fdtdec_common.o \ | ||||||
| 			lib/fdtdec.o \ | 			lib/fdtdec.o \ | ||||||
| 			common/image.o \ | 			boot/image.o \ | ||||||
| 			common/image-host.o \ | 			boot/image-host.o \ | ||||||
| 			imagetool.o \ | 			imagetool.o \ | ||||||
| 			imximage.o \ | 			imximage.o \ | ||||||
| 			imx8image.o \ | 			imx8image.o \ | ||||||
| @@ -227,7 +227,7 @@ hostprogs-$(CONFIG_ARCH_OCTEON) += update_octeon_header | |||||||
| update_octeon_header-objs := update_octeon_header.o lib/crc32.o | update_octeon_header-objs := update_octeon_header.o lib/crc32.o | ||||||
|  |  | ||||||
| hostprogs-y += fdtgrep | hostprogs-y += fdtgrep | ||||||
| fdtgrep-objs += $(LIBFDT_OBJS) common/fdt_region.o fdtgrep.o | fdtgrep-objs += $(LIBFDT_OBJS) boot/fdt_region.o fdtgrep.o | ||||||
|  |  | ||||||
| ifneq ($(TOOLS_ONLY),y) | ifneq ($(TOOLS_ONLY),y) | ||||||
| hostprogs-y += spl_size_limit | hostprogs-y += spl_size_limit | ||||||
| @@ -254,7 +254,7 @@ HOSTCFLAGS_sha512.o := -pedantic -DCONFIG_SHA512 -DCONFIG_SHA384 | |||||||
| quiet_cmd_wrap = WRAP    $@ | quiet_cmd_wrap = WRAP    $@ | ||||||
| cmd_wrap = echo "\#include <../$(patsubst $(obj)/%,%,$@)>" >$@ | cmd_wrap = echo "\#include <../$(patsubst $(obj)/%,%,$@)>" >$@ | ||||||
|  |  | ||||||
| $(obj)/lib/%.c $(obj)/common/%.c $(obj)/env/%.c: | $(obj)/boot/%.c $(obj)/common/%.c $(obj)/env/%.c $(obj)/lib/%.c: | ||||||
| 	$(call cmd,wrap) | 	$(call cmd,wrap) | ||||||
|  |  | ||||||
| clean-dirs := lib common | clean-dirs := lib common | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user