lkml.org 
[lkml]   [2018]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 0/7] microblaze: fix various problems in building boot images
    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






    > >
    > > - 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




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









    > Definitely thanks for looking at this.
    > 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
    >
    >


    --
    Best Regards
    Masahiro Yamada

    \
     
     \ /
      Last update: 2018-12-06 06:11    [W:3.235 / U:0.424 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site