From: James Chargin <jimccrown@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Question about board-specific Makefile actions
Date: Mon, 09 Mar 2015 08:34:49 -0700 [thread overview]
Message-ID: <54FDBD99.6030403@gmail.com> (raw)
In-Reply-To: <54F62A17.2070008@gmail.com>
So, is no one willing to offer a hint?
Thanks,
Jim
On 03/03/2015 01:39 PM, James Chargin wrote:
> I have a custom board in a git workspace for U-Boot 2014.07. I've copied
> most of this from the .../board/ti/beagle. My board directory Makefile
> looks like
>
> 8<---
> obj-y := board.o
> 8<---
>
> I'd like to add a few files to this directory that are processed during
> "make all" and have any newly derived files deleted during "make clean".
>
> I've experimented with various Makefile contents but I can't get the new
> files processed or any newly derived files deleted. U-Boot's makefile
> system is quite large for my experience level and it seems I don't have
> enough understanding.
>
> A new file might contain some hush commands that are to be executed from
> the U-Boot command line. I'd like to use "source" to process these
> commands. The "source" command requires that its argument be an image (I
> get this into memory via TFTP), so I'd like "make all" to transform the
> text file containing the hush commands into the image file. I'd also
> like "make clean" to delete the derived image file.
>
> So, if my hush commands are in a text file called test.txt, I'd like
> "make all" to apply mkimage so that a test.img is generated. I'd also
> like "make clean" to delete test.img.
>
> I tried various changes to my Makefile, but the most likely seeming
> changes are
>
> 8<---
> IMG = test.img
>
> obj-y := board.o
>
> board.o : $(IMG)
>
> %.img : %.txt
> $(srctree)/tools/mkimage -T script -n $* -C none -d $< $@
>
> CLEAN_FILES += $(IMG)
> CLEAN_DIRS += .
> 8<---
>
> This doesn't work, nor has any other approach I've taken. mkimage is
> never run for "make all" and test.img doesn't get deleted if I create a
> fake one and run "make clean"
>
> Could someone offer a solution, either directly, or by pointing at an
> existing board that does something similar?
>
> Thanks
> Jim
>
--
Jim Chargin
AJA Video Systems jimc at aja.com
(530) 271-3334 http://www.aja.com
next prev parent reply other threads:[~2015-03-09 15:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 21:39 [U-Boot] Question about board-specific Makefile actions James Chargin
2015-03-09 15:34 ` James Chargin [this message]
2015-03-12 18:35 ` James Chargin
2015-03-12 18:55 ` Simon Glass
2015-03-13 4:25 ` Masahiro Yamada
2015-03-13 4:20 ` Masahiro Yamada
2015-03-13 18:08 ` James Chargin
2015-03-17 5:58 ` Masahiro Yamada
2015-03-09 15:54 ` Tom Rini
2015-03-09 18:49 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54FDBD99.6030403@gmail.com \
--to=jimccrown@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox