First step towards Kbuild: Use Kbuild style makefiles
Subsystems (42)
cover First step towards Kbuild: Use Kbuild style makefiles
Kbuild in U-Boot has been talked for a while
and RFC patches were posted by Simon Glass.
(Refer to "RFC: Add Kbuild system to U-Boot"
posted by Simon, May 12, 2013)
Simon's effort is a good start point but
varous critical features were missing from his patch series.
I have also been eager to introduce Kbuild to U-Boot. So I have been working on this task for a while with a little different migration path from Simon's way. And I succeeded to build a few boards
with support of SPL build, Out-of-tree build, correct output file names, which were missing from Simon's patches.
While I were working on my local branch,
the build system and makefiles in U-Boot master repository always kept changing, of course.
So, my fruit does not fit with the current master repository anymore. But if someone is interested in my work,
I can push my local branch to somewhere in my GitHub space. (RFC quality, but might be helpful for just discussions)
I recognize these patches are so rough that they support only a few ARM boards.
Perfectly covering all architectures and all boards without breaking any U-Boot features is a too big task for a sigle indivisual.
Even if I could do that, the patch series would
be extremely big size and the adjustment for U-Boot would be complecated.
So the review would probably take very long time. Along with the review process, as time goes by,
the posted patches would become not appled to the master branch.
So we would need to repeat post, review, fix, rebase on the master and post again, reviwe, ...
again and again for a very big patch series.
I began to be wondering it is possible to switch to Kbuild in this way.
So I decided to begin with what I can do, one by one. By stepping little by litte, we can get close to Kbuild and finally we will arrive at our goal.
I think this strategy is more realistic rather than adding a big change at one time.
Before adding a real Kbuild, I'd like to adjust our build system in a form suitable for Kbuild.
First of all, this series convert makefiles in sub directories to Kbuild style.
What this series do is quite simple:
- Moving common lines in sub makefiles to a new file 'scripts/Makefile.build'
- Renaming COBJS-y and SOBJS-y to obj-y in each sub makefile.
- A little bit more tweaks
That's all.
0001 creates scripts/Makefile.build and tweaks Makefile and spl/Makefile to use scripts/Makefile.build.
U-Boot conventional makefiles are like this:
include $(TOPDIR)/config.mk
LIB = $(obj)libfoo.o
COBJS := ...
COBJS += ...
SOBJS := ...
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
all: $(obj).depend $(LIB)
$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS))
#########################################################################
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################Top and bottom parts are common in almost all makefiles.
Writing those lines in all makefiles is a big waste.
So common lines have been pushed into scripts/Makefile.build.
In addition, scripts/Makefile.build includes a glue code for supporting 'obj-y'. Be aware U-Boot conventional makefile sytle is still supported.
So we can change sub makefiles little by little in the following patches.
0002-0019 change sub makefiles into a Kbuild suitable form using obj-y. In order to avoid creating a big patch file, they are divided by CPU architectures and categories.
0002-0007: refactor under arch/arm/
0008-0016: refactor libraries which are common for all architectures
0017 : refactor under arch/powerpc/
0018 : refactor under board/ti/
Note arch/arm/cpu/s3c44b0/Makefile was kept untouched.
It is the remainder of dead board and should be deleted.
(See 'ARM: s3c44b0: remove remainders of dead board' posted by me Aug 19)
(I am not a maintainer of TI boards, but I just wanted to demonstrate in 0018 for example how easily board maintainers can do this conversion)
Conversion rule is pretty easy:
(1) Delete common parts at top and bottom.
(2) Rename
COBJS -> obj-y
SOBJS -> obj-y
COBJS-$(CONFIG_FOO) -> obj-$(CONFIG_FOO)
SOBJS-$(CONFIG_FOO) -> obj-$(CONFIG_FOO)
START -> extra-yWe can convert almost automatically althogh in some cases we may need to tweak a little.
I refactored more than 150 makefiles in this series. But we still have more than 600 makefiles. (Most of them reside under board/ directory) We can convert them lator little by little. Your contribution is welcome! :-)
Note1:
This series breaks _NO_ features in U-Boot.
Beucase it just moves common parts into scripts/Makefile.build
I believe no boards are broken by this refactoring, but
it is humans who can make a mistake.
So, it is very important to do build check before patches are applied.
I tested for ARM and Sandbox like this:
$ CROSS_COMPILE_ARM=arm-linux-gnueabi- ./MAKEALL -a arm -a sandbox
and I got:
--------------------- SUMMARY ----------------------------
Boards compiled: 336
----------------------------------------------------------I could not test other architectures because I don't have suitable compiler. Especially PowerPC boards must be checked since I changed under arch/powerpc/ in 0017.
I will be grateful for any custodians' help.
Note2:
This series is _NOT_ RFC.
I believe what these patches are doing is clear.
0001 changes less than 100 lines.
0002-0019 changes lots of makefiles, but the conversion rule is simple.
So, I expect this series will be reviewed in a few weeks
and hopefully applied to master while the next merge window if the review passed.
Note3:
obj-y := foo/ (descending into foo sub directory) syntax is not supprted in this series.
It is implemented in upcoming patch series.
The reason why I postpone this feature is
I don't want to add a big change at one time. Adjusting for Kbuild little by litte is my strategy here for easy review.
Note4:
Of course, scripts/Makefile.build added by 0001 patch is temporary. It shall be replaced with the one of Linux Kernel in future.
Note5:
I confirmed these patches can be apply on v2013.10-rc2 tag.
Masahiro Yamada (19):
Makefile: prepare for using Kbuild-style Makefile
armv7: convert makefiles to Kbuild style
arm926ejs: convert makefiles to Kbuild style
arm920t: convert makefiles to Kbuild style
arm720t: convert makefiles to Kbuild style
ARM: convert makefiles to Kbuild style
ARM: imx-common: convert makefiles to Kbuild style
drivers: net: convert makefiles to Kbuild style
drivers: mtd: convert makefiles to Kbuild style
drivers: usb: convert makefiles to Kbuild style
drivers: convert makefiles to Kbuild style
fs: convert makefiles to Kbuild style
common: convert makefiles to Kbuild style
net: convert a makefile to Kbuild style
lib: convert makefiles to Kbuild style
disk: convert a makefile to Kbuild style
sandbox: convert makefiles to Kbuild style
powerpc: convert makefiles to Kbuild style
board: ti: convert makefiles to Kbuild style
Makefile | 42 +++- arch/arm/cpu/arm1136/Makefile | 26 +- arch/arm/cpu/arm1136/mx31/Makefile | 27 +- arch/arm/cpu/arm1136/mx35/Makefile | 28 +-- arch/arm/cpu/arm1176/Makefile | 26 +- arch/arm/cpu/arm1176/bcm2835/Makefile | 25 +- arch/arm/cpu/arm1176/tnetv107x/Makefile | 27 +- arch/arm/cpu/arm720t/Makefile | 26 +- arch/arm/cpu/arm720t/tegra-common/Makefile | 25 +- arch/arm/cpu/arm720t/tegra114/Makefile | 25 +- arch/arm/cpu/arm720t/tegra20/Makefile | 23 +- arch/arm/cpu/arm720t/tegra30/Makefile | 23 +- arch/arm/cpu/arm920t/Makefile | 28 +-- arch/arm/cpu/arm920t/a320/Makefile | 25 +- arch/arm/cpu/arm920t/at91/Makefile | 33 +-- arch/arm/cpu/arm920t/ep93xx/Makefile | 24 +- arch/arm/cpu/arm920t/imx/Makefile | 27 +- arch/arm/cpu/arm920t/ks8695/Makefile | 26 +- arch/arm/cpu/arm920t/s3c24x0/Makefile | 29 +-- arch/arm/cpu/arm925t/Makefile | 30 +-- arch/arm/cpu/arm926ejs/Makefile | 28 +-- arch/arm/cpu/arm926ejs/armada100/Makefile | 23 +- arch/arm/cpu/arm926ejs/at91/Makefile | 59 ++--- arch/arm/cpu/arm926ejs/davinci/Makefile | 48 +--- arch/arm/cpu/arm926ejs/kirkwood/Makefile | 31 +-- arch/arm/cpu/arm926ejs/lpc32xx/Makefile | 23 +- arch/arm/cpu/arm926ejs/mb86r0x/Makefile | 25 +- arch/arm/cpu/arm926ejs/mx25/Makefile | 23 +- arch/arm/cpu/arm926ejs/mx27/Makefile | 23 +- arch/arm/cpu/arm926ejs/mxs/Makefile | 26 +- arch/arm/cpu/arm926ejs/nomadik/Makefile | 25 +- arch/arm/cpu/arm926ejs/omap/Makefile | 26 +- arch/arm/cpu/arm926ejs/orion5x/Makefile | 29 +-- arch/arm/cpu/arm926ejs/pantheon/Makefile | 23 +- arch/arm/cpu/arm926ejs/spear/Makefile | 36 +-- arch/arm/cpu/arm926ejs/versatile/Makefile | 26 +- arch/arm/cpu/arm946es/Makefile | 26 +- arch/arm/cpu/arm_intcm/Makefile | 26 +- arch/arm/cpu/armv7/Makefile | 32 +-- arch/arm/cpu/armv7/am33xx/Makefile | 51 +--- arch/arm/cpu/armv7/at91/Makefile | 31 +-- arch/arm/cpu/armv7/exynos/Makefile | 34 +-- arch/arm/cpu/armv7/highbank/Makefile | 24 +- arch/arm/cpu/armv7/mx5/Makefile | 25 +- arch/arm/cpu/armv7/mx6/Makefile | 23 +- arch/arm/cpu/armv7/omap-common/Makefile | 43 +--- arch/arm/cpu/armv7/omap3/Makefile | 41 +-- arch/arm/cpu/armv7/omap4/Makefile | 31 +-- arch/arm/cpu/armv7/omap5/Makefile | 33 +-- arch/arm/cpu/armv7/rmobile/Makefile | 51 +--- arch/arm/cpu/armv7/s5p-common/Makefile | 29 +-- arch/arm/cpu/armv7/s5pc1xx/Makefile | 27 +- arch/arm/cpu/armv7/socfpga/Makefile | 29 +-- arch/arm/cpu/armv7/tegra-common/Makefile | 24 +- arch/arm/cpu/armv7/tegra114/Makefile | 22 +- arch/arm/cpu/armv7/tegra20/Makefile | 26 +- arch/arm/cpu/armv7/tegra30/Makefile | 22 +- arch/arm/cpu/armv7/u8500/Makefile | 25 +- arch/arm/cpu/armv7/vf610/Makefile | 25 +- arch/arm/cpu/armv7/zynq/Makefile | 29 +-- arch/arm/cpu/ixp/Makefile | 30 +-- arch/arm/cpu/pxa/Makefile | 36 +-- arch/arm/cpu/sa1100/Makefile | 28 +-- arch/arm/cpu/tegra-common/Makefile | 25 +- arch/arm/cpu/tegra114-common/Makefile | 23 +- arch/arm/cpu/tegra20-common/Makefile | 29 +-- arch/arm/cpu/tegra30-common/Makefile | 26 +- arch/arm/imx-common/Makefile | 35 +-- arch/arm/lib/Makefile | 86 ++----- arch/powerpc/cpu/74xx_7xx/Makefile | 28 +-- arch/powerpc/cpu/mpc512x/Makefile | 51 ++-- arch/powerpc/cpu/mpc5xx/Makefile | 27 +- arch/powerpc/cpu/mpc5xxx/Makefile | 54 ++-- arch/powerpc/cpu/mpc824x/Makefile | 28 +-- arch/powerpc/cpu/mpc8260/Makefile | 30 +-- arch/powerpc/cpu/mpc83xx/Makefile | 58 ++--- arch/powerpc/cpu/mpc85xx/Makefile | 233 ++++++++--------- arch/powerpc/cpu/mpc86xx/Makefile | 50 ++-- arch/powerpc/cpu/mpc8xx/Makefile | 58 ++--- arch/powerpc/cpu/mpc8xxx/Makefile | 30 +-- arch/powerpc/cpu/mpc8xxx/ddr/Makefile | 30 +-- arch/powerpc/cpu/ppc4xx/Makefile | 90 +++---- arch/powerpc/lib/Makefile | 78 ++---- arch/sandbox/cpu/Makefile | 23 +- arch/sandbox/lib/Makefile | 25 +- board/ti/am335x/Makefile | 29 +-- board/ti/am3517crane/Makefile | 19 +- board/ti/am43xx/Makefile | 29 +-- board/ti/beagle/Makefile | 24 +- board/ti/dra7xx/Makefile | 27 +- board/ti/evm/Makefile | 19 +- board/ti/omap1510inn/Makefile | 24 +- board/ti/omap5912osk/Makefile | 24 +- board/ti/omap5_uevm/Makefile | 27 +- board/ti/omap730p2/Makefile | 24 +- board/ti/panda/Makefile | 21 +- board/ti/sdp3430/Makefile | 21 +- board/ti/sdp4430/Makefile | 23 +- board/ti/ti814x/Makefile | 29 +-- board/ti/ti816x/Makefile | 27 +- board/ti/tnetv107xevm/Makefile | 25 +- common/Makefile | 389 ++++++++++++++--------------- common/spl/Makefile | 36 +-- disk/Makefile | 34 +-- drivers/bios_emulator/Makefile | 23 +- drivers/block/Makefile | 52 ++-- drivers/bootcount/Makefile | 30 +-- drivers/crypto/Makefile | 25 +- drivers/dfu/Makefile | 25 +- drivers/dma/Makefile | 30 +-- drivers/fpga/Makefile | 44 +--- drivers/gpio/Makefile | 73 ++---- drivers/hwmon/Makefile | 40 +-- drivers/i2c/Makefile | 70 ++---- drivers/input/Makefile | 36 +-- drivers/misc/Makefile | 52 ++-- drivers/mmc/Makefile | 69 ++--- drivers/mtd/Makefile | 44 +--- drivers/mtd/nand/Makefile | 102 +++----- drivers/mtd/onenand/Makefile | 27 +- drivers/mtd/spi/Makefile | 48 +--- drivers/mtd/ubi/Makefile | 28 +-- drivers/net/Makefile | 136 +++++----- drivers/net/fm/Makefile | 59 ++--- drivers/net/npe/Makefile | 24 +- drivers/net/phy/Makefile | 60 ++--- drivers/pci/Makefile | 44 +--- drivers/pcmcia/Makefile | 34 +-- drivers/power/Makefile | 47 +--- drivers/power/battery/Makefile | 25 +- drivers/power/fuel_gauge/Makefile | 25 +- drivers/power/pmic/Makefile | 31 +-- drivers/qe/Makefile | 25 +- drivers/rtc/Makefile | 110 ++++---- drivers/serial/Makefile | 82 +++--- drivers/sound/Makefile | 30 +-- drivers/spi/Makefile | 82 +++--- drivers/tpm/Makefile | 29 +-- drivers/twserial/Makefile | 24 +- drivers/usb/eth/Makefile | 28 +-- drivers/usb/gadget/Makefile | 54 ++-- drivers/usb/host/Makefile | 74 ++---- drivers/usb/musb-new/Makefile | 36 +-- drivers/usb/musb/Makefile | 36 +-- drivers/usb/phy/Makefile | 24 +- drivers/usb/ulpi/Makefile | 28 +-- drivers/video/Makefile | 84 +++---- drivers/watchdog/Makefile | 36 +-- fs/Makefile | 24 +- fs/cbfs/Makefile | 24 +- fs/cramfs/Makefile | 29 +-- fs/ext4/Makefile | 27 +- fs/fat/Makefile | 31 +-- fs/fdos/Makefile | 27 +- fs/jffs2/Makefile | 38 +-- fs/reiserfs/Makefile | 26 +- fs/sandbox/Makefile | 23 +- fs/ubifs/Makefile | 29 +-- fs/yaffs2/Makefile | 33 +-- fs/zfs/Makefile | 25 +- lib/Makefile | 114 ++++----- lib/libfdt/Makefile | 27 +- lib/lzma/Makefile | 24 +- lib/lzo/Makefile | 24 +- lib/rsa/Makefile | 22 +- lib/tizen/Makefile | 24 +- lib/zlib/Makefile | 22 +- net/Makefile | 46 +--- scripts/Makefile.build | 48 ++++ spl/Makefile | 24 +- 170 files changed, 1511 insertions(+), 5095 deletions(-) create mode 100644 scripts/Makefile.build
Signature · 1 line
1.8.1.2
PATCH 1/19 Makefile: prepare for using Kbuild-style Makefile
In every sub directory, Makefile is like follows:
include $(TOPDIR)/config.mk
LIB = $(obj)libfoo.o
COBJS := ...
COBJS += ...
SOBJS := ...
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
all: $(obj).depend $(LIB)
$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS))
#########################################################################
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################Top and bottom parts are common in almost all sub-makefiles. This is a big waste.
This commit pushes common parts of makefiles into script/Makefile.build.
Going forward sub-makefiles only need to describe this part:
COBJS := ...
COBJS += ...
SOBJS := ...But, script/Makefile.build includes the glue code to support obj-y, the following style (the same as Kbuild) is preferable:
obj-y := ...
obj-$(CONFIG_FOO) += ...
obj-$(CONFIG_BAR) += ...The conventional U-Boot Makefile style is still supported. This is achieved by greping the Makefile before entering into it. U-Boot conventional sub makefiles always include some other makefiles. So the build system searches a line with beginning with "include" keyword in the makefile in order to distinguish which style it is.
If the Makefile include a "include" line, we assume it is a conventional U-Boot style. Otherwise, it is treated as a Kbuild-style makefile.
(At first, I tried to grep "rules.mk" keyword instead,
but I found it does not work.
Almost all sub makefiles include "rules.mk", but there exist three exception:
- board/avnet/fx12mm/Makefile
- board/avnet/v5fx30teval/Makefile
- board/xilinx/ml507/Makefile
These three makefiles include "rules.mk" indirectly.
Anyway, they look weird, so they should be fixed lator.)
With this tweak, we can switch sub-makefiles from U-Boot style to Kbuild style little by little.
This refactoring of sub makefiles is the first step towards Kbuild, and makes it easy to import a "real" Kbuild from Linux Kernel.
Note that this refactoring breaks nothing because it just moves the common parts into scripts/Makefile.build.
Note one more thing:
obj-y := foo/ # descending into foo sub directory
syntax is not supported yet.
(This feature will be implemented in the upcoming commit series.)
Of course, scripts/Makefile.build added by this commit is temporary. It shall be replaced with the one of Linux Kernel in future.
--- Makefile | 34 ++++++++++++++++++++++++++++++---- scripts/Makefile.build | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ spl/Makefile | 20 ++++++++++++++++++-- 3 files changed, 96 insertions(+), 6 deletions(-) create mode 100644 scripts/Makefile.build
Makefile +30 -4
@@ -592,14 +592,35 @@ ifeq ($(CONFIG_KALLSYMS),y) $(GEN_UBOOT) $(obj)common/system_map.o endif +# Tentative step for Kbuild-style makefiles coexist with conventional U-Boot style makefiles +# U-Boot conventional sub makefiles always include some other makefiles. +# So, the build system searches a line beginning with "include" before entering into the sub makefile +# in order to distinguish which style it is. +# If the Makefile include a "include" line, we assume it is an U-Boot style makefile. +# Otherwise, it is treated as a Kbuild-style makefile. + +# We do not need to build $(OBJS) explicitly. +# It is built while we are at $(CPUDIR)/lib$(CPU).o build. $(OBJS): depend - $(MAKE) -C $(CPUDIR) $(if $(REMOTE_BUILD),$@,$(notdir $@)) + if grep -q "^include" $(CPUDIR)/Makefile; then \ + $(MAKE) -C $(CPUDIR) $(if $(REMOTE_BUILD),$@,$(notdir $@)); \ + fi $(LIBS): depend $(SUBDIR_TOOLS) - $(MAKE) -C $(dir $(subst $(obj),,$@)) + if grep -q "^include" $(dir $(subst $(obj),,$@))Makefile; then \ + $(MAKE) -C $(dir $(subst $(obj),,$@)); \ + else \ + $(MAKE) -C $(dir $(subst $(obj),,$@)) -f $(TOPDIR)/scripts/Makefile.build; \ + mv $(dir $@)built-in.o $@; \ + fi $(LIBBOARD): depend $(LIBS) - $(MAKE) -C $(dir $(subst $(obj),,$@)) + if grep -q "^include" $(dir $(subst $(obj),,$@))/Makefile; then \ + $(MAKE) -C $(dir $(subst $(obj),,$@)); \ + else \ + $(MAKE) -C $(dir $(subst $(obj),,$@)) -f $(TOPDIR)/scripts/Makefile.build; \ + mv $(dir $@)built-in.o $@; \ + fi $(SUBDIRS): depend $(MAKE) -C $@ all
@@ -636,7 +657,12 @@ depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ $(obj)include/generated/generic-asm-offsets.h \ $(obj)include/generated/asm-offsets.h for dir in $(SUBDIRS) $(CPUDIR) $(LDSCRIPT_MAKEFILE_DIR) ; do \ - $(MAKE) -C $$dir _depend ; done + if grep -q "^include" $$dir/Makefile; then \ + $(MAKE) -C $$dir _depend ; \ + else \ + $(MAKE) -C $$dir -f $(TOPDIR)/scripts/Makefile.build _depend; \ + fi; \ + done TAG_SUBDIRS = $(SUBDIRS) TAG_SUBDIRS += $(dir $(__LIBS))
scripts/Makefile.build new file +48 -0
48 lines not on this page · raw message
spl/Makefile +18 -2
@@ -198,11 +198,27 @@ GEN_UBOOT = \ $(obj)$(SPL_BIN): depend $(START) $(LIBS) $(obj)u-boot-spl.lds $(GEN_UBOOT) +# Tentative step for Kbuild-style makefiles coexist with conventional U-Boot style makefiles +# U-Boot conventional sub makefiles always include some other makefiles. +# So, the build system searches a line beginning with "include" before entering into the sub makefile +# in order to distinguish which style it is. +# If the Makefile include a "include" line, we assume it is an U-Boot style makefile. +# Otherwise, it is treated as a Kbuild-style makefile. + +# We do not need to build $(START) explicitly. +# It is built while we are at $(CPUDIR)/lib$(CPU).o build. $(START): depend - $(MAKE) -C $(SRCTREE)/$(START_PATH) $@ + if grep -q "^include" $(SRCTREE)$(dir $(subst $(SPLTREE),,$@))Makefile; then \ + $(MAKE) -C $(SRCTREE)/$(START_PATH) $@; \ + fi $(LIBS): depend - $(MAKE) -C $(SRCTREE)$(dir $(subst $(SPLTREE),,$@)) + if grep -q "^include" $(SRCTREE)$(dir $(subst $(SPLTREE),,$@))Makefile; then \ + $(MAKE) -C $(SRCTREE)$(dir $(subst $(SPLTREE),,$@)); \ + else \ + $(MAKE) -C $(SRCTREE)$(dir $(subst $(SPLTREE),,$@)) -f $(TOPDIR)/scripts/Makefile.build; \ + mv $(dir $@)built-in.o $@; \ + fi $(obj)u-boot-spl.lds: $(LDSCRIPT) depend $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@
Signature · 1 line
1.8.1.2
PATCH 2/19 armv7: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- arch/arm/cpu/armv7/Makefile | 32 ++++---------------- arch/arm/cpu/armv7/am33xx/Makefile | 51 ++++++++------------------------ arch/arm/cpu/armv7/at91/Makefile | 31 ++++--------------- arch/arm/cpu/armv7/exynos/Makefile | 34 ++++----------------- arch/arm/cpu/armv7/highbank/Makefile | 24 +-------------- arch/arm/cpu/armv7/mx5/Makefile | 25 ++-------------- arch/arm/cpu/armv7/mx6/Makefile | 23 +------------- arch/arm/cpu/armv7/omap-common/Makefile | 43 +++++++-------------------- arch/arm/cpu/armv7/omap3/Makefile | 41 +++++++------------------ arch/arm/cpu/armv7/omap4/Makefile | 31 ++++--------------- arch/arm/cpu/armv7/omap5/Makefile | 33 ++++----------------- arch/arm/cpu/armv7/rmobile/Makefile | 51 ++++++++------------------------ arch/arm/cpu/armv7/s5p-common/Makefile | 29 +++--------------- arch/arm/cpu/armv7/s5pc1xx/Makefile | 27 ++--------------- arch/arm/cpu/armv7/socfpga/Makefile | 29 ++---------------- arch/arm/cpu/armv7/tegra-common/Makefile | 24 +-------------- arch/arm/cpu/armv7/tegra114/Makefile | 22 +------------- arch/arm/cpu/armv7/tegra20/Makefile | 26 ++-------------- arch/arm/cpu/armv7/tegra30/Makefile | 22 +------------- arch/arm/cpu/armv7/u8500/Makefile | 25 ++-------------- arch/arm/cpu/armv7/vf610/Makefile | 25 ++-------------- arch/arm/cpu/armv7/zynq/Makefile | 29 ++---------------- 22 files changed, 99 insertions(+), 578 deletions(-)
arch/arm/cpu/armv7/Makefile +5 -27
@@ -5,35 +5,13 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y := start.o -LIB = $(obj)lib$(CPU).o +obj-y += cache_v7.o -START := start.o - -COBJS += cache_v7.o - -COBJS += cpu.o -COBJS += syslib.o +obj-y += cpu.o +obj-y += syslib.o ifneq ($(CONFIG_AM43XX)$(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_MX6)$(CONFIG_TI81XX),) -SOBJS += lowlevel_init.o +obj-y += lowlevel_init.o endif - -SRCS := $(START:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
arch/arm/cpu/armv7/am33xx/Makefile +12 -39
58 lines not on this page · raw message
arch/arm/cpu/armv7/at91/Makefile +5 -26
@@ -8,29 +8,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-$(CONFIG_SAMA5D3) += sama5d3_devices.o -COBJS-y += clock.o -COBJS-y += cpu.o -COBJS-y += reset.o -COBJS-y += timer.o - -SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_SAMA5D3) += sama5d3_devices.o +obj-y += clock.o +obj-y += cpu.o +obj-y += reset.o +obj-y += timer.o
arch/arm/cpu/armv7/exynos/Makefile +6 -28
@@ -5,34 +5,12 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-y += clock.o power.o soc.o system.o pinmux.o tzpc.o +obj-y += clock.o power.o soc.o system.o pinmux.o tzpc.o ifdef CONFIG_SPL_BUILD -COBJS-$(CONFIG_EXYNOS5) += clock_init_exynos5.o -COBJS-$(CONFIG_EXYNOS5) += dmc_common.o dmc_init_ddr3.o -COBJS-$(CONFIG_EXYNOS4210)+= dmc_init_exynos4.o clock_init_exynos4.o -COBJS-y += spl_boot.o -COBJS-y += lowlevel_init.o +obj-$(CONFIG_EXYNOS5) += clock_init_exynos5.o +obj-$(CONFIG_EXYNOS5) += dmc_common.o dmc_init_ddr3.o +obj-$(CONFIG_EXYNOS4210)+= dmc_init_exynos4.o clock_init_exynos4.o +obj-y += spl_boot.o +obj-y += lowlevel_init.o endif - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
arch/arm/cpu/armv7/highbank/Makefile +1 -23
@@ -5,26 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS := timer.o -SOBJS := - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := timer.o
arch/arm/cpu/armv7/mx5/Makefile +2 -23
@@ -7,26 +7,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = soc.o clock.o -SOBJS = lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := soc.o clock.o +obj-y += lowlevel_init.o
arch/arm/cpu/armv7/mx6/Makefile +1 -22
@@ -7,25 +7,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = soc.o clock.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := soc.o clock.o
arch/arm/cpu/armv7/omap-common/Makefile +11 -32
57 lines not on this page · raw message
arch/arm/cpu/armv7/omap3/Makefile +10 -31
48 lines not on this page · raw message
arch/arm/cpu/armv7/omap4/Makefile +5 -26
@@ -5,29 +5,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS += sdram_elpida.o -COBJS += hwinit.o -COBJS += emif.o -COBJS += prcm-regs.o -COBJS += hw_data.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += sdram_elpida.o +obj-y += hwinit.o +obj-y += emif.o +obj-y += prcm-regs.o +obj-y += hw_data.o
arch/arm/cpu/armv7/omap5/Makefile +6 -27
@@ -5,30 +5,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS += hwinit.o -COBJS += emif.o -COBJS += sdram.o -COBJS += prcm-regs.o -COBJS += hw_data.o -COBJS += abb.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += hwinit.o +obj-y += emif.o +obj-y += sdram.o +obj-y += prcm-regs.o +obj-y += hw_data.o +obj-y += abb.o
arch/arm/cpu/armv7/rmobile/Makefile +13 -38
58 lines not on this page · raw message
arch/arm/cpu/armv7/s5p-common/Makefile +4 -25
@@ -5,30 +5,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libs5p-common.o - -COBJS-y += cpu_info.o +obj-y += cpu_info.o ifndef CONFIG_SPL_BUILD -COBJS-y += timer.o -COBJS-y += sromc.o -COBJS-$(CONFIG_PWM) += pwm.o +obj-y += timer.o +obj-y += sromc.o +obj-$(CONFIG_PWM) += pwm.o endif - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
arch/arm/cpu/armv7/s5pc1xx/Makefile +3 -24
@@ -8,28 +8,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +obj-y = cache.o +obj-y += reset.o -LIB = $(obj)lib$(SOC).o - -SOBJS = cache.o -SOBJS += reset.o - -COBJS += clock.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += clock.o
arch/arm/cpu/armv7/socfpga/Makefile +3 -26
@@ -7,29 +7,6 @@ # SPDX-License-Identifier: GPL-2.0+ # - -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -SOBJS := lowlevel_init.o -COBJS-y := misc.o timer.o -COBJS-$(CONFIG_SPL_BUILD) += spl.o - -COBJS := $(COBJS-y) -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := lowlevel_init.o +obj-y += misc.o timer.o +obj-$(CONFIG_SPL_BUILD) += spl.o
arch/arm/cpu/armv7/tegra-common/Makefile +1 -23
@@ -7,26 +7,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libtegra-common.o - -COBJS-$(CONFIG_CMD_ENTERRCM) += cmd_enterrcm.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_CMD_ENTERRCM) += cmd_enterrcm.o
arch/arm/cpu/armv7/tegra114/Makefile +1 -21
@@ -17,24 +17,4 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj- :=
arch/arm/cpu/armv7/tegra20/Makefile +2 -24
@@ -7,27 +7,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-$(CONFIG_PWM_TEGRA) += pwm.o -COBJS-$(CONFIG_VIDEO_TEGRA) += display.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_PWM_TEGRA) += pwm.o +obj-$(CONFIG_VIDEO_TEGRA) += display.o
arch/arm/cpu/armv7/tegra30/Makefile +1 -21
@@ -17,24 +17,4 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj- :=
arch/arm/cpu/armv7/u8500/Makefile +2 -23
@@ -5,26 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = timer.o clock.o prcmu.o cpu.o -SOBJS = lowlevel.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := timer.o clock.o prcmu.o cpu.o +obj-y += lowlevel.o
arch/arm/cpu/armv7/vf610/Makefile +2 -23
@@ -4,26 +4,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS += generic.o -COBJS += timer.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += generic.o +obj-y += timer.o
arch/arm/cpu/armv7/zynq/Makefile +3 -26
@@ -8,29 +8,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-y := timer.o -COBJS-y += cpu.o -COBJS-y += slcr.o - -COBJS := $(COBJS-y) - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := timer.o +obj-y += cpu.o +obj-y += slcr.o
Signature · 1 line
1.8.1.2
PATCH 3/19 arm926ejs: convert makefiles to Kbuild style
In reply to Masahiro YamadaNote1:
In arch/arm/cpu/arm926ejs/spear/Makefile
START := start.o
was changed
extra-$(CONFIG_SPL_BUILD) := start.o
because spear/start.o is only used for SPL.
Note2:
START := start.o
was missing from arch/arm/cpu/arm926ejs/mxs/Makefile. This commit simply adds extra-$(CONFIG_SPL_BUILD) := start.o
--- arch/arm/cpu/arm926ejs/Makefile | 28 ++------------- arch/arm/cpu/arm926ejs/armada100/Makefile | 23 +----------- arch/arm/cpu/arm926ejs/at91/Makefile | 59 ++++++++++--------------------- arch/arm/cpu/arm926ejs/davinci/Makefile | 48 +++++++------------------ arch/arm/cpu/arm926ejs/kirkwood/Makefile | 31 +++------------- arch/arm/cpu/arm926ejs/lpc32xx/Makefile | 23 +----------- arch/arm/cpu/arm926ejs/mb86r0x/Makefile | 25 +------------ arch/arm/cpu/arm926ejs/mx25/Makefile | 23 +----------- arch/arm/cpu/arm926ejs/mx27/Makefile | 23 +----------- arch/arm/cpu/arm926ejs/mxs/Makefile | 26 ++------------ arch/arm/cpu/arm926ejs/nomadik/Makefile | 25 ++----------- arch/arm/cpu/arm926ejs/omap/Makefile | 26 ++------------ arch/arm/cpu/arm926ejs/orion5x/Makefile | 29 +++------------ arch/arm/cpu/arm926ejs/pantheon/Makefile | 23 +----------- arch/arm/cpu/arm926ejs/spear/Makefile | 36 +++++-------------- arch/arm/cpu/arm926ejs/versatile/Makefile | 26 ++------------ 16 files changed, 67 insertions(+), 407 deletions(-)
arch/arm/cpu/arm926ejs/Makefile +3 -25
@@ -5,33 +5,11 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS = cpu.o cache.o +extra-y = start.o +obj-y = cpu.o cache.o ifdef CONFIG_SPL_BUILD ifdef CONFIG_SPL_NO_CPU_SUPPORT_CODE -START := +extra-y := endif endif - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
arch/arm/cpu/arm926ejs/armada100/Makefile +1 -22
@@ -6,25 +6,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-y = cpu.o timer.o dram.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = cpu.o timer.o dram.o
arch/arm/cpu/arm926ejs/at91/Makefile +19 -40
65 lines not on this page · raw message
arch/arm/cpu/arm926ejs/davinci/Makefile +13 -35
57 lines not on this page · raw message
arch/arm/cpu/arm926ejs/kirkwood/Makefile +5 -26
@@ -6,29 +6,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-y = cpu.o -COBJS-y += dram.o -COBJS-y += mpp.o -COBJS-y += timer.o -COBJS-y += cache.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = cpu.o +obj-y += dram.o +obj-y += mpp.o +obj-y += timer.o +obj-y += cache.o
arch/arm/cpu/arm926ejs/lpc32xx/Makefile +1 -22
@@ -5,25 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = cpu.o clk.o devices.o timer.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = cpu.o clk.o devices.o timer.o
arch/arm/cpu/arm926ejs/mb86r0x/Makefile +1 -24
@@ -5,27 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = clock.o reset.o timer.o -SOBJS = - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = clock.o reset.o timer.o
arch/arm/cpu/arm926ejs/mx25/Makefile +1 -22
@@ -4,25 +4,4 @@ # # SPDX-License-Identifier: GPL-2.0+ -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = generic.o timer.o reset.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = generic.o timer.o reset.o
arch/arm/cpu/arm926ejs/mx27/Makefile +1 -22
@@ -4,25 +4,4 @@ # # SPDX-License-Identifier: GPL-2.0+ -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = generic.o reset.o timer.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = generic.o reset.o timer.o
arch/arm/cpu/arm926ejs/mxs/Makefile +3 -23
@@ -5,25 +5,14 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-$(CONFIG_SPL_BUILD) := start.o -LIB = $(obj)lib$(SOC).o - -COBJS = clock.o mxs.o iomux.o timer.o +obj-y = clock.o mxs.o iomux.o timer.o ifdef CONFIG_SPL_BUILD -COBJS += spl_boot.o spl_lradc_init.o spl_mem_init.o spl_power_init.o +obj-y += spl_boot.o spl_lradc_init.o spl_mem_init.o spl_power_init.o endif -SRCS := $(START:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - # Specify the target for use in elftosb call ELFTOSB_TARGET-$(CONFIG_MX23) = imx23 ELFTOSB_TARGET-$(CONFIG_MX28) = imx28
@@ -33,12 +22,3 @@ $(OBJTREE)/u-boot.bd: $(SRCTREE)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd $(OBJTREE)/u-boot.sb: $(OBJTREE)/u-boot.bin $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/u-boot.bd elftosb -zf $(ELFTOSB_TARGET-y) -c $(OBJTREE)/u-boot.bd -o $(OBJTREE)/u-boot.sb - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
arch/arm/cpu/arm926ejs/nomadik/Makefile +2 -23
@@ -5,26 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = timer.o gpio.o -SOBJS = reset.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) $(addprefix $(obj),$(SOBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = timer.o gpio.o +obj-y += reset.o
arch/arm/cpu/arm926ejs/omap/Makefile +2 -24
@@ -5,27 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = timer.o cpuinfo.o -SOBJS = reset.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = timer.o cpuinfo.o +obj-y += reset.o
arch/arm/cpu/arm926ejs/orion5x/Makefile +4 -25
@@ -9,31 +9,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-y = cpu.o -COBJS-y += dram.o -COBJS-y += timer.o +obj-y = cpu.o +obj-y += dram.o +obj-y += timer.o ifndef CONFIG_SKIP_LOWLEVEL_INIT -SOBJS := lowlevel_init.o +obj-y += lowlevel_init.o endif - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
arch/arm/cpu/arm926ejs/pantheon/Makefile +1 -22
@@ -6,25 +6,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-y = cpu.o timer.o dram.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = cpu.o timer.o dram.o
arch/arm/cpu/arm926ejs/spear/Makefile +8 -28
@@ -5,37 +5,17 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-y := cpu.o \ +obj-y := cpu.o \ reset.o \ timer.o ifdef CONFIG_SPL_BUILD -COBJS-y += spl.o spl_boot.o -COBJS-$(CONFIG_SPEAR600) += spear600.o -COBJS-$(CONFIG_DDR_MT47H64M16) += spr600_mt47h64m16_3_333_cl5_psync.o -COBJS-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_333_cl5_psync.o -COBJS-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_37e_166_cl4_sync.o -COBJS-$(CONFIG_DDR_MT47H128M8) += spr600_mt47h128m8_3_266_cl5_async.o +obj-y += spl.o spl_boot.o +obj-$(CONFIG_SPEAR600) += spear600.o +obj-$(CONFIG_DDR_MT47H64M16) += spr600_mt47h64m16_3_333_cl5_psync.o +obj-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_333_cl5_psync.o +obj-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_37e_166_cl4_sync.o +obj-$(CONFIG_DDR_MT47H128M8) += spr600_mt47h128m8_3_266_cl5_async.o endif -SRCS := $(START:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +extra-$(CONFIG_SPL_BUILD) := start.o
arch/arm/cpu/arm926ejs/versatile/Makefile +2 -24
@@ -5,27 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS = timer.o -SOBJS = reset.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = timer.o +obj-y += reset.o
Signature · 1 line
1.8.1.2
PATCH 4/19 arm920t: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- arch/arm/cpu/arm920t/Makefile | 28 +++------------------------- arch/arm/cpu/arm920t/a320/Makefile | 25 ++----------------------- arch/arm/cpu/arm920t/at91/Makefile | 33 ++++++--------------------------- arch/arm/cpu/arm920t/ep93xx/Makefile | 24 ++---------------------- arch/arm/cpu/arm920t/imx/Makefile | 27 +++------------------------ arch/arm/cpu/arm920t/ks8695/Makefile | 26 ++------------------------ arch/arm/cpu/arm920t/s3c24x0/Makefile | 29 ++++------------------------- 7 files changed, 22 insertions(+), 170 deletions(-)
arch/arm/cpu/arm920t/Makefile +3 -25
@@ -5,29 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y = start.o -LIB = $(obj)lib$(CPU).o - -START = start.o - -COBJS-y += cpu.o -COBJS-$(CONFIG_USE_IRQ) += interrupts.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += cpu.o +obj-$(CONFIG_USE_IRQ) += interrupts.o
arch/arm/cpu/arm920t/a320/Makefile +2 -23
@@ -5,26 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -SOBJS += reset.o -COBJS += timer.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += reset.o +obj-y += timer.o
arch/arm/cpu/arm920t/at91/Makefile +6 -27
@@ -5,30 +5,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -SOBJS += lowlevel_init.o -COBJS += reset.o -COBJS += timer.o -COBJS += clock.o -COBJS += cpu.o -COBJS += at91rm9200_devices.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += lowlevel_init.o +obj-y += reset.o +obj-y += timer.o +obj-y += clock.o +obj-y += cpu.o +obj-y += at91rm9200_devices.o
arch/arm/cpu/arm920t/ep93xx/Makefile +2 -22
@@ -16,26 +16,6 @@ # # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk -LIB = $(obj)lib$(SOC).o - -COBJS = cpu.o led.o speed.o timer.o -SOBJS = lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = cpu.o led.o speed.o timer.o +obj-y += lowlevel_init.o
arch/arm/cpu/arm920t/imx/Makefile +3 -24
@@ -5,27 +5,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS += generic.o -COBJS += speed.o -COBJS += timer.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += generic.o +obj-y += speed.o +obj-y += timer.o
arch/arm/cpu/arm920t/ks8695/Makefile +2 -24
@@ -5,27 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -SOBJS = lowlevel_init.o - -COBJS = timer.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = lowlevel_init.o +obj-y += timer.o
arch/arm/cpu/arm920t/s3c24x0/Makefile +4 -25
@@ -5,28 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-$(CONFIG_USE_IRQ) += interrupts.o -COBJS-$(CONFIG_DISPLAY_CPUINFO) += cpu_info.o -COBJS-y += speed.o -COBJS-y += timer.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_USE_IRQ) += interrupts.o +obj-$(CONFIG_DISPLAY_CPUINFO) += cpu_info.o +obj-y += speed.o +obj-y += timer.o
Signature · 1 line
1.8.1.2
PATCH 5/19 arm720t: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- arch/arm/cpu/arm720t/Makefile | 26 ++------------------------ arch/arm/cpu/arm720t/tegra-common/Makefile | 25 ++----------------------- arch/arm/cpu/arm720t/tegra114/Makefile | 25 ++----------------------- arch/arm/cpu/arm720t/tegra20/Makefile | 23 +---------------------- arch/arm/cpu/arm720t/tegra30/Makefile | 23 +---------------------- 5 files changed, 8 insertions(+), 114 deletions(-)
arch/arm/cpu/arm720t/Makefile +2 -24
@@ -5,27 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS = interrupts.o cpu.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +extra-y = start.o +obj-y = interrupts.o cpu.o
arch/arm/cpu/arm720t/tegra-common/Makefile +2 -23
@@ -7,26 +7,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libtegra-common.o - -COBJS-$(CONFIG_SPL_BUILD) += spl.o -COBJS-y += cpu.o - -SRCS := $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_SPL_BUILD) += spl.o +obj-y += cpu.o
arch/arm/cpu/arm720t/tegra114/Makefile +2 -23
@@ -17,26 +17,5 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -#COBJS-y += cpu.o t11x.o -COBJS-y += cpu.o - -SRCS := $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +#obj-y += cpu.o t11x.o +obj-y += cpu.o
arch/arm/cpu/arm720t/tegra20/Makefile +1 -22
@@ -7,25 +7,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-y += cpu.o - -SRCS := $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += cpu.o
arch/arm/cpu/arm720t/tegra30/Makefile +1 -22
@@ -17,25 +17,4 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS-y += cpu.o - -SRCS := $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += cpu.o
Signature · 1 line
1.8.1.2
PATCH 6/19 ARM: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- arch/arm/cpu/arm1136/Makefile | 26 +--------- arch/arm/cpu/arm1136/mx31/Makefile | 27 ++--------- arch/arm/cpu/arm1136/mx35/Makefile | 28 ++--------- arch/arm/cpu/arm1176/Makefile | 26 +--------- arch/arm/cpu/arm1176/bcm2835/Makefile | 25 +--------- arch/arm/cpu/arm1176/tnetv107x/Makefile | 27 +---------- arch/arm/cpu/arm925t/Makefile | 30 ++---------- arch/arm/cpu/arm946es/Makefile | 26 +--------- arch/arm/cpu/arm_intcm/Makefile | 26 +--------- arch/arm/cpu/ixp/Makefile | 30 ++---------- arch/arm/cpu/pxa/Makefile | 36 +++----------- arch/arm/cpu/sa1100/Makefile | 28 ++--------- arch/arm/cpu/tegra-common/Makefile | 25 +--------- arch/arm/cpu/tegra114-common/Makefile | 23 +-------- arch/arm/cpu/tegra20-common/Makefile | 29 ++--------- arch/arm/cpu/tegra30-common/Makefile | 26 +--------- arch/arm/lib/Makefile | 86 ++++++++++----------------------- 17 files changed, 69 insertions(+), 455 deletions(-)
arch/arm/cpu/arm1136/Makefile +2 -24
@@ -5,27 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS = cpu.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +extra-y = start.o +obj-y = cpu.o
arch/arm/cpu/arm1136/mx31/Makefile +3 -24
@@ -5,27 +5,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS += generic.o -COBJS += timer.o -COBJS += devices.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += generic.o +obj-y += timer.o +obj-y += devices.o
arch/arm/cpu/arm1136/mx35/Makefile +3 -25
@@ -7,28 +7,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS += generic.o -COBJS += timer.o -COBJS += mx35_sdram.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += generic.o +obj-y += timer.o +obj-y += mx35_sdram.o
arch/arm/cpu/arm1176/Makefile +2 -24
@@ -8,27 +8,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS = cpu.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +extra-y = start.o +obj-y = cpu.o
arch/arm/cpu/arm1176/bcm2835/Makefile +2 -23
@@ -12,26 +12,5 @@ # GNU General Public License for more details. # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -SOBJS := lowlevel_init.o -COBJS := init.o reset.o timer.o mbox.o - -SRCS := $(SOBJS:.o=.c) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := lowlevel_init.o +obj-y += init.o reset.o timer.o mbox.o
arch/arm/cpu/arm1176/tnetv107x/Makefile +2 -25
@@ -2,28 +2,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC).o - -COBJS += aemif.o clock.o init.o mux.o timer.o -SOBJS += lowlevel_init.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) - -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += aemif.o clock.o init.o mux.o timer.o +obj-y += lowlevel_init.o
arch/arm/cpu/arm925t/Makefile +4 -26
@@ -5,30 +5,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y = start.o -LIB = $(obj)lib$(CPU).o - -START = start.o - -COBJS += cpu.o -COBJS += omap925.o -COBJS += timer.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += cpu.o +obj-y += omap925.o +obj-y += timer.o
arch/arm/cpu/arm946es/Makefile +2 -24
@@ -5,28 +5,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y = start.o -LIB = $(obj)lib$(CPU).o - -START = start.o - -COBJS = cpu.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y = cpu.o
arch/arm/cpu/arm_intcm/Makefile +2 -24
@@ -5,27 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS = cpu.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +extra-y = start.o +obj-y = cpu.o
arch/arm/cpu/ixp/Makefile +4 -26
@@ -5,30 +5,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y = start.o -LIB = $(obj)lib$(CPU).o - -START = start.o - -COBJS-y += cpu.o -COBJS-$(CONFIG_USE_IRQ) += interrupts.o -COBJS-y += timer.o - -SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += cpu.o +obj-$(CONFIG_USE_IRQ) += interrupts.o +obj-y += timer.o
arch/arm/cpu/pxa/Makefile +6 -30
@@ -5,35 +5,11 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y = start.o -LIB = $(obj)lib$(CPU).o +obj-$(CONFIG_CPU_PXA25X) += pxa2xx.o +obj-$(CONFIG_CPU_PXA27X) += pxa2xx.o -START = start.o - -COBJS-$(CONFIG_CPU_PXA25X) = pxa2xx.o -COBJS-$(CONFIG_CPU_PXA27X) = pxa2xx.o - -COBJS-y += cpuinfo.o - -COBJS = $(COBJS-y) -COBJS += timer.o -COBJS += usb.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += cpuinfo.o +obj-y += timer.o +obj-y += usb.o
arch/arm/cpu/sa1100/Makefile +3 -25
@@ -5,29 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk +extra-y = start.o -LIB = $(obj)lib$(CPU).o - -START = start.o - -COBJS += cpu.o -COBJS += timer.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += cpu.o +obj-y += timer.o
arch/arm/cpu/tegra-common/Makefile +2 -23
@@ -7,26 +7,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libcputegra-common.o - -SOBJS += lowlevel_init.o -COBJS-y += ap.o board.o sys_info.o timer.o clock.o cache.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += lowlevel_init.o +obj-y += ap.o board.o sys_info.o timer.o clock.o cache.o
arch/arm/cpu/tegra114-common/Makefile +1 -22
@@ -17,25 +17,4 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(SOC)-common.o - -COBJS-y += clock.o funcmux.o pinmux.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += clock.o funcmux.o pinmux.o
arch/arm/cpu/tegra20-common/Makefile +4 -25
@@ -7,32 +7,11 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - # The AVP is ARMv4T architecture so we must use special compiler # flags for any startup files it might use. CFLAGS_arch/arm/cpu/tegra20-common/warmboot_avp.o += -march=armv4t -LIB = $(obj)lib$(SOC)-common.o - -COBJS-y += clock.o funcmux.o pinmux.o -COBJS-$(CONFIG_TEGRA_LP0) += warmboot.o crypto.o warmboot_avp.o -COBJS-$(CONFIG_TEGRA_CLOCK_SCALING) += emc.o -COBJS-$(CONFIG_TEGRA_PMU) += pmu.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += clock.o funcmux.o pinmux.o +obj-$(CONFIG_TEGRA_LP0) += warmboot.o crypto.o warmboot_avp.o +obj-$(CONFIG_TEGRA_CLOCK_SCALING) += emc.o +obj-$(CONFIG_TEGRA_PMU) += pmu.o
arch/arm/cpu/tegra30-common/Makefile +1 -25
@@ -17,28 +17,4 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -include $(TOPDIR)/config.mk - -# The AVP is ARMv4T architecture so we must use special compiler -# flags for any startup files it might use. - -LIB = $(obj)lib$(SOC)-common.o - -COBJS-y += clock.o funcmux.o pinmux.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += clock.o funcmux.o pinmux.o
arch/arm/lib/Makefile +26 -60
103 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 7/19 ARM: imx-common: convert makefiles to Kbuild style
In reply to Masahiro YamadaMultiple targets are included in arch/arm/imx-common/Makefile In order to refactor it,
we need to tweak Makefile and spl/Makefile.
--- Makefile | 8 +++++--- arch/arm/imx-common/Makefile | 35 ++++++----------------------------- spl/Makefile | 4 +++- 3 files changed, 14 insertions(+), 33 deletions(-)
Makefile +5 -3
@@ -413,6 +413,8 @@ ALL-y += $(obj)u-boot-nodtb-tegra.bin endif endif +build := -f $(TOPDIR)/scripts/Makefile.build -C + all: $(ALL-y) $(SUBDIR_EXAMPLES) $(obj)u-boot.dtb: checkdtc $(obj)u-boot
@@ -460,7 +462,7 @@ $(obj)u-boot.img: $(obj)u-boot.bin -d $< $@ $(obj)u-boot.imx: $(obj)u-boot.bin depend - $(MAKE) -C $(SRCTREE)/arch/arm/imx-common $(OBJTREE)/u-boot.imx + $(MAKE) $(build) $(SRCTREE)/arch/arm/imx-common $(OBJTREE)/u-boot.imx $(obj)u-boot.kwb: $(obj)u-boot.bin $(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \
@@ -498,11 +500,11 @@ $(obj)tpl/u-boot-with-tpl.bin: $(obj)tpl/u-boot-tpl.bin $(obj)u-boot.bin $(call SPL_PAD_APPEND,$<,$(obj)u-boot.bin,tpl/u-boot-tpl-pad.bin,$(CONFIG_TPL_PAD_TO)) $(obj)u-boot-with-spl.imx: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin - $(MAKE) -C $(SRCTREE)/arch/arm/imx-common \ + $(MAKE) $(build) $(SRCTREE)/arch/arm/imx-common \ $(OBJTREE)/u-boot-with-spl.imx $(obj)u-boot-with-nand-spl.imx: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin - $(MAKE) -C $(SRCTREE)/arch/arm/imx-common \ + $(MAKE) $(build) $(SRCTREE)/arch/arm/imx-common \ $(OBJTREE)/u-boot-with-nand-spl.imx $(obj)u-boot.ubl: $(obj)u-boot-with-spl.bin
arch/arm/imx-common/Makefile +6 -29
@@ -7,31 +7,18 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libimx-common.o - ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 vf610)) -COBJS-y = iomux-v3.o +obj-y = iomux-v3.o endif ifeq ($(SOC),$(filter $(SOC),mx5 mx6)) -COBJS-y += timer.o cpu.o speed.o -COBJS-$(CONFIG_I2C_MXC) += i2c-mxv7.o +obj-y += timer.o cpu.o speed.o +obj-$(CONFIG_I2C_MXC) += i2c-mxv7.o endif ifeq ($(SOC),$(filter $(SOC),mx6 mxs)) -COBJS-y += misc.o +obj-y += misc.o endif -COBJS-$(CONFIG_CMD_BMODE) += cmd_bmode.o -COBJS-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o -COBJS := $(sort $(COBJS-y)) - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) +obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o +obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp: $(OBJTREE)/%.cfgtmp : $(SRCTREE)/% mkdir -p $(dir $@)
@@ -67,13 +54,3 @@ $(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin $(OBJTREE)/u-boot.uim cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim > $@ rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim - - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
spl/Makefile +3 -1
@@ -152,6 +152,8 @@ ifeq ($(wildcard $(LDSCRIPT)),) $(error could not find linker script) endif +build := -f $(TOPDIR)/scripts/Makefile.build -C + # Special flags for CPP when processing the linker script. # Pass the version down so we can handle backwards compatibility # on the fly.
@@ -171,7 +173,7 @@ $(OBJTREE)/MLO.byteswap: $(obj)u-boot-spl.bin -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ $(OBJTREE)/SPL : $(obj)u-boot-spl.bin depend - $(MAKE) -C $(SRCTREE)/arch/arm/imx-common $@ + $(MAKE) $(build) $(SRCTREE)/arch/arm/imx-common $@ ALL-y += $(obj)$(SPL_BIN).bin
Signature · 1 line
1.8.1.2
PATCH 8/19 drivers: net: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- drivers/net/Makefile | 136 ++++++++++++++++++++--------------------------- drivers/net/fm/Makefile | 59 +++++++------------- drivers/net/npe/Makefile | 24 +-------- drivers/net/phy/Makefile | 60 +++++++-------------- 4 files changed, 96 insertions(+), 183 deletions(-)
drivers/net/Makefile +57 -79
@@ -5,83 +5,61 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libnet.o - -COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o -COBJS-$(CONFIG_ALTERA_TSE) += altera_tse.o -COBJS-$(CONFIG_ARMADA100_FEC) += armada100_fec.o -COBJS-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o -COBJS-$(CONFIG_DRIVER_AX88180) += ax88180.o -COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o -COBJS-$(CONFIG_CALXEDA_XGMAC) += calxedaxgmac.o -COBJS-$(CONFIG_CS8900) += cs8900.o -COBJS-$(CONFIG_TULIP) += dc2114x.o -COBJS-$(CONFIG_DESIGNWARE_ETH) += designware.o -COBJS-$(CONFIG_DRIVER_DM9000) += dm9000x.o -COBJS-$(CONFIG_DNET) += dnet.o -COBJS-$(CONFIG_E1000) += e1000.o -COBJS-$(CONFIG_E1000_SPI) += e1000_spi.o -COBJS-$(CONFIG_EEPRO100) += eepro100.o -COBJS-$(CONFIG_ENC28J60) += enc28j60.o -COBJS-$(CONFIG_EP93XX) += ep93xx_eth.o -COBJS-$(CONFIG_ETHOC) += ethoc.o -COBJS-$(CONFIG_FEC_MXC) += fec_mxc.o -COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.o -COBJS-$(CONFIG_FTGMAC100) += ftgmac100.o -COBJS-$(CONFIG_FTMAC110) += ftmac110.o -COBJS-$(CONFIG_FTMAC100) += ftmac100.o -COBJS-$(CONFIG_GRETH) += greth.o -COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o -COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o -COBJS-$(CONFIG_KS8851_MLL) += ks8851_mll.o -COBJS-$(CONFIG_LAN91C96) += lan91c96.o -COBJS-$(CONFIG_MACB) += macb.o -COBJS-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o -COBJS-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o -COBJS-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o -COBJS-$(CONFIG_MVGBE) += mvgbe.o -COBJS-$(CONFIG_NATSEMI) += natsemi.o -COBJS-$(CONFIG_DRIVER_NE2000) += ne2000.o ne2000_base.o -COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o ne2000_base.o -COBJS-$(CONFIG_NETCONSOLE) += netconsole.o -COBJS-$(CONFIG_NS8382X) += ns8382x.o -COBJS-$(CONFIG_PCNET) += pcnet.o -COBJS-$(CONFIG_PLB2800_ETHER) += plb2800_eth.o -COBJS-$(CONFIG_RTL8139) += rtl8139.o -COBJS-$(CONFIG_RTL8169) += rtl8169.o -COBJS-$(CONFIG_SH_ETHER) += sh_eth.o -COBJS-$(CONFIG_SMC91111) += smc91111.o -COBJS-$(CONFIG_SMC911X) += smc911x.o -COBJS-$(CONFIG_SUNXI_WEMAC) += sunxi_wemac.o -COBJS-$(CONFIG_DRIVER_TI_EMAC) += davinci_emac.o -COBJS-$(CONFIG_TSEC_ENET) += tsec.o fsl_mdio.o -COBJS-$(CONFIG_DRIVER_TI_CPSW) += cpsw.o -COBJS-$(CONFIG_FMAN_ENET) += fsl_mdio.o -COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o -COBJS-$(CONFIG_ULI526X) += uli526x.o -COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o -COBJS-$(CONFIG_XILINX_AXIEMAC) += xilinx_axi_emac.o -COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o -COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o xilinx_ll_temac_mdio.o \ +obj-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o +obj-$(CONFIG_ALTERA_TSE) += altera_tse.o +obj-$(CONFIG_ARMADA100_FEC) += armada100_fec.o +obj-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o +obj-$(CONFIG_DRIVER_AX88180) += ax88180.o +obj-$(CONFIG_BFIN_MAC) += bfin_mac.o +obj-$(CONFIG_CALXEDA_XGMAC) += calxedaxgmac.o +obj-$(CONFIG_CS8900) += cs8900.o +obj-$(CONFIG_TULIP) += dc2114x.o +obj-$(CONFIG_DESIGNWARE_ETH) += designware.o +obj-$(CONFIG_DRIVER_DM9000) += dm9000x.o +obj-$(CONFIG_DNET) += dnet.o +obj-$(CONFIG_E1000) += e1000.o +obj-$(CONFIG_E1000_SPI) += e1000_spi.o +obj-$(CONFIG_EEPRO100) += eepro100.o +obj-$(CONFIG_ENC28J60) += enc28j60.o +obj-$(CONFIG_EP93XX) += ep93xx_eth.o +obj-$(CONFIG_ETHOC) += ethoc.o +obj-$(CONFIG_FEC_MXC) += fec_mxc.o +obj-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.o +obj-$(CONFIG_FTGMAC100) += ftgmac100.o +obj-$(CONFIG_FTMAC110) += ftmac110.o +obj-$(CONFIG_FTMAC100) += ftmac100.o +obj-$(CONFIG_GRETH) += greth.o +obj-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o +obj-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o +obj-$(CONFIG_KS8851_MLL) += ks8851_mll.o +obj-$(CONFIG_LAN91C96) += lan91c96.o +obj-$(CONFIG_MACB) += macb.o +obj-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o +obj-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o +obj-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o +obj-$(CONFIG_MVGBE) += mvgbe.o +obj-$(CONFIG_NATSEMI) += natsemi.o +obj-$(CONFIG_DRIVER_NE2000) += ne2000.o ne2000_base.o +obj-$(CONFIG_DRIVER_AX88796L) += ax88796.o ne2000_base.o +obj-$(CONFIG_NETCONSOLE) += netconsole.o +obj-$(CONFIG_NS8382X) += ns8382x.o +obj-$(CONFIG_PCNET) += pcnet.o +obj-$(CONFIG_PLB2800_ETHER) += plb2800_eth.o +obj-$(CONFIG_RTL8139) += rtl8139.o +obj-$(CONFIG_RTL8169) += rtl8169.o +obj-$(CONFIG_SH_ETHER) += sh_eth.o +obj-$(CONFIG_SMC91111) += smc91111.o +obj-$(CONFIG_SMC911X) += smc911x.o +obj-$(CONFIG_SUNXI_WEMAC) += sunxi_wemac.o +obj-$(CONFIG_DRIVER_TI_EMAC) += davinci_emac.o +obj-$(CONFIG_TSEC_ENET) += tsec.o fsl_mdio.o +obj-$(CONFIG_DRIVER_TI_CPSW) += cpsw.o +obj-$(CONFIG_FMAN_ENET) += fsl_mdio.o +obj-$(CONFIG_TSI108_ETH) += tsi108_eth.o +obj-$(CONFIG_ULI526X) += uli526x.o +obj-$(CONFIG_VSC7385_ENET) += vsc7385.o +obj-$(CONFIG_XILINX_AXIEMAC) += xilinx_axi_emac.o +obj-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o +obj-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o xilinx_ll_temac_mdio.o \ xilinx_ll_temac_fifo.o xilinx_ll_temac_sdma.o -COBJS-$(CONFIG_ZYNQ_GEM) += zynq_gem.o - -COBJS := $(sort $(COBJS-y)) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_ZYNQ_GEM) += zynq_gem.o
drivers/net/fm/Makefile +19 -40
69 lines not on this page · raw message
drivers/net/npe/Makefile +1 -23
@@ -5,16 +5,12 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libnpe.o - LOCAL_CFLAGS += -I$(TOPDIR)/drivers/net/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux CFLAGS += $(LOCAL_CFLAGS) CPPFLAGS += $(LOCAL_CFLAGS) # needed for depend HOSTCFLAGS += $(LOCAL_CFLAGS) -COBJS-$(CONFIG_IXP4XX_NPE) := npe.o \ +obj-$(CONFIG_IXP4XX_NPE) := npe.o \ miiphy.o \ IxOsalBufferMgt.o \ IxOsalIoMem.o \
@@ -63,21 +59,3 @@ COBJS-$(CONFIG_IXP4XX_NPE) := npe.o \ IxNpeMhSend.o \ IxNpeMhSolicitedCbMgr.o \ IxNpeMhUnsolicitedCbMgr.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
drivers/net/phy/Makefile +19 -41
63 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 9/19 drivers: mtd: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- drivers/mtd/Makefile | 44 +++++-------------- drivers/mtd/nand/Makefile | 102 +++++++++++++++++-------------------------- drivers/mtd/onenand/Makefile | 27 ++---------- drivers/mtd/spi/Makefile | 48 ++++++-------------- drivers/mtd/ubi/Makefile | 28 ++---------- 5 files changed, 70 insertions(+), 179 deletions(-)
drivers/mtd/Makefile +11 -33
@@ -5,38 +5,16 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libmtd.o - ifneq (,$(findstring y,$(CONFIG_MTD_DEVICE)$(CONFIG_CMD_NAND)$(CONFIG_CMD_ONENAND))) -COBJS-y += mtdcore.o +obj-y += mtdcore.o endif -COBJS-$(CONFIG_MTD_PARTITIONS) += mtdpart.o -COBJS-$(CONFIG_MTD_CONCAT) += mtdconcat.o -COBJS-$(CONFIG_HAS_DATAFLASH) += at45.o -COBJS-$(CONFIG_FLASH_CFI_DRIVER) += cfi_flash.o -COBJS-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o -COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o -COBJS-$(CONFIG_FTSMC020) += ftsmc020.o -COBJS-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o -COBJS-$(CONFIG_MW_EEPROM) += mw_eeprom.o -COBJS-$(CONFIG_ST_SMI) += st_smi.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_MTD_PARTITIONS) += mtdpart.o +obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o +obj-$(CONFIG_HAS_DATAFLASH) += at45.o +obj-$(CONFIG_FLASH_CFI_DRIVER) += cfi_flash.o +obj-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o +obj-$(CONFIG_HAS_DATAFLASH) += dataflash.o +obj-$(CONFIG_FTSMC020) += ftsmc020.o +obj-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o +obj-$(CONFIG_MW_EEPROM) += mw_eeprom.o +obj-$(CONFIG_ST_SMI) += st_smi.o
drivers/mtd/nand/Makefile +40 -62
127 lines not on this page · raw message
drivers/mtd/onenand/Makefile +3 -24
@@ -5,30 +5,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libonenand.o - ifndef CONFIG_SPL_BUILD -COBJS-$(CONFIG_CMD_ONENAND) := onenand_uboot.o onenand_base.o onenand_bbt.o -COBJS-$(CONFIG_SAMSUNG_ONENAND) += samsung.o +obj-$(CONFIG_CMD_ONENAND) := onenand_uboot.o onenand_base.o onenand_bbt.o +obj-$(CONFIG_SAMSUNG_ONENAND) += samsung.o else -COBJS-y := onenand_spl.o +obj-y := onenand_spl.o endif - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
drivers/mtd/spi/Makefile +13 -35
54 lines not on this page · raw message
drivers/mtd/ubi/Makefile +3 -25
@@ -5,31 +5,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libubi.o - ifdef CONFIG_CMD_UBI -COBJS-y += build.o vtbl.o vmt.o upd.o kapi.o eba.o io.o wl.o scan.o crc32.o +obj-y += build.o vtbl.o vmt.o upd.o kapi.o eba.o io.o wl.o scan.o crc32.o -COBJS-y += misc.o -COBJS-y += debug.o +obj-y += misc.o +obj-y += debug.o endif - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
Signature · 1 line
1.8.1.2
PATCH 10/19 drivers: usb: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- drivers/usb/eth/Makefile | 28 ++-------------- drivers/usb/gadget/Makefile | 54 ++++++++++--------------------- drivers/usb/host/Makefile | 74 +++++++++++++++---------------------------- drivers/usb/musb-new/Makefile | 36 ++++----------------- drivers/usb/musb/Makefile | 36 ++++----------------- drivers/usb/phy/Makefile | 24 +------------- drivers/usb/ulpi/Makefile | 28 ++-------------- 7 files changed, 62 insertions(+), 218 deletions(-)
drivers/usb/eth/Makefile +3 -25
@@ -3,31 +3,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libusb_eth.o - # new USB host ethernet layer dependencies -COBJS-$(CONFIG_USB_HOST_ETHER) += usb_ether.o +obj-$(CONFIG_USB_HOST_ETHER) += usb_ether.o ifdef CONFIG_USB_ETHER_ASIX -COBJS-y += asix.o +obj-y += asix.o endif -COBJS-$(CONFIG_USB_ETHER_SMSC95XX) += smsc95xx.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_USB_ETHER_SMSC95XX) += smsc95xx.o
drivers/usb/gadget/Makefile +16 -38
72 lines not on this page · raw message
drivers/usb/host/Makefile +26 -48
83 lines not on this page · raw message
drivers/usb/musb-new/Makefile +6 -30
@@ -2,38 +2,14 @@ # for USB OTG silicon based on Mentor Graphics INVENTRA designs # -include $(TOPDIR)/config.mk - -LIB := $(obj)libusb_musb-new.o - -COBJS-$(CONFIG_MUSB_GADGET) += musb_gadget.o musb_gadget_ep0.o musb_core.o -COBJS-$(CONFIG_MUSB_GADGET) += musb_uboot.o -COBJS-$(CONFIG_MUSB_HOST) += musb_host.o musb_core.o musb_uboot.o -COBJS-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o -COBJS-$(CONFIG_USB_MUSB_AM35X) += am35x.o -COBJS-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o +obj-$(CONFIG_MUSB_GADGET) += musb_gadget.o musb_gadget_ep0.o musb_core.o +obj-$(CONFIG_MUSB_GADGET) += musb_uboot.o +obj-$(CONFIG_MUSB_HOST) += musb_host.o musb_core.o musb_uboot.o +obj-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o +obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o +obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o CFLAGS_NO_WARN := $(call cc-option,-Wno-unused-variable) \ $(call cc-option,-Wno-unused-but-set-variable) \ $(call cc-option,-Wno-unused-label) CFLAGS += $(CFLAGS_NO_WARN) - -COBJS := $(sort $(COBJS-y)) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -#$(LIB): $(OBJS) -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### -
drivers/usb/musb/Makefile +7 -29
@@ -5,32 +5,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libusb_musb.o - -COBJS-$(CONFIG_MUSB_HCD) += musb_hcd.o musb_core.o -COBJS-$(CONFIG_MUSB_UDC) += musb_udc.o musb_core.o -COBJS-$(CONFIG_USB_BLACKFIN) += blackfin_usb.o -COBJS-$(CONFIG_USB_DAVINCI) += davinci.o -COBJS-$(CONFIG_USB_OMAP3) += omap3.o -COBJS-$(CONFIG_USB_DA8XX) += da8xx.o -COBJS-$(CONFIG_USB_AM35X) += am35x.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_MUSB_HCD) += musb_hcd.o musb_core.o +obj-$(CONFIG_MUSB_UDC) += musb_udc.o musb_core.o +obj-$(CONFIG_USB_BLACKFIN) += blackfin_usb.o +obj-$(CONFIG_USB_DAVINCI) += davinci.o +obj-$(CONFIG_USB_OMAP3) += omap3.o +obj-$(CONFIG_USB_DA8XX) += da8xx.o +obj-$(CONFIG_USB_AM35X) += am35x.o
drivers/usb/phy/Makefile +1 -23
@@ -5,26 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libusb_phy.o - -COBJS-$(CONFIG_TWL4030_USB) += twl4030.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_TWL4030_USB) += twl4030.o
drivers/usb/ulpi/Makefile +3 -25
@@ -4,28 +4,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libusb_ulpi.o - -COBJS-$(CONFIG_USB_ULPI) += ulpi.o -COBJS-$(CONFIG_USB_ULPI_VIEWPORT) += ulpi-viewport.o -COBJS-$(CONFIG_USB_ULPI_VIEWPORT_OMAP) += omap-ulpi-viewport.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_USB_ULPI) += ulpi.o +obj-$(CONFIG_USB_ULPI_VIEWPORT) += ulpi-viewport.o +obj-$(CONFIG_USB_ULPI_VIEWPORT_OMAP) += omap-ulpi-viewport.o
Signature · 1 line
1.8.1.2
PATCH 11/19 drivers: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- drivers/bios_emulator/Makefile | 23 +------- drivers/block/Makefile | 52 ++++++------------ drivers/bootcount/Makefile | 30 ++--------- drivers/crypto/Makefile | 25 +-------- drivers/dfu/Makefile | 25 ++------- drivers/dma/Makefile | 30 ++--------- drivers/fpga/Makefile | 44 ++++----------- drivers/gpio/Makefile | 73 +++++++++---------------- drivers/hwmon/Makefile | 40 ++++---------- drivers/i2c/Makefile | 70 +++++++++--------------- drivers/input/Makefile | 36 +++---------- drivers/misc/Makefile | 52 ++++++------------ drivers/mmc/Makefile | 69 ++++++++---------------- drivers/pci/Makefile | 44 ++++----------- drivers/pcmcia/Makefile | 34 +++--------- drivers/power/Makefile | 47 +++++----------- drivers/power/battery/Makefile | 25 +-------- drivers/power/fuel_gauge/Makefile | 25 +-------- drivers/power/pmic/Makefile | 31 ++--------- drivers/qe/Makefile | 25 +-------- drivers/rtc/Makefile | 110 +++++++++++++++----------------------- drivers/serial/Makefile | 82 +++++++++++----------------- drivers/sound/Makefile | 30 ++--------- drivers/spi/Makefile | 82 +++++++++++----------------- drivers/tpm/Makefile | 29 ++-------- drivers/twserial/Makefile | 24 +-------- drivers/video/Makefile | 84 +++++++++++------------------ drivers/watchdog/Makefile | 36 +++---------- 28 files changed, 331 insertions(+), 946 deletions(-)
drivers/bios_emulator/Makefile +1 -22
@@ -1,12 +1,8 @@ -include $(TOPDIR)/config.mk - -LIB := $(obj)libatibiosemu.o - X86DIR = x86emu $(shell mkdir -p $(obj)$(X86DIR)) -COBJS-$(CONFIG_BIOSEMU) = atibios.o biosemu.o besys.o bios.o \ +obj-$(CONFIG_BIOSEMU) = atibios.o biosemu.o besys.o bios.o \ $(X86DIR)/decode.o \ $(X86DIR)/ops2.o \ $(X86DIR)/ops.o \
@@ -14,26 +10,9 @@ COBJS-$(CONFIG_BIOSEMU) = atibios.o biosemu.o besys.o bios.o \ $(X86DIR)/sys.o \ $(X86DIR)/debug.o -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - EXTRA_CFLAGS += -I. -I./include -I$(TOPDIR)/include \ -D__PPC__ -D__BIG_ENDIAN__ CFLAGS += $(EXTRA_CFLAGS) HOSTCFLAGS += $(EXTRA_CFLAGS) CPPFLAGS += $(EXTRA_CFLAGS) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
drivers/block/Makefile +15 -37
55 lines not on this page · raw message
drivers/bootcount/Makefile +5 -25
@@ -2,28 +2,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libbootcount.o - -COBJS-y += bootcount.o -COBJS-$(CONFIG_AT91SAM9XE) += bootcount_at91.o -COBJS-$(CONFIG_BLACKFIN) += bootcount_blackfin.o -COBJS-$(CONFIG_SOC_DA8XX) += bootcount_davinci.o -COBJS-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################## +obj-y += bootcount.o +obj-$(CONFIG_AT91SAM9XE) += bootcount_at91.o +obj-$(CONFIG_BLACKFIN) += bootcount_blackfin.o +obj-$(CONFIG_SOC_DA8XX) += bootcount_davinci.o +obj-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o
drivers/crypto/Makefile +1 -24
@@ -5,27 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libcrypto.o - -COBJS-$(CONFIG_EXYNOS_ACE_SHA) += ace_sha.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################## +obj-$(CONFIG_EXYNOS_ACE_SHA) += ace_sha.o
drivers/dfu/Makefile +3 -22
@@ -5,25 +5,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libdfu.o - -COBJS-$(CONFIG_DFU_FUNCTION) += dfu.o -COBJS-$(CONFIG_DFU_MMC) += dfu_mmc.o -COBJS-$(CONFIG_DFU_NAND) += dfu_nand.o - -SRCS := $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_DFU_FUNCTION) += dfu.o +obj-$(CONFIG_DFU_MMC) += dfu_mmc.o +obj-$(CONFIG_DFU_NAND) += dfu_nand.o
drivers/dma/Makefile +4 -26
@@ -5,29 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libdma.o - -COBJS-$(CONFIG_FSLDMAFEC) += MCD_tasksInit.o MCD_dmaApi.o MCD_tasks.o -COBJS-$(CONFIG_APBH_DMA) += apbh_dma.o -COBJS-$(CONFIG_FSL_DMA) += fsl_dma.o -COBJS-$(CONFIG_OMAP3_DMA) += omap3_dma.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_FSLDMAFEC) += MCD_tasksInit.o MCD_dmaApi.o MCD_tasks.o +obj-$(CONFIG_APBH_DMA) += apbh_dma.o +obj-$(CONFIG_FSL_DMA) += fsl_dma.o +obj-$(CONFIG_OMAP3_DMA) += omap3_dma.o
drivers/fpga/Makefile +11 -33
51 lines not on this page · raw message
drivers/gpio/Makefile +25 -48
76 lines not on this page · raw message
drivers/hwmon/Makefile +9 -31
@@ -8,36 +8,14 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - #CFLAGS += -DDEBUG -LIB = $(obj)libhwmon.o - -COBJS-$(CONFIG_DTT_ADM1021) += adm1021.o -COBJS-$(CONFIG_DTT_ADT7460) += adt7460.o -COBJS-$(CONFIG_DTT_DS1621) += ds1621.o -COBJS-$(CONFIG_DTT_DS1722) += ds1722.o -COBJS-$(CONFIG_DTT_DS1775) += ds1775.o -COBJS-$(CONFIG_DTT_LM63) += lm63.o -COBJS-$(CONFIG_DTT_LM73) += lm73.o -COBJS-$(CONFIG_DTT_LM75) += lm75.o -COBJS-$(CONFIG_DTT_LM81) += lm81.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_DTT_ADM1021) += adm1021.o +obj-$(CONFIG_DTT_ADT7460) += adt7460.o +obj-$(CONFIG_DTT_DS1621) += ds1621.o +obj-$(CONFIG_DTT_DS1722) += ds1722.o +obj-$(CONFIG_DTT_DS1775) += ds1775.o +obj-$(CONFIG_DTT_LM63) += lm63.o +obj-$(CONFIG_DTT_LM73) += lm73.o +obj-$(CONFIG_DTT_LM75) += lm75.o +obj-$(CONFIG_DTT_LM81) += lm81.o
drivers/i2c/Makefile +24 -46
73 lines not on this page · raw message
drivers/input/Makefile +7 -29
@@ -5,34 +5,12 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libinput.o - -COBJS-$(CONFIG_I8042_KBD) += i8042.o -COBJS-$(CONFIG_TEGRA_KEYBOARD) += tegra-kbc.o -COBJS-$(CONFIG_CROS_EC_KEYB) += cros_ec_keyb.o +obj-$(CONFIG_I8042_KBD) += i8042.o +obj-$(CONFIG_TEGRA_KEYBOARD) += tegra-kbc.o +obj-$(CONFIG_CROS_EC_KEYB) += cros_ec_keyb.o ifdef CONFIG_PS2KBD -COBJS-y += keyboard.o pc_keyb.o -COBJS-$(CONFIG_PS2MULT) += ps2mult.o ps2ser.o +obj-y += keyboard.o pc_keyb.o +obj-$(CONFIG_PS2MULT) += ps2mult.o ps2ser.o endif -COBJS-y += input.o -COBJS-$(CONFIG_OF_CONTROL) += key_matrix.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += input.o +obj-$(CONFIG_OF_CONTROL) += key_matrix.o
drivers/misc/Makefile +15 -37
55 lines not on this page · raw message
drivers/mmc/Makefile +23 -46
74 lines not on this page · raw message
drivers/pci/Makefile +11 -33
47 lines not on this page · raw message
drivers/pcmcia/Makefile +6 -28
@@ -5,31 +5,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libpcmcia.o - -COBJS-$(CONFIG_I82365) += i82365.o -COBJS-$(CONFIG_8xx) += mpc8xx_pcmcia.o -COBJS-y += rpx_pcmcia.o -COBJS-$(CONFIG_IDE_TI_CARDBUS) += ti_pci1410a.o -COBJS-y += tqm8xx_pcmcia.o -COBJS-$(CONFIG_MARUBUN_PCCARD) += marubun_pcmcia.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_I82365) += i82365.o +obj-$(CONFIG_8xx) += mpc8xx_pcmcia.o +obj-y += rpx_pcmcia.o +obj-$(CONFIG_IDE_TI_CARDBUS) += ti_pci1410a.o +obj-y += tqm8xx_pcmcia.o +obj-$(CONFIG_MARUBUN_PCCARD) += marubun_pcmcia.o
drivers/power/Makefile +12 -35
50 lines not on this page · raw message
drivers/power/battery/Makefile +1 -24
@@ -5,27 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libbattery.o - -COBJS-$(CONFIG_POWER_BATTERY_TRATS) += bat_trats.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################## +obj-$(CONFIG_POWER_BATTERY_TRATS) += bat_trats.o
drivers/power/fuel_gauge/Makefile +1 -24
@@ -5,27 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libfuel_gauge.o - -COBJS-$(CONFIG_POWER_FG_MAX17042) += fg_max17042.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################## +obj-$(CONFIG_POWER_FG_MAX17042) += fg_max17042.o
drivers/power/pmic/Makefile +4 -27
@@ -5,30 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libpmic.o - -COBJS-$(CONFIG_POWER_MAX8998) += pmic_max8998.o -COBJS-$(CONFIG_POWER_MAX8997) += pmic_max8997.o -COBJS-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o -COBJS-$(CONFIG_POWER_MAX77686) += pmic_max77686.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################## +obj-$(CONFIG_POWER_MAX8998) += pmic_max8998.o +obj-$(CONFIG_POWER_MAX8997) += pmic_max8997.o +obj-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o +obj-$(CONFIG_POWER_MAX77686) += pmic_max77686.o
drivers/qe/Makefile +2 -23
@@ -4,26 +4,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libqe.o - -COBJS-$(and $(CONFIG_QE),$(CONFIG_OF_LIBFDT)) += fdt.o -COBJS-$(CONFIG_QE) += qe.o uccf.o uec.o uec_phy.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(and $(CONFIG_QE),$(CONFIG_OF_LIBFDT)) += fdt.o +obj-$(CONFIG_QE) += qe.o uccf.o uec.o uec_phy.o
drivers/rtc/Makefile +44 -66
115 lines not on this page · raw message
drivers/serial/Makefile +30 -52
88 lines not on this page · raw message
drivers/sound/Makefile +4 -26
@@ -5,29 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libsound.o - -COBJS-$(CONFIG_SOUND) += sound.o -COBJS-$(CONFIG_I2S) += samsung-i2s.o -COBJS-$(CONFIG_SOUND_WM8994) += wm8994.o -COBJS-$(CONFIG_SOUND_MAX98095) += max98095.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -# +obj-$(CONFIG_SOUND) += sound.o +obj-$(CONFIG_I2S) += samsung-i2s.o +obj-$(CONFIG_SOUND_WM8994) += wm8994.o +obj-$(CONFIG_SOUND_MAX98095) += max98095.o
drivers/spi/Makefile +30 -52
86 lines not on this page · raw message
drivers/tpm/Makefile +4 -25
@@ -3,31 +3,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libtpm.o - $(shell mkdir -p $(obj)slb9635_i2c) # TODO: Merge tpm_tis_lpc.c with tpm.c -COBJS-$(CONFIG_TPM_ATMEL_TWI) += tpm_atmel_twi.o -COBJS-$(CONFIG_TPM_TIS_I2C) += tpm.o -COBJS-$(CONFIG_TPM_TIS_I2C) += tpm_tis_i2c.o -COBJS-$(CONFIG_TPM_TIS_LPC) += tpm_tis_lpc.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_TPM_ATMEL_TWI) += tpm_atmel_twi.o +obj-$(CONFIG_TPM_TIS_I2C) += tpm.o +obj-$(CONFIG_TPM_TIS_I2C) += tpm_tis_i2c.o +obj-$(CONFIG_TPM_TIS_LPC) += tpm_tis_lpc.o
drivers/twserial/Makefile +1 -23
@@ -5,26 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libtws.o - -COBJS-$(CONFIG_SOFT_TWS) += soft_tws.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_SOFT_TWS) += soft_tws.o
drivers/video/Makefile +31 -53
88 lines not on this page · raw message
drivers/watchdog/Makefile +7 -29
@@ -5,34 +5,12 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libwatchdog.o - -COBJS-$(CONFIG_AT91SAM9_WATCHDOG) += at91sam9_wdt.o -COBJS-$(CONFIG_FTWDT010_WATCHDOG) += ftwdt010_wdt.o +obj-$(CONFIG_AT91SAM9_WATCHDOG) += at91sam9_wdt.o +obj-$(CONFIG_FTWDT010_WATCHDOG) += ftwdt010_wdt.o ifneq (,$(filter $(SOC), mx31 mx35 mx5 mx6 vf610)) -COBJS-y += imx_watchdog.o +obj-y += imx_watchdog.o endif -COBJS-$(CONFIG_TNETV107X_WATCHDOG) += tnetv107x_wdt.o -COBJS-$(CONFIG_S5P) += s5p_wdt.o -COBJS-$(CONFIG_XILINX_TB_WATCHDOG) += xilinx_tb_wdt.o -COBJS-$(CONFIG_BFIN_WATCHDOG) += bfin_wdt.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_TNETV107X_WATCHDOG) += tnetv107x_wdt.o +obj-$(CONFIG_S5P) += s5p_wdt.o +obj-$(CONFIG_XILINX_TB_WATCHDOG) += xilinx_tb_wdt.o +obj-$(CONFIG_BFIN_WATCHDOG) += bfin_wdt.o
Signature · 1 line
1.8.1.2
PATCH 12/19 fs: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- fs/Makefile | 24 +----------------------- fs/cbfs/Makefile | 24 +----------------------- fs/cramfs/Makefile | 29 ++--------------------------- fs/ext4/Makefile | 27 ++------------------------- fs/fat/Makefile | 31 +++---------------------------- fs/fdos/Makefile | 27 +-------------------------- fs/jffs2/Makefile | 38 ++++++-------------------------------- fs/reiserfs/Makefile | 26 +------------------------- fs/sandbox/Makefile | 23 +---------------------- fs/ubifs/Makefile | 29 ++++------------------------- fs/yaffs2/Makefile | 33 +-------------------------------- fs/zfs/Makefile | 25 +------------------------ 12 files changed, 24 insertions(+), 312 deletions(-)
fs/Makefile +1 -23
@@ -6,26 +6,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libfs.o - -COBJS-y += fs.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += fs.o
fs/cbfs/Makefile +1 -23
@@ -3,26 +3,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libcbfs.o - -COBJS-$(CONFIG_CMD_CBFS) := cbfs.o - -SRCS := $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_CMD_CBFS) := cbfs.o
fs/cramfs/Makefile +2 -27
@@ -5,30 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libcramfs.o - -AOBJS = -COBJS-$(CONFIG_CMD_CRAMFS) := cramfs.o -COBJS-$(CONFIG_CMD_CRAMFS) += uncompress.o - -SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y)) - -#CPPFLAGS += - -all: $(LIB) $(AOBJS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_CMD_CRAMFS) := cramfs.o +obj-$(CONFIG_CMD_CRAMFS) += uncompress.o
fs/ext4/Makefile +2 -25
@@ -9,28 +9,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libext4fs.o - -AOBJS = -COBJS-$(CONFIG_FS_EXT4) := ext4fs.o ext4_common.o dev.o -COBJS-$(CONFIG_EXT4_WRITE) += ext4_write.o ext4_journal.o crc16.o - -SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y)) - - -all: $(LIB) $(AOBJS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_FS_EXT4) := ext4fs.o ext4_common.o dev.o +obj-$(CONFIG_EXT4_WRITE) += ext4_write.o ext4_journal.o crc16.o
fs/fat/Makefile +3 -28
@@ -3,34 +3,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libfat.o - -AOBJS = -COBJS-$(CONFIG_FS_FAT) := fat.o -COBJS-$(CONFIG_FAT_WRITE):= fat_write.o +obj-$(CONFIG_FS_FAT) := fat.o +obj-$(CONFIG_FAT_WRITE):= fat_write.o ifndef CONFIG_SPL_BUILD -COBJS-$(CONFIG_FS_FAT) += file.o +obj-$(CONFIG_FS_FAT) += file.o endif - -SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y)) - -all: $(LIB) $(AOBJS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -# SEE README.arm-unaligned-accesses -$(obj)file.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
fs/fdos/Makefile +1 -26
@@ -10,29 +10,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libfdos.o - -AOBJS = -COBJS-$(CONFIG_CMD_FDOS) := fat.o vfat.o dev.o fdos.o fs.o subdir.o - -SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y)) - -#CPPFLAGS += - -all: $(LIB) $(AOBJS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_CMD_FDOS) := fat.o vfat.o dev.o fdos.o fs.o subdir.o
fs/jffs2/Makefile +6 -32
@@ -5,37 +5,11 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libjffs2.o - -AOBJS = ifdef CONFIG_CMD_JFFS2 -COBJS-$(CONFIG_JFFS2_LZO) += compr_lzo.o -COBJS-y += compr_rtime.o -COBJS-y += compr_rubin.o -COBJS-y += compr_zlib.o -COBJS-y += jffs2_1pass.o -COBJS-y += mini_inflate.o +obj-$(CONFIG_JFFS2_LZO) += compr_lzo.o +obj-y += compr_rtime.o +obj-y += compr_rubin.o +obj-y += compr_zlib.o +obj-y += jffs2_1pass.o +obj-y += mini_inflate.o endif - -COBJS := $(COBJS-y) -SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS)) - -#CPPFLAGS += - -all: $(LIB) $(AOBJS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
fs/reiserfs/Makefile +1 -25
@@ -9,28 +9,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libreiserfs.o - -AOBJS = -COBJS-$(CONFIG_CMD_REISER) := reiserfs.o dev.o mode_string.o - -SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y)) - -#CPPFLAGS += - -all: $(LIB) $(AOBJS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_CMD_REISER) := reiserfs.o dev.o mode_string.o
fs/sandbox/Makefile +1 -22
@@ -10,25 +10,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libsandboxfs.o - -COBJS-$(CONFIG_SANDBOX) := sandboxfs.o - -SRCS := $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y)) - -all: $(LIB) $(AOBJS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_SANDBOX) := sandboxfs.o
fs/ubifs/Makefile +4 -25
@@ -9,31 +9,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libubifs.o - -COBJS-$(CONFIG_CMD_UBIFS) := ubifs.o io.o super.o sb.o master.o lpt.o -COBJS-$(CONFIG_CMD_UBIFS) += lpt_commit.o scan.o lprops.o -COBJS-$(CONFIG_CMD_UBIFS) += tnc.o tnc_misc.o debug.o crc16.o budget.o -COBJS-$(CONFIG_CMD_UBIFS) += log.o orphan.o recovery.o replay.o - -SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y)) - -all: $(LIB) $(AOBJS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) +obj-$(CONFIG_CMD_UBIFS) := ubifs.o io.o super.o sb.o master.o lpt.o +obj-$(CONFIG_CMD_UBIFS) += lpt_commit.o scan.o lprops.o +obj-$(CONFIG_CMD_UBIFS) += tnc.o tnc_misc.o debug.o crc16.o budget.o +obj-$(CONFIG_CMD_UBIFS) += log.o orphan.o recovery.o replay.o # SEE README.arm-unaligned-accesses $(obj)super.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
fs/yaffs2/Makefile +1 -32
@@ -16,11 +16,7 @@ # # $Id: Makefile,v 1.15 2007/07/18 19:40:38 charles Exp $ -include $(TOPDIR)/config.mk - -LIB = $(obj)libyaffs2.o - -COBJS-$(CONFIG_YAFFS2) := \ +obj-$(CONFIG_YAFFS2) := \ yaffs_allocator.o yaffs_attribs.o yaffs_bitmap.o yaffs_uboot_glue.o\ yaffs_checkptrw.o yaffs_ecc.o yaffs_error.o \ yaffsfs.o yaffs_guts.o yaffs_nameval.o yaffs_nand.o\
@@ -28,36 +24,9 @@ COBJS-$(CONFIG_YAFFS2) := \ yaffs_summary.o yaffs_tagscompat.o yaffs_verify.o yaffs_yaffs1.o \ yaffs_yaffs2.o yaffs_mtdif.o yaffs_mtdif2.o -SRCS := $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) - YCFLAGS = -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM YCFLAGS += -DCONFIG_YAFFS_YAFFS2 -DNO_Y_INLINE YCFLAGS += -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES CFLAGS += $(YCFLAGS) CPPFLAGS += $(YCFLAGS) - -all: $(LIB) - -$(obj)libyaffs2.a: $(obj).depend $(OBJS) - $(AR) $(ARFLAGS) $@ $(OBJS) - -$(obj)libyaffs2.o: $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -.PHONY: clean distclean -clean: - rm -f $(OBJS) - -distclean: clean - rm -f $(LIB) core *.bak .depend - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
fs/zfs/Makefile +1 -24
@@ -5,27 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libzfs.o - -AOBJS = -COBJS-$(CONFIG_CMD_ZFS) := dev.o zfs.o zfs_fletcher.o zfs_sha256.o zfs_lzjb.o - -SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y)) - - -all: $(LIB) $(AOBJS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_CMD_ZFS) := dev.o zfs.o zfs_fletcher.o zfs_sha256.o zfs_lzjb.o
Signature · 1 line
1.8.1.2
PATCH 13/19 common: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- common/Makefile | 389 ++++++++++++++++++++++++---------------------------- common/spl/Makefile | 36 +---- 2 files changed, 189 insertions(+), 236 deletions(-)
common/Makefile +182 -207
@@ -5,215 +5,211 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libcommon.o - # core ifndef CONFIG_SPL_BUILD -COBJS-y += main.o -COBJS-y += command.o -COBJS-y += exports.o -COBJS-y += hash.o -COBJS-$(CONFIG_SYS_HUSH_PARSER) += hush.o -COBJS-y += s_record.o -COBJS-y += xyzModem.o -COBJS-y += cmd_disk.o +obj-y += main.o +obj-y += command.o +obj-y += exports.o +obj-y += hash.o +obj-$(CONFIG_SYS_HUSH_PARSER) += hush.o +obj-y += s_record.o +obj-y += xyzModem.o +obj-y += cmd_disk.o # boards -COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_f.o -COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o +obj-$(CONFIG_SYS_GENERIC_BOARD) += board_f.o +obj-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o # core command -COBJS-y += cmd_boot.o -COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o -COBJS-y += cmd_help.o -COBJS-y += cmd_version.o +obj-y += cmd_boot.o +obj-$(CONFIG_CMD_BOOTM) += cmd_bootm.o +obj-y += cmd_help.o +obj-y += cmd_version.o # environment -COBJS-y += env_attr.o -COBJS-y += env_callback.o -COBJS-y += env_flags.o -COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o -COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o -XCOBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o -COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o -XCOBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o -COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o -COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o -COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o -COBJS-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o -COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o -COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o -COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o -COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o -COBJS-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o -COBJS-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o -COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o +obj-y += env_attr.o +obj-y += env_callback.o +obj-y += env_flags.o +obj-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o +obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o +extra-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o +obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o +extra-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o +obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o +obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o +obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o +obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o +obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o +obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o +obj-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o +obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o +obj-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o +obj-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o +obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o # command -COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o -COBJS-$(CONFIG_SOURCE) += cmd_source.o -COBJS-$(CONFIG_CMD_SOURCE) += cmd_source.o -COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o -COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o -COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o -COBJS-$(CONFIG_CMD_BOOTMENU) += cmd_bootmenu.o -COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o -COBJS-$(CONFIG_CMD_BOOTSTAGE) += cmd_bootstage.o -COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o -COBJS-$(CONFIG_CMD_CBFS) += cmd_cbfs.o -COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o -COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o -COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o -COBJS-$(CONFIG_CMD_DATE) += cmd_date.o -COBJS-$(CONFIG_CMD_SOUND) += cmd_sound.o +obj-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o +obj-$(CONFIG_SOURCE) += cmd_source.o +obj-$(CONFIG_CMD_SOURCE) += cmd_source.o +obj-$(CONFIG_CMD_BDI) += cmd_bdinfo.o +obj-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o +obj-$(CONFIG_CMD_BMP) += cmd_bmp.o +obj-$(CONFIG_CMD_BOOTMENU) += cmd_bootmenu.o +obj-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o +obj-$(CONFIG_CMD_BOOTSTAGE) += cmd_bootstage.o +obj-$(CONFIG_CMD_CACHE) += cmd_cache.o +obj-$(CONFIG_CMD_CBFS) += cmd_cbfs.o +obj-$(CONFIG_CMD_CONSOLE) += cmd_console.o +obj-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o +obj-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o +obj-$(CONFIG_CMD_DATE) += cmd_date.o +obj-$(CONFIG_CMD_SOUND) += cmd_sound.o ifdef CONFIG_4xx -COBJS-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o +obj-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o endif ifdef CONFIG_POST -COBJS-$(CONFIG_CMD_DIAG) += cmd_diag.o +obj-$(CONFIG_CMD_DIAG) += cmd_diag.o endif -COBJS-$(CONFIG_CMD_DISPLAY) += cmd_display.o -COBJS-$(CONFIG_CMD_DTT) += cmd_dtt.o -COBJS-$(CONFIG_CMD_ECHO) += cmd_echo.o -COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += cmd_eeprom.o -COBJS-$(CONFIG_CMD_EEPROM) += cmd_eeprom.o -COBJS-$(CONFIG_CMD_ELF) += cmd_elf.o -COBJS-$(CONFIG_SYS_HUSH_PARSER) += cmd_exit.o -COBJS-$(CONFIG_CMD_EXT4) += cmd_ext4.o -COBJS-$(CONFIG_CMD_EXT2) += cmd_ext2.o -COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o -COBJS-$(CONFIG_CMD_FDC)$(CONFIG_CMD_FDOS) += cmd_fdc.o -COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o -COBJS-$(CONFIG_CMD_FDOS) += cmd_fdos.o -COBJS-$(CONFIG_CMD_FITUPD) += cmd_fitupd.o -COBJS-$(CONFIG_CMD_FLASH) += cmd_flash.o +obj-$(CONFIG_CMD_DISPLAY) += cmd_display.o +obj-$(CONFIG_CMD_DTT) += cmd_dtt.o +obj-$(CONFIG_CMD_ECHO) += cmd_echo.o +obj-$(CONFIG_ENV_IS_IN_EEPROM) += cmd_eeprom.o +obj-$(CONFIG_CMD_EEPROM) += cmd_eeprom.o +obj-$(CONFIG_CMD_ELF) += cmd_elf.o +obj-$(CONFIG_SYS_HUSH_PARSER) += cmd_exit.o +obj-$(CONFIG_CMD_EXT4) += cmd_ext4.o +obj-$(CONFIG_CMD_EXT2) += cmd_ext2.o +obj-$(CONFIG_CMD_FAT) += cmd_fat.o +obj-$(CONFIG_CMD_FDC)$(CONFIG_CMD_FDOS) += cmd_fdc.o +obj-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o +obj-$(CONFIG_CMD_FDOS) += cmd_fdos.o +obj-$(CONFIG_CMD_FITUPD) += cmd_fitupd.o +obj-$(CONFIG_CMD_FLASH) += cmd_flash.o ifdef CONFIG_FPGA -COBJS-$(CONFIG_CMD_FPGA) += cmd_fpga.o +obj-$(CONFIG_CMD_FPGA) += cmd_fpga.o endif -COBJS-$(CONFIG_CMD_FPGAD) += cmd_fpgad.o -COBJS-$(CONFIG_CMD_FS_GENERIC) += cmd_fs.o -COBJS-$(CONFIG_CMD_FUSE) += cmd_fuse.o -COBJS-$(CONFIG_CMD_GETTIME) += cmd_gettime.o -COBJS-$(CONFIG_CMD_GPIO) += cmd_gpio.o -COBJS-$(CONFIG_CMD_I2C) += cmd_i2c.o -COBJS-$(CONFIG_CMD_HASH) += cmd_hash.o -COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o -COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o -COBJS-$(CONFIG_CMD_INI) += cmd_ini.o -COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o -COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o -COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o -COBJS-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o -COBJS-$(CONFIG_CMD_LDRINFO) += cmd_ldrinfo.o -COBJS-$(CONFIG_CMD_LED) += cmd_led.o -COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o -COBJS-y += cmd_load.o -COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o -COBJS-$(CONFIG_ID_EEPROM) += cmd_mac.o -COBJS-$(CONFIG_CMD_MD5SUM) += cmd_md5sum.o -COBJS-$(CONFIG_CMD_MEMORY) += cmd_mem.o -COBJS-$(CONFIG_CMD_IO) += cmd_io.o -COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o -COBJS-$(CONFIG_MII) += miiphyutil.o -COBJS-$(CONFIG_CMD_MII) += miiphyutil.o -COBJS-$(CONFIG_PHYLIB) += miiphyutil.o -COBJS-$(CONFIG_CMD_MII) += cmd_mii.o +obj-$(CONFIG_CMD_FPGAD) += cmd_fpgad.o +obj-$(CONFIG_CMD_FS_GENERIC) += cmd_fs.o +obj-$(CONFIG_CMD_FUSE) += cmd_fuse.o +obj-$(CONFIG_CMD_GETTIME) += cmd_gettime.o +obj-$(CONFIG_CMD_GPIO) += cmd_gpio.o +obj-$(CONFIG_CMD_I2C) += cmd_i2c.o +obj-$(CONFIG_CMD_HASH) += cmd_hash.o +obj-$(CONFIG_CMD_IDE) += cmd_ide.o +obj-$(CONFIG_CMD_IMMAP) += cmd_immap.o +obj-$(CONFIG_CMD_INI) += cmd_ini.o +obj-$(CONFIG_CMD_IRQ) += cmd_irq.o +obj-$(CONFIG_CMD_ITEST) += cmd_itest.o +obj-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o +obj-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o +obj-$(CONFIG_CMD_LDRINFO) += cmd_ldrinfo.o +obj-$(CONFIG_CMD_LED) += cmd_led.o +obj-$(CONFIG_CMD_LICENSE) += cmd_license.o +obj-y += cmd_load.o +obj-$(CONFIG_LOGBUFFER) += cmd_log.o +obj-$(CONFIG_ID_EEPROM) += cmd_mac.o +obj-$(CONFIG_CMD_MD5SUM) += cmd_md5sum.o +obj-$(CONFIG_CMD_MEMORY) += cmd_mem.o +obj-$(CONFIG_CMD_IO) += cmd_io.o +obj-$(CONFIG_CMD_MFSL) += cmd_mfsl.o +obj-$(CONFIG_MII) += miiphyutil.o +obj-$(CONFIG_CMD_MII) += miiphyutil.o +obj-$(CONFIG_PHYLIB) += miiphyutil.o +obj-$(CONFIG_CMD_MII) += cmd_mii.o ifdef CONFIG_PHYLIB -COBJS-$(CONFIG_CMD_MII) += cmd_mdio.o +obj-$(CONFIG_CMD_MII) += cmd_mdio.o endif -COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o -COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o -COBJS-$(CONFIG_CMD_MMC_SPI) += cmd_mmc_spi.o -COBJS-$(CONFIG_MP) += cmd_mp.o -COBJS-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o -COBJS-$(CONFIG_CMD_NAND) += cmd_nand.o -COBJS-$(CONFIG_CMD_NET) += cmd_net.o -COBJS-$(CONFIG_CMD_ONENAND) += cmd_onenand.o -COBJS-$(CONFIG_CMD_OTP) += cmd_otp.o -COBJS-$(CONFIG_CMD_PART) += cmd_part.o +obj-$(CONFIG_CMD_MISC) += cmd_misc.o +obj-$(CONFIG_CMD_MMC) += cmd_mmc.o +obj-$(CONFIG_CMD_MMC_SPI) += cmd_mmc_spi.o +obj-$(CONFIG_MP) += cmd_mp.o +obj-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o +obj-$(CONFIG_CMD_NAND) += cmd_nand.o +obj-$(CONFIG_CMD_NET) += cmd_net.o +obj-$(CONFIG_CMD_ONENAND) += cmd_onenand.o +obj-$(CONFIG_CMD_OTP) += cmd_otp.o +obj-$(CONFIG_CMD_PART) += cmd_part.o ifdef CONFIG_PCI -COBJS-$(CONFIG_CMD_PCI) += cmd_pci.o +obj-$(CONFIG_CMD_PCI) += cmd_pci.o endif -COBJS-y += cmd_pcmcia.o -COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o -COBJS-$(CONFIG_CMD_PXE) += cmd_pxe.o -COBJS-$(CONFIG_CMD_READ) += cmd_read.o -COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o -COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o -COBJS-$(CONFIG_SANDBOX) += cmd_sandbox.o -COBJS-$(CONFIG_CMD_SATA) += cmd_sata.o -COBJS-$(CONFIG_CMD_SF) += cmd_sf.o -COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o -COBJS-$(CONFIG_CMD_SHA1SUM) += cmd_sha1sum.o -COBJS-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o -COBJS-$(CONFIG_CMD_SOFTSWITCH) += cmd_softswitch.o -COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o -COBJS-$(CONFIG_CMD_SPIBOOTLDR) += cmd_spibootldr.o -COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o -COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o -COBJS-$(CONFIG_CMD_TIME) += cmd_time.o -COBJS-$(CONFIG_CMD_TRACE) += cmd_trace.o -COBJS-$(CONFIG_SYS_HUSH_PARSER) += cmd_test.o -COBJS-$(CONFIG_CMD_TPM) += cmd_tpm.o -COBJS-$(CONFIG_CMD_TSI148) += cmd_tsi148.o -COBJS-$(CONFIG_CMD_UBI) += cmd_ubi.o -COBJS-$(CONFIG_CMD_UBIFS) += cmd_ubifs.o -COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o -COBJS-$(CONFIG_CMD_UNZIP) += cmd_unzip.o +obj-y += cmd_pcmcia.o +obj-$(CONFIG_CMD_PORTIO) += cmd_portio.o +obj-$(CONFIG_CMD_PXE) += cmd_pxe.o +obj-$(CONFIG_CMD_READ) += cmd_read.o +obj-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o +obj-$(CONFIG_CMD_REISER) += cmd_reiser.o +obj-$(CONFIG_SANDBOX) += cmd_sandbox.o +obj-$(CONFIG_CMD_SATA) += cmd_sata.o +obj-$(CONFIG_CMD_SF) += cmd_sf.o +obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o +obj-$(CONFIG_CMD_SHA1SUM) += cmd_sha1sum.o +obj-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o +obj-$(CONFIG_CMD_SOFTSWITCH) += cmd_softswitch.o +obj-$(CONFIG_CMD_SPI) += cmd_spi.o +obj-$(CONFIG_CMD_SPIBOOTLDR) += cmd_spibootldr.o +obj-$(CONFIG_CMD_STRINGS) += cmd_strings.o +obj-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o +obj-$(CONFIG_CMD_TIME) += cmd_time.o +obj-$(CONFIG_CMD_TRACE) += cmd_trace.o +obj-$(CONFIG_SYS_HUSH_PARSER) += cmd_test.o +obj-$(CONFIG_CMD_TPM) += cmd_tpm.o +obj-$(CONFIG_CMD_TSI148) += cmd_tsi148.o +obj-$(CONFIG_CMD_UBI) += cmd_ubi.o +obj-$(CONFIG_CMD_UBIFS) += cmd_ubifs.o +obj-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o +obj-$(CONFIG_CMD_UNZIP) += cmd_unzip.o ifdef CONFIG_CMD_USB -COBJS-y += cmd_usb.o -COBJS-y += usb.o usb_hub.o -COBJS-$(CONFIG_USB_STORAGE) += usb_storage.o +obj-y += cmd_usb.o +obj-y += usb.o usb_hub.o +obj-$(CONFIG_USB_STORAGE) += usb_storage.o endif -COBJS-$(CONFIG_CMD_USB_MASS_STORAGE) += cmd_usb_mass_storage.o -COBJS-$(CONFIG_CMD_XIMG) += cmd_ximg.o -COBJS-$(CONFIG_YAFFS2) += cmd_yaffs2.o -COBJS-$(CONFIG_CMD_SPL) += cmd_spl.o -COBJS-$(CONFIG_CMD_ZIP) += cmd_zip.o -COBJS-$(CONFIG_CMD_ZFS) += cmd_zfs.o +obj-$(CONFIG_CMD_USB_MASS_STORAGE) += cmd_usb_mass_storage.o +obj-$(CONFIG_CMD_XIMG) += cmd_ximg.o +obj-$(CONFIG_YAFFS2) += cmd_yaffs2.o +obj-$(CONFIG_CMD_SPL) += cmd_spl.o +obj-$(CONFIG_CMD_ZIP) += cmd_zip.o +obj-$(CONFIG_CMD_ZFS) += cmd_zfs.o # others -COBJS-$(CONFIG_BOOTSTAGE) += bootstage.o -COBJS-$(CONFIG_CONSOLE_MUX) += iomux.o -COBJS-y += flash.o -COBJS-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o -COBJS-$(CONFIG_I2C_EDID) += edid.o -COBJS-$(CONFIG_KALLSYMS) += kallsyms.o -COBJS-y += splash.o -COBJS-$(CONFIG_LCD) += lcd.o -COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o -COBJS-$(CONFIG_MENU) += menu.o -COBJS-$(CONFIG_MODEM_SUPPORT) += modem.o -COBJS-$(CONFIG_UPDATE_TFTP) += update.o -COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o -COBJS-$(CONFIG_CMD_DFU) += cmd_dfu.o -COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o +obj-$(CONFIG_BOOTSTAGE) += bootstage.o +obj-$(CONFIG_CONSOLE_MUX) += iomux.o +obj-y += flash.o +obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o +obj-$(CONFIG_I2C_EDID) += edid.o +obj-$(CONFIG_KALLSYMS) += kallsyms.o +obj-y += splash.o +obj-$(CONFIG_LCD) += lcd.o +obj-$(CONFIG_LYNXKDI) += lynxkdi.o +obj-$(CONFIG_MENU) += menu.o +obj-$(CONFIG_MODEM_SUPPORT) += modem.o +obj-$(CONFIG_UPDATE_TFTP) += update.o +obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o +obj-$(CONFIG_CMD_DFU) += cmd_dfu.o +obj-$(CONFIG_CMD_GPT) += cmd_gpt.o endif ifdef CONFIG_SPL_BUILD -COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o -COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o +obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o +obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o +obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o # environment -COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o -COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o -COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o +obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o +obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o +obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o ifneq ($(CONFIG_SPL_NET_SUPPORT),y) -COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o -COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o -COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o -COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o -COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o +obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o +obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o +obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o +obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o +obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o else -COBJS-y += env_nowhere.o +obj-y += env_nowhere.o endif endif # core command -COBJS-y += cmd_nvedit.o +obj-y += cmd_nvedit.o #environment -COBJS-y += env_common.o +obj-y += env_common.o #others ifdef CONFIG_DDR_SPD SPD := y
@@ -221,32 +217,20 @@ endif ifdef CONFIG_SPD_EEPROM SPD := y endif -COBJS-$(SPD) += ddr_spd.o -COBJS-$(CONFIG_HWCONFIG) += hwconfig.o -COBJS-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o -COBJS-y += console.o -COBJS-y += dlmalloc.o -COBJS-y += image.o -COBJS-$(CONFIG_OF_LIBFDT) += image-fdt.o -COBJS-$(CONFIG_FIT) += image-fit.o -COBJS-$(CONFIG_FIT_SIGNATURE) += image-sig.o -COBJS-y += memsize.o -COBJS-y += stdio.o - - -COBJS := $(sort $(COBJS-y)) -XCOBJS := $(sort $(XCOBJS-y)) -SRCS := $(COBJS:.o=.c) $(XCOBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -XOBJS := $(addprefix $(obj),$(XCOBJS)) +obj-$(SPD) += ddr_spd.o +obj-$(CONFIG_HWCONFIG) += hwconfig.o +obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o +obj-y += console.o +obj-y += dlmalloc.o +obj-y += image.o +obj-$(CONFIG_OF_LIBFDT) += image-fdt.o +obj-$(CONFIG_FIT) += image-fit.o +obj-$(CONFIG_FIT_SIGNATURE) += image-sig.o +obj-y += memsize.o +obj-y += stdio.o CPPFLAGS += -I.. -all: $(LIB) $(XOBJS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - $(obj)env_embedded.o: $(src)env_embedded.c $(obj)../tools/envcrc $(CC) $(AFLAGS) -Wa,--no-warn \ -DENV_CRC=$(shell $(obj)../tools/envcrc) \
@@ -258,12 +242,3 @@ $(obj)../tools/envcrc: # SEE README.arm-unaligned-accesses $(obj)hush.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) $(obj)fdt_support.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
common/spl/Makefile +7 -29
@@ -8,34 +8,12 @@ # Based on common/Makefile. # -include $(TOPDIR)/config.mk - -LIB = $(obj)libspl.o - ifdef CONFIG_SPL_BUILD -COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o -COBJS-$(CONFIG_SPL_NOR_SUPPORT) += spl_nor.o -COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += spl_ymodem.o -COBJS-$(CONFIG_SPL_NAND_SUPPORT) += spl_nand.o -COBJS-$(CONFIG_SPL_ONENAND_SUPPORT) += spl_onenand.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o -COBJS-$(CONFIG_SPL_MMC_SUPPORT) += spl_mmc.o +obj-$(CONFIG_SPL_FRAMEWORK) += spl.o +obj-$(CONFIG_SPL_NOR_SUPPORT) += spl_nor.o +obj-$(CONFIG_SPL_YMODEM_SUPPORT) += spl_ymodem.o +obj-$(CONFIG_SPL_NAND_SUPPORT) += spl_nand.o +obj-$(CONFIG_SPL_ONENAND_SUPPORT) += spl_onenand.o +obj-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o +obj-$(CONFIG_SPL_MMC_SUPPORT) += spl_mmc.o endif - -COBJS := $(sort $(COBJS-y)) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
Signature · 1 line
1.8.1.2
PATCH 14/19 net: convert a makefile to Kbuild style
In reply to Masahiro Yamada--- net/Makefile | 46 ++++++++++++---------------------------------- 1 file changed, 12 insertions(+), 34 deletions(-)
net/Makefile +12 -34
@@ -5,39 +5,17 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - # CFLAGS += -DDEBUG -LIB = $(obj)libnet.o - -COBJS-$(CONFIG_CMD_NET) += arp.o -COBJS-$(CONFIG_CMD_NET) += bootp.o -COBJS-$(CONFIG_CMD_CDP) += cdp.o -COBJS-$(CONFIG_CMD_DNS) += dns.o -COBJS-$(CONFIG_CMD_NET) += eth.o -COBJS-$(CONFIG_CMD_LINK_LOCAL) += link_local.o -COBJS-$(CONFIG_CMD_NET) += net.o -COBJS-$(CONFIG_CMD_NFS) += nfs.o -COBJS-$(CONFIG_CMD_PING) += ping.o -COBJS-$(CONFIG_CMD_RARP) += rarp.o -COBJS-$(CONFIG_CMD_SNTP) += sntp.o -COBJS-$(CONFIG_CMD_NET) += tftp.o - -COBJS := $(sort $(COBJS-y)) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_CMD_NET) += arp.o +obj-$(CONFIG_CMD_NET) += bootp.o +obj-$(CONFIG_CMD_CDP) += cdp.o +obj-$(CONFIG_CMD_DNS) += dns.o +obj-$(CONFIG_CMD_NET) += eth.o +obj-$(CONFIG_CMD_LINK_LOCAL) += link_local.o +obj-$(CONFIG_CMD_NET) += net.o +obj-$(CONFIG_CMD_NFS) += nfs.o +obj-$(CONFIG_CMD_PING) += ping.o +obj-$(CONFIG_CMD_RARP) += rarp.o +obj-$(CONFIG_CMD_SNTP) += sntp.o +obj-$(CONFIG_CMD_NET) += tftp.o
Signature · 1 line
1.8.1.2
PATCH 15/19 lib: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- lib/Makefile | 114 ++++++++++++++++++++++------------------------------ lib/libfdt/Makefile | 27 +------------ lib/lzma/Makefile | 24 +---------- lib/lzo/Makefile | 24 +---------- lib/rsa/Makefile | 22 +--------- lib/tizen/Makefile | 24 +---------- lib/zlib/Makefile | 22 +--------- 7 files changed, 54 insertions(+), 203 deletions(-)
lib/Makefile +47 -67
@@ -5,78 +5,58 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libgeneric.o - ifndef CONFIG_SPL_BUILD -COBJS-$(CONFIG_AES) += aes.o -COBJS-$(CONFIG_BZIP2) += bzlib.o -COBJS-$(CONFIG_BZIP2) += bzlib_crctable.o -COBJS-$(CONFIG_BZIP2) += bzlib_decompress.o -COBJS-$(CONFIG_BZIP2) += bzlib_randtable.o -COBJS-$(CONFIG_BZIP2) += bzlib_huffman.o -COBJS-$(CONFIG_USB_TTY) += circbuf.o -COBJS-y += crc7.o -COBJS-y += crc16.o -COBJS-$(CONFIG_OF_CONTROL) += fdtdec.o -COBJS-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o -COBJS-$(CONFIG_GZIP) += gunzip.o -COBJS-$(CONFIG_GZIP_COMPRESSED) += gzip.o -COBJS-y += initcall.o -COBJS-$(CONFIG_LMB) += lmb.o -COBJS-y += ldiv.o -COBJS-$(CONFIG_MD5) += md5.o -COBJS-y += net_utils.o -COBJS-$(CONFIG_PHYSMEM) += physmem.o -COBJS-y += qsort.o -COBJS-$(CONFIG_SHA1) += sha1.o -COBJS-$(CONFIG_SHA256) += sha256.o -COBJS-y += strmhz.o -COBJS-$(CONFIG_TPM) += tpm.o -COBJS-$(CONFIG_RBTREE) += rbtree.o -COBJS-$(CONFIG_BITREVERSE) += bitrev.o +obj-$(CONFIG_AES) += aes.o +obj-$(CONFIG_BZIP2) += bzlib.o +obj-$(CONFIG_BZIP2) += bzlib_crctable.o +obj-$(CONFIG_BZIP2) += bzlib_decompress.o +obj-$(CONFIG_BZIP2) += bzlib_randtable.o +obj-$(CONFIG_BZIP2) += bzlib_huffman.o +obj-$(CONFIG_USB_TTY) += circbuf.o +obj-y += crc7.o +obj-y += crc16.o +obj-$(CONFIG_OF_CONTROL) += fdtdec.o +obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o +obj-$(CONFIG_GZIP) += gunzip.o +obj-$(CONFIG_GZIP_COMPRESSED) += gzip.o +obj-y += initcall.o +obj-$(CONFIG_LMB) += lmb.o +obj-y += ldiv.o +obj-$(CONFIG_MD5) += md5.o +obj-y += net_utils.o +obj-$(CONFIG_PHYSMEM) += physmem.o +obj-y += qsort.o +obj-$(CONFIG_SHA1) += sha1.o +obj-$(CONFIG_SHA256) += sha256.o +obj-y += strmhz.o +obj-$(CONFIG_TPM) += tpm.o +obj-$(CONFIG_RBTREE) += rbtree.o +obj-$(CONFIG_BITREVERSE) += bitrev.o endif ifdef CONFIG_SPL_BUILD -COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o +obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o +obj-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o endif -COBJS-$(CONFIG_ADDR_MAP) += addr_map.o -COBJS-y += hashtable.o -COBJS-y += errno.o -COBJS-y += display_options.o -COBJS-$(CONFIG_BCH) += bch.o -COBJS-y += crc32.o -COBJS-y += ctype.o -COBJS-y += div64.o -COBJS-y += hang.o -COBJS-y += linux_string.o -COBJS-$(CONFIG_REGEX) += slre.o -COBJS-y += string.o -COBJS-y += time.o -COBJS-$(CONFIG_TRACE) += trace.o -COBJS-$(CONFIG_BOOTP_PXE) += uuid.o -COBJS-y += vsprintf.o -COBJS-$(CONFIG_RANDOM_MACADDR) += rand.o -COBJS-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o -COBJS-$(CONFIG_CMD_LINK_LOCAL) += rand.o - -COBJS := $(sort $(COBJS-y)) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) +obj-$(CONFIG_ADDR_MAP) += addr_map.o +obj-y += hashtable.o +obj-y += errno.o +obj-y += display_options.o +obj-$(CONFIG_BCH) += bch.o +obj-y += crc32.o +obj-y += ctype.o +obj-y += div64.o +obj-y += hang.o +obj-y += linux_string.o +obj-$(CONFIG_REGEX) += slre.o +obj-y += string.o +obj-y += time.o +obj-$(CONFIG_TRACE) += trace.o +obj-$(CONFIG_BOOTP_PXE) += uuid.o +obj-y += vsprintf.o +obj-$(CONFIG_RANDOM_MACADDR) += rand.o +obj-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o +obj-$(CONFIG_CMD_LINK_LOCAL) += rand.o # SEE README.arm-unaligned-accesses $(obj)bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
lib/libfdt/Makefile +2 -25
@@ -5,30 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libfdt.o - -SOBJS = - COBJS-libfdt += fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_sw.o fdt_wip.o fdt_empty_tree.o -COBJS-$(CONFIG_OF_LIBFDT) += $(COBJS-libfdt) -COBJS-$(CONFIG_FIT) += $(COBJS-libfdt) - - -COBJS := $(sort $(COBJS-y)) -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_OF_LIBFDT) += $(COBJS-libfdt) +obj-$(CONFIG_FIT) += $(COBJS-libfdt)
lib/lzma/Makefile +1 -23
@@ -8,28 +8,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)liblzma.o - -SOBJS = - CFLAGS += -D_LZMA_PROB32 -COBJS-$(CONFIG_LZMA) += LzmaDec.o LzmaTools.o - -COBJS = $(COBJS-y) -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_LZMA) += LzmaDec.o LzmaTools.o
lib/lzo/Makefile +1 -23
@@ -5,26 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)liblzo.o - -SOBJS = - -COBJS-$(CONFIG_LZO) += lzo1x_decompress.o - -COBJS = $(COBJS-y) -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_LZO) += lzo1x_decompress.o
lib/rsa/Makefile +1 -21
@@ -7,26 +7,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)librsa.o - ifdef CONFIG_FIT_SIGNATURE -COBJS-$(CONFIG_RSA) += rsa-verify.o +obj-$(CONFIG_RSA) += rsa-verify.o endif - -COBJS := $(sort $(COBJS-y)) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
lib/tizen/Makefile +1 -23
@@ -5,26 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libtizen.o - -SOBJS = - -COBJS-$(CONFIG_TIZEN) += tizen.o - -COBJS := $(sort $(COBJS-y)) -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_TIZEN) += tizen.o
lib/zlib/Makefile +1 -21
@@ -5,24 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)libz.o - -COBJS-$(CONFIG_ZLIB) += zlib.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_ZLIB) += zlib.o
Signature · 1 line
1.8.1.2
PATCH 16/19 disk: convert a makefile to Kbuild style
In reply to Masahiro Yamada--- disk/Makefile | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-)
disk/Makefile +6 -28
@@ -5,33 +5,11 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - #CFLAGS += -DET_DEBUG -DDEBUG -LIB = $(obj)libdisk.o - -COBJS-$(CONFIG_PARTITIONS) += part.o -COBJS-$(CONFIG_MAC_PARTITION) += part_mac.o -COBJS-$(CONFIG_DOS_PARTITION) += part_dos.o -COBJS-$(CONFIG_ISO_PARTITION) += part_iso.o -COBJS-$(CONFIG_AMIGA_PARTITION) += part_amiga.o -COBJS-$(CONFIG_EFI_PARTITION) += part_efi.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_PARTITIONS) += part.o +obj-$(CONFIG_MAC_PARTITION) += part_mac.o +obj-$(CONFIG_DOS_PARTITION) += part_dos.o +obj-$(CONFIG_ISO_PARTITION) += part_iso.o +obj-$(CONFIG_AMIGA_PARTITION) += part_amiga.o +obj-$(CONFIG_EFI_PARTITION) += part_efi.o
Signature · 1 line
1.8.1.2
PATCH 17/19 sandbox: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- arch/sandbox/cpu/Makefile | 23 +---------------------- arch/sandbox/lib/Makefile | 25 +------------------------ 2 files changed, 2 insertions(+), 46 deletions(-)
arch/sandbox/cpu/Makefile +1 -22
@@ -7,29 +7,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -COBJS := cpu.o os.o start.o state.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) +obj-y := cpu.o os.o start.o state.o # os.c is build in the system environment, so needs standard includes $(obj)os.o: ALL_CFLAGS := $(filter-out -nostdinc,$(ALL_CFLAGS)) $(obj).depend.os: CPPFLAGS := $(filter-out -nostdinc,$(CPPFLAGS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
arch/sandbox/lib/Makefile +1 -24
@@ -7,28 +7,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk -LIB = $(obj)lib$(ARCH).o - -COBJS-y += interrupts.o - -SRCS := $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) - -# Always build libsandbox.o -TARGETS := $(LIB) - -all: $(TARGETS) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += interrupts.o
Signature · 1 line
1.8.1.2
PATCH 18/19 powerpc: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- arch/powerpc/cpu/74xx_7xx/Makefile | 28 +--- arch/powerpc/cpu/mpc512x/Makefile | 51 ++------ arch/powerpc/cpu/mpc5xx/Makefile | 27 +--- arch/powerpc/cpu/mpc5xxx/Makefile | 54 +++----- arch/powerpc/cpu/mpc824x/Makefile | 28 +--- arch/powerpc/cpu/mpc8260/Makefile | 30 +---- arch/powerpc/cpu/mpc83xx/Makefile | 58 +++------ arch/powerpc/cpu/mpc85xx/Makefile | 233 +++++++++++++++------------------- arch/powerpc/cpu/mpc86xx/Makefile | 50 ++------ arch/powerpc/cpu/mpc8xx/Makefile | 58 +++------ arch/powerpc/cpu/mpc8xxx/Makefile | 30 +---- arch/powerpc/cpu/mpc8xxx/ddr/Makefile | 30 +---- arch/powerpc/cpu/ppc4xx/Makefile | 90 +++++-------- arch/powerpc/lib/Makefile | 78 ++++-------- 14 files changed, 266 insertions(+), 579 deletions(-)
arch/powerpc/cpu/74xx_7xx/Makefile +3 -25
@@ -8,28 +8,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -SOBJS = cache.o kgdb.o io.o -COBJS = traps.o cpu.o cpu_init.o speed.o interrupts.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +extra-y = start.o +obj-y = cache.o kgdb.o io.o +obj-y += traps.o cpu.o cpu_init.o speed.o interrupts.o
arch/powerpc/cpu/mpc512x/Makefile +14 -37
58 lines not on this page · raw message
arch/powerpc/cpu/mpc5xx/Makefile +2 -25
@@ -16,28 +16,5 @@ # uses the definitions made in arch/powerpc/cpu/mpc5xx/config.mk # - -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS = serial.o cpu.o cpu_init.o interrupts.o traps.o speed.o spi.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +extra-y = start.o +obj-y = serial.o cpu.o cpu_init.o interrupts.o traps.o speed.o spi.o
arch/powerpc/cpu/mpc5xxx/Makefile +16 -38
60 lines not on this page · raw message
arch/powerpc/cpu/mpc824x/Makefile +4 -24
@@ -5,35 +5,15 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk ifneq ($(OBJTREE),$(SRCTREE)) $(shell mkdir -p $(obj)drivers/epic $(obj)drivers/i2c) endif -LIB = $(obj)lib$(CPU).o - -START = start.o -COBJS = traps.o cpu.o cpu_init.o interrupts.o speed.o \ +extra-y = start.o +obj-y = traps.o cpu.o cpu_init.o interrupts.o speed.o \ drivers/epic/epic1.o drivers/i2c/i2c.o pci.o -COBJS_LN = bedbug_603e.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix $(obj),$(COBJS_LN:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS_LN)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) +obj-y += bedbug_603e.o +SRCS += $(obj)bedbug_603e.c $(obj)bedbug_603e.c: ln -sf $(src)../mpc8260/bedbug_603e.c $(obj)bedbug_603e.c - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
arch/powerpc/cpu/mpc8260/Makefile +3 -27
@@ -5,33 +5,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(CPU).o - -START = start.o kgdb.o -COBJS = traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \ +extra-y = start.o kgdb.o +obj-y = traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \ interrupts.o ether_fcc.o i2c.o commproc.o \ bedbug_603e.o pci.o spi.o -COBJS-$(CONFIG_ETHER_ON_SCC) = ether_scc.o - -COBJS += $(COBJS-y) - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -START := $(addprefix $(obj),$(START)) - -all: $(obj).depend $(START) $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS) $(obj)kgdb.o) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_ETHER_ON_SCC) += ether_scc.o
arch/powerpc/cpu/mpc83xx/Makefile +18 -40
88 lines not on this page · raw message
arch/powerpc/cpu/mpc85xx/Makefile +104 -129
263 lines not on this page · raw message
arch/powerpc/cpu/mpc86xx/Makefile +14 -36
56 lines not on this page · raw message
arch/powerpc/cpu/mpc8xx/Makefile +18 -40
63 lines not on this page · raw message
arch/powerpc/cpu/mpc8xxx/Makefile +7 -23
@@ -6,10 +6,6 @@ # Version 2 as published by the Free Software Foundation. # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib8xxx.o - MINIMAL= ifdef CONFIG_SPL_BUILD
@@ -20,30 +16,18 @@ endif ifdef MINIMAL -COBJS-$(CONFIG_FSL_LAW) += law.o +obj-$(CONFIG_FSL_LAW) += law.o else ifneq ($(CPU),mpc83xx) -COBJS-y += cpu.o +obj-y += cpu.o endif -COBJS-$(CONFIG_OF_LIBFDT) += fdt.o -COBJS-$(CONFIG_FSL_IFC) += fsl_ifc.o -COBJS-$(CONFIG_FSL_LBC) += fsl_lbc.o -COBJS-$(CONFIG_SYS_SRIO) += srio.o -COBJS-$(CONFIG_FSL_LAW) += law.o +obj-$(CONFIG_OF_LIBFDT) += fdt.o +obj-$(CONFIG_FSL_IFC) += fsl_ifc.o +obj-$(CONFIG_FSL_LBC) += fsl_lbc.o +obj-$(CONFIG_SYS_SRIO) += srio.o +obj-$(CONFIG_FSL_LAW) += law.o endif - -SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend
arch/powerpc/cpu/mpc8xxx/ddr/Makefile +7 -23
@@ -6,17 +6,13 @@ # Version 2 as published by the Free Software Foundation. # -include $(TOPDIR)/config.mk - -LIB = $(obj)libddr.o - -COBJS-$(CONFIG_FSL_DDR1) += main.o util.o ctrl_regs.o options.o \ +obj-$(CONFIG_FSL_DDR1) += main.o util.o ctrl_regs.o options.o \ lc_common_dimm_params.o -COBJS-$(CONFIG_FSL_DDR2) += main.o util.o ctrl_regs.o options.o \ +obj-$(CONFIG_FSL_DDR2) += main.o util.o ctrl_regs.o options.o \ lc_common_dimm_params.o -COBJS-$(CONFIG_FSL_DDR3) += main.o util.o ctrl_regs.o options.o \ +obj-$(CONFIG_FSL_DDR3) += main.o util.o ctrl_regs.o options.o \ lc_common_dimm_params.o ifdef CONFIG_DDR_SPD SPD := y
@@ -25,21 +21,9 @@ ifdef CONFIG_SPD_EEPROM SPD := y endif ifdef SPD -COBJS-$(CONFIG_FSL_DDR1) += ddr1_dimm_params.o -COBJS-$(CONFIG_FSL_DDR2) += ddr2_dimm_params.o -COBJS-$(CONFIG_FSL_DDR3) += ddr3_dimm_params.o +obj-$(CONFIG_FSL_DDR1) += ddr1_dimm_params.o +obj-$(CONFIG_FSL_DDR2) += ddr2_dimm_params.o +obj-$(CONFIG_FSL_DDR3) += ddr3_dimm_params.o endif -COBJS-$(CONFIG_FSL_DDR_INTERACTIVE) += interactive.o - -SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) - -all: $(obj).depend $(LIB) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend +obj-$(CONFIG_FSL_DDR_INTERACTIVE) += interactive.o
arch/powerpc/cpu/ppc4xx/Makefile +34 -56
105 lines not on this page · raw message
arch/powerpc/lib/Makefile +22 -56
115 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 19/19 board: ti: convert makefiles to Kbuild style
In reply to Masahiro Yamada--- board/ti/am335x/Makefile | 29 ++--------------------------- board/ti/am3517crane/Makefile | 19 +------------------ board/ti/am43xx/Makefile | 29 ++--------------------------- board/ti/beagle/Makefile | 24 ++---------------------- board/ti/dra7xx/Makefile | 27 +-------------------------- board/ti/evm/Makefile | 19 +------------------ board/ti/omap1510inn/Makefile | 24 ++---------------------- board/ti/omap5912osk/Makefile | 24 ++---------------------- board/ti/omap5_uevm/Makefile | 27 +-------------------------- board/ti/omap730p2/Makefile | 24 ++---------------------- board/ti/panda/Makefile | 21 +-------------------- board/ti/sdp3430/Makefile | 21 +-------------------- board/ti/sdp4430/Makefile | 23 ++--------------------- board/ti/ti814x/Makefile | 29 ++--------------------------- board/ti/ti816x/Makefile | 27 +-------------------------- board/ti/tnetv107xevm/Makefile | 25 +------------------------ 16 files changed, 24 insertions(+), 368 deletions(-)
board/ti/am335x/Makefile +2 -27
@@ -6,33 +6,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_NOR_BOOT),y) -COBJS := mux.o +obj-y := mux.o endif -COBJS += board.o -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -clean: - rm -f $(SOBJS) $(OBJS) - -distclean: clean - rm -f $(LIB) core *.bak $(obj).depend - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += board.o
board/ti/am3517crane/Makefile +1 -18
@@ -8,21 +8,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := am3517crane.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend +obj-y := am3517crane.o
board/ti/am43xx/Makefile +2 -27
@@ -6,33 +6,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - ifdef CONFIG_SPL_BUILD -COBJS := mux.o +obj-y := mux.o endif -COBJS += board.o -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -clean: - rm -f $(SOBJS) $(OBJS) - -distclean: clean - rm -f $(LIB) core *.bak $(obj).depend - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += board.o
board/ti/beagle/Makefile +2 -22
@@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS-y := $(BOARD).o -COBJS-$(CONFIG_STATUS_LED) += led.o - -COBJS := $(sort $(COBJS-y)) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := $(BOARD).o +obj-$(CONFIG_STATUS_LED) += led.o
board/ti/dra7xx/Makefile +1 -26
@@ -5,29 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := evm.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -clean: - rm -f $(OBJS) - -distclean: clean - rm -f $(LIB) core *.bak $(obj).depend - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := evm.o
board/ti/evm/Makefile +1 -18
@@ -5,21 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := evm.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend +obj-y := evm.o
board/ti/omap1510inn/Makefile +2 -22
@@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := omap1510innovator.o -SOBJS := lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := omap1510innovator.o +obj-y += lowlevel_init.o
board/ti/omap5912osk/Makefile +2 -22
@@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := omap5912osk.o -SOBJS := lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := omap5912osk.o +obj-y += lowlevel_init.o
board/ti/omap5_uevm/Makefile +1 -26
@@ -5,29 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := evm.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -clean: - rm -f $(OBJS) - -distclean: clean - rm -f $(LIB) core *.bak $(obj).depend - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := evm.o
board/ti/omap730p2/Makefile +2 -22
@@ -5,25 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := omap730p2.o flash.o -SOBJS := lowlevel_init.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := omap730p2.o flash.o +obj-y += lowlevel_init.o
board/ti/panda/Makefile +1 -20
@@ -5,23 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := panda.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := panda.o
board/ti/sdp3430/Makefile +1 -20
@@ -5,23 +5,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := sdp.o - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := sdp.o
board/ti/sdp4430/Makefile +2 -21
@@ -5,27 +5,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := sdp.o +obj-y := sdp.o ifndef CONFIG_SPL_BUILD -COBJS += cmd_bat.o +obj-y += cmd_bat.o endif - -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
board/ti/ti814x/Makefile +2 -27
@@ -6,33 +6,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - ifdef CONFIG_SPL_BUILD -COBJS := mux.o +obj-y := mux.o endif -COBJS += evm.o -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -clean: - rm -f $(SOBJS) $(OBJS) - -distclean: clean - rm -f $(LIB) core *.bak $(obj).depend - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += evm.o
board/ti/ti816x/Makefile +1 -26
@@ -9,29 +9,4 @@ # SPDX-License-Identifier: GPL-2.0 # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := evm.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -clean: - rm -f $(OBJS) - -distclean: clean - rm -f $(LIB) core *.bak $(obj).depend - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y := evm.o
board/ti/tnetv107xevm/Makefile +1 -24
@@ -2,27 +2,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS += sdb_board.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -.PHONY: all - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### -# This is for $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-y += sdb_board.o
Signature · 1 line
1.8.1.2
cover First step towards Kbuild: Use Kbuild style makefiles
In reply to Masahiro YamadaQuoted 9 lines
0002-0019 change sub makefiles into a
Kbuildsuitable form using obj-y. In order to avoid creating a big patch file, they are divided by CPU architectures and categories.0002-0007: refactor under
arch/arm/
0008-0016: refactor libraries which are common for all architectures
0017 : refactor underarch/powerpc/
0018 : refactor under board/ti/
Please let me correct this part.
0017 : refactor under arch/sandbox 0018 : refactor under arch/powerpc/ 0019 : refactor under board/ti/
Best Regards
Masahiro Yamada
cover First step towards Kbuild: Use Kbuild style makefiles
In reply to Masahiro YamadaQuoted 10 lines · Masahiro Yamada
First of all, this series convert makefiles in sub directories to
Kbuildstyle.What this series do is quite simple:
- Moving common lines in sub makefiles to a new file 'scripts/Makefile.build'
- Renaming COBJS-y and SOBJS-y to obj-y in each sub makefile.
- A little bit more tweaksThat's all.
OK, so you claim that nothing changes, except for the build instructions, and that this is done in routine ways following simple rules. Source code need not get touched and is not affected, features aren't broken, migration can be done in several steps, etc ... (this is a good thing, see below)
Quoted 10 lines
Note1:
This series breaks _NO_ features in U-Boot.
Beucase it just moves common parts intoscripts/Makefile.buildI believe no boards are broken by this refactoring, but
it is humans who can make a mistake.
So, it is very important to do build check before patches are applied.I tested for ARM and Sandbox like this:
Quoted 7 lines
$ CROSS_COMPILE_ARM=arm-linux-gnueabi- ./MAKEALL -a arm -a sandboxand I got:
--------------------- SUMMARY ---------------------------- Boards compiled: 336 ----------------------------------------------------------
This test only proves that the code compiles, nothing else. Even for a single board you may not run-test all features, given the many functions and high interactivity and options that U-Boot provides. This becomes worse when your change affects several more boards or even the whole tree (which is the case here).
I'd suggest a more formal approach to test or verification. Being able to build the code (not having broken the compile phase) is just a prerequisite. But you want to prove that no harm was done, i.e. that the code still is operational (at least that it works as good as it did before the manipulation).
For editor sweep types of changes (for example renaming identifiers while program flow and logic won't change) one may verify that the changed textual representation of the source still results in the same output for the machine. This can be achieved by e.g. md5 summing the object files or executables (there may be differences, but only in the "envelope" which carries timestamps or filenames, not in the generated code itself).
Can you come up with a way to map executables generated by one approach to executables generated by the other approach? If you still output the same set of files in the same locations, this might already be given. Can you then programmatically compare the output files (either objects, or executables, depending on which has less "false positives" or which involves less manual comparison steps)? This dramatically would increase certainty that your modification does no harm, and is desirable.
Verifying that your modification to the build instructions still results in the same binary output -- if done programmatically -- can free you of having to run-test the software (which is complex, or impossible in the absence of hardware), and judge whether you liked the result (which may be non-trivial as well when you don't know what to expect). Identical binary output allows you to claim that the software will work the way it did before your change without doubt. :)
Quoted 4 lines
I could not test other architectures because I don't have suitable compiler. Especially PowerPC boards must be checked since I changed under
arch/powerpc/in 0017.
I will be grateful for any custodians' help.
Getting cross compilers for other architectures should be easy. There's a prebuilt collection at kernel.org, so that you just need to download any of them as the need arises. See ftp://ftp.kernel.org/pub/tools/crosstool/
virtually yours
Gerhard Sittig
Signature · 3 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
cover First step towards Kbuild: Use Kbuild style makefiles
Hello Gerhard.
Quoted 11 lines
This test only proves that the code compiles, nothing else. Even for a single board you may not run-test all features, given the many functions and high interactivity and options that U-Boot provides. This becomes worse when your change affects several more boards or even the whole tree (which is the case here).
I'd suggest a more formal approach to test or verification. Being able to build the code (not having broken the compile phase) is just a prerequisite. But you want to prove that no harm was done, i.e. that the code still is operational (at least that it works as good as it did before the manipulation).
I thought compiling with no errors/warnings means no harm because no source files except makefiles were touched in this patch series.
That's why I believed the only build check is sufficient and I did not try run-test.
But your suggestion sounds interesting.
If we could programmatically compare the generated executables in an easy way, that would be worth checking.
So I gave it a try.
Finally it turned out to be much harder than I had expected. (Almost nightware)
Anyway, let's see what I did one by one.
(1) Time stamp
Because U-boot executable includes a timestamp,
Everytime U-Boot is compiled, include/generated/timestamp_autogenerated.h is updated, which results in different outcome.
So, I tweaked include/timestamp.h not to include it:
#ifndef DO_DEPS_ONLY
-#include "generated/timestamp_autogenerated.h" +/* #include "generated/timestamp_autogenerated.h" */ +#define U_BOOT_DATE "DUMMY"
+#define U_BOOT_TIME "DUMMY"
#endif
(2) Git commit hash
Git commit hash is contained in include/generated/version_autogenerated.h. So, I also modified include/version.h not to include it as follows:
#ifndef DO_DEPS_ONLY
-#include "generated/version_autogenerated.h"
+/* #include "generated/version_autogenerated.h" */
+#define PLAIN_VERSION "__DUMMY__"
+#define U_BOOT_VERSION "__DUMMY__"
+#define CC_VERSION_STRING "__DUMMY__"
+#define LD_VERSION_STRING "__DUMMY__"
#endif(3) Show md5sum
I added a line to MAKEALL script to show md5sum of u-boot and u-boot-spl.
${CROSS_COMPILE}size ${OBJS} | tee -a ${LOG_DIR}/$target.MAKELOG
+ md5sum ${OBJS}
+
[ -e "${LOG_DIR}/${target}.ERR" ] && cat "${LOG_DIR}/${target}.ERR"(4) Make sure to build in the same path
The output executables (ELF) depends on the directory path where it was built. (Of course, the "u-boot.bin" does not carry this information.)
So, we need to make sure to build in the same path in order to get indentical ELF files.
(5) Take care of the difference of symbols order
The output file depends on the order of the object files at the link stage. Even if you change the order of the *.o files, you can still get a correct outcome. But now we want to compare md5sum, so we must keep the same order.
Let's closely look some makefiles.
Some of makefiles sort object files before linking, and others do not.
For example, let's see "common/Makefile" first.
COBJS := $(sort $(COBJS-y))
---< snip >---
OBJS := $(addprefix $(obj),$(COBJS))
---< snip >---
$(LIB): $(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))Before linked into common/libcommon.o, the object files are sorted in alphabetical order by $(sort ...) function.
For another example, let's take a look arch/arm/cpu/armv7/am33xx/Makefile.
COBJS-$(CONFIG_AM33XX) += clock_am33xx.o
COBJS-$(CONFIG_TI814X) += clock_ti814x.o
COBJS-$(CONFIG_AM43XX) += clock_am43xx.o ifneq ($(CONFIG_AM43XX)$(CONFIG_AM33XX),)
COBJS += clock.o
endif
COBJS-$(CONFIG_TI816X) += clock_ti816x.o
COBJS += sys_info.o
COBJS += mem.o
COBJS += ddr.o
COBJS += emif4.o
COBJS += board.o
COBJS += mux.o
COBJS-$(CONFIG_NAND_OMAP_GPMC) += elm.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS))Be aware that both "COBJS-y" and "COBJS" are used
and $(COBJS) $(COBJS-y) are added in this order to $(OBJS). So the resulting $(OBJS) contains the *.o files in the following order:
clock.o sys_info.o mem.o ddr.o emif4.o board.o mux.o clock_am33xx.o clock_ti814.o .....
In this commit series, I converted both COBJS-y and COBJS into obj-y. So, after applying this patch series, the object files are listed in different order.
In the conventional U-Boot Makefiles, the order of object files which are linked together is depending on makefiles.
- Some of them sort objects in alphabetical order with $(sort ...) function.
- Some of them keep the order in which they apper.
- Other cases (like arch/arm/cpu/armv7/am33xx/Makefile)
This variation makes it very difficult to programatically compare the output files.
So, I standerdized the order of the object files to alphabetical order. I added $(sort ...) function to the linkage rule in each sub makefile like follows:
$(LIB): $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
+ $(call cmd_link_o_target, $(sort $(OBJS)))
(6) Another timestamp problem
Even after I eliminated a timestamp header problem in (1), I still found a board that produces different output at every compile.
See board/cray/L1/Makefile.
---< snip >---
$(obj)bootscript.c: $(obj)bootscript.image
od -t x1 -v -A x $^ | awk -f x2c.awk > $@
$(obj)bootscript.image: $(src)bootscript.hush $(src)Makefile
-$(OBJTREE)/tools/mkimage -A ppc -O linux -T script -C none -a 0 -e 0 -n bootscript -d (src)bootscript.hush $@
---< snip >---The source code, board/cray/L1/bootscript.c is
generated from board/cray/L1/bootscript.image.
The timestamp information is embedded in bootscript.image by mkimage tool.
I gave up to solve this problem.
(7) Fix PowerPC code
I am only familiar with ARM architecture, but anyway I needed to compile over all architectures. While working on PowerPC, I noticed lots of PowerPC boards failed in compiling on v2013-10-rc2 tag.
What I did is:
CROSS_COMPILE_POWERPC=powerpc-linux-gnu- ./MAKEALL -a powerpc
The result is:
--------------------- SUMMARY ----------------------------
Boards compiled: 660
Boards with errors: 139 ( HWW1U1A MPC8572DS MPC8572DS_36BIT MPC8572DS_NAND P1020MBG-PC P1020MBG-PC_36BIT P1020MBG-PC_36BIT_SDCARD P1020MBG-PC_SDCARD P1020RDB P1020RDB_36BIT P1020RDB_36BIT_SDCARD P1020RDB_36BIT_SPIFLASH P1020RDB_NAND P1020RDB-PC P1020RDB-PC_36BIT P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_SPIFLASH P1020RDB_SDCARD P1020RDB_SPIFLASH P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH P1020UTM-PC P1020UTM-PC_36BIT P1020UTM-PC_36BIT_SDCARD P1020UTM-PC_SDCARD P1021RDB-PC P1021RDB-PC_36BIT P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1022DS P1022DS_NAND P1022DS_36BIT_NAND P1022DS_SPIFLASH P1022DS_36BIT_SPIFLASH P1022DS_SDCARD P1022DS_36BIT_SDCARD P1022DS_36BIT P1023RDB P1023RDS P1023RDS_NAND P1024RDB P1024RDB_36BIT P1024RDB_NAND P1024RDB_SDCARD P1024RDB_SPIFLASH P1025RDB P1025RDB_36BIT P1025RDB_NAND P1025RDB_SDCARD P1025RDB_SPIFLASH TWR-P1025 P2020COME_SDCARD P2020COME_SPIFLASH P2020DS P2020DS_36BIT P2020DS_DDR2 P2020DS_SDCARD P2020DS_SPIFLASH P2020RDB P2020RDB_36BIT P2020RDB_36BIT_SDCARD P2020RDB_36BIT_SPIFLASH P2020RDB_NAND P2020RDB-PC P2020RDB-PC_36BIT P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB_SDCARD P2020RDB_SPIFLASH P2041RDB P2041RDB_NAND P2041RDB_SDCARD P2041RDB_SECURE_BOOT P2041RDB_SPIFLASH P2041RDB_SRIO_PCIE_BOOT P3041DS P3041DS_NAND P3041DS_SDCARD P3041DS_SECURE_BOOT P3041DS_SPIFLASH P3041DS_SRIO_PCIE_BOOT P4080DS P4080DS_SDCARD P4080DS_SECURE_BOOT P4080DS_SPIFLASH P4080DS_SRIO_PCIE_BOOT P5020DS P5020DS_NAND P5020DS_SDCARD P5020DS_SECURE_BOOT P5020DS_SPIFLASH P5020DS_SRIO_PCIE_BOOT P5040DS P5040DS_NAND P5040DS_SDCARD P5040DS_SPIFLASH BSC9132QDS_NOR_DDRCLK100 BSC9132QDS_NOR_DDRCLK133 BSC9132QDS_NAND_DDRCLK100 BSC9132QDS_NAND_DDRCLK133 BSC9132QDS_SDCARD_DDRCLK100 BSC9132QDS_SDCARD_DDRCLK133 BSC9132QDS_SPIFLASH_DDRCLK100 BSC9132QDS_SPIFLASH_DDRCLK133 controlcenterd_36BIT_SDCARD controlcenterd_36BIT_SDCARD_DEVELOP controlcenterd_TRAILBLAZER controlcenterd_TRAILBLAZER_DEVELOP T4240QDS T4240EMU T4240QDS_SDCARD T4240QDS_SPIFLASH T4240QDS_SRIO_PCIE_BOOT T4160QDS T4160QDS_SDCARD T4160QDS_SPIFLASH B4860QDS B4860QDS_NAND B4860QDS_SPIFLASH B4860QDS_SRIO_PCIE_BOOT B4420QDS B4420QDS_NAND B4420QDS_SPIFLASH xpedite537x xpedite550x ) Boards with warnings but no errors: 3 ( MPC8572DS_36BIT SPD823TS taishan )
The reason of the error seemed to locate in arch/powerpc/cpu/mpc85xx/release.S
release.S:137: Error: value of 4294963524 too large for field of 2 bytes at 174
release.S:138: Error: operand out of range (0xfffffffffffff144 is not between 0x0000000000000000 and 0x000000000000ffff)
release.S:138: Error: value of 4294963524 too large for field of 2 bytes at 178
release.S:281: Error: value of 4294963524 too large for field of 2 bytes at 210
release.S:282: Error: operand out of range (0xfffffffffffff144 is not between 0x0000000000000000 and 0x000000000000ffff)
release.S:282: Error: value of 4294963524 too large for field of 2 bytes at 214
release.S:306: Error: value of 4294963520 too large for field of 2 bytes at 282
release.S:307: Error: operand out of range (0xfffffffffffff140 is not between 0x0000000000000000 and 0x000000000000ffff)
release.S:307: Error: value of 4294963520 too large for field of 2 bytes at 286I am not familiar with PowerPC at all and I am not sure my build procedure was correct either, but anyway I could not compile lots of boards even on the u-boot/master.
I needed the final output files in order to get md5sum matching.
So I forcibly made the compiling passed by simply commenting out the code which caused the error like follows:
/* get our PIR to figure out our table entry */
- lis r3,toreset(__spin_table_addr)@h
- ori r3,r3,toreset(__spin_table_addr)@l
+/* lis r3,toreset(__spin_table_addr)@h
+ ori r3,r3,toreset(__spin_table_addr)@l */
lwz r3,0(r3)
Even after this workaround, I could not compile 3 boards ( MPC8572DS_36BIT SPD823TS taishan ) for PowerPC architecture.
$ cat LOG/MPC8572DS_36BIT.ERR
powerpc-linux-gnu-ld.bfd: section .bootpg loaded at [00000000effff000,00000000effff4bb] overlaps section .u_boot_list loaded at [00000000efffeb84,00000000effff41b]
powerpc-linux-gnu-ld.bfd: u-boot: section .bootpg lma 0xeffff000 adjusted to 0xeffff41c
make: *** [u-boot] Error 1
$ cat LOG/SPD823TS.ERR
u-boot.lds:12 cannot move location counter backwards (from 00000000ff008008 to 00000000ff008000)
make: *** [u-boot] Error 1
$ cat LOG/taishan.ERR
powerpc-linux-gnu-ld.bfd: section .bootpg loaded at [00000000fffff000,00000000fffff24f] overlaps section .u_boot_list loaded at [00000000ffffe7ec,00000000fffff157]
powerpc-linux-gnu-ld.bfd: u-boot: section .bootpg lma 0xfffff000 adjusted to 0xfffff158
make: *** [u-boot] Error 1I gave up these 3 boards.
(8) Other minor architectures
For arm, avr32, sandbox, x86 architectures, I succeeded in compiling all boards, without any errors/warnings. For powerpc, I could compiled most of boards by modifing one file as shown in (7).
I could not find cross compilers for nds32 and nios2 in ftp://ftp.kernel.org/pub/tools/crosstool/.
I omitted nds32 (3 boards) and nios2 (3 boards)
For blackfin, m68k, microblaze,mips, openrisc, sh, sparc architecures, I could compile some boards and I could not others.
But the "SUMMARY" result was still the same after applying this series, that is,
- Boards with errors list
- Boards with warnings but no errors list
- error / warnings messages
were the same.
This means compiling succeeded the same way it did, and compiling failed the same way it did.
Comparison of md5sum was done for only boards which could generate the final ELF file.
(9) How to check the md5sum diffs
The following is my procedure for comparing md5sum.
I got arm-linux-gnueabi-gcc and powerpc-linux-gnu-gcc by Ubuntu apt-get. I downloaded other cross compilers from ftp://ftp.kernel.org/pub/tools/crosstool/. (Gerhard taught me this site, Thanks!)
Assume we have two repositories, "u-boot-org" and "u-boot-kbuild".
u-boot-org is:
v2013.10-rc2 tag
+ Time stamp tweak as shown in (1)
+ Git hash tweak as shown in (2)
+ Show md5sum as shown in (3)
+ Sort *.o files in alphabetical order as shown in (5)
+ Fix PowerPC code as shown in (7)
u-boot-kbuild is:
v2013.10-rc2 tag
+ This patch series (0001-0019)
+ Time stamp tweak as shown in (1)
+ Git hash tweak as shown in (2)
+ Show md5sum as shown in (3)
+ Fix PowerPC code as shown in (7)
I took care to build in the same directory path.
mv u-boot-org u-boot
cd u-boot
CROSS_COMPILE=arm-linux-gnueabi- ./MAKEALL -a arm 2>&1 | tee u-boot-org.log.arm
... (do this for all architectures)
cd ..
mv u-boot u-boot-org
mv u-boot-kbuild u-boot
cd u-boot
CROSS_COMPILE=arm-linux-gnueabi- ./MAKEALL -a arm 2>&1 | tee u-boot-kbuild.log.arm
... (do this for all architectures)
I got md5sum along with SUMMAY, error/warning messages. I compared log files between u-boot-org and u-boot-kbuild.
(10) Results
- arm
--------------------- SUMMARY ----------------------------
Boards compiled: 336
----------------------------------------------------------For all 336 boards, compiling succeeded and the md5sum matched.
- avr32
--------------------- SUMMARY ----------------------------
Boards compiled: 10
----------------------------------------------------------For all 10 boards, compiling succeeded and the md5sum matched.
- blackfin
--------------------- SUMMARY ----------------------------
Boards compiled: 35
Boards with errors: 5 ( bct-brettl2 bf506f-ezkit bf533-stamp bf609-ezkit cm-bf548 )
Boards with warnings but no errors: 30 ( bf518f-ezbrd bf525-ucr2 bf526-ezbrd
bf527-ad7160-eval bf527-ezkit bf527-ezkit-v2 bf527-sdp bf533-ezkit bf537-minotaur
bf537-pnav bf537-srv1 bf537-stamp bf538f-ezkit bf548-ezkit bf561-acvilon bf561-ezkit
blackstamp blackvme br4 cm-bf527 cm-bf533 cm-bf537e cm-bf537u cm-bf561 dnp5370
ibf-dsp561 ip04 pr1 tcm-bf518 tcm-bf537 )
----------------------------------------------------------The result of compiling was the same for both before and after this series.
(errors for 5 boards and warnings for 30 boards)
For 21 boards, the u-boot ELF file was produced and the md5sum matched.
- m68k
--------------------- SUMMARY ----------------------------
Boards compiled: 50
Boards with errors: 6 ( M5253DEMO M54455EVB M54455EVB_a66 M54455EVB_i66 M54455EVB_intel M54455EVB_stm33 )
Boards with warnings but no errors: 44 ( M52277EVB M52277EVB_stmicro M5235EVB M5235EVB_Flash32 cobra5272
idmr eb_cpu5282 eb_cpu5282_internal TASREG M5208EVBE M5249EVB M5253EVBE M5271EVB M5272C3 M5275EVB
M5282EVB astro_mcf5373l M53017EVB M5329AFEE M5329BFEE M5373EVB M54418TWR M54418TWR_nand_mii
M54418TWR_nand_rmii M54418TWR_nand_rmii_lowfreq M54418TWR_serial_mii M54418TWR_serial_rmii M54451EVB
M54451EVB_stmicro M5475AFE M5475BFE M5475CFE M5475DFE M5475EFE M5475FFE M5475GFE M5485AFE M5485BFE
M5485CFE M5485DFE M5485EFE M5485FFE M5485GFE M5485HFE )
----------------------------------------------------------The result of compiling was the same for both before and after this series.
(errors for 6 boards and warnings for 44 boards)
For 44 boards, the u-boot ELF file was produced and the md5sum matched.
- microblaze
--------------------- SUMMARY ---------------------------- Boards compiled: 1
Boards with errors: 1 ( microblaze-generic )
----------------------------------------------------------
I could not compile microblaze at all.
Microblaze is a processor custom-designed in Xilinx FPGA.
I am not sure, but I may need additional files descripting the hardware.
I could not compare md5sum.
- mips
--------------------- SUMMARY ----------------------------
Boards compiled: 28
Boards with warnings but no errors: 26 ( qemu_mips qemu_mipsel qemu_malta qemu_maltael vct_platinum vct_platinumavc vct_platinumavc_onenand vct_platinumavc_onenand_small vct_platinumavc_small vct_platinum_onenand vct_platinum_onenand_small vct_platinum_small vct_premium vct_premium_onenand vct_premium_onenand_small vct_premium_small dbau1000 dbau1100 dbau1500 dbau1550 dbau1550_el pb1000 incaip incaip_100MHz incaip_133MHz incaip_150MHz )
----------------------------------------------------------
The result of compiling was the same for both before and after this series.
(success for 2 boards and warnings for 26 boards)
For 28 boards, the u-boot ELF file was generated and the md5sum matched.
- nds32
I could not get a suitable cross compiler, so 3 nds32 boards were skipped.
- nios2
I could not get a suitable cross compiler, so 3 nios2 boards were skipped.
- openrisc
--------------------- SUMMARY ---------------------------- Boards compiled: 1
Boards with warnings but no errors: 1 ( openrisc-generic )
----------------------------------------------------------
The result of compiling was the same for both before and after this series.
(warnings for 1 boards)
For 1 board, the u-boot ELF file was generated and md5sum matched.
- powerpc
--------------------- SUMMARY ---------------------------- Boards compiled: 660
Boards with warnings but no errors: 3 ( MPC8572DS_36BIT SPD823TS taishan )
----------------------------------------------------------
By tweaking arch/powerpc/cpu/mpc85xx/release.S in (7),
I could successfully build most of boards, except ( MPC8572DS_36BIT SPD823TS taishan ). I omitted these three boards.
As I mentioned in (6), CRAYL1 board produces every time different ELF file because of timestamp.
I also omitted this board.
The md5sum checking was done for 656 boards.
I found lots of unmatched md5sum for mpc8260 cpu. I think arch/powerpc/cpu/mpc8260/Makefile should be fixed to get the same md5sum.
I discuss this item lator. See (11) below.
- sandbox
--------------------- SUMMARY ----------------------------
Boards compiled: 1
----------------------------------------------------------sandbox has only one board.
The u-boot ELF file was produced and the md5sum matched.
- sh
--------------------- SUMMARY ----------------------------
Boards compiled: 21
Boards with errors: 6 ( rsk7203 rsk7264 rsk7269 mpr2 ms7720se shmin )
----------------------------------------------------------The result of compiling was the same for both before and after this series.
(success for 15 boards, errors for 6 boards.)
For 21 boards, the u-boot ELF file was produced and the md5sum matched.
- sparc
--------------------- SUMMARY ----------------------------
Boards compiled: 5
Boards with errors: 4 ( gr_cpci_ax2000 gr_ep2s60 grsim gr_xc3s_1500 )
Boards with warnings but no errors: 1 ( grsim_leon2 )
----------------------------------------------------------The result of compiling was the same for both before and after this series.
(errors for 4 boards and warnings for 1 board)
No u-boot ELF file was generated, so I could not check md5sum.
- x86
--------------------- SUMMARY ----------------------------
Boards compiled: 1
----------------------------------------------------------x86 has only one board.
The u-boot ELF file was produced and the md5sum matched.
(11) One file turned out to be fixed
md5sum unmatching were found for powerpc mpc8260 cpu.
arch/powerpc/cpu/mpc8260/Makefile is originally like follows:
include $(TOPDIR)/config.mk
LIB = $(obj)lib$(CPU).o
START = start.o kgdb.o
COBJS = traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \
interrupts.o ether_fcc.o i2c.o commproc.o \
bedbug_603e.o pci.o spi.o
COBJS-$(CONFIG_ETHER_ON_SCC) = ether_scc.o
COBJS += $(COBJS-y)
SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
START := $(addprefix $(obj),$(START))
all: $(obj).depend $(START) $(LIB)
$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS) $(obj)kgdb.o)See the last line "$(call cmd_link_o_target, $(OBJS) $(obj)kgdb.o)". This is very weird.
kgdb.o is not included in $(OBJS) but linked into $(LIB).
So, in the first place
START = start.o kgdb.o
should have been
START = start.o
SOBJS = kgdb.o
and
$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS) $(obj)kgdb.o)should have been
$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS))My patch series converted arch/powerpc/cpu/mpc8260/Makefile by following the simple rule like this:
extra-y = start.o kgdb.o
obj-y = traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \
interrupts.o ether_fcc.o i2c.o commproc.o \
bedbug_603e.o pci.o spi.o
obj-$(CONFIG_ETHER_ON_SCC) += ether_scc.oAbove still should work fine (for both compiling and run testing) because arch/powerpc/cpu/mpc8260/kgdb.S is not used at all.
But, in order to get identical output and the same md5sum, it should be fixed like follows:
extra-y = start.o
obj-y = traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \
interrupts.o ether_fcc.o i2c.o commproc.o \
bedbug_603e.o pci.o spi.o kdbg.o
obj-$(CONFIG_ETHER_ON_SCC) += ether_scc.oAfter fixing arch/powerpc/cpu/mpc8260/Makefile, md5sum perfectly matched for all boards with mpc8260 cpu.
(12) Conclusion
I made as much effort as I could do now
in order to get md5sum matching.
I found one file (arch/powerpc/cpu/mpc8260/Makefile) to be fixed. (Working but better to be fixed.)
I will post version2 with this fix plus rebased on the current master.
In this series, I touched
- arch/arm/
- arch/powerpc/
- arch/sandbox/
- and commonly used part (drivers/, fs/, common/, net/, lib/, disk/)
I could not compile lots of minor architecture boards, but the results of md5sum for arm, powerpc, sandbox architectures is sufficient to support my correctness.
But I want to know the reason why the compile failed for such many boards. Of course my procedure might be wrong, but I think at least some of warnings are caused by immature code. I mean more or less boards look to be already broken.
Quoted 4 lines
Getting cross compilers for other architectures should be easy. There's a prebuilt collection at kernel.org, so that you just need to download any of them as the need arises. See ftp://ftp.kernel.org/pub/tools/crosstool/
Thanks!
But I could not find nds32 and nios2 compilers.
I hope the collection of necessary compilers to build all achitectures supported by U-boot is prepared in U-Boot web site
(+ tips to build all boards).
Best Regards,
Masahiro Yamada
cover First step towards Kbuild: Use Kbuild style makefiles
Quoted 20 lines · Masahiro Yamada
Quoted 2 lines
[ Makefiles rearranged, how to verify the change? ]
But your suggestion sounds interesting.
If we could programmatically compare the generated executables in an easy way, that would be worth checking.So I gave it a try.
Finally it turned out to be much harder than I had expected. (Almost nightware)Anyway, let's see what I did one by one.
[ ... time stamps, version information, symbol order, etc ... ]
(10) Results
[ ... most architectures, matching md5sum ... ]
(12) Conclusion
Quoted 7 lines
I made as much effort as I could do now
in order to get md5sum matching.I found one file (
arch/powerpc/cpu/mpc8260/Makefile) to be fixed. (Working but better to be fixed.)I will post version2 with this fix plus rebased on the current master.
What a fine display of Lemming control^H^H^H^W^W persistence. :)
Woah, this is awesome! You spent a lot of effort to verify the results, and further improved the series upon detecting a previously unspotted difference. This is very much appreciated.
So you gained even more confidence in the change and have proven that apart from the wanted modification nothing else is affected. This is a very good thing! Especially since the nature of the bootloader's project is rather sensitive to not passing a flag, or passing a wrong flag to architecture specific code.
The essence of your notes (the spots of potential conflict, how to "unify" them to shadow "unwanted diffs", and how to compare results after building most of the targets) are worth keeping around somewhere, I guess. Those who setup build and test farms may want to reference them. For now it's in the ML archive.
Quoted 7 lines
I could not compile lots of minor architecture boards, but the results of md5sum for arm, powerpc, sandbox architectures is sufficient to support my correctness.
But I want to know the reason why the compile failed for such many boards. Of course my procedure might be wrong, but I think at least some of warnings are caused by immature code. I mean more or less boards look to be already broken.
That was my other motivation for the "compare binaries" approach in contrast to run-testing the result on the targets.
You want to prove that your modification only has wanted effects and does nothing else, regardless of which state you initially find the source code in. Not being able to build need not mean that you broke it, it might have been in this state before already. And not being able to run software in the absence of hardware may even be the rule instead of an exception.
Getting those targets to build again which currently don't appears to be a separate task, independent from your modification (re-write) of the build instructions.
virtually yours
Gerhard Sittig
Signature · 3 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
cover First step towards Kbuild: Use Kbuild style makefiles
I posted v2 for this series.
Best Regards
Masahiro Yamada