mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	DTML <devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 0/7] microblaze: fix various problems in building boot images
Date: Thu, 6 Dec 2018 14:09:23 +0100	[thread overview]
Message-ID: <8dd96009-976b-99a5-c8e5-8a2242a04371@monstr.eu> (raw)
In-Reply-To: <CAK7LNARtiP2xnB3hK92QJ_GadnViCG7kxXW73RmjzQAxJM4GKQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 4634 bytes --]

Hi,

On 06. 12. 18 6:08, Masahiro Yamada wrote:
> Hi Michal,
> 
> On Thu, Dec 6, 2018 at 1:41 AM Michal Simek <monstr@monstr.eu> wrote:
>>
>> On 03. 12. 18 8:50, Masahiro Yamada wrote:
>>> This patch set fixes various issues in microblaze Makefiles.
>>>
>>> BTW, "simpleImage.<dt>" works like a phony target to generate the
>>> following four images, where the first three are just aliases.
>>>
>>>  - arch/microblaze/boot/simpleImage.<dt>:
>>>          identical to arch/microblaze/boot/linux.bin
>>
>> It is not - fdt section should be empty.
>> simpleImage has this section filled.
>>
>>>
>>>  - arch/microblaze/boot/simpleImage.<dt>.unstrip:
>>>          identical to vmlinux
>>
>> The same here with filled section.
> 
> 
> vmlinux is built anyway
> for whatever target you are building.
> 
> What is the point of making a copy of vmlinux?
> They are the same.
> You can confirm it by 'diff'
> 
> $ export CROSS_COMPILE=microblaze-linux-
> $ make ARCH=microblaze  defconfig
> $ make -j8 ARCH=microblaze   simpleImage.system
> $ diff arch/microblaze/boot/simpleImage.system.unstrip  vmlinux

I can't remember the reason for this. Maybe it was just a copy from
PowerPC which started to use this simpleImage format in past and MB just
copied it.

>>>
>>>  - arch/microblaze/boot/simpleImage.<dt>.ub:
>>>          identical to arch/microblaze/boot/linux.bin.ub
>>
>> as above.
>>
>>>
>>>  - arch/microblaze/boot/simpleImage.<dt>.strip:
>>>          stripped vmlinux
>>
>> And this is there because unstrip version is quite huge and for early
>> issues you need to know only some symbols that's why debugger is not
>> overflow with stuff which none needs.
>> Maybe this is not an issue now but that strip version is used a lot.
>>
>>
>>>
>>> I am not sure how much useful those copies are,
>>> but, I tried my best to keep the same behavior.
>>>
>>> IMHO, I guess DTB=<dt> would be more sensible,
>>> but it is up to Michal.
>>
>> What do you mean by this exactly?
> 
> 
> As I showed above,
> arch/microblaze/boot/simpleImage.system.unstrip
> is exactly the same as vmlinux.
> 
> arch/microblaze/boot/simpleImage.<dt>
> is objcopy'ed binary of vmlinux.
> 
> arch/microblaze/boot/simpleImage.<dt>.ub
> is objcopy'ed binary of vmlinux, with u-boot header prepended.
> 
> You have already build-rules for them.
> 
> 
> 
> It is true that the stripped image only exist in simpleImage,
> but I think "arch/microblaze/boot/vmlinux.strip"
> is a more sensible name.
> 
> 
> 
> What I want to point out is:
>     "Which file should be compiled in",
>     is a part of the configuration.
>     We generally do not change the final
>     target name just for the difference of
>     configuration.
>     For example, ARM just uses "vmlinux", "Image", "zImage", etc.
>     Never duplicate target-specific copies depending on configuration.
> 
> 
> Why does microblaze create copies for each DT
> instead of using generic image like linux.bin, linux.bin.ub, etc. ?
> 
> If using generic image names is acceptable,
> "make simpleImage.<dt>" is just a shorthand of
> "make DTB=<dt> vmlinux linux.bin linux.bin.ub vmlinux.strip"
> 
> 
> Only the benefit of this approach is,
> you can keep all images for multiple boards at the same time.
> 
> $ make ARCH=microblaze simpleImage.board1
> $ make ARCH=microblaze simpleImage.board2
> $ make ARCH=microblaze simpleImage.board3

yes that's one thing which came to my mind too.

> 
> 
> 
> 
> Since I do not know how many users rely on this usage,
> I said "it is up to you".

One thing is what it is sensible and the second thing is historical
connection to that names. Because Xilinx was having ppc405 and ppc440
and microblaze as big endian architecture at that time was taking a lot
of stuff from powerpc that's why we took also that targets just to be
the same in distributions.
PPC was using simpleImage format in the same way that's why we have
adopted that too.

Personally for me it is not a problem to remove that simpleImage format
but I have no idea how many people rely on that.

I can't see any problem not to generate/copy simpleImage.<dt>.unstrip
version but I would keep the rest same as before just to make sure that
we are not breaking anybody.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2018-12-06 13:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-03  7:50 Masahiro Yamada
2018-12-03  7:50 ` [PATCH 1/7] microblaze: fix cleaning of " Masahiro Yamada
2018-12-05 15:41   ` Michal Simek
2018-12-03  7:50 ` [PATCH 2/7] microblaze: adjust the help to the real behavior Masahiro Yamada
2018-12-05 15:40   ` Michal Simek
2018-12-06  5:27     ` Masahiro Yamada
2018-12-06 12:52       ` Michal Simek
2018-12-07  9:50         ` Masahiro Yamada
2018-12-07 10:21         ` Masahiro Yamada
2018-12-07 10:47           ` Michal Simek
2018-12-03  7:50 ` [PATCH 3/7] microblaze: move "... is ready" message to arch/microblaze/Makefile Masahiro Yamada
2018-12-05 15:47   ` Michal Simek
2018-12-03  7:50 ` [PATCH 4/7] microblaze: fix multiple bugs in arch/microblaze/boot/Makefile Masahiro Yamada
2018-12-05 15:57   ` Michal Simek
2018-12-03  7:50 ` [PATCH 5/7] microblaze: add linux.bin* and simpleImage.* to PHONY Masahiro Yamada
2018-12-05 15:59   ` Michal Simek
2018-12-03  7:50 ` [PATCH 6/7] microblaze: fix race condition in building boot images Masahiro Yamada
2018-12-05 16:31   ` Michal Simek
2018-12-08  6:51     ` Masahiro Yamada
2018-12-03  7:50 ` [PATCH 7/7] microblaze: remove the unneeded code just in case file copy fails Masahiro Yamada
2018-12-05 16:33   ` Michal Simek
2018-12-05 16:41 ` [PATCH 0/7] microblaze: fix various problems in building boot images Michal Simek
2018-12-06  5:08   ` Masahiro Yamada
2018-12-06 13:09     ` Michal Simek [this message]
2018-12-07 11:25       ` Masahiro Yamada
2018-12-06 14:44 ` Michal Simek
2018-12-07 11:29   ` Masahiro Yamada
2018-12-07 13:29     ` Michal Simek
2018-12-07 15:19       ` Michal Simek
2018-12-08  6:14         ` Masahiro Yamada
2018-12-12 13:50           ` Michal Simek
2018-12-12 14:11             ` Masahiro Yamada
2018-12-12 14:21               ` Masahiro Yamada

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=8dd96009-976b-99a5-c8e5-8a2242a04371@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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

all inboxes | Powered by JetHome®