File: s390fw.mak

package info (click to toggle)
qemu 1%3A5.2%2Bdfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 201,372 kB
  • sloc: ansic: 2,327,506; pascal: 107,506; asm: 49,545; python: 40,498; sh: 35,286; cpp: 33,587; makefile: 15,209; perl: 6,965; xml: 3,028; objc: 1,460; php: 1,299; tcl: 1,070; yacc: 604; lex: 363; sql: 71; awk: 35; sed: 11
file content (49 lines) | stat: -rw-r--r-- 1,943 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Makefile for s390x qemu firmware, building two files:
# s390-ccw.img and s390-netboot.img
# Uses SLOF sources for netboot.

OUT =

S390X_CROSSPFX=s390x-linux-gnu-

LDFLAGS = -Wl,-pie -fPIE -nostdlib \
 -std=gnu99 -fwrapv -fno-common \
 -ffreestanding -fno-delete-null-pointer-checks -msoft-float \
 -march=z900 -fPIE -fno-strict-aliasing -fno-stack-protector \
 -fno-asynchronous-unwind-tables

all: ${OUT}s390-ccw.img ${OUT}s390-netboot.img

CCW_SRCS = start.S main.c bootmap.c jump2ipl.c sclp.c menu.c \
          virtio.c virtio-scsi.c virtio-blkdev.c libc.c cio.c dasd-ipl.c
CCW_FSRCS = $(addprefix pc-bios/s390-ccw/,${CCW_SRCS})

${OUT}s390-ccw.img: $(CCW_FSRCS)
	${S390X_CROSSPFX}gcc -o $@ ${LDFLAGS} $^
	${S390X_CROSSPFX}strip --strip-unneeded $@
	chmod -x $@

NETBOOT_SRCS = start.S sclp.c cio.c virtio.c virtio-net.c jump2ipl.c netmain.c
NETBOOT_FSRCS = $(addprefix pc-bios/s390-ccw/,${NETBOOT_SRCS})

SLOF = roms/SLOF
SLOFLIB = ${SLOF}/lib/libc/

SLOF_LIBSRCS = \
 $(addprefix ${SLOFLIB}ctype/,isdigit.c isxdigit.c toupper.c) \
 $(addprefix ${SLOFLIB}string/,strcat.c strchr.c strrchr.c strcpy.c strlen.c strncpy.c \
              strcmp.c strncmp.c strcasecmp.c strncasecmp.c strstr.c \
              memset.c memcpy.c memmove.c memcmp.c) \
 $(addprefix ${SLOFLIB}stdlib/,atoi.c atol.c strtoul.c strtol.c rand.c malloc.c free.c) \
 $(addprefix ${SLOFLIB}stdio/,sprintf.c snprintf.c vfprintf.c vsnprintf.c vsprintf.c fprintf.c \
             printf.c putc.c puts.c putchar.c stdchnls.c fileno.c) \
 ${SLOF}/slof/sbrk.c \
 $(addprefix ${SLOF}/lib/libnet/,args.c dhcp.c dns.c icmpv6.c ipv6.c tcp.c udp.c bootp.c \
              dhcpv6.c ethernet.c ipv4.c ndp.c tftp.c pxelinux.c) \

${OUT}s390-netboot.img: ${NETBOOT_FSRCS} ${SLOF_LIBSRCS}
	${S390X_CROSSPFX}gcc -o $@ ${LDFLAGS} -Ttext=0x7800000 \
	  -nostdinc -I${SLOFLIB}include -I${SLOF}/lib/libnet -DDHCPARCH=0x1F \
	  $^
	${S390X_CROSSPFX}strip --strip-unneeded $@
	chmod -x $@