@@ -26,7 +26,7 @@ ifeq ($(ARCH),aarch64)
26
26
else ifeq ($(ARCH),x86)
27
27
$(warning $(YELLOW)Incorrect architecture 'x86', using 'x86_64' instead $(NC))
28
28
ARCH := x86_64
29
- else ifeq ($(filter x86_64 arm64,$(ARCH)),)
29
+ else ifeq ($(filter x86_64 arm64 i386 ,$(ARCH)),)
30
30
$(error Invalid architecture $(ARCH))
31
31
endif
32
32
@@ -39,7 +39,7 @@ clean: linux_clean tools-vm_clean
39
39
.PHONY : help
40
40
help :
41
41
@echo ' $(GREEN)General Environment Variables:$(NC)'
42
- @echo ' ARCH - Specify one of the supported architectures: x86_64, arm64 (default: x86_64)'
42
+ @echo ' ARCH - Specify one of the supported architectures: x86_64, i386, arm64 (default: x86_64)'
43
43
@echo ' ACK - Set to 1 if building ACK instead of the Linux kernel. Does not need to be set for `ack` and `run-ack` targets (default: 0)'
44
44
@echo ' VERBOSE - Set to 1 to enable verbose output (default: 0)'
45
45
@echo ' '
@@ -139,6 +139,9 @@ LINUX_CONFIG := $(LINUX_OUT)/.config
139
139
ifeq ($(ARCH ) ,x86_64)
140
140
TARGET := x86_64-pc-linux-gnu
141
141
KERNEL_IMAGE := $(LINUX_OUT ) /arch/$(ARCH ) /boot/bzImage
142
+ else ifeq ($(ARCH),i386)
143
+ TARGET := i386-pc-linux-gnu
144
+ KERNEL_IMAGE := $(LINUX_OUT ) /arch/$(ARCH ) /boot/bzImage
142
145
else ifeq ($(ARCH),arm64)
143
146
TARGET := aarch64-linux-gnu
144
147
KERNEL_IMAGE := $(LINUX_OUT ) /arch/$(ARCH ) /boot/Image
@@ -382,7 +385,9 @@ ifeq ($(ARCH),x86_64)
382
385
ifneq ($(CI),true)
383
386
QEMU_ARGS += -accel kvm
384
387
endif
385
-
388
+ else ifeq ($(ARCH),i386)
389
+ QEMU_BIN := qemu-system-i386
390
+ QEMU_KERNEL_CMDLINE += console=ttyS0
386
391
else
387
392
QEMU_BIN := qemu-system-aarch64
388
393
QEMU_KERNEL_CMDLINE += console=ttyAMA0
0 commit comments