summaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/netboot.mak
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-07-12 14:49:53 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2017-07-14 12:29:48 +0200
commit29d12216dae487a35f54141c6a397a64ec86cfe8 (patch)
treecf0370e9ea991e9667e75c457bdbfb507f499f77 /pc-bios/s390-ccw/netboot.mak
parent00dde1e60dd334b6a27b208132c9a57c36852ea1 (diff)
downloadqemu-29d12216dae487a35f54141c6a397a64ec86cfe8.tar.gz
pc-bios/s390-ccw: Link libnet into the netboot image and do the TFTP load
Most of the code has been taken from SLOF's netload.c file. Now we can finally load an image via TFTP and execute the downloaded kernel. Acked-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1499863793-18627-12-git-send-email-thuth@redhat.com> Tested-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'pc-bios/s390-ccw/netboot.mak')
-rw-r--r--pc-bios/s390-ccw/netboot.mak14
1 files changed, 13 insertions, 1 deletions
diff --git a/pc-bios/s390-ccw/netboot.mak b/pc-bios/s390-ccw/netboot.mak
index eb7043095b..a9e1374e97 100644
--- a/pc-bios/s390-ccw/netboot.mak
+++ b/pc-bios/s390-ccw/netboot.mak
@@ -1,7 +1,7 @@
SLOF_DIR := $(SRC_PATH)/roms/SLOF
-NETOBJS := start.o sclp.o virtio.o virtio-net.o netmain.o libc.a
+NETOBJS := start.o sclp.o virtio.o virtio-net.o netmain.o libnet.a libc.a
LIBC_INC := -nostdinc -I$(SLOF_DIR)/lib/libc/include
LIBNET_INC := -I$(SLOF_DIR)/lib/libnet
@@ -45,3 +45,15 @@ LIBCOBJS := $(STRING_OBJS) $(CTYPE_OBJS) $(STDLIB_OBJS) $(STDIO_OBJS) sbrk.o
libc.a: $(LIBCOBJS)
$(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@")
+
+# libnet files:
+
+LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \
+ dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o
+LIBNETCFLAGS := $(QEMU_CFLAGS) $(LIBC_INC) $(LIBNET_INC)
+
+%.o : $(SLOF_DIR)/lib/libnet/%.c
+ $(call quiet-command,$(CC) $(LIBNETCFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
+
+libnet.a: $(LIBNETOBJS)
+ $(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@")