diff options
Diffstat (limited to 'usr')
-rw-r--r-- | usr/.gitignore | 8 | ||||
-rw-r--r-- | usr/Kconfig | 26 | ||||
-rw-r--r-- | usr/Makefile | 97 | ||||
-rw-r--r-- | usr/default_cpio_list | 6 | ||||
-rwxr-xr-x | usr/gen_initramfs.sh (renamed from usr/gen_initramfs_list.sh) | 167 | ||||
-rw-r--r-- | usr/include/Makefile | 107 | ||||
-rw-r--r-- | usr/initramfs_data.S | 5 |
7 files changed, 166 insertions, 250 deletions
diff --git a/usr/.gitignore b/usr/.gitignore index be5eae1df7eb..610de736b75e 100644 --- a/usr/.gitignore +++ b/usr/.gitignore @@ -1,9 +1,3 @@ -# -# Generated files -# gen_init_cpio initramfs_data.cpio -initramfs_data.cpio.gz -initramfs_data.cpio.bz2 -initramfs_data.cpio.lzma -initramfs_list +/initramfs_inc_data diff --git a/usr/Kconfig b/usr/Kconfig index a6b68503d177..529caab1a328 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -54,7 +54,6 @@ config INITRAMFS_ROOT_GID config RD_GZIP bool "Support initial ramdisk/ramfs compressed using gzip" - depends on BLK_DEV_INITRD default y select DECOMPRESS_GZIP help @@ -64,7 +63,6 @@ config RD_GZIP config RD_BZIP2 bool "Support initial ramdisk/ramfs compressed using bzip2" default y - depends on BLK_DEV_INITRD select DECOMPRESS_BZIP2 help Support loading of a bzip2 encoded initial ramdisk or cpio buffer @@ -73,7 +71,6 @@ config RD_BZIP2 config RD_LZMA bool "Support initial ramdisk/ramfs compressed using LZMA" default y - depends on BLK_DEV_INITRD select DECOMPRESS_LZMA help Support loading of a LZMA encoded initial ramdisk or cpio buffer @@ -81,7 +78,6 @@ config RD_LZMA config RD_XZ bool "Support initial ramdisk/ramfs compressed using XZ" - depends on BLK_DEV_INITRD default y select DECOMPRESS_XZ help @@ -91,7 +87,6 @@ config RD_XZ config RD_LZO bool "Support initial ramdisk/ramfs compressed using LZO" default y - depends on BLK_DEV_INITRD select DECOMPRESS_LZO help Support loading of a LZO encoded initial ramdisk or cpio buffer @@ -100,7 +95,6 @@ config RD_LZO config RD_LZ4 bool "Support initial ramdisk/ramfs compressed using LZ4" default y - depends on BLK_DEV_INITRD select DECOMPRESS_LZ4 help Support loading of a LZ4 encoded initial ramdisk or cpio buffer @@ -108,8 +102,6 @@ config RD_LZ4 choice prompt "Built-in initramfs compression mode" - depends on INITRAMFS_SOURCE!="" - optional help This option allows you to decide by which algorithm the builtin initramfs will be compressed. Several compression algorithms are @@ -215,21 +207,3 @@ config INITRAMFS_COMPRESSION_LZ4 by default which could cause a build failure. endchoice - -config INITRAMFS_COMPRESSION - depends on INITRAMFS_SOURCE!="" - string - default "" if INITRAMFS_COMPRESSION_NONE - default ".gz" if INITRAMFS_COMPRESSION_GZIP - default ".bz2" if INITRAMFS_COMPRESSION_BZIP2 - default ".lzma" if INITRAMFS_COMPRESSION_LZMA - default ".xz" if INITRAMFS_COMPRESSION_XZ - default ".lzo" if INITRAMFS_COMPRESSION_LZO - default ".lz4" if INITRAMFS_COMPRESSION_LZ4 - default ".gz" if RD_GZIP - default ".lz4" if RD_LZ4 - default ".lzo" if RD_LZO - default ".xz" if RD_XZ - default ".lzma" if RD_LZMA - default ".bz2" if RD_BZIP2 - default "" diff --git a/usr/Makefile b/usr/Makefile index e6f7cb2f81db..244862bfb765 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -3,61 +3,86 @@ # kbuild file for usr/ - including initramfs image # -klibcdirs:; -PHONY += klibcdirs +# cmd_bzip2, cmd_lzma, cmd_lzo, cmd_lz4 from scripts/Makefile.lib appends the +# size at the end of the compressed file, which unfortunately does not work +# with unpack_to_rootfs(). Make size_append no-op. +override size_append := : -suffix_y = $(subst $\",,$(CONFIG_INITRAMFS_COMPRESSION)) -datafile_y = initramfs_data.cpio$(suffix_y) -datafile_d_y = .$(datafile_y).d -AFLAGS_initramfs_data.o += -DINITRAMFS_IMAGE="usr/$(datafile_y)" +compress-$(CONFIG_INITRAMFS_COMPRESSION_NONE) := shipped +compress-$(CONFIG_INITRAMFS_COMPRESSION_GZIP) := gzip +compress-$(CONFIG_INITRAMFS_COMPRESSION_BZIP2) := bzip2 +compress-$(CONFIG_INITRAMFS_COMPRESSION_LZMA) := lzma +compress-$(CONFIG_INITRAMFS_COMPRESSION_XZ) := xzmisc +compress-$(CONFIG_INITRAMFS_COMPRESSION_LZO) := lzo +compress-$(CONFIG_INITRAMFS_COMPRESSION_LZ4) := lz4 -# clean rules do not have CONFIG_INITRAMFS_COMPRESSION. So clean up after all -# possible compression formats. -clean-files += initramfs_data.cpio* - -# Generate builtin.o based on initramfs_data.o obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o -# initramfs_data.o contains the compressed initramfs_data.cpio image. -# The image is included using .incbin, a dependency which is not -# tracked automatically. -$(obj)/initramfs_data.o: $(obj)/$(datafile_y) FORCE +$(obj)/initramfs_data.o: $(obj)/initramfs_inc_data + +ramfs-input := $(strip $(shell echo $(CONFIG_INITRAMFS_SOURCE))) +cpio-data := + +# If CONFIG_INITRAMFS_SOURCE is empty, generate a small initramfs with the +# default contents. +ifeq ($(ramfs-input),) +ramfs-input := $(srctree)/$(src)/default_cpio_list +endif + +ifeq ($(words $(ramfs-input)),1) + +# If CONFIG_INITRAMFS_SOURCE specifies a single file, and it is suffixed with +# .cpio, use it directly as an initramfs. +ifneq ($(filter %.cpio,$(ramfs-input)),) +cpio-data := $(ramfs-input) +endif + +# If CONFIG_INITRAMFS_SOURCE specifies a single file, and it is suffixed with +# .cpio.*, use it directly as an initramfs, and avoid double compression. +ifeq ($(words $(subst .cpio.,$(space),$(ramfs-input))),2) +cpio-data := $(ramfs-input) +compress-y := shipped +endif + +endif + +# For other cases, generate the initramfs cpio archive based on the contents +# specified by CONFIG_INITRAMFS_SOURCE. +ifeq ($(cpio-data),) -##### -# Generate the initramfs cpio archive +cpio-data := $(obj)/initramfs_data.cpio hostprogs-y := gen_init_cpio -initramfs := $(CONFIG_SHELL) $(srctree)/$(src)/gen_initramfs_list.sh -ramfs-input := $(if $(filter-out "",$(CONFIG_INITRAMFS_SOURCE)), \ - $(shell echo $(CONFIG_INITRAMFS_SOURCE)),-d) -ramfs-args := \ - $(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \ - $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID)) - -# $(datafile_d_y) is used to identify all files included + +# .initramfs_data.cpio.d is used to identify all files included # in initramfs and to detect if any files are added/removed. # Removed files are identified by directory timestamp being updated # The dependency list is generated by gen_initramfs.sh -l -ifneq ($(wildcard $(obj)/$(datafile_d_y)),) - include $(obj)/$(datafile_d_y) -endif - -quiet_cmd_initfs = GEN $@ - cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input) - -targets := $(datafile_y) +-include $(obj)/.initramfs_data.cpio.d # do not try to update files included in initramfs $(deps_initramfs): ; -$(deps_initramfs): klibcdirs +quiet_cmd_initfs = GEN $@ + cmd_initfs = \ + $(CONFIG_SHELL) $< -o $@ -l $(obj)/.initramfs_data.cpio.d \ + $(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \ + $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID)) \ + $(ramfs-input) + # We rebuild initramfs_data.cpio if: # 1) Any included file is newer than initramfs_data.cpio # 2) There are changes in which files are included (added or deleted) # 3) If gen_init_cpio are newer than initramfs_data.cpio # 4) Arguments to gen_initramfs.sh changes -$(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs - $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/$(datafile_d_y) +$(obj)/initramfs_data.cpio: $(src)/gen_initramfs.sh $(obj)/gen_init_cpio $(deps_initramfs) FORCE $(call if_changed,initfs) +endif + +$(obj)/initramfs_inc_data: $(cpio-data) FORCE + $(call if_changed,$(compress-y)) + +targets += initramfs_data.cpio initramfs_inc_data + subdir-$(CONFIG_UAPI_HEADER_TEST) += include diff --git a/usr/default_cpio_list b/usr/default_cpio_list new file mode 100644 index 000000000000..37b3864066e8 --- /dev/null +++ b/usr/default_cpio_list @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only +# This is a very simple, default initramfs + +dir /dev 0755 0 0 +nod /dev/console 0600 0 0 c 5 1 +dir /root 0700 0 0 diff --git a/usr/gen_initramfs_list.sh b/usr/gen_initramfs.sh index 2bbac73e6477..8ae831657e5d 100755 --- a/usr/gen_initramfs_list.sh +++ b/usr/gen_initramfs.sh @@ -5,8 +5,7 @@ # Released under the terms of the GNU GPL # # Generate a cpio packed initramfs. It uses gen_init_cpio to generate -# the cpio archive, and then compresses it. -# The script may also be used to generate the inputfile used for gen_init_cpio +# the cpio archive. # This script assumes that gen_init_cpio is located in usr/ directory # error out on errors @@ -15,9 +14,9 @@ set -e usage() { cat << EOF Usage: -$0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ... - -o <file> Create compressed initramfs file named <file> using - gen_init_cpio and compressor depending on the extension +$0 [-o <file>] [-l <dep_list>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ... + -o <file> Create initramfs file named <file> by using gen_init_cpio + -l <dep_list> Create dependency list named <dep_list> -u <uid> User ID to map to user ID 0 (root). <uid> is only meaningful if <cpio_source> is a directory. "squash" forces all files to uid 0. @@ -27,7 +26,6 @@ $0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ... <cpio_source> File list or directory for cpio archive. If <cpio_source> is a .cpio file it will be used as direct input to initramfs. - -d Output the default cpio list. All options except -o and -l may be repeated and are interpreted sequentially and immediately. -u and -g states are preserved across @@ -42,23 +40,6 @@ field() { shift $1 ; echo $1 } -list_default_initramfs() { - # echo usr/kinit/kinit - : -} - -default_initramfs() { - cat <<-EOF >> ${output} - # This is a very simple, default initramfs - - dir /dev 0755 0 0 - nod /dev/console 0600 0 0 c 5 1 - dir /root 0700 0 0 - # file /kinit usr/kinit/kinit 0755 0 0 - # slink /init kinit 0755 0 0 - EOF -} - filetype() { local argv1="$1" @@ -81,10 +62,6 @@ filetype() { return 0 } -list_print_mtime() { - : -} - print_mtime() { local my_mtime="0" @@ -92,15 +69,15 @@ print_mtime() { my_mtime=$(find "$1" -printf "%T@\n" | sort -r | head -n 1) fi - echo "# Last modified: ${my_mtime}" >> ${output} - echo "" >> ${output} + echo "# Last modified: ${my_mtime}" >> $cpio_list + echo "" >> $cpio_list } list_parse() { - if [ -L "$1" ]; then + if [ -z "$dep_list" -o -L "$1" ]; then return fi - echo "$1" | sed 's/:/\\:/g; s/$/ \\/' + echo "$1" | sed 's/:/\\:/g; s/$/ \\/' >> $dep_list } # for each file print a line in following format @@ -146,7 +123,7 @@ parse() { ;; esac - echo "${str}" >> ${output} + echo "${str}" >> $cpio_list return 0 } @@ -161,58 +138,47 @@ unknown_option() { exit 1 } -list_header() { - : -} - header() { - printf "\n#####################\n# $1\n" >> ${output} + printf "\n#####################\n# $1\n" >> $cpio_list } # process one directory (incl sub-directories) dir_filelist() { - ${dep_list}header "$1" + header "$1" srcdir=$(echo "$1" | sed -e 's://*:/:g') dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | LANG=C sort) # If $dirlist is only one line, then the directory is empty if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then - ${dep_list}print_mtime "$1" + print_mtime "$1" echo "${dirlist}" | \ while read x; do - ${dep_list}parse ${x} + list_parse $x + parse $x done fi } -# if only one file is specified and it is .cpio file then use it direct as fs -# if a directory is specified then add all files in given direcotry to fs -# if a regular file is specified assume it is in gen_initramfs format input_file() { source="$1" if [ -f "$1" ]; then - ${dep_list}header "$1" - is_cpio="$(echo "$1" | sed 's/^.*\.cpio\(\..*\)\{0,1\}/cpio/')" - if [ $2 -eq 0 -a ${is_cpio} = "cpio" ]; then - cpio_file=$1 - echo "$1" | grep -q '^.*\.cpio\..*' && is_cpio_compressed="compressed" - [ ! -z ${dep_list} ] && echo "$1" - return 0 - fi - if [ -z ${dep_list} ]; then - print_mtime "$1" >> ${output} - cat "$1" >> ${output} - else - echo "$1 \\" + # If a regular file is specified, assume it is in + # gen_init_cpio format + header "$1" + print_mtime "$1" >> $cpio_list + cat "$1" >> $cpio_list + if [ -n "$dep_list" ]; then + echo "$1 \\" >> $dep_list cat "$1" | while read type dir file perm ; do if [ "$type" = "file" ]; then - echo "$file \\"; + echo "$file \\" >> $dep_list fi done fi elif [ -d "$1" ]; then + # If a directory is specified then add all files in it to fs dir_filelist "$1" else echo " ${prog}: Cannot open '$1'" >&2 @@ -224,51 +190,24 @@ prog=$0 root_uid=0 root_gid=0 dep_list= -cpio_file= -cpio_list= +cpio_list=$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX) output="/dev/stdout" -output_file="" -is_cpio_compressed= -compr="gzip -n -9 -f" -arg="$1" -case "$arg" in - "-l") # files included in initramfs - used by kbuild - dep_list="list_" - echo "deps_initramfs := $0 \\" - shift - ;; - "-o") # generate compressed cpio image named $1 - shift - output_file="$1" - cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)" - output=${cpio_list} - echo "$output_file" | grep -q "\.gz$" \ - && [ -x "`which gzip 2> /dev/null`" ] \ - && compr="gzip -n -9 -f" - echo "$output_file" | grep -q "\.bz2$" \ - && [ -x "`which bzip2 2> /dev/null`" ] \ - && compr="bzip2 -9 -f" - echo "$output_file" | grep -q "\.lzma$" \ - && [ -x "`which lzma 2> /dev/null`" ] \ - && compr="lzma -9 -f" - echo "$output_file" | grep -q "\.xz$" \ - && [ -x "`which xz 2> /dev/null`" ] \ - && compr="xz --check=crc32 --lzma2=dict=1MiB" - echo "$output_file" | grep -q "\.lzo$" \ - && [ -x "`which lzop 2> /dev/null`" ] \ - && compr="lzop -9 -f" - echo "$output_file" | grep -q "\.lz4$" \ - && [ -x "`which lz4 2> /dev/null`" ] \ - && compr="lz4 -l -9 -f" - echo "$output_file" | grep -q "\.cpio$" && compr="cat" - shift - ;; -esac +trap "rm -f $cpio_list" EXIT + while [ $# -gt 0 ]; do arg="$1" shift case "$arg" in + "-l") # files included in initramfs - used by kbuild + dep_list="$1" + echo "deps_initramfs := \\" > $dep_list + shift + ;; + "-o") # generate cpio image named $1 + output="$1" + shift + ;; "-u") # map $1 to uid=0 (root) root_uid="$1" [ "$root_uid" = "-1" ] && root_uid=$(id -u || echo 0) @@ -279,10 +218,6 @@ while [ $# -gt 0 ]; do [ "$root_gid" = "-1" ] && root_gid=$(id -g || echo 0) shift ;; - "-d") # display default initramfs list - default_list="$arg" - ${dep_list}default_initramfs - ;; "-h") usage exit 0 @@ -293,36 +228,20 @@ while [ $# -gt 0 ]; do unknown_option ;; *) # input file/dir - process it - input_file "$arg" "$#" + input_file "$arg" ;; esac ;; esac done -# If output_file is set we will generate cpio archive and compress it +# If output_file is set we will generate cpio archive # we are careful to delete tmp files -if [ ! -z ${output_file} ]; then - if [ -z ${cpio_file} ]; then - timestamp= - if test -n "$KBUILD_BUILD_TIMESTAMP"; then - timestamp="$(date -d"$KBUILD_BUILD_TIMESTAMP" +%s || :)" - if test -n "$timestamp"; then - timestamp="-t $timestamp" - fi - fi - cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)" - usr/gen_init_cpio $timestamp ${cpio_list} > ${cpio_tfile} - else - cpio_tfile=${cpio_file} - fi - rm ${cpio_list} - if [ "${is_cpio_compressed}" = "compressed" ]; then - cat ${cpio_tfile} > ${output_file} - else - (cat ${cpio_tfile} | ${compr} - > ${output_file}) \ - || (rm -f ${output_file} ; false) +timestamp= +if test -n "$KBUILD_BUILD_TIMESTAMP"; then + timestamp="$(date -d"$KBUILD_BUILD_TIMESTAMP" +%s || :)" + if test -n "$timestamp"; then + timestamp="-t $timestamp" fi - [ -z ${cpio_file} ] && rm ${cpio_tfile} fi -exit 0 +usr/gen_init_cpio $timestamp $cpio_list > $output diff --git a/usr/include/Makefile b/usr/include/Makefile index 84598469e6ff..a339ef325aa5 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -16,87 +16,88 @@ override c_flags = $(UAPI_CFLAGS) -Wp,-MD,$(depfile) -I$(objtree)/usr/include # Please consider to fix the header first. # # Sorted alphabetically. -header-test- += asm/shmbuf.h -header-test- += asm/signal.h -header-test- += asm/ucontext.h -header-test- += drm/vmwgfx_drm.h -header-test- += linux/am437x-vpfe.h -header-test- += linux/android/binder.h -header-test- += linux/android/binderfs.h -header-test- += linux/coda.h -header-test- += linux/elfcore.h -header-test- += linux/errqueue.h -header-test- += linux/fsmap.h -header-test- += linux/hdlc/ioctl.h -header-test- += linux/ivtv.h -header-test- += linux/kexec.h -header-test- += linux/matroxfb.h -header-test- += linux/nfc.h -header-test- += linux/omap3isp.h -header-test- += linux/omapfb.h -header-test- += linux/patchkey.h -header-test- += linux/phonet.h -header-test- += linux/reiserfs_xattr.h -header-test- += linux/sctp.h -header-test- += linux/signal.h -header-test- += linux/sysctl.h -header-test- += linux/usb/audio.h -header-test- += linux/v4l2-mediabus.h -header-test- += linux/v4l2-subdev.h -header-test- += linux/videodev2.h -header-test- += linux/vm_sockets.h -header-test- += sound/asequencer.h -header-test- += sound/asoc.h -header-test- += sound/asound.h -header-test- += sound/compress_offload.h -header-test- += sound/emu10k1.h -header-test- += sound/sfnt_info.h -header-test- += xen/evtchn.h -header-test- += xen/gntdev.h -header-test- += xen/privcmd.h +no-header-test += asm/shmbuf.h +no-header-test += asm/signal.h +no-header-test += asm/ucontext.h +no-header-test += drm/vmwgfx_drm.h +no-header-test += linux/am437x-vpfe.h +no-header-test += linux/android/binder.h +no-header-test += linux/android/binderfs.h +no-header-test += linux/coda.h +no-header-test += linux/elfcore.h +no-header-test += linux/errqueue.h +no-header-test += linux/fsmap.h +no-header-test += linux/hdlc/ioctl.h +no-header-test += linux/ivtv.h +no-header-test += linux/kexec.h +no-header-test += linux/matroxfb.h +no-header-test += linux/nfc.h +no-header-test += linux/omap3isp.h +no-header-test += linux/omapfb.h +no-header-test += linux/patchkey.h +no-header-test += linux/phonet.h +no-header-test += linux/reiserfs_xattr.h +no-header-test += linux/sctp.h +no-header-test += linux/signal.h +no-header-test += linux/sysctl.h +no-header-test += linux/usb/audio.h +no-header-test += linux/v4l2-mediabus.h +no-header-test += linux/v4l2-subdev.h +no-header-test += linux/videodev2.h +no-header-test += linux/vm_sockets.h +no-header-test += sound/asequencer.h +no-header-test += sound/asoc.h +no-header-test += sound/asound.h +no-header-test += sound/compress_offload.h +no-header-test += sound/emu10k1.h +no-header-test += sound/sfnt_info.h +no-header-test += xen/evtchn.h +no-header-test += xen/gntdev.h +no-header-test += xen/privcmd.h # More headers are broken in some architectures ifeq ($(SRCARCH),arc) -header-test- += linux/bpf_perf_event.h +no-header-test += linux/bpf_perf_event.h endif ifeq ($(SRCARCH),ia64) -header-test- += asm/setup.h -header-test- += asm/sigcontext.h -header-test- += asm/perfmon.h -header-test- += asm/perfmon_default_smpl.h -header-test- += linux/if_bonding.h +no-header-test += asm/setup.h +no-header-test += asm/sigcontext.h +no-header-test += asm/perfmon.h +no-header-test += asm/perfmon_default_smpl.h +no-header-test += linux/if_bonding.h endif ifeq ($(SRCARCH),mips) -header-test- += asm/stat.h +no-header-test += asm/stat.h endif ifeq ($(SRCARCH),powerpc) -header-test- += asm/stat.h -header-test- += linux/bpf_perf_event.h +no-header-test += asm/stat.h +no-header-test += linux/bpf_perf_event.h endif ifeq ($(SRCARCH),riscv) -header-test- += linux/bpf_perf_event.h +no-header-test += linux/bpf_perf_event.h endif ifeq ($(SRCARCH),sparc) -header-test- += asm/stat.h -header-test- += asm/uctx.h -header-test- += asm/fbio.h +no-header-test += asm/stat.h +no-header-test += asm/uctx.h +no-header-test += asm/fbio.h endif # asm-generic/*.h is used by asm/*.h, and should not be included directly -header-test- += asm-generic/% +no-header-test += asm-generic/% extra-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/dev/null)) +# Include the header to detect missing include guard. quiet_cmd_hdrtest = HDRTEST $< cmd_hdrtest = \ $(CC) $(c_flags) -S -o /dev/null -x c /dev/null \ - $(if $(filter-out $(header-test-), $*.h), -include $<); \ + $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \ $(PERL) $(srctree)/scripts/headers_check.pl $(obj) $(SRCARCH) $<; \ touch $@ diff --git a/usr/initramfs_data.S b/usr/initramfs_data.S index d07648f05bbf..cd67edc38797 100644 --- a/usr/initramfs_data.S +++ b/usr/initramfs_data.S @@ -22,12 +22,9 @@ in the ELF header, as required by certain architectures. */ -#include <linux/stringify.h> -#include <asm-generic/vmlinux.lds.h> - .section .init.ramfs,"a" __irf_start: -.incbin __stringify(INITRAMFS_IMAGE) +.incbin "usr/initramfs_inc_data" __irf_end: .section .init.ramfs.info,"a" .globl __initramfs_size |