- 29 1月, 2020 6 次提交
-
-
由 Masahiro Yamada 提交于
Deploy kernel headers (linux-headers package) in a separate function for readability. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
The kernel build has already been done before builddeb is invoked. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
The commands surrounded by ( ... ) is run in a sub-shell, but you do not have to spawn a sub-shell for every single line. Use just one ( ... ) for creating debian/hdrsrcfiles. For tar, use -C option instead. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
This script works only when it is invoked in the $objtree, that is, it is already relying on $objtree is '.' Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
The temporary directory names, debian/hdrtmp (linux-headers package) vs debian/headertmp (linux-libc-dev package), are confusing. Matching the directory name to the package name is clearer, IMHO. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
- We do not need tools/objtool/fixdep or tools/objtool/sync-check.sh for building external modules. Including tools/objtool/objtool is enough. - gcc-common.h is a check-in file. I do not see any point to search for it in objtree. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 22 1月, 2020 1 次提交
-
-
由 Masahiro Yamada 提交于
Currently, -E (stop after the preprocessing stage) is used to check whether the given compiler flag is supported. While it is faster than -S (or -c), it can be false-positive. You need to run the compilation proper to check the flag more precisely. For example, -E and -S disagree about the support of "--param asan-instrument-allocas=1". $ gcc -Werror --param asan-instrument-allocas=1 -E -x c /dev/null -o /dev/null $ echo $? 0 $ gcc -Werror --param asan-instrument-allocas=1 -S -x c /dev/null -o /dev/null cc1: error: invalid --param name ‘asan-instrument-allocas’; did you mean ‘asan-instrument-writes’? $ echo $? 1 Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 21 1月, 2020 1 次提交
-
-
由 Michał Mirosław 提交于
Select deb compression using KDEB_COMPRESS make variable. This allows to use gzip compression for local or test builds, and that's way faster than now-default xz compression. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 16 1月, 2020 1 次提交
-
-
由 Masahiro Yamada 提交于
This log is displayed every time modules are built, but it is not so important. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 15 1月, 2020 9 次提交
-
-
由 Masahiro Yamada 提交于
Bartosz Golaszewski reports that when "make {menu,n,g,x}config" fails due to missing packages, a temporary file is left over, which is not ignored by git. For example, if GTK+ is not installed: $ make gconfig * * Unable to find the GTK+ installation. Please make sure that * the GTK+ 2.0 development package is correctly installed. * You need gtk+-2.0 gmodule-2.0 libglade-2.0 * scripts/kconfig/Makefile:208: recipe for target 'scripts/kconfig/gconf-cfg' failed make[1]: *** [scripts/kconfig/gconf-cfg] Error 1 Makefile:567: recipe for target 'gconfig' failed make: *** [gconfig] Error 2 $ git status HEAD detached at v5.4 Untracked files: (use "git add <file>..." to include in what will be committed) scripts/kconfig/gconf-cfg.tmp nothing added to commit but untracked files present (use "git add" to track) This is because the check scripts are run with filechk, which misses to clean up the temporary file on failure. When the line { $(filechk_$(1)); } > $@.tmp; ... fails, it exits immediately due to the 'set -e'. Use trap to make sure to delete the temporary file on exit. For extra safety, I replaced $@.tmp with $(dot-target).tmp to make it a hidden file. Reported-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
Python 2 has retired. There is no user of this variable. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
Commit 8d529014 ("[SPARC]: Deal with glibc changing macro names in modpost.c") was more than 14 years ago. STT_SPARC_REGISTER is hopefully defined in elf.h of recent C libraries. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Acked-by: NDavid S. Miller <davem@davemloft.net>
-
由 Masahiro Yamada 提交于
This script sets the -e option, so it exits on any error, in which case it exits without cleaning up the intermediate cpio_list. Make sure to delete it on exit. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
Currently, usr/gen_initramfs.sh takes care of all the use-cases: [1] generates a cpio file unless CONFIG_INITRAMFS_SOURCE points to a single cpio archive [2] If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive, use it as-is. [3] Compress the cpio file according to CONFIG_INITRAMFS_COMPRESSION_* unless it is passed a compressed archive. To simplify the script, move [2] and [3] to usr/Makefile. If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive, there is no need to run this shell script. For the cpio archive compression, you can re-use the rules from scripts/Makefile.lib . Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
Currently, this script outputs a cpio file when -o option is given, but otherwise a text file in the format recognized by gen_init_cpio. This behavior is unclear. Make it always output a cpio file. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
When CONFIG_INITRAMFS_SOURCE is empty, the Makefile passes the -d option to gen_initramfs.sh to create the default initramfs, which contains /dev, /dev/console, and /root. This commit simplifies the default behavior; remove the -d option, and add the default cpio list. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
Currently, this script is run twice, for the dependency list, and then for the cpio archive. The first one is re-run every time although its build log is suppressed so nobody notices it. Make it work more efficiently by generating the cpio and the dependency list at the same time. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
Specify the dependency directly in the Makefile. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NGreg Thelen <gthelen@google.com>
-
- 14 1月, 2020 8 次提交
-
-
由 Masahiro Yamada 提交于
Currently, the choice of the initramfs compression mode is too complex because users are allowed to not specify the compression mode at all. I think it makes more sense to require users to choose the compression mode explicitly, and delete the fallback defaults of INITRAMFS_COMPRESSION. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
Even if INITRAMFS_SOURCE is empty, usr/gen_initramfs.sh generates a tiny default initramfs, which is embedded in vmlinux. So, defining INITRAMFS_COMPRESSION* options should be valid irrespective of INITRAMFS_SOURCE. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
init/Kconfig includes usr/Kconfig inside the "if BLK_DEV_INITRD" ... "endif" block: if BLK_DEV_INITRD source "usr/Kconfig" endif Hence, all the defines in usr/Kconfig depend on BLK_DEV_INITRD. Remove the redundant "depends on BLK_DEV_INITRD". Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NGreg Thelen <gthelen@google.com>
-
由 Masahiro Yamada 提交于
The comments in usr/Makefile wrongly refer to the script name (twice). Line 37: # The dependency list is generated by gen_initramfs.sh -l Line 54: # 4) Arguments to gen_initramfs.sh changes There does not exist such a script. I was going to fix the comments, but after some consideration, I thought "gen_initramfs.sh" would be more suitable than "gen_initramfs_list.sh" because it generates an initramfs image in the common usage. The script generates a list that can be fed to gen_init_cpio only when it is directly run without -o or -l option. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
There is no tool named "gen_initramfs". The correct name is "gen_init_cpio". Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NGreg Thelen <gthelen@google.com>
-
由 Masahiro Yamada 提交于
This is assigned, but not referenced. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NGreg Thelen <gthelen@google.com>
-
由 Masahiro Yamada 提交于
'klibcdirs' was added by commit d39a206b ("kbuild: rebuild initramfs if content of initramfs changes"). If this is just a matter of forcing execution of the recipe line, we can replace it with FORCE. The following code is currently useless: $(deps_initramfs): klibcdirs The original intent could be a hook for the klibc integration into the kernel tree, but klibc is a separate project, which can be built independently. Clean it up. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NGreg Thelen <gthelen@google.com>
-
由 Michał Mirosław 提交于
Remove a bunch of files not used during external module builds: - foreign architecture headers - subtree Makefiles - Kconfig files - perl scripts On amd64 system this looses a third of the resulting .deb size. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 07 1月, 2020 7 次提交
-
-
由 Masahiro Yamada 提交于
Commit bc081dd6 ("kbuild: generate modules.builtin") added infrastructure to generate modules.builtin, the list of all builtin modules. Basically, it works like this: - Kconfig generates include/config/tristate.conf, the list of tristate CONFIG options with a value in a capital letter. - scripts/Makefile.modbuiltin makes Kbuild descend into directories to collect the information of builtin modules. I am not a big fan of it because Kbuild ends up with traversing the source tree twice. I am not sure how perfectly it should work, but this approach cannot avoid false positives; even if the relevant CONFIG option is tristate, some Makefiles forces obj-m to obj-y. Some examples are: arch/powerpc/platforms/powermac/Makefile: obj-$(CONFIG_NVRAM:m=y) += nvram.o net/ipv6/Makefile: obj-$(subst m,y,$(CONFIG_IPV6)) += inet6_hashtables.o net/netlabel/Makefile: obj-$(subst m,y,$(CONFIG_IPV6)) += netlabel_calipso.o Nobody has complained about (or noticed) it, so it is probably fine to have false positives in modules.builtin. This commit simplifies the implementation. Let's exploit the fact that every module has MODULE_LICENSE(). (modpost shows a warning if MODULE_LICENSE is missing. If so, 0-day bot would already have blocked such a module.) I added MODULE_FILE to <linux/module.h>. When the code is being compiled as builtin, it will be filled with the file path of the module, and collected into modules.builtin.info. Then, scripts/link-vmlinux.sh extracts the list of builtin modules out of it. This new approach fixes the false-positives above, but adds another type of false-positives; non-modular code may have MODULE_LICENSE() by mistake. This is not a big deal, it is just the code is always orphan. We can clean it up if we like. You can see cleanup examples by: $ git log --grep='make.* explicitly non-modular' To sum up, this commits deletes lots of code, but still produces almost equivalent results. Please note it does not increase the vmlinux size at all. As you can see in include/asm-generic/vmlinux.lds.h, the .modinfo section is discarded in the link stage. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
When compiling, Kbuild passes KBUILD_BASENAME (basename of the object) and KBUILD_MODNAME (basename of the module). This commit adds another one, KBUILD_MODFILE, which is the path of the module. (or, the path of the module it would end up in if it were compiled as a module.) The next commit will use this to generate modules.builtin without tristate.conf. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
Make $(squote)$(quote)...$(quote)$(squote) a helper macro. I will reuse it in the next commit. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
The built-in.a in a sub-directory is created by descending into that directory. It does not depend on the other sub-directories. Loosen the dependency. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
Both 'obj-y += foo/' and 'obj-m += foo/' request Kbuild to visit the sub-directory foo/, but the difference is that only the former combines foo/built-in.a into the built-in.a of the current directory because everything in sub-directories visited by obj-m is supposed to be modular. So, it makes sense to create built-in.a only if that sub-directory is reachable by the chain of obj-y. Otherwise, built-in.a will not be linked into vmlinux anyway. For the same reason, it is pointless to compile obj-y objects in the directory visited by obj-m. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
Since commit d2a99dbd ("kbuild: update compile-test header list for v5.5-rc1"), this does not depend on any CONFIG option. no-header-test is clearer. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
Adding an include guard to every header file is good practice in case it is included multiple times. Exported headers are compile-tested for the comprehensive sanity checks. Let's include the same header twice. If an include guard is missing, the header will fail to build due to redefinition of something. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
-
- 06 1月, 2020 2 次提交
-
-
由 Linus Torvalds 提交于
-
git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux由 Linus Torvalds 提交于
Pull RISC-V fixes from Paul Walmsley: "Several fixes for RISC-V: - Fix function graph trace support - Prefix the CSR IRQ_* macro names with "RV_", to avoid collisions with macros elsewhere in the Linux kernel tree named "IRQ_TIMER" - Use __pa_symbol() when computing the physical address of a kernel symbol, rather than __pa() - Mark the RISC-V port as supporting GCOV One DT addition: - Describe the L2 cache controller in the FU540 DT file One documentation update: - Add patch acceptance guideline documentation" * tag 'riscv/for-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: Documentation: riscv: add patch acceptance guidelines riscv: prefix IRQ_ macro names with an RV_ namespace clocksource: riscv: add notrace to riscv_sched_clock riscv: ftrace: correct the condition logic in function graph tracer riscv: dts: Add DT support for SiFive L2 cache controller riscv: gcov: enable gcov for RISC-V riscv: mm: use __pa_symbol for kernel symbols
-
- 05 1月, 2020 5 次提交
-
-
由 Paul Walmsley 提交于
Formalize, in kernel documentation, the patch acceptance policy for arch/riscv. In summary, it states that as maintainers, we plan to only accept patches for new modules or extensions that have been frozen or ratified by the RISC-V Foundation. We've been following these guidelines for the past few months. In the meantime, we've received quite a bit of feedback that it would be helpful to have these guidelines formally documented. Based on a suggestion from Matthew Wilcox, we also add a link to this file to Documentation/process/index.rst, to make this document easier to find. The format of this document has also been changed to align to the format outlined in the maintainer entry profiles, in accordance with comments from Jon Corbet and Dan Williams. Signed-off-by: NPaul Walmsley <paul.walmsley@sifive.com> Reviewed-by: NPalmer Dabbelt <palmerdabbelt@google.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Krste Asanovic <krste@berkeley.edu> Cc: Andrew Waterman <waterman@eecs.berkeley.edu> Cc: Matthew Wilcox <willy@infradead.org> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Jonathan Corbet <corbet@lwn.net>
-
由 Paul Walmsley 提交于
"IRQ_TIMER", used in the arch/riscv CSR header file, is a sufficiently generic macro name that it's used by several source files across the Linux code base. Some of these other files ultimately include the arch/riscv CSR include file, causing collisions. Fix by prefixing the RISC-V csr.h IRQ_ macro names with an RV_ prefix. Fixes: a4c3733d ("riscv: abstract out CSR names for supervisor vs machine mode") Reported-by: NOlof Johansson <olof@lixom.net> Acked-by: NOlof Johansson <olof@lixom.net> Signed-off-by: NPaul Walmsley <paul.walmsley@sifive.com>
-
由 Zong Li 提交于
When enabling ftrace graph tracer, it gets the tracing clock in ftrace_push_return_trace(). Eventually, it invokes riscv_sched_clock() to get the clock value. If riscv_sched_clock() isn't marked with 'notrace', it will call ftrace_push_return_trace() and cause infinite loop. The result of failure as follow: command: echo function_graph >current_tracer [ 46.176787] Unable to handle kernel paging request at virtual address ffffffe04fb38c48 [ 46.177309] Oops [#1] [ 46.177478] Modules linked in: [ 46.177770] CPU: 0 PID: 256 Comm: $d Not tainted 5.5.0-rc1 #47 [ 46.177981] epc: ffffffe00035e59a ra : ffffffe00035e57e sp : ffffffe03a7569b0 [ 46.178216] gp : ffffffe000d29b90 tp : ffffffe03a756180 t0 : ffffffe03a756968 [ 46.178430] t1 : ffffffe00087f408 t2 : ffffffe03a7569a0 s0 : ffffffe03a7569f0 [ 46.178643] s1 : ffffffe00087f408 a0 : 0000000ac054cda4 a1 : 000000000087f411 [ 46.178856] a2 : 0000000ac054cda4 a3 : 0000000000373ca0 a4 : ffffffe04fb38c48 [ 46.179099] a5 : 00000000153e22a8 a6 : 00000000005522ff a7 : 0000000000000005 [ 46.179338] s2 : ffffffe03a756a90 s3 : ffffffe00032811c s4 : ffffffe03a756a58 [ 46.179570] s5 : ffffffe000d29fe0 s6 : 0000000000000001 s7 : 0000000000000003 [ 46.179809] s8 : 0000000000000003 s9 : 0000000000000002 s10: 0000000000000004 [ 46.180053] s11: 0000000000000000 t3 : 0000003fc815749c t4 : 00000000000efc90 [ 46.180293] t5 : ffffffe000d29658 t6 : 0000000000040000 [ 46.180482] status: 0000000000000100 badaddr: ffffffe04fb38c48 cause: 000000000000000f Signed-off-by: NZong Li <zong.li@sifive.com> Reviewed-by: NSteven Rostedt (VMware) <rostedt@goodmis.org> [paul.walmsley@sifive.com: cleaned up patch description] Fixes: 92e0d143 ("clocksource/drivers/riscv_timer: Provide the sched_clock") Cc: stable@vger.kernel.org Signed-off-by: NPaul Walmsley <paul.walmsley@sifive.com>
-
由 Linus Torvalds 提交于
Merge misc fixes from Andrew Morton: "17 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: hexagon: define ioremap_uc ocfs2: fix the crash due to call ocfs2_get_dlm_debug once less ocfs2: call journal flush to mark journal as empty after journal recovery when mount mm/hugetlb: defer freeing of huge pages if in non-task context mm/gup: fix memory leak in __gup_benchmark_ioctl mm/oom: fix pgtables units mismatch in Killed process message fs/posix_acl.c: fix kernel-doc warnings hexagon: work around compiler crash hexagon: parenthesize registers in asm predicates fs/namespace.c: make to_mnt_ns() static fs/nsfs.c: include headers for missing declarations fs/direct-io.c: include fs/internal.h for missing prototype mm: move_pages: return valid node id in status if the page is already on the target node memcg: account security cred as well to kmemcg kcov: fix struct layout for kcov_remote_arg mm/zsmalloc.c: fix the migrated zspage statistics. mm/memory_hotplug: shrink zones when offlining memory
-
由 Linus Torvalds 提交于
Merge tag 'apparmor-pr-2020-01-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor fixes from John Johansen: - performance regression: only get a label reference if the fast path check fails - fix aa_xattrs_match() may sleep while holding a RCU lock - fix bind mounts aborting with -ENOMEM * tag 'apparmor-pr-2020-01-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: apparmor: fix aa_xattrs_match() may sleep while holding a RCU lock apparmor: only get a label reference if the fast path check fails apparmor: fix bind mounts aborting with -ENOMEM
-