2005-06-30 Marco Gerards <metgerards@student.han.nl>
* configure.ac: Fix the test for cross-compiling. * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't define GRUB_UTIL anymore. * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes so this function works on other systems than just big endian. (load_modules): Likewise. (add_segments): Likewise.
This commit is contained in:
parent
e75d76e157
commit
121c1d832e
6 changed files with 162 additions and 182 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2005-06-30 Marco Gerards <metgerards@student.han.nl>
|
||||
|
||||
* configure.ac: Fix the test for cross-compiling.
|
||||
|
||||
* genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
|
||||
define GRUB_UTIL anymore.
|
||||
|
||||
* util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
|
||||
so this function works on other systems than just big endian.
|
||||
(load_modules): Likewise.
|
||||
(add_segments): Likewise.
|
||||
|
||||
2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
|
||||
|
||||
* kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
|
||||
|
|
|
@ -499,197 +499,197 @@ CLEANFILES += grubof grubof-boot_powerpc_ieee1275_crt0.o grubof-boot_powerpc_iee
|
|||
MOSTLYCLEANFILES += grubof-boot_powerpc_ieee1275_crt0.d grubof-boot_powerpc_ieee1275_cmain.d grubof-boot_powerpc_ieee1275_ieee1275.d grubof-kern_main.d grubof-kern_device.d grubof-kern_disk.d grubof-kern_dl.d grubof-kern_file.d grubof-kern_fs.d grubof-kern_err.d grubof-kern_misc.d grubof-kern_mm.d grubof-kern_loader.d grubof-kern_rescue.d grubof-kern_term.d grubof-kern_powerpc_ieee1275_init.d grubof-term_powerpc_ieee1275_ofconsole.d grubof-kern_powerpc_ieee1275_openfw.d grubof-disk_powerpc_ieee1275_ofdisk.d grubof-kern_partition.d grubof-kern_env.d grubof-kern_powerpc_dl.d grubof-grubof_symlist.d grubof-kern_powerpc_cache.d
|
||||
|
||||
grubof: grubof-boot_powerpc_ieee1275_crt0.o grubof-boot_powerpc_ieee1275_cmain.o grubof-boot_powerpc_ieee1275_ieee1275.o grubof-kern_main.o grubof-kern_device.o grubof-kern_disk.o grubof-kern_dl.o grubof-kern_file.o grubof-kern_fs.o grubof-kern_err.o grubof-kern_misc.o grubof-kern_mm.o grubof-kern_loader.o grubof-kern_rescue.o grubof-kern_term.o grubof-kern_powerpc_ieee1275_init.o grubof-term_powerpc_ieee1275_ofconsole.o grubof-kern_powerpc_ieee1275_openfw.o grubof-disk_powerpc_ieee1275_ofdisk.o grubof-kern_partition.o grubof-kern_env.o grubof-kern_powerpc_dl.o grubof-grubof_symlist.o grubof-kern_powerpc_cache.o
|
||||
$(BUILD_CC) -o $@ $^ $(BUILD_LDFLAGS) $(grubof_LDFLAGS)
|
||||
$(CC) -o $@ $^ $(LDFLAGS) $(grubof_LDFLAGS)
|
||||
|
||||
grubof-boot_powerpc_ieee1275_crt0.o: boot/powerpc/ieee1275/crt0.S
|
||||
$(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-boot_powerpc_ieee1275_crt0.d: boot/powerpc/ieee1275/crt0.S
|
||||
set -e; $(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,crt0\.o[ :]*,grubof-boot_powerpc_ieee1275_crt0.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,crt0\.o[ :]*,grubof-boot_powerpc_ieee1275_crt0.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-boot_powerpc_ieee1275_crt0.d
|
||||
|
||||
grubof-boot_powerpc_ieee1275_cmain.o: boot/powerpc/ieee1275/cmain.c
|
||||
$(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-boot_powerpc_ieee1275_cmain.d: boot/powerpc/ieee1275/cmain.c
|
||||
set -e; $(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,cmain\.o[ :]*,grubof-boot_powerpc_ieee1275_cmain.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,cmain\.o[ :]*,grubof-boot_powerpc_ieee1275_cmain.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-boot_powerpc_ieee1275_cmain.d
|
||||
|
||||
grubof-boot_powerpc_ieee1275_ieee1275.o: boot/powerpc/ieee1275/ieee1275.c
|
||||
$(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-boot_powerpc_ieee1275_ieee1275.d: boot/powerpc/ieee1275/ieee1275.c
|
||||
set -e; $(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,ieee1275\.o[ :]*,grubof-boot_powerpc_ieee1275_ieee1275.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Iboot/powerpc/ieee1275 -I$(srcdir)/boot/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,ieee1275\.o[ :]*,grubof-boot_powerpc_ieee1275_ieee1275.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-boot_powerpc_ieee1275_ieee1275.d
|
||||
|
||||
grubof-kern_main.o: kern/main.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_main.d: kern/main.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,main\.o[ :]*,grubof-kern_main.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,main\.o[ :]*,grubof-kern_main.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_main.d
|
||||
|
||||
grubof-kern_device.o: kern/device.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_device.d: kern/device.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,device\.o[ :]*,grubof-kern_device.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,device\.o[ :]*,grubof-kern_device.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_device.d
|
||||
|
||||
grubof-kern_disk.o: kern/disk.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_disk.d: kern/disk.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,disk\.o[ :]*,grubof-kern_disk.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,disk\.o[ :]*,grubof-kern_disk.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_disk.d
|
||||
|
||||
grubof-kern_dl.o: kern/dl.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_dl.d: kern/dl.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,dl\.o[ :]*,grubof-kern_dl.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,dl\.o[ :]*,grubof-kern_dl.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_dl.d
|
||||
|
||||
grubof-kern_file.o: kern/file.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_file.d: kern/file.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,file\.o[ :]*,grubof-kern_file.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,file\.o[ :]*,grubof-kern_file.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_file.d
|
||||
|
||||
grubof-kern_fs.o: kern/fs.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_fs.d: kern/fs.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,fs\.o[ :]*,grubof-kern_fs.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,fs\.o[ :]*,grubof-kern_fs.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_fs.d
|
||||
|
||||
grubof-kern_err.o: kern/err.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_err.d: kern/err.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,err\.o[ :]*,grubof-kern_err.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,err\.o[ :]*,grubof-kern_err.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_err.d
|
||||
|
||||
grubof-kern_misc.o: kern/misc.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_misc.d: kern/misc.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,misc\.o[ :]*,grubof-kern_misc.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,misc\.o[ :]*,grubof-kern_misc.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_misc.d
|
||||
|
||||
grubof-kern_mm.o: kern/mm.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_mm.d: kern/mm.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,mm\.o[ :]*,grubof-kern_mm.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,mm\.o[ :]*,grubof-kern_mm.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_mm.d
|
||||
|
||||
grubof-kern_loader.o: kern/loader.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_loader.d: kern/loader.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,loader\.o[ :]*,grubof-kern_loader.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,loader\.o[ :]*,grubof-kern_loader.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_loader.d
|
||||
|
||||
grubof-kern_rescue.o: kern/rescue.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_rescue.d: kern/rescue.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,rescue\.o[ :]*,grubof-kern_rescue.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,rescue\.o[ :]*,grubof-kern_rescue.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_rescue.d
|
||||
|
||||
grubof-kern_term.o: kern/term.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_term.d: kern/term.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,term\.o[ :]*,grubof-kern_term.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,term\.o[ :]*,grubof-kern_term.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_term.d
|
||||
|
||||
grubof-kern_powerpc_ieee1275_init.o: kern/powerpc/ieee1275/init.c
|
||||
$(CC) -Ikern/powerpc/ieee1275 -I$(srcdir)/kern/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern/powerpc/ieee1275 -I$(srcdir)/kern/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_powerpc_ieee1275_init.d: kern/powerpc/ieee1275/init.c
|
||||
set -e; $(CC) -Ikern/powerpc/ieee1275 -I$(srcdir)/kern/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,init\.o[ :]*,grubof-kern_powerpc_ieee1275_init.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern/powerpc/ieee1275 -I$(srcdir)/kern/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,init\.o[ :]*,grubof-kern_powerpc_ieee1275_init.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_powerpc_ieee1275_init.d
|
||||
|
||||
grubof-term_powerpc_ieee1275_ofconsole.o: term/powerpc/ieee1275/ofconsole.c
|
||||
$(CC) -Iterm/powerpc/ieee1275 -I$(srcdir)/term/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Iterm/powerpc/ieee1275 -I$(srcdir)/term/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-term_powerpc_ieee1275_ofconsole.d: term/powerpc/ieee1275/ofconsole.c
|
||||
set -e; $(CC) -Iterm/powerpc/ieee1275 -I$(srcdir)/term/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,ofconsole\.o[ :]*,grubof-term_powerpc_ieee1275_ofconsole.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Iterm/powerpc/ieee1275 -I$(srcdir)/term/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,ofconsole\.o[ :]*,grubof-term_powerpc_ieee1275_ofconsole.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-term_powerpc_ieee1275_ofconsole.d
|
||||
|
||||
grubof-kern_powerpc_ieee1275_openfw.o: kern/powerpc/ieee1275/openfw.c
|
||||
$(CC) -Ikern/powerpc/ieee1275 -I$(srcdir)/kern/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern/powerpc/ieee1275 -I$(srcdir)/kern/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_powerpc_ieee1275_openfw.d: kern/powerpc/ieee1275/openfw.c
|
||||
set -e; $(CC) -Ikern/powerpc/ieee1275 -I$(srcdir)/kern/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,openfw\.o[ :]*,grubof-kern_powerpc_ieee1275_openfw.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern/powerpc/ieee1275 -I$(srcdir)/kern/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,openfw\.o[ :]*,grubof-kern_powerpc_ieee1275_openfw.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_powerpc_ieee1275_openfw.d
|
||||
|
||||
grubof-disk_powerpc_ieee1275_ofdisk.o: disk/powerpc/ieee1275/ofdisk.c
|
||||
$(CC) -Idisk/powerpc/ieee1275 -I$(srcdir)/disk/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Idisk/powerpc/ieee1275 -I$(srcdir)/disk/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-disk_powerpc_ieee1275_ofdisk.d: disk/powerpc/ieee1275/ofdisk.c
|
||||
set -e; $(CC) -Idisk/powerpc/ieee1275 -I$(srcdir)/disk/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,ofdisk\.o[ :]*,grubof-disk_powerpc_ieee1275_ofdisk.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Idisk/powerpc/ieee1275 -I$(srcdir)/disk/powerpc/ieee1275 $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,ofdisk\.o[ :]*,grubof-disk_powerpc_ieee1275_ofdisk.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-disk_powerpc_ieee1275_ofdisk.d
|
||||
|
||||
grubof-kern_partition.o: kern/partition.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_partition.d: kern/partition.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,partition\.o[ :]*,grubof-kern_partition.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,partition\.o[ :]*,grubof-kern_partition.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_partition.d
|
||||
|
||||
grubof-kern_env.o: kern/env.c
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_env.d: kern/env.c
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,env\.o[ :]*,grubof-kern_env.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,env\.o[ :]*,grubof-kern_env.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_env.d
|
||||
|
||||
grubof-kern_powerpc_dl.o: kern/powerpc/dl.c
|
||||
$(CC) -Ikern/powerpc -I$(srcdir)/kern/powerpc $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern/powerpc -I$(srcdir)/kern/powerpc $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_powerpc_dl.d: kern/powerpc/dl.c
|
||||
set -e; $(CC) -Ikern/powerpc -I$(srcdir)/kern/powerpc $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,dl\.o[ :]*,grubof-kern_powerpc_dl.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern/powerpc -I$(srcdir)/kern/powerpc $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,dl\.o[ :]*,grubof-kern_powerpc_dl.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_powerpc_dl.d
|
||||
|
||||
grubof-grubof_symlist.o: grubof_symlist.c
|
||||
$(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-grubof_symlist.d: grubof_symlist.c
|
||||
set -e; $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,grubof_symlist\.o[ :]*,grubof-grubof_symlist.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,grubof_symlist\.o[ :]*,grubof-grubof_symlist.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-grubof_symlist.d
|
||||
|
||||
grubof-kern_powerpc_cache.o: kern/powerpc/cache.S
|
||||
$(CC) -Ikern/powerpc -I$(srcdir)/kern/powerpc $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -c -o $@ $<
|
||||
$(CC) -Ikern/powerpc -I$(srcdir)/kern/powerpc $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $<
|
||||
|
||||
grubof-kern_powerpc_cache.d: kern/powerpc/cache.S
|
||||
set -e; $(CC) -Ikern/powerpc -I$(srcdir)/kern/powerpc $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grubof_CFLAGS) -M $< | sed 's,cache\.o[ :]*,grubof-kern_powerpc_cache.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
set -e; $(CC) -Ikern/powerpc -I$(srcdir)/kern/powerpc $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,cache\.o[ :]*,grubof-kern_powerpc_cache.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
|
||||
|
||||
-include grubof-kern_powerpc_cache.d
|
||||
|
||||
|
|
147
configure
vendored
147
configure
vendored
|
@ -951,7 +951,7 @@ esac
|
|||
else
|
||||
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
|
||||
fi
|
||||
cd $ac_popdir
|
||||
cd "$ac_popdir"
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -1986,8 +1986,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2045,8 +2044,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2162,8 +2160,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2217,8 +2214,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2263,8 +2259,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2308,8 +2303,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2399,8 +2393,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2429,8 +2422,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2500,8 +2492,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2553,8 +2544,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2625,8 +2615,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2678,8 +2667,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2756,8 +2744,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2820,8 +2807,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2938,8 +2924,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -2995,8 +2980,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -3072,8 +3056,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -3129,8 +3112,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -3186,8 +3168,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -3268,8 +3249,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -3325,8 +3305,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -4119,7 +4098,7 @@ fi
|
|||
|
||||
|
||||
# For cross-compiling.
|
||||
if test "x$build" = "x$host"; then
|
||||
if test "x$build" != "x$host"; then
|
||||
for ac_prog in gcc egcs cc
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
|
@ -4212,8 +4191,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -4255,8 +4233,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -4313,8 +4290,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -4690,8 +4666,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -4861,8 +4836,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -4927,8 +4901,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -4990,8 +4963,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5031,8 +5003,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5088,8 +5059,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5129,8 +5099,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5194,8 +5163,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5226,10 +5194,8 @@ See \`config.log' for more details." >&2;}
|
|||
esac
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
|
||||
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
|
@ -5341,8 +5307,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5404,8 +5369,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5445,8 +5409,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5502,8 +5465,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5543,8 +5505,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5608,8 +5569,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5640,10 +5600,8 @@ See \`config.log' for more details." >&2;}
|
|||
esac
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
|
||||
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
|
@ -5765,8 +5723,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5869,8 +5826,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -6732,11 +6688,6 @@ esac
|
|||
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
|
||||
esac
|
||||
|
||||
if test x"$ac_file" != x-; then
|
||||
{ echo "$as_me:$LINENO: creating $ac_file" >&5
|
||||
echo "$as_me: creating $ac_file" >&6;}
|
||||
rm -f "$ac_file"
|
||||
fi
|
||||
# Let's still pretend it is `configure' which instantiates (i.e., don't
|
||||
# use $as_me), people would be surprised to read:
|
||||
# /* config.h. Generated by config.status. */
|
||||
|
@ -6775,6 +6726,12 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
|
|||
fi;;
|
||||
esac
|
||||
done` || { (exit 1); exit 1; }
|
||||
|
||||
if test x"$ac_file" != x-; then
|
||||
{ echo "$as_me:$LINENO: creating $ac_file" >&5
|
||||
echo "$as_me: creating $ac_file" >&6;}
|
||||
rm -f "$ac_file"
|
||||
fi
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
sed "$ac_vpsub
|
||||
|
|
|
@ -109,7 +109,7 @@ AC_CHECK_TOOL(LD, ld)
|
|||
AC_PATH_PROG(RUBY, ruby)
|
||||
|
||||
# For cross-compiling.
|
||||
if test "x$build" = "x$host"; then
|
||||
if test "x$build" != "x$host"; then
|
||||
AC_CHECK_PROGS(BUILD_CC, [gcc egcs cc],
|
||||
[AC_MSG_ERROR([none of gcc, egcs and cc is found. set BUILD_CC manually.])])
|
||||
else
|
||||
|
|
6
genmk.rb
6
genmk.rb
|
@ -236,7 +236,7 @@ class Program
|
|||
MOSTLYCLEANFILES += #{deps_str}
|
||||
|
||||
#{@name}: #{objs_str}
|
||||
$(BUILD_CC) -o $@ $^ $(BUILD_LDFLAGS) $(#{prefix}_LDFLAGS)
|
||||
$(CC) -o $@ $^ $(LDFLAGS) $(#{prefix}_LDFLAGS)
|
||||
|
||||
" + objs.collect_with_index do |obj, i|
|
||||
src = sources[i]
|
||||
|
@ -245,11 +245,11 @@ MOSTLYCLEANFILES += #{deps_str}
|
|||
dir = File.dirname(src)
|
||||
|
||||
"#{obj}: #{src}
|
||||
$(CC) -I#{dir} -I$(srcdir)/#{dir} $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(#{prefix}_CFLAGS) -c -o $@ $<
|
||||
$(CC) -I#{dir} -I$(srcdir)/#{dir} $(CPPFLAGS) $(CFLAGS) $(#{prefix}_CFLAGS) -c -o $@ $<
|
||||
|
||||
#{dep}: #{src}
|
||||
set -e; \
|
||||
$(CC) -I#{dir} -I$(srcdir)/#{dir} $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(#{prefix}_CFLAGS) -M $< \
|
||||
$(CC) -I#{dir} -I$(srcdir)/#{dir} $(CPPFLAGS) $(CFLAGS) $(#{prefix}_CFLAGS) -M $< \
|
||||
| sed 's,#{Regexp.quote(fake_obj)}[ :]*,#{obj} $@ : ,g' > $@; \
|
||||
[ -s $@ ] || rm -f $@
|
||||
|
||||
|
|
|
@ -84,15 +84,16 @@ load_note (Elf32_Phdr *phdr, FILE *out)
|
|||
note.descriptor.load_base = grub_cpu_to_be32 (0x00004000);
|
||||
|
||||
/* Write the note data to the new segment. */
|
||||
grub_util_write_image_at (¬e, note_size, phdr->p_offset, out);
|
||||
grub_util_write_image_at (¬e, note_size,
|
||||
grub_be_to_cpu32 (phdr->p_offset), out);
|
||||
|
||||
/* Fill in the rest of the segment header. */
|
||||
phdr->p_type = PT_NOTE;
|
||||
phdr->p_flags = PF_R;
|
||||
phdr->p_align = sizeof (long);
|
||||
phdr->p_type = grub_cpu_to_be32 (PT_NOTE);
|
||||
phdr->p_flags = grub_cpu_to_be32 (PF_R);
|
||||
phdr->p_align = grub_cpu_to_be32 (sizeof (long));
|
||||
phdr->p_vaddr = 0;
|
||||
phdr->p_paddr = 0;
|
||||
phdr->p_filesz = note_size;
|
||||
phdr->p_filesz = grub_cpu_to_be32 (note_size);
|
||||
phdr->p_memsz = 0;
|
||||
}
|
||||
|
||||
|
@ -120,9 +121,9 @@ load_modules (Elf32_Phdr *phdr, const char *dir, char *mods[], FILE *out)
|
|||
|
||||
module_img = xmalloc (total_module_size);
|
||||
modinfo = (struct grub_module_info *) module_img;
|
||||
modinfo->magic = GRUB_MODULE_MAGIC;
|
||||
modinfo->offset = sizeof (struct grub_module_info);
|
||||
modinfo->size = total_module_size;
|
||||
modinfo->magic = grub_cpu_to_be32 (GRUB_MODULE_MAGIC);
|
||||
modinfo->offset = grub_cpu_to_be32 (sizeof (struct grub_module_info));
|
||||
modinfo->size = grub_cpu_to_be32 (total_module_size);
|
||||
|
||||
/* Load all the modules, with headers, into module_img. */
|
||||
for (p = path_list; p; p = p->next)
|
||||
|
@ -144,16 +145,17 @@ load_modules (Elf32_Phdr *phdr, const char *dir, char *mods[], FILE *out)
|
|||
}
|
||||
|
||||
/* Write the module data to the new segment. */
|
||||
grub_util_write_image_at (module_img, total_module_size, phdr->p_offset, out);
|
||||
grub_util_write_image_at (module_img, total_module_size,
|
||||
grub_cpu_to_be32 (phdr->p_offset), out);
|
||||
|
||||
/* Fill in the rest of the segment header. */
|
||||
phdr->p_type = PT_LOAD;
|
||||
phdr->p_flags = PF_R | PF_W | PF_X;
|
||||
phdr->p_align = sizeof (long);
|
||||
phdr->p_vaddr = GRUB_IEEE1275_MODULE_BASE;
|
||||
phdr->p_paddr = GRUB_IEEE1275_MODULE_BASE;
|
||||
phdr->p_filesz = total_module_size;
|
||||
phdr->p_memsz = total_module_size;
|
||||
phdr->p_type = grub_cpu_to_be32 (PT_LOAD);
|
||||
phdr->p_flags = grub_cpu_to_be32 (PF_R | PF_W | PF_X);
|
||||
phdr->p_align = grub_cpu_to_be32 (sizeof (long));
|
||||
phdr->p_vaddr = grub_cpu_to_be32 (GRUB_IEEE1275_MODULE_BASE);
|
||||
phdr->p_paddr = grub_cpu_to_be32 (GRUB_IEEE1275_MODULE_BASE);
|
||||
phdr->p_filesz = grub_cpu_to_be32 (total_module_size);
|
||||
phdr->p_memsz = grub_cpu_to_be32 (total_module_size);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -170,27 +172,33 @@ add_segments (char *dir, FILE *out, int chrp, char *mods[])
|
|||
in = fopen (kernel_path, "rb");
|
||||
if (! in)
|
||||
grub_util_error ("cannot open %s", kernel_path);
|
||||
|
||||
grub_util_read_at (&ehdr, sizeof (ehdr), 0, in);
|
||||
|
||||
phdrs = xmalloc (ehdr.e_phentsize * (ehdr.e_phnum + 2));
|
||||
|
||||
phdrs = xmalloc (grub_be_to_cpu16 (ehdr.e_phentsize)
|
||||
* (grub_be_to_cpu16 (ehdr.e_phnum) + 2));
|
||||
/* Copy all existing segments. */
|
||||
for (i = 0; i < ehdr.e_phnum; i++)
|
||||
for (i = 0; i < grub_be_to_cpu16 (ehdr.e_phnum); i++)
|
||||
{
|
||||
char *segment_img;
|
||||
|
||||
phdr = phdrs + i;
|
||||
|
||||
/* Read segment header. */
|
||||
grub_util_read_at (phdr, sizeof (Elf32_Phdr), (ehdr.e_phoff
|
||||
+ (i * ehdr.e_phentsize)),
|
||||
grub_util_read_at (phdr, sizeof (Elf32_Phdr),
|
||||
(grub_be_to_cpu32 (ehdr.e_phoff)
|
||||
+ (i * grub_be_to_cpu16 (ehdr.e_phentsize))),
|
||||
in);
|
||||
grub_util_info ("copying segment %d, type %d", i, phdr->p_type);
|
||||
grub_util_info ("copying segment %d, type %d", i,
|
||||
grub_be_to_cpu32 (phdr->p_type));
|
||||
|
||||
/* Read segment data and write it to new file. */
|
||||
segment_img = xmalloc (phdr->p_filesz);
|
||||
grub_util_read_at (segment_img, phdr->p_filesz, phdr->p_offset, in);
|
||||
grub_util_write_image_at (segment_img, phdr->p_filesz, phdr->p_offset, out);
|
||||
segment_img = xmalloc (grub_be_to_cpu32 (phdr->p_filesz));
|
||||
|
||||
grub_util_read_at (segment_img, grub_be_to_cpu32 (phdr->p_filesz),
|
||||
grub_be_to_cpu32 (phdr->p_offset), in);
|
||||
grub_util_write_image_at (segment_img, grub_be_to_cpu32 (phdr->p_filesz),
|
||||
grub_be_to_cpu32 (phdr->p_offset), out);
|
||||
|
||||
free (segment_img);
|
||||
}
|
||||
|
@ -198,11 +206,12 @@ add_segments (char *dir, FILE *out, int chrp, char *mods[])
|
|||
if (mods[0] != NULL)
|
||||
{
|
||||
/* Construct new segment header for modules. */
|
||||
phdr = phdrs + ehdr.e_phnum;
|
||||
ehdr.e_phnum++;
|
||||
phdr = phdrs + grub_be_to_cpu16 (ehdr.e_phnum);
|
||||
ehdr.e_phnum = grub_cpu_to_be16 (grub_be_to_cpu16 (ehdr.e_phnum) + 1);
|
||||
|
||||
/* Fill in p_offset so the callees know where to write. */
|
||||
phdr->p_offset = ALIGN_UP (grub_util_get_fp_size (out), sizeof (long));
|
||||
phdr->p_offset = grub_cpu_to_be32 (ALIGN_UP (grub_util_get_fp_size (out),
|
||||
sizeof (long)));
|
||||
|
||||
load_modules (phdr, dir, mods, out);
|
||||
}
|
||||
|
@ -210,11 +219,12 @@ add_segments (char *dir, FILE *out, int chrp, char *mods[])
|
|||
if (chrp)
|
||||
{
|
||||
/* Construct new segment header for the CHRP note. */
|
||||
phdr = phdrs + ehdr.e_phnum;
|
||||
ehdr.e_phnum++;
|
||||
phdr = phdrs + grub_be_to_cpu16 (ehdr.e_phnum);
|
||||
ehdr.e_phnum = grub_cpu_to_be16 (grub_be_to_cpu16 (ehdr.e_phnum) + 1);
|
||||
|
||||
/* Fill in p_offset so the callees know where to write. */
|
||||
phdr->p_offset = ALIGN_UP (grub_util_get_fp_size (out), sizeof (long));
|
||||
phdr->p_offset = grub_cpu_to_be32 (ALIGN_UP (grub_util_get_fp_size (out),
|
||||
sizeof (long)));
|
||||
|
||||
load_note (phdr, out);
|
||||
}
|
||||
|
@ -226,11 +236,12 @@ add_segments (char *dir, FILE *out, int chrp, char *mods[])
|
|||
|
||||
/* Append entire segment table to the file. */
|
||||
phdroff = ALIGN_UP (grub_util_get_fp_size (out), sizeof (long));
|
||||
grub_util_write_image_at (phdrs, ehdr.e_phentsize * ehdr.e_phnum, phdroff,
|
||||
grub_util_write_image_at (phdrs, grub_be_to_cpu16 (ehdr.e_phentsize)
|
||||
* grub_be_to_cpu16 (ehdr.e_phnum), phdroff,
|
||||
out);
|
||||
|
||||
/* Write ELF header. */
|
||||
ehdr.e_phoff = phdroff;
|
||||
ehdr.e_phoff = grub_cpu_to_be32 (phdroff);
|
||||
grub_util_write_image_at (&ehdr, sizeof (ehdr), 0, out);
|
||||
|
||||
free (phdrs);
|
||||
|
|
Loading…
Reference in a new issue