-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
104 changed files
with
22,874 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.DS_Store | ||
data-hp.h | ||
data-asus.h | ||
settings-hp.h | ||
setting-asus.h |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
export USE_APPLE_PB_SUPPORT = all | ||
|
||
# Makefile for kernel booter | ||
|
||
# CFLAGS = -O $(MORECPP) -arch i386 -g | ||
DEFINES= | ||
CONFIG = hd | ||
LIBDIR = libsa | ||
INC = -I. -I$(LIBDIR) | ||
ifneq "" "$(wildcard /bin/mkdirs)" | ||
MKDIRS = /bin/mkdirs | ||
else | ||
MKDIRS = /bin/mkdir -p | ||
endif | ||
AS = as | ||
LD = ld | ||
PAX = /bin/pax | ||
|
||
OBJROOT = `pwd`/obj | ||
SYMROOT = `pwd`/sym | ||
DSTROOT = `pwd`/dst | ||
SRCROOT = /tmp | ||
DOCROOT = `pwd`/doc | ||
IMGROOT = `pwd`/sym/cache | ||
IMGSKELROOT = `pwd`/imgskel | ||
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot | ||
|
||
THEME = default | ||
|
||
VERSION = `cat version` | ||
REVISION = `cat revision` | ||
PRODUCT = RevoBoot-$(VERSION)-r$(REVISION) | ||
CDLABEL = ${PRODUCT} | ||
ISOIMAGE = ${SYMROOT}/${CDLABEL}.iso | ||
|
||
EXCLUDE = --exclude=.svn --exclude=.DS_Store --exclude=sym --exclude=obj \ | ||
--exclude=package --exclude=archive --exclude=User_Guide_src --exclude=*.sh | ||
|
||
ARCHLESS_RC_CFLAGS=`echo $(RC_CFLAGS) | sed 's/-arch [a-z0-9]*//g'` | ||
|
||
VPATH = $(OBJROOT):$(SYMROOT) | ||
|
||
GENERIC_SUBDIRS = | ||
|
||
# | ||
# Currently builds for i386 | ||
# | ||
|
||
all embedtheme tags debug install installhdrs: $(SYMROOT) $(OBJROOT) | ||
@if [ -e ".svn" ]; then svnversion -n | tr -d [:alpha:] > revision; fi | ||
@if [ -z "$(RC_ARCHS)" ]; then \ | ||
RC_ARCHS="i386"; \ | ||
fi; \ | ||
SUBDIRS="$(GENERIC_SUBDIRS) $$RC_ARCHS"; \ | ||
for i in $$SUBDIRS; \ | ||
do \ | ||
if [ -d $$i ]; then \ | ||
echo ================= make $@ for $$i =================; \ | ||
( OBJROOT=$(OBJROOT)/$${i}; \ | ||
SYMROOT=$(SYMROOT)/$${i}; \ | ||
DSTROOT=$(DSTROOT); \ | ||
XCFLAGS=$(ARCHLESS_RC_CFLAGS); \ | ||
GENSUBDIRS="$(GENERIC_SUBDIRS)"; \ | ||
for x in $$GENSUBDIRS; \ | ||
do \ | ||
if [ "$$x" == "$$i" ]; then \ | ||
XCFLAGS="$(RC_CFLAGS)"; \ | ||
break; \ | ||
fi \ | ||
done; \ | ||
echo "$$OBJROOT $$SYMROOT $$DSTROOT"; \ | ||
cd $$i; ${MAKE} \ | ||
"OBJROOT=$$OBJROOT" \ | ||
"SYMROOT=$$SYMROOT" \ | ||
"DSTROOT=$$DSTROOT" \ | ||
"SRCROOT=$$SRCROOT" \ | ||
"RC_ARCHS=$$RC_ARCHS" \ | ||
"TARGET=$$i" \ | ||
"RC_KANJI=$(RC_KANJI)" \ | ||
"JAPANESE=$(JAPANESE)" \ | ||
"RC_CFLAGS=$$XCFLAGS" $@ \ | ||
) || exit $$?; \ | ||
else \ | ||
echo "========= nothing to build for $$i ========="; \ | ||
fi; \ | ||
done | ||
|
||
image: | ||
@if [ -e "$(SYMROOT)" ]; then \ | ||
rm -r -f ${IMGROOT}; \ | ||
mkdir -p ${IMGROOT}/usr/standalone/i386; \ | ||
if [ -e "$(IMGSKELROOT)" ]; then \ | ||
cp -R -f "${IMGSKELROOT}"/* "${IMGROOT}"; \ | ||
fi; \ | ||
cp -f ${SYMROOT}/i386/cdboot ${CDBOOT}; \ | ||
cp -f ${SYMROOT}/i386/boot ${IMGROOT}/usr/standalone/i386; \ | ||
cp -f ${SYMROOT}/i386/boot0 ${IMGROOT}/usr/standalone/i386; \ | ||
cp -f ${SYMROOT}/i386/boot1h ${IMGROOT}/usr/standalone/i386; \ | ||
cp -f ${SYMROOT}/i386/boot1f32 ${IMGROOT}/usr/standalone/i386;\ | ||
$(shell hdiutil makehybrid -iso -joliet -hfs -hfs-volume-name \ | ||
${CDLABEL} -eltorito-boot ${CDBOOT} -no-emul-boot -ov -o \ | ||
"${ISOIMAGE}" ${IMGROOT} -quiet) \ | ||
fi; | ||
|
||
pkg installer: embedtheme | ||
@if [ -e "$(SYMROOT)" ]; then \ | ||
sudo `pwd`/package/buildpkg `pwd`/sym/package; \ | ||
fi; | ||
|
||
release: $(SYMROOT) | ||
@if [ -e ".svn" ]; then svnversion -n | tr -d [:alpha:] > revision; fi | ||
@if [ -e "$(SYMROOT)" ]; then \ | ||
sudo `pwd`/package/buildpkg `pwd`/sym/package; \ | ||
fi; | ||
@tar -czf $(SYMROOT)/$(PRODUCT)-src.tar.gz ${EXCLUDE} . | ||
@tar -cjf $(SYMROOT)/$(PRODUCT)-src.tar.bz2 ${EXCLUDE} . | ||
|
||
clean: | ||
rm -rf sym obj dst | ||
|
||
#distclean: clean | ||
# @rm -f $(SYMROOT)/$(PRODUCT)-src.* | ||
# @rm -f $(SYMROOT)/$(PRODUCT).pkg | ||
|
||
installsrc: | ||
gnutar cf - . | (cd ${SRCROOT}; gnutar xpf -) | ||
|
||
$(SYMROOT) $(OBJROOT) $(DSTROOT): | ||
@$(MKDIRS) $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sudo cp sym/i386/boot /Volumes/HPBOOT/ | ||
sudo diskutil unmount /Volumes/HPBOOT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# | ||
# Common makefile targets. | ||
# | ||
# Define these variables (if desired) in directory makefiles: | ||
# DIRS_NEEDED | ||
# INSTALLDIR | ||
# SRCROOT | ||
# | ||
ifneq "" "$(wildcard /bin/mkdirs)" | ||
MKDIRS = /bin/mkdirs | ||
else | ||
MKDIRS = /bin/mkdir -p | ||
endif | ||
|
||
# Toggle this as to whether you want a frame pointer (%ebp) to be used. It is | ||
# invaluable for debugging the booter. For example using GDB attached to VMware. | ||
# In fact, it's so invaluable that it's now the default. Not only that but the | ||
# compiler seems to generate slightly smaller code and the real<->prot code | ||
# clearly handles it appropriately so I have no idea why Apple omitted it. | ||
#OMIT_FRAME_POINTER_CFLAG=-fomit-frame-pointer | ||
OMIT_FRAME_POINTER_CFLAG= | ||
|
||
installsrc:: $(SRCROOT) | ||
cp $(ALLSRC) $(SRCROOT) | ||
cd $(SRCROOT); chmod a-w $(ALLSRC) | ||
|
||
install:: installhdrs | ||
@if [ -z "$(RC_ARCHS)" -o -n "$(RC_i386)" ]; then \ | ||
$(MAKE) install_i386 OBJROOT=${OBJROOT} \ | ||
SYMROOT=${SYMROOT} DSTROOT=${DSTROOT} \ | ||
SRCROOT=${SRCROOT}; \ | ||
else \ | ||
echo i386 not selected - null build.; \ | ||
fi | ||
|
||
install_i386:: all | ||
|
||
installhdrs:: | ||
|
||
.SUFFIXES: .s .i .c .o | ||
|
||
.c.o .m.o: | ||
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \ | ||
-MD -dependency-file $(OBJROOT)/$*.d | ||
md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d | ||
|
||
$(OBJROOT)/%.o: %.c | ||
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \ | ||
-MD -dependency-file $(OBJROOT)/$*.d | ||
md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d | ||
|
||
$(OBJROOT)/%.o: %.m | ||
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \ | ||
-MD -dependency-file $(OBJROOT)/$*.d | ||
md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d | ||
|
||
#.s.o: | ||
# cc $(INC) -E $< > $(OBJROOT)/$*.o2 | ||
# $(AS) -o $(OBJROOT)/$@ $(OBJROOT)/$*.o2 | ||
|
||
.s.o: | ||
cc $(CPPFLAGS) -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $< | ||
|
||
boot2.o: | ||
cc $(CPPFLAGS) -Wa,-n -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) boot2.s | ||
|
||
$(OBJROOT)/%.o: %.s | ||
cc $(CPPFLAGS) -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $< | ||
|
||
$(DIRS_NEEDED) $(INSTALLDIR) $(SRCROOT): | ||
$(MKDIRS) $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# Default paths for subdirectories. | ||
# | ||
|
||
OBJROOT=../../obj/i386/$(DIR) | ||
SYMROOT=../../sym/i386 | ||
DSTROOT=../../dst/i386 | ||
SRCROOT=/tmp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
# Makefile for i386 boot program | ||
# define FLOPPY and SMALL using DEFINES macro as necessary | ||
|
||
CFLAGS = -O $(MORECPP) -arch i386 -g -static | ||
DEFINES= | ||
CONFIG = hd | ||
LIBDIR = libsa | ||
INC = -I. -I$(LIBDIR) | ||
ifneq "" "$(wildcard /bin/mkdirs)" | ||
MKDIRS = /bin/mkdirs | ||
else | ||
MKDIRS = /bin/mkdir -p | ||
endif | ||
AS = as | ||
LD = ld | ||
|
||
# | ||
# these paths are only valid in subdirectories of this directory | ||
# | ||
OBJROOT=`pwd`/../../obj/i386 | ||
SYMROOT=`pwd`/../../sym/i386 | ||
DSTROOT=`pwd`/../../dst/i386 | ||
SRCROOT=/tmp | ||
|
||
VPATH = $(OBJROOT):$(SYMROOT) | ||
|
||
# The order of building is important. | ||
SUBDIRS = util libsa libsaio boot2 | ||
|
||
all embedtheme tags debug install installhdrs: | ||
@for i in ${SUBDIRS}; \ | ||
do \ | ||
echo ================= make $@ for $$i =================; \ | ||
( cd $$i; ${MAKE} \ | ||
"OBJROOT=$(OBJROOT)/$$i" \ | ||
"SYMROOT=$(SYMROOT)" \ | ||
"DSTROOT=$(DSTROOT)" \ | ||
"SRCROOT=$(SRCROOT)" \ | ||
"RC_ARCHS=$(RC_ARCHS)" \ | ||
"RC_KANJI=$(RC_KANJI)" \ | ||
"JAPANESE=$(JAPANESE)" \ | ||
"RC_CFLAGS=$(RC_CFLAGS)" $@ \ | ||
) || exit $$?; \ | ||
done | ||
|
||
installsrc: | ||
tar cf - . | (cd ${SRCROOT}; tar xfBp -) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
|
||
# Makefile for i386 boot program | ||
# define FLOPPY and SMALL using DEFINES macro as necessary | ||
|
||
#PNGCRUSH = `which pngcrush` | ||
#PNGOPTIONS = -rem cHRM -rem gAMA -rem iCCP -rem sRGB | ||
|
||
DIR = boot2 | ||
include ../MakePaths.dir | ||
|
||
OPTIM = -Os -Oz | ||
CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ | ||
-fno-builtin -DSAIO_INTERNAL_USER -static $(OMIT_FRAME_POINTER_CFLAG) \ | ||
-mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ | ||
-march=pentium4 -msse2 -mfpmath=sse -msoft-float | ||
|
||
DEFINES= | ||
CONFIG = hd | ||
SYMDIR = $(SYMROOT) | ||
LIBSADIR = ../libsa | ||
LIBSAIODIR = ../libsaio | ||
UTILDIR = ../util | ||
#THEME = default | ||
#THEMEDIR = ../../artwork/themes/$(THEME) | ||
INC = -I. -I.. -I$(SYMDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) | ||
ifneq "" "$(wildcard /bin/mkdirs)" | ||
MKDIRS = /bin/mkdirs | ||
else | ||
MKDIRS = /bin/mkdir -p | ||
endif | ||
AS = as | ||
LD = gcc | ||
# LIBS= -lc_static | ||
LIBS= -L$(SYMDIR) -lsaio -lsa | ||
LIBDEP= $(SYMDIR)/libsaio.a $(SYMDIR)/libsa.a | ||
|
||
OTHER_FILES = | ||
|
||
INSTALLDIR = $(DSTROOT)/usr/standalone/i386 | ||
VPATH = $(OBJROOT):$(SYMROOT) | ||
|
||
# The ordering is important; | ||
# boot2.o must be first. | ||
#OBJS = boot2.o boot.o graphics.o drivers.o prompt.o options.o lzss.o mboot.o \ | ||
# ramdisk.o picopng.o resume.o bmdecompress.o graphic_utils.o gui.o | ||
# button.o browser.o scrollbar.o == NOTYET | ||
|
||
OBJS = boot2.o boot.o bootlogo.o graphics.o drivers.o options.o lzss.o | ||
|
||
UTILDIR = ../util | ||
SFILES = boot2.s | ||
|
||
#CFILES = boot.c graphics.c drivers.c prompt.c options.c mboot.c picopng.c | ||
CFILES = boot.c bootlogo.c graphics.c drivers.c options.c | ||
|
||
#HFILES = boot.h appleClut8.h appleboot.h mboot.h multiboot.h picopng.h | ||
HFILES = boot.h bootlogo.h | ||
|
||
OTHERFILES = Makefile | ||
ALLSRC = $(FOREIGNSRC) $(FOREIGNBIN) $(SFILES) $(CFILES) \ | ||
$(HFILES) $(OTHERFILES) | ||
DIRS_NEEDED = $(OBJROOT) $(SYMROOT) | ||
BOOT2ADDR = 20200 | ||
MAXBOOTSIZE = 392704 | ||
|
||
all: $(DIRS_NEEDED) boot | ||
|
||
embedtheme: CFLAGS += -DEMBED_THEME | ||
#embedtheme: art.h embedded.h all | ||
|
||
boot: machOconv $(OBJS) $(LIBDEP) | ||
$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \ | ||
-nostdlib -arch i386 -Wl,-segalign,20 \ | ||
-o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext | ||
machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot | ||
size $(SYMROOT)/boot.sys | ||
ls -l $(SYMROOT)/boot | ||
@( size=`ls -l $(SYMROOT)/boot | awk '{ print $$5}'` ; \ | ||
if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ;\ | ||
then \ | ||
echo "Booter executable larger than $(MAXBOOTSIZE) bytes" ;\ | ||
rm $(SYMROOT)/boot ;\ | ||
exit 1;\ | ||
fi) | ||
|
||
#prompt.o: vers.h | ||
#vers.h: | ||
# @echo "#define I386BOOT_VERSION \"5.0.132\"" > $(SYMROOT)/vers.h | ||
# @echo "#define I386BOOT_BUILDDATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $(SYMROOT)/vers.h | ||
# @echo "#define I386BOOT_CHAMELEONVERSION \"`cat ../../version`\"" >> $(SYMROOT)/vers.h | ||
# @echo "#define I386BOOT_CHAMELEONREVISION \"`svnversion -n | tr -d [:alpha:]`\"" >> $(SYMROOT)/vers.h | ||
|
||
#art.h: | ||
# @if [ "$(PNGCRUSH)" ]; then \ | ||
# echo "optimizing art files ...\n$(PNGCRUSH) $(PNGOPTIONS) artwork/$(THEME)"; \ | ||
# cd $(THEMEDIR) && find . -name '*.png' -exec $(PNGCRUSH) -q $(PNGOPTIONS) -d $(SYMROOT)/embed {} \;; \ | ||
# cp theme.plist $(SYMROOT)/embed; \ | ||
# else \ | ||
# cp -R $(THEMEDIR) $(SYMROOT)/embed; \ | ||
# fi; | ||
# @echo "#ifndef __BOOT2_ART_H" >> $(SYMROOT)/art.h | ||
# @echo "#define __BOOT2_ART_H" >> $(SYMROOT)/art.h | ||
# @cd $(SYMROOT)/embed && find . -name 'theme.plist' -exec xxd -i >> $(SYMROOT)/art.h {} \; | ||
# @cd $(SYMROOT)/embed && find . -name '*.png' -exec xxd -i >> $(SYMROOT)/art.h {} \; | ||
# @echo "#endif /* !__BOOT2_ART_H */" >> $(SYMROOT)/art.h ;\ | ||
# rm -rf $(SYMROOT)/embed ;\ | ||
#embedded.h: | ||
# @cd $(SYMROOT)/../../doc && xxd -i BootHelp.txt > $(SYMROOT)/embedded.h | ||
|
||
install_i386:: all $(INSTALLDIR) | ||
cp $(SYMROOT)/boot $(OTHER_FILES) $(INSTALLDIR) | ||
cd $(INSTALLDIR); chmod u+w boot $(OTHER_FILES) | ||
|
||
include ../MakeInc.dir | ||
|
||
#dependencies | ||
-include $(OBJROOT)/Makedep |
Oops, something went wrong.