[U-Boot] [PATCH v2 1/2] cmd: Split 'bootz' and 'booti' out from 'bootm'

Tom Rini trini at konsulko.com
Fri Aug 12 14:13:15 CEST 2016


On Fri, Aug 12, 2016 at 02:49:49PM +0900, Masahiro Yamada wrote:
> Hi Tom,
> 
> 
> 2016-08-02 0:28 GMT+09:00 Tom Rini <trini at konsulko.com>:
> > The bootz and booti commands rely on common functionality that is found
> > in common/bootm.c and common/bootm_os.c.  They do not however rely on
> > the rest of cmd/bootm.c to be implemented so split them into their own
> > files.  Have various Makefiles include the required infrastructure for
> > CONFIG_CMD_BOOT[IZ] as well as CONFIG_CMD_BOOTM.
> >
> > Signed-off-by: Tom Rini <trini at konsulko.com>
> 
> 
> If I apply this patch,
> I got a build error for the combination of
> "CONFIG_CMD_BOOTZ=y" and "# CONFIG_CMD_BOOTM is not set".
> 
> 
> $ make CROSS_COMPILE=arm-linux-gnueabi-
> scripts/kconfig/conf  --silentoldconfig Kconfig
>   CHK     include/config.h
>   UPD     include/config.h
>   GEN     include/autoconf.mk
>   GEN     include/autoconf.mk.dep
>   GEN     spl/include/autoconf.mk
>   CHK     include/config/uboot.release
>   UPD     include/config/uboot.release
>   CHK     include/generated/version_autogenerated.h
>   UPD     include/generated/version_autogenerated.h
>   CHK     include/generated/timestamp_autogenerated.h
>   UPD     include/generated/timestamp_autogenerated.h
>   CC      lib/asm-offsets.s
>   CHK     include/generated/generic-asm-offsets.h
>   UPD     include/generated/generic-asm-offsets.h
>   CC      arch/arm/lib/asm-offsets.s
>   CHK     include/generated/asm-offsets.h
>   UPD     include/generated/asm-offsets.h
>   HOSTCC  tools/gen_eth_addr
>   HOSTCC  tools/img2srec
>   HOSTCC  tools/mkenvimage.o
>   HOSTCC  tools/os_support.o
>   WRAP    tools/lib/crc32.c
>   HOSTCC  tools/lib/crc32.o
>   HOSTLD  tools/mkenvimage
>   HOSTCC  tools/aisimage.o
>   HOSTCC  tools/atmelimage.o
>   WRAP    tools/common/bootm.c
>   HOSTCC  tools/common/bootm.o
>   HOSTCC  tools/default_image.o
>   WRAP    tools/lib/fdtdec_common.c
>   HOSTCC  tools/lib/fdtdec_common.o
>   WRAP    tools/lib/fdtdec.c
>   HOSTCC  tools/lib/fdtdec.o
>   HOSTCC  tools/fit_common.o
>   HOSTCC  tools/fit_image.o
>   WRAP    tools/common/image-fit.c
>   HOSTCC  tools/common/image-fit.o
>   HOSTCC  tools/image-host.o
>   WRAP    tools/common/image.c
>   HOSTCC  tools/common/image.o
>   HOSTCC  tools/imagetool.o
>   HOSTCC  tools/imximage.o
>   HOSTCC  tools/kwbimage.o
>   WRAP    tools/lib/md5.c
>   HOSTCC  tools/lib/md5.o
>   HOSTCC  tools/lpc32xximage.o
>   HOSTCC  tools/mxsimage.o
>   HOSTCC  tools/omapimage.o
>   HOSTCC  tools/pblimage.o
>   HOSTCC  tools/pbl_crc32.o
>   WRAP    tools/lib/rc4.c
>   HOSTCC  tools/lib/rc4.o
>   HOSTCC  tools/rkcommon.o
>   HOSTCC  tools/rkimage.o
>   HOSTCC  tools/rksd.o
>   HOSTCC  tools/rkspi.o
>   HOSTCC  tools/socfpgaimage.o
>   WRAP    tools/lib/sha1.c
>   HOSTCC  tools/lib/sha1.o
>   WRAP    tools/lib/sha256.c
>   HOSTCC  tools/lib/sha256.o
>   WRAP    tools/common/hash.c
>   HOSTCC  tools/common/hash.o
>   HOSTCC  tools/ublimage.o
>   HOSTCC  tools/zynqimage.o
>   HOSTCC  tools/zynqmpimage.o
>   WRAP    tools/lib/libfdt/fdt.c
>   HOSTCC  tools/lib/libfdt/fdt.o
>   WRAP    tools/lib/libfdt/fdt_ro.c
>   HOSTCC  tools/lib/libfdt/fdt_ro.o
>   WRAP    tools/lib/libfdt/fdt_rw.c
>   HOSTCC  tools/lib/libfdt/fdt_rw.o
>   WRAP    tools/lib/libfdt/fdt_strerror.c
>   HOSTCC  tools/lib/libfdt/fdt_strerror.o
>   WRAP    tools/lib/libfdt/fdt_wip.c
>   HOSTCC  tools/lib/libfdt/fdt_wip.o
>   WRAP    tools/lib/libfdt/fdt_region.c
>   HOSTCC  tools/lib/libfdt/fdt_region.o
>   WRAP    tools/lib/libfdt/fdt_sw.c
>   HOSTCC  tools/lib/libfdt/fdt_sw.o
>   HOSTCC  tools/gpimage.o
>   HOSTCC  tools/gpimage-common.o
>   HOSTCC  tools/dumpimage.o
>   HOSTLD  tools/dumpimage
>   HOSTCC  tools/mkimage.o
>   HOSTLD  tools/mkimage
>   HOSTCC  tools/proftool
>   HOSTCC  tools/fdtgrep.o
>   HOSTLD  tools/fdtgrep
>   LD      arch/arm/cpu/built-in.o
>   CC      arch/arm/cpu/armv7/cache_v7.o
>   AS      arch/arm/cpu/armv7/cache_v7_asm.o
>   CC      arch/arm/cpu/armv7/cpu.o
>   CC      arch/arm/cpu/armv7/cp15.o
>   CC      arch/arm/cpu/armv7/syslib.o
>   AS      arch/arm/cpu/armv7/nonsec_virt.o
>   CC      arch/arm/cpu/armv7/virt-v7.o
>   CC      arch/arm/cpu/armv7/virt-dt.o
>   AS      arch/arm/cpu/armv7/psci.o
>   CC      arch/arm/cpu/armv7/psci-common.o
>   LD      arch/arm/cpu/armv7/built-in.o
>   AS      arch/arm/cpu/armv7/start.o
>   AS      arch/arm/lib/vectors.o
>   AS      arch/arm/lib/crt0.o
>   AS      arch/arm/lib/relocate.o
>   CC      arch/arm/lib/bootm-fdt.o
>   CC      arch/arm/lib/bootm.o
>   CC      arch/arm/lib/zimage.o
>   AS      arch/arm/lib/memset.o
>   AS      arch/arm/lib/memcpy.o
>   CC      arch/arm/lib/sections.o
>   CC      arch/arm/lib/stack.o
>   CC      arch/arm/lib/interrupts.o
>   CC      arch/arm/lib/reset.o
>   CC      arch/arm/lib/cache.o
>   CC      arch/arm/lib/cache-cp15.o
>   CC      arch/arm/lib/psci-dt.o
>   LD      arch/arm/lib/built-in.o
>   AS      arch/arm/lib/ashldi3.o
>   AS      arch/arm/lib/ashrdi3.o
>   CC      arch/arm/lib/div0.o
>   AS      arch/arm/lib/div64.o
>   AS      arch/arm/lib/lib1funcs.o
>   AS      arch/arm/lib/lshrdi3.o
>   AS      arch/arm/lib/muldi3.o
>   AS      arch/arm/lib/uldivmod.o
>   AR      arch/arm/lib/lib.a
>   CC      arch/arm/lib/eabi_compat.o
>   CC      arch/arm/mach-uniphier/board_early_init_f.o
>   CC      arch/arm/mach-uniphier/cpu_info.o
>   CC      arch/arm/mach-uniphier/print_misc_info.o
>   CC      arch/arm/mach-uniphier/dram_init.o
>   CC      arch/arm/mach-uniphier/board_common.o
>   CC      arch/arm/mach-uniphier/board_early_init_r.o
>   CC      arch/arm/mach-uniphier/board_late_init.o
>   CC      arch/arm/mach-uniphier/reset.o
>   AS      arch/arm/mach-uniphier/arm32/late_lowlevel_init.o
>   CC      arch/arm/mach-uniphier/arm32/cache-uniphier.o
>   CC      arch/arm/mach-uniphier/arm32/psci.o
>   AS      arch/arm/mach-uniphier/arm32/psci_smp.o
>   CC      arch/arm/mach-uniphier/arm32/timer.o
>   LD      arch/arm/mach-uniphier/arm32/built-in.o
>   CC      arch/arm/mach-uniphier/boot-mode/boot-mode.o
>   CC      arch/arm/mach-uniphier/boot-mode/boot-mode-pro5.o
>   CC      arch/arm/mach-uniphier/boot-mode/boot-mode-pxs2.o
>   CC      arch/arm/mach-uniphier/boot-mode/cmd_pinmon.o
>   LD      arch/arm/mach-uniphier/boot-mode/built-in.o
>   CC      arch/arm/mach-uniphier/clk/clk-pro5.o
>   CC      arch/arm/mach-uniphier/clk/clk-pxs2.o
>   LD      arch/arm/mach-uniphier/clk/built-in.o
>   CC      arch/arm/mach-uniphier/dram/cmd_ddrmphy.o
>   LD      arch/arm/mach-uniphier/dram/built-in.o
>   CC      arch/arm/mach-uniphier/pinctrl/pinctrl-pro5.o
>   CC      arch/arm/mach-uniphier/pinctrl/pinctrl-pxs2.o
>   CC      arch/arm/mach-uniphier/pinctrl/pinctrl-ld6b.o
>   LD      arch/arm/mach-uniphier/pinctrl/built-in.o
>   CC      arch/arm/mach-uniphier/boards.o
>   CC      arch/arm/mach-uniphier/soc_info.o
>   CC      arch/arm/mach-uniphier/micro-support-card.o
>   LD      arch/arm/mach-uniphier/built-in.o
>   CC      cmd/boot.o
>   CC      cmd/help.o
>   CC      cmd/version.o
>   CC      cmd/source.o
>   CC      cmd/bdinfo.o
>   CC      cmd/bootefi.o
>   CC      cmd/bootm.o
> cmd/bootm.c:138:5: error: redefinition of 'bootm_maybe_autostart'
> In file included from include/image.h:40:0,
>                  from include/common.h:89,
>                  from cmd/bootm.c:11:
> include/command.h:99:19: note: previous definition of
> 'bootm_maybe_autostart' was here
> make[1]: *** [cmd/bootm.o] Error 1
> make: *** [cmd] Error 2

Good catch, I'll kick this a bit harder, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160812/e2f5aac5/attachment.sig>


More information about the U-Boot mailing list