[U-Boot] Problem: the build does not recurse into subdirectory

Greetings,
I'm working on adding new platform to U-Boot and right now I'm trying to clean up the directory structure, but running into a problem of Make not recursing into a subdirectory that I've created.
in my arch/arm/mach-aspeed/Makefile I have this:
obj-$(CONFIG_ASPEED_AST2500) += ast2500/ ast2500-board.o
and then in arch/arm/mach-aspeed/ast2500/Makefile:
$obj-y += clk_ast2500.o sdram_ast2500.o
When I try to build everything, I get this error:
arm-linux-gnueabi-ld.bfd: cannot find arch/arm/mach-aspeed/ast2500/built-in.o: No such file or directory
If instead in arch/arm/mach-aspeed/Makefile I specify:
obj-$(CONFIG_ASPEED_AST2500) += ast2500/clk_ast2500.o ast2500/sdram_ast2500.o ast2500-board.o
(That is, I just added binaries from the lower level dir explicitly)
everything builds fine, which means that CONFIG_ASPEED_AST2500 is defined.
Any ideas what might be the problem here?
If you need more details, you can see the code here https://github.com/maksymko/u-boot/tree/aspeed_ast2500_evb/arch/arm/mach-asp...
Many thanks for the help!

Hi Maxim,
On 16 December 2016 at 17:18, Maxim Sloyko maxims@google.com wrote:
Greetings,
I'm working on adding new platform to U-Boot and right now I'm trying to clean up the directory structure, but running into a problem of Make not recursing into a subdirectory that I've created.
in my arch/arm/mach-aspeed/Makefile I have this:
obj-$(CONFIG_ASPEED_AST2500) += ast2500/ ast2500-board.o
and then in arch/arm/mach-aspeed/ast2500/Makefile:
$obj-y += clk_ast2500.o sdram_ast2500.o
What is the $ for? I don't think you want that.
When I try to build everything, I get this error:
arm-linux-gnueabi-ld.bfd: cannot find arch/arm/mach-aspeed/ast2500/built-in.o: No such file or directory
If instead in arch/arm/mach-aspeed/Makefile I specify:
obj-$(CONFIG_ASPEED_AST2500) += ast2500/clk_ast2500.o ast2500/sdram_ast2500.o ast2500-board.o
(That is, I just added binaries from the lower level dir explicitly)
everything builds fine, which means that CONFIG_ASPEED_AST2500 is defined.
Any ideas what might be the problem here?
If you need more details, you can see the code here https://github.com/maksymko/u-boot/tree/aspeed_ast2500_evb/arch/arm/mach-asp...
Many thanks for the help!
-- Maxim Sloyko
Regards, Simon

On Sat, Dec 17, 2016 at 2:46 PM, Simon Glass sjg@chromium.org wrote:
Hi Maxim,
On 16 December 2016 at 17:18, Maxim Sloyko maxims@google.com wrote:
Greetings,
I'm working on adding new platform to U-Boot and right now I'm trying to clean up the directory structure, but running into a problem of Make not recursing into a subdirectory that I've created.
in my arch/arm/mach-aspeed/Makefile I have this:
obj-$(CONFIG_ASPEED_AST2500) += ast2500/ ast2500-board.o
and then in arch/arm/mach-aspeed/ast2500/Makefile:
$obj-y += clk_ast2500.o sdram_ast2500.o
What is the $ for? I don't think you want that.
Oh my, I can't believe I was that stupid :)
Thanks for the help, that's what the problem was.
When I try to build everything, I get this error:
arm-linux-gnueabi-ld.bfd: cannot find arch/arm/mach-aspeed/ast2500/built-in.o: No such file or directory
If instead in arch/arm/mach-aspeed/Makefile I specify:
obj-$(CONFIG_ASPEED_AST2500) += ast2500/clk_ast2500.o ast2500/sdram_ast2500.o ast2500-board.o
(That is, I just added binaries from the lower level dir explicitly)
everything builds fine, which means that CONFIG_ASPEED_AST2500 is defined.
Any ideas what might be the problem here?
If you need more details, you can see the code here https://github.com/maksymko/u-boot/tree/aspeed_ast2500_evb/arch/arm/mach-asp...
Many thanks for the help!
-- Maxim Sloyko
Regards, Simon

Hi Maxim,
On 19 December 2016 at 10:52, Maxim Sloyko maxims@google.com wrote:
On Sat, Dec 17, 2016 at 2:46 PM, Simon Glass sjg@chromium.org wrote:
Hi Maxim,
On 16 December 2016 at 17:18, Maxim Sloyko maxims@google.com wrote:
Greetings,
I'm working on adding new platform to U-Boot and right now I'm trying to clean up the directory structure, but running into a problem of Make not recursing into a subdirectory that I've created.
in my arch/arm/mach-aspeed/Makefile I have this:
obj-$(CONFIG_ASPEED_AST2500) += ast2500/ ast2500-board.o
and then in arch/arm/mach-aspeed/ast2500/Makefile:
$obj-y += clk_ast2500.o sdram_ast2500.o
What is the $ for? I don't think you want that.
Oh my, I can't believe I was that stupid :)
Thanks for the help, that's what the problem was.
When I try to build everything, I get this error:
arm-linux-gnueabi-ld.bfd: cannot find arch/arm/mach-aspeed/ast2500/built-in.o: No such file or directory
If instead in arch/arm/mach-aspeed/Makefile I specify:
obj-$(CONFIG_ASPEED_AST2500) += ast2500/clk_ast2500.o ast2500/sdram_ast2500.o ast2500-board.o
(That is, I just added binaries from the lower level dir explicitly)
everything builds fine, which means that CONFIG_ASPEED_AST2500 is defined.
Any ideas what might be the problem here?
If you need more details, you can see the code here https://github.com/maksymko/u-boot/tree/aspeed_ast2500_evb/arch/arm/mach-asp...
Many thanks for the help!
OK, good!
- Simon
participants (2)
-
Maxim Sloyko
-
Simon Glass