diff options
-rw-r--r-- | Makefile | 741 | ||||
-rw-r--r-- | arch/arm/Makefile | 36 | ||||
-rw-r--r-- | arch/arm/tools/Makefile | 2 | ||||
-rw-r--r-- | arch/kvx/Makefile | 12 | ||||
-rw-r--r-- | arch/mips/Makefile | 41 | ||||
-rw-r--r-- | arch/mips/boards/loongson-ls1b/include/board/debug_ll.h | 22 | ||||
-rw-r--r-- | arch/mips/boards/netgear-wg102/include/board/debug_ll.h | 21 | ||||
-rw-r--r-- | arch/mips/boards/qemu-malta/include/board/debug_ll.h | 18 | ||||
-rw-r--r-- | arch/mips/pbl/Makefile | 2 | ||||
-rw-r--r-- | arch/nios2/Makefile | 2 | ||||
-rw-r--r-- | arch/openrisc/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/Kbuild | 2 | ||||
-rw-r--r-- | arch/powerpc/Kconfig (renamed from arch/ppc/Kconfig) | 4 | ||||
-rw-r--r-- | arch/powerpc/Makefile (renamed from arch/ppc/Makefile) | 39 | ||||
-rw-r--r-- | arch/powerpc/boards/.gitignore (renamed from arch/ppc/boards/.gitignore) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/Makefile (renamed from arch/ppc/boards/freescale-p1010rdb/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/config.h (renamed from arch/ppc/boards/freescale-p1010rdb/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/ddr.c (renamed from arch/ppc/boards/freescale-p1010rdb/ddr.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init (renamed from arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config (renamed from arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/law.c (renamed from arch/ppc/boards/freescale-p1010rdb/law.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/p1010rdb.c (renamed from arch/ppc/boards/freescale-p1010rdb/p1010rdb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/p1010rdb.h (renamed from arch/ppc/boards/freescale-p1010rdb/p1010rdb.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/tlb.c (renamed from arch/ppc/boards/freescale-p1010rdb/tlb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/Makefile (renamed from arch/ppc/boards/freescale-p1022ds/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/config.h (renamed from arch/ppc/boards/freescale-p1022ds/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/ddr.c (renamed from arch/ppc/boards/freescale-p1022ds/ddr.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init (renamed from arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config (renamed from arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/ics307_clk.c (renamed from arch/ppc/boards/freescale-p1022ds/ics307_clk.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/law.c (renamed from arch/ppc/boards/freescale-p1022ds/law.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/p1022ds.c (renamed from arch/ppc/boards/freescale-p1022ds/p1022ds.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/p1022ds.h (renamed from arch/ppc/boards/freescale-p1022ds/p1022ds.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/tlb.c (renamed from arch/ppc/boards/freescale-p1022ds/tlb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/Makefile (renamed from arch/ppc/boards/freescale-p2020rdb/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/config.h (renamed from arch/ppc/boards/freescale-p2020rdb/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init (renamed from arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config (renamed from arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/law.c (renamed from arch/ppc/boards/freescale-p2020rdb/law.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/p2020rdb.c (renamed from arch/ppc/boards/freescale-p2020rdb/p2020rdb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/tlb.c (renamed from arch/ppc/boards/freescale-p2020rdb/tlb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/Makefile (renamed from arch/ppc/boards/owc-da923rc/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/config.h (renamed from arch/ppc/boards/owc-da923rc/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/da923rc.c (renamed from arch/ppc/boards/owc-da923rc/da923rc.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/ddr.c (renamed from arch/ppc/boards/owc-da923rc/ddr.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot (renamed from arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init (renamed from arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/config (renamed from arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/config) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/law.c (renamed from arch/ppc/boards/owc-da923rc/law.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/nand.c (renamed from arch/ppc/boards/owc-da923rc/nand.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/product_data.c (renamed from arch/ppc/boards/owc-da923rc/product_data.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/product_data.h (renamed from arch/ppc/boards/owc-da923rc/product_data.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/tlb.c (renamed from arch/ppc/boards/owc-da923rc/tlb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/Makefile (renamed from arch/ppc/boards/pcm030/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/barebox.lds.S (renamed from arch/ppc/boards/pcm030/barebox.lds.S) | 2 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/config.h (renamed from arch/ppc/boards/pcm030/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/eeprom.c (renamed from arch/ppc/boards/pcm030/eeprom.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/env/init/mtdparts-nor (renamed from arch/ppc/boards/pcm030/env/init/mtdparts-nor) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/env/nv/linux.bootargs.console (renamed from arch/ppc/boards/pcm030/env/nv/linux.bootargs.console) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/mt46v32m16-75.h (renamed from arch/ppc/boards/pcm030/mt46v32m16-75.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/pcm030.c (renamed from arch/ppc/boards/pcm030/pcm030.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/configs/owc_da923rc_defconfig (renamed from arch/ppc/configs/owc_da923rc_defconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/configs/p1010rdb_defconfig (renamed from arch/ppc/configs/p1010rdb_defconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/configs/p1022ds_defconfig (renamed from arch/ppc/configs/p1022ds_defconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/configs/p2020rdb_defconfig (renamed from arch/ppc/configs/p2020rdb_defconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/configs/pcm030_defconfig (renamed from arch/ppc/configs/pcm030_defconfig) | 2 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/Makefile (renamed from arch/ppc/cpu-85xx/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/fixed_ivor.S (renamed from arch/ppc/cpu-85xx/fixed_ivor.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/mmu.c (renamed from arch/ppc/cpu-85xx/mmu.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/resetvec.S (renamed from arch/ppc/cpu-85xx/resetvec.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/start.S (renamed from arch/ppc/cpu-85xx/start.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/tlb.c (renamed from arch/ppc/cpu-85xx/tlb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/traps.c (renamed from arch/ppc/cpu-85xx/traps.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/Makefile (renamed from arch/ppc/ddr-8xxx/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/common_timing_params.h (renamed from arch/ppc/ddr-8xxx/common_timing_params.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/ctrl_regs.c (renamed from arch/ppc/ddr-8xxx/ctrl_regs.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/ddr.h (renamed from arch/ppc/ddr-8xxx/ddr.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/ddr2_dimm_params.c (renamed from arch/ppc/ddr-8xxx/ddr2_dimm_params.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/ddr3_dimm_params.c (renamed from arch/ppc/ddr-8xxx/ddr3_dimm_params.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/ddr_setctrl.c (renamed from arch/ppc/ddr-8xxx/ddr_setctrl.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/lc_common_dimm_params.c (renamed from arch/ppc/ddr-8xxx/lc_common_dimm_params.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/main.c (renamed from arch/ppc/ddr-8xxx/main.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/options.c (renamed from arch/ppc/ddr-8xxx/options.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/util.c (renamed from arch/ppc/ddr-8xxx/util.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/atomic.h (renamed from arch/ppc/include/asm/atomic.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/bitops.h (renamed from arch/ppc/include/asm/bitops.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/bitsperlong.h (renamed from arch/ppc/include/asm/bitsperlong.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/byteorder.h (renamed from arch/ppc/include/asm/byteorder.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/cache.h (renamed from arch/ppc/include/asm/cache.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/common.h (renamed from arch/ppc/include/asm/common.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/config.h (renamed from arch/ppc/include/asm/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/dma.h (renamed from arch/ppc/include/asm/dma.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/elf.h (renamed from arch/ppc/include/asm/elf.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/fsl_ddr_dimm_params.h (renamed from arch/ppc/include/asm/fsl_ddr_dimm_params.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/fsl_ddr_sdram.h (renamed from arch/ppc/include/asm/fsl_ddr_sdram.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/fsl_ifc.h (renamed from arch/ppc/include/asm/fsl_ifc.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/fsl_law.h (renamed from arch/ppc/include/asm/fsl_law.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/fsl_lbc.h (renamed from arch/ppc/include/asm/fsl_lbc.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/io.h (renamed from arch/ppc/include/asm/io.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu.h (renamed from arch/ppc/include/asm/mmu.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/module.h (renamed from arch/ppc/include/asm/module.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pci_io.h (renamed from arch/ppc/include/asm/pci_io.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/posix_types.h (renamed from arch/ppc/include/asm/posix_types.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/ppc_asm.tmpl (renamed from arch/ppc/include/asm/ppc_asm.tmpl) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/ppc_defs.h (renamed from arch/ppc/include/asm/ppc_defs.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/processor.h (renamed from arch/ppc/include/asm/processor.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/ptrace.h (renamed from arch/ppc/include/asm/ptrace.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/sections.h (renamed from arch/ppc/include/asm/sections.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/sigcontext.h (renamed from arch/ppc/include/asm/sigcontext.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/signal.h (renamed from arch/ppc/include/asm/signal.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/status_led.h (renamed from arch/ppc/include/asm/status_led.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/string.h (renamed from arch/ppc/include/asm/string.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/swab.h (renamed from arch/ppc/include/asm/swab.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/types.h (renamed from arch/ppc/include/asm/types.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/unaligned.h (renamed from arch/ppc/include/asm/unaligned.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/Makefile (renamed from arch/ppc/lib/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/asm-offsets.c (renamed from arch/ppc/lib/asm-offsets.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/bat_rw.c (renamed from arch/ppc/lib/bat_rw.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/board.c (renamed from arch/ppc/lib/board.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/crtsavres.S (renamed from arch/ppc/lib/crtsavres.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/extable.c (renamed from arch/ppc/lib/extable.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/kgdb.c (renamed from arch/ppc/lib/kgdb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/misc.S (renamed from arch/ppc/lib/misc.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/module.c (renamed from arch/ppc/lib/module.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/ppclinux.c (renamed from arch/ppc/lib/ppclinux.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/ppcstring.S (renamed from arch/ppc/lib/ppcstring.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/reloc.S (renamed from arch/ppc/lib/reloc.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/ticks.S (renamed from arch/ppc/lib/ticks.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/Kconfig (renamed from arch/ppc/mach-mpc5xxx/Kconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/Makefile (renamed from arch/ppc/mach-mpc5xxx/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/cpu.c (renamed from arch/ppc/mach-mpc5xxx/cpu.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/cpu_init.c (renamed from arch/ppc/mach-mpc5xxx/cpu_init.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/firmware_sc_task.impl.S (renamed from arch/ppc/mach-mpc5xxx/firmware_sc_task.impl.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S (renamed from arch/ppc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/include/mach/clock.h (renamed from arch/ppc/mach-mpc5xxx/include/mach/clock.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/include/mach/mpc5xxx.h (renamed from arch/ppc/mach-mpc5xxx/include/mach/mpc5xxx.h) | 2 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/include/mach/sdma.h (renamed from arch/ppc/mach-mpc5xxx/include/mach/sdma.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/io.S (renamed from arch/ppc/mach-mpc5xxx/io.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/loadtask.c (renamed from arch/ppc/mach-mpc5xxx/loadtask.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/pci_mpc5200.c (renamed from arch/ppc/mach-mpc5xxx/pci_mpc5200.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/reginfo.c (renamed from arch/ppc/mach-mpc5xxx/reginfo.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/speed.c (renamed from arch/ppc/mach-mpc5xxx/speed.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/start.S (renamed from arch/ppc/mach-mpc5xxx/start.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/time.c (renamed from arch/ppc/mach-mpc5xxx/time.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/traps.c (renamed from arch/ppc/mach-mpc5xxx/traps.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/.gitignore (renamed from arch/ppc/mach-mpc85xx/.gitignore) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/Kconfig (renamed from arch/ppc/mach-mpc85xx/Kconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/Makefile (renamed from arch/ppc/mach-mpc85xx/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/barebox.lds.S (renamed from arch/ppc/mach-mpc85xx/barebox.lds.S) | 4 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/cpu.c (renamed from arch/ppc/mach-mpc85xx/cpu.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/cpu_init.c (renamed from arch/ppc/mach-mpc85xx/cpu_init.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/cpuid.c (renamed from arch/ppc/mach-mpc85xx/cpuid.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/eth-devices.c (renamed from arch/ppc/mach-mpc85xx/eth-devices.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/fdt.c (renamed from arch/ppc/mach-mpc85xx/fdt.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/fsl_gpio.c (renamed from arch/ppc/mach-mpc85xx/fsl_gpio.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/fsl_i2c.c (renamed from arch/ppc/mach-mpc85xx/fsl_i2c.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/fsl_law.c (renamed from arch/ppc/mach-mpc85xx/fsl_law.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/clock.h (renamed from arch/ppc/mach-mpc85xx/include/mach/clock.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/config_mpc85xx.h (renamed from arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/early_udelay.h (renamed from arch/ppc/mach-mpc85xx/include/mach/early_udelay.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/ffs64.h (renamed from arch/ppc/mach-mpc85xx/include/mach/ffs64.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/fsl_i2c.h (renamed from arch/ppc/mach-mpc85xx/include/mach/fsl_i2c.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/gianfar.h (renamed from arch/ppc/mach-mpc85xx/include/mach/gianfar.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/gpio.h (renamed from arch/ppc/mach-mpc85xx/include/mach/gpio.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/immap_85xx.h (renamed from arch/ppc/mach-mpc85xx/include/mach/immap_85xx.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/mmu.h (renamed from arch/ppc/mach-mpc85xx/include/mach/mmu.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/mpc85xx.h (renamed from arch/ppc/mach-mpc85xx/include/mach/mpc85xx.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/speed.c (renamed from arch/ppc/mach-mpc85xx/speed.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/time.c (renamed from arch/ppc/mach-mpc85xx/time.c) | 0 | ||||
-rw-r--r-- | arch/riscv/Makefile | 17 | ||||
-rw-r--r-- | arch/sandbox/Makefile | 12 | ||||
-rw-r--r-- | arch/sandbox/os/Makefile | 10 | ||||
-rw-r--r-- | arch/x86/Makefile | 34 | ||||
-rw-r--r-- | arch/x86/boot/Makefile | 2 | ||||
-rw-r--r-- | common/Kconfig | 3 | ||||
-rw-r--r-- | common/Makefile | 4 | ||||
-rw-r--r-- | common/image.c | 1 | ||||
-rw-r--r-- | drivers/pci/Makefile | 2 | ||||
-rw-r--r-- | firmware/Makefile | 2 | ||||
-rw-r--r-- | images/Makefile | 6 | ||||
-rw-r--r-- | scripts/Kbuild.include | 123 | ||||
-rw-r--r-- | scripts/Makefile | 4 | ||||
-rw-r--r-- | scripts/Makefile.build | 68 | ||||
-rw-r--r-- | scripts/Makefile.host | 14 | ||||
-rw-r--r-- | scripts/Makefile.lib | 20 | ||||
-rw-r--r-- | scripts/Makefile.modpost | 2 | ||||
-rw-r--r-- | scripts/kconfig/.gitignore | 4 | ||||
-rw-r--r-- | scripts/kconfig/Makefile | 38 | ||||
-rw-r--r-- | scripts/kconfig/conf.c | 16 | ||||
-rw-r--r-- | scripts/kconfig/confdata.c | 62 | ||||
-rw-r--r-- | scripts/kconfig/expr.c | 3 | ||||
-rw-r--r-- | scripts/kconfig/expr.h | 2 | ||||
-rw-r--r-- | scripts/kconfig/gconf.c | 1 | ||||
-rw-r--r-- | scripts/kconfig/lkc.h | 4 | ||||
-rw-r--r-- | scripts/kconfig/mconf.c | 1 | ||||
-rw-r--r-- | scripts/kconfig/menu.c | 185 | ||||
-rw-r--r-- | scripts/kconfig/nconf.c | 1 | ||||
-rw-r--r-- | scripts/kconfig/parser.y | 21 | ||||
-rw-r--r-- | scripts/kconfig/qconf.cc | 92 | ||||
-rw-r--r-- | scripts/kconfig/qconf.h | 2 | ||||
-rwxr-xr-x | scripts/kconfig/streamline_config.pl | 4 | ||||
-rw-r--r-- | scripts/kconfig/symbol.c | 31 | ||||
-rwxr-xr-x | scripts/mkmakefile | 43 | ||||
-rw-r--r-- | scripts/mod/Makefile | 2 | ||||
-rw-r--r-- | scripts/mod/mk_elfconfig.c | 11 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 2 | ||||
-rwxr-xr-x | scripts/tags.sh | 282 |
207 files changed, 1042 insertions, 1043 deletions
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 VERSION = 2020 PATCHLEVEL = 05 SUBLEVEL = 0 @@ -10,11 +11,9 @@ NAME = None # Comments in this file are targeted only to the developer, do not # expect to learn how to build the kernel reading this file. -# Do not: -# o use make's built-in rules and variables -# (this increases performance and avoids hard-to-debug behaviour); -# o print "Entering directory ..."; -MAKEFLAGS += -rR --no-print-directory +# That's our default target when none is given on the command line +PHONY := _all +_all: # We are using a recursive build, so we need to do a little thinking # to get the ordering right. @@ -22,8 +21,8 @@ MAKEFLAGS += -rR --no-print-directory # Most importantly: sub-Makefiles should only ever modify files in # their own directory. If in some directory we have a dependency on # a file in another dir (which doesn't happen often, but it's often -# unavoidable when linking the built-in.o targets which finally -# turn into barebox), we will call a sub make in that other dir, and +# unavoidable when linking the built-in.a targets which finally +# turn into vmlinux), we will call a sub make in that other dir, and # after that we are sure that everything which is in that other dir # is now up to date. # @@ -32,6 +31,45 @@ MAKEFLAGS += -rR --no-print-directory # descending is started. They are now explicitly listed as the # prepare rule. +ifneq ($(sub_make_done),1) + +# Do not use make's built-in rules and variables +# (this increases performance and avoids hard-to-debug behaviour) +MAKEFLAGS += -rR + +# Avoid funny character set dependencies +unexport LC_ALL +LC_COLLATE=C +LC_NUMERIC=C +export LC_COLLATE LC_NUMERIC + +# Avoid interference with shell env settings +unexport GREP_OPTIONS + +# Beautify output +# --------------------------------------------------------------------------- +# +# Normally, we echo the whole command before executing it. By making +# that echo $($(quiet)$(cmd)), we now have the possibility to set +# $(quiet) to choose other forms of output instead, e.g. +# +# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@ +# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< +# +# If $(quiet) is empty, the whole command will be printed. +# If it is set to "quiet_", only the short version will be printed. +# If it is set to "silent_", nothing will be printed at all, since +# the variable $(silent_cmd_cc_o_c) doesn't exist. +# +# A simple variant is to prefix commands with $(Q) - that's useful +# for commands that shall be hidden in non-verbose mode. +# +# $(Q)ln $@ :< +# +# If KBUILD_VERBOSE equals 0 then the above command will be hidden. +# If KBUILD_VERBOSE equals 1 then the above command is displayed. +# If KBUILD_VERBOSE equals 2 then give the reason why each target is rebuilt. +# # To put more focus on warnings, be less verbose as default # Use 'make V=1' to see the full commands @@ -42,6 +80,119 @@ ifndef KBUILD_VERBOSE KBUILD_VERBOSE = 0 endif +ifeq ($(KBUILD_VERBOSE),1) + quiet = + Q = +else + quiet=quiet_ + Q = @ +endif + +# If the user is running make -s (silent mode), suppress echoing of +# commands + +ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) + quiet=silent_ +endif + +export quiet Q KBUILD_VERBOSE + +# Kbuild will save output files in the current working directory. +# This does not need to match to the root of the kernel source tree. +# +# For example, you can do this: +# +# cd /dir/to/store/output/files; make -f /dir/to/kernel/source/Makefile +# +# If you want to save output files in a different location, there are +# two syntaxes to specify it. +# +# 1) O= +# Use "make O=dir/to/store/output/files/" +# +# 2) Set KBUILD_OUTPUT +# Set the environment variable KBUILD_OUTPUT to point to the output directory. +# export KBUILD_OUTPUT=dir/to/store/output/files/; make +# +# The O= assignment takes precedence over the KBUILD_OUTPUT environment +# variable. + +# Do we want to change the working directory? +ifeq ("$(origin O)", "command line") + KBUILD_OUTPUT := $(O) +endif + +ifneq ($(KBUILD_OUTPUT),) +# Make's built-in functions such as $(abspath ...), $(realpath ...) cannot +# expand a shell special character '~'. We use a somewhat tedious way here. +abs_objtree := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) && pwd) +$(if $(abs_objtree),, \ + $(error failed to create output directory "$(KBUILD_OUTPUT)")) + +# $(realpath ...) resolves symlinks +abs_objtree := $(realpath $(abs_objtree)) +else +abs_objtree := $(CURDIR) +endif # ifneq ($(KBUILD_OUTPUT),) + +ifeq ($(abs_objtree),$(CURDIR)) +# Suppress "Entering directory ..." unless we are changing the work directory. +MAKEFLAGS += --no-print-directory +else +need-sub-make := 1 +endif + +abs_srctree := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) + +ifneq ($(words $(subst :, ,$(abs_srctree))), 1) +$(error source directory cannot contain spaces or colons) +endif + +ifneq ($(abs_srctree),$(abs_objtree)) +# Look for make include files relative to root of kernel src +# +# This does not become effective immediately because MAKEFLAGS is re-parsed +# once after the Makefile is read. We need to invoke sub-make. +MAKEFLAGS += --include-dir=$(abs_srctree) +need-sub-make := 1 +endif + +ifneq ($(filter 3.%,$(MAKE_VERSION)),) +# 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x +# We need to invoke sub-make to avoid implicit rules in the top Makefile. +need-sub-make := 1 +# Cancel implicit rules for this Makefile. +$(lastword $(MAKEFILE_LIST)): ; +endif + +export abs_srctree abs_objtree +export sub_make_done := 1 + +ifeq ($(need-sub-make),1) + +PHONY += $(MAKECMDGOALS) sub-make + +$(filter-out _all sub-make $(lastword $(MAKEFILE_LIST)), $(MAKECMDGOALS)) _all: sub-make + @: + +# Invoke a second make in the output directory, passing relevant variables +sub-make: + $(Q)$(MAKE) -C $(abs_objtree) -f $(abs_srctree)/Makefile $(MAKECMDGOALS) + +endif # need-sub-make +endif # sub_make_done + +# We process the rest of the Makefile if this is the final invocation of make +ifeq ($(need-sub-make),) + +# CDPATH can have sideeffects; disable, since we do know where we want to cd to +export CDPATH= + +# Do not print "Entering directory ...", +# but we want to display it when entering to the output directory +# so that IDEs/editors are able to understand relative filenames. +MAKEFLAGS += --no-print-directory + # Call a source code checker (by default, "sparse") as part of the # C compilation. # @@ -49,8 +200,8 @@ endif # Use 'make C=2' to enable checking of *all* source files, regardless # of whether they are re-compiled or not. # -# See the file "Documentation/sparse.txt" for more details, including -# where to get the "sparse" utility. +# See the file "Documentation/dev-tools/sparse.rst" for more details, +# including where to get the "sparse" utility. ifeq ("$(origin C)", "command line") KBUILD_CHECKSRC = $(C) @@ -59,91 +210,108 @@ ifndef KBUILD_CHECKSRC KBUILD_CHECKSRC = 0 endif -# Use make M=dir to specify directory of external module to build -# Old syntax make ... SUBDIRS=$PWD is still supported -# Setting the environment variable KBUILD_EXTMOD take precedence -ifdef SUBDIRS - KBUILD_EXTMOD ?= $(SUBDIRS) -endif +# Use make M=dir or set the environment variable KBUILD_EXTMOD to specify the +# directory of external module to build. Setting M= takes precedence. ifeq ("$(origin M)", "command line") KBUILD_EXTMOD := $(M) endif +export KBUILD_CHECKSRC KBUILD_EXTMOD -# kbuild supports saving output files in a separate directory. -# To locate output files in a separate directory two syntaxes are supported. -# In both cases the working directory must be the root of the kernel src. -# 1) O= -# Use "make O=dir/to/store/output/files/" -# -# 2) Set KBUILD_OUTPUT -# Set the environment variable KBUILD_OUTPUT to point to the directory -# where the output files shall be placed. -# export KBUILD_OUTPUT=dir/to/store/output/files/ -# make -# -# The O= assignment takes precedence over the KBUILD_OUTPUT environment -# variable. +ifeq ($(abs_srctree),$(abs_objtree)) + # building in the source tree + building_out_of_srctree := +else + building_out_of_srctree := 1 +endif +srctree := $(abs_srctree) +objtree := $(abs_objtree) +src := $(srctree) +obj := $(objtree) -# KBUILD_SRC is set on invocation of make in OBJ directory -# KBUILD_SRC is not intended to be used by the regular user (for now) -ifeq ($(KBUILD_SRC),) +VPATH := $(srctree) -# OK, Make called in directory where kernel src resides -# Do we want to locate output files in a separate directory? -ifeq ("$(origin O)", "command line") - KBUILD_OUTPUT := $(O) -endif +export building_out_of_srctree srctree objtree VPATH -# That's our default target when none is given on the command line -PHONY := _all -_all: +# To make sure we do not include .config for any of the *config targets +# catch them early, and hand them over to scripts/kconfig/Makefile +# It is allowed to specify more targets when calling make, including +# mixing *config targets and build targets. +# For example 'make oldconfig all'. +# Detect when mixed targets is specified, and make a second invocation +# of make so .config is not included in this case either (for *config). -ifneq ($(KBUILD_OUTPUT),) -# Invoke a second make in the output directory, passing relevant variables -# check that the output directory actually exists -saved-output := $(KBUILD_OUTPUT) -KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ - && /bin/pwd) -$(if $(KBUILD_OUTPUT),, \ - $(error failed to create output directory "$(saved-output)")) +version_h := include/generated/version.h -PHONY += $(MAKECMDGOALS) sub-make +clean-targets := %clean mrproper cleandocs +no-dot-config-targets := $(clean-targets) \ + cscope gtags TAGS tags help% %docs \ + $(version_h) kernelversion outputmakefile +no-sync-config-targets := $(no-dot-config-targets) install %install \ + kernelrelease -$(filter-out _all sub-make,$(MAKECMDGOALS)) _all: sub-make - @: +config-build := +mixed-build := +need-config := 1 +may-sync-config := 1 -sub-make: FORCE - $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ - KBUILD_SRC=$(CURDIR) \ - KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \ - $(filter-out _all sub-make,$(MAKECMDGOALS)) +ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),) + ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),) + need-config := + endif +endif -# Leave processing to above invocation of make -skip-makefile := 1 -endif # ifneq ($(KBUILD_OUTPUT),) -endif # ifeq ($(KBUILD_SRC),) +ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),) + ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),) + may-sync-config := + endif +endif -# We process the rest of the Makefile if this is the final invocation of make -ifeq ($(skip-makefile),) +ifneq ($(KBUILD_EXTMOD),) + may-sync-config := +endif -# If building an external module we do not care about the all: rule -# but instead _all depend on modules -PHONY += all -_all: all +ifeq ($(KBUILD_EXTMOD),) + ifneq ($(filter config %config,$(MAKECMDGOALS)),) + config-build := 1 + ifneq ($(words $(MAKECMDGOALS)),1) + mixed-build := 1 + endif + endif +endif -# CDPATH can have sideeffects; disable, since we do know where we want to cd to -export CDPATH= +# For "make -j clean all", "make -j mrproper defconfig all", etc. +ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),) + ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),) + mixed-build := 1 + endif +endif -srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) -objtree := $(CURDIR) -src := $(srctree) -obj := $(objtree) +ifdef mixed-build +# =========================================================================== +# We're called with mixed targets (*config and build targets). +# Handle them one by one. -VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) +PHONY += $(MAKECMDGOALS) __build_one_by_one -export srctree objtree VPATH +$(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one + @: + +__build_one_by_one: + $(Q)set -e; \ + for i in $(MAKECMDGOALS); do \ + $(MAKE) -f $(srctree)/Makefile $$i; \ + done + +else # !mixed-build + +include scripts/Kbuild.include + +# Read KERNELRELEASE from include/config/kernel.release (if it exists) +KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) +KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) +export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION # Cross compiling and selecting different set of gcc/bin-utils # --------------------------------------------------------------------------- @@ -163,10 +331,6 @@ export srctree objtree VPATH # Alternatively CROSS_COMPILE can be set in the environment. # Default value for CROSS_COMPILE is not to prefix executables -ifeq ($(ARCH),arm64) -ARCH = arm -endif - ARCH ?= sandbox CROSS_COMPILE ?= @@ -174,8 +338,20 @@ CROSS_COMPILE ?= UTS_MACHINE := $(ARCH) SRCARCH := $(ARCH) +ifeq ($(ARCH),arm64) + SRCARCH := arm +endif + +# Support ARCH=ppc for backward compatibility +ifeq ($(ARCH),ppc) + SRCARCH := powerpc +endif + KCONFIG_CONFIG ?= .config +# Default file for 'make defconfig'. This may be overridden by arch-Makefile. +export KBUILD_DEFCONFIG := defconfig + # SHELL used by kbuild CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ @@ -187,84 +363,12 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null) HOSTCC = gcc HOSTCXX = g++ -HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer $(HOST_LFS_CFLAGS) -HOSTCXXFLAGS = -O2 $(HOST_LFS_CFLAGS) -HOSTLDFLAGS = $(HOST_LFS_LDFLAGS) -HOST_LOADLIBES = $(HOST_LFS_LIBS) - -# Decide whether to build built-in, modular, or both. -# Normally, just do built-in. - -KBUILD_MODULES := -KBUILD_BUILTIN := 1 - -# If we have only "make modules", don't compile built-in objects. -# When we're building modules with modversions, we need to consider -# the built-in objects during the descend as well, in order to -# make sure the checksums are up to date before we record them. - -ifeq ($(MAKECMDGOALS),modules) - KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) -endif - -# If we have "make <whatever> modules", compile modules -# in addition to whatever we do anyway. -# Just "make" or "make all" shall build modules as well - -ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) - KBUILD_MODULES := 1 -endif - -export KBUILD_MODULES KBUILD_BUILTIN -export KBUILD_CHECKSRC KBUILD_SRC - -# Beautify output -# --------------------------------------------------------------------------- -# -# Normally, we echo the whole command before executing it. By making -# that echo $($(quiet)$(cmd)), we now have the possibility to set -# $(quiet) to choose other forms of output instead, e.g. -# -# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@ -# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< -# -# If $(quiet) is empty, the whole command will be printed. -# If it is set to "quiet_", only the short version will be printed. -# If it is set to "silent_", nothing will be printed at all, since -# the variable $(silent_cmd_cc_o_c) doesn't exist. -# -# A simple variant is to prefix commands with $(Q) - that's useful -# for commands that shall be hidden in non-verbose mode. -# -# $(Q)ln $@ :< -# -# If KBUILD_VERBOSE equals 0 then the above command will be hidden. -# If KBUILD_VERBOSE equals 1 then the above command is displayed. - -ifeq ($(KBUILD_VERBOSE),1) - quiet = - Q = -else - quiet=quiet_ - Q = @ -endif - -# If the user is running make -s (silent mode), suppress echoing of -# commands - -ifneq ($(findstring s,$(MAKEFLAGS)),) - quiet=silent_ -endif - -export quiet Q KBUILD_VERBOSE - - -# Look for make include files relative to root of kernel src -MAKEFLAGS += --include-dir=$(srctree) - -# We need some generic definitions. -include $(srctree)/scripts/Kbuild.include -include $(srctree)/scripts/Makefile.lib +KBUILD_HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 \ + -fomit-frame-pointer $(HOST_LFS_CFLAGS) \ + $(HOSTCFLAGS) +KBUILD_HOSTCXXFLAGS := -Wall -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS) +KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS) +KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS) # Make variables (CC, etc...) @@ -286,6 +390,7 @@ KALLSYMS = scripts/kallsyms PERL = perl PYTHON3 = python3 CHECK = sparse +BASH = bash CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(CF) CFLAGS_KERNEL = @@ -301,17 +406,18 @@ export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_ve # Use LINUXINCLUDE when you must reference the include/ directory. # Needed to be compatible with the O= option LINUXINCLUDE := -Iinclude -I$(srctree)/dts/include \ - $(if $(KBUILD_SRC), -I$(srctree)/include) \ - -I$(srctree)/arch/$(ARCH)/include \ - -I$(objtree)/arch/$(ARCH)/include \ + $(if $(building_out_of_srctree), -I$(srctree)/include) \ + -I$(srctree)/arch/$(SRCARCH)/include \ + -I$(objtree)/arch/$(SRCARCH)/include \ -include $(srctree)/include/linux/kconfig.h -CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffreestanding +KBUILD_CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffreestanding -CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -Werror-implicit-function-declaration \ - -fno-strict-aliasing -fno-common -Os -pipe -Wmissing-prototypes -AFLAGS := -D__ASSEMBLY__ +KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ + -fno-strict-aliasing -fno-common \ + -Werror=implicit-function-declaration -Werror=implicit-int \ + -Os -pipe -Wmissing-prototypes +KBUILD_AFLAGS := -D__ASSEMBLY__ LDFLAGS_barebox := -Map barebox.map @@ -319,19 +425,15 @@ LDFLAGS_barebox := -Map barebox.map LDFLAGS_barebox += $(call ld-option, --no-dynamic-linker) LDFLAGS_pbl += $(call ld-option, --no-dynamic-linker) -# Read KERNELRELEASE from include/config/kernel.release (if it exists) -KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) -KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) - -export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION -export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC +export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL PYTHON3 UTS_MACHINE export LEX YACC -export HOSTCXX HOSTCXXFLAGS HOSTLDFLAGS HOST_LOADLIBES LDFLAGS_MODULE CHECK CHECKFLAGS +export HOSTCXX CHECK CHECKFLAGS +export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE -export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS -export CFLAGS CFLAGS_KERNEL -export AFLAGS AFLAGS_KERNEL +export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS +export KBUILD_CFLAGS CFLAGS_KERNEL +export KBUILD_AFLAGS AFLAGS_KERNEL export LDFLAGS_barebox export LDFLAGS_pbl @@ -339,78 +441,45 @@ export CFLAGS_UBSAN # Files to ignore in find ... statements -RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o -export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git +export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \ + -name CVS -o -name .pc -o -name .hg -o -name .git \) \ + -prune -o +export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ + --exclude CVS --exclude .pc --exclude .hg --exclude .git # =========================================================================== # Rules shared between *config targets and build targets -# Basic helpers built in scripts/ +# Basic helpers built in scripts/basic/ PHONY += scripts_basic scripts_basic: $(Q)$(MAKE) $(build)=scripts/basic -# To avoid any implicit rule to kick in, define an empty command. -scripts/basic/%: scripts_basic ; - PHONY += outputmakefile +# Before starting out-of-tree build, make sure the source tree is clean. # outputmakefile generates a Makefile in the output directory, if using a # separate output directory. This allows convenient use of make in the # output directory. +# At the same time when output Makefile generated, generate .gitignore to +# ignore whole output directory outputmakefile: -ifneq ($(KBUILD_SRC),) - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ - $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) -endif - -# To make sure we do not include .config for any of the *config targets -# catch them early, and hand them over to scripts/kconfig/Makefile -# It is allowed to specify more targets when calling make, including -# mixing *config targets and build targets. -# For example 'make oldconfig all'. -# Detect when mixed targets is specified, and make a second invocation -# of make so .config is not included in this case either (for *config). - -no-dot-config-targets := clean mrproper distclean \ - cscope TAGS tags help %docs check% \ - include/generated/version.h headers_% \ - kernelrelease kernelversion - -config-targets := 0 -mixed-targets := 0 -dot-config := 1 - -ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),) - ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),) - dot-config := 0 - endif -endif - -ifneq ($(filter config %config,$(MAKECMDGOALS)),) - config-targets := 1 - ifneq ($(filter-out config %config,$(MAKECMDGOALS)),) - mixed-targets := 1 - endif +ifdef building_out_of_srctree + $(Q)if [ -f $(srctree)/.config -o \ + -d $(srctree)/include/config -o \ + -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \ + echo >&2 "***"; \ + echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \ + echo >&2 "*** in $(abs_srctree)";\ + echo >&2 "***"; \ + false; \ + fi + $(Q)ln -fsn $(srctree) source + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree) + $(Q)test -e .gitignore || \ + { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore endif -ifeq ($(mixed-targets),1) -# =========================================================================== -# We're called with mixed targets (*config and build targets). -# Handle them one by one. - -PHONY += $(MAKECMDGOALS) __build_one_by_one - -$(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one - @: - -__build_one_by_one: - $(Q)set -e; \ - for i in $(MAKECMDGOALS); do \ - $(MAKE) -f $(srctree)/Makefile $$i; \ - done - -else -ifeq ($(config-targets),1) +ifdef config-build # =========================================================================== # *config targets only - make sure prerequisites are updated, and descend # in scripts/kconfig to make the *config target @@ -418,33 +487,68 @@ ifeq ($(config-targets),1) # Read arch specific Makefile to set KBUILD_DEFCONFIG as needed. # KBUILD_DEFCONFIG may point out an alternative default configuration # used for 'make defconfig' -include $(srctree)/arch/$(ARCH)/Makefile +include $(srctree)/arch/$(SRCARCH)/Makefile export KBUILD_DEFCONFIG -config: scripts_basic outputmakefile FORCE +config: outputmakefile scripts_basic FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ -%config: scripts_basic outputmakefile FORCE +%config: outputmakefile scripts_basic FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ -else +else #!config-build # =========================================================================== # Build targets only - this includes barebox, arch specific targets, clean # targets and others. In general all targets except *config targets. -# Additional helpers built in scripts/ -# Carefully list dependencies so we do not try to build scripts twice -# in parallel -PHONY += scripts -scripts: scripts_basic - $(Q)$(MAKE) $(build)=$(@) +# If building an external module we do not care about the all: rule +# but instead _all depend on modules +PHONY += all +ifeq ($(KBUILD_EXTMOD),) +_all: all +else +_all: modules +endif + +# Decide whether to build built-in, modular, or both. +# Normally, just do built-in. + +KBUILD_MODULES := +KBUILD_BUILTIN := 1 + +# If we have only "make modules", don't compile built-in objects. +# When we're building modules with modversions, we need to consider +# the built-in objects during the descend as well, in order to +# make sure the checksums are up to date before we record them. + +ifeq ($(MAKECMDGOALS),modules) + KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) +endif + +# If we have "make <whatever> modules", compile modules +# in addition to whatever we do anyway. +# Just "make" or "make all" shall build modules as well + +ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) + KBUILD_MODULES := 1 +endif + +export KBUILD_MODULES KBUILD_BUILTIN + +ifdef need-config +include include/config/auto.conf +endif + +# We need some generic definitions. +include $(srctree)/scripts/Makefile.lib # Objects we will link into barebox / subdirs we need to visit common-y := common/ drivers/ commands/ lib/ crypto/ net/ fs/ firmware/ -ifeq ($(dot-config),1) -include include/config/auto.conf +include $(srctree)/arch/$(SRCARCH)/Makefile +ifdef need-config +ifdef may-sync-config # Read in dependencies to all Kconfig* files, make sure to run syncconfig if # changes are detected. This should be included after arch/$(SRCARCH)/Makefile # because some architectures define CROSS_COMPILE there. @@ -465,39 +569,54 @@ $(KCONFIG_CONFIG): # # This exploits the 'multi-target pattern rule' trick. # The syncconfig should be executed only once to make all the targets. -%/auto.conf %/auto.conf.cmd %/tristate.conf: $(KCONFIG_CONFIG) +# (Note: use the grouped target '&:' when we bump to GNU Make 4.3) +%/auto.conf %/auto.conf.cmd: $(KCONFIG_CONFIG) $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig -endif # $(dot-config) - -include $(srctree)/arch/$(ARCH)/Makefile - -CFLAGS += -ggdb3 +else # !may-sync-config +# External modules and some install targets need include/generated/autoconf.h +# and include/config/auto.conf but do not care if they are up-to-date. +# Use auto.conf to trigger the test +PHONY += include/config/auto.conf + +include/config/auto.conf: + $(Q)test -e include/generated/autoconf.h -a -e $@ || ( \ + echo >&2; \ + echo >&2 " ERROR: Kernel configuration is invalid."; \ + echo >&2 " include/generated/autoconf.h or $@ are missing.";\ + echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ + echo >&2 ; \ + /bin/false) + +endif # may-sync-config +endif # need-config + +KBUILD_CFLAGS += -ggdb3 # Force gcc to behave correct even for buggy distributions -CFLAGS += $(call cc-option, -fno-stack-protector) +KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) # This warning generated too much noise in a regular build. # Use make W=1 to enable this warning (see scripts/Makefile.build) -CFLAGS += $(call cc-disable-warning, unused-but-set-variable) +KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) -CFLAGS += $(call cc-disable-warning, trampolines) +KBUILD_CFLAGS += $(call cc-disable-warning, trampolines) -CFLAGS += $(call cc-option, -fno-delete-null-pointer-checks,) +KBUILD_CFLAGS += $(call cc-option, -fno-delete-null-pointer-checks,) -CFLAGS += $(call cc-disable-warning, address-of-packed-member) +KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) # arch Makefile may override CC so keep this after arch Makefile is included NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) CHECKFLAGS += $(NOSTDINC_FLAGS) # warn about C99 declaration after statement -CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) +KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) # disable pointer signed / unsigned warnings in gcc 4.0 -CFLAGS += $(call cc-option,-Wno-pointer-sign,) +KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) # change __FILE__ to the relative path from the srctree -CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) +KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) include $(srctree)/scripts/Makefile.ubsan @@ -511,7 +630,7 @@ export KBUILD_IMAGE ?= barebox.bin export KBUILD_BINARY ?= barebox.bin # KBUILD_IMAGE and _BINARY may be overruled on the command line or # set in the environment. -# Also any assignments in arch/$(ARCH)/Makefile take precedence over +# Also any assignments in arch/$(SRCARCH)/Makefile take precedence over # the default value. barebox-flash-image: $(KBUILD_IMAGE) FORCE @@ -565,7 +684,7 @@ export DEFAULT_COMPRESSION_SUFFIX # --------------------------------------------------------------------------- # barebox is built from the objects selected by $(barebox-init) and # $(barebox-main). Most are built-in.o files from top-level directories -# in the kernel tree, others are specified in arch/$(ARCH)Makefile. +# in the kernel tree, others are specified in arch/$(SRCARCH)/Makefile. # Ordering when linking is important, and $(barebox-init) must be first. # # FIXME: This picture is wrong for barebox. We have no init, driver, mm @@ -592,9 +711,9 @@ export BAREBOX_PBL_OBJS := $(pbl-common-y) BAREBOX_LDS := $(lds-y) # Rule to link barebox -# May be overridden by arch/$(ARCH)/Makefile +# May be overridden by arch/$(SRCARCH)/Makefile quiet_cmd_barebox__ ?= LD $@ - cmd_barebox__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_barebox) -o $@ \ + cmd_barebox__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_barebox) -o $@ \ -T $(BAREBOX_LDS) \ --start-group $(BAREBOX_OBJS) --end-group \ $(filter-out $(BAREBOX_LDS) $(BAREBOX_OBJS) FORCE ,$^) @@ -612,28 +731,18 @@ quiet_cmd_barebox_version = GEN .version $(MAKE) $(build)=common # Generate System.map -quiet_cmd_sysmap = SYSMAP - cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap +quiet_cmd_sysmap = SYSMAP System.map + cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap $@ System.map # Link of barebox # If CONFIG_KALLSYMS is set .version is already updated # Generate System.map and verify that the content is consistent # Use + in front of the barebox_version rule to silent warning with make -j2 -# First command is ':' to allow us to use + in front of the rule define rule_barebox__ - : $(if $(CONFIG_KALLSYMS),,+$(call cmd,barebox_version)) $(call cmd,barebox__) - $(Q)echo 'cmd_$@ := $(cmd_barebox__)' > $(@D)/.$(@F).cmd - - $(Q)$(if $($(quiet)cmd_sysmap), \ - echo ' $($(quiet)cmd_sysmap) System.map' &&) \ - $(cmd_sysmap) $@ System.map; \ - if [ $$? -ne 0 ]; then \ - rm -f $@; \ - false; \ - fi; + $(call cmd,sysmap) endef ifdef CONFIG_KALLSYMS @@ -674,10 +783,8 @@ endef # Update barebox version before link # Use + in front of this rule to silent warning about make -j1 -# First command is ':' to allow us to use + in front of this rule cmd_ksym_ld = $(cmd_barebox__) define rule_ksym_ld - : +$(call cmd,barebox_version) $(call cmd,barebox__) $(Q)echo 'cmd_$@ := $(cmd_barebox__)' > $(@D)/.$(@F).cmd @@ -733,7 +840,7 @@ UIMAGE_BASE ?= $(shell printf "0x%08x" $$(($(CONFIG_TEXT_BASE) - 0x200000))) # For development provide a target which makes barebox loadable by an # unmodified u-boot quiet_cmd_barebox_mkimage = MKIMAGE $@ - cmd_barebox_mkimage = $(srctree)/scripts/mkimage -A $(ARCH) -T firmware -C none \ + cmd_barebox_mkimage = $(srctree)/scripts/mkimage -A $(SRCARCH) -T firmware -C none \ -O barebox -a $(UIMAGE_BASE) -e $(UIMAGE_BASE) \ -n "barebox $(KERNELRELEASE)" -d $< $@ @@ -797,6 +904,13 @@ include/config/kernel.release: FORCE $(Q)rm -f $@ $(Q)echo $(KERNELVERSION)$(localversion) > $@ +# Additional helpers built in scripts/ +# Carefully list dependencies so we do not try to build scripts twice +# in parallel +PHONY += scripts +scripts: scripts_basic + $(Q)$(MAKE) $(build)=$(@) + # Things we need to do before we recursively start building the kernel # or the modules are listed in "prepare". # A multi level approach is used. prepareN is processed before prepareN-1. @@ -804,47 +918,25 @@ include/config/kernel.release: FORCE # version.h and scripts_basic is processed / created. # Listed in dependency order -PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 - -# prepare-all is deprecated, use prepare as valid replacement -PHONY += prepare-all - -# prepare3 is used to check if we are building in a separate output directory, -# and if so do: -# 1) Check that make has not been executed in the kernel src $(srctree) -prepare3: include/config/kernel.release -ifneq ($(KBUILD_SRC),) - @echo ' Using $(srctree) as source for barebox' - $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ - echo " $(srctree) is not clean, please run 'make mrproper'";\ - echo " in the '$(srctree)' directory.";\ - false; \ - fi; -endif +PHONY += prepare archprepare prepare0 -# prepare2 creates a makefile if using a separate output directory -prepare2: prepare3 outputmakefile - -prepare1: prepare2 include/generated/version.h include/generated/utsrelease.h \ - include/config.h +archprepare: outputmakefile scripts_basic include/config/kernel.release \ + $(version_h) include/generated/utsrelease.h include/config.h +prepare0: archprepare FORCE ifneq ($(KBUILD_MODULES),) $(Q)mkdir -p $(MODVERDIR) $(Q)rm -f $(MODVERDIR)/* endif - -archprepare: prepare1 scripts_basic - -prepare0: archprepare FORCE $(Q)$(MAKE) $(build)=. # All the preparing.. -prepare prepare-all: prepare0 +prepare: prepare0 # Leave this as default for preprocessing barebox.lds.S, which is now -# done in arch/$(ARCH)/kernel/Makefile +# done in arch/$(SRCARCH)/kernel/Makefile -export CPPFLAGS_barebox.lds += -C -U$(ARCH) +export CPPFLAGS_barebox.lds += -C -U$(SRCARCH) define symlink-config-h if [ -f $(srctree)/$(BOARD)/config.h ]; then \ @@ -873,16 +965,16 @@ define filechk_utsrelease.h echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ exit 1; \ fi; \ - (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";) + echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" endef define filechk_version.h - (echo \#define LINUX_VERSION_CODE $(shell \ - expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \ - echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) + echo \#define LINUX_VERSION_CODE $(shell \ + expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \ + echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' endef -include/generated/version.h: $(srctree)/Makefile FORCE +include/generated/version.h: FORCE $(call filechk,version.h) include/generated/utsrelease.h: include/config/kernel.release FORCE @@ -1043,7 +1135,7 @@ rpm: include/config/kernel.release FORCE # Brief documentation of the typical targets used # --------------------------------------------------------------------------- -boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig) +boards := $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*_defconfig) boards := $(sort $(notdir $(boards))) help: @@ -1070,13 +1162,10 @@ help: @echo 'Static analysers' @echo ' checkstack - Generate a list of stack hogs' @echo ' namespacecheck - Name space analysis on compiled kernel' - @if [ -r include/asm-$(ARCH)/Kbuild ]; then \ - echo ' headers_check - Sanity check on exported headers'; \ - fi @echo '' - @echo 'Architecture specific targets ($(ARCH)):' + @echo 'Architecture specific targets ($(SRCARCH)):' @$(if $(archhelp),$(archhelp),\ - echo ' No architecture specific help defined for $(ARCH)') + echo ' No architecture specific help defined for $(SRCARCH)') @echo '' @$(if $(boards), \ $(foreach b, $(boards), \ @@ -1095,9 +1184,9 @@ help: # Generate tags for editors # --------------------------------------------------------------------------- quiet_cmd_tags = GEN $@ - cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ + cmd_tags = $(BASH) $(srctree)/scripts/tags.sh $@ -tags TAGS cscope: FORCE +tags TAGS cscope gtags: FORCE $(call cmd,tags) SPHINXBUILD = sphinx-build @@ -1109,9 +1198,6 @@ docs: FORCE @$(SPHINXBUILD) -b html -d $(objtree)/doctrees $(srctree)/Documentation \ $(objtree)/Documentation/html -endif #ifeq ($(config-targets),1) -endif #ifeq ($(mixed-targets),1) - # Single targets # --------------------------------------------------------------------------- # Single targets are compatible with: @@ -1158,8 +1244,8 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) cmd_rmfiles = rm -f $(rm-files) -a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \ - $(NOSTDINC_FLAGS) $(CPPFLAGS) \ +a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ + $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \ $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) quiet_cmd_as_o_S = AS $@ @@ -1175,14 +1261,13 @@ ifneq ($(cmd_files),) include $(cmd_files) endif -endif # skip-makefile +endif # config-build +endif # mixed-build +endif # need-sub-make PHONY += FORCE FORCE: -# Cancel implicit rules on top Makefile, `-rR' will apply to sub-makes. -Makefile: ; - # Declare the contents of the PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends. .PHONY: $(PHONY) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 29fd8e276c..6c7373c206 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -1,19 +1,19 @@ KBUILD_DEFCONFIG := qemu_virt64_defconfig -CPPFLAGS += -D__ARM__ -fno-strict-aliasing +KBUILD_CPPFLAGS += -D__ARM__ -fno-strict-aliasing # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: ifeq ($(CONFIG_CPU_V8),y) -CPPFLAGS +=$(call cc-option,-maarch64,) +KBUILD_CPPFLAGS +=$(call cc-option,-maarch64,) else -CPPFLAGS +=$(call cc-option,-marm,) +KBUILD_CPPFLAGS +=$(call cc-option,-marm,) endif ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) -CPPFLAGS += -mbig-endian +KBUILD_CPPFLAGS += -mbig-endian AS += -EB LD += -EB else -CPPFLAGS += -mlittle-endian +KBUILD_CPPFLAGS += -mlittle-endian AS += -EL LD += -EL endif @@ -23,14 +23,14 @@ endif # conservative and instruct the compiler not to generate any unaligned # accesses ifneq ($(CONFIG_CPU_V8),y) -CFLAGS += -mno-unaligned-access +KBUILD_CFLAGS += -mno-unaligned-access else -CFLAGS += -mstrict-align +KBUILD_CFLAGS += -mstrict-align endif # Prevent use of floating point and Advanced SIMD registers. ifeq ($(CONFIG_CPU_V8),y) -CFLAGS += -mgeneral-regs-only +KBUILD_CFLAGS += -mgeneral-regs-only endif # This selects which instruction set is used. @@ -70,12 +70,12 @@ AFLAGS_THUMB2 :=$(CFLAGS_THUMB2) -Wa$(comma)-mthumb endif ifeq ($(CONFIG_CPU_V8), y) -CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y) -AFLAGS += -include asm/unified.h +KBUILD_CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y) +KBUILD_AFLAGS += -include asm/unified.h export S64 = _64 else -CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float $(CFLAGS_THUMB2) -AFLAGS += -include asm/unified.h -msoft-float $(AFLAGS_THUMB2) +KBUILD_CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float $(CFLAGS_THUMB2) +KBUILD_AFLAGS += -include asm/unified.h -msoft-float $(AFLAGS_THUMB2) endif # Machine directory name. This list is sorted alphanumerically @@ -127,23 +127,19 @@ board-$(CONFIG_MACH_TINY6410) += friendlyarm-tiny6410 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else -CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif +KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) TEXT_BASE = $(CONFIG_TEXT_BASE) -CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) +KBUILD_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) # Add cleanup flags -CPPFLAGS += -fdata-sections -ffunction-sections +KBUILD_CPPFLAGS += -fdata-sections -ffunction-sections LDFLAGS_barebox += --gc-sections LDFLAGS_pbl += --gc-sections # early code often runs at addresses we are not linked at -CPPFLAGS += -fPIE +KBUILD_CPPFLAGS += -fPIE ifdef CONFIG_RELOCATABLE LDFLAGS_barebox += -pie diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile index 67ae9e701b..bff825e58a 100644 --- a/arch/arm/tools/Makefile +++ b/arch/arm/tools/Makefile @@ -7,4 +7,4 @@ include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types $(Q)$(kecho) ' Generating $@' $(Q)mkdir -p $(dir $@) - $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } + $(Q)$(AWK) -f $^ > $@ diff --git a/arch/kvx/Makefile b/arch/kvx/Makefile index 81040f4e69..c97cff3456 100644 --- a/arch/kvx/Makefile +++ b/arch/kvx/Makefile @@ -1,6 +1,6 @@ KBUILD_DEFCONFIG := generic_defconfig -CPPFLAGS += -fno-strict-aliasing +KBUILD_CPPFLAGS += -fno-strict-aliasing board-$(CONFIG_GENERIC) := generic @@ -13,12 +13,12 @@ endif DEFAULT_CFLAGS := -nostdlib -fno-builtin -fstrict-align -g DEFAULT_CFLAGS += -DTEXT_BASE=$(CONFIG_TEXT_BASE) -LIBGCC_PATH = $(dir $(shell $(CC) $(CFLAGS) --print-libgcc-file-name)) +LIBGCC_PATH = $(dir $(shell $(CC) $(KBUILD_CFLAGS) --print-libgcc-file-name)) -CFLAGS += $(DEFAULT_CFLAGS) -AFLAGS += $(DEFAULT_CFLAGS) +KBUILD_CFLAGS += $(DEFAULT_CFLAGS) +KBUILD_AFLAGS += $(DEFAULT_CFLAGS) -LDFLAGS += -m elf64kvx +KBUILD_LDFLAGS += -m elf64kvx archprepare: maketools @@ -30,7 +30,7 @@ common-$(CONFIG_OFTREE) += arch/kvx/dts/ lds-y += arch/kvx/cpu/barebox.lds -cmd_barebox__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_barebox) -o $@ \ +cmd_barebox__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_barebox) -o $@ \ -T $(BAREBOX_LDS) \ --start-group $(BAREBOX_OBJS) --end-group \ -L$(LIBGCC_PATH) -lgcc \ diff --git a/arch/mips/Makefile b/arch/mips/Makefile index ee3364d27a..5604a0a10d 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -11,7 +11,7 @@ else 64bit-emul = elf64btsmip endif -CPPFLAGS += -D__MIPS__ -fno-strict-aliasing -fno-merge-constants +KBUILD_CPPFLAGS += -D__MIPS__ -fno-strict-aliasing -fno-merge-constants cflags-y += -G 0 -mno-abicalls -fno-pic -pipe cflags-y += -Wall -Wstrict-prototypes \ @@ -34,17 +34,17 @@ predef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__ ifdef CONFIG_CPU_BIG_ENDIAN cflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be)) -ldflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB ) +mips-ldflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB ) endif ifdef CONFIG_CPU_LITTLE_ENDIAN cflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le)) -ldflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL ) +mips-ldflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL ) endif -LDFLAGS += $(ldflags-y) -m $(ld-emul) -LDFLAGS_barebox += $(ldflags-y) -LDFLAGS_pbl += $(ldflags-y) +KBUILD_LDFLAGS += $(mips-ldflags-y) -m $(ld-emul) +LDFLAGS_barebox += $(mips-ldflags-y) +LDFLAGS_pbl += $(mips-ldflags-y) # # CPU-dependent compiler/assembler options for optimization. @@ -55,11 +55,11 @@ cflags-$(CONFIG_CPU_MIPS64_R1) += $(call cc-option,-march=mips64,-mips64 -U_MIPS cflags-$(CONFIG_CPU_MIPS64_R2) += $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) -Wa,-mips64r2 -Wa,--trap cflags-$(CONFIG_CPU_GS232) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) -Wa,-mips32r2 -Wa,--trap -CPPFLAGS += -DTEXT_BASE=$(CONFIG_TEXT_BASE) +KBUILD_CPPFLAGS += -DTEXT_BASE=$(CONFIG_TEXT_BASE) ifndef CONFIG_MODULES # Add cleanup flags -CPPFLAGS += -fdata-sections -ffunction-sections +KBUILD_CPPFLAGS += -fdata-sections -ffunction-sections LDFLAGS_barebox += -static --gc-sections --emit-relocs endif @@ -82,22 +82,7 @@ machine-$(CONFIG_MACH_MIPS_LOONGSON) := loongson machine-$(CONFIG_MACH_MIPS_XBURST) := xburst machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else -CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif - -ifeq ($(incdir-y),) -incdir-y := $(machine-y) -endif -INCDIR := arch-$(incdir-y) - -ifeq ($(KBUILD_SRC),) -CPPFLAGS += -I$(BOARD)/include -else -CPPFLAGS += -I$(srctree)/$(BOARD)/include -endif +KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) ifneq ($(machine-y),) MACH := arch/mips/mach-$(machine-y)/ @@ -105,19 +90,17 @@ else MACH := endif -common-y += $(BOARD) - common-y += $(MACH) common-y += arch/mips/lib/ common-y += arch/mips/boot/ common-y += arch/mips/boards/ -CPPFLAGS += $(cflags-y) -CFLAGS += $(cflags-y) +KBUILD_CPPFLAGS += $(cflags-y) +KBUILD_CFLAGS += $(cflags-y) lds-$(CONFIG_GENERIC_LINKER_SCRIPT) := arch/mips/lib/barebox.lds -cmd_barebox__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_barebox) -o $@ \ +cmd_barebox__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_barebox) -o $@ \ -T $(BAREBOX_LDS) \ --start-group $(BAREBOX_OBJS) --end-group \ $(filter-out $(BAREBOX_LDS) $(BAREBOX_OBJS) FORCE ,$^); \ diff --git a/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h b/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h deleted file mode 100644 index 05420f73a1..0000000000 --- a/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> - */ - -/** @file - * This File contains declaration for early output support - */ -#ifndef __LOONGSON_TECH_LS1B_DEBUG_LL_H__ -#define __LOONGSON_TECH_LS1B_DEBUG_LL_H__ - -#include <asm/addrspace.h> -#include <mach/loongson1.h> - -#define DEBUG_LL_UART_ADDR KSEG1ADDR(LS1X_UART2_BASE) -#define DEBUG_LL_UART_SHIFT 0 - -#define DEBUG_LL_UART_CLK (83000000 / 16) -#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE -#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS) - -#endif /* __LOONGSON_TECH_LS1B_DEBUG_LL_H__ */ diff --git a/arch/mips/boards/netgear-wg102/include/board/debug_ll.h b/arch/mips/boards/netgear-wg102/include/board/debug_ll.h deleted file mode 100644 index cc3b1d74b0..0000000000 --- a/arch/mips/boards/netgear-wg102/include/board/debug_ll.h +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> - */ - -/** @file - * This File contains declaration for early output support - */ -#ifndef __NETGEAR_WG102_DEBUG_LL_H__ -#define __NETGEAR_WG102_DEBUG_LL_H__ - -#include <mach/ar2312_regs.h> - -#define DEBUG_LL_UART_ADDR KSEG1ADDR(AR2312_UART0) -#define DEBUG_LL_UART_SHIFT AR2312_UART_SHIFT - -#define DEBUG_LL_UART_CLK (45000000 / 16) -#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE -#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS) - -#endif /* __NETGEAR_WG102_DEBUG_LL_H__ */ diff --git a/arch/mips/boards/qemu-malta/include/board/debug_ll.h b/arch/mips/boards/qemu-malta/include/board/debug_ll.h deleted file mode 100644 index 5b112b8ae2..0000000000 --- a/arch/mips/boards/qemu-malta/include/board/debug_ll.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> - */ - -#ifndef __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__ -#define __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__ - -#include <mach/hardware.h> - -#define DEBUG_LL_UART_ADDR MALTA_PIIX4_UART0 -#define DEBUG_LL_UART_SHIFT 0 - -#define DEBUG_LL_UART_CLK 1843200 -#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE -#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS) - -#endif /* __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__ */ diff --git a/arch/mips/pbl/Makefile b/arch/mips/pbl/Makefile index 8f9e9fe593..535bb4bf55 100644 --- a/arch/mips/pbl/Makefile +++ b/arch/mips/pbl/Makefile @@ -29,7 +29,7 @@ zbarebox-common := $(BAREBOX_PBL_OBJS) $(obj)/$(piggy_o) zbarebox-lds := $(obj)/zbarebox.lds quiet_cmd_zbarebox__ ?= LD $@ - cmd_zbarebox__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_zbarebox) -o $@ \ + cmd_zbarebox__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_zbarebox) -o $@ \ -T $(zbarebox-lds) \ --start-group $(zbarebox-common) --end-group \ $(filter-out $(zbarebox-lds) $(zbarebox-common) FORCE ,$^) diff --git a/arch/nios2/Makefile b/arch/nios2/Makefile index 0dff0bed35..ef283f4143 100644 --- a/arch/nios2/Makefile +++ b/arch/nios2/Makefile @@ -1,6 +1,6 @@ KBUILD_DEFCONFIG := generic_defconfig -CPPFLAGS += -fno-strict-aliasing -mno-hw-mul +KBUILD_CPPFLAGS += -fno-strict-aliasing -mno-hw-mul board-$(CONFIG_GENERIC) := generic diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile index 5394afb7f0..72d7fa3d53 100644 --- a/arch/openrisc/Makefile +++ b/arch/openrisc/Makefile @@ -1,6 +1,6 @@ KBUILD_DEFCONFIG := generic_defconfig -CPPFLAGS += -D__OR1K__ -ffixed-r10 -mhard-mul -mhard-div +KBUILD_CPPFLAGS += -D__OR1K__ -ffixed-r10 -mhard-mul -mhard-div board-$(CONFIG_GENERIC) := generic diff --git a/arch/powerpc/Kbuild b/arch/powerpc/Kbuild new file mode 100644 index 0000000000..503ce631c0 --- /dev/null +++ b/arch/powerpc/Kbuild @@ -0,0 +1,2 @@ +obj-$(CONFIG_ARCH_MPC85XX) += cpu-85xx/ +obj-y += lib/ diff --git a/arch/ppc/Kconfig b/arch/powerpc/Kconfig index 798f342fa4..90ec7b1702 100644 --- a/arch/ppc/Kconfig +++ b/arch/powerpc/Kconfig @@ -18,5 +18,5 @@ config ARCH_MPC85XX bool "Freescale MPC85xx" endchoice -source "arch/ppc/mach-mpc5xxx/Kconfig" -source "arch/ppc/mach-mpc85xx/Kconfig" +source "arch/powerpc/mach-mpc5xxx/Kconfig" +source "arch/powerpc/mach-mpc85xx/Kconfig" diff --git a/arch/ppc/Makefile b/arch/powerpc/Makefile index 8b0c0b4758..aa76260496 100644 --- a/arch/ppc/Makefile +++ b/arch/powerpc/Makefile @@ -1,18 +1,18 @@ KBUILD_DEFCONFIG := p2020rdb_defconfig -CPPFLAGS += -ffixed-r14 -m32 \ - -meabi -D __PPC__ -D CONFIG_PPC \ +KBUILD_CPPFLAGS += -ffixed-r14 -m32 \ + -meabi -D __PPC__ \ -fno-strict-aliasing -CPPFLAGS += $(call cc-option,-mno-spe) -CPPFLAGS += $(call cc-option,-mspe=no) +KBUILD_CPPFLAGS += $(call cc-option,-mno-spe) +KBUILD_CPPFLAGS += $(call cc-option,-mspe=no) ifdef CONFIG_RELOCATABLE -CPPFLAGS += -fPIC -mrelocatable +KBUILD_CPPFLAGS += -fPIC -mrelocatable endif ifdef CONFIG_MPC85xx -CPPFLAGS += -Wa,-me500x2 -msoft-float -mno-string +KBUILD_CPPFLAGS += -Wa,-me500x2 -msoft-float -mno-string endif board-$(CONFIG_MACH_PHYCORE_MPC5200B_TINY) := pcm030 @@ -24,25 +24,19 @@ board-$(CONFIG_DA923RC) := owc-da923rc machine-$(CONFIG_ARCH_MPC5200) := mpc5xxx machine-$(CONFIG_ARCH_MPC85XX) := mpc85xx -cpu-$(CONFIG_ARCH_MPC85XX) := 85xx - TEXT_BASE = $(CONFIG_TEXT_BASE) -CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) +KBUILD_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) # Add cleanup flags ifndef CONFIG_MODULES -CPPFLAGS += -fdata-sections -ffunction-sections +KBUILD_CPPFLAGS += -fdata-sections -ffunction-sections LDFLAGS_barebox += --gc-sections endif -machdirs := $(patsubst %,arch/ppc/mach-%/,$(machine-y)) +machdirs := $(patsubst %,arch/powerpc/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else -CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif +KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) archprepare: maketools @@ -50,25 +44,18 @@ PHONY += maketools ifneq ($(board-y),) -BOARD := arch/ppc/boards/$(board-y)/ +BOARD := arch/powerpc/boards/$(board-y)/ else BOARD := endif ifneq ($(machine-y),) -MACH := arch/ppc/mach-$(machine-y)/ +MACH := arch/powerpc/mach-$(machine-y)/ else MACH := endif -ifneq ($(cpu-y),) -CPU := arch/ppc/cpu-$(cpu-y)/ -else -CPU := -endif - -common-y += $(BOARD) $(CPU) $(MACH) -common-y += arch/ppc/lib/ +common-y += $(BOARD) $(MACH) arch/powerpc/ ifdef CONFIG_MPC85xx lds-y += $(MACH)/barebox.lds diff --git a/arch/ppc/boards/.gitignore b/arch/powerpc/boards/.gitignore index d1165788c9..d1165788c9 100644 --- a/arch/ppc/boards/.gitignore +++ b/arch/powerpc/boards/.gitignore diff --git a/arch/ppc/boards/freescale-p1010rdb/Makefile b/arch/powerpc/boards/freescale-p1010rdb/Makefile index a7b64eef4d..a7b64eef4d 100644 --- a/arch/ppc/boards/freescale-p1010rdb/Makefile +++ b/arch/powerpc/boards/freescale-p1010rdb/Makefile diff --git a/arch/ppc/boards/freescale-p1010rdb/config.h b/arch/powerpc/boards/freescale-p1010rdb/config.h index 4f67183507..4f67183507 100644 --- a/arch/ppc/boards/freescale-p1010rdb/config.h +++ b/arch/powerpc/boards/freescale-p1010rdb/config.h diff --git a/arch/ppc/boards/freescale-p1010rdb/ddr.c b/arch/powerpc/boards/freescale-p1010rdb/ddr.c index 18069f4df1..18069f4df1 100644 --- a/arch/ppc/boards/freescale-p1010rdb/ddr.c +++ b/arch/powerpc/boards/freescale-p1010rdb/ddr.c diff --git a/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init b/arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init index c0e04c1f2d..c0e04c1f2d 100644 --- a/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init +++ b/arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init diff --git a/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config b/arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config index bffd86882e..bffd86882e 100644 --- a/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config +++ b/arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config diff --git a/arch/ppc/boards/freescale-p1010rdb/law.c b/arch/powerpc/boards/freescale-p1010rdb/law.c index 6edfbc2fb8..6edfbc2fb8 100644 --- a/arch/ppc/boards/freescale-p1010rdb/law.c +++ b/arch/powerpc/boards/freescale-p1010rdb/law.c diff --git a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c b/arch/powerpc/boards/freescale-p1010rdb/p1010rdb.c index b163327597..b163327597 100644 --- a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c +++ b/arch/powerpc/boards/freescale-p1010rdb/p1010rdb.c diff --git a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.h b/arch/powerpc/boards/freescale-p1010rdb/p1010rdb.h index f325ff48fd..f325ff48fd 100644 --- a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.h +++ b/arch/powerpc/boards/freescale-p1010rdb/p1010rdb.h diff --git a/arch/ppc/boards/freescale-p1010rdb/tlb.c b/arch/powerpc/boards/freescale-p1010rdb/tlb.c index 23ef0f2ade..23ef0f2ade 100644 --- a/arch/ppc/boards/freescale-p1010rdb/tlb.c +++ b/arch/powerpc/boards/freescale-p1010rdb/tlb.c diff --git a/arch/ppc/boards/freescale-p1022ds/Makefile b/arch/powerpc/boards/freescale-p1022ds/Makefile index 48867fa851..48867fa851 100644 --- a/arch/ppc/boards/freescale-p1022ds/Makefile +++ b/arch/powerpc/boards/freescale-p1022ds/Makefile diff --git a/arch/ppc/boards/freescale-p1022ds/config.h b/arch/powerpc/boards/freescale-p1022ds/config.h index 666b9ff987..666b9ff987 100644 --- a/arch/ppc/boards/freescale-p1022ds/config.h +++ b/arch/powerpc/boards/freescale-p1022ds/config.h diff --git a/arch/ppc/boards/freescale-p1022ds/ddr.c b/arch/powerpc/boards/freescale-p1022ds/ddr.c index 1944518c79..1944518c79 100644 --- a/arch/ppc/boards/freescale-p1022ds/ddr.c +++ b/arch/powerpc/boards/freescale-p1022ds/ddr.c diff --git a/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init b/arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init index c0e04c1f2d..c0e04c1f2d 100644 --- a/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init +++ b/arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init diff --git a/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config b/arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config index bffd86882e..bffd86882e 100644 --- a/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config +++ b/arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config diff --git a/arch/ppc/boards/freescale-p1022ds/ics307_clk.c b/arch/powerpc/boards/freescale-p1022ds/ics307_clk.c index f7c5bbde99..f7c5bbde99 100644 --- a/arch/ppc/boards/freescale-p1022ds/ics307_clk.c +++ b/arch/powerpc/boards/freescale-p1022ds/ics307_clk.c diff --git a/arch/ppc/boards/freescale-p1022ds/law.c b/arch/powerpc/boards/freescale-p1022ds/law.c index 167937a05a..167937a05a 100644 --- a/arch/ppc/boards/freescale-p1022ds/law.c +++ b/arch/powerpc/boards/freescale-p1022ds/law.c diff --git a/arch/ppc/boards/freescale-p1022ds/p1022ds.c b/arch/powerpc/boards/freescale-p1022ds/p1022ds.c index d80c234ea9..d80c234ea9 100644 --- a/arch/ppc/boards/freescale-p1022ds/p1022ds.c +++ b/arch/powerpc/boards/freescale-p1022ds/p1022ds.c diff --git a/arch/ppc/boards/freescale-p1022ds/p1022ds.h b/arch/powerpc/boards/freescale-p1022ds/p1022ds.h index cbc2aca644..cbc2aca644 100644 --- a/arch/ppc/boards/freescale-p1022ds/p1022ds.h +++ b/arch/powerpc/boards/freescale-p1022ds/p1022ds.h diff --git a/arch/ppc/boards/freescale-p1022ds/tlb.c b/arch/powerpc/boards/freescale-p1022ds/tlb.c index 86ab43aec0..86ab43aec0 100644 --- a/arch/ppc/boards/freescale-p1022ds/tlb.c +++ b/arch/powerpc/boards/freescale-p1022ds/tlb.c diff --git a/arch/ppc/boards/freescale-p2020rdb/Makefile b/arch/powerpc/boards/freescale-p2020rdb/Makefile index b2497f695c..b2497f695c 100644 --- a/arch/ppc/boards/freescale-p2020rdb/Makefile +++ b/arch/powerpc/boards/freescale-p2020rdb/Makefile diff --git a/arch/ppc/boards/freescale-p2020rdb/config.h b/arch/powerpc/boards/freescale-p2020rdb/config.h index e607ee7b46..e607ee7b46 100644 --- a/arch/ppc/boards/freescale-p2020rdb/config.h +++ b/arch/powerpc/boards/freescale-p2020rdb/config.h diff --git a/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init b/arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init index 4d7b03e26d..4d7b03e26d 100644 --- a/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init +++ b/arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init diff --git a/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config b/arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config index 23e0ba2a5d..23e0ba2a5d 100644 --- a/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config +++ b/arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config diff --git a/arch/ppc/boards/freescale-p2020rdb/law.c b/arch/powerpc/boards/freescale-p2020rdb/law.c index 420a69eeec..420a69eeec 100644 --- a/arch/ppc/boards/freescale-p2020rdb/law.c +++ b/arch/powerpc/boards/freescale-p2020rdb/law.c diff --git a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c b/arch/powerpc/boards/freescale-p2020rdb/p2020rdb.c index 555976578e..555976578e 100644 --- a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c +++ b/arch/powerpc/boards/freescale-p2020rdb/p2020rdb.c diff --git a/arch/ppc/boards/freescale-p2020rdb/tlb.c b/arch/powerpc/boards/freescale-p2020rdb/tlb.c index 9853673ff2..9853673ff2 100644 --- a/arch/ppc/boards/freescale-p2020rdb/tlb.c +++ b/arch/powerpc/boards/freescale-p2020rdb/tlb.c diff --git a/arch/ppc/boards/owc-da923rc/Makefile b/arch/powerpc/boards/owc-da923rc/Makefile index 4cf6c5cf3c..4cf6c5cf3c 100644 --- a/arch/ppc/boards/owc-da923rc/Makefile +++ b/arch/powerpc/boards/owc-da923rc/Makefile diff --git a/arch/ppc/boards/owc-da923rc/config.h b/arch/powerpc/boards/owc-da923rc/config.h index 3895324e95..3895324e95 100644 --- a/arch/ppc/boards/owc-da923rc/config.h +++ b/arch/powerpc/boards/owc-da923rc/config.h diff --git a/arch/ppc/boards/owc-da923rc/da923rc.c b/arch/powerpc/boards/owc-da923rc/da923rc.c index 2665a15091..2665a15091 100644 --- a/arch/ppc/boards/owc-da923rc/da923rc.c +++ b/arch/powerpc/boards/owc-da923rc/da923rc.c diff --git a/arch/ppc/boards/owc-da923rc/ddr.c b/arch/powerpc/boards/owc-da923rc/ddr.c index fc0c50cdcd..fc0c50cdcd 100644 --- a/arch/ppc/boards/owc-da923rc/ddr.c +++ b/arch/powerpc/boards/owc-da923rc/ddr.c diff --git a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot index ce7da18e63..ce7da18e63 100644 --- a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot +++ b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot diff --git a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init index 80cc2cffb3..80cc2cffb3 100644 --- a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init +++ b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init diff --git a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/config b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/config index 79e2606a71..79e2606a71 100644 --- a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/config +++ b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/config diff --git a/arch/ppc/boards/owc-da923rc/law.c b/arch/powerpc/boards/owc-da923rc/law.c index 3d32c7e677..3d32c7e677 100644 --- a/arch/ppc/boards/owc-da923rc/law.c +++ b/arch/powerpc/boards/owc-da923rc/law.c diff --git a/arch/ppc/boards/owc-da923rc/nand.c b/arch/powerpc/boards/owc-da923rc/nand.c index 550d790570..550d790570 100644 --- a/arch/ppc/boards/owc-da923rc/nand.c +++ b/arch/powerpc/boards/owc-da923rc/nand.c diff --git a/arch/ppc/boards/owc-da923rc/product_data.c b/arch/powerpc/boards/owc-da923rc/product_data.c index 5135afdd2a..5135afdd2a 100644 --- a/arch/ppc/boards/owc-da923rc/product_data.c +++ b/arch/powerpc/boards/owc-da923rc/product_data.c diff --git a/arch/ppc/boards/owc-da923rc/product_data.h b/arch/powerpc/boards/owc-da923rc/product_data.h index cbbb8d377f..cbbb8d377f 100644 --- a/arch/ppc/boards/owc-da923rc/product_data.h +++ b/arch/powerpc/boards/owc-da923rc/product_data.h diff --git a/arch/ppc/boards/owc-da923rc/tlb.c b/arch/powerpc/boards/owc-da923rc/tlb.c index 889e2743b7..889e2743b7 100644 --- a/arch/ppc/boards/owc-da923rc/tlb.c +++ b/arch/powerpc/boards/owc-da923rc/tlb.c diff --git a/arch/ppc/boards/pcm030/Makefile b/arch/powerpc/boards/pcm030/Makefile index 4e5dc4f57b..4e5dc4f57b 100644 --- a/arch/ppc/boards/pcm030/Makefile +++ b/arch/powerpc/boards/pcm030/Makefile diff --git a/arch/ppc/boards/pcm030/barebox.lds.S b/arch/powerpc/boards/pcm030/barebox.lds.S index 6c91ed6256..6fd8b43c6e 100644 --- a/arch/ppc/boards/pcm030/barebox.lds.S +++ b/arch/powerpc/boards/pcm030/barebox.lds.S @@ -31,7 +31,7 @@ SECTIONS { _text = .; _stext = .; - arch/ppc/mach-mpc5xxx/start.o (.text) + arch/powerpc/mach-mpc5xxx/start.o (.text) *(.text*) *(.got1*) . = ALIGN(16); diff --git a/arch/ppc/boards/pcm030/config.h b/arch/powerpc/boards/pcm030/config.h index 3fe1f286d9..3fe1f286d9 100644 --- a/arch/ppc/boards/pcm030/config.h +++ b/arch/powerpc/boards/pcm030/config.h diff --git a/arch/ppc/boards/pcm030/eeprom.c b/arch/powerpc/boards/pcm030/eeprom.c index aa00f361cd..aa00f361cd 100644 --- a/arch/ppc/boards/pcm030/eeprom.c +++ b/arch/powerpc/boards/pcm030/eeprom.c diff --git a/arch/ppc/boards/pcm030/env/init/mtdparts-nor b/arch/powerpc/boards/pcm030/env/init/mtdparts-nor index 44c07ead21..44c07ead21 100644 --- a/arch/ppc/boards/pcm030/env/init/mtdparts-nor +++ b/arch/powerpc/boards/pcm030/env/init/mtdparts-nor diff --git a/arch/ppc/boards/pcm030/env/nv/linux.bootargs.console b/arch/powerpc/boards/pcm030/env/nv/linux.bootargs.console index 31ce0e71eb..31ce0e71eb 100644 --- a/arch/ppc/boards/pcm030/env/nv/linux.bootargs.console +++ b/arch/powerpc/boards/pcm030/env/nv/linux.bootargs.console diff --git a/arch/ppc/boards/pcm030/mt46v32m16-75.h b/arch/powerpc/boards/pcm030/mt46v32m16-75.h index 60ea09eebc..60ea09eebc 100644 --- a/arch/ppc/boards/pcm030/mt46v32m16-75.h +++ b/arch/powerpc/boards/pcm030/mt46v32m16-75.h diff --git a/arch/ppc/boards/pcm030/pcm030.c b/arch/powerpc/boards/pcm030/pcm030.c index 05c1ce9ca8..05c1ce9ca8 100644 --- a/arch/ppc/boards/pcm030/pcm030.c +++ b/arch/powerpc/boards/pcm030/pcm030.c diff --git a/arch/ppc/configs/owc_da923rc_defconfig b/arch/powerpc/configs/owc_da923rc_defconfig index 183ddb15f9..183ddb15f9 100644 --- a/arch/ppc/configs/owc_da923rc_defconfig +++ b/arch/powerpc/configs/owc_da923rc_defconfig diff --git a/arch/ppc/configs/p1010rdb_defconfig b/arch/powerpc/configs/p1010rdb_defconfig index 73c02c2e7f..73c02c2e7f 100644 --- a/arch/ppc/configs/p1010rdb_defconfig +++ b/arch/powerpc/configs/p1010rdb_defconfig diff --git a/arch/ppc/configs/p1022ds_defconfig b/arch/powerpc/configs/p1022ds_defconfig index fce3eabaf9..fce3eabaf9 100644 --- a/arch/ppc/configs/p1022ds_defconfig +++ b/arch/powerpc/configs/p1022ds_defconfig diff --git a/arch/ppc/configs/p2020rdb_defconfig b/arch/powerpc/configs/p2020rdb_defconfig index 6cc0328727..6cc0328727 100644 --- a/arch/ppc/configs/p2020rdb_defconfig +++ b/arch/powerpc/configs/p2020rdb_defconfig diff --git a/arch/ppc/configs/pcm030_defconfig b/arch/powerpc/configs/pcm030_defconfig index bd83ff44f0..b97a8d5d0c 100644 --- a/arch/ppc/configs/pcm030_defconfig +++ b/arch/powerpc/configs/pcm030_defconfig @@ -6,7 +6,7 @@ CONFIG_AUTO_COMPLETE=y CONFIG_BOOTM_SHOW_TYPE=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/pcm030/env" +CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/powerpc/boards/pcm030/env" CONFIG_LONGHELP=y CONFIG_CMD_IOMEM=y CONFIG_CMD_MEMINFO=y diff --git a/arch/ppc/cpu-85xx/Makefile b/arch/powerpc/cpu-85xx/Makefile index c649c4ec25..c649c4ec25 100644 --- a/arch/ppc/cpu-85xx/Makefile +++ b/arch/powerpc/cpu-85xx/Makefile diff --git a/arch/ppc/cpu-85xx/fixed_ivor.S b/arch/powerpc/cpu-85xx/fixed_ivor.S index 0674c3fc14..0674c3fc14 100644 --- a/arch/ppc/cpu-85xx/fixed_ivor.S +++ b/arch/powerpc/cpu-85xx/fixed_ivor.S diff --git a/arch/ppc/cpu-85xx/mmu.c b/arch/powerpc/cpu-85xx/mmu.c index 6b93c3e8db..6b93c3e8db 100644 --- a/arch/ppc/cpu-85xx/mmu.c +++ b/arch/powerpc/cpu-85xx/mmu.c diff --git a/arch/ppc/cpu-85xx/resetvec.S b/arch/powerpc/cpu-85xx/resetvec.S index 29555d4a00..29555d4a00 100644 --- a/arch/ppc/cpu-85xx/resetvec.S +++ b/arch/powerpc/cpu-85xx/resetvec.S diff --git a/arch/ppc/cpu-85xx/start.S b/arch/powerpc/cpu-85xx/start.S index 82c2c0ad8c..82c2c0ad8c 100644 --- a/arch/ppc/cpu-85xx/start.S +++ b/arch/powerpc/cpu-85xx/start.S diff --git a/arch/ppc/cpu-85xx/tlb.c b/arch/powerpc/cpu-85xx/tlb.c index 3a5b413627..3a5b413627 100644 --- a/arch/ppc/cpu-85xx/tlb.c +++ b/arch/powerpc/cpu-85xx/tlb.c diff --git a/arch/ppc/cpu-85xx/traps.c b/arch/powerpc/cpu-85xx/traps.c index f8e5e42290..f8e5e42290 100644 --- a/arch/ppc/cpu-85xx/traps.c +++ b/arch/powerpc/cpu-85xx/traps.c diff --git a/arch/ppc/ddr-8xxx/Makefile b/arch/powerpc/ddr-8xxx/Makefile index 43ae3a41df..43ae3a41df 100644 --- a/arch/ppc/ddr-8xxx/Makefile +++ b/arch/powerpc/ddr-8xxx/Makefile diff --git a/arch/ppc/ddr-8xxx/common_timing_params.h b/arch/powerpc/ddr-8xxx/common_timing_params.h index 85a1e2868f..85a1e2868f 100644 --- a/arch/ppc/ddr-8xxx/common_timing_params.h +++ b/arch/powerpc/ddr-8xxx/common_timing_params.h diff --git a/arch/ppc/ddr-8xxx/ctrl_regs.c b/arch/powerpc/ddr-8xxx/ctrl_regs.c index e3d43ab09e..e3d43ab09e 100644 --- a/arch/ppc/ddr-8xxx/ctrl_regs.c +++ b/arch/powerpc/ddr-8xxx/ctrl_regs.c diff --git a/arch/ppc/ddr-8xxx/ddr.h b/arch/powerpc/ddr-8xxx/ddr.h index 2ef87f2776..2ef87f2776 100644 --- a/arch/ppc/ddr-8xxx/ddr.h +++ b/arch/powerpc/ddr-8xxx/ddr.h diff --git a/arch/ppc/ddr-8xxx/ddr2_dimm_params.c b/arch/powerpc/ddr-8xxx/ddr2_dimm_params.c index 22c05ca6da..22c05ca6da 100644 --- a/arch/ppc/ddr-8xxx/ddr2_dimm_params.c +++ b/arch/powerpc/ddr-8xxx/ddr2_dimm_params.c diff --git a/arch/ppc/ddr-8xxx/ddr3_dimm_params.c b/arch/powerpc/ddr-8xxx/ddr3_dimm_params.c index 4f44925ab9..4f44925ab9 100644 --- a/arch/ppc/ddr-8xxx/ddr3_dimm_params.c +++ b/arch/powerpc/ddr-8xxx/ddr3_dimm_params.c diff --git a/arch/ppc/ddr-8xxx/ddr_setctrl.c b/arch/powerpc/ddr-8xxx/ddr_setctrl.c index 115fb42070..115fb42070 100644 --- a/arch/ppc/ddr-8xxx/ddr_setctrl.c +++ b/arch/powerpc/ddr-8xxx/ddr_setctrl.c diff --git a/arch/ppc/ddr-8xxx/lc_common_dimm_params.c b/arch/powerpc/ddr-8xxx/lc_common_dimm_params.c index 9d90fb76db..9d90fb76db 100644 --- a/arch/ppc/ddr-8xxx/lc_common_dimm_params.c +++ b/arch/powerpc/ddr-8xxx/lc_common_dimm_params.c diff --git a/arch/ppc/ddr-8xxx/main.c b/arch/powerpc/ddr-8xxx/main.c index 99b877b5ca..99b877b5ca 100644 --- a/arch/ppc/ddr-8xxx/main.c +++ b/arch/powerpc/ddr-8xxx/main.c diff --git a/arch/ppc/ddr-8xxx/options.c b/arch/powerpc/ddr-8xxx/options.c index ccf5d5e9d8..ccf5d5e9d8 100644 --- a/arch/ppc/ddr-8xxx/options.c +++ b/arch/powerpc/ddr-8xxx/options.c diff --git a/arch/ppc/ddr-8xxx/util.c b/arch/powerpc/ddr-8xxx/util.c index 626b5f3f9b..626b5f3f9b 100644 --- a/arch/ppc/ddr-8xxx/util.c +++ b/arch/powerpc/ddr-8xxx/util.c diff --git a/arch/ppc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h index af3c61a823..af3c61a823 100644 --- a/arch/ppc/include/asm/atomic.h +++ b/arch/powerpc/include/asm/atomic.h diff --git a/arch/ppc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index 2fdd57eff0..2fdd57eff0 100644 --- a/arch/ppc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h diff --git a/arch/ppc/include/asm/bitsperlong.h b/arch/powerpc/include/asm/bitsperlong.h index 6dc0bb0c13..6dc0bb0c13 100644 --- a/arch/ppc/include/asm/bitsperlong.h +++ b/arch/powerpc/include/asm/bitsperlong.h diff --git a/arch/ppc/include/asm/byteorder.h b/arch/powerpc/include/asm/byteorder.h index aa6cc4fac9..aa6cc4fac9 100644 --- a/arch/ppc/include/asm/byteorder.h +++ b/arch/powerpc/include/asm/byteorder.h diff --git a/arch/ppc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index 147ceb6714..147ceb6714 100644 --- a/arch/ppc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h diff --git a/arch/ppc/include/asm/common.h b/arch/powerpc/include/asm/common.h index b91f51e462..b91f51e462 100644 --- a/arch/ppc/include/asm/common.h +++ b/arch/powerpc/include/asm/common.h diff --git a/arch/ppc/include/asm/config.h b/arch/powerpc/include/asm/config.h index ce6581a83f..ce6581a83f 100644 --- a/arch/ppc/include/asm/config.h +++ b/arch/powerpc/include/asm/config.h diff --git a/arch/ppc/include/asm/dma.h b/arch/powerpc/include/asm/dma.h index 27d269f491..27d269f491 100644 --- a/arch/ppc/include/asm/dma.h +++ b/arch/powerpc/include/asm/dma.h diff --git a/arch/ppc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index bb8762b385..bb8762b385 100644 --- a/arch/ppc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h diff --git a/arch/ppc/include/asm/fsl_ddr_dimm_params.h b/arch/powerpc/include/asm/fsl_ddr_dimm_params.h index 9e6f6b4d34..9e6f6b4d34 100644 --- a/arch/ppc/include/asm/fsl_ddr_dimm_params.h +++ b/arch/powerpc/include/asm/fsl_ddr_dimm_params.h diff --git a/arch/ppc/include/asm/fsl_ddr_sdram.h b/arch/powerpc/include/asm/fsl_ddr_sdram.h index f4732389f6..f4732389f6 100644 --- a/arch/ppc/include/asm/fsl_ddr_sdram.h +++ b/arch/powerpc/include/asm/fsl_ddr_sdram.h diff --git a/arch/ppc/include/asm/fsl_ifc.h b/arch/powerpc/include/asm/fsl_ifc.h index 8faff75033..8faff75033 100644 --- a/arch/ppc/include/asm/fsl_ifc.h +++ b/arch/powerpc/include/asm/fsl_ifc.h diff --git a/arch/ppc/include/asm/fsl_law.h b/arch/powerpc/include/asm/fsl_law.h index 7acb63c9de..7acb63c9de 100644 --- a/arch/ppc/include/asm/fsl_law.h +++ b/arch/powerpc/include/asm/fsl_law.h diff --git a/arch/ppc/include/asm/fsl_lbc.h b/arch/powerpc/include/asm/fsl_lbc.h index 27d194ee74..27d194ee74 100644 --- a/arch/ppc/include/asm/fsl_lbc.h +++ b/arch/powerpc/include/asm/fsl_lbc.h diff --git a/arch/ppc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 025c06f3b7..025c06f3b7 100644 --- a/arch/ppc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h diff --git a/arch/ppc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index c691de1c77..c691de1c77 100644 --- a/arch/ppc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h diff --git a/arch/ppc/include/asm/module.h b/arch/powerpc/include/asm/module.h index 09c04402c5..09c04402c5 100644 --- a/arch/ppc/include/asm/module.h +++ b/arch/powerpc/include/asm/module.h diff --git a/arch/ppc/include/asm/pci_io.h b/arch/powerpc/include/asm/pci_io.h index 9b738c383f..9b738c383f 100644 --- a/arch/ppc/include/asm/pci_io.h +++ b/arch/powerpc/include/asm/pci_io.h diff --git a/arch/ppc/include/asm/posix_types.h b/arch/powerpc/include/asm/posix_types.h index 22cae6230c..22cae6230c 100644 --- a/arch/ppc/include/asm/posix_types.h +++ b/arch/powerpc/include/asm/posix_types.h diff --git a/arch/ppc/include/asm/ppc_asm.tmpl b/arch/powerpc/include/asm/ppc_asm.tmpl index 60c6caf53c..60c6caf53c 100644 --- a/arch/ppc/include/asm/ppc_asm.tmpl +++ b/arch/powerpc/include/asm/ppc_asm.tmpl diff --git a/arch/ppc/include/asm/ppc_defs.h b/arch/powerpc/include/asm/ppc_defs.h index fcdb38d4fd..fcdb38d4fd 100644 --- a/arch/ppc/include/asm/ppc_defs.h +++ b/arch/powerpc/include/asm/ppc_defs.h diff --git a/arch/ppc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 39a89a9d15..39a89a9d15 100644 --- a/arch/ppc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h diff --git a/arch/ppc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index b4d599f43b..b4d599f43b 100644 --- a/arch/ppc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h diff --git a/arch/ppc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h index 2b8c516038..2b8c516038 100644 --- a/arch/ppc/include/asm/sections.h +++ b/arch/powerpc/include/asm/sections.h diff --git a/arch/ppc/include/asm/sigcontext.h b/arch/powerpc/include/asm/sigcontext.h index 4bd66a707d..4bd66a707d 100644 --- a/arch/ppc/include/asm/sigcontext.h +++ b/arch/powerpc/include/asm/sigcontext.h diff --git a/arch/ppc/include/asm/signal.h b/arch/powerpc/include/asm/signal.h index b11a28efd1..b11a28efd1 100644 --- a/arch/ppc/include/asm/signal.h +++ b/arch/powerpc/include/asm/signal.h diff --git a/arch/ppc/include/asm/status_led.h b/arch/powerpc/include/asm/status_led.h index eb81f371c9..eb81f371c9 100644 --- a/arch/ppc/include/asm/status_led.h +++ b/arch/powerpc/include/asm/status_led.h diff --git a/arch/ppc/include/asm/string.h b/arch/powerpc/include/asm/string.h index 33d143f04e..33d143f04e 100644 --- a/arch/ppc/include/asm/string.h +++ b/arch/powerpc/include/asm/string.h diff --git a/arch/ppc/include/asm/swab.h b/arch/powerpc/include/asm/swab.h index 110488e641..110488e641 100644 --- a/arch/ppc/include/asm/swab.h +++ b/arch/powerpc/include/asm/swab.h diff --git a/arch/ppc/include/asm/types.h b/arch/powerpc/include/asm/types.h index 2d3ce0a283..2d3ce0a283 100644 --- a/arch/ppc/include/asm/types.h +++ b/arch/powerpc/include/asm/types.h diff --git a/arch/ppc/include/asm/unaligned.h b/arch/powerpc/include/asm/unaligned.h index a41fa8cb4a..a41fa8cb4a 100644 --- a/arch/ppc/include/asm/unaligned.h +++ b/arch/powerpc/include/asm/unaligned.h diff --git a/arch/ppc/lib/Makefile b/arch/powerpc/lib/Makefile index ba2f078b62..ba2f078b62 100644 --- a/arch/ppc/lib/Makefile +++ b/arch/powerpc/lib/Makefile diff --git a/arch/ppc/lib/asm-offsets.c b/arch/powerpc/lib/asm-offsets.c index bef280edd7..bef280edd7 100644 --- a/arch/ppc/lib/asm-offsets.c +++ b/arch/powerpc/lib/asm-offsets.c diff --git a/arch/ppc/lib/bat_rw.c b/arch/powerpc/lib/bat_rw.c index 3e8882eaf4..3e8882eaf4 100644 --- a/arch/ppc/lib/bat_rw.c +++ b/arch/powerpc/lib/bat_rw.c diff --git a/arch/ppc/lib/board.c b/arch/powerpc/lib/board.c index 3f13db9218..3f13db9218 100644 --- a/arch/ppc/lib/board.c +++ b/arch/powerpc/lib/board.c diff --git a/arch/ppc/lib/crtsavres.S b/arch/powerpc/lib/crtsavres.S index b0fbbfc997..b0fbbfc997 100644 --- a/arch/ppc/lib/crtsavres.S +++ b/arch/powerpc/lib/crtsavres.S diff --git a/arch/ppc/lib/extable.c b/arch/powerpc/lib/extable.c index 1e9ad1e63c..1e9ad1e63c 100644 --- a/arch/ppc/lib/extable.c +++ b/arch/powerpc/lib/extable.c diff --git a/arch/ppc/lib/kgdb.c b/arch/powerpc/lib/kgdb.c index 762cc7a88c..762cc7a88c 100644 --- a/arch/ppc/lib/kgdb.c +++ b/arch/powerpc/lib/kgdb.c diff --git a/arch/ppc/lib/misc.S b/arch/powerpc/lib/misc.S index bd06ff2062..bd06ff2062 100644 --- a/arch/ppc/lib/misc.S +++ b/arch/powerpc/lib/misc.S diff --git a/arch/ppc/lib/module.c b/arch/powerpc/lib/module.c index 9ec6095571..9ec6095571 100644 --- a/arch/ppc/lib/module.c +++ b/arch/powerpc/lib/module.c diff --git a/arch/ppc/lib/ppclinux.c b/arch/powerpc/lib/ppclinux.c index 05c29be7da..05c29be7da 100644 --- a/arch/ppc/lib/ppclinux.c +++ b/arch/powerpc/lib/ppclinux.c diff --git a/arch/ppc/lib/ppcstring.S b/arch/powerpc/lib/ppcstring.S index cce85e3252..cce85e3252 100644 --- a/arch/ppc/lib/ppcstring.S +++ b/arch/powerpc/lib/ppcstring.S diff --git a/arch/ppc/lib/reloc.S b/arch/powerpc/lib/reloc.S index 7ef2ea3340..7ef2ea3340 100644 --- a/arch/ppc/lib/reloc.S +++ b/arch/powerpc/lib/reloc.S diff --git a/arch/ppc/lib/ticks.S b/arch/powerpc/lib/ticks.S index a41fe8b781..a41fe8b781 100644 --- a/arch/ppc/lib/ticks.S +++ b/arch/powerpc/lib/ticks.S diff --git a/arch/ppc/mach-mpc5xxx/Kconfig b/arch/powerpc/mach-mpc5xxx/Kconfig index 180aa32ad1..180aa32ad1 100644 --- a/arch/ppc/mach-mpc5xxx/Kconfig +++ b/arch/powerpc/mach-mpc5xxx/Kconfig diff --git a/arch/ppc/mach-mpc5xxx/Makefile b/arch/powerpc/mach-mpc5xxx/Makefile index c532a6d1ee..c532a6d1ee 100644 --- a/arch/ppc/mach-mpc5xxx/Makefile +++ b/arch/powerpc/mach-mpc5xxx/Makefile diff --git a/arch/ppc/mach-mpc5xxx/cpu.c b/arch/powerpc/mach-mpc5xxx/cpu.c index ab58967aa4..ab58967aa4 100644 --- a/arch/ppc/mach-mpc5xxx/cpu.c +++ b/arch/powerpc/mach-mpc5xxx/cpu.c diff --git a/arch/ppc/mach-mpc5xxx/cpu_init.c b/arch/powerpc/mach-mpc5xxx/cpu_init.c index 1dae6c1e46..1dae6c1e46 100644 --- a/arch/ppc/mach-mpc5xxx/cpu_init.c +++ b/arch/powerpc/mach-mpc5xxx/cpu_init.c diff --git a/arch/ppc/mach-mpc5xxx/firmware_sc_task.impl.S b/arch/powerpc/mach-mpc5xxx/firmware_sc_task.impl.S index b668ee5cf8..b668ee5cf8 100644 --- a/arch/ppc/mach-mpc5xxx/firmware_sc_task.impl.S +++ b/arch/powerpc/mach-mpc5xxx/firmware_sc_task.impl.S diff --git a/arch/ppc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S b/arch/powerpc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S index 42d0e3ce08..42d0e3ce08 100644 --- a/arch/ppc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S +++ b/arch/powerpc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S diff --git a/arch/ppc/mach-mpc5xxx/include/mach/clock.h b/arch/powerpc/mach-mpc5xxx/include/mach/clock.h index b19686f18c..b19686f18c 100644 --- a/arch/ppc/mach-mpc5xxx/include/mach/clock.h +++ b/arch/powerpc/mach-mpc5xxx/include/mach/clock.h diff --git a/arch/ppc/mach-mpc5xxx/include/mach/mpc5xxx.h b/arch/powerpc/mach-mpc5xxx/include/mach/mpc5xxx.h index f2cae9097d..1e2e726355 100644 --- a/arch/ppc/mach-mpc5xxx/include/mach/mpc5xxx.h +++ b/arch/powerpc/mach-mpc5xxx/include/mach/mpc5xxx.h @@ -1,5 +1,5 @@ /* - * arch/ppc/mach-mpc5xxx/include/mach/mpc5xxx.h + * arch/powerpc/mach-mpc5xxx/include/mach/mpc5xxx.h * * Prototypes, etc. for the Motorola MGT5xxx/MPC5xxx * embedded cpu chips diff --git a/arch/ppc/mach-mpc5xxx/include/mach/sdma.h b/arch/powerpc/mach-mpc5xxx/include/mach/sdma.h index 6a25d79fb6..6a25d79fb6 100644 --- a/arch/ppc/mach-mpc5xxx/include/mach/sdma.h +++ b/arch/powerpc/mach-mpc5xxx/include/mach/sdma.h diff --git a/arch/ppc/mach-mpc5xxx/io.S b/arch/powerpc/mach-mpc5xxx/io.S index 3ea9b3f0fc..3ea9b3f0fc 100644 --- a/arch/ppc/mach-mpc5xxx/io.S +++ b/arch/powerpc/mach-mpc5xxx/io.S diff --git a/arch/ppc/mach-mpc5xxx/loadtask.c b/arch/powerpc/mach-mpc5xxx/loadtask.c index 1458cf7218..1458cf7218 100644 --- a/arch/ppc/mach-mpc5xxx/loadtask.c +++ b/arch/powerpc/mach-mpc5xxx/loadtask.c diff --git a/arch/ppc/mach-mpc5xxx/pci_mpc5200.c b/arch/powerpc/mach-mpc5xxx/pci_mpc5200.c index 99fa970dd0..99fa970dd0 100644 --- a/arch/ppc/mach-mpc5xxx/pci_mpc5200.c +++ b/arch/powerpc/mach-mpc5xxx/pci_mpc5200.c diff --git a/arch/ppc/mach-mpc5xxx/reginfo.c b/arch/powerpc/mach-mpc5xxx/reginfo.c index e41d235a5d..e41d235a5d 100644 --- a/arch/ppc/mach-mpc5xxx/reginfo.c +++ b/arch/powerpc/mach-mpc5xxx/reginfo.c diff --git a/arch/ppc/mach-mpc5xxx/speed.c b/arch/powerpc/mach-mpc5xxx/speed.c index 76a3019637..76a3019637 100644 --- a/arch/ppc/mach-mpc5xxx/speed.c +++ b/arch/powerpc/mach-mpc5xxx/speed.c diff --git a/arch/ppc/mach-mpc5xxx/start.S b/arch/powerpc/mach-mpc5xxx/start.S index 291f6250a5..291f6250a5 100644 --- a/arch/ppc/mach-mpc5xxx/start.S +++ b/arch/powerpc/mach-mpc5xxx/start.S diff --git a/arch/ppc/mach-mpc5xxx/time.c b/arch/powerpc/mach-mpc5xxx/time.c index aaa4573f6f..aaa4573f6f 100644 --- a/arch/ppc/mach-mpc5xxx/time.c +++ b/arch/powerpc/mach-mpc5xxx/time.c diff --git a/arch/ppc/mach-mpc5xxx/traps.c b/arch/powerpc/mach-mpc5xxx/traps.c index 8441da2108..8441da2108 100644 --- a/arch/ppc/mach-mpc5xxx/traps.c +++ b/arch/powerpc/mach-mpc5xxx/traps.c diff --git a/arch/ppc/mach-mpc85xx/.gitignore b/arch/powerpc/mach-mpc85xx/.gitignore index d1165788c9..d1165788c9 100644 --- a/arch/ppc/mach-mpc85xx/.gitignore +++ b/arch/powerpc/mach-mpc85xx/.gitignore diff --git a/arch/ppc/mach-mpc85xx/Kconfig b/arch/powerpc/mach-mpc85xx/Kconfig index aa518b98fc..aa518b98fc 100644 --- a/arch/ppc/mach-mpc85xx/Kconfig +++ b/arch/powerpc/mach-mpc85xx/Kconfig diff --git a/arch/ppc/mach-mpc85xx/Makefile b/arch/powerpc/mach-mpc85xx/Makefile index de4f5efde2..de4f5efde2 100644 --- a/arch/ppc/mach-mpc85xx/Makefile +++ b/arch/powerpc/mach-mpc85xx/Makefile diff --git a/arch/ppc/mach-mpc85xx/barebox.lds.S b/arch/powerpc/mach-mpc85xx/barebox.lds.S index a09a01eba1..2b73fda4e6 100644 --- a/arch/ppc/mach-mpc85xx/barebox.lds.S +++ b/arch/powerpc/mach-mpc85xx/barebox.lds.S @@ -121,13 +121,13 @@ SECTIONS .bootpg RESET_VECTOR_ADDRESS - 0xffc : { _text = .; - arch/ppc/cpu-85xx/start.o (.bootpg) + arch/powerpc/cpu-85xx/start.o (.bootpg) } :text = 0xffff .resetvec RESET_VECTOR_ADDRESS : { KEEP(*(.resetvec)) - arch/ppc/cpu-85xx/resetvec.o (.resetvec) + arch/powerpc/cpu-85xx/resetvec.o (.resetvec) } :text = 0xffff . = RESET_VECTOR_ADDRESS + 0x4; diff --git a/arch/ppc/mach-mpc85xx/cpu.c b/arch/powerpc/mach-mpc85xx/cpu.c index 42464e810c..42464e810c 100644 --- a/arch/ppc/mach-mpc85xx/cpu.c +++ b/arch/powerpc/mach-mpc85xx/cpu.c diff --git a/arch/ppc/mach-mpc85xx/cpu_init.c b/arch/powerpc/mach-mpc85xx/cpu_init.c index 003a5f15b4..003a5f15b4 100644 --- a/arch/ppc/mach-mpc85xx/cpu_init.c +++ b/arch/powerpc/mach-mpc85xx/cpu_init.c diff --git a/arch/ppc/mach-mpc85xx/cpuid.c b/arch/powerpc/mach-mpc85xx/cpuid.c index 1f54a2b1c9..1f54a2b1c9 100644 --- a/arch/ppc/mach-mpc85xx/cpuid.c +++ b/arch/powerpc/mach-mpc85xx/cpuid.c diff --git a/arch/ppc/mach-mpc85xx/eth-devices.c b/arch/powerpc/mach-mpc85xx/eth-devices.c index ea5caff0c2..ea5caff0c2 100644 --- a/arch/ppc/mach-mpc85xx/eth-devices.c +++ b/arch/powerpc/mach-mpc85xx/eth-devices.c diff --git a/arch/ppc/mach-mpc85xx/fdt.c b/arch/powerpc/mach-mpc85xx/fdt.c index 1a2d780737..1a2d780737 100644 --- a/arch/ppc/mach-mpc85xx/fdt.c +++ b/arch/powerpc/mach-mpc85xx/fdt.c diff --git a/arch/ppc/mach-mpc85xx/fsl_gpio.c b/arch/powerpc/mach-mpc85xx/fsl_gpio.c index 468c780ff8..468c780ff8 100644 --- a/arch/ppc/mach-mpc85xx/fsl_gpio.c +++ b/arch/powerpc/mach-mpc85xx/fsl_gpio.c diff --git a/arch/ppc/mach-mpc85xx/fsl_i2c.c b/arch/powerpc/mach-mpc85xx/fsl_i2c.c index 51fcc64c26..51fcc64c26 100644 --- a/arch/ppc/mach-mpc85xx/fsl_i2c.c +++ b/arch/powerpc/mach-mpc85xx/fsl_i2c.c diff --git a/arch/ppc/mach-mpc85xx/fsl_law.c b/arch/powerpc/mach-mpc85xx/fsl_law.c index 38902e3be8..38902e3be8 100644 --- a/arch/ppc/mach-mpc85xx/fsl_law.c +++ b/arch/powerpc/mach-mpc85xx/fsl_law.c diff --git a/arch/ppc/mach-mpc85xx/include/mach/clock.h b/arch/powerpc/mach-mpc85xx/include/mach/clock.h index 0e68cf6667..0e68cf6667 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/clock.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/clock.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h b/arch/powerpc/mach-mpc85xx/include/mach/config_mpc85xx.h index fad2c47d11..fad2c47d11 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/config_mpc85xx.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/early_udelay.h b/arch/powerpc/mach-mpc85xx/include/mach/early_udelay.h index b8dc501251..b8dc501251 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/early_udelay.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/early_udelay.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/ffs64.h b/arch/powerpc/mach-mpc85xx/include/mach/ffs64.h index 045498c513..045498c513 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/ffs64.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/ffs64.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/fsl_i2c.h b/arch/powerpc/mach-mpc85xx/include/mach/fsl_i2c.h index d187c6cf49..d187c6cf49 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/fsl_i2c.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/fsl_i2c.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/gianfar.h b/arch/powerpc/mach-mpc85xx/include/mach/gianfar.h index 660cb1e98f..660cb1e98f 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/gianfar.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/gianfar.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/gpio.h b/arch/powerpc/mach-mpc85xx/include/mach/gpio.h index b41ecc5214..b41ecc5214 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/gpio.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/gpio.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/immap_85xx.h b/arch/powerpc/mach-mpc85xx/include/mach/immap_85xx.h index abcdb5c1e0..abcdb5c1e0 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/immap_85xx.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/immap_85xx.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/mmu.h b/arch/powerpc/mach-mpc85xx/include/mach/mmu.h index e2ecc62ef0..e2ecc62ef0 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/mmu.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/mmu.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/mpc85xx.h b/arch/powerpc/mach-mpc85xx/include/mach/mpc85xx.h index 1d9993ace9..1d9993ace9 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/mpc85xx.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/mpc85xx.h diff --git a/arch/ppc/mach-mpc85xx/speed.c b/arch/powerpc/mach-mpc85xx/speed.c index 610949443c..610949443c 100644 --- a/arch/ppc/mach-mpc85xx/speed.c +++ b/arch/powerpc/mach-mpc85xx/speed.c diff --git a/arch/ppc/mach-mpc85xx/time.c b/arch/powerpc/mach-mpc85xx/time.c index 9014fce194..9014fce194 100644 --- a/arch/ppc/mach-mpc85xx/time.c +++ b/arch/powerpc/mach-mpc85xx/time.c diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index fa8a173d8a..c71319507c 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -1,6 +1,6 @@ KBUILD_DEFCONFIG := erizo_generic_defconfig -CPPFLAGS += -fno-strict-aliasing +KBUILD_CPPFLAGS += -fno-strict-aliasing ifeq ($(CONFIG_ARCH_RV32I),y) cflags-y += -march=rv32im @@ -10,17 +10,16 @@ cflags-y += -fno-pic -pipe cflags-y += -Wall -Wstrict-prototypes \ -Wno-uninitialized -Wno-format -Wno-main -mcmodel=medany -LDFLAGS += $(ldflags-y) LDFLAGS_barebox += -nostdlib machine-$(CONFIG_MACH_ERIZO) := erizo TEXT_BASE = $(CONFIG_TEXT_BASE) -CPPFLAGS += -DTEXT_BASE=$(CONFIG_TEXT_BASE) +KBUILD_CPPFLAGS += -DTEXT_BASE=$(CONFIG_TEXT_BASE) ifndef CONFIG_MODULES # Add cleanup flags -CPPFLAGS += -fdata-sections -ffunction-sections +KBUILD_CPPFLAGS += -fdata-sections -ffunction-sections LDFLAGS_barebox += -static --gc-sections endif @@ -28,11 +27,7 @@ KBUILD_BINARY := barebox.bin machdirs := $(patsubst %,arch/riscv/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else -CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif +KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) archprepare: maketools @@ -50,8 +45,8 @@ common-y += arch/riscv/lib/ common-$(CONFIG_OFTREE) += arch/riscv/dts/ -CPPFLAGS += $(cflags-y) -CFLAGS += $(cflags-y) +KBUILD_CPPFLAGS += $(cflags-y) +KBUILD_CFLAGS += $(cflags-y) lds-y := arch/riscv/lib/barebox.lds diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile index b7470c3330..3d2eb5bc11 100644 --- a/arch/sandbox/Makefile +++ b/arch/sandbox/Makefile @@ -1,6 +1,6 @@ KBUILD_DEFCONFIG := sandbox_defconfig -CPPFLAGS += -D__SANDBOX__ -fno-strict-aliasing -fvisibility=hidden +KBUILD_CPPFLAGS += -D__SANDBOX__ -fno-strict-aliasing -fvisibility=hidden machine-y := sandbox @@ -11,7 +11,7 @@ lds-y := $(BOARD)/barebox.lds TEXT_BASE = $(CONFIG_TEXT_BASE) -CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \ +KBUILD_CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \ -Dfree=barebox_free -Drealloc=barebox_realloc \ -Dread=barebox_read -Dwrite=barebox_write \ -Dopen=barebox_open -Dclose=barebox_close \ @@ -29,11 +29,7 @@ CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \ machdirs := $(patsubst %,arch/sandbox/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else -CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif +KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) archprepare: maketools @@ -48,7 +44,7 @@ FTDI1_LIBS := $(shell pkg-config libftdi1 --libs) endif ifeq ($(CONFIG_KASAN),y) -CPPFLAGS += -fsanitize=address +KBUILD_CPPFLAGS += -fsanitize=address SANITIZER_LIBS += -fsanitize=address endif diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile index 75baa34a83..c012c9cf01 100644 --- a/arch/sandbox/os/Makefile +++ b/arch/sandbox/os/Makefile @@ -2,15 +2,11 @@ machine-y := sandbox machdirs := $(patsubst %,arch/sandbox/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -CPPFLAGS := $(patsubst %,-I%include,$(machdirs)) -else -CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif +KBUILD_CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs)) -CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE) +KBUILD_CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE) -CFLAGS := -Wall +KBUILD_CFLAGS := -Wall NOSTDINC_FLAGS := obj-y = common.o tap.o diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 4d471c2f8a..97f6d85f2f 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -1,6 +1,6 @@ KBUILD_DEFCONFIG := generic_defconfig -CPPFLAGS += -D__X86__ +KBUILD_CPPFLAGS += -D__X86__ board-$(CONFIG_MACH_X86_GENERIC) := x86_generic @@ -8,15 +8,15 @@ TEXT_BASE = $(CONFIG_TEXT_BASE) ifeq ($(CONFIG_X86_EFI),y) machine-y := efi -CFLAGS += -fpic -fshort-wchar -mno-sse -mno-mmx +KBUILD_CFLAGS += -fpic -fshort-wchar -mno-sse -mno-mmx ifeq ($(CONFIG_X86_32),y) TARGET = efi-app-ia32 else TARGET = efi-app-x86_64 endif else -CPPFLAGS += -fno-strict-aliasing -CPPFLAGS += -march=i386 -DTEXT_BASE=$(TEXT_BASE) \ +KBUILD_CPPFLAGS += -fno-strict-aliasing +KBUILD_CPPFLAGS += -march=i386 -DTEXT_BASE=$(TEXT_BASE) \ -fno-unwind-tables -fno-asynchronous-unwind-tables machine-y := i386 @@ -25,32 +25,28 @@ endif ifeq ($(CONFIG_X86_32),y) UTS_MACHINE := i386 biarch := $(call cc-option,-m32) - AFLAGS += $(biarch) - CFLAGS += $(biarch) - CPPFLAGS += $(biarch) + KBUILD_AFLAGS += $(biarch) + KBUILD_CFLAGS += $(biarch) + KBUILD_CPPFLAGS += $(biarch) else UTS_MACHINE := x86_64 - AFLAGS += -m64 - CFLAGS += -m64 -mno-red-zone - CPPFLAGS += -m64 + KBUILD_AFLAGS += -m64 + KBUILD_CFLAGS += -m64 -mno-red-zone + KBUILD_CPPFLAGS += -m64 endif ifndef CONFIG_MODULES # Add cleanup flags ifneq ($(CONFIG_X86_EFI),y) -CPPFLAGS += -fdata-sections -ffunction-sections +KBUILD_CPPFLAGS += -fdata-sections -ffunction-sections LDFLAGS_barebox += -static --gc-sections endif endif machdirs := $(patsubst %,arch/x86/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else -CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif +KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) ifneq ($(board-y),) BOARD := arch/x86/boards/$(board-y)/ @@ -74,7 +70,7 @@ ifeq ($(CONFIG_X86_EFI),y) lds-$(CONFIG_X86_32) := arch/x86/mach-efi/elf_ia32_efi.lds lds-$(CONFIG_X86_64) := arch/x86/mach-efi/elf_x86_64_efi.lds -cmd_barebox__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_barebox) -o $@ \ +cmd_barebox__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_barebox) -o $@ \ -T $(lds-y) \ -shared -Bsymbolic -nostdlib -znocombreloc \ --start-group $(BAREBOX_OBJS) \ @@ -89,7 +85,7 @@ quiet_cmd_efi_image = EFI-IMG $@ KBUILD_BINARY := barebox -LDFLAGS := --no-undefined +KBUILD_LDFLAGS := --no-undefined barebox.efi: $(KBUILD_BINARY) FORCE $(call if_changed,efi_image) @@ -104,7 +100,7 @@ lds-$(CONFIG_BOARD_LINKER_SCRIPT) := $(BOARD)/barebox.lds endif -LDFLAGS += -m elf_$(UTS_MACHINE) +KBUILD_LDFLAGS += -m elf_$(UTS_MACHINE) CLEAN_FILES += $(lds-y) CLEAN_FILES += arch/x86/lib/barebox.lds barebox.map barebox.S diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index b92b4750fc..4a520a2a84 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -1,5 +1,5 @@ -CPPFLAGS += -D__I386__ -fno-strict-aliasing -m32 -g -Os -march=i386 \ +KBUILD_CPPFLAGS += -D__I386__ -fno-strict-aliasing -m32 -g -Os -march=i386 \ -mregparm=3 -fno-strict-aliasing -fomit-frame-pointer -ffreestanding \ -fno-toplevel-reorder -fno-unit-at-a-time -fno-stack-protector \ -mpreferred-stack-boundary=2 diff --git a/common/Kconfig b/common/Kconfig index 44a955c5ff..f514e3b4a2 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1,8 +1,7 @@ config DEFCONFIG_LIST string option defconfig_list - default ARCH_DEFCONFIG - default "arch/$(ARCH)/defconfig" + default "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)" config GREGORIAN_CALENDER bool diff --git a/common/Makefile b/common/Makefile index 84463b4d48..c14af692f9 100644 --- a/common/Makefile +++ b/common/Makefile @@ -86,11 +86,9 @@ echo "\";" \ endef endif -include/generated/passwd.h: $(srctree)/$(src)/Makefile FORCE +include/generated/passwd.h: FORCE $(call filechk,passwd) -targets += include/generated/passwd.h - $(obj)/password.o: include/generated/passwd.h endif # CONFIG_PASSWORD diff --git a/common/image.c b/common/image.c index 04cd86bf9a..fc10ce5fd9 100644 --- a/common/image.c +++ b/common/image.c @@ -50,6 +50,7 @@ static table_entry_t arch_name[] = { { IH_ARCH_MIPS64, "mips64", "MIPS 64 Bit", }, { IH_ARCH_NIOS, "nios", "NIOS", }, { IH_ARCH_NIOS2, "nios2", "NIOS II", }, + { IH_ARCH_PPC, "powerpc", "PowerPC", }, { IH_ARCH_PPC, "ppc", "PowerPC", }, { IH_ARCH_S390, "s390", "IBM S390", }, { IH_ARCH_SH, "sh", "SuperH", }, diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 3ca6708657..d227619ed4 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -5,8 +5,6 @@ obj-y += pci.o bus.o pci_iomap.o ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG -CPPFLAGS += $(ccflags-y) - obj-$(CONFIG_PCI_MVEBU) += pci-mvebu.o pci-mvebu-phy.o obj-$(CONFIG_PCI_TEGRA) += pci-tegra.o obj-$(CONFIG_PCIE_DW) += pcie-designware.o pcie-designware-host.o diff --git a/firmware/Makefile b/firmware/Makefile index 3f2c31868a..020d48440d 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -56,7 +56,7 @@ $(patsubst %,$(obj)/pbl-%.gen.o, $(fw-external-y)): $(obj)/pbl-%.gen.o: $(fwdir) obj-pbl-y += $(patsubst %,%.gen.o, $(fw-external-y)) -ifeq ($(KBUILD_SRC),) +ifndef building_out_of_srctree # Makefile.build only creates subdirectories for O= builds, but external # firmware might live outside the kernel source tree _dummy := $(foreach d,$(addprefix $(obj)/,$(dir $(fw-external-y))), $(shell [ -d $(d) ] || mkdir -p $(d))) diff --git a/images/Makefile b/images/Makefile index fe29c75e27..0aa4676aea 100644 --- a/images/Makefile +++ b/images/Makefile @@ -50,7 +50,7 @@ quiet_cmd_objcopy_bin = OBJCOPYB $@ pbl-lds := $(obj)/pbl.lds extra-y += $(pbl-lds) -$(pbl-lds): $(obj)/../arch/$(ARCH)/lib/pbl.lds.S FORCE +$(pbl-lds): $(obj)/../arch/$(SRCARCH)/lib/pbl.lds.S FORCE $(call if_changed_dep,cpp_lds_S) quiet_cmd_elf__ ?= LD $@ @@ -139,8 +139,8 @@ $(obj)/%.img: $(obj)/$$(FILE_$$(@F)) $(Q)if [ -z $(FILE_$(@F)) ]; then echo "FILE_$(@F) empty!"; false; fi $(call if_changed,shipped) -board = $(srctree)/arch/$(ARCH)/boards -objboard = $(objtree)/arch/$(ARCH)/boards +board = $(srctree)/arch/$(SRCARCH)/boards +objboard = $(objtree)/arch/$(SRCARCH)/boards include $(srctree)/images/Makefile.am33xx include $(srctree)/images/Makefile.am35xx diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 919f286162..838ab11e7c 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 #### # kbuild: Generic definitions @@ -24,10 +25,18 @@ depfile = $(subst $(comma),_,$(dot-target).d) basetarget = $(basename $(notdir $@)) ### +# real prerequisites without phony targets +real-prereqs = $(filter-out $(PHONY), $^) + +### # Escape single quote for use in echo statements escsq = $(subst $(squote),'\$(squote)',$1) ### +# Quote a string to pass it to C files. foo => '"foo"' +stringify = $(squote)$(quote)$1$(quote)$(squote) + +### # Easy method for doing a status message kecho := : quiet_kecho := echo @@ -37,11 +46,11 @@ kecho := $($(quiet)kecho) ### # filechk is used to check if the content of a generated file is updated. # Sample usage: -# define filechk_sample -# echo $KERNELRELEASE -# endef -# version.h : Makefile +# +# filechk_sample = echo $(KERNELRELEASE) +# version.h: FORCE # $(call filechk,sample) +# # The rule defined shall write to stdout the content of the new file. # The existing file will be compared with the new one. # - If no file exist it is created @@ -50,32 +59,31 @@ kecho := $($(quiet)kecho) # - stdin is piped in from the first prerequisite ($<) so one has # to specify a valid file as first prerequisite (often the kbuild file) define filechk - $(Q)set -e; \ - $(kecho) ' CHK $@'; \ - mkdir -p $(dir $@); \ - $(filechk_$(1)) < $< > $@.tmp; \ - if [ -r $@ ] && cmp -s $@ $@.tmp; then \ - rm -f $@.tmp; \ - else \ - $(kecho) ' UPD $@'; \ - mv -f $@.tmp $@; \ + $(Q)set -e; \ + mkdir -p $(dir $@); \ + trap "rm -f $(dot-target).tmp" EXIT; \ + { $(filechk_$(1)); } > $(dot-target).tmp; \ + if [ ! -r $@ ] || ! cmp -s $@ $(dot-target).tmp; then \ + $(kecho) ' UPD $@'; \ + mv -f $(dot-target).tmp $@; \ fi endef ###### # gcc support functions -# See documentation in Documentation/kbuild/makefiles.txt +# See documentation in Documentation/kbuild/makefiles.rst # cc-cross-prefix # Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-) -# Return first prefix where a prefix$(CC) is found in PATH. -# If no $(CC) found in PATH with listed prefixes return nothing -cc-cross-prefix = \ - $(word 1, $(foreach c,$(1), \ - $(shell set -e; \ - if (which $(strip $(c))$(CC)) > /dev/null 2>&1 ; then \ - echo $(c); \ - fi))) +# Return first <prefix> where a <prefix>gcc is found in PATH. +# If no gcc found in PATH with listed prefixes return nothing +# +# Note: '2>/dev/null' is here to force Make to invoke a shell. Otherwise, it +# would try to directly execute the shell builtin 'command'. This workaround +# should be kept for a long time since this issue was fixed only after the +# GNU Make 4.2.1 release. +cc-cross-prefix = $(firstword $(foreach c, $(1), \ + $(if $(shell command -v -- $(c)gcc 2>/dev/null), $(c)))) # output directory for tests below TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) @@ -97,7 +105,7 @@ try-run = $(shell set -e; \ # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) as-option = $(call try-run,\ - $(CC) $(CFLAGS) $(1) -c -xassembler /dev/null -o "$$TMP",$(1),$(2)) + $(CC) $(KBUILD_CFLAGS) $(1) -c -xassembler /dev/null -o "$$TMP",$(1),$(2)) # as-instr # Usage: cflags-y += $(call as-instr,instr,option1,option2) @@ -109,17 +117,17 @@ as-instr = $(call try-run,\ # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) cc-option = $(call try-run,\ - $(CC) -Werror $(KBUILD_CPPFLAGS) $(CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2)) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2)) # cc-option-yn # Usage: flag := $(call cc-option-yn,-march=winchip-c6) cc-option-yn = $(call try-run,\ - $(CC) -Werror $(KBUILD_CPPFLAGS) $(CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n) # cc-disable-warning # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) cc-disable-warning = $(call try-run,\ - $(CC) -Werror $(KBUILD_CPPFLAGS) $(CFLAGS) -W$(strip $(1)) -c -xc /dev/null -o "$$TMP",-Wno-$(strip $(1))) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -xc /dev/null -o "$$TMP",-Wno-$(strip $(1))) # cc-version # Usage gcc-ver := $(call cc-version) @@ -130,7 +138,7 @@ cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) # ld-option -# Usage: LDFLAGS += $(call ld-option, -X) +# Usage: KBUILD_LDFLAGS += $(call ld-option, -X) ld-option = $(call try-run,\ $(CC) -x c /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) @@ -140,18 +148,13 @@ ld-option = $(call try-run,\ # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= # Usage: # $(Q)$(MAKE) $(build)=dir -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj +build := -f $(srctree)/scripts/Makefile.build obj ### -# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj= -# Usage: -# $(Q)$(MAKE) $(modbuiltin)=dir -modbuiltin := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.modbuiltin obj - -# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj= # Usage: # $(Q)$(MAKE) $(clean)=dir -clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj +clean := -f $(srctree)/scripts/Makefile.clean obj # Prefix -I with $(srctree) if it is not an absolute path. # skip if -I has no parameter @@ -167,10 +170,7 @@ echo-cmd = $(if $($(quiet)cmd_$(1)),\ echo ' $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';) # printing commands -cmd = @$(echo-cmd) $(cmd_$(1)) - -# Add $(obj)/ for paths that are not absolute -objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) +cmd = @set -e; $(echo-cmd) $(cmd_$(1)) ### # if_changed - execute command if any prerequisite is newer than @@ -178,15 +178,15 @@ objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) # if_changed_dep - as if_changed, but uses fixdep to reveal dependencies # including used config symbols # if_changed_rule - as if_changed but execute rule instead -# See Documentation/kbuild/makefiles.txt for more info +# See Documentation/kbuild/makefiles.rst for more info ifneq ($(KBUILD_NOCMDDEP),1) -# Check if both arguments are the same including their order. Result is empty +# Check if both commands are the same including their order. Result is empty # string if equal. User may override this check using make KBUILD_NOCMDDEP=1 -arg-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \ +cmd-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \ $(subst $(space),$(space_escape),$(strip $(cmd_$1)))) else -arg-check = $(if $(strip $(cmd_$@)),,1) +cmd-check = $(if $(strip $(cmd_$@)),,1) endif # Replace >$< with >$$< to preserve $ when reloading the .cmd file @@ -197,34 +197,33 @@ endif # (needed for the shell) make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1))))) -# Find any prerequisites that is newer than target or that does not exist. +# Find any prerequisites that are newer than target or that do not exist. +# (This is not true for now; $? should contain any non-existent prerequisites, +# but it does not work as expected when .SECONDARY is present. This seems a bug +# of GNU Make.) # PHONY targets skipped in both cases. -any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) +newer-prereqs = $(filter-out $(PHONY),$?) # Execute command if command has changed or prerequisite(s) are updated. -# -if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ - @set -e; \ - $(echo-cmd) $(cmd_$(1)); \ - printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd) +if_changed = $(if $(newer-prereqs)$(cmd-check), \ + $(cmd); \ + printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) # Execute the command and also postprocess generated .d dependencies file. -if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \ - @set -e; \ - $(echo-cmd) $(cmd_$(1)); \ - scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\ - rm -f $(depfile); \ - mv -f $(dot-target).tmp $(dot-target).cmd) +if_changed_dep = $(if $(newer-prereqs)$(cmd-check),$(cmd_and_fixdep),@:) + +cmd_and_fixdep = \ + $(cmd); \ + scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\ + rm -f $(depfile) # Usage: $(call if_changed_rule,foo) # Will check if $(cmd_foo) or any of the prerequisites changed, # and if so will execute $(rule_foo). -if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \ - @set -e; \ - $(rule_$(1))) +if_changed_rule = $(if $(newer-prereqs)$(cmd-check),$(rule_$(1)),@:) ### -# why - tell why a a target got build +# why - tell why a target got built # enabled by make V=2 # Output (listed in the order they are checked): # (1) - due to target is PHONY @@ -246,8 +245,8 @@ ifeq ($(KBUILD_VERBOSE),2) why = \ $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ $(if $(wildcard $@), \ - $(if $(strip $(any-prereq)),- due to: $(any-prereq), \ - $(if $(arg-check), \ + $(if $(newer-prereqs),- due to: $(newer-prereqs), \ + $(if $(cmd-check), \ $(if $(cmd_$@),- due to command line change, \ $(if $(filter $@, $(targets)), \ - due to missing .cmd file, \ diff --git a/scripts/Makefile b/scripts/Makefile index eb6718fadf..f3b9aece9e 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -26,7 +26,7 @@ hostprogs-$(CONFIG_ARCH_SOCFPGA) += socfpga_mkimage hostprogs-$(CONFIG_MXS_HOSTTOOLS)+= mxsimage mxsboot hostprogs-$(CONFIG_ARCH_LAYERSCAPE) += pblimage hostprogs-$(CONFIG_ARCH_STM32MP) += stm32image -HOSTCFLAGS += -I$(srctree)/scripts/include/ +KBUILD_HOSTCFLAGS += -I$(srctree)/scripts/include/ HOSTLDLIBS_mxsimage = `pkg-config --libs openssl` HOSTCFLAGS_omap3-usb-loader.o = `pkg-config --cflags libusb-1.0` HOSTLDLIBS_omap3-usb-loader = `pkg-config --libs libusb-1.0` @@ -50,7 +50,7 @@ targetprogs-$(CONFIG_IMD_TARGET) += bareboximd-target subdir- += basic kconfig setupmbr quiet_cmd_csingle = CC $@ - cmd_csingle = $(CC) -Wp,-MD,$(depfile) $(TARGETCFLAGS) $(CFLAGS) -o $@ $< + cmd_csingle = $(CC) -Wp,-MD,$(depfile) $(TARGETCFLAGS) $(KBUILD_CFLAGS) -o $@ $< __targetprogs := $(sort $(targetprogs-y) $(targetprogs-m)) target-csingle := $(foreach m,$(__targetprogs),$(if $($(m)-objs),,$(m))) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 4cac47fdb2..0232158570 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -49,7 +49,7 @@ ifneq ($(hostprogs)$(hostprogs-y)$(hostprogs-m),) include scripts/Makefile.host endif -ifneq ($(KBUILD_SRC),) +ifdef building_out_of_srctree # Create output directory if not already present _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) @@ -88,10 +88,10 @@ __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(pbl-target) $( # Linus' kernel sanity checking tool ifeq ($(KBUILD_CHECKSRC),1) quiet_cmd_checksrc = CHECK $< - cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; + cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< else ifeq ($(KBUILD_CHECKSRC),2) quiet_cmd_force_checksrc = CHECK $< - cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; + cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< endif # Compile C sources (.c) @@ -137,73 +137,23 @@ cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $< %.i: %.c FORCE $(call if_changed_dep,cc_i_c) -quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ -cmd_cc_symtypes_c = \ - $(CPP) -D__GENKSYMS__ $(c_flags) $< \ - | $(GENKSYMS) -T $@ >/dev/null; \ - test -s $@ || rm -f $@ - -%.symtypes : %.c FORCE - $(call if_changed_dep,cc_symtypes_c) - # C (.c) files # The C file is compiled and updated dependency information is generated. # (See cmd_cc_o_c + relevant part of rule_cc_o_c) quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ + cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< quiet_cmd_pbl_cc_o_c = PBLCC $@ - -ifndef CONFIG_MODVERSIONS -cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< -cmd_pbl_cc_o_c = $(CC) -D__PBL__ $(c_flags) $(PBL_CPPFLAGS) -c -o $@ $< - -else -# When module versioning is enabled the following steps are executed: -# o compile a .tmp_<file>.o from <file>.c -# o if .tmp_<file>.o doesn't contain a __ksymtab version, i.e. does -# not export symbols, we just rename .tmp_<file>.o to <file>.o and -# are done. -# o otherwise, we calculate symbol versions using the good old -# genksyms on the preprocessed source and postprocess them in a way -# that they are usable as a linker script -# o generate <file>.o from .tmp_<file>.o using the linker to -# replace the unresolved symbols __crc_exported_symbol with -# the actual value of the checksum generated by genksyms - -cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< -cmd_modversions = \ - if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ - $(CPP) -D__GENKSYMS__ $(c_flags) $< \ - | $(GENKSYMS) $(if $(KBUILD_SYMTYPES), \ - -T $(@D)/$(@F:.o=.symtypes)) -a $(ARCH) \ - > $(@D)/.tmp_$(@F:.o=.ver); \ - \ - $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ - -T $(@D)/.tmp_$(@F:.o=.ver); \ - rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ - else \ - mv -f $(@D)/.tmp_$(@F) $@; \ - fi; -endif + cmd_pbl_cc_o_c = $(CC) -D__PBL__ $(c_flags) $(PBL_CPPFLAGS) -c -o $@ $< define rule_cc_o_c - $(call echo-cmd,checksrc) $(cmd_checksrc) \ - $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ - $(cmd_modversions) \ - scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ - $(dot-target).tmp; \ - rm -f $(depfile); \ - mv -f $(dot-target).tmp $(dot-target).cmd + $(call cmd,checksrc) + $(call cmd_and_fixdep,cc_o_c) endef define rule_pbl_cc_o_c - $(call echo-cmd,checksrc) $(cmd_checksrc) \ - $(call echo-cmd,pbl_cc_o_c) $(cmd_pbl_cc_o_c); \ - $(cmd_modversions) \ - scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,pbl_cc_o_c)' > \ - $(dot-target).tmp; \ - rm -f $(depfile); \ - mv -f $(dot-target).tmp $(dot-target).cmd + $(call cmd,checksrc) + $(call cmd_and_fixdep,pbl_cc_o_c) endef # Built-in and composite module parts diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 8f4d62f22e..55b565ce3f 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -81,12 +81,12 @@ obj-dirs += $(host-objdirs) ##### # Handle options to gcc. Support building with separate output directory -_hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ +_hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ $(HOSTCFLAGS_$(target-stem).o) -_hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ +_hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ $(HOSTCXXFLAGS_$(target-stem).o) -ifeq ($(KBUILD_SRC),) +ifndef building_out_of_srctree __hostc_flags = $(_hostc_flags) __hostcxx_flags = $(_hostcxx_flags) else @@ -103,15 +103,15 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags) # Create executable from a single .c file # host-csingle -> Executable quiet_cmd_host-csingle = HOSTCC $@ - cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $< \ - $(HOST_LOADLIBES) $(HOSTLDLIBS_$(target-stem)) + cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(KBUILD_HOSTLDFLAGS) -o $@ $< \ + $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) $(host-csingle): $(obj)/%: $(src)/%.c FORCE $(call if_changed_dep,host-csingle) # Link an executable based on list of .o files, all plain c # host-cmulti -> executable quiet_cmd_host-cmulti = HOSTLD $@ - cmd_host-cmulti = $(HOSTCC) $(HOSTLDFLAGS) -o $@ \ + cmd_host-cmulti = $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -o $@ \ $(addprefix $(obj)/, $($(target-stem)-objs)) \ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) $(host-cmulti): FORCE @@ -128,7 +128,7 @@ $(host-cobjs): $(obj)/%.o: $(src)/%.c FORCE # Link an executable based on list of .o files, a mixture of .c and .cc # host-cxxmulti -> executable quiet_cmd_host-cxxmulti = HOSTLD $@ - cmd_host-cxxmulti = $(HOSTCXX) $(HOSTLDFLAGS) -o $@ \ + cmd_host-cxxmulti = $(HOSTCXX) $(KBUILD_HOSTLDFLAGS) -o $@ \ $(foreach o,objs cxxobjs,\ $(addprefix $(obj)/, $($(target-stem)-$(o)))) \ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index d4c2ed15b6..39cc24b196 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -1,5 +1,9 @@ # SPDX-License-Identifier: GPL-2.0 # Backward compatibility +asflags-y += $(EXTRA_AFLAGS) +ccflags-y += $(EXTRA_CFLAGS) +cppflags-y += $(EXTRA_CPPFLAGS) +ldflags-y += $(EXTRA_LDFLAGS) always-y += $(always) hostprogs += $(hostprogs-y) $(hostprogs-m) @@ -128,9 +132,9 @@ basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))" modname_flags = $(if $(filter 1,$(words $(modname))),\ -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") -_c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(target-stem).o) -_a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(target-stem).o) -_cpp_flags = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(target-stem).lds) +_c_flags = $(KBUILD_CFLAGS) $(ccflags-y) $(CFLAGS_$(target-stem).o) +_a_flags = $(KBUILD_AFLAGS) $(asflags-y) $(AFLAGS_$(target-stem).o) +_cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(target-stem).lds) ifeq ($(CONFIG_UBSAN),y) _CFLAGS_UBSAN = $(eval _CFLAGS_UBSAN := $(CFLAGS_UBSAN))$(_CFLAGS_UBSAN) @@ -143,7 +147,7 @@ endif # If building barebox in a separate objtree expand all occurrences # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). -ifeq ($(KBUILD_SRC),) +ifndef building_out_of_srctree __c_flags = $(_c_flags) __a_flags = $(_a_flags) __cpp_flags = $(_cpp_flags) @@ -158,16 +162,16 @@ __a_flags = $(call flags,_a_flags) __cpp_flags = $(call flags,_cpp_flags) endif -c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ +c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \ $(__c_flags) $(modkern_cflags) \ -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) -a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ +a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \ $(__a_flags) $(modkern_aflags) cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags) -ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS) +ld_flags = $(KBUILD_LDFLAGS) $(ldflags-y) dtc_cpp_flags = -Wp,-MD,$(depfile).pre -nostdinc \ -I$(srctree)/arch/$(SRCARCH)/dts/include \ @@ -219,7 +223,7 @@ $(obj)/%:: $(src)/%_shipped # --------------------------------------------------------------------------- quiet_cmd_ld = LD $@ -cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \ +cmd_ld = $(LD) $(KBUILD_LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \ $(filter-out FORCE,$^) -o $@ # Objcopy diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 78e6edd925..78e4ed7189 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -97,7 +97,7 @@ targets += $(modules:.ko=.mod.o) # Step 6), final link of the modules quiet_cmd_ld_ko_o = LD [M] $@ - cmd_ld_ko_o = $(LD) -r $(LDFLAGS) $(LDFLAGS_MODULE) -o $@ \ + cmd_ld_ko_o = $(LD) -r $(KBUILD_LDFLAGS) $(LDFLAGS_MODULE) -o $@ \ $(filter-out FORCE,$^) $(modules): %.ko :%.o %.mod.o FORCE diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore index b5bf92f66d..12a67fdab5 100644 --- a/scripts/kconfig/.gitignore +++ b/scripts/kconfig/.gitignore @@ -1,6 +1,4 @@ -# -# Generated files -# +# SPDX-License-Identifier: GPL-2.0-only *.moc *conf-cfg diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 2f1a59fa51..c9d0a4a8ef 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -12,10 +12,6 @@ else Kconfig := Kconfig endif -ifndef KBUILD_DEFCONFIG -KBUILD_DEFCONFIG := defconfig -endif - ifeq ($(quiet),silent_) silent := -s endif @@ -47,16 +43,16 @@ build_gconfig: $(obj)/gconf build_xconfig: $(obj)/qconf localyesconfig localmodconfig: $(obj)/conf - $(Q)perl $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config - $(Q)if [ -f .config ]; then \ - cmp -s .tmp.config .config || \ - (mv -f .config .config.old.1; \ - mv -f .tmp.config .config; \ - $< $(silent) --oldconfig $(Kconfig); \ - mv -f .config.old.1 .config.old) \ - else \ - mv -f .tmp.config .config; \ - $< $(silent) --oldconfig $(Kconfig); \ + $(Q)$(PERL) $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config + $(Q)if [ -f .config ]; then \ + cmp -s .tmp.config .config || \ + (mv -f .config .config.old.1; \ + mv -f .tmp.config .config; \ + $< $(silent) --oldconfig $(Kconfig); \ + mv -f .config.old.1 .config.old) \ + else \ + mv -f .tmp.config .config; \ + $< $(silent) --oldconfig $(Kconfig); \ fi $(Q)rm -f .tmp.config @@ -67,7 +63,7 @@ localyesconfig localmodconfig: $(obj)/conf # deprecated for external use simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ alldefconfig randconfig listnewconfig olddefconfig syncconfig \ - helpnewconfig + helpnewconfig yes2modconfig mod2yesconfig PHONY += $(simple-targets) @@ -135,6 +131,8 @@ help: @echo ' allmodconfig - New config selecting modules when possible' @echo ' alldefconfig - New config with all symbols set to default' @echo ' randconfig - New config with random answer to all options' + @echo ' yes2modconfig - Change answers from yes to mod if possible' + @echo ' mod2yesconfig - Change answers from mod to yes if possible' @echo ' listnewconfig - List new options' @echo ' helpnewconfig - List new options and help text' @echo ' olddefconfig - Same as oldconfig but sets new symbols to their' @@ -155,11 +153,11 @@ HOSTCFLAGS_lexer.lex.o := -I $(srctree)/$(src) HOSTCFLAGS_parser.tab.o := -I $(srctree)/$(src) # conf: Used for defconfig, oldconfig and related targets -hostprogs-y += conf +hostprogs += conf conf-objs := conf.o $(common-objs) # nconf: Used for the nconfig target based on ncurses -hostprogs-y += nconf +hostprogs += nconf nconf-objs := nconf.o nconf.gui.o $(common-objs) HOSTLDLIBS_nconf = $(shell . $(obj)/nconf-cfg && echo $$libs) @@ -169,7 +167,7 @@ HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/nconf-cfg && echo $$cflags) $(obj)/nconf.o $(obj)/nconf.gui.o: $(obj)/nconf-cfg # mconf: Used for the menuconfig target based on lxdialog -hostprogs-y += mconf +hostprogs += mconf lxdialog := $(addprefix lxdialog/, \ checklist.o inputbox.o menubox.o textbox.o util.o yesno.o) mconf-objs := mconf.o $(lxdialog) $(common-objs) @@ -181,7 +179,7 @@ $(foreach f, mconf.o $(lxdialog), \ $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf-cfg # qconf: Used for the xconfig target based on Qt -hostprogs-y += qconf +hostprogs += qconf qconf-cxxobjs := qconf.o qconf-objs := images.o $(common-objs) @@ -197,7 +195,7 @@ $(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg $(call cmd,moc) # gconf: Used for the gconfig target based on GTK+ -hostprogs-y += gconf +hostprogs += gconf gconf-objs := gconf.o images.o $(common-objs) HOSTLDLIBS_gconf = $(shell . $(obj)/gconf-cfg && echo $$libs) diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 1f89bf1558..f6e548b8f7 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -34,6 +34,8 @@ enum input_mode { listnewconfig, helpnewconfig, olddefconfig, + yes2modconfig, + mod2yesconfig, }; static enum input_mode input_mode = oldaskconfig; @@ -467,6 +469,8 @@ static struct option long_opts[] = { {"listnewconfig", no_argument, NULL, listnewconfig}, {"helpnewconfig", no_argument, NULL, helpnewconfig}, {"olddefconfig", no_argument, NULL, olddefconfig}, + {"yes2modconfig", no_argument, NULL, yes2modconfig}, + {"mod2yesconfig", no_argument, NULL, mod2yesconfig}, {NULL, 0, NULL, 0} }; @@ -489,6 +493,8 @@ static void conf_usage(const char *progname) printf(" --allmodconfig New config where all options are answered with mod\n"); printf(" --alldefconfig New config with all symbols set to default\n"); printf(" --randconfig New config with random answer to all options\n"); + printf(" --yes2modconfig Change answers from yes to mod if possible\n"); + printf(" --mod2yesconfig Change answers from mod to yes if possible\n"); } int main(int ac, char **av) @@ -553,6 +559,8 @@ int main(int ac, char **av) case listnewconfig: case helpnewconfig: case olddefconfig: + case yes2modconfig: + case mod2yesconfig: break; case '?': conf_usage(progname); @@ -587,6 +595,8 @@ int main(int ac, char **av) case listnewconfig: case helpnewconfig: case olddefconfig: + case yes2modconfig: + case mod2yesconfig: conf_read(NULL); break; case allnoconfig: @@ -660,6 +670,12 @@ int main(int ac, char **av) break; case savedefconfig: break; + case yes2modconfig: + conf_rewrite_mod_or_yes(def_y2m); + break; + case mod2yesconfig: + conf_rewrite_mod_or_yes(def_m2y); + break; case oldaskconfig: rootEntry = &rootmenu; conf(&rootmenu); diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 3569d2dec3..a39d93e3c6 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -710,25 +710,6 @@ static struct conf_printer header_printer_cb = .print_comment = header_print_comment, }; -/* - * Tristate printer - * - * This printer is used when generating the `include/config/tristate.conf' file. - */ -static void -tristate_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) -{ - - if (sym->type == S_TRISTATE && *value != 'n') - fprintf(fp, "%s%s=%c\n", CONFIG_, sym->name, (char)toupper(*value)); -} - -static struct conf_printer tristate_printer_cb = -{ - .print_symbol = tristate_print_symbol, - .print_comment = kconfig_print_comment, -}; - static void conf_write_symbol(FILE *fp, struct symbol *sym, struct conf_printer *printer, void *printer_arg) { @@ -1062,7 +1043,7 @@ int conf_write_autoconf(int overwrite) struct symbol *sym; const char *name; const char *autoconf_name = conf_get_autoconfig_name(); - FILE *out, *tristate, *out_h; + FILE *out, *out_h; int i; if (!overwrite && is_present(autoconf_name)) @@ -1077,23 +1058,13 @@ int conf_write_autoconf(int overwrite) if (!out) return 1; - tristate = fopen(".tmpconfig_tristate", "w"); - if (!tristate) { - fclose(out); - return 1; - } - out_h = fopen(".tmpconfig.h", "w"); if (!out_h) { fclose(out); - fclose(tristate); return 1; } conf_write_heading(out, &kconfig_printer_cb, NULL); - - conf_write_heading(tristate, &tristate_printer_cb, NULL); - conf_write_heading(out_h, &header_printer_cb, NULL); for_all_symbols(i, sym) { @@ -1101,15 +1072,11 @@ int conf_write_autoconf(int overwrite) if (!(sym->flags & SYMBOL_WRITE) || !sym->name) continue; - /* write symbol to auto.conf, tristate and header files */ + /* write symbols to auto.conf and autoconf.h */ conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); - - conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); - conf_write_symbol(out_h, sym, &header_printer_cb, NULL); } fclose(out); - fclose(tristate); fclose(out_h); name = getenv("KCONFIG_AUTOHEADER"); @@ -1120,14 +1087,6 @@ int conf_write_autoconf(int overwrite) if (rename(".tmpconfig.h", name)) return 1; - name = getenv("KCONFIG_TRISTATE"); - if (!name) - name = "include/config/tristate.conf"; - if (make_parent_dir(name)) - return 1; - if (rename(".tmpconfig_tristate", name)) - return 1; - if (make_parent_dir(autoconf_name)) return 1; /* @@ -1353,7 +1312,7 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode) sym_calc_value(csym); if (mode == def_random) - has_changed = randomize_choice_values(csym); + has_changed |= randomize_choice_values(csym); else { set_all_choice_values(csym); has_changed = true; @@ -1362,3 +1321,18 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode) return has_changed; } + +void conf_rewrite_mod_or_yes(enum conf_def_mode mode) +{ + struct symbol *sym; + int i; + tristate old_val = (mode == def_y2m) ? yes : mod; + tristate new_val = (mode == def_y2m) ? mod : yes; + + for_all_symbols(i, sym) { + if (sym_get_type(sym) == S_TRISTATE && + sym->def[S_DEF_USER].tri == old_val) + sym->def[S_DEF_USER].tri = new_val; + } + sym_clear_all_valid(); +} diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index 9f1de58e9f..81ebf8108c 100644 --- a/scripts/kconfig/expr.c +++ b/scripts/kconfig/expr.c @@ -13,7 +13,6 @@ #define DEBUG_EXPR 0 -static int expr_eq(struct expr *e1, struct expr *e2); static struct expr *expr_eliminate_yn(struct expr *e); struct expr *expr_alloc_symbol(struct symbol *sym) @@ -250,7 +249,7 @@ void expr_eliminate_eq(struct expr **ep1, struct expr **ep2) * equals some operand in the other (operands do not need to appear in the same * order), recursively. */ -static int expr_eq(struct expr *e1, struct expr *e2) +int expr_eq(struct expr *e1, struct expr *e2) { int res, old_count; diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 017843c9a4..5c3443692f 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -191,7 +191,6 @@ enum prop_type { struct property { struct property *next; /* next property - null if last */ - struct symbol *sym; /* the symbol for which the property is associated */ enum prop_type type; /* type of property */ const char *text; /* the prompt value - P_PROMPT, P_MENU, P_COMMENT */ struct expr_value visible; @@ -301,6 +300,7 @@ struct expr *expr_alloc_or(struct expr *e1, struct expr *e2); struct expr *expr_copy(const struct expr *org); void expr_free(struct expr *e); void expr_eliminate_eq(struct expr **ep1, struct expr **ep2); +int expr_eq(struct expr *e1, struct expr *e2); tristate expr_calc_value(struct expr *e); struct expr *expr_trans_bool(struct expr *e); struct expr *expr_eliminate_dups(struct expr *e); diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index e36b342f10..5527482c30 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -18,6 +18,7 @@ #include <stdio.h> #include <string.h> +#include <strings.h> #include <unistd.h> #include <time.h> diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index 4fb16f3166..d4ca829736 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h @@ -34,6 +34,8 @@ enum conf_def_mode { def_default, def_yes, def_mod, + def_y2m, + def_m2y, def_no, def_random }; @@ -52,6 +54,7 @@ const char *conf_get_configname(void); void sym_set_change_count(int count); void sym_add_change_count(int count); bool conf_set_all_new_symbols(enum conf_def_mode mode); +void conf_rewrite_mod_or_yes(enum conf_def_mode mode); void set_all_choice_values(struct symbol *csym); /* confdata.c and expr.c */ @@ -112,7 +115,6 @@ struct symbol *sym_choice_default(struct symbol *sym); struct property *sym_get_range_prop(struct symbol *sym); const char *sym_get_string_default(struct symbol *sym); struct symbol *sym_check_deps(struct symbol *sym); -struct property *prop_alloc(enum prop_type type, struct symbol *sym); struct symbol *prop_get_symbol(struct property *prop); static inline tristate sym_get_tristate_value(struct symbol *sym) diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 49c26ea9dd..4063dbc1b9 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -15,6 +15,7 @@ #include <stdarg.h> #include <stdlib.h> #include <string.h> +#include <strings.h> #include <signal.h> #include <unistd.h> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index d9d1646985..e436ba44c9 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -124,61 +124,76 @@ void menu_set_type(int type) sym_type_name(sym->type), sym_type_name(type)); } -static struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep) +static struct property *menu_add_prop(enum prop_type type, struct expr *expr, + struct expr *dep) { - struct property *prop = prop_alloc(type, current_entry->sym); + struct property *prop; + prop = xmalloc(sizeof(*prop)); + memset(prop, 0, sizeof(*prop)); + prop->type = type; + prop->file = current_file; + prop->lineno = zconf_lineno(); prop->menu = current_entry; prop->expr = expr; prop->visible.expr = dep; - if (prompt) { - if (isspace(*prompt)) { - prop_warn(prop, "leading whitespace ignored"); - while (isspace(*prompt)) - prompt++; - } - if (current_entry->prompt && current_entry != &rootmenu) - prop_warn(prop, "prompt redefined"); + /* append property to the prop list of symbol */ + if (current_entry->sym) { + struct property **propp; - /* Apply all upper menus' visibilities to actual prompts. */ - if(type == P_PROMPT) { - struct menu *menu = current_entry; + for (propp = ¤t_entry->sym->prop; + *propp; + propp = &(*propp)->next) + ; + *propp = prop; + } - while ((menu = menu->parent) != NULL) { - struct expr *dup_expr; + return prop; +} - if (!menu->visibility) - continue; - /* - * Do not add a reference to the - * menu's visibility expression but - * use a copy of it. Otherwise the - * expression reduction functions - * will modify expressions that have - * multiple references which can - * cause unwanted side effects. - */ - dup_expr = expr_copy(menu->visibility); +struct property *menu_add_prompt(enum prop_type type, char *prompt, + struct expr *dep) +{ + struct property *prop = menu_add_prop(type, NULL, dep); - prop->visible.expr - = expr_alloc_and(prop->visible.expr, - dup_expr); - } - } + if (isspace(*prompt)) { + prop_warn(prop, "leading whitespace ignored"); + while (isspace(*prompt)) + prompt++; + } + if (current_entry->prompt) + prop_warn(prop, "prompt redefined"); - current_entry->prompt = prop; + /* Apply all upper menus' visibilities to actual prompts. */ + if (type == P_PROMPT) { + struct menu *menu = current_entry; + + while ((menu = menu->parent) != NULL) { + struct expr *dup_expr; + + if (!menu->visibility) + continue; + /* + * Do not add a reference to the menu's visibility + * expression but use a copy of it. Otherwise the + * expression reduction functions will modify + * expressions that have multiple references which + * can cause unwanted side effects. + */ + dup_expr = expr_copy(menu->visibility); + + prop->visible.expr = expr_alloc_and(prop->visible.expr, + dup_expr); + } } + + current_entry->prompt = prop; prop->text = prompt; return prop; } -struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) -{ - return menu_add_prop(type, prompt, NULL, dep); -} - void menu_add_visibility(struct expr *expr) { current_entry->visibility = expr_alloc_and(current_entry->visibility, @@ -187,12 +202,12 @@ void menu_add_visibility(struct expr *expr) void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) { - menu_add_prop(type, NULL, expr, dep); + menu_add_prop(type, expr, dep); } void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) { - menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); + menu_add_prop(type, expr_alloc_symbol(sym), dep); } void menu_add_option_modules(void) @@ -326,12 +341,10 @@ void menu_finalize(struct menu *parent) * choice value symbols. */ parentdep = expr_alloc_symbol(sym); - } else if (parent->prompt) - /* Menu node for 'menu' */ - parentdep = parent->prompt->visible.expr; - else - /* Menu node for 'if' */ + } else { + /* Menu node for 'menu', 'if' */ parentdep = parent->dep; + } /* For each child menu node... */ for (menu = parent->list; menu; menu = menu->next) { @@ -698,6 +711,21 @@ const char *menu_get_help(struct menu *menu) return ""; } +static void get_def_str(struct gstr *r, struct menu *menu) +{ + str_printf(r, "Defined at %s:%d\n", + menu->file->name, menu->lineno); +} + +static void get_dep_str(struct gstr *r, struct expr *expr, const char *prefix) +{ + if (!expr_is_yes(expr)) { + str_append(r, prefix); + expr_gstr_print(expr, r); + str_append(r, "\n"); + } +} + static void get_prompt_str(struct gstr *r, struct property *prop, struct list_head *head) { @@ -705,7 +733,20 @@ static void get_prompt_str(struct gstr *r, struct property *prop, struct menu *submenu[8], *menu, *location = NULL; struct jump_key *jump = NULL; - str_printf(r, "Prompt: %s\n", prop->text); + str_printf(r, " Prompt: %s\n", prop->text); + + get_dep_str(r, prop->menu->dep, " Depends on: "); + /* + * Most prompts in Linux have visibility that exactly matches their + * dependencies. For these, we print only the dependencies to improve + * readability. However, prompts with inline "if" expressions and + * prompts with a parent that has a "visible if" expression have + * differing dependencies and visibility. In these rare cases, we + * print both. + */ + if (!expr_eq(prop->menu->dep, prop->visible.expr)) + get_dep_str(r, prop->visible.expr, " Visible if: "); + menu = prop->menu->parent; for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) { bool accessible = menu_is_visible(menu); @@ -755,18 +796,6 @@ static void get_prompt_str(struct gstr *r, struct property *prop, } } -/* - * get property of type P_SYMBOL - */ -static struct property *get_symbol_prop(struct symbol *sym) -{ - struct property *prop = NULL; - - for_all_properties(sym, prop, P_SYMBOL) - break; - return prop; -} - static void get_symbol_props_str(struct gstr *r, struct symbol *sym, enum prop_type tok, const char *prefix) { @@ -806,32 +835,34 @@ static void get_symbol_str(struct gstr *r, struct symbol *sym, } } } - for_all_prompts(sym, prop) - get_prompt_str(r, prop, head); - - prop = get_symbol_prop(sym); - if (prop) { - str_printf(r, " Defined at %s:%d\n", prop->menu->file->name, - prop->menu->lineno); - if (!expr_is_yes(prop->visible.expr)) { - str_append(r, " Depends on: "); - expr_gstr_print(prop->visible.expr, r); - str_append(r, "\n"); + + /* Print the definitions with prompts before the ones without */ + for_all_properties(sym, prop, P_SYMBOL) { + if (prop->menu->prompt) { + get_def_str(r, prop->menu); + get_prompt_str(r, prop->menu->prompt, head); + } + } + + for_all_properties(sym, prop, P_SYMBOL) { + if (!prop->menu->prompt) { + get_def_str(r, prop->menu); + get_dep_str(r, prop->menu->dep, " Depends on: "); } } - get_symbol_props_str(r, sym, P_SELECT, " Selects: "); + get_symbol_props_str(r, sym, P_SELECT, "Selects: "); if (sym->rev_dep.expr) { - expr_gstr_print_revdep(sym->rev_dep.expr, r, yes, " Selected by [y]:\n"); - expr_gstr_print_revdep(sym->rev_dep.expr, r, mod, " Selected by [m]:\n"); - expr_gstr_print_revdep(sym->rev_dep.expr, r, no, " Selected by [n]:\n"); + expr_gstr_print_revdep(sym->rev_dep.expr, r, yes, "Selected by [y]:\n"); + expr_gstr_print_revdep(sym->rev_dep.expr, r, mod, "Selected by [m]:\n"); + expr_gstr_print_revdep(sym->rev_dep.expr, r, no, "Selected by [n]:\n"); } - get_symbol_props_str(r, sym, P_IMPLY, " Implies: "); + get_symbol_props_str(r, sym, P_IMPLY, "Implies: "); if (sym->implied.expr) { - expr_gstr_print_revdep(sym->implied.expr, r, yes, " Implied by [y]:\n"); - expr_gstr_print_revdep(sym->implied.expr, r, mod, " Implied by [m]:\n"); - expr_gstr_print_revdep(sym->implied.expr, r, no, " Implied by [n]:\n"); + expr_gstr_print_revdep(sym->implied.expr, r, yes, "Implied by [y]:\n"); + expr_gstr_print_revdep(sym->implied.expr, r, mod, "Implied by [m]:\n"); + expr_gstr_print_revdep(sym->implied.expr, r, no, "Implied by [n]:\n"); } str_append(r, "\n\n"); diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index b7c1ef7571..daf1c1506e 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -8,6 +8,7 @@ #define _GNU_SOURCE #endif #include <string.h> +#include <strings.h> #include <stdlib.h> #include "lkc.h" diff --git a/scripts/kconfig/parser.y b/scripts/kconfig/parser.y index b3eff9613c..708b6c4b13 100644 --- a/scripts/kconfig/parser.y +++ b/scripts/kconfig/parser.y @@ -90,7 +90,6 @@ static struct menu *current_menu, *current_entry; %left T_LESS T_LESS_EQUAL T_GREATER T_GREATER_EQUAL %nonassoc T_NOT -%type <string> prompt %type <symbol> nonconst_symbol %type <symbol> symbol %type <type> type logic_type default @@ -113,7 +112,7 @@ input: mainmenu_stmt stmt_list | stmt_list; /* mainmenu entry */ -mainmenu_stmt: T_MAINMENU prompt T_EOL +mainmenu_stmt: T_MAINMENU T_WORD_QUOTE T_EOL { menu_add_prompt(P_MENU, $2, NULL); }; @@ -181,7 +180,7 @@ config_option: type prompt_stmt_opt T_EOL $1); }; -config_option: T_PROMPT prompt if_expr T_EOL +config_option: T_PROMPT T_WORD_QUOTE if_expr T_EOL { menu_add_prompt(P_PROMPT, $2, $3); printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); @@ -265,7 +264,7 @@ choice_option_list: | choice_option_list help ; -choice_option: T_PROMPT prompt if_expr T_EOL +choice_option: T_PROMPT T_WORD_QUOTE if_expr T_EOL { menu_add_prompt(P_PROMPT, $2, $3); printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); @@ -334,7 +333,7 @@ if_stmt: if_entry stmt_list if_end /* menu entry */ -menu: T_MENU prompt T_EOL +menu: T_MENU T_WORD_QUOTE T_EOL { menu_add_entry(NULL); menu_add_prompt(P_MENU, $2, NULL); @@ -363,7 +362,7 @@ menu_option_list: | menu_option_list depends ; -source_stmt: T_SOURCE prompt T_EOL +source_stmt: T_SOURCE T_WORD_QUOTE T_EOL { printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); zconf_nextfile($2); @@ -372,7 +371,7 @@ source_stmt: T_SOURCE prompt T_EOL /* comment entry */ -comment: T_COMMENT prompt T_EOL +comment: T_COMMENT T_WORD_QUOTE T_EOL { menu_add_entry(NULL); menu_add_prompt(P_COMMENT, $2, NULL); @@ -429,15 +428,11 @@ visible: T_VISIBLE if_expr T_EOL prompt_stmt_opt: /* empty */ - | prompt if_expr + | T_WORD_QUOTE if_expr { menu_add_prompt(P_PROMPT, $1, $2); }; -prompt: T_WORD - | T_WORD_QUOTE -; - end: T_ENDMENU T_EOL { $$ = "menu"; } | T_ENDCHOICE T_EOL { $$ = "choice"; } | T_ENDIF T_EOL { $$ = "if"; } @@ -665,7 +660,7 @@ static void print_symbol(FILE *out, struct menu *menu) break; case P_SYMBOL: fputs( " symbol ", out); - fprintf(out, "%s\n", prop->sym->name); + fprintf(out, "%s\n", prop->menu->sym->name); break; default: fprintf(out, " unknown prop %d!\n", prop->type); diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 82773cc35d..c0ac8f7b5f 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -154,9 +154,9 @@ void ConfigItem::updateMenu(void) if (!sym_is_changeable(sym) && list->optMode == normalOpt) { setPixmap(promptColIdx, QIcon()); - setText(noColIdx, QString::null); - setText(modColIdx, QString::null); - setText(yesColIdx, QString::null); + setText(noColIdx, QString()); + setText(modColIdx, QString()); + setText(yesColIdx, QString()); break; } expr = sym_get_tristate_value(sym); @@ -276,7 +276,7 @@ void ConfigLineEdit::show(ConfigItem* i) if (sym_get_string_value(item->menu->sym)) setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym))); else - setText(QString::null); + setText(QString()); Parent::show(); setFocus(); } @@ -309,8 +309,6 @@ ConfigList::ConfigList(ConfigView* p, const char *name) showName(false), showRange(false), showData(false), mode(singleMode), optMode(normalOpt), rootEntry(0), headerPopup(0) { - int i; - setObjectName(name); setSortingEnabled(false); setRootIsDecorated(true); @@ -318,7 +316,10 @@ ConfigList::ConfigList(ConfigView* p, const char *name) setVerticalScrollMode(ScrollPerPixel); setHorizontalScrollMode(ScrollPerPixel); - setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value"); + if (mode == symbolMode) + setHeaderLabels(QStringList() << "Item" << "Name" << "N" << "M" << "Y" << "Value"); + else + setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value"); connect(this, SIGNAL(itemSelectionChanged(void)), SLOT(updateSelection(void))); @@ -399,6 +400,11 @@ void ConfigList::updateSelection(void) struct menu *menu; enum prop_type type; + if (mode == symbolMode) + setHeaderLabels(QStringList() << "Item" << "Name" << "N" << "M" << "Y" << "Value"); + else + setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value"); + if (selectedItems().count() == 0) return; @@ -627,7 +633,7 @@ void ConfigList::updateMenuList(ConfigItem *parent, struct menu* menu) last = item; continue; } - hide: +hide: if (item && item->menu == child) { last = parent->firstChild(); if (last == item) @@ -692,7 +698,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) last = item; continue; } - hide: +hide: if (item && item->menu == child) { last = (ConfigItem*)parent->topLevelItem(0); if (last == item) @@ -736,7 +742,10 @@ void ConfigList::keyPressEvent(QKeyEvent* ev) type = menu->prompt ? menu->prompt->type : P_UNKNOWN; if (type == P_MENU && rootEntry != menu && mode != fullMode && mode != menuMode) { - emit menuSelected(menu); + if (mode == menuMode) + emit menuSelected(menu); + else + emit itemSelected(menu); break; } case Qt::Key_Space: @@ -828,7 +837,7 @@ void ConfigList::mouseMoveEvent(QMouseEvent* e) void ConfigList::mouseDoubleClickEvent(QMouseEvent* e) { - QPoint p = e->pos(); // TODO: Check if this works(was contentsToViewport). + QPoint p = e->pos(); ConfigItem* item = (ConfigItem*)itemAt(p); struct menu *menu; enum prop_type ptype; @@ -843,9 +852,12 @@ void ConfigList::mouseDoubleClickEvent(QMouseEvent* e) if (!menu) goto skip; ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; - if (ptype == P_MENU && (mode == singleMode || mode == symbolMode)) - emit menuSelected(menu); - else if (menu->sym) + if (ptype == P_MENU) { + if (mode == singleMode) + emit itemSelected(menu); + else if (mode == symbolMode) + emit menuSelected(menu); + } else if (menu->sym) changeValue(item); skip: @@ -1225,10 +1237,11 @@ QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos) { QMenu* popup = Parent::createStandardContextMenu(pos); QAction* action = new QAction("Show Debug Info", popup); - action->setCheckable(true); - connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); - connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); - action->setChecked(showDebug()); + + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); + connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); + action->setChecked(showDebug()); popup->addSeparator(); popup->addAction(action); return popup; @@ -1354,21 +1367,32 @@ ConfigMainWindow::ConfigMainWindow(void) if ((x.isValid())&&(y.isValid())) move(x.toInt(), y.toInt()); - split1 = new QSplitter(this); + QWidget *widget = new QWidget(this); + QVBoxLayout *layout = new QVBoxLayout(widget); + setCentralWidget(widget); + + split1 = new QSplitter(widget); split1->setOrientation(Qt::Horizontal); - setCentralWidget(split1); + split1->setChildrenCollapsible(false); - menuView = new ConfigView(split1, "menu"); + menuView = new ConfigView(widget, "menu"); menuList = menuView->list; - split2 = new QSplitter(split1); + split2 = new QSplitter(widget); + split2->setChildrenCollapsible(false); split2->setOrientation(Qt::Vertical); // create config tree - configView = new ConfigView(split2, "config"); + configView = new ConfigView(widget, "config"); configList = configView->list; - helpText = new ConfigInfoView(split2, "help"); + helpText = new ConfigInfoView(widget, "help"); + + layout->addWidget(split2); + split2->addWidget(split1); + split1->addWidget(configView); + split1->addWidget(menuView); + split2->addWidget(helpText); setTabOrder(configList, helpText); configList->setFocus(); @@ -1486,6 +1510,8 @@ ConfigMainWindow::ConfigMainWindow(void) helpText, SLOT(setInfo(struct menu *))); connect(configList, SIGNAL(menuSelected(struct menu *)), SLOT(changeMenu(struct menu *))); + connect(configList, SIGNAL(itemSelected(struct menu *)), + SLOT(changeItens(struct menu *))); connect(configList, SIGNAL(parentSelected()), SLOT(goBack())); connect(menuList, SIGNAL(menuChanged(struct menu *)), @@ -1582,15 +1608,26 @@ void ConfigMainWindow::searchConfig(void) searchWindow->show(); } -void ConfigMainWindow::changeMenu(struct menu *menu) +void ConfigMainWindow::changeItens(struct menu *menu) { configList->setRootMenu(menu); + if (configList->rootEntry->parent == &rootmenu) backAction->setEnabled(false); else backAction->setEnabled(true); } +void ConfigMainWindow::changeMenu(struct menu *menu) +{ + menuList->setRootMenu(menu); + + if (menuList->rootEntry->parent == &rootmenu) + backAction->setEnabled(false); + else + backAction->setEnabled(true); +} + void ConfigMainWindow::setMenuLink(struct menu *menu) { struct menu *parent; @@ -1700,14 +1737,14 @@ void ConfigMainWindow::showSplitView(void) fullViewAction->setEnabled(true); fullViewAction->setChecked(false); - configList->mode = symbolMode; + configList->mode = menuMode; if (configList->rootEntry == &rootmenu) configList->updateListAll(); else configList->setRootMenu(&rootmenu); configList->setAllOpen(true); configApp->processEvents(); - menuList->mode = menuMode; + menuList->mode = symbolMode; menuList->setRootMenu(&rootmenu); menuList->setAllOpen(true); menuView->show(); @@ -1735,7 +1772,6 @@ void ConfigMainWindow::showFullView(void) /* * ask for saving configuration before quitting - * TODO ask only when something changed */ void ConfigMainWindow::closeEvent(QCloseEvent* e) { diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 45bfe9b2b9..c879d79ce8 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -71,6 +71,7 @@ public slots: signals: void menuChanged(struct menu *menu); void menuSelected(struct menu *menu); + void itemSelected(struct menu *menu); void parentSelected(void); void gotFocus(struct menu *); @@ -298,6 +299,7 @@ public: ConfigMainWindow(void); public slots: void changeMenu(struct menu *); + void changeItens(struct menu *); void setMenuLink(struct menu *); void listFocusChanged(void); void goBack(void); diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index 08d76d7b3b..e2f8504f5a 100755 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl @@ -56,8 +56,6 @@ sub dprint { print STDERR @_; } -my $config = ".config"; - my $uname = `uname -r`; chomp $uname; @@ -374,7 +372,7 @@ if (defined($lsmod_file)) { $lsmod = "$dir/lsmod"; last; } -} + } if (!defined($lsmod)) { # try just the path $lsmod = "lsmod"; diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index f56eec5ea4..3dc81397d0 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -221,7 +221,7 @@ static void sym_calc_visibility(struct symbol *sym) sym_set_changed(sym); } tri = no; - if (sym->implied.expr && sym->dir_dep.tri != no) + if (sym->implied.expr) tri = expr_calc_value(sym->implied.expr); if (tri == mod && sym_get_type(sym) == S_BOOLEAN) tri = yes; @@ -394,6 +394,8 @@ void sym_calc_value(struct symbol *sym) if (sym->implied.tri != no) { sym->flags |= SYMBOL_WRITE; newval.tri = EXPR_OR(newval.tri, sym->implied.tri); + newval.tri = EXPR_AND(newval.tri, + sym->dir_dep.tri); } } calc_newval: @@ -401,8 +403,7 @@ void sym_calc_value(struct symbol *sym) sym_warn_unmet_dep(sym); newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); } - if (newval.tri == mod && - (sym_get_type(sym) == S_BOOLEAN || sym->implied.tri == yes)) + if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) newval.tri = yes; break; case S_STRING: @@ -484,8 +485,6 @@ bool sym_tristate_within_range(struct symbol *sym, tristate val) return false; if (sym->visible <= sym->rev_dep.tri) return false; - if (sym->implied.tri == yes && val == mod) - return false; if (sym_is_choice_value(sym) && sym->visible == yes) return val == yes; return val >= sym->rev_dep.tri && val <= sym->visible; @@ -1273,28 +1272,6 @@ struct symbol *sym_check_deps(struct symbol *sym) return sym2; } -struct property *prop_alloc(enum prop_type type, struct symbol *sym) -{ - struct property *prop; - struct property **propp; - - prop = xmalloc(sizeof(*prop)); - memset(prop, 0, sizeof(*prop)); - prop->type = type; - prop->sym = sym; - prop->file = current_file; - prop->lineno = zconf_lineno(); - - /* append property to the prop list of symbol */ - if (sym) { - for (propp = &sym->prop; *propp; propp = &(*propp)->next) - ; - *propp = prop; - } - - return prop; -} - struct symbol *prop_get_symbol(struct property *prop) { if (prop->expr && (prop->expr->type == E_SYMBOL || diff --git a/scripts/mkmakefile b/scripts/mkmakefile index 84af27bf0f..1cb1747514 100755 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile @@ -1,52 +1,17 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0 # Generates a small Makefile used in the root of the output # directory, to allow make to be started from there. # The Makefile also allow for more convinient build of external modules # Usage # $1 - Kernel src directory -# $2 - Output directory -# $3 - version -# $4 - patchlevel - -test ! -r $2/Makefile -o -O $2/Makefile || exit 0 -# Only overwrite automatically generated Makefiles -# (so we do not overwrite kernel Makefile) -if test -e $2/Makefile && ! grep -q Automatically $2/Makefile -then - exit 0 -fi if [ "${quiet}" != "silent_" ]; then - echo " GEN $2/Makefile" + echo " GEN Makefile" fi -cat << EOF > $2/Makefile +cat << EOF > Makefile # Automatically generated by $0: don't edit - -VERSION = $3 -PATCHLEVEL = $4 - -lastword = \$(word \$(words \$(1)),\$(1)) -makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST))) - -ifeq ("\$(origin V)", "command line") -VERBOSE := \$(V) -endif -ifneq (\$(VERBOSE),1) -Q := @ -endif - -MAKEARGS := -C $1 -MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir)) - -MAKEFLAGS += --no-print-directory - -.PHONY: __sub-make \$(MAKECMDGOALS) - -__sub-make: - \$(Q)\$(MAKE) \$(MAKEARGS) \$(MAKECMDGOALS) - -\$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make - @: +include $1/Makefile EOF diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index c5aa348924..e02b9f4ce9 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -8,7 +8,7 @@ modpost-objs := modpost.o sumversion.o $(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h quiet_cmd_elfconfig = MKELF $@ - cmd_elfconfig = $(obj)/mk_elfconfig $(ARCH) < $< > $@ + cmd_elfconfig = $(obj)/mk_elfconfig < $< > $@ $(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE $(call if_changed,elfconfig) diff --git a/scripts/mod/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c index db3881f14c..680eade89b 100644 --- a/scripts/mod/mk_elfconfig.c +++ b/scripts/mod/mk_elfconfig.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -9,9 +10,6 @@ main(int argc, char **argv) unsigned char ei[EI_NIDENT]; union { short s; char c[2]; } endian_test; - if (argc != 2) { - fprintf(stderr, "Error: no arch\n"); - } if (fread(ei, 1, EI_NIDENT, stdin) != EI_NIDENT) { fprintf(stderr, "Error: input truncated\n"); return 1; @@ -55,12 +53,5 @@ main(int argc, char **argv) else exit(1); - if ((strcmp(argv[1], "v850") == 0) || (strcmp(argv[1], "h8300") == 0) - || (strcmp(argv[1], "blackfin") == 0)) - printf("#define MODULE_SYMBOL_PREFIX \"_\"\n"); - else - printf("#define MODULE_SYMBOL_PREFIX \"\"\n"); - return 0; } - diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 795ee8d09b..a42f1e6ce1 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -31,6 +31,8 @@ static inline int license_is_gpl_compatible(const char *license) } #endif +#define MODULE_SYMBOL_PREFIX "" + /* Are we using CONFIG_MODVERSIONS? */ int modversions = 0; /* Warn about undefined symbols? (do so if we have vmlinux) */ diff --git a/scripts/tags.sh b/scripts/tags.sh index 8ae44642a2..4e18ae5282 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -1,70 +1,64 @@ -#!/bin/sh +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0-only # Generate tags or cscope files # Usage tags.sh <mode> # # mode may be any of: tags, TAGS, cscope # # Uses the following environment variables: -# ARCH, SUBARCH, SRCARCH, srctree, src, obj +# SUBARCH, SRCARCH, srctree if [ "$KBUILD_VERBOSE" = "1" ]; then set -x fi -# This is a duplicate of RCS_FIND_IGNORE without escaped '()' -ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \ - -name CVS -o -name .pc -o -name .hg -o \ - -name .git ) \ - -prune -o" +# RCS_FIND_IGNORE has escaped ()s -- remove them. +ignore="$(echo "$RCS_FIND_IGNORE" | sed 's|\\||g' )" +# tags and cscope files should also ignore MODVERSION *.mod.c files +ignore="$ignore ( -name *.mod.c ) -prune -o" -# Do not use full path if we do not use O=.. builds -# Use make O=. {tags|cscope} +# Use make KBUILD_ABS_SRCTREE=1 {tags|cscope} # to force full paths for a non-O= build -if [ "${KBUILD_SRC}" = "" ]; then +if [ "${srctree}" = "." -o -z "${srctree}" ]; then tree= else tree=${srctree}/ fi -# Find all available archs -find_all_archs() -{ - ALLSOURCE_ARCHS="" - for arch in `ls ${tree}arch`; do - ALLSOURCE_ARCHS="${ALLSOURCE_ARCHS} "${arch##\/} - done -} +# ignore userspace tools +ignore="$ignore ( -path ${tree}tools ) -prune -o" # Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH if [ "${ALLSOURCE_ARCHS}" = "" ]; then ALLSOURCE_ARCHS=${SRCARCH} elif [ "${ALLSOURCE_ARCHS}" = "all" ]; then - find_all_archs + ALLSOURCE_ARCHS=$(find ${tree}arch/ -mindepth 1 -maxdepth 1 -type d -printf '%f ') fi -# find sources in arch/$ARCH +# find sources in arch/$1 find_arch_sources() { for i in $archincludedir; do prune="$prune -wholename $i -prune -o" done - find ${tree}arch/$1 $ignore $prune -name "$2" -print; + find ${tree}arch/$1 $ignore $prune -name "$2" -not -type l -print; } # find sources in arch/$1/include find_arch_include_sources() { - include=$(find ${tree}arch/$1/ -name include -type d); + include=$(find ${tree}arch/$1/ -name include -type d -print); if [ -n "$include" ]; then archincludedir="$archincludedir $include" - find $include $ignore -name "$2" -print; + find $include $ignore -name "$2" -not -type l -print; fi } # find sources in include/ find_include_sources() { - find ${tree}include $ignore -name config -prune -o -name "$1" -print; + find ${tree}include $ignore -name config -prune -o -name "$1" \ + -not -type l -print; } # find sources in rest of tree @@ -72,8 +66,8 @@ find_include_sources() find_other_sources() { find ${tree}* $ignore \ - \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \ - -name "$1" -print; + \( -path ${tree}include -o -path ${tree}arch -o -name '.tmp_*' \) -prune -o \ + -name "$1" -not -type l -print; } find_sources() @@ -95,8 +89,37 @@ all_sources() find_other_sources '*.[chS]' } +all_compiled_sources() +{ + for i in $(all_sources); do + case "$i" in + *.[cS]) + j=${i/\.[cS]/\.o} + j="${j#$tree}" + if [ -e $j ]; then + echo $i + fi + ;; + *) + echo $i + ;; + esac + done +} + +all_target_sources() +{ + if [ -n "$COMPILED_SOURCE" ]; then + all_compiled_sources + else + all_sources + fi +} + all_kconfigs() { + find ${tree}arch/ -maxdepth 1 $ignore \ + -name "Kconfig*" -not -type l -print; for arch in $ALLSOURCE_ARCHS; do find_sources $arch 'Kconfig*' done @@ -105,93 +128,159 @@ all_kconfigs() docscope() { - (echo \-k; echo \-q; all_sources) > cscope.files + (echo \-k; echo \-q; all_target_sources) > cscope.files cscope -b -f cscope.out } dogtags() { - all_sources | gtags -i -f - + all_target_sources | gtags -i -f - +} + +# Basic regular expressions with an optional /kind-spec/ for ctags and +# the following limitations: +# - No regex modifiers +# - Use \{0,1\} instead of \?, because etags expects an unescaped ? +# - \s is not working with etags, use a space or [ \t] +# - \w works, but does not match underscores in etags +# - etags regular expressions have to match at the start of a line; +# a ^[^#] is prepended by setup_regex unless an anchor is already present +regex_asm=( + '/^\(ENTRY\|_GLOBAL\)(\([[:alnum:]_\\]*\)).*/\2/' +) +regex_c=( + '/^SYSCALL_DEFINE[0-9](\([[:alnum:]_]*\).*/sys_\1/' + '/^BPF_CALL_[0-9](\([[:alnum:]_]*\).*/\1/' + '/^COMPAT_SYSCALL_DEFINE[0-9](\([[:alnum:]_]*\).*/compat_sys_\1/' + '/^TRACE_EVENT(\([[:alnum:]_]*\).*/trace_\1/' + '/^TRACE_EVENT(\([[:alnum:]_]*\).*/trace_\1_rcuidle/' + '/^DEFINE_EVENT([^,)]*, *\([[:alnum:]_]*\).*/trace_\1/' + '/^DEFINE_EVENT([^,)]*, *\([[:alnum:]_]*\).*/trace_\1_rcuidle/' + '/^DEFINE_INSN_CACHE_OPS(\([[:alnum:]_]*\).*/get_\1_slot/' + '/^DEFINE_INSN_CACHE_OPS(\([[:alnum:]_]*\).*/free_\1_slot/' + '/^PAGEFLAG(\([[:alnum:]_]*\).*/Page\1/' + '/^PAGEFLAG(\([[:alnum:]_]*\).*/SetPage\1/' + '/^PAGEFLAG(\([[:alnum:]_]*\).*/ClearPage\1/' + '/^TESTSETFLAG(\([[:alnum:]_]*\).*/TestSetPage\1/' + '/^TESTPAGEFLAG(\([[:alnum:]_]*\).*/Page\1/' + '/^SETPAGEFLAG(\([[:alnum:]_]*\).*/SetPage\1/' + '/\<__SETPAGEFLAG(\([[:alnum:]_]*\).*/__SetPage\1/' + '/\<TESTCLEARFLAG(\([[:alnum:]_]*\).*/TestClearPage\1/' + '/\<__TESTCLEARFLAG(\([[:alnum:]_]*\).*/TestClearPage\1/' + '/\<CLEARPAGEFLAG(\([[:alnum:]_]*\).*/ClearPage\1/' + '/\<__CLEARPAGEFLAG(\([[:alnum:]_]*\).*/__ClearPage\1/' + '/^__PAGEFLAG(\([[:alnum:]_]*\).*/__SetPage\1/' + '/^__PAGEFLAG(\([[:alnum:]_]*\).*/__ClearPage\1/' + '/^PAGEFLAG_FALSE(\([[:alnum:]_]*\).*/Page\1/' + '/\<TESTSCFLAG(\([[:alnum:]_]*\).*/TestSetPage\1/' + '/\<TESTSCFLAG(\([[:alnum:]_]*\).*/TestClearPage\1/' + '/\<SETPAGEFLAG_NOOP(\([[:alnum:]_]*\).*/SetPage\1/' + '/\<CLEARPAGEFLAG_NOOP(\([[:alnum:]_]*\).*/ClearPage\1/' + '/\<__CLEARPAGEFLAG_NOOP(\([[:alnum:]_]*\).*/__ClearPage\1/' + '/\<TESTCLEARFLAG_FALSE(\([[:alnum:]_]*\).*/TestClearPage\1/' + '/^PAGE_TYPE_OPS(\([[:alnum:]_]*\).*/Page\1/' + '/^PAGE_TYPE_OPS(\([[:alnum:]_]*\).*/__SetPage\1/' + '/^PAGE_TYPE_OPS(\([[:alnum:]_]*\).*/__ClearPage\1/' + '/^TASK_PFA_TEST([^,]*, *\([[:alnum:]_]*\))/task_\1/' + '/^TASK_PFA_SET([^,]*, *\([[:alnum:]_]*\))/task_set_\1/' + '/^TASK_PFA_CLEAR([^,]*, *\([[:alnum:]_]*\))/task_clear_\1/' + '/^DEF_MMIO_\(IN\|OUT\)_[XD](\([[:alnum:]_]*\),[^)]*)/\2/' + '/^DEBUGGER_BOILERPLATE(\([[:alnum:]_]*\))/\1/' + '/^DEF_PCI_AC_\(\|NO\)RET(\([[:alnum:]_]*\).*/\2/' + '/^PCI_OP_READ(\(\w*\).*[1-4])/pci_bus_read_config_\1/' + '/^PCI_OP_WRITE(\(\w*\).*[1-4])/pci_bus_write_config_\1/' + '/\<DEFINE_\(RT_MUTEX\|MUTEX\|SEMAPHORE\|SPINLOCK\)(\([[:alnum:]_]*\)/\2/v/' + '/\<DEFINE_\(RAW_SPINLOCK\|RWLOCK\|SEQLOCK\)(\([[:alnum:]_]*\)/\2/v/' + '/\<DECLARE_\(RWSEM\|COMPLETION\)(\([[:alnum:]_]\+\)/\2/v/' + '/\<DECLARE_BITMAP(\([[:alnum:]_]*\)/\1/v/' + '/\(^\|\s\)\(\|L\|H\)LIST_HEAD(\([[:alnum:]_]*\)/\3/v/' + '/\(^\|\s\)RADIX_TREE(\([[:alnum:]_]*\)/\2/v/' + '/\<DEFINE_PER_CPU([^,]*, *\([[:alnum:]_]*\)/\1/v/' + '/\<DEFINE_PER_CPU_SHARED_ALIGNED([^,]*, *\([[:alnum:]_]*\)/\1/v/' + '/\<DECLARE_WAIT_QUEUE_HEAD(\([[:alnum:]_]*\)/\1/v/' + '/\<DECLARE_\(TASKLET\|WORK\|DELAYED_WORK\)(\([[:alnum:]_]*\)/\2/v/' + '/\(^\s\)OFFSET(\([[:alnum:]_]*\)/\2/v/' + '/\(^\s\)DEFINE(\([[:alnum:]_]*\)/\2/v/' + '/\<\(DEFINE\|DECLARE\)_HASHTABLE(\([[:alnum:]_]*\)/\2/v/' + '/\<DEFINE_ID\(R\|A\)(\([[:alnum:]_]\+\)/\2/' + '/\<DEFINE_WD_CLASS(\([[:alnum:]_]\+\)/\1/' + '/\<ATOMIC_NOTIFIER_HEAD(\([[:alnum:]_]\+\)/\1/' + '/\<RAW_NOTIFIER_HEAD(\([[:alnum:]_]\+\)/\1/' + '/\<DECLARE_FAULT_ATTR(\([[:alnum:]_]\+\)/\1/' + '/\<BLOCKING_NOTIFIER_HEAD(\([[:alnum:]_]\+\)/\1/' + '/\<DEVICE_ATTR_\(RW\|RO\|WO\)(\([[:alnum:]_]\+\)/dev_attr_\2/' + '/\<DRIVER_ATTR_\(RW\|RO\|WO\)(\([[:alnum:]_]\+\)/driver_attr_\2/' + '/\<\(DEFINE\|DECLARE\)_STATIC_KEY_\(TRUE\|FALSE\)\(\|_RO\)(\([[:alnum:]_]\+\)/\4/' +) +regex_kconfig=( + '/^[[:blank:]]*\(menu\|\)config[[:blank:]]\+\([[:alnum:]_]\+\)/\2/' + '/^[[:blank:]]*\(menu\|\)config[[:blank:]]\+\([[:alnum:]_]\+\)/CONFIG_\2/' +) +setup_regex() +{ + local mode=$1 lang tmp=() r + shift + + regex=() + for lang; do + case "$lang" in + asm) tmp=("${regex_asm[@]}") ;; + c) tmp=("${regex_c[@]}") ;; + kconfig) tmp=("${regex_kconfig[@]}") ;; + esac + for r in "${tmp[@]}"; do + if test "$mode" = "exuberant"; then + regex[${#regex[@]}]="--regex-$lang=${r}b" + else + # Remove ctags /kind-spec/ + case "$r" in + /*/*/?/) + r=${r%?/} + esac + # Prepend ^[^#] unless already anchored + case "$r" in + /^*) ;; + *) + r="/^[^#]*${r#/}" + esac + regex[${#regex[@]}]="--regex=$r" + fi + done + done } exuberant() { - all_sources | xargs $1 -a \ - -I __initdata,__exitdata,__acquires,__releases \ - -I __read_mostly,____cacheline_aligned \ + setup_regex exuberant asm c + all_target_sources | xargs $1 -a \ + -I __initdata,__exitdata,__initconst,__ro_after_init \ + -I __initdata_memblock \ + -I __refdata,__attribute,__maybe_unused,__always_unused \ + -I __acquires,__releases,__deprecated,__always_inline \ + -I __read_mostly,__aligned,____cacheline_aligned \ -I ____cacheline_aligned_in_smp \ + -I __cacheline_aligned,__cacheline_aligned_in_smp \ -I ____cacheline_internodealigned_in_smp \ - -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ + -I __used,__packed,__packed2__,__must_check,__must_hold \ + -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL,ACPI_EXPORT_SYMBOL \ -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ - --extra=+f --c-kinds=+px \ - --regex-asm='/^(ENTRY|_GLOBAL)\(([^)]*)\).*/\2/' \ - --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' \ - --regex-c++='/^TRACE_EVENT\(([^,)]*).*/trace_\1/' \ - --regex-c++='/^DEFINE_EVENT\([^,)]*, *([^,)]*).*/trace_\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex-c++='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex-c++='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex-c++='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex-c++='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \ - --regex-c++='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex-c++='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ - --regex-c='/PCI_OP_READ\(([a-z]*[a-z]).*[1-4]\)/pci_bus_read_config_\1/' \ - --regex-c='/PCI_OP_WRITE\(([a-z]*[a-z]).*[1-4]\)/pci_bus_write_config_\1/' + -I static,const \ + --extra=+fq --c-kinds=+px --fields=+iaS --langmap=c:+.h \ + "${regex[@]}" + setup_regex exuberant kconfig all_kconfigs | xargs $1 -a \ - --langdef=kconfig --language-force=kconfig \ - --regex-kconfig='/^[[:blank:]]*(menu|)config[[:blank:]]+([[:alnum:]_]+)/\2/' \ - --regex-kconfig='/^[[:blank:]]*(menu|)config[[:blank:]]+([[:alnum:]_]+)/CONFIG_\2/' + --langdef=kconfig --language-force=kconfig "${regex[@]}" + } emacs() { - all_sources | xargs $1 -a \ - --regex='/^(ENTRY|_GLOBAL)(\([^)]*\)).*/\2/' \ - --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ - --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ - --regex='/^DEFINE_EVENT([^,)]*, *\([^,)]*\).*/trace_\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \ - --regex='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ - --regex='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ - --regex='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ - --regex='/PCI_OP_READ\(([a-z]*[a-z]).*[1-4]\)/pci_bus_read_config_\1/' \ - --regex='/PCI_OP_WRITE\(([a-z]*[a-z]).*[1-4]\)/pci_bus_write_config_\1/' + setup_regex emacs asm c + all_target_sources | xargs $1 -a "${regex[@]}" - all_kconfigs | xargs $1 -a \ - --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/' \ - --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/CONFIG_\3/' + setup_regex emacs kconfig + all_kconfigs | xargs $1 -a "${regex[@]}" } xtags() @@ -201,11 +290,10 @@ xtags() elif $1 --version 2>&1 | grep -iq emacs; then emacs $1 else - all_sources | xargs $1 -a - fi + all_target_sources | xargs $1 -a + fi } - # Support um (which uses SUBARCH) if [ "${ARCH}" = "um" ]; then if [ "$SUBARCH" = "i386" ]; then |