Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified archive/app2/build/fork_test.elf
Binary file not shown.
1,428 changes: 714 additions & 714 deletions archive/app2/build/fork_test.objdump

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion archive/app2/scripts/linker.ld
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SECTIONS
{
. = 0x200000;
. = 0x70000;
.text : { *(.text) }
.rodata : { *(.rodata) }
.data : { *(.data) }
Expand Down
31 changes: 31 additions & 0 deletions archive/app4/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.PHONY: all clean
CXX = aarch64-linux-gnu-gcc
CXXFLAGS = -Iinclude -Wall -ffreestanding -nostdinc -nostdlib -nostartfiles

LD = aarch64-linux-gnu-ld
LDFLAGS = -T scripts/linker.ld

OBJCOPY = aarch64-linux-gnu-objcopy
OBJDUMP = aarch64-linux-gnu-objdump
OBJCOPYFLAGS = -O binary

BUILD_DIR = build
ELF = vm.elf
IMG = vm.img
SRC = $(wildcard kernel/*.S) $(wildcard kernel/*.c)
OBJ = $(wildcard *.o)

all:
mkdir -p $(BUILD_DIR)
$(CXX) $(CXXFLAGS) -c -g $(SRC)
make user.img
$(OBJDUMP) -D $(BUILD_DIR)/$(ELF) > $(BUILD_DIR)/vm.objdump

user.img:
$(LD) $(LDFLAGS) -o $(BUILD_DIR)/$(ELF) $(OBJ)
$(OBJCOPY) $(OBJCOPYFLAGS) $(BUILD_DIR)/$(ELF) $(BUILD_DIR)/$(IMG)
rm $(OBJ)
cp $(BUILD_DIR)/$(IMG) ../rootfs/$(IMG)

make clean:
rm $(OBJ)
Binary file added archive/app4/build/vm.elf
Binary file not shown.
Binary file added archive/app4/build/vm.img
Binary file not shown.
Loading