2012-11-15 00:38:10 -05:00
|
|
|
DIRNAME := arch/i386
|
|
|
|
SUBDIRS := kernel
|
|
|
|
|
|
|
|
include $(BASEDIR)/header.mk
|
|
|
|
|
|
|
|
# Architecture-specific definitions
|
|
|
|
CROSS_COMPILE ?=
|
|
|
|
ARCH_KCFLAGS = -m32
|
|
|
|
ARCH_KLDFLAGS = -melf_i386
|
|
|
|
|
|
|
|
all: aedrix-boot.img
|
|
|
|
|
|
|
|
HD_IMAGE_SIZE := $(shell echo $$((4*1024*1024)))
|
|
|
|
HD_NUM_BLOCKS := $(shell echo $$(($(HD_IMAGE_SIZE)/4096)))
|
|
|
|
KERNEL_ARGS :=
|
|
|
|
aedrix-boot.img: aedrix-kernel.elf
|
|
|
|
@echo ' BUILD aedrix-boot.img'
|
|
|
|
$(V)dd if=/dev/zero of="$@" bs=4k count=$(HD_NUM_BLOCKS) 2>/dev/null
|
|
|
|
$(V)mkfs.vfat "$@" 1>/dev/null
|
|
|
|
$(V)syslinux "$@"
|
|
|
|
$(V)mcopy -i "$@" /usr/lib/syslinux/mboot.c32 ::mboot.c32
|
|
|
|
$(V)mcopy -i "$@" aedrix-kernel.elf ::kernel.bin
|
|
|
|
$(V)mcopy -i "$@" arch/i386/syslinux.cfg ::syslinux.cfg
|
|
|
|
|
2012-12-17 00:35:23 -05:00
|
|
|
OBJS_$(d) := $(d)/start.o
|
2012-11-15 00:38:10 -05:00
|
|
|
|
|
|
|
KOBJS += $(OBJS_$(d))
|
|
|
|
|
|
|
|
include $(BASEDIR)/footer.mk
|
|
|
|
|
|
|
|
ARCH_QEMU_CMD = qemu-system-i386 -m 1024
|