mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-28 20:55:21 +00:00
Part 2 of the overlapping kzip changes.
Submitted by: Gary Jones(?) <gj@freefall>
This commit is contained in:
parent
a936507ae9
commit
c196603b4d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11252
|
@ -1,8 +1,10 @@
|
|||
# $Id: Makefile,v 1.2 1995/05/29 01:38:03 phk Exp $
|
||||
# $Id: Makefile,v 1.3 1995/08/15 19:36:02 joerg Exp $
|
||||
|
||||
PROG= kzip.o
|
||||
PROG= kztail.o kzhead.o
|
||||
BINMODE = 444 # target is a relocatable object
|
||||
SRCS= head.S boot.c unzip.c misc.c malloc.c inflate.c
|
||||
SRCS= tail.S head.S boot.c unzip.c misc.c malloc.c inflate.c
|
||||
OBJS_KZHEAD= head.o
|
||||
OBJS_KZTAIL= tail.o boot.o unzip.o misc.o malloc.o inflate.o
|
||||
BINDIR= /usr/lib
|
||||
.PATH: ${.CURDIR}/../../../kern
|
||||
NOMAN= toobad
|
||||
|
@ -13,12 +15,15 @@ KADDR = 0x100000
|
|||
# What segment our code lives in
|
||||
CSEG = 0x8
|
||||
|
||||
STRIP= # very important!! don't let kzip.o be stripped
|
||||
STRIP= # very important!! don't let kz*.o be stripped
|
||||
|
||||
CFLAGS+= -DKADDR=$(KADDR) -DCSEG=$(CSEG)
|
||||
CFLAGS+= -DKZIP -DCOMCONSOLE=0x3F8
|
||||
|
||||
kzip.o: ${OBJS}
|
||||
$(LD) -r -x -o kzip.o $(OBJS)
|
||||
kztail.o: ${OBJS_KZTAIL}
|
||||
$(LD) -r -x -o kztail.o $(OBJS_KZTAIL)
|
||||
|
||||
kzhead.o: ${OBJS_KZHEAD}
|
||||
$(LD) -r -x -o kzhead.o $(OBJS_KZHEAD)
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
/*
|
||||
* Boot unpacker startup routine.
|
||||
* Leader for kernel
|
||||
* This needs to be at the beginning, so the start address is passed
|
||||
* to the boot loader
|
||||
* Copyright (C) Serge Vakulenko
|
||||
*/
|
||||
.text
|
||||
start:
|
||||
.globl kzstart
|
||||
kzstart:
|
||||
cli # disable interrupts
|
||||
pushl 4(%esp) # pass howto arg
|
||||
call _boot # unpack the kernel image
|
||||
popl %eax # discard howto arg
|
||||
ljmp $CSEG, $KADDR # jump to unpacked kernel
|
||||
. = start + 0x500 # skip over warm boot shit
|
||||
call start # unpack the kernel image
|
||||
# never return here.
|
||||
. = kzstart + 0x500 # skip warm boot stuff
|
||||
|
|
12
sys/i386/boot/kzipboot/tail.S
Normal file
12
sys/i386/boot/kzipboot/tail.S
Normal file
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Boot unpacker startup routine.
|
||||
* Copyright (C) Serge Vakulenko
|
||||
*/
|
||||
.text
|
||||
.globl start
|
||||
start:
|
||||
popl %eax # remove return addr
|
||||
pushl 4(%esp) # pass howto arg
|
||||
call _boot # unpack the kernel image
|
||||
popl %eax # discard howto arg
|
||||
ljmp $CSEG, $KADDR # jump to unpacked kernel
|
Loading…
Reference in a new issue