From c1c3fdc79fab5b0d1572ea8f606c280b2df9676c Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sat, 14 Oct 2006 21:35:30 +0000 Subject: add ADLO to v2 git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2457 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/ADLO/Makefile | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 util/ADLO/Makefile (limited to 'util/ADLO/Makefile') diff --git a/util/ADLO/Makefile b/util/ADLO/Makefile new file mode 100644 index 0000000000..1533cf5601 --- /dev/null +++ b/util/ADLO/Makefile @@ -0,0 +1,110 @@ +#------------------------------------------------- +# $Id: Makefile,v 1.2 2003/05/22 12:52:38 aip Exp $ +#------------------------------------------------- + +ELF064=elf/elf-header-065kb.payload +ELF113=elf/elf-header-113kb.payload +ELF129=elf/elf-header-129kb.payload + +LOADER=loader.o + +BOCHS_R=bochs +BOCHS_B=bochs/bios +BOCHS_C=bochs/bochs-cvs +BOCHS_X=bochs/bochs-cvs/bochs/bios + +BIOS_R=${BOCHS_R}/rombios.bin +BIOS_B=${BOCHS_B}/rombios.bin +BIOS_X=${BOCHS_X}/rombios.bin + +PAYLOAD=payload + +BOCHSCVS=-d:pserver:anonymous@cvs.bochs.sourceforge.net:/cvsroot/bochs + +#------------------------------------------------- + +all: clean build #install + +#------------------------------------------------- + +epia: loader.o bios + cat ${ELF064} ${LOADER} ${BIOS_B} > ${PAYLOAD} +build: loader.o bios + cat ${ELF064} ${LOADER} ${BIOS_B} > ${PAYLOAD} + +#------------------------------------------------- + +loader.o: loader.s + as86 loader.s -b ${LOADER} + +#------------------------------------------------- + +bios: + ( cd ${BOCHS_B} ; make ) + sync + +#------------------------------------------------- + +#64kb -- sive of Video BIOS +# +#C=`echo 64*1024 | bc` +C=65536 + +#0xC0000 -- start of Video BIOS in ram. +#S=`echo -e "ibase=16 \n C0000" | bc` +# +# ELF header offset -- 0x1000 == 4096 +# +# 786432+4096 = 790528 +S=790528 + +videobios: + dd if=/proc/kcore of=./video.bios.bin bs=1 count=${C} skip=${S} + +# 0xF000+0x1000 +S2=987136 + +pcbios: + dd if=/proc/kcore of=./pc.bios.bin bs=1 count=${C} skip=${S2} + +pirq: pcbios + #grep -a "\$PIR" -B0 -A127 pc.bios.bin > pirq.bin + grep -a "\$PIR" -B0 -A0 pc.bios.bin > pirq.bin + +#now you have to hand edit the pirq.bin file + +#------------------------------------------------- + +bochslogin: + mkdir -p ${BOCHS_C} + echo "When prompted for a password, simply press the Enter key." + ( cd ${BOCHS_C} ; cvs ${BOCHSCVS} login ) + +bochsco: + mkdir -p ${BOCHS_C} + ( cd ${BOCHS_C} ; cvs ${BOCHSCVS} co bochs/bios ) + +bochsstat: + ( cd ${BOCHS_C} ; cvs ${BOCHSCVS} status bochs/bios/rombios.c ) + +bochsupdate: + ( cd ${BOCHS_C} ; cvs ${BOCHSCVS} update bochs/bios/rombios.c ) + + +#------------------------------------------------- + +install: + cp -abf ${PAYLOAD} /tftpboot/kernel + sync + +#------------------------------------------------- + +clean: + rm -rf *.o ${PAYLOAD} + (cd ${BOCHS_B} ; make clean ) + +distclean: clean + rm -rf ${BOCHS_C} + +#------------------------------------------------- + -- cgit v1.2.3