Makefile.bootprogs revision 1.8
11.8Scgd# $NetBSD: Makefile.bootprogs,v 1.8 1999/04/02 03:11:57 cgd Exp $ 21.1Sthorpej 31.1SthorpejS= ${.CURDIR}/../../../.. 41.1Sthorpej 51.1Sthorpej.PATH: ${.CURDIR}/../common 61.1Sthorpej 71.4SlukemMKMAN= no 81.1SthorpejSTRIPFLAG= 91.1SthorpejBINMODE= 444 101.1Sthorpej 111.1SthorpejSTRIP?= strip 121.1Sthorpej 131.8ScgdCHECKSIZE_CMD= SIZE=${SIZE} sh ${.CURDIR}/../common/checksize.sh 141.8Scgd 151.1Sthorpej.PHONY: machine-links 161.1Sthorpejbeforedepend: machine-links 171.1Sthorpej# ${MACHINE} then ${MACHINE_ARCH} 181.1Sthorpejmachine-links: 191.1Sthorpej -rm -f machine && \ 201.1Sthorpej ln -s $S/arch/alpha/include machine 211.1Sthorpej -rm -f alpha && \ 221.1Sthorpej ln -s $S/arch/alpha/include alpha 231.1SthorpejCLEANFILES+=machine alpha 241.1Sthorpej 251.1Sthorpejall: machine-links ${PROG} 261.1Sthorpej 271.1SthorpejAFLAGS += -DASSEMBLER 281.1Sthorpej#CPPFLAGS+= -nostdinc -I${.OBJDIR} 291.1SthorpejCPPFLAGS+= -I${.OBJDIR} 301.1SthorpejCPPFLAGS += -D_STANDALONE -I${.CURDIR}/../.. -I${S} 311.8ScgdCFLAGS = ${CWARNFLAGS} -Os -mno-fp-regs -g 321.1Sthorpej 331.1Sthorpej# For descriptions of regions available to bootstrap programs, see 341.1Sthorpej# section 3.4.1.2 (pp. III 3-14 - III 3-18) of the second edition of 351.1Sthorpej# the Alpha AXP Architecture Reference Manual. 361.1Sthorpej 371.8ScgdREGION1_START= 0x20000000 # "Region 1 start" 381.8ScgdREGION1_SIZE!= expr 256 \* 1024 # 256k 391.8Scgd 401.8Scgd# our memory lauout: 411.8Scgd 421.8Scgd# 'unified' boot loaders (e.g. netboot) can consume all of region 431.8Scgd# 1 for their text+data, or text+data+bss. 441.8Scgd 451.8ScgdUNIFIED_LOAD_ADDRESS= ${REGION1_START} 461.8ScgdUNIFIED_MAX_LOAD!= expr ${REGION1_SIZE} 471.8ScgdUNIFIED_MAX_TOTAL!= expr ${REGION1_SIZE} 481.8Scgd 491.8Scgd#UNIFIED_HEAP_START= right after secondary bss 501.8ScgdUNIFIED_HEAP_LIMIT= (${REGION1_START} + ${REGION1_SIZE}) 511.8Scgd 521.8Scgd# two-stage boot loaders must share region 1. The first stage 531.8Scgd# loads into the lowest portion, and uses the higest portion 541.8Scgd# for its heap. The second stage loads in between the primary image 551.8Scgd# and the heap, and can reuse the memory after it (i.e. the primary's 561.8Scgd# heap) for its own heap. 571.8Scgd 581.8ScgdPRIMARY_LOAD_ADDRESS= ${REGION1_START} 591.8Scgd#PRIMARY_MAX_LOAD= booter dependent, no more than ${PRIMARY_MAX_TOTAL} 601.8ScgdPRIMARY_MAX_TOTAL!= expr 16 \* 1024 611.8Scgd 621.8Scgd# XXX SECONDARY_LOAD_ADDRESS should be 631.8Scgd# XXX (${PRIMARY_LOAD_ADDRESS} + ${PRIMARY_MAX_TOTAL}) bt there's no easy 641.8Scgd# XXX way to do that calculation and 'ld' wants a single number. 651.8ScgdSECONDARY_LOAD_ADDRESS= 0x20004000 # XXX 661.8ScgdSECONDARY_MAX_LOAD!= expr 112 \* 1024 671.8ScgdSECONDARY_MAX_TOTAL!= expr ${REGION1_SIZE} - ${PRIMARY_MAX_TOTAL} 681.8Scgd 691.8ScgdPRIMARY_HEAP_START= (${SECONDARY_LOAD_ADDRESS} + ${SECONDARY_MAX_LOAD}) 701.8ScgdPRIMARY_HEAP_LIMIT= (${REGION1_START} + ${REGION1_SIZE}) 711.8Scgd 721.8Scgd#SECONDARY_HEAP_START= right after secondary bss 731.8ScgdSECONDARY_HEAP_LIMIT= (${REGION1_START} + ${REGION1_SIZE}) 741.1Sthorpej 751.1SthorpejFILE_FORMAT_CPPFLAGS= -DALPHA_BOOT_ECOFF -DALPHA_BOOT_ELF 761.1Sthorpej 771.8ScgdUNIFIED_CPPFLAGS= -DUNIFIED_BOOTBLOCK \ 781.8Scgd -DHEAP_LIMIT="${UNIFIED_HEAP_LIMIT}" \ 791.8Scgd ${FILE_FORMAT_CPP_FLAGS} 801.8Scgd 811.8ScgdPRIMARY_CPPFLAGS= -DPRIMARY_BOOTBLOCK \ 821.8Scgd -DSECONDARY_LOAD_ADDRESS="${SECONDARY_LOAD_ADDRESS}" \ 831.8Scgd -DSECONDARY_MAX_LOAD="${SECONDARY_MAX_LOAD}" \ 841.8Scgd -DHEAP_LIMIT="${PRIMARY_HEAP_LIMIT}" \ 851.8Scgd -DHEAP_START="${PRIMARY_HEAP_START}" 861.8Scgd 871.8ScgdSECONDARY_CPPFLAGS= -DSECONDARY_BOOTBLOCK \ 881.8Scgd -DHEAP_LIMIT="${SECONDARY_HEAP_LIMIT}" \ 891.8Scgd ${FILE_FORMAT_CPP_FLAGS} 901.8Scgd 911.1Sthorpej.include <bsd.prog.mk> 921.1Sthorpej 931.1Sthorpej### find out what to use for libkern 941.1SthorpejKERN_AS= library 951.1Sthorpej.include "${S}/lib/libkern/Makefile.inc" 961.1SthorpejLIBKERN= ${KERNLIB} 971.1Sthorpej 981.1Sthorpej### find out what to use for libz 991.1SthorpejZ_AS= library 1001.1Sthorpej.include "${S}/lib/libz/Makefile.inc" 1011.1SthorpejLIBZ= ${ZLIB} 1021.1Sthorpej 1031.1Sthorpej### find out what to use for libsa 1041.1SthorpejSA_AS= library 1051.1Sthorpej.include "${S}/lib/libsa/Makefile.inc" 1061.1SthorpejLIBSA= ${SALIB} 107