mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
pc-bios/s390-ccw: Add core files for the network bootloading program
This is just a preparation for the next steps: Add a makefile and a stripped down copy of pc-bios/s390-ccw/main.c as a basis for the network bootloader program, linked against the libc from SLOF already (which we will need for SLOF's libnet). The networking code is not included yet. Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1499863793-18627-10-git-send-email-thuth@redhat.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
parent
4bfd755ff3
commit
3e4415a751
3 changed files with 192 additions and 2 deletions
47
pc-bios/s390-ccw/netboot.mak
Normal file
47
pc-bios/s390-ccw/netboot.mak
Normal file
|
@ -0,0 +1,47 @@
|
|||
|
||||
SLOF_DIR := $(SRC_PATH)/roms/SLOF
|
||||
|
||||
NETOBJS := start.o sclp.o virtio.o netmain.o libc.a
|
||||
|
||||
LIBC_INC := -nostdinc -I$(SLOF_DIR)/lib/libc/include
|
||||
LIBNET_INC := -I$(SLOF_DIR)/lib/libnet
|
||||
|
||||
NETLDFLAGS := $(LDFLAGS) -Ttext=0x7800000
|
||||
|
||||
$(NETOBJS): QEMU_CFLAGS += $(LIBC_INC) $(LIBNET_INC)
|
||||
|
||||
s390-netboot.elf: $(NETOBJS)
|
||||
$(call quiet-command,$(CC) $(NETLDFLAGS) -o $@ $(NETOBJS),"BUILD","$(TARGET_DIR)$@")
|
||||
|
||||
s390-netboot.img: s390-netboot.elf
|
||||
$(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
|
||||
|
||||
# libc files:
|
||||
|
||||
LIBC_CFLAGS := $(QEMU_CFLAGS) $(LIBC_INC) $(LIBNET_INC)
|
||||
|
||||
CTYPE_OBJS = isdigit.o isxdigit.o toupper.o
|
||||
%.o : $(SLOF_DIR)/lib/libc/ctype/%.c
|
||||
$(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
|
||||
|
||||
STRING_OBJS = strcat.o strchr.o strcmp.o strcpy.o strlen.o strncmp.o strncpy.o \
|
||||
strstr.o memset.o memcpy.o memmove.o memcmp.o
|
||||
%.o : $(SLOF_DIR)/lib/libc/string/%.c
|
||||
$(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
|
||||
|
||||
STDLIB_OBJS = atoi.o atol.o strtoul.o strtol.o rand.o malloc.o free.o
|
||||
%.o : $(SLOF_DIR)/lib/libc/stdlib/%.c
|
||||
$(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
|
||||
|
||||
STDIO_OBJS = sprintf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \
|
||||
printf.o putc.o puts.o putchar.o stdchnls.o fileno.o
|
||||
%.o : $(SLOF_DIR)/lib/libc/stdio/%.c
|
||||
$(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
|
||||
|
||||
sbrk.o: $(SLOF_DIR)/slof/sbrk.c
|
||||
$(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
|
||||
|
||||
LIBCOBJS := $(STRING_OBJS) $(CTYPE_OBJS) $(STDLIB_OBJS) $(STDIO_OBJS) sbrk.o
|
||||
|
||||
libc.a: $(LIBCOBJS)
|
||||
$(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@")
|
Loading…
Add table
Add a link
Reference in a new issue