1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR
)/rules.mk
5 include $(ADK_TOPDIR
)/mk
/kernel-build.mk
6 include $(ADK_TOPDIR
)/mk
/image.mk
8 KERNEL
:=$(LINUX_DIR
)/arch
/loongarch
/boot
/vmlinux.efi
10 QEMU_ARGS
:=-M virt
-bios target
/loongarch
/QEMU_EFI.fd
-append
"console=ttyS0,115200"
14 ifeq ($(ADK_TARGET_FS
),archive
)
16 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
17 ifeq ($(ADK_TARGET_QEMU
),y
)
18 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
19 @echo
"Use following command to create a QEMU Image:"
20 @echo
"./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSUSERTARBALL)"
21 @echo
"Start qemu with following options:"
22 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
25 ifeq ($(ADK_TARGET_FS
),initramfs
)
27 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
28 @echo
'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
29 ifeq ($(ADK_TARGET_QEMU
),y
)
30 @echo
"Start qemu with following command line:"
31 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
34 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
36 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
37 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
39 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
41 @echo
'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
42 ifeq ($(ADK_TARGET_QEMU
),y
)
43 @echo
"Start qemu with following command line:"
44 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
50 kernel-install
: kernel-strip
51 @cp
$(KERNEL
) $(FW_DIR
)/$(TARGET_KERNEL
)
53 # filesystem specific targets
54 ifeq ($(ADK_TARGET_FS
),initramfs
)
55 imageinstall
: kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
57 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
58 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
60 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
61 imageinstall
: createinitramfs targethelp