14 Dec, 2018

5 commits

  • I fixed a race condition in the parallel building of ARM in commit
    3939f3345050 ("ARM: 8418/1: add boot image dependencies to not
    generate invalid images").

    I see the same problem for MicroBlaze too.

    "make -j ARCH=microblaze all linux.bin.ub" results in a broken build
    because two threads descend into arch/microblaze/boot simultaneously.

    Add proper dependencies to avoid it.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Simek

    Masahiro Yamada
     
  • linux.bin, linux.bin.gz, and linux.bin.ub are phony targets to
    generate a corresponding image under arch/microblaze/boot/.

    simpleImage.% also works like a phony target, but a pattern that
    contains '%' cannot be a phony target. I replaced it with equivalent
    simpleImage.$(DTB).

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Simek

    Masahiro Yamada
     
  • This commit fixes some build issues.

    The first issue is the breakage of linux.bin.ub target since commit
    ece97f3a5fb5 ("microblaze: Fix simpleImage format generation")
    because the addition of UIMAGE_{IN,OUT} affected it.

    make ARCH=microblaze CROSS_COMPILE=microblaze-linux- linux.bin.ub
    [ snip ]
    OBJCOPY arch/microblaze/boot/linux.bin
    UIMAGE arch/microblaze/boot/linux.bin.ub.ub
    /usr/bin/mkimage: Can't open arch/microblaze/boot/linux.bin.ub: No such file or directory
    make[1]: *** [arch/microblaze/boot/Makefile;14: arch/microblaze/boot/linux.bin.ub] Error 1
    make: *** [arch/microblaze/Makefile;83: linux.bin.ub] Error 2

    The second issue is the use of the "if_changed" multiple times for
    the same target.

    As commit 92a4728608a8 ("x86/boot: Fix if_changed build flip/flop bug")
    pointed out, this never works properly. Moreover, generating multiple
    images as a side-effect is confusing.

    Let's split the build recipe for each image.

    simpleImage.

    *.unstrip is just a copy of vmlinux.

    simpleImage.

    and simpleImage.
    .ub are created in the same way
    as linux.bin and linux.bin.ub, respectively.

    I kept simpleImage.* recipes independent of linux.bin.* ones to not
    change the behavior.

    Lastly, this commit fixes "make ARCH=microblaze clean". Previously,
    it only cleaned up the unstrip image. Now, all the simpleImage files
    are cleaned.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Simek

    Masahiro Yamada
     
  • To prepare for more fixes, move this to arch/microblaze/Makefile.
    Otherwise, the same "... is ready" would be printed multiple times.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Simek

    Masahiro Yamada
     
  • "make ARCH=microblaze help" mentions simpleImage.

    .unstrip,
    but it is not a real Make target. It does not work because Makefile
    assumes "system.unstrip" is the name of DT.

    $ make ARCH=microblaze CROSS_COMPILE=microblaze-linux- simpleImage.system.unstrip
    [ snip ]
    make[1]: *** No rule to make target 'arch/microblaze/boot/dts/system.unstrip.dtb', needed by 'arch/microblaze/boot/dts/system.dtb'. Stop.
    make: *** [Makefile;1060: arch/microblaze/boot/dts] Error 2
    make: *** Waiting for unfinished jobs....

    simpleImage.

    works like a phony target that generates multiple
    images. Reflect the real behavior. I removed the DT directory path
    information because it is already explained a few lines below.

    While I am here, I deleted the redundant *_defconfig explanation.

    The top-level Makefile caters to list available defconfig files:

    mmu_defconfig - Build for mmu
    nommu_defconfig - Build for nommu

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Simek

    Masahiro Yamada
     

16 Nov, 2018

1 commit

  • System call table generation script must be run to gener-
    ate unistd_32.h and syscall_table.h files. This patch will
    have changes which will invokes the script.

    This patch will generate unistd_32.h and syscall_table.h
    files by the syscall table generation script invoked by
    microblaze/Makefile and the generated files against the
    removed files must be identical.

    The generated uapi header file will be included in uapi/-
    asm/unistd.h and generated system call table header file
    will be included by kernel/syscall_table.S file.

    Signed-off-by: Firoz Khan
    Signed-off-by: Michal Simek

    Firoz Khan
     

02 Oct, 2018

1 commit

  • There is nothing arch specific about building dtb files other than their
    location under /arch/*/boot/dts/. Keeping each arch aligned is a pain.
    The dependencies and supported targets are all slightly different.
    Also, a cross-compiler for each arch is needed, but really the host
    compiler preprocessor is perfectly fine for building dtbs. Move the
    build rules to a common location and remove the arch specific ones. This
    is done in a single step to avoid warnings about overriding rules.

    The build dependencies had been a mixture of 'scripts' and/or 'prepare'.
    These pull in several dependencies some of which need a target compiler
    (specifically devicetable-offsets.h) and aren't needed to build dtbs.
    All that is really needed is dtc, so adjust the dependencies to only be
    dtc.

    This change enables support 'dtbs_install' on some arches which were
    missing the target.

    Acked-by: Will Deacon
    Acked-by: Paul Burton
    Acked-by: Ley Foon Tan
    Acked-by: Masahiro Yamada
    Cc: Michal Marek
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Yoshinori Sato
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: linux-kbuild@vger.kernel.org
    Cc: linux-snps-arc@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Cc: linux-mips@linux-mips.org
    Cc: nios2-dev@lists.rocketboards.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-xtensa@linux-xtensa.org
    Signed-off-by: Rob Herring

    Rob Herring
     

24 Aug, 2018

1 commit

  • Commit a0f97e06a43c ("kbuild: enable 'make CFLAGS=...' to add
    additional options to CC") renamed CFLAGS to KBUILD_CFLAGS.

    Commit 222d394d30e7 ("kbuild: enable 'make AFLAGS=...' to add
    additional options to AS") renamed AFLAGS to KBUILD_AFLAGS.

    Commit 06c5040cdb13 ("kbuild: enable 'make CPPFLAGS=...' to add
    additional options to CPP") renamed CPPFLAGS to KBUILD_CPPFLAGS.

    For some reason, LDFLAGS was not renamed.

    Using a well-known variable like LDFLAGS may result in accidental
    override of the variable.

    Kbuild generally uses KBUILD_ prefixed variables for the internally
    appended options, so here is one more conversion to sanitize the
    naming convention.

    I did not touch Makefiles under tools/ since the tools build system
    is a different world.

    Signed-off-by: Masahiro Yamada
    Acked-by: Kirill A. Shutemov
    Reviewed-by: Palmer Dabbelt

    Masahiro Yamada
     

25 Jul, 2018

1 commit

  • With the recent syntax extension, Kconfig is now able to evaluate the
    compiler / toolchain capability.

    However, accumulating flags to 'LD' is not compatible with the way
    it works; 'LD' must be passed to Kconfig to call $(ld-option,...)
    from Kconfig files. If you tweak 'LD' in arch Makefile depending on
    CONFIG_CPU_BIG_ENDIAN, this would end up with circular dependency
    between Makefile and Kconfig.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Simek

    Masahiro Yamada
     

17 Jan, 2018

1 commit

  • Building an allmodconfig kernel fails horribly because of
    endian mismatch. It turns out that the -mlittle-endian
    switch was not honored at all as we were using the wrong
    Kconfig symbol and failing to apply CPUFLAGS to the CFLAGS.
    Finally, the linker flags did not get set right.

    This addresses all three of those issues, which now lets
    me build both big-endian and little-endian kernels for
    testing.

    Fixes: 428dbf156cc5 ("arch: change default endian for microblaze")
    Fixes: 206d3642d8ee ("arch/microblaze: add choice for endianness and update Makefile")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Michal Simek

    Arnd Bergmann
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

09 Sep, 2017

1 commit

  • microblaze architectures can be configured for either little or big endian
    formats. Add a choice option for the user to select the correct endian
    format(default to big endian).

    Also update the Makefile so toolchain can compile for the format it is
    configured for.

    Link: http://lkml.kernel.org/r/1499358861-179979-3-git-send-email-babu.moger@oracle.com
    Signed-off-by: Babu Moger
    Signed-off-by: Arnd Bergmann
    Cc: Michal Simek
    Cc: "James E.J. Bottomley"
    Cc: Alexander Viro
    Cc: David S. Miller
    Cc: Geert Uytterhoeven
    Cc: Greg KH
    Cc: Helge Deller
    Cc: Ingo Molnar
    Cc: Jonas Bonn
    Cc: Max Filippov
    Cc: Michael Ellerman (powerpc)
    Cc: Peter Zijlstra
    Cc: Stafford Horne
    Cc: Stefan Kristiansson
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Babu Moger
     

07 Apr, 2014

1 commit


21 Jan, 2014

1 commit


03 Sep, 2013

1 commit


12 Feb, 2013

1 commit


04 Dec, 2012

1 commit

  • The current rules have the .dtb files build in a different directory
    from the .dts files. This patch changes microblaze to use the generic dtb
    rule which builds .dtb files in the same directory as the source .dts.

    This requires moving parts of arch/microblaze/boot/Makefile into newly
    created arch/microblaze/boot/dts/Makefile, and updating
    arch/microblaze/Makefile to call the new Makefile. linked_dtb.S is also
    moved into boot/dts/ since it's used by rules that were moved.

    Cc: Michal Simek
    Cc: microblaze-uclinux@itee.uq.edu.au
    Signed-off-by: Stephen Warren
    Signed-off-by: Rob Herring

    Stephen Warren
     

31 Mar, 2011

1 commit


03 Jan, 2011

1 commit


22 Oct, 2010

1 commit

  • When running make headers_install_all on x86_64 and make 3.82 I hit this:

    arch/microblaze/Makefile:80: *** mixed implicit and normal rules. Stop.
    make: *** [headers_install_all] Error 2

    So split the rules to satisfy make 3.82.

    Signed-off-by: Thomas Backlund
    Cc: Stable
    Signed-off-by: Michal Simek

    Thomas Backlund
     

21 Oct, 2010

1 commit


17 Jun, 2010

1 commit


01 Apr, 2010

2 commits

  • 'make clean' does not to delete the following build generated file:
    arch/microblaze/boot/linux.bin.ub

    'make mrproper' does not to delete the following build generated files:
    arch/microblaze/boot/simpleImage.*

    Fix the Makefile to delete these build generated files.

    See [1] for a discussion on why simpleImage.* files are deleted with 'make
    mrproper' and not with 'make clean'.
    [1] http://lkml.org/lkml/2010/3/12/96

    Signed-off-by: Arun Bhanu
    Signed-off-by: Michal Simek

    Arun Bhanu
     
  • 'make ARCH=microblaze help' fails with the following error due to a
    missing single quote.

    /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
    /bin/sh: -c: line 1: syntax error: unexpected end of file
    make: *** [help] Error 2

    Signed-off-by: Arun Bhanu
    Signed-off-by: Michal Simek

    Arun Bhanu
     

11 Mar, 2010

1 commit

  • There are two parts of changes. The first is just enable
    PCI in Makefiles and in Kconfig. The second is the rest of
    missing files. I didn't want to add it with previous patch
    because that patch is too big.

    Current Microblaze toolchain has problem with weak symbols
    that's why is necessary to apply this changes to be possible
    to compile pci support.
    Xilinx knows about this problem.

    Signed-off-by: Michal Simek

    Michal Simek
     

14 Dec, 2009

1 commit


24 Sep, 2009

1 commit

  • Instead of remembering to specify DTB= on the make commandline, this commit
    allows the much friendlier make simpleImage.
    where .dts is expected to be found in arch/microblaze/boot/dts/
    The resulting vmlinux, with the compiled DTS linked in, will be copied to
    boot/simpleImage.

    This mirrors the same functionality as on PowerPC,
    albeit achieving it in a slightly different way.

    + strip simpleImage file
    The size of output file is very similar to linux.bin.

    vmlinux - full elf without fdt blob
    simpleImage..unstrip - full elf with fdt blob
    simpleImage. - stripped elf with fdt blob

    Add symlink to generic system.dts in platform folder

    Signed-off-by: John Williams
    Signed-off-by: Michal Simek

    Michal Simek
     

22 Sep, 2009

1 commit


27 Jul, 2009

1 commit

  • Reviewed the Makefile on request by Michal and this is the resulting changes.

    o Use ':=' for assignmnet so we do not re-evaluate for each use
    o Use $(shell echo xxx) to remove ""
    o Replaced CFLAGS_KERNEL with KBUILD_CFLAGS
    The settings are equally relevant for modules and the linked kernel
    o Dropped LDFLAGS_BLOB - it is no longer used
    o Refactored assignmnets to libs-y and core-y
    o Use MMU for the MMU specific extension. "MMUEXT" was hurting my eyes
    and I did not wanted it spread to m68k

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Michal Simek

    Sam Ravnborg
     

26 May, 2009

1 commit


21 May, 2009

1 commit


23 Apr, 2009

2 commits


27 Mar, 2009

1 commit