Commit 88619527 authored by Will Deacon's avatar Will Deacon

Merge branch 'for-next/kbuild' into for-next/core

* for-next/kbuild:
  efi/libstub: zboot: do not use $(shell ...) in cmd_copy_and_pad
  arm64: properly install vmlinuz.efi
  arm64: replace <asm-generic/export.h> with <linux/export.h>
  arm64: vdso32: rename 32-bit debug vdso to vdso32.so.dbg
parents 79eb42b2 97ba4416
...@@ -200,7 +200,7 @@ endif ...@@ -200,7 +200,7 @@ endif
endif endif
vdso-install-y += arch/arm64/kernel/vdso/vdso.so.dbg vdso-install-y += arch/arm64/kernel/vdso/vdso.so.dbg
vdso-install-$(CONFIG_COMPAT_VDSO) += arch/arm64/kernel/vdso32/vdso.so.dbg:vdso32.so vdso-install-$(CONFIG_COMPAT_VDSO) += arch/arm64/kernel/vdso32/vdso32.so.dbg
include $(srctree)/scripts/Makefile.defconf include $(srctree)/scripts/Makefile.defconf
......
...@@ -44,7 +44,7 @@ EFI_ZBOOT_BFD_TARGET := elf64-littleaarch64 ...@@ -44,7 +44,7 @@ EFI_ZBOOT_BFD_TARGET := elf64-littleaarch64
EFI_ZBOOT_MACH_TYPE := ARM64 EFI_ZBOOT_MACH_TYPE := ARM64
EFI_ZBOOT_FORWARD_CFI := $(CONFIG_ARM64_BTI_KERNEL) EFI_ZBOOT_FORWARD_CFI := $(CONFIG_ARM64_BTI_KERNEL)
EFI_ZBOOT_OBJCOPY_FLAGS = --add-symbol zboot_code_size=0x$(shell \ EFI_ZBOOT_OBJCOPY_FLAGS = --add-symbol zboot_code_size=0x$$( \
$(NM) vmlinux|grep _kernel_codesize|cut -d' ' -f1) $(NM) vmlinux|grep _kernel_codesize|cut -d' ' -f1)
include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
# $3 - kernel map file # $3 - kernel map file
# $4 - default install path (blank if root directory) # $4 - default install path (blank if root directory)
if [ "$(basename $2)" = "Image.gz" ]; then if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
then
# Compressed install # Compressed install
echo "Installing compressed kernel" echo "Installing compressed kernel"
base=vmlinuz base=vmlinuz
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#ifndef __ASM_ASSEMBLER_H #ifndef __ASM_ASSEMBLER_H
#define __ASM_ASSEMBLER_H #define __ASM_ASSEMBLER_H
#include <asm-generic/export.h> #include <linux/export.h>
#include <asm/alternative.h> #include <asm/alternative.h>
#include <asm/asm-bug.h> #include <asm/asm-bug.h>
......
...@@ -118,7 +118,7 @@ endif ...@@ -118,7 +118,7 @@ endif
VDSO_CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os VDSO_CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os
# Build rules # Build rules
targets := $(c-obj-vdso) $(c-obj-vdso-gettimeofday) $(asm-obj-vdso) vdso.so vdso.so.dbg vdso.so.raw targets := $(c-obj-vdso) $(c-obj-vdso-gettimeofday) $(asm-obj-vdso) vdso.so vdso32.so.dbg vdso.so.raw
c-obj-vdso := $(addprefix $(obj)/, $(c-obj-vdso)) c-obj-vdso := $(addprefix $(obj)/, $(c-obj-vdso))
c-obj-vdso-gettimeofday := $(addprefix $(obj)/, $(c-obj-vdso-gettimeofday)) c-obj-vdso-gettimeofday := $(addprefix $(obj)/, $(c-obj-vdso-gettimeofday))
asm-obj-vdso := $(addprefix $(obj)/, $(asm-obj-vdso)) asm-obj-vdso := $(addprefix $(obj)/, $(asm-obj-vdso))
...@@ -127,15 +127,15 @@ obj-vdso := $(c-obj-vdso) $(c-obj-vdso-gettimeofday) $(asm-obj-vdso) ...@@ -127,15 +127,15 @@ obj-vdso := $(c-obj-vdso) $(c-obj-vdso-gettimeofday) $(asm-obj-vdso)
targets += vdso.lds targets += vdso.lds
CPPFLAGS_vdso.lds += -P -C -U$(ARCH) CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
include/generated/vdso32-offsets.h: $(obj)/vdso.so.dbg FORCE include/generated/vdso32-offsets.h: $(obj)/vdso32.so.dbg FORCE
$(call if_changed,vdsosym) $(call if_changed,vdsosym)
# Strip rule for vdso.so # Strip rule for vdso.so
$(obj)/vdso.so: OBJCOPYFLAGS := -S $(obj)/vdso.so: OBJCOPYFLAGS := -S
$(obj)/vdso.so: $(obj)/vdso.so.dbg FORCE $(obj)/vdso.so: $(obj)/vdso32.so.dbg FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
$(obj)/vdso.so.dbg: $(obj)/vdso.so.raw $(obj)/$(munge) FORCE $(obj)/vdso32.so.dbg: $(obj)/vdso.so.raw $(obj)/$(munge) FORCE
$(call if_changed,vdsomunge) $(call if_changed,vdsomunge)
# Link rule for the .so file, .lds has to be first # Link rule for the .so file, .lds has to be first
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
# EFI_ZBOOT_FORWARD_CFI # EFI_ZBOOT_FORWARD_CFI
quiet_cmd_copy_and_pad = PAD $@ quiet_cmd_copy_and_pad = PAD $@
cmd_copy_and_pad = cp $< $@ && \ cmd_copy_and_pad = cp $< $@; \
truncate -s $(shell hexdump -s16 -n4 -e '"%u"' $<) $@ truncate -s $$(hexdump -s16 -n4 -e '"%u"' $<) $@
# Pad the file to the size of the uncompressed image in memory, including BSS # Pad the file to the size of the uncompressed image in memory, including BSS
$(obj)/vmlinux.bin: $(obj)/$(EFI_ZBOOT_PAYLOAD) FORCE $(obj)/vmlinux.bin: $(obj)/$(EFI_ZBOOT_PAYLOAD) FORCE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment