Skip to content

Commit

Permalink
Add arm64 support for "make check"
Browse files Browse the repository at this point in the history
  • Loading branch information
yanjiew1 committed Jun 21, 2023
1 parent 0b87e05 commit a7d849b
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 5 deletions.
68 changes: 68 additions & 0 deletions configs/linux-aarch64.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# CONFIG_CROSS_MEMORY_ATTACH is not set
# CONFIG_CPU_ISOLATION is not set
CONFIG_BLK_DEV_INITRD=y
# CONFIG_RD_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
# CONFIG_RD_ZSTD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_MULTIUSER is not set
# CONFIG_SYSFS_SYSCALL is not set
# CONFIG_FHANDLE is not set
# CONFIG_POSIX_TIMERS is not set
# CONFIG_BUG is not set
# CONFIG_BASE_FULL is not set
# CONFIG_FUTEX is not set
# CONFIG_EPOLL is not set
# CONFIG_SIGNALFD is not set
# CONFIG_TIMERFD is not set
# CONFIG_EVENTFD is not set
# CONFIG_SHMEM is not set
# CONFIG_AIO is not set
# CONFIG_IO_URING is not set
# CONFIG_ADVISE_SYSCALLS is not set
# CONFIG_MEMBARRIER is not set
# CONFIG_KALLSYMS is not set
# CONFIG_RSEQ is not set
CONFIG_EMBEDDED=y
# CONFIG_UNMAP_KERNEL_AT_EL0 is not set
# CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set
# CONFIG_RODATA_FULL_DEFAULT_ENABLED is not set
# CONFIG_ARM64_TAGGED_ADDR_ABI is not set
# CONFIG_ARM64_SVE is not set
# CONFIG_EFI is not set
# CONFIG_SECCOMP is not set
# CONFIG_STACKPROTECTOR is not set
# CONFIG_VMAP_STACK is not set
# CONFIG_RANDOMIZE_KSTACK_OFFSET is not set
# CONFIG_COREDUMP is not set
CONFIG_PCI=y
CONFIG_PCI_HOST_GENERIC=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_ALLOW_DEV_COREDUMP is not set
# CONFIG_ARM_SMCCC_SOC_ID is not set
CONFIG_VIRTIO_BLK=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=1
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_HWMON is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_VIRTIO_PCI=y
# CONFIG_VHOST_MENU is not set
# CONFIG_SURFACE_PLATFORMS is not set
# CONFIG_IOMMU_SUPPORT is not set
CONFIG_EXT4_FS=y
# CONFIG_FILE_LOCKING is not set
# CONFIG_DNOTIFY is not set
# CONFIG_INOTIFY_USER is not set
# CONFIG_MISC_FILESYSTEMS is not set
# CONFIG_CRYPTO_HW is not set
# CONFIG_DEBUG_MISC is not set
# CONFIG_FTRACE is not set
# CONFIG_STRICT_DEVMEM is not set
File renamed without changes.
20 changes: 15 additions & 5 deletions mk/external.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,24 @@ EXTERNAL_SRC = LINUX BUSYBOX
$(foreach T,$(EXTERNAL_SRC),$(eval $(download-n-extract)))

# Build Linux kernel image
LINUX_IMG = $(OUT)/bzImage
ifeq ($(ARCH), x86_64)
LINUX_IMG_NAME = bzImage
LINUX_ARCH = x86
else ifeq ($(ARCH), aarch64)
LINUX_IMG_NAME = Image
LINUX_ARCH = arm64
else
$(error Unsupported architecture)
endif
LINUX_IMG = $(OUT)/$(LINUX_IMG_NAME)

$(LINUX_IMG): $(LINUX_SRC)
$(VECHO) "Configuring Linux kernel... "
$(Q)cp -f ${CONF}/linux.config $</.config
$(Q)(cd $< ; $(MAKE) ARCH=x86 olddefconfig $(REDIR)) && $(call notice, [OK])
$(Q)cp -f ${CONF}/linux-$(ARCH).config $</.config
$(Q)(cd $< ; $(MAKE) ARCH=$(LINUX_ARCH) olddefconfig $(REDIR)) && $(call notice, [OK])
$(VECHO) "Building Linux kernel image... "
$(Q)(cd $< ; $(MAKE) ARCH=x86 bzImage $(PARALLEL) $(REDIR))
$(Q)(cd $< ; cp -f arch/x86/boot/bzImage $(TOP)/$(OUT)) && $(call notice, [OK])
$(Q)(cd $< ; $(MAKE) ARCH=$(LINUX_ARCH) $(LINUX_IMG_NAME) $(PARALLEL) $(REDIR))
$(Q)(cd $< ; cp -f arch/$(LINUX_ARCH)/boot/$(LINUX_IMG_NAME) $(TOP)/$(OUT)) && $(call notice, [OK])

# Build busybox single binary
BUSYBOX_BIN = $(OUT)/rootfs/bin/busybox
Expand Down

0 comments on commit a7d849b

Please sign in to comment.