Compare commits
No commits in common. "4898684e3ca054035058883c8fc53132086bfc61" and "03c66042b2fc9892fb6801243ad92e3abfa81ceb" have entirely different histories.
4898684e3c
...
03c66042b2
16
aarch64.sh
16
aarch64.sh
@ -5,16 +5,15 @@ set -ex
|
|||||||
MACHINE=virt
|
MACHINE=virt
|
||||||
|
|
||||||
U_BOOT="build/u-boot/${MACHINE}.bin"
|
U_BOOT="build/u-boot/${MACHINE}.bin"
|
||||||
IMAGE="build/kernel_live.uimage"
|
|
||||||
case "${MACHINE}" in
|
case "${MACHINE}" in
|
||||||
raspi3)
|
raspi3)
|
||||||
U_BOOT_CONFIG=rpi_3_defconfig
|
U_BOOT_CONFIG=rpi_3_defconfig
|
||||||
LOAD_ADDR=0x00000000
|
LOAD_ADDR=0x00000000
|
||||||
ENTRY_ADDR=0x00001000
|
ENTRY_ADDR=0x00001000
|
||||||
IMAGE_ADDR=0x04000000
|
IMAGE_ADDR=0x01000000
|
||||||
QEMU_ARGS=(
|
QEMU_ARGS=(
|
||||||
-M raspi3
|
-M raspi3
|
||||||
-device "loader,file=${IMAGE},addr=${IMAGE_ADDR},force-raw=on"
|
-device "loader,file=build/kernel.uimage,addr=${IMAGE_ADDR},force-raw=on"
|
||||||
-kernel "${U_BOOT}"
|
-kernel "${U_BOOT}"
|
||||||
-nographic
|
-nographic
|
||||||
-serial null
|
-serial null
|
||||||
@ -26,13 +25,12 @@ case "${MACHINE}" in
|
|||||||
U_BOOT_CONFIG=qemu_arm64_defconfig
|
U_BOOT_CONFIG=qemu_arm64_defconfig
|
||||||
LOAD_ADDR=0x40000000
|
LOAD_ADDR=0x40000000
|
||||||
ENTRY_ADDR=0x40001000
|
ENTRY_ADDR=0x40001000
|
||||||
IMAGE_ADDR=0x44000000
|
IMAGE_ADDR=0x41000000
|
||||||
QEMU_ARGS=(
|
QEMU_ARGS=(
|
||||||
-M virt
|
-M virt
|
||||||
-m 1G
|
|
||||||
-cpu cortex-a57
|
-cpu cortex-a57
|
||||||
-bios "${U_BOOT}"
|
-bios "${U_BOOT}"
|
||||||
-device "loader,file=${IMAGE},addr=${IMAGE_ADDR},force-raw=on"
|
-device "loader,file=build/kernel.uimage,addr=${IMAGE_ADDR},force-raw=on"
|
||||||
-nographic
|
-nographic
|
||||||
-serial mon:stdio
|
-serial mon:stdio
|
||||||
-s
|
-s
|
||||||
@ -69,7 +67,6 @@ touch kernel/src/arch/aarch64/init/pre_kstart/early_init.S
|
|||||||
make build/kernel
|
make build/kernel
|
||||||
make build/initfs.tag
|
make build/initfs.tag
|
||||||
make build/filesystem.bin
|
make build/filesystem.bin
|
||||||
make build/kernel_live
|
|
||||||
|
|
||||||
mkimage \
|
mkimage \
|
||||||
-A arm64 \
|
-A arm64 \
|
||||||
@ -79,7 +76,8 @@ mkimage \
|
|||||||
-a "${LOAD_ADDR}" \
|
-a "${LOAD_ADDR}" \
|
||||||
-e "${ENTRY_ADDR}" \
|
-e "${ENTRY_ADDR}" \
|
||||||
-n "Redox kernel (qemu AArch64 ${MACHINE})" \
|
-n "Redox kernel (qemu AArch64 ${MACHINE})" \
|
||||||
-d build/kernel_live \
|
-d build/kernel \
|
||||||
"${IMAGE}"
|
build/kernel.uimage
|
||||||
|
|
||||||
qemu-system-aarch64 "${QEMU_ARGS[@]}" "$@"
|
qemu-system-aarch64 "${QEMU_ARGS[@]}" "$@"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ prompt = false
|
|||||||
|
|
||||||
# Package settings
|
# Package settings
|
||||||
[packages]
|
[packages]
|
||||||
#drivers = {}
|
drivers = {}
|
||||||
init = {}
|
init = {}
|
||||||
nulld = {}
|
nulld = {}
|
||||||
#pciids = {}
|
#pciids = {}
|
||||||
@ -21,21 +21,15 @@ path="/etc/init.rc"
|
|||||||
data="""
|
data="""
|
||||||
export PATH /bin
|
export PATH /bin
|
||||||
export TMPDIR /tmp
|
export TMPDIR /tmp
|
||||||
stdio debug:
|
|
||||||
echo Post stdio!
|
|
||||||
nulld
|
nulld
|
||||||
echo Post nulld!
|
|
||||||
zerod
|
zerod
|
||||||
echo Post zerod!
|
|
||||||
randd
|
randd
|
||||||
echo Post randd!
|
vesad T T G
|
||||||
# vesad T T G
|
stdio display:1
|
||||||
# ps2d us
|
ps2d us
|
||||||
ramfs logging
|
ramfs logging
|
||||||
echo Post ramfs!
|
pcid /etc/pcid/initfs.toml
|
||||||
# pcid /etc/pcid/initfs.toml
|
|
||||||
redoxfs disk/live: file
|
redoxfs disk/live: file
|
||||||
echo Post redoxfs!
|
|
||||||
cd file:
|
cd file:
|
||||||
export PATH file:/bin
|
export PATH file:/bin
|
||||||
run.d /etc/init.d
|
run.d /etc/init.d
|
||||||
|
@ -8,7 +8,7 @@ INSTALLER_FLAGS?=--cookbook=cookbook
|
|||||||
## Enabled to use binary prefix (much faster)
|
## Enabled to use binary prefix (much faster)
|
||||||
PREFIX_BINARY?=1
|
PREFIX_BINARY?=1
|
||||||
## Filesystem size in MB (256 is the default)
|
## Filesystem size in MB (256 is the default)
|
||||||
FILESYSTEM_SIZE?=48
|
FILESYSTEM_SIZE?=256
|
||||||
|
|
||||||
# Per host variables
|
# Per host variables
|
||||||
UNAME := $(shell uname)
|
UNAME := $(shell uname)
|
||||||
|
@ -10,11 +10,11 @@ build/filesystem.bin: filesystem.toml build/bootloader build/kernel prefix
|
|||||||
redoxfs/target/release/redoxfs $@.partial build/filesystem/
|
redoxfs/target/release/redoxfs $@.partial build/filesystem/
|
||||||
sleep 2
|
sleep 2
|
||||||
pgrep redoxfs
|
pgrep redoxfs
|
||||||
# TODO aarch64: cp $< build/filesystem/filesystem.toml
|
cp $< build/filesystem/filesystem.toml
|
||||||
# TODO aarch64: cp build/bootloader build/filesystem/bootloader
|
cp build/bootloader build/filesystem/bootloader
|
||||||
# TODO aarch64: cp build/kernel build/filesystem/kernel
|
cp build/kernel build/filesystem/kernel
|
||||||
# TODO aarch64: cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/include build/filesystem/include
|
cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/include build/filesystem/include
|
||||||
# TODO aarch64: cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/lib build/filesystem/lib
|
cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/lib build/filesystem/lib
|
||||||
$(INSTALLER) -c $< build/filesystem/
|
$(INSTALLER) -c $< build/filesystem/
|
||||||
sync
|
sync
|
||||||
-$(FUMOUNT) build/filesystem/ || true
|
-$(FUMOUNT) build/filesystem/ || true
|
||||||
|
12
mk/kernel.mk
12
mk/kernel.mk
@ -34,20 +34,10 @@ build/kernel_live: kernel/linkers/$(ARCH).ld build/libkernel_live.a build/live.o
|
|||||||
$(OBJCOPY) --only-keep-debug $@ $@.sym && \
|
$(OBJCOPY) --only-keep-debug $@ $@.sym && \
|
||||||
$(OBJCOPY) --strip-debug $@
|
$(OBJCOPY) --strip-debug $@
|
||||||
|
|
||||||
#TODO: More general use of $(ARCH)
|
|
||||||
ifeq ($(ARCH),aarch64)
|
|
||||||
build/live.o: build/filesystem.bin
|
|
||||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
|
||||||
$(OBJCOPY) -I binary -O elf64-littleaarch64 -B aarch64 $< $@ \
|
|
||||||
--redefine-sym _binary_build_filesystem_bin_start=__live_start \
|
|
||||||
--redefine-sym _binary_build_filesystem_bin_end=__live_end \
|
|
||||||
--redefine-sym _binary_build_filesystem_bin_size=__live_size
|
|
||||||
endif
|
|
||||||
ifeq ($(ARCH),x86_64)
|
|
||||||
build/live.o: build/filesystem.bin
|
build/live.o: build/filesystem.bin
|
||||||
|
#TODO: More general use of $(ARCH)
|
||||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||||
$(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 $< $@ \
|
$(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 $< $@ \
|
||||||
--redefine-sym _binary_build_filesystem_bin_start=__live_start \
|
--redefine-sym _binary_build_filesystem_bin_start=__live_start \
|
||||||
--redefine-sym _binary_build_filesystem_bin_end=__live_end \
|
--redefine-sym _binary_build_filesystem_bin_end=__live_end \
|
||||||
--redefine-sym _binary_build_filesystem_bin_size=__live_size
|
--redefine-sym _binary_build_filesystem_bin_size=__live_size
|
||||||
endif
|
|
||||||
|
Reference in New Issue
Block a user