mirror of
https://github.com/tailix/kernel.git
synced 2024-11-13 11:14:07 -05:00
Add arch "none"
This commit is contained in:
parent
b087b44236
commit
fc0780a19f
4 changed files with 39 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -13,7 +13,8 @@ export MODULES = $(addprefix $(shell pwd)/modules/, dummy1.bin dummy2.bin)
|
|||
|
||||
run: run-iso
|
||||
|
||||
all: all-kernel all-iso all-libk all-arch all-test all-modules
|
||||
all: all-kernel
|
||||
|
||||
clean: clean-kernel clean-iso clean-libk clean-arch clean-test clean-modules
|
||||
|
||||
test: run-test
|
||||
|
@ -24,7 +25,6 @@ test: run-test
|
|||
|
||||
all-kernel: all-arch all-libk
|
||||
$(CC) -T $(LINKER) -o $(KERNEL) -ffreestanding -nostdlib -lgcc $(LIBARCH) $(LIBK)
|
||||
grub-file --is-x86-multiboot2 $(KERNEL)
|
||||
|
||||
clean-kernel:
|
||||
rm -f $(KERNEL)
|
||||
|
|
14
arch/none/Makefile
Normal file
14
arch/none/Makefile
Normal file
|
@ -0,0 +1,14 @@
|
|||
OUTPUT = libarch.a
|
||||
|
||||
OBJS = dummy.c.o
|
||||
|
||||
all: $(OUTPUT)
|
||||
|
||||
clean:
|
||||
rm -f $(OUTPUT) $(OBJS)
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
$(AR) -rcs $@ $(OBJS)
|
||||
|
||||
%.c.o: %.c
|
||||
$(CC) -c $< -o $@ -std=gnu99 -ffreestanding -nostdinc -fno-builtin -fno-stack-protector -Wall -Wextra -I "$(INCLUDE)"
|
0
arch/none/dummy.c
Normal file
0
arch/none/dummy.c
Normal file
23
arch/none/linker.ld
Normal file
23
arch/none/linker.ld
Normal file
|
@ -0,0 +1,23 @@
|
|||
SECTIONS
|
||||
{
|
||||
.text BLOCK(4K) : ALIGN(4K)
|
||||
{
|
||||
*(.text)
|
||||
}
|
||||
|
||||
.rodata BLOCK(4K) : ALIGN(4K)
|
||||
{
|
||||
*(.rodata)
|
||||
}
|
||||
|
||||
.data BLOCK(4K) : ALIGN(4K)
|
||||
{
|
||||
*(.data)
|
||||
}
|
||||
|
||||
.bss BLOCK(4K) : ALIGN(4K)
|
||||
{
|
||||
*(COMMON)
|
||||
*(.bss)
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue