mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-30 00:00:15 +01:00
create iso image for HermitCore applications
iso image will be mounted as CDROM in the virtual machine => seperate the creation of initrd from the HermitCore applications
This commit is contained in:
parent
cfee4d84b3
commit
471f8568ff
7 changed files with 2943 additions and 27 deletions
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
Makefile
|
||||
config.log
|
||||
config.status
|
||||
autom4te.cache
|
24
Makefile.in
Normal file
24
Makefile.in
Normal file
|
@ -0,0 +1,24 @@
|
|||
QEMU = @QEMU@ -machine accel=kvm -cpu host
|
||||
CROSSDIR = @CROSSDIR@
|
||||
JOBS = 20
|
||||
|
||||
default:
|
||||
make PATH=$(PATH):$(CROSSDIR) -C hermit
|
||||
make PATH=$(PATH):$(CROSSDIR) -C hermit/tools proxy
|
||||
|
||||
all: default
|
||||
make -j$(JOBS) -C linux
|
||||
|
||||
test:
|
||||
@echo "Nothing to test"
|
||||
|
||||
qemu:
|
||||
$(QEMU) -smp 20 -kernel linux/arch/x86/boot/bzImage -initrd config/initrd.cpio -append "root=/dev/ram0 rootfstype=ramfs init=init console=ttyS0 maxcpus=1" -net nic,model=rtl8139 -net user -net dump -nographic -monitor telnet:127.0.0.1:1234,server,nowait -m 8G -numa node,nodeid=0,cpus=0-4 -numa node,nodeid=1,cpus=5-9 -numa node,nodeid=2,cpus=10-14 -numa node,nodeid=3,cpus=15-19 -cdrom hermit/tools/proxy-image.iso
|
||||
|
||||
clean:
|
||||
make -C hermit clean
|
||||
|
||||
veryclean:
|
||||
make -C hermit veryclean
|
||||
|
||||
.PHONY: default all clean veryclean test
|
BIN
config/initrd.cpio
Normal file
BIN
config/initrd.cpio
Normal file
Binary file not shown.
23
configure.ac
Normal file
23
configure.ac
Normal file
|
@ -0,0 +1,23 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.69)
|
||||
AC_INIT(HermitCore, 0.1, slankes@eonerc.rwth-aachen.de, HermitCore, http://rwth-os.github.io/HermitCore/)
|
||||
AC_CHECK_PROGS(QEMU, qemu-system-x86_64)
|
||||
|
||||
# Checks for programs.
|
||||
|
||||
# Checks for libraries.
|
||||
|
||||
# Checks for header files.
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
# Checks for library functions.
|
||||
|
||||
cp config/linux_config linux/.config
|
||||
CROSSDIR=`pwd`/hermit/usr/x86/bin
|
||||
AC_SUBST(CROSSDIR)
|
||||
|
||||
AC_CONFIG_FILES(Makefile)
|
||||
AC_OUTPUT
|
|
@ -9,8 +9,6 @@ SUBDIRS = $(KERNDIRS)
|
|||
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags)
|
||||
TODAY := $(shell date +'%Y%m%d')
|
||||
INITRAMFS=../../busybox-1.23.2/initramfs/
|
||||
#QEMU = qemu-system-x86_64
|
||||
QEMU = qemu-kvm -cpu host
|
||||
|
||||
# Set your own cross compiler tool chain prefix here
|
||||
CROSSCOMPREFIX = x86_64-hermit-
|
||||
|
@ -34,18 +32,6 @@ READELF_FOR_TARGET = $(CROSSCOMPREFIX)readelf
|
|||
MAKE = make
|
||||
NASM = nasm
|
||||
NASMFLAGS = -felf64 -g -i$(TOPDIR)/include/hermit/
|
||||
GDB = $(CROSSCOMPREFIX)gdb
|
||||
GDBFLAGS = -x debug.gdb
|
||||
#QEMU = qemu-system-x86_64
|
||||
QEMU = qemu-kvm -cpu host
|
||||
QEMUFLAGS = -smp 2 -monitor stdio \
|
||||
-net nic,model=rtl8139 \
|
||||
-net user,hostfwd=tcp::12345-:7
|
||||
QEMUDEBUGFLAGS = -monitor none -daemonize \
|
||||
-net nic,model=rtl8139 \
|
||||
-net user,hostfwd=tcp::12345-:7
|
||||
QEMUSERIALFLAGS = -device pci-serial,chardev=tS0 \
|
||||
-chardev socket,host=localhost,port=4555,server,id=tS0
|
||||
|
||||
INCLUDE = -I$(TOPDIR)/include -I$(TOPDIR)/arch/$(ARCH)/include -I$(TOPDIR)/lwip/src/include -I$(TOPDIR)/lwip/src/include/ipv4 -I$(TOPDIR)/drivers
|
||||
# Compiler options for final code
|
||||
|
@ -125,17 +111,6 @@ veryclean: clean
|
|||
$Q$(MAKE) -C usr veryclean
|
||||
@echo Very cleaned
|
||||
|
||||
ramfs: hermit.elf
|
||||
make -C tools proxy
|
||||
touch initrd.cpio
|
||||
cp hermit.bin $(INITRAMFS)
|
||||
cp tools/*_proxy $(INITRAMFS)
|
||||
cd $(INITRAMFS); \
|
||||
find . -print0 | cpio --null -ov --format=newc > $(TOPDIR)/initrd.cpio
|
||||
|
||||
qemu:
|
||||
$(QEMU) -smp 20 -kernel ../linux/arch/x86/boot/bzImage -initrd initrd.cpio -append "root=/dev/ram0 rootfstype=ramfs init=init console=ttyS0 maxcpus=1" -net nic,model=rtl8139 -net user -net dump -nographic -monitor telnet:127.0.0.1:1234,server,nowait -m 8G -numa node,nodeid=0,cpus=0-4 -numa node,nodeid=1,cpus=5-9 -numa node,nodeid=2,cpus=10-14 -numa node,nodeid=3,cpus=15-19
|
||||
|
||||
doc:
|
||||
@echo Create documentation...
|
||||
@doxygen
|
||||
|
|
|
@ -45,16 +45,22 @@ initrd.img: $(INITRDFILES) make_initrd
|
|||
make_initrd: make_initrd.o
|
||||
$Q$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
|
||||
|
||||
proxy: $(PROXYFILES)
|
||||
iso:
|
||||
mkdir iso
|
||||
|
||||
proxy: iso $(PROXYFILES)
|
||||
@echo [PROXY] Create proxy files
|
||||
$Q./create_proxy.sh $(foreach FILE, $(PROXYFILES), $(FILE))
|
||||
$Qmv *_proxy iso/
|
||||
$Qcp ../hermit.bin iso
|
||||
$Qgenisoimage -R -J -o proxy-image.iso iso
|
||||
|
||||
clean:
|
||||
@echo Cleaning tools
|
||||
$Q$(RM) -rf *.o *~ *.bin *.obj *.h
|
||||
|
||||
veryclean: clean
|
||||
|
||||
@Q$(RM) -rf iso
|
||||
|
||||
depend:
|
||||
$(CC) -MM $(CFLAGS) *.c > Makefile.dep
|
||||
|
|
Loading…
Add table
Reference in a new issue