Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Dimitrov <picmaster@mail.bg>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux: handle read-only dts files
Date: Wed, 12 Aug 2015 19:37:55 +0300	[thread overview]
Message-ID: <55CB7663.9030701@mail.bg> (raw)
In-Reply-To: <55CB73E6.7080003@mentor.com>

Hi Hollis,

On 08/12/2015 07:27 PM, Hollis Blanchard wrote:
> On 08/12/2015 09:11 AM, Nikolay Dimitrov wrote:
>> Hi Hollis,
>>
>> On 08/12/2015 07:02 PM, Hollis Blanchard wrote:
>>> The DTS exists at $(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH) because that's
>>> where it lives. It's copied to $(KERNEL_ARCH_PATH)/boot/dts/ so that the
>>> kernel build process can build a DTB out of it (which is later copied to
>>> build/images/).
>>>
>>> Or did I misunderstand the question?
>
> (Just to be clear: $(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH) is under version
> control, while $(KERNEL_ARCH_PATH), the build directory, is not.)
>
>> Sorry, I could've been probably more clear. My question was whether the
>> DTS needs to exist also at the destination ($(KERNEL_ARCH_PATH)/boot
>> /dts/) before the copying happens.
>
> It does not need to exist there. It's only there because of a previous
> cp in a previous build.

Ahh, now I see.

>
>> If it doesn't exist at the destination, the VCS wouldn't have checked
>> it out as r/o file, and the issue wouldn't happen in the first place
>> (e.g. the copy operation will succeed). Also, when we have 2 files with
>> the same name and content, this tends to create confusion with
>> developers (aka which file was the primary one).
>
> The file needs to exist at the destination at least temporarily, for the
> DTS->DTB translation. You could say "we should remove it afterwards",
> but a) that could be technically difficult in the face of ^C and kill
> -9, and b) you could say the same about zImage, vmlinux, etc... so we'd
> really be talking about a full "make clean", which seems like overkill.
>
> Are you suggesting "rm -f; cp" instead of "cp -f"? As far as I know the
> two are functionally equivalent, so the former seems like slightly more
> overhead to get the same effect as the latter.
>
> cp -f seems a simple solution: try harder to copy the file. :-)

Now your approach totally makes sense to me, thanks for taking your
time to explain it. I agree with your proposed fix.

>
> Hollis Blanchard
> Mentor Graphics Emulation Division

Kind regards,
Nikolay

  reply	other threads:[~2015-08-12 16:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12  0:11 [Buildroot] [PATCH] linux: handle read-only dts files Hollis Blanchard
2015-08-12 14:58 ` Nikolay Dimitrov
2015-08-12 16:02   ` Hollis Blanchard
2015-08-12 16:11     ` Nikolay Dimitrov
2015-08-12 16:27       ` Hollis Blanchard
2015-08-12 16:37         ` Nikolay Dimitrov [this message]
2015-08-12 17:00 ` Nikolay Dimitrov
2016-01-10 17:02 ` Yann E. MORIN
2016-01-19 20:59 ` Thomas Petazzoni

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=55CB7663.9030701@mail.bg \
    --to=picmaster@mail.bg \
    --cc=buildroot@busybox.net \
    /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