| 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | # Makefile for nolibc tests |
| 3 | # we're in ".../tools/testing/selftests/nolibc" |
| 4 | ifeq ($(srctree),) |
| 5 | srctree := $(patsubst %/tools/testing/selftests/,%,$(dir $(CURDIR))) |
| 6 | endif |
| 7 | |
| 8 | include $(srctree)/tools/scripts/utilities.mak |
| 9 | # We need this for the "__cc-option" macro. |
| 10 | include $(srctree)/scripts/Makefile.compiler |
| 11 | |
| 12 | ifneq ($(O),) |
| 13 | ifneq ($(call is-absolute,$(O)),y) |
| 14 | $(error Only absolute O= parameters are supported) |
| 15 | endif |
| 16 | objtree := $(O) |
| 17 | else |
| 18 | objtree ?= $(srctree) |
| 19 | endif |
| 20 | |
| 21 | ifeq ($(ARCH),) |
| 22 | include $(srctree)/scripts/subarch.include |
| 23 | ARCH = $(SUBARCH) |
| 24 | endif |
| 25 | |
| 26 | cc-option = $(call __cc-option, $(CC),$(CLANG_CROSS_FLAGS),$(1),$(2)) |
| 27 | |
| 28 | # XARCH extends the kernel's ARCH with a few variants of the same |
| 29 | # architecture that only differ by the configuration, the toolchain |
| 30 | # and the Qemu program used. It is copied as-is into ARCH except for |
| 31 | # a few specific values which are mapped like this: |
| 32 | # |
| 33 | # XARCH | ARCH | config |
| 34 | # -------------|-----------|------------------------- |
| 35 | # ppc | powerpc | 32 bits |
| 36 | # ppc64 | powerpc | 64 bits big endian |
| 37 | # ppc64le | powerpc | 64 bits little endian |
| 38 | # |
| 39 | # It is recommended to only use XARCH, though it does not harm if |
| 40 | # ARCH is already set. For simplicity, ARCH is sufficient for all |
| 41 | # architectures where both are equal. |
| 42 | |
| 43 | # configure default variants for target kernel supported architectures |
| 44 | XARCH_powerpc = ppc |
| 45 | XARCH_mips = mips32le |
| 46 | XARCH_riscv = riscv64 |
| 47 | XARCH = $(or $(XARCH_$(ARCH)),$(ARCH)) |
| 48 | |
| 49 | # map from user input variants to their kernel supported architectures |
| 50 | ARCH_x32 = x86 |
| 51 | ARCH_armthumb = arm |
| 52 | ARCH_ppc = powerpc |
| 53 | ARCH_ppc64 = powerpc |
| 54 | ARCH_ppc64le = powerpc |
| 55 | ARCH_mips32le = mips |
| 56 | ARCH_mips32be = mips |
| 57 | ARCH_mipsn32le = mips |
| 58 | ARCH_mipsn32be = mips |
| 59 | ARCH_mips64le = mips |
| 60 | ARCH_mips64be = mips |
| 61 | ARCH_riscv32 = riscv |
| 62 | ARCH_riscv64 = riscv |
| 63 | ARCH_s390x = s390 |
| 64 | ARCH_sparc32 = sparc |
| 65 | ARCH_sparc64 = sparc |
| 66 | ARCH_sh4 = sh |
| 67 | ARCH_parisc32 = parisc |
| 68 | ARCH_parisc64 = parisc64 |
| 69 | ARCH := $(or $(ARCH_$(XARCH)),$(XARCH)) |
| 70 | |
| 71 | # kernel image names by architecture |
| 72 | IMAGE_i386 = arch/x86/boot/bzImage |
| 73 | IMAGE_x86_64 = arch/x86/boot/bzImage |
| 74 | IMAGE_x32 = arch/x86/boot/bzImage |
| 75 | IMAGE_x86 = arch/x86/boot/bzImage |
| 76 | IMAGE_arm64 = arch/arm64/boot/Image |
| 77 | IMAGE_arm = arch/arm/boot/zImage |
| 78 | IMAGE_armthumb = arch/arm/boot/zImage |
| 79 | IMAGE_ppc64le = arch/powerpc/boot/zImage |
| 80 | IMAGE_riscv32 = arch/riscv/boot/Image |
| 81 | IMAGE_riscv64 = arch/riscv/boot/Image |
| 82 | IMAGE_s390x = arch/s390/boot/bzImage |
| 83 | IMAGE_loongarch = arch/loongarch/boot/vmlinuz.efi |
| 84 | IMAGE_sparc32 = arch/sparc/boot/image |
| 85 | IMAGE_sparc64 = arch/sparc/boot/image |
| 86 | IMAGE_sh4 = arch/sh/boot/zImage |
| 87 | IMAGE = $(objtree)/$(or $(IMAGE_$(XARCH)),vmlinux) |
| 88 | IMAGE_NAME = $(notdir $(IMAGE)) |
| 89 | |
| 90 | # default kernel configurations that appear to be usable |
| 91 | DEFCONFIG_arm = multi_v7_defconfig |
| 92 | DEFCONFIG_armthumb = multi_v7_defconfig |
| 93 | DEFCONFIG_mips32le = malta_defconfig |
| 94 | DEFCONFIG_mips32be = malta_defconfig generic/eb.config |
| 95 | DEFCONFIG_mipsn32le = malta_defconfig generic/64r2.config |
| 96 | DEFCONFIG_mipsn32be = malta_defconfig generic/64r6.config generic/eb.config |
| 97 | DEFCONFIG_mips64le = malta_defconfig generic/64r6.config |
| 98 | DEFCONFIG_mips64be = malta_defconfig generic/64r2.config generic/eb.config |
| 99 | DEFCONFIG_ppc = pmac32_defconfig |
| 100 | DEFCONFIG_ppc64 = powernv_be_defconfig |
| 101 | DEFCONFIG_ppc64le = powernv_defconfig |
| 102 | DEFCONFIG_riscv32 = rv32_defconfig |
| 103 | DEFCONFIG_sparc32 = sparc32_defconfig |
| 104 | DEFCONFIG_sparc64 = sparc64_defconfig |
| 105 | DEFCONFIG_m68k = virt_defconfig |
| 106 | DEFCONFIG_sh4 = rts7751r2dplus_defconfig |
| 107 | DEFCONFIG_openrisc = virt_defconfig |
| 108 | DEFCONFIG = $(or $(DEFCONFIG_$(XARCH)),defconfig) |
| 109 | |
| 110 | EXTRACONFIG_x32 = -e CONFIG_X86_X32_ABI |
| 111 | EXTRACONFIG_arm = -e CONFIG_NAMESPACES |
| 112 | EXTRACONFIG_armthumb = -e CONFIG_NAMESPACES |
| 113 | EXTRACONFIG_sparc32 = -e CONFIG_TMPFS |
| 114 | EXTRACONFIG_m68k = -e CONFIG_BLK_DEV_INITRD |
| 115 | EXTRACONFIG_sh4 = -e CONFIG_BLK_DEV_INITRD -e CONFIG_CMDLINE_FROM_BOOTLOADER |
| 116 | EXTRACONFIG_alpha = -e CONFIG_BLK_DEV_INITRD |
| 117 | EXTRACONFIG_parisc64 = -d CONFIG_COMPAT |
| 118 | EXTRACONFIG = $(EXTRACONFIG_$(XARCH)) |
| 119 | |
| 120 | # optional tests to run (default = all) |
| 121 | TEST = |
| 122 | |
| 123 | # QEMU_ARCH: arch names used by qemu |
| 124 | QEMU_ARCH_x32 = x86_64 |
| 125 | QEMU_ARCH_x86 = x86_64 |
| 126 | QEMU_ARCH_arm64 = aarch64 |
| 127 | QEMU_ARCH_armthumb = arm |
| 128 | QEMU_ARCH_mips32le = mipsel # works with malta_defconfig |
| 129 | QEMU_ARCH_mips32be = mips |
| 130 | QEMU_ARCH_mipsn32le = mips64el |
| 131 | QEMU_ARCH_mipsn32be = mips64 |
| 132 | QEMU_ARCH_mips64le = mips64el |
| 133 | QEMU_ARCH_mips64be = mips64 |
| 134 | QEMU_ARCH_ppc64le = ppc64 |
| 135 | QEMU_ARCH_loongarch = loongarch64 |
| 136 | QEMU_ARCH_sparc32 = sparc |
| 137 | QEMU_ARCH_openrisc = or1k |
| 138 | QEMU_ARCH_parisc32 = hppa |
| 139 | QEMU_ARCH_parisc64 = hppa |
| 140 | QEMU_ARCH = $(or $(QEMU_ARCH_$(XARCH)),$(XARCH)) |
| 141 | |
| 142 | QEMU_ARCH_USER_ppc64le = ppc64le |
| 143 | QEMU_ARCH_USER_mipsn32le = mipsn32el |
| 144 | QEMU_ARCH_USER_mipsn32be = mipsn32 |
| 145 | QEMU_ARCH_USER = $(or $(QEMU_ARCH_USER_$(XARCH)),$(QEMU_ARCH)) |
| 146 | |
| 147 | QEMU_BIOS_DIR = /usr/share/edk2/ |
| 148 | QEMU_BIOS_loongarch = $(QEMU_BIOS_DIR)/loongarch64/OVMF_CODE.fd |
| 149 | |
| 150 | ifneq ($(QEMU_BIOS_$(XARCH)),) |
| 151 | QEMU_ARGS_BIOS = -bios $(QEMU_BIOS_$(XARCH)) |
| 152 | endif |
| 153 | |
| 154 | # QEMU_ARGS : some arch-specific args to pass to qemu |
| 155 | QEMU_ARGS_i386 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 156 | QEMU_ARGS_x86_64 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 157 | QEMU_ARGS_x32 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 158 | QEMU_ARGS_x86 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 159 | QEMU_ARGS_arm64 = -M virt -cpu cortex-a53 -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 160 | QEMU_ARGS_arm = -M virt -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 161 | QEMU_ARGS_armthumb = -M virt -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 162 | QEMU_ARGS_mips32le = -M malta -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 163 | QEMU_ARGS_mips32be = -M malta -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 164 | QEMU_ARGS_mipsn32le = -M malta -cpu 5KEc -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 165 | QEMU_ARGS_mipsn32be = -M malta -cpu I6400 -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 166 | QEMU_ARGS_mips64le = -M malta -cpu I6400 -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 167 | QEMU_ARGS_mips64be = -M malta -cpu 5KEc -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 168 | QEMU_ARGS_ppc = -M g3beige -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 169 | QEMU_ARGS_ppc64 = -M powernv -append "console=hvc0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 170 | QEMU_ARGS_ppc64le = -M powernv -append "console=hvc0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 171 | QEMU_ARGS_riscv32 = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 172 | QEMU_ARGS_riscv64 = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 173 | QEMU_ARGS_s390x = -M s390-ccw-virtio -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 174 | QEMU_ARGS_loongarch = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 175 | QEMU_ARGS_sparc32 = -M SS-5 -m 256M -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 176 | QEMU_ARGS_sparc64 = -M sun4u -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 177 | QEMU_ARGS_m68k = -M virt -append "console=ttyGF0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 178 | QEMU_ARGS_sh4 = -M r2d -serial file:/dev/stdout -append "console=ttySC1,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 179 | QEMU_ARGS_openrisc = -M virt -m 512M -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 180 | QEMU_ARGS_parisc32 = -M B160L -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 181 | QEMU_ARGS_parisc64 = -M C3700 -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 182 | QEMU_ARGS_alpha = -M clipper -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" |
| 183 | QEMU_ARGS = -m 1G $(QEMU_ARGS_$(XARCH)) $(QEMU_ARGS_BIOS) $(QEMU_ARGS_EXTRA) |
| 184 | |
| 185 | # OUTPUT is only set when run from the main makefile, otherwise |
| 186 | # it defaults to this nolibc directory. |
| 187 | OUTPUT ?= $(CURDIR)/ |
| 188 | |
| 189 | ifeq ($(V),1) |
| 190 | Q= |
| 191 | else |
| 192 | Q=@ |
| 193 | endif |
| 194 | |
| 195 | CFLAGS_i386 = $(call cc-option,-m32) |
| 196 | CFLAGS_x32 = -mx32 |
| 197 | CFLAGS_arm = -marm |
| 198 | CFLAGS_armthumb = -mthumb -march=armv6t2 |
| 199 | CFLAGS_parisc32 = -mfast-indirect-calls |
| 200 | CFLAGS_parisc64 = -Wl,--no-dynamic-linker -Wl,--entry=_start -O2 |
| 201 | CFLAGS_ppc = -m32 -mbig-endian -mno-vsx $(call cc-option,-mmultiple) |
| 202 | CFLAGS_ppc64 = -m64 -mbig-endian -mno-vsx $(call cc-option,-mmultiple) |
| 203 | CFLAGS_ppc64le = -m64 -mlittle-endian -mno-vsx $(call cc-option,-mabi=elfv2) |
| 204 | CFLAGS_s390x = -m64 |
| 205 | CFLAGS_mips32le = -EL -mabi=32 -fPIC |
| 206 | CFLAGS_mips32be = -EB -mabi=32 |
| 207 | CFLAGS_mipsn32le = -EL -mabi=n32 -fPIC -march=mips64r2 |
| 208 | CFLAGS_mipsn32be = -EB -mabi=n32 -march=mips64r6 |
| 209 | CFLAGS_mips64le = -EL -mabi=64 -march=mips64r6 |
| 210 | CFLAGS_mips64be = -EB -mabi=64 -march=mips64r2 |
| 211 | CFLAGS_loongarch = $(if $(LLVM),-fuse-ld=lld) |
| 212 | CFLAGS_sparc32 = $(call cc-option,-m32) -mcpu=v8 |
| 213 | CFLAGS_sh4 = -ml -m4 |
| 214 | # github.com/llvm/llvm-project/issues/216765 |
| 215 | CFLAGS_hexagon = -fno-sanitize=undefined |
| 216 | ifeq ($(origin XARCH),command line) |
| 217 | CFLAGS_XARCH = $(CFLAGS_$(XARCH)) |
| 218 | endif |
| 219 | |
| 220 | LDLIBS_ppc = $(if $(LLVM),,-lgcc) |
| 221 | LDLIBS_openrisc = $(if $(LLVM),,-lgcc) |
| 222 | LDLIBS = $(LDLIBS_$(XARCH)) |
| 223 | |
| 224 | include Makefile.include |
| 225 | |
| 226 | CFLAGS ?= $(CFLAGS_NOLIBC_TEST) $(CFLAGS_XARCH) $(CFLAGS_EXTRA) |
| 227 | LDFLAGS := |
| 228 | |
| 229 | # Modify CFLAGS based on LLVM= |
| 230 | include $(srctree)/tools/scripts/Makefile.include |
| 231 | |
| 232 | ifeq ($(ARCH),hexagon) |
| 233 | # tools/scripts/Makefile.include requires CROSS_COMPILE which does not exist for hexagon |
| 234 | CFLAGS += --target=hexagon-linux-musl |
| 235 | CLANG_CROSS_FLAGS += --target=hexagon-linux-musl |
| 236 | endif |
| 237 | |
| 238 | REPORT ?= awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{if (!f) printf("\n"); f++; print;} /\[SKIPPED\][\r]*$$/{s++} \ |
| 239 | /^Total number of errors:/{done++} \ |
| 240 | END{ printf("\n%3d test(s): %3d passed, %3d skipped, %3d failed => status: ", p+s+f, p, s, f); \ |
| 241 | if (f || !p || !done) printf("failure\n"); else printf("success\n");; \ |
| 242 | printf("\nSee all results in %s\n", ARGV[1]); }' |
| 243 | |
| 244 | # Execute the toplevel kernel Makefile |
| 245 | KBUILD_MAKE = $(MAKE) -C $(srctree) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) LLVM= |
| 246 | |
| 247 | help: |
| 248 | @echo "Supported targets under selftests/nolibc:" |
| 249 | @echo " all call the \"run\" target below" |
| 250 | @echo " help this help" |
| 251 | @echo " sysroot create the nolibc sysroot here (uses \$$ARCH)" |
| 252 | @echo " nolibc-test build the executable (uses \$$CC or \$$CROSS_COMPILE)" |
| 253 | @echo " libc-test build an executable using the compiler's default libc instead" |
| 254 | @echo " run-user runs the executable under QEMU (uses \$$XARCH, \$$TEST)" |
| 255 | @echo " initramfs.cpio prepare the initramfs archive with nolibc-test" |
| 256 | @echo " initramfs prepare the initramfs tree with nolibc-test" |
| 257 | @echo " defconfig create a fresh new default config (uses \$$XARCH)" |
| 258 | @echo " kernel (re)build the kernel (uses \$$XARCH, \$$CROSS_COMPILE)" |
| 259 | @echo " kernel-standalone (re)build the kernel with the initramfs (uses \$$XARCH, \$$CROSS_COMPILE)" |
| 260 | @echo " run runs the kernel in QEMU after building it (uses \$$XARCH, \$$TEST)" |
| 261 | @echo " rerun runs a previously prebuilt kernel in QEMU (uses \$$XARCH, \$$TEST)" |
| 262 | @echo " clean clean the sysroot, initramfs, build and output files" |
| 263 | @echo "" |
| 264 | @echo "The output file is \"run.out\". Test ranges may be passed using \$$TEST." |
| 265 | @echo "" |
| 266 | @echo "Currently using the following variables:" |
| 267 | @echo " ARCH = $(ARCH)" |
| 268 | @echo " XARCH = $(XARCH)" |
| 269 | @echo " CROSS_COMPILE = $(CROSS_COMPILE)" |
| 270 | @echo " CC = $(CC)" |
| 271 | @echo " OUTPUT = $(OUTPUT)" |
| 272 | @echo " TEST = $(TEST)" |
| 273 | @echo " QEMU_ARCH = $(if $(QEMU_ARCH),$(QEMU_ARCH),UNKNOWN_ARCH) [determined from \$$XARCH]" |
| 274 | @echo " IMAGE_NAME = $(if $(IMAGE_NAME),$(IMAGE_NAME),UNKNOWN_ARCH) [determined from \$$XARCH]" |
| 275 | @echo "" |
| 276 | |
| 277 | all: run |
| 278 | |
| 279 | sysroot: sysroot/$(ARCH)/include |
| 280 | |
| 281 | sysroot/$(ARCH)/include: |
| 282 | $(Q)rm -rf sysroot/$(ARCH) sysroot/sysroot |
| 283 | $(QUIET_MKDIR)mkdir -p sysroot |
| 284 | $(Q)$(MAKE) -C $(srctree) outputmakefile |
| 285 | $(Q)$(MAKE) -C $(srctree)/tools/include/nolibc ARCH=$(ARCH) OUTPUT=$(CURDIR)/sysroot/ headers_standalone headers_check |
| 286 | $(Q)mv sysroot/sysroot sysroot/$(ARCH) |
| 287 | |
| 288 | nolibc-test: $(NOLIBC_TEST_SOURCES) sysroot/$(ARCH)/include |
| 289 | $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ \ |
| 290 | -nostdlib -nostdinc -static -Isysroot/$(ARCH)/include $(NOLIBC_TEST_SOURCES) $(LDLIBS) |
| 291 | |
| 292 | libc-test: $(NOLIBC_TEST_SOURCES) |
| 293 | $(QUIET_CC)$(HOSTCC) -o $@ $(NOLIBC_TEST_SOURCES) |
| 294 | |
| 295 | # local libc-test |
| 296 | run-libc-test: libc-test |
| 297 | $(Q)./libc-test > "$(CURDIR)/run.out" || : |
| 298 | $(Q)$(REPORT) $(CURDIR)/run.out |
| 299 | |
| 300 | # local nolibc-test |
| 301 | run-nolibc-test: nolibc-test |
| 302 | $(Q)./nolibc-test > "$(CURDIR)/run.out" || : |
| 303 | $(Q)$(REPORT) $(CURDIR)/run.out |
| 304 | |
| 305 | # qemu user-land test |
| 306 | run-user: nolibc-test |
| 307 | $(Q)qemu-$(QEMU_ARCH_USER) ./nolibc-test > "$(CURDIR)/run.out" || : |
| 308 | $(Q)$(REPORT) $(CURDIR)/run.out |
| 309 | |
| 310 | initramfs.cpio: kernel nolibc-test |
| 311 | $(QUIET_GEN)echo 'file /init nolibc-test 755 0 0' | $(objtree)/usr/gen_init_cpio - > initramfs.cpio |
| 312 | |
| 313 | initramfs: nolibc-test |
| 314 | $(QUIET_MKDIR)mkdir -p initramfs |
| 315 | $(call QUIET_INSTALL, initramfs/init) |
| 316 | $(Q)cp nolibc-test initramfs/init |
| 317 | |
| 318 | defconfig: |
| 319 | $(Q)$(KBUILD_MAKE) $(DEFCONFIG) |
| 320 | $(Q)if [ -n "$(EXTRACONFIG)" ]; then \ |
| 321 | $(srctree)/scripts/config --file $(objtree)/.config $(EXTRACONFIG); \ |
| 322 | $(KBUILD_MAKE) olddefconfig < /dev/null; \ |
| 323 | fi |
| 324 | |
| 325 | kernel: |
| 326 | $(Q)$(KBUILD_MAKE) $(IMAGE_NAME) < /dev/null |
| 327 | |
| 328 | kernel-standalone: initramfs |
| 329 | $(Q)$(KBUILD_MAKE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=$(CURDIR)/initramfs < /dev/null |
| 330 | |
| 331 | # run the tests after building the kernel |
| 332 | run: kernel initramfs.cpio |
| 333 | $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(IMAGE)" -initrd initramfs.cpio -serial file:/dev/stdout $(QEMU_ARGS) > "$(CURDIR)/run.out" |
| 334 | $(Q)$(REPORT) $(CURDIR)/run.out |
| 335 | |
| 336 | # re-run the tests from an existing kernel |
| 337 | rerun: |
| 338 | $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(IMAGE)" -initrd initramfs.cpio -serial file:/dev/stdout $(QEMU_ARGS) > "$(CURDIR)/run.out" |
| 339 | $(Q)$(REPORT) $(CURDIR)/run.out |
| 340 | |
| 341 | # report with existing test log |
| 342 | report: |
| 343 | $(Q)$(REPORT) $(CURDIR)/run.out |
| 344 | |
| 345 | clean: |
| 346 | $(call QUIET_CLEAN, sysroot) |
| 347 | $(Q)rm -rf sysroot |
| 348 | $(call QUIET_CLEAN, nolibc-test) |
| 349 | $(Q)rm -f nolibc-test |
| 350 | $(call QUIET_CLEAN, libc-test) |
| 351 | $(Q)rm -f libc-test |
| 352 | $(call QUIET_CLEAN, initramfs.cpio) |
| 353 | $(Q)rm -rf initramfs.cpio |
| 354 | $(call QUIET_CLEAN, initramfs) |
| 355 | $(Q)rm -rf initramfs |
| 356 | $(call QUIET_CLEAN, run.out) |
| 357 | $(Q)rm -rf run.out |
| 358 | |
| 359 | .PHONY: sysroot/$(ARCH)/include |