1. 07 8月, 2018 2 次提交
    • M
      um: clean up archheaders recipe · 0004438a
      Masahiro Yamada 提交于
      Now that '%asm-generic' is added to no-dot-config-targets,
      'make asm-generic' does not include the kernel configuration.
      
      You can simply do 'make asm-generic' in the recursed top Makefile
      without bothering syncconfig.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: NRandy Dunlap <rdunlap@infradead.org>
      Acked-by: NRichard Weinberger <richard@nod.at>
      0004438a
    • M
      um: fix parallel building with O= option · 13d3d01e
      Masahiro Yamada 提交于
      Randy Dunlap reports UML occasionally fails to build with -j<N> and
      O=<builddir> options.
      
        make[1]: Entering directory '/home/rdunlap/mmotm-2018-0802-1529/UM64'
          UPD     include/generated/uapi/linux/version.h
          WRAP    arch/x86/include/generated/asm/dma-contiguous.h
          WRAP    arch/x86/include/generated/asm/export.h
          WRAP    arch/x86/include/generated/asm/early_ioremap.h
          WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
          WRAP    arch/x86/include/generated/asm/mm-arch-hooks.h
          WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
          WRAP    arch/x86/include/generated/uapi/asm/poll.h
          GEN     ./Makefile
        make[2]: *** No rule to make target 'archheaders'.  Stop.
        arch/um/Makefile:119: recipe for target 'archheaders' failed
        make[1]: *** [archheaders] Error 2
        make[1]: *** Waiting for unfinished jobs....
          UPD     include/config/kernel.release
        make[1]: *** wait: No child processes.  Stop.
        Makefile:146: recipe for target 'sub-make' failed
        make: *** [sub-make] Error 2
      
      The cause of the problem is the use of '$(MAKE) KBUILD_SRC=',
      which recurses to the top Makefile via the $(objtree)/Makefile
      generated by scripts/mkmakefile.
      
      When you run "make -j<N> O=<builddir> ARCH=um", Make can execute
      'archheaders' and 'outputmakefile' targets simultaneously because
      there is no dependency between them.
      
      If it happens,
      
        $(Q)$(MAKE) KBUILD_SRC= ARCH=$(HEADER_ARCH) archheaders
      
      ... tries to run $(objtree)/Makefile that is being updated.
      
      The correct way for the recursion is
      
        $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) archheaders
      
      ..., which does not rely on the generated Makefile.
      Reported-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: NRandy Dunlap <rdunlap@infradead.org>
      Acked-by: NRichard Weinberger <richard@nod.at>
      13d3d01e
  2. 28 7月, 2018 1 次提交
  3. 28 11月, 2017 1 次提交
  4. 14 9月, 2017 1 次提交
  5. 06 7月, 2017 1 次提交
    • F
      um: Avoid longjmp/setjmp symbol clashes with libpthread.a · f44f1e7d
      Florian Fainelli 提交于
      Building a statically linked UML kernel on a Centos 6.9 host resulted in
      the following linking failure (GCC 4.4, glibc-2.12):
      
      /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libpthread.a(libpthread.o):
      In function `siglongjmp':
      (.text+0x8490): multiple definition of `longjmp'
      arch/x86/um/built-in.o:/local/users/fainelli/openwrt/trunk/build_dir/target-x86_64_musl/linux-uml/linux-4.4.69/arch/x86/um/setjmp_64.S:44:
      first defined here
      /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libpthread.a(libpthread.o):
      In function `sem_open':
      (.text+0x77cd): warning: the use of `mktemp' is dangerous, better use
      `mkstemp'
      collect2: ld returned 1 exit status
      make[4]: *** [vmlinux] Error 1
      
      Adopt a solution similar to the one done for vmap where we define
      longjmp/setjmp to be kernel_longjmp/setjmp. In the process, make sure we
      do rename the functions in arch/x86/um/setjmp_*.S accordingly.
      
      Fixes: a7df4716 ("um: link with -lpthread")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      f44f1e7d
  6. 19 7月, 2016 1 次提交
    • A
      Kbuild: arch: look for generated headers in obtree · 58ab5e0c
      Arnd Bergmann 提交于
      There are very few files that need add an -I$(obj) gcc for the preprocessor
      or the assembler. For C files, we add always these for both the objtree and
      srctree, but for the other ones we require the Makefile to add them, and
      Kbuild then adds it for both trees.
      
      As a preparation for changing the meaning of the -I$(obj) directive to
      only refer to the srctree, this changes the two instances in arch/x86 to use
      an explictit $(objtree) prefix where needed, otherwise we won't find the
      headers any more, as reported by the kbuild 0day builder.
      
      arch/x86/realmode/rm/realmode.lds.S:75:20: fatal error: pasyms.h: No such file or directory
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      58ab5e0c
  7. 09 12月, 2015 1 次提交
    • L
      arch: um: fix error when linking vmlinux. · fb1770aa
      Lorenzo Colitti 提交于
      On gcc Ubuntu 4.8.4-2ubuntu1~14.04, linking vmlinux fails with:
      
      arch/um/os-Linux/built-in.o: In function `os_timer_create':
      /android/kernel/android/arch/um/os-Linux/time.c:51: undefined reference to `timer_create'
      arch/um/os-Linux/built-in.o: In function `os_timer_set_interval':
      /android/kernel/android/arch/um/os-Linux/time.c:84: undefined reference to `timer_settime'
      arch/um/os-Linux/built-in.o: In function `os_timer_remain':
      /android/kernel/android/arch/um/os-Linux/time.c:109: undefined reference to `timer_gettime'
      arch/um/os-Linux/built-in.o: In function `os_timer_one_shot':
      /android/kernel/android/arch/um/os-Linux/time.c:132: undefined reference to `timer_settime'
      arch/um/os-Linux/built-in.o: In function `os_timer_disable':
      /android/kernel/android/arch/um/os-Linux/time.c:145: undefined reference to `timer_settime'
      
      This is because -lrt appears in the generated link commandline
      after arch/um/os-Linux/built-in.o. Fix this by removing -lrt from
      arch/um/Makefile and adding it to the UM-specific section of
      scripts/link-vmlinux.sh.
      Signed-off-by: NLorenzo Colitti <lorenzo@google.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      fb1770aa
  8. 07 11月, 2015 1 次提交
    • A
      um: Switch clocksource to hrtimers · 2eb5f31b
      Anton Ivanov 提交于
      UML is using an obsolete itimer call for
      all timers and "polls" for kernel space timer firing
      in its userspace portion resulting in a long list
      of bugs and incorrect behaviour(s). It also uses
      ITIMER_VIRTUAL for its timer which results in the
      timer being dependent on it running and the cpu
      load.
      
      This patch fixes this by moving to posix high resolution
      timers firing off CLOCK_MONOTONIC and relaying the timer
      correctly to the UML userspace.
      
      Fixes:
       - crashes when hosts suspends/resumes
       - broken userspace timers - effecive ~40Hz instead
         of what they should be. Note - this modifies skas behavior
         by no longer setting an itimer per clone(). Timer events
         are relayed instead.
       - kernel network packet scheduling disciplines
       - tcp behaviour especially under load
       - various timer related corner cases
      
      Finally, overall responsiveness of userspace is better.
      Signed-off-by: NThomas Meyer <thomas@m3y3r.de>
      Signed-off-by: NAnton Ivanov <aivanov@brocade.com>
      [rw: massaged commit message]
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      2eb5f31b
  9. 20 10月, 2015 1 次提交
  10. 01 6月, 2015 1 次提交
  11. 02 4月, 2015 1 次提交
  12. 05 6月, 2014 1 次提交
  13. 01 12月, 2013 1 次提交
  14. 17 11月, 2013 1 次提交
    • R
      arch/um: make it work with defconfig and x86_64 · e40f04d0
      Ramkumar Ramachandra 提交于
      arch/um/defconfig only lists one default configuration, and that applies
      only to the i386 architecture.  Replace it with two minimal
      configuration files generated using `make savedefconfig`:
      
        i386_defconfig and x86_64_defconfig
      
      The build scripts now require two updates:
      
      1. um's Kconfig (arch/x86/um/Kconfig) should specify an ARCH_DEFCONFIG
         section explicitly pointing to these scripts if the required
         variables are set.  Take care to remove the DEFCONFIG_LIST section
         defined in the included file arch/um/Kconfig.common.
      
      2. um's Makefile (arch/um/Makefile) should set KBUILD_DEFCONFIG properly
         for the top-level Makefile to pick up.  Copy the logic in
         arch/x86/Makefile to properly pick the defconfig file depending on
         the actual architecture; except we're working with $SUBARCH here,
         instead of $ARCH.
      
      Now, you can do:
      
        $ ARCH=um make defconfig
        $ ARCH=um make
      
      and successfully build User-Mode Linux on an x86_64 box in default
      configuration.
      
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Jeff Dike <jdike@addtoit.com>
      Signed-off-by: NRamkumar Ramachandra <artagnon@gmail.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      e40f04d0
  15. 03 10月, 2012 1 次提交
  16. 06 5月, 2012 1 次提交
    • S
      kbuild: link of vmlinux moved to a script · 1f2bfbd0
      Sam Ravnborg 提交于
      Move the final link of vmlinux to a script to improve
      readability and maintainability of the code.
      
      The Makefile fragments used to link vmlinux has over the
      years seen far too many changes and the logic had become
      hard to follow.
      
      As the process by nature is serialized there was
      nothing gained including this in the Makefile.
      
      "um" has special link requirments - and the
      only way to handle this was to hard-code the linking
      of "um" in the script.
      This was better than trying to modularize it only for the
      benefit of "um" anyway.
      
      The shell script has been improved after input from:
      Arnaud Lacombe <lacombar@gmail.com>
      Nick Bowler <nbowler@elliptictech.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Arnaud Lacombe <lacombar@gmail.com>
      Cc: Nick Bowler <nbowler@elliptictech.com>
      Cc: Richard Weinberger <richard@nod.at>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      1f2bfbd0
  17. 25 3月, 2012 2 次提交
  18. 10 12月, 2011 1 次提交
  19. 06 12月, 2011 2 次提交
  20. 02 11月, 2011 8 次提交
  21. 15 9月, 2011 1 次提交
  22. 12 12月, 2009 1 次提交
  23. 20 9月, 2009 1 次提交
    • S
      arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 · 51b563fc
      Sam Ravnborg 提交于
      Albin Tonnerre <albin.tonnerre@free-electrons.com> reported:
      
          Bash 4 filters out variables which contain a dot in them.
          This happends to be the case of CPPFLAGS_vmlinux.lds.
          This is rather unfortunate, as it now causes
          build failures when using SHELL=/bin/bash to compile,
          or when bash happens to be used by make (eg when it's /bin/sh)
      
      Remove the common definition of CPPFLAGS_vmlinux.lds by
      pushing relevant stuff to either Makefile.build or the
      arch specific kernel/Makefile where we build the linker script.
      
      This is also nice cleanup as we move the information out where
      it is used.
      
      Notes for the different architectures touched:
      
      arm - we use an already exported symbol
      cris - we use a config symbol aleady available
             [Not build tested]
      mips - the jiffies complexity has moved to vmlinux.lds.S where we need it.
             Added a few variables to CPPFLAGS - they are only used by
             the linker script.
             [Not build tested]
      powerpc - removed assignment that is not needed
                [not build tested]
      sparc - simplified it using $(BITS)
      um - introduced a few new exported variables to deal with this
      xtensa - added options to CPP invocation
               [not build tested]
      
      Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      51b563fc
  24. 06 1月, 2009 1 次提交
  25. 23 10月, 2008 6 次提交