* [PATCH] Re-enable grub-extras
@ 2010-09-21 18:35 Colin Watson
2010-09-23 13:08 ` Colin Watson
0 siblings, 1 reply; 11+ messages in thread
From: Colin Watson @ 2010-09-21 18:35 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 5970 bytes --]
Here's a patch to re-enable grub-extras by allowing extra modules to
provide Autogen definitions files. A few things to note:
* I had to have autogen.sh create 'contrib' symlinks in the source
tree, as Automake got hopelessly confused when I had $(GRUB_CONTRIB)
in source file names - automatic dependency handling in particular
broke in some thoroughly tortuous ways. I don't think this is too
ugly but you might like to know why I did it!
* I added the facility for image blocks in .def files to override the
image extension, in order to translate ntldr-img's build system
reasonably faithfully.
* This patch supports extra modules providing either Makefile.core.def
(for extra target objects, built from grub-core) or
Makefile.util.def (for extra utility programs, built from the top
level). I don't have any examples of the latter right now, but it
was easy to provide both and might save somebody scratching their
head working out how to do it later.
* Extra modules may also provide Makefile.common with literal Automake
input, for those cases where it's too hard to cram things into
Autogen.
* I know we don't normally discuss grub-extras patches here, but it
seems difficult not to in this case. I've attached the patches
required for each of the five grub-extras modules I know about to
this mail.
* grldr.img used to have build rules but not actually be built
automatically; it's now built automatically. I didn't think it was
worth the contortions to try to fix this.
2010-09-21 Colin Watson <cjwatson@ubuntu.com>
Re-enable grub-extras.
* Makefile.am: Include Makefile.extras.am.
* grub-core/Makefile.am: Likewise.
* autogen.sh: Create symlinks to ${GRUB_CONTRIB} if necessary to
avoid confusing Automake. Run autogen for each extra module.
* .bzrignore: Add Makefile.extras.am, contrib,
grub-core/Makefile.extras.am, and grub-core/contrib.
* gentpl.py (image): Allow definitions files to override the image
extension.
=== modified file '.bzrignore'
--- .bzrignore 2010-09-20 13:03:47 +0000
+++ .bzrignore 2010-09-21 18:05:33 +0000
@@ -104,9 +104,13 @@ grub-core/lib/libgcrypt-grub
**/.deps-core
**/.dirstamp
Makefile.util.am
+Makefile.extras.am
+contrib
grub-core/Makefile.core.am
grub-core/Makefile.gcry.am
grub-core/Makefile.gcry.def
+grub-core/Makefile.extras.am
+grub-core/contrib
grub-core/genmod.sh
grub-core/gensyminfo.sh
grub-core/*.module
=== modified file 'Makefile.am'
--- Makefile.am 2010-09-20 12:55:49 +0000
+++ Makefile.am 2010-09-21 13:18:03 +0000
@@ -19,6 +19,7 @@ CPPFLAGS_PROGRAM += $(CPPFLAGS_GNULIB)
CCASFLAGS_PROGRAM += $(CCASFLAGS_GNULIB)
include $(srcdir)/Makefile.util.am
+include $(srcdir)/Makefile.extras.am
# XXX Use Automake's LEX & YACC support
grub_script.tab.h: $(top_srcdir)/grub-core/script/parser.y
=== modified file 'autogen.sh'
--- autogen.sh 2010-08-23 08:37:29 +0000
+++ autogen.sh 2010-09-21 16:09:03 +0000
@@ -18,6 +18,37 @@ autogen -T Makefile.tpl Makefile.util.de
autogen -T Makefile.tpl grub-core/Makefile.core.def | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.core.am
autogen -T Makefile.tpl grub-core/Makefile.gcry.def | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.gcry.am
+# Automake doesn't like including files from a path outside the project.
+if [ "x${GRUB_CONTRIB}" != x ] && [ "x${GRUB_CONTRIB}" != xcontrib ]; then
+ rm -f contrib grub-core/contrib
+ ln -s "${GRUB_CONTRIB}" contrib
+ ln -s ../contrib grub-core/contrib
+fi
+
+> grub-core/Makefile.extras.am
+for extra in contrib/*/Makefile.core.def; do
+ if test -e "$extra"; then
+ extra_name="$(basename "$(dirname "$extra")")"
+ autogen -T Makefile.tpl "$extra" | sed -e '/^$/{N;/^\n$/D;}' > "contrib/$extra_name/Makefile.core.am"
+ if test -e "contrib/$extra_name/Makefile.common"; then
+ echo "include contrib/$extra_name/Makefile.common" >> grub-core/Makefile.extras.am
+ fi
+ echo "include contrib/$extra_name/Makefile.core.am" >> grub-core/Makefile.extras.am
+ fi
+done
+
+> Makefile.extras.am
+for extra in contrib/*/Makefile.util.def; do
+ if test -e "$extra"; then
+ extra_name="$(basename "$(dirname "$extra")")"
+ autogen -T Makefile.tpl "$extra" | sed -e '/^$/{N;/^\n$/D;}' > "contrib/$extra_name/Makefile.util.am"
+ if test -e "contrib/$extra_name/Makefile.common"; then
+ echo "include contrib/$extra_name/Makefile.common" >> Makefile.extras.am
+ fi
+ echo "include contrib/$extra_name/Makefile.util.am" >> Makefile.extras.am
+ fi
+done
+
echo "Saving timestamps..."
echo timestamp > stamp-h.in
=== modified file 'gentpl.py'
--- gentpl.py 2010-09-19 13:24:45 +0000
+++ gentpl.py 2010-09-21 17:35:56 +0000
@@ -328,9 +328,10 @@ def image(platform):
r += gvar_add("BUILT_SOURCES", "$(nodist_" + cname() + "_SOURCES)")
r += gvar_add("CLEANFILES", "$(nodist_" + cname() + "_SOURCES)")
- r += gvar_add("platform_DATA", "[+ name +].img")
- r += gvar_add("CLEANFILES", "[+ name +].img")
- r += rule("[+ name +].img", "[+ name +].image$(EXEEXT)", """
+ extension = "[+ IF extension defined +][+ extension +][+ ELSE +]img[+ ENDIF +]"
+ r += gvar_add("platform_DATA", "[+ name +]." + extension)
+ r += gvar_add("CLEANFILES", "[+ name +]." + extension)
+ r += rule("[+ name +]." + extension, "[+ name +].image$(EXEEXT)", """
if test x$(USE_APPLE_CC_FIXES) = xyes; then \
$(MACHO2IMG) $< $@; \
else \
=== modified file 'grub-core/Makefile.am'
--- grub-core/Makefile.am 2010-09-19 20:22:43 +0000
+++ grub-core/Makefile.am 2010-09-21 13:17:52 +0000
@@ -52,6 +52,7 @@ CLEANFILES += grub_script.yy.c grub_scri
include $(srcdir)/Makefile.core.am
include $(srcdir)/Makefile.gcry.am
+include $(srcdir)/Makefile.extras.am
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
--
Colin Watson [cjwatson@ubuntu.com]
[-- Attachment #2: 915resolution.patch --]
[-- Type: text/x-diff, Size: 1152 bytes --]
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2010-09-21 17:58:53 +0000
@@ -0,0 +1,3 @@
+**/.deps-core
+**/.dirstamp
+Makefile.core.am
=== added file 'Makefile.core.def'
--- Makefile.core.def 1970-01-01 00:00:00 +0000
+++ Makefile.core.def 2010-09-21 16:09:08 +0000
@@ -0,0 +1,8 @@
+AutoGen definitions Makefile.tpl;
+
+module = {
+ name = '915resolution';
+ i386_pc = 'contrib/915resolution/915resolution.c';
+ cflags = -Wno-error;
+ enable = i386_pc;
+};
=== removed directory 'conf'
=== removed file 'conf/common.rmk'
--- conf/common.rmk 2009-11-29 21:11:48 +0000
+++ conf/common.rmk 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-# -*- makefile -*-
--include $(GRUB_CONTRIB)/915resolution/conf/$(target_cpu)-$(platform).mk
=== removed file 'conf/i386-pc.rmk'
--- conf/i386-pc.rmk 2009-10-26 20:15:26 +0000
+++ conf/i386-pc.rmk 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-# -*- makefile -*-
-
-pkglib_MODULES += 915resolution.mod
-915resolution_mod_SOURCES = $(GRUB_CONTRIB)/915resolution/915resolution.c
-915resolution_mod_CFLAGS = $(COMMON_CFLAGS) -Wno-error
-915resolution_mod_LDFLAGS = $(COMMON_LDFLAGS)
[-- Attachment #3: gpxe.patch --]
[-- Type: text/x-diff, Size: 25806 bytes --]
=== modified file '.bzrignore'
--- .bzrignore 2009-12-22 00:12:41 +0000
+++ .bzrignore 2010-09-21 18:31:40 +0000
@@ -1 +1,3 @@
-conf/common.mk
+**/.deps-core
+**/.dirstamp
+Makefile.core.am
=== added file 'Makefile.common'
--- Makefile.common 1970-01-01 00:00:00 +0000
+++ Makefile.common 2010-09-21 17:44:16 +0000
@@ -0,0 +1,2 @@
+GPXE_CPPFLAGS = '-DFILE_LICENCE(x)=' -Icontrib/gpxe/src/include -Icontrib/gpxe/include_wrap
+GPXE_CFLAGS = -Wno-pointer-arith -Wno-error
=== added file 'Makefile.core.def'
--- Makefile.core.def 1970-01-01 00:00:00 +0000
+++ Makefile.core.def 2010-09-21 17:51:41 +0000
@@ -0,0 +1,431 @@
+AutoGen definitions Makefile.tpl;
+
+module = {
+ name = gpxe;
+ common = 'contrib/gpxe/wrap/wrap.c';
+ common = 'contrib/gpxe/wrap/pci.c';
+ common = 'contrib/gpxe/wrap/nic.c';
+ common = 'contrib/gpxe/src/net/80211/net80211.c';
+ common = 'contrib/gpxe/src/net/80211/rc80211.c';
+ common = 'contrib/gpxe/src/net/arp.c';
+ common = 'contrib/gpxe/src/net/dhcpopts.c';
+ common = 'contrib/gpxe/src/net/dhcppkt.c';
+ common = 'contrib/gpxe/src/net/ethernet.c';
+ common = 'contrib/gpxe/src/net/fakedhcp.c';
+ common = 'contrib/gpxe/src/net/icmp.c';
+ common = 'contrib/gpxe/src/net/iobpad.c';
+ common = 'contrib/gpxe/src/net/ipv4.c';
+ common = 'contrib/gpxe/src/net/netdevice.c';
+ common = 'contrib/gpxe/src/net/netdev_settings.c';
+ common = 'contrib/gpxe/src/net/nullnet.c';
+ common = 'contrib/gpxe/src/net/rarp.c';
+ common = 'contrib/gpxe/src/net/retry.c';
+ common = 'contrib/gpxe/src/net/tcp/http.c';
+ common = 'contrib/gpxe/src/net/tcp.c';
+ common = 'contrib/gpxe/src/net/tcpip.c';
+ common = 'contrib/gpxe/src/net/udp/dhcp.c';
+ common = 'contrib/gpxe/src/net/udp/dns.c';
+ common = 'contrib/gpxe/src/net/udp/slam.c';
+ common = 'contrib/gpxe/src/net/udp/tftp.c';
+ common = 'contrib/gpxe/src/net/udp.c';
+ common = 'contrib/gpxe/src/core/base64.c';
+ common = 'contrib/gpxe/src/core/nvo.c';
+ common = 'contrib/gpxe/src/core/uri.c';
+ common = 'contrib/gpxe/src/core/uuid.c';
+ common = 'contrib/gpxe/src/core/random.c';
+ common = 'contrib/gpxe/src/core/open.c';
+ common = 'contrib/gpxe/src/core/cwuri.c';
+ common = 'contrib/gpxe/src/core/linebuf.c';
+ common = 'contrib/gpxe/src/core/xfer.c';
+ common = 'contrib/gpxe/src/core/settings.c';
+ common = 'contrib/gpxe/src/core/iobuf.c';
+ common = 'contrib/gpxe/src/core/refcnt.c';
+ common = 'contrib/gpxe/src/core/bitmap.c';
+ common = 'contrib/gpxe/src/core/process.c';
+ common = 'contrib/gpxe/src/core/job.c';
+ common = 'contrib/gpxe/src/core/resolv.c';
+ common = 'contrib/gpxe/src/core/interface.c';
+ common = 'contrib/gpxe/src/core/basename.c';
+ common = 'contrib/gpxe/src/core/misc.c';
+ common = 'contrib/gpxe/src/hci/strerror.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_infiniband;
+ common = 'contrib/gpxe/src/net/infiniband/ib_cm.c';
+ common = 'contrib/gpxe/src/net/infiniband/ib_cmrc.c';
+ common = 'contrib/gpxe/src/net/infiniband/ib_mcast.c';
+ common = 'contrib/gpxe/src/net/infiniband/ib_mi.c';
+ common = 'contrib/gpxe/src/net/infiniband/ib_packet.c';
+ common = 'contrib/gpxe/src/net/infiniband/ib_pathrec.c';
+ common = 'contrib/gpxe/src/net/infiniband/ib_sma.c';
+ common = 'contrib/gpxe/src/net/infiniband/ib_smc.c';
+ common = 'contrib/gpxe/src/net/infiniband/ib_srp.c';
+ common = 'contrib/gpxe/src/net/infiniband.c';
+ common = 'contrib/gpxe/src/drivers/net/ipoib.c';
+ common = 'contrib/gpxe/src/drivers/block/scsi.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c529;
+ common = 'contrib/gpxe/src/drivers/net/3c529.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c595;
+ common = 'contrib/gpxe/src/drivers/net/3c595.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c5x9;
+ common = 'contrib/gpxe/src/drivers/net/3c5x9.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c90x;
+ common = 'contrib/gpxe/src/drivers/net/3c90x.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_davicom;
+ common = 'contrib/gpxe/src/drivers/net/davicom.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_depca;
+ common = 'contrib/gpxe/src/drivers/net/depca.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_dmfe;
+ common = 'contrib/gpxe/src/drivers/net/dmfe.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_eepro100;
+ common = 'contrib/gpxe/src/drivers/net/eepro100.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_eepro;
+ common = 'contrib/gpxe/src/drivers/net/eepro.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_epic100;
+ common = 'contrib/gpxe/src/drivers/net/epic100.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ipoib;
+ common = 'contrib/gpxe/src/drivers/net/ipoib.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_legacy;
+ common = 'contrib/gpxe/src/drivers/net/legacy.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_natsemi;
+ common = 'contrib/gpxe/src/drivers/net/natsemi.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ne2k_isa;
+ common = 'contrib/gpxe/src/drivers/net/ne2k_isa.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ns83820;
+ common = 'contrib/gpxe/src/drivers/net/ns83820.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ns8390;
+ common = 'contrib/gpxe/src/drivers/net/ns8390.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_pnic;
+ common = 'contrib/gpxe/src/drivers/net/pnic.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_rtl8139;
+ common = 'contrib/gpxe/src/drivers/net/rtl8139.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_sis900;
+ common = 'contrib/gpxe/src/drivers/net/sis900.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_smc9000;
+ common = 'contrib/gpxe/src/drivers/net/smc9000.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_tulip;
+ common = 'contrib/gpxe/src/drivers/net/tulip.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_w89c840;
+ common = 'contrib/gpxe/src/drivers/net/w89c840.c';
+ /* Fails to preprocess without -Os! */
+ cppflags = '$(GPXE_CPPFLAGS) -Os';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_nvs;
+ common = 'contrib/gpxe/src/drivers/nvs/nvs.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_spi;
+ common = 'contrib/gpxe/src/drivers/nvs/spi.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_threewire;
+ common = 'contrib/gpxe/src/drivers/nvs/threewire.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_bitbash;
+ common = 'contrib/gpxe/src/drivers/bitbash/bitbash.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_i2c_bit;
+ common = 'contrib/gpxe/src/drivers/bitbash/i2c_bit.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_spi_bit;
+ common = 'contrib/gpxe/src/drivers/bitbash/spi_bit.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+#if 0
+
+/* Following ones require MII support which is GPLv2. */
+
+module = {
+ name = gpxe_amd8111e;
+ common = 'contrib/gpxe/src/drivers/net/amd8111e.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_atl1e;
+ common = 'contrib/gpxe/src/drivers/net/atl1e.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_b44;
+ common = 'contrib/gpxe/src/drivers/net/b44.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_bnx2;
+ common = 'contrib/gpxe/src/drivers/net/bnx2.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_etherfabric;
+ common = 'contrib/gpxe/src/drivers/net/etherfabric.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_forcedeth;
+ common = 'contrib/gpxe/src/drivers/net/forcedeth.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_pcnet32;
+ common = 'contrib/gpxe/src/drivers/net/pcnet32.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_mtd80x;
+ common = 'contrib/gpxe/src/drivers/net/mtd80x.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_r8169;
+ common = 'contrib/gpxe/src/drivers/net/r8169.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_sundance;
+ common = 'contrib/gpxe/src/drivers/net/sundance.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_tlan;
+ common = 'contrib/gpxe/src/drivers/net/tlan.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+/* Following is wireless (disabled for now). */
+
+module = {
+ name = gpxe_prism2;
+ common = 'contrib/gpxe/src/drivers/net/prism2.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_prism2_plx;
+ common = 'contrib/gpxe/src/drivers/net/prism2_plx.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ath5k;
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k_attach.c';
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k.c';
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k_caps.c';
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k_desc.c';
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k_dma.c';
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k_eeprom.c';
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k_gpio.c';
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k_initvals.c';
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k_pcu.c';
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k_phy.c';
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k_qcu.c';
+ common = 'contrib/gpxe/src/drivers/net/ath5k/ath5k_reset.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+/* Following require ISA/ISAPNP. Disable for now. */
+
+module = {
+ name = gpxe_3c509;
+ common = 'contrib/gpxe/src/drivers/net/3c509.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c515;
+ common = 'contrib/gpxe/src/drivers/net/3c515.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+/* Following uses crypto. Disable for now. */
+
+module = {
+ name = https;
+ common = 'contrib/gpxe/src/net/tcp/https.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = tls;
+ common = 'contrib/gpxe/src/net/tls.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = aoe;
+ common = 'contrib/gpxe/src/net/aoe.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = iscsi;
+ common = 'contrib/gpxe/src/net/tcp/iscsi.c';
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+#endif
=== removed directory 'conf'
=== removed file 'conf/common.rmk'
--- conf/common.rmk 2009-12-30 18:10:26 +0000
+++ conf/common.rmk 1970-01-01 00:00:00 +0000
@@ -1,323 +0,0 @@
-# -*- makefile -*-
-
-GPXE_CFLAGS=$(COMMON_CFLAGS) '-DFILE_LICENCE(x)=' -I$(GRUB_CONTRIB)/gpxe/src/include -I$(GRUB_CONTRIB)/gpxe/include_wrap -Wno-pointer-arith -Wno-error
-
-# For gpxe.mod
-pkglib_MODULES += gpxe.mod
-gpxe_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/wrap/wrap.c \
- $(GRUB_CONTRIB)/gpxe/wrap/pci.c \
- $(GRUB_CONTRIB)/gpxe/wrap/nic.c \
- $(GRUB_CONTRIB)/gpxe/src/net/80211/net80211.c \
- $(GRUB_CONTRIB)/gpxe/src/net/80211/rc80211.c \
- $(GRUB_CONTRIB)/gpxe/src/net/arp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/dhcpopts.c \
- $(GRUB_CONTRIB)/gpxe/src/net/dhcppkt.c \
- $(GRUB_CONTRIB)/gpxe/src/net/ethernet.c \
- $(GRUB_CONTRIB)/gpxe/src/net/fakedhcp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/icmp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/iobpad.c \
- $(GRUB_CONTRIB)/gpxe/src/net/ipv4.c \
- $(GRUB_CONTRIB)/gpxe/src/net/netdevice.c \
- $(GRUB_CONTRIB)/gpxe/src/net/netdev_settings.c \
- $(GRUB_CONTRIB)/gpxe/src/net/nullnet.c \
- $(GRUB_CONTRIB)/gpxe/src/net/rarp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/retry.c \
- $(GRUB_CONTRIB)/gpxe/src/net/tcp/http.c \
- $(GRUB_CONTRIB)/gpxe/src/net/tcp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/tcpip.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/dhcp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/dns.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/slam.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/tftp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp.c \
- $(GRUB_CONTRIB)/gpxe/src/core/base64.c \
- $(GRUB_CONTRIB)/gpxe/src/core/nvo.c \
- $(GRUB_CONTRIB)/gpxe/src/core/uri.c \
- $(GRUB_CONTRIB)/gpxe/src/core/uuid.c \
- $(GRUB_CONTRIB)/gpxe/src/core/random.c \
- $(GRUB_CONTRIB)/gpxe/src/core/open.c \
- $(GRUB_CONTRIB)/gpxe/src/core/cwuri.c \
- $(GRUB_CONTRIB)/gpxe/src/core/linebuf.c \
- $(GRUB_CONTRIB)/gpxe/src/core/xfer.c \
- $(GRUB_CONTRIB)/gpxe/src/core/settings.c \
- $(GRUB_CONTRIB)/gpxe/src/core/iobuf.c \
- $(GRUB_CONTRIB)/gpxe/src/core/refcnt.c \
- $(GRUB_CONTRIB)/gpxe/src/core/bitmap.c \
- $(GRUB_CONTRIB)/gpxe/src/core/process.c \
- $(GRUB_CONTRIB)/gpxe/src/core/job.c \
- $(GRUB_CONTRIB)/gpxe/src/core/resolv.c \
- $(GRUB_CONTRIB)/gpxe/src/core/interface.c \
- $(GRUB_CONTRIB)/gpxe/src/core/basename.c \
- $(GRUB_CONTRIB)/gpxe/src/core/misc.c \
- $(GRUB_CONTRIB)/gpxe/src/hci/strerror.c
-gpxe_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_infiniband.mod
-gpxe_infiniband_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_cm.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_cmrc.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_mcast.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_mi.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_packet.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_pathrec.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_sma.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_smc.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_srp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband.c \
- $(GRUB_CONTRIB)/gpxe/src/drivers/net/ipoib.c \
- $(GRUB_CONTRIB)/gpxe/src/drivers/block/scsi.c
-gpxe_infiniband_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_infiniband_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c529.mod
-gpxe_3c529_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c529.c
-gpxe_3c529_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c529_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c595.mod
-gpxe_3c595_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c595.c
-gpxe_3c595_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c595_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c5x9.mod
-gpxe_3c5x9_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c5x9.c
-gpxe_3c5x9_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c5x9_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c90x.mod
-gpxe_3c90x_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c90x.c
-gpxe_3c90x_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c90x_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_davicom.mod
-gpxe_davicom_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/davicom.c
-gpxe_davicom_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_davicom_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_depca.mod
-gpxe_depca_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/depca.c
-gpxe_depca_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_depca_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_dmfe.mod
-gpxe_dmfe_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/dmfe.c
-gpxe_dmfe_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_dmfe_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_eepro100.mod
-gpxe_eepro100_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/eepro100.c
-gpxe_eepro100_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_eepro100_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_eepro.mod
-gpxe_eepro_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/eepro.c
-gpxe_eepro_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_eepro_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_epic100.mod
-gpxe_epic100_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/epic100.c
-gpxe_epic100_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_epic100_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ipoib.mod
-gpxe_ipoib_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ipoib.c
-gpxe_ipoib_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ipoib_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_legacy.mod
-gpxe_legacy_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/legacy.c
-gpxe_legacy_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_legacy_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_natsemi.mod
-gpxe_natsemi_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/natsemi.c
-gpxe_natsemi_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_natsemi_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ne2k_isa.mod
-gpxe_ne2k_isa_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ne2k_isa.c
-gpxe_ne2k_isa_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ne2k_isa_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ns83820.mod
-gpxe_ns83820_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ns83820.c
-gpxe_ns83820_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ns83820_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ns8390.mod
-gpxe_ns8390_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ns8390.c
-gpxe_ns8390_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ns8390_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_pnic.mod
-gpxe_pnic_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/pnic.c
-gpxe_pnic_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_pnic_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_rtl8139.mod
-gpxe_rtl8139_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/rtl8139.c
-gpxe_rtl8139_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_rtl8139_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_sis900.mod
-gpxe_sis900_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/sis900.c
-gpxe_sis900_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_sis900_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_smc9000.mod
-gpxe_smc9000_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/smc9000.c
-gpxe_smc9000_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_smc9000_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_tulip.mod
-gpxe_tulip_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/tulip.c
-gpxe_tulip_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_tulip_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_w89c840.mod
-gpxe_w89c840_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/w89c840.c
-gpxe_w89c840_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_w89c840_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_nvs.mod
-gpxe_nvs_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/nvs/nvs.c
-gpxe_nvs_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_nvs_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_spi.mod
-gpxe_spi_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/nvs/spi.c
-gpxe_spi_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_spi_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_threewire.mod
-gpxe_threewire_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/nvs/threewire.c
-gpxe_threewire_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_threewire_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_bitbash.mod
-gpxe_bitbash_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/bitbash/bitbash.c
-gpxe_bitbash_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_bitbash_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_i2c_bit.mod
-gpxe_i2c_bit_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/bitbash/i2c_bit.c
-gpxe_i2c_bit_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_i2c_bit_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_spi_bit.mod
-gpxe_spi_bit_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/bitbash/spi_bit.c
-gpxe_spi_bit_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_spi_bit_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following ones require MII support which is GPLv2.
-
-#pkglib_MODULES += gpxe_amd8111e.mod
-#gpxe_amd8111e_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/amd8111e.c
-#gpxe_amd8111e_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_amd8111e_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_atl1e.mod
-#gpxe_atl1e_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/atl1e.c
-#gpxe_atl1e_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_atl1e_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_b44.mod
-#gpxe_b44_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/b44.c
-#gpxe_b44_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_b44_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_bnx2.mod
-#gpxe_bnx2_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/bnx2.c
-#gpxe_bnx2_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_bnx2_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_etherfabric.mod
-#gpxe_etherfabric_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/etherfabric.c
-#gpxe_etherfabric_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_etherfabric_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_forcedeth.mod
-#gpxe_forcedeth_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/forcedeth.c
-#gpxe_forcedeth_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_forcedeth_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_pcnet32.mod
-#gpxe_pcnet32_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/pcnet32.c
-#gpxe_pcnet32_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_pcnet32_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_mtd80x.mod
-#gpxe_mtd80x_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/mtd80x.c
-#gpxe_mtd80x_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_mtd80x_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_r8169.mod
-#gpxe_r8169_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/r8169.c
-#gpxe_r8169_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_r8169_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_sundance.mod
-#gpxe_sundance_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/sundance.c
-#gpxe_sundance_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_sundance_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_tlan.mod
-#gpxe_tlan_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/tlan.c
-#gpxe_tlan_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_tlan_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following is wireless (disabled for now)
-
-#pkglib_MODULES += gpxe_prism2.mod
-#gpxe_prism2_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/prism2.c
-#gpxe_prism2_mod_CFLAGS = $(GPXE_CFLAGS)
-# gpxe_prism2_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_prism2_pci.mod
-#gpxe_prism2_pci_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/prism2_pci.c
-#gpxe_prism2_pci_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_prism2_pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_prism2_plx.mod
-#gpxe_prism2_plx_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/prism2_plx.c
-#gpxe_prism2_plx_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_prism2_plx_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_ath5k.mod
-#gpxe_ath5k_mod_SOURCES += $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_attach.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_caps.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_desc.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_dma.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_eeprom.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_gpio.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_initvals.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_pcu.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_phy.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_qcu.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_reset.c
-#gpxe_ath5k_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_ath5k_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following requires ISA/ISAPNP. Disable for now
-
-#pkglib_MODULES += gpxe_3c509.mod
-#gpxe_3c509_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c509.c
-#gpxe_3c509_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_3c509_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_3c515.mod
-#gpxe_3c515_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c515.c
-#gpxe_3c515_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_3c515_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following uses crypto. Disable for now.
-
-#pkglib_MODULES += https.mod
-#https_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/tcp/https.c
-#https_mod_CFLAGS = $(GPXE_CFLAGS)
-#https_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += tls.mod
-#tls_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/tls.c
-#tls_mod_CFLAGS = $(GPXE_CFLAGS)
-#tls_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += aoe.mod
-#aoe_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/aoe.c
-#aoe_mod_CFLAGS = $(GPXE_CFLAGS)
-#aoe_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += iscsi.mod
-#iscsi_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/tcp/iscsi.c
-#iscsi_mod_CFLAGS = $(GPXE_CFLAGS)
-#iscsi_mod_LDFLAGS = $(COMMON_LDFLAGS)
[-- Attachment #4: lua.patch --]
[-- Type: text/x-diff, Size: 2729 bytes --]
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2010-09-21 18:01:09 +0000
@@ -0,0 +1,3 @@
+**/.deps-core
+**/.dirstamp
+Makefile.core.am
=== added file 'Makefile.core.def'
--- Makefile.core.def 1970-01-01 00:00:00 +0000
+++ Makefile.core.def 2010-09-21 15:32:27 +0000
@@ -0,0 +1,36 @@
+AutoGen definitions Makefile.tpl;
+
+module = {
+ name = lua;
+ common = 'contrib/lua/lapi.c';
+ common = 'contrib/lua/lcode.c';
+ common = 'contrib/lua/ldebug.c';
+ common = 'contrib/lua/ldo.c';
+ common = 'contrib/lua/ldump.c';
+ common = 'contrib/lua/lfunc.c';
+ common = 'contrib/lua/lgc.c';
+ common = 'contrib/lua/llex.c';
+ common = 'contrib/lua/lmem.c';
+ common = 'contrib/lua/lobject.c';
+ common = 'contrib/lua/lopcodes.c';
+ common = 'contrib/lua/lparser.c';
+ common = 'contrib/lua/lstate.c';
+ common = 'contrib/lua/lstring.c';
+ common = 'contrib/lua/ltable.c';
+ common = 'contrib/lua/ltm.c';
+ common = 'contrib/lua/lundump.c';
+ common = 'contrib/lua/lvm.c';
+ common = 'contrib/lua/lzio.c';
+ common = 'contrib/lua/lauxlib.c';
+ common = 'contrib/lua/lbaselib.c';
+ common = 'contrib/lua/linit.c';
+ common = 'contrib/lua/ltablib.c';
+ common = 'contrib/lua/lstrlib.c';
+ common = 'contrib/lua/grub_main.c';
+ common = 'contrib/lua/grub_lib.c';
+ cflags = -Wno-error;
+};
+
+/* Extra libraries for lua
+ script/lua/lmathlib.c script/lua/loslib.c script/lua/liolib.c
+ script/lua/ldblib.c script/lua/loadlib.c */
=== removed directory 'conf'
=== removed file 'conf/common.rmk'
--- conf/common.rmk 2009-10-26 20:15:26 +0000
+++ conf/common.rmk 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-# -*- makefile -*-
-
-pkglib_MODULES += lua.mod
-lua_mod_SOURCES = $(GRUB_CONTRIB)/lua/lapi.c $(GRUB_CONTRIB)/lua/lcode.c $(GRUB_CONTRIB)/lua/ldebug.c \
- $(GRUB_CONTRIB)/lua/ldo.c $(GRUB_CONTRIB)/lua/ldump.c $(GRUB_CONTRIB)/lua/lfunc.c \
- $(GRUB_CONTRIB)/lua/lgc.c $(GRUB_CONTRIB)/lua/llex.c $(GRUB_CONTRIB)/lua/lmem.c \
- $(GRUB_CONTRIB)/lua/lobject.c $(GRUB_CONTRIB)/lua/lopcodes.c $(GRUB_CONTRIB)/lua/lparser.c \
- $(GRUB_CONTRIB)/lua/lstate.c $(GRUB_CONTRIB)/lua/lstring.c $(GRUB_CONTRIB)/lua/ltable.c \
- $(GRUB_CONTRIB)/lua/ltm.c $(GRUB_CONTRIB)/lua/lundump.c $(GRUB_CONTRIB)/lua/lvm.c \
- $(GRUB_CONTRIB)/lua/lzio.c $(GRUB_CONTRIB)/lua/lauxlib.c $(GRUB_CONTRIB)/lua/lbaselib.c \
- $(GRUB_CONTRIB)/lua/linit.c $(GRUB_CONTRIB)/lua/ltablib.c $(GRUB_CONTRIB)/lua/lstrlib.c \
- $(GRUB_CONTRIB)/lua/grub_main.c $(GRUB_CONTRIB)/lua/grub_lib.c
-lua_mod_CFLAGS = $(COMMON_CFLAGS) -Wno-error
-lua_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-# Extra libraries for lua
-# script/lua/lmathlib.c script/lua/loslib.c script/lua/liolib.c
-# script/lua/ldblib.c script/lua/loadlib.c
[-- Attachment #5: ntldr-img.patch --]
[-- Type: text/x-diff, Size: 3169 bytes --]
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2010-09-21 18:01:28 +0000
@@ -0,0 +1,3 @@
+**/.deps-core
+**/.dirstamp
+Makefile.core.am
=== added file 'Makefile.common'
--- Makefile.common 1970-01-01 00:00:00 +0000
+++ Makefile.common 2010-09-21 15:32:47 +0000
@@ -0,0 +1,20 @@
+grldr.mbr: grldr.img
+ head -c 8192 $< > $@
+CLEANFILES += grldr.mbr
+
+bin2h: contrib/ntldr-img/bin2h.c
+ $(CC) $^ -o $@
+CLEANFILES += bin2h
+
+grub_mbr.h: grldr.mbr bin2h
+ ./bin2h grub_mbr 8192 < $< > $@
+CLEANFILES += grub_mbr.h
+
+grubinst: contrib/ntldr-img/grubinst.c contrib/ntldr-img/utils.c grub_mbr.h
+ $(CC) -I. -Icontrib/ntldr-img -DLINUX -o $@ contrib/ntldr-img/grubinst.c contrib/ntldr-img/utils.c
+CLEANFILES += grubinst
+
+noinst_PROGRAMS += g2ldr.mbr
+g2ldr.mbr: grubinst
+ ./grubinst --grub2 -o $@
+CLEANFILES += g2ldr.mbr
=== added file 'Makefile.core.def'
--- Makefile.core.def 1970-01-01 00:00:00 +0000
+++ Makefile.core.def 2010-09-21 16:44:12 +0000
@@ -0,0 +1,22 @@
+AutoGen definitions Makefile.tpl;
+
+image = {
+ name = g2hdr;
+ extension = bin;
+ i386_pc = 'contrib/ntldr-img/g2hdr.S';
+ i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x0';
+ objcopyflags = '-O binary';
+ enable = i386_pc;
+};
+
+image = {
+ name = grldr;
+ i386_pc = 'contrib/ntldr-img/grldrstart.S';
+ i386_pc = 'contrib/ntldr-img/ntfsbs.S';
+ i386_pc_ccasflags = -DGRLDR_MBR;
+ i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7c00';
+ objcopyflags = '-O binary';
+ enable = i386_pc;
+};
=== removed directory 'conf'
=== removed file 'conf/common.rmk'
--- conf/common.rmk 2009-11-29 21:12:28 +0000
+++ conf/common.rmk 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-# -*- makefile -*-
--include $(GRUB_CONTRIB)/ntldr-img/conf/$(target_cpu)-$(platform).mk
=== removed file 'conf/i386-pc.rmk'
--- conf/i386-pc.rmk 2009-11-30 02:37:58 +0000
+++ conf/i386-pc.rmk 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-# -*- makefile -*-
-
-pkglib_IMAGES += g2ldr.mbr g2hdr.bin grldr.img
-
-all: g2ldr.mbr g2hdr.bin
-
-DISTCLEANFILES += g2ldr.mbr g2hdr.bin
-
-g2hdr_bin_SOURCES = $(GRUB_CONTRIB)/ntldr-img/g2hdr.S
-g2hdr_bin_ASFLAGS = $(COMMON_ASFLAGS)
-g2hdr_bin_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)0x0
-g2hdr_bin_FORMAT = binary
-
-grldr_img_SOURCES = $(GRUB_CONTRIB)/ntldr-img/grldrstart.S $(GRUB_CONTRIB)/ntldr-img/ntfsbs.S
-grldr_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRLDR_MBR
-grldr_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)0x7c00
-grldr_img_FORMAT = binary
-
-grldr.mbr: grldr.img
- head -c 8192 $< > $@
-DISTCLEANFILES += grldr.mbr
-
-bin2h: $(GRUB_CONTRIB)/ntldr-img/bin2h.c
- $(CC) $^ -o $@
-DISTCLEANFILES += bin2h
-
-grub_mbr.h: grldr.mbr bin2h
- ./bin2h grub_mbr 8192 < $< > $@
-DISTCLEANFILES += grub_mbr.h
-
-grubinst: $(GRUB_CONTRIB)/ntldr-img/grubinst.c $(GRUB_CONTRIB)/ntldr-img/utils.c grub_mbr.h
- $(CC) -I. -I$(GRUB_CONTRIB)/ntldr-img -DLINUX -o $@ $(GRUB_CONTRIB)/ntldr-img/grubinst.c $(GRUB_CONTRIB)/ntldr-img/utils.c
-DISTCLEANFILES += grubinst
-
-g2ldr.mbr: grubinst
- ./grubinst --grub2 -o $@
-DISTCLEANFILES += g2ldr.mbr
[-- Attachment #6: zfs.patch --]
[-- Type: text/x-diff, Size: 1624 bytes --]
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2010-09-21 18:01:48 +0000
@@ -0,0 +1,3 @@
+**/.deps-core
+**/.dirstamp
+Makefile.core.am
=== added file 'Makefile.common'
--- Makefile.common 1970-01-01 00:00:00 +0000
+++ Makefile.common 2010-09-21 17:44:33 +0000
@@ -0,0 +1,2 @@
+ZFS_CPPFLAGS = -Icontrib/zfs/include
+ZFS_CFLAGS = -Wno-error
=== added file 'Makefile.core.def'
--- Makefile.core.def 1970-01-01 00:00:00 +0000
+++ Makefile.core.def 2010-09-21 17:44:47 +0000
@@ -0,0 +1,18 @@
+AutoGen definitions Makefile.tpl;
+
+module = {
+ name = zfs;
+ common = 'contrib/zfs/zfs.c';
+ common = 'contrib/zfs/zfs_lzjb.c';
+ common = 'contrib/zfs/zfs_sha256.c';
+ common = 'contrib/zfs/zfs_fletcher.c';
+ cppflags = '$(ZFS_CPPFLAGS)';
+ cflags = '$(ZFS_CFLAGS)';
+};
+
+module = {
+ name = zfsinfo;
+ common = 'contrib/zfs/zfsinfo.c';
+ cppflags = '$(ZFS_CPPFLAGS)';
+ cflags = '$(ZFS_CFLAGS)';
+};
=== removed directory 'conf'
=== removed file 'conf/common.rmk'
--- conf/common.rmk 2009-10-26 20:15:26 +0000
+++ conf/common.rmk 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-# -*- makefile -*-
-
-COMMON_CFLAGS += -I$(GRUB_CONTRIB)/zfs/include
-
-pkglib_MODULES += zfs.mod
-zfs_mod_SOURCES = $(GRUB_CONTRIB)/zfs/zfs.c $(GRUB_CONTRIB)/zfs/zfs_lzjb.c $(GRUB_CONTRIB)/zfs/zfs_sha256.c $(GRUB_CONTRIB)/zfs/zfs_fletcher.c
-zfs_mod_CFLAGS = $(COMMON_CFLAGS) -Wno-error
-zfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += zfsinfo.mod
-zfsinfo_mod_SOURCES = $(GRUB_CONTRIB)/zfs/zfsinfo.c
-zfsinfo_mod_CFLAGS = $(COMMON_CFLAGS) -Wno-error
-zfsinfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Re-enable grub-extras
2010-09-21 18:35 [PATCH] Re-enable grub-extras Colin Watson
@ 2010-09-23 13:08 ` Colin Watson
2010-09-23 13:12 ` Colin Watson
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Colin Watson @ 2010-09-23 13:08 UTC (permalink / raw)
To: grub-devel
On Tue, Sep 21, 2010 at 07:35:30PM +0100, Colin Watson wrote:
> Here's a patch to re-enable grub-extras by allowing extra modules to
> provide Autogen definitions files. A few things to note:
Vladimir commented on this on IRC, noting three problems. In reverse
order of complexity:
1) The GRUB_CONTRIB check in autogen.sh should also check for
grub-core/contrib.
Fixed.
2) What's the problem with renaming g2hdr.bin to g2hdr.img?
I know of at least one piece of software which expects the current file
name: win32-loader, written by Robert and maintained in Debian. It
probably wouldn't be completely awful to change this, but it would be
nice not to need to. That said, perhaps g2hdr.bin could be a symlink to
g2hdr.img (which could be done in Makefile.common). I've updated my
patch to do this, and removed the extension-override facility from
gentpl.py.
3) It would be nice if extra modules could add new sources to existing
targets defined in one of the main definitions files: for example, it
would be useful to be able to add zfs to libgrub.a.
This was the hard bit that took me a day or two to fix.
Vladimir's original suggestion on IRC was to create a separate
libgrubzfs.a and arrange to link the utilities with that as well. When
I looked into this, I decided that I didn't like this approach because
it simply pushes the problem of appending to an existing list up a
level; as far as the Autogen definitions go, there isn't a significant
difference between appending to grub_probe_LDADD and appending to
libgrub_a_SOURCES. I would prefer to solve this some other way.
My preferred approach is to try not to expose any of the difficulties in
the definitions file, so that it can just look like this:
library = {
name = libgrub.a;
common = contrib/zfs/zfs.c;
common = contrib/zfs/zfs_lzjb.c;
common = contrib/zfs/zfs_sha256.c;
common = contrib/zfs/zfs_fletcher.c;
cppflags = '$(ZFS_CPPFLAGS)';
cflags = '$(ZFS_CFLAGS)';
};
Doing this actually turned out to be very difficult because Autogen's
native macros aren't powerful enough: they can only really emit text
rather than using temporary storage, which means that you can't do
things like "look for all the library blocks with the same name and
concatenate them" or "append to _SOURCES variables if we've seen them
before". Some Automake variables can be handled with simple appends
while some of them have some boilerplate only at the start which
shouldn't be repeated; Automake variables must be initialised exactly
once on all possible intersections of conditional paths; and we should
also avoid generating duplicate rules. All these constraints make it a
hard problem.
Fortunately, Autogen supports embedding bits of Guile, which makes the
problem merely hard rather than impossible. I tried a few different
approaches, and the one that I found to be most practical is in the
following patch: effectively we remember whether we've seen a given
target before and treat it slightly differently, and furthermore we emit
initialisations for non-global variables to avoid problems with
Automake's restrictions on variable initialisation.
For now, I only implemented this for 'library' blocks, so something that
wants to compile extra files into the GRUB kernel for example will be
out of luck. If people feel this is an onerous restriction then it's
fairly easy to fix; I was just trying not to change too much at once,
particularly for paths I wasn't going to test.
Doing this involved feeding all the files relevant to a given Automake
input stream to Autogen in one go, so I eliminated Makefile.gcry.am.
This was an exercise in programming in six languages at once (Python,
Autogen native macros, Guile, Autogen definitions, Automake, and make).
I found it to be a bit much, and my impression is that Autogen got in
the way more than it helped. I suggest that after 1.99 we should look
at having a Python program generate Automake input directly, which would
avoid many contortions and allow us to improve the output (it could
merge the multiple _SOURCES lines into just one per conditional path,
for instance). The .def file format is of course just fine as it is,
and could easily be preserved.
> * Extra modules may also provide Makefile.common with literal Automake
> input, for those cases where it's too hard to cram things into
> Autogen.
I also added Makefile.core.common and Makefile.util.common (starting to
run out of good names) for literal Automake input that should only be
used in grub-core or at the top level respectively. ntldr-img needed
the former.
Once again, the required patches to grub-extras modules are attached.
2010-09-22 Colin Watson <cjwatson@ubuntu.com>
Re-enable grub-extras.
* autogen.sh: Create symlinks to ${GRUB_CONTRIB} if necessary to
avoid confusing Automake. Run autogen only twice, once for the top
level and once for grub-core. Add Makefile.util.def and
Makefile.core.def from extra modules to the appropriate autogen
invocations. If Makefile.common exists in an extra module, include
it in both Makefile.util.am and grub-core/Makefile.core.am;
similarly, include any Makefile.util.common file in Makefile.util.am
and any Makefile.core.common file in grub-core/Makefile.core.am.
* conf/Makefile.common ($(top_srcdir)/grub-core/Makefile.core.am):
Depend on $(top_srcdir)/grub-core/Makefile.gcry.def.
($(top_srcdir)/grub-core/Makefile.gcry.def): Remove.
* grub-core/Makefile.am: Remove inclusion of Makefile.gcry.am.
* gentpl.py (gvar_add): Turn GVARS into a set.
(global_variable_initializers): Sort global variables on output.
(vars_init): New function.
(first_time): Likewise.
(library): Ensure that non-global variable initialisations are
emitted before the first time we emit code for a library block.
Append to variables rather than setting them. Only emit
noinst_LIBRARIES, BUILT_SOURCES, and CLEANFILES the first time for
each conditional path.
(program): installdir() emits an Autogen macro, so must be passed to
var_add rather than gvar_add.
(data): Likewise.
(script): Likewise.
(rules): New function, centralising handling for different target
types. Set up Guile association lists for first_time and vars_init,
and send most output to a diversion so that variable initialisations
can be emitted first.
(module_rules): Use new rules function.
(kernel_rules): Likewise.
(image_rules): Likewise.
(library_rules): Likewise.
(program_rules): Likewise.
(script_rules): Likewise.
(data_rules): Likewise.
* configure.ac: Add AC_PROG_LN_S, for the benefit of ntldr-img.
* .bzrignore: Add contrib and grub-core/contrib. Remove
grub-core/Makefile.gcry.am.
=== modified file '.bzrignore'
--- .bzrignore 2010-09-20 13:03:47 +0000
+++ .bzrignore 2010-09-22 13:07:15 +0000
@@ -104,9 +104,10 @@ grub-core/lib/libgcrypt-grub
**/.deps-core
**/.dirstamp
Makefile.util.am
+contrib
grub-core/Makefile.core.am
-grub-core/Makefile.gcry.am
grub-core/Makefile.gcry.def
+grub-core/contrib
grub-core/genmod.sh
grub-core/gensyminfo.sh
grub-core/*.module
=== modified file 'autogen.sh'
--- autogen.sh 2010-08-23 08:37:29 +0000
+++ autogen.sh 2010-09-23 10:36:52 +0000
@@ -14,9 +14,50 @@ echo "Creating Makefile.tpl..."
python gentpl.py | sed -e '/^$/{N;/^\n$/D;}' > Makefile.tpl
echo "Running autogen..."
-autogen -T Makefile.tpl Makefile.util.def | sed -e '/^$/{N;/^\n$/D;}' > Makefile.util.am
-autogen -T Makefile.tpl grub-core/Makefile.core.def | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.core.am
-autogen -T Makefile.tpl grub-core/Makefile.gcry.def | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.gcry.am
+
+# Automake doesn't like including files from a path outside the project.
+rm -f contrib grub-core/contrib
+if [ "x${GRUB_CONTRIB}" != x ]; then
+ [ "${GRUB_CONTRIB}" = contrib ] || ln -s "${GRUB_CONTRIB}" contrib
+ [ "${GRUB_CONTRIB}" = grub-core/contrib ] || ln -s ../contrib grub-core/contrib
+fi
+
+UTIL_DEFS=Makefile.util.def
+CORE_DEFS='grub-core/Makefile.core.def grub-core/Makefile.gcry.def'
+
+for extra in contrib/*/Makefile.util.def; do
+ if test -e "$extra"; then
+ UTIL_DEFS="$UTIL_DEFS $extra"
+ fi
+done
+
+for extra in contrib/*/Makefile.core.def; do
+ if test -e "$extra"; then
+ CORE_DEFS="$CORE_DEFS $extra"
+ fi
+done
+
+cat $UTIL_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > Makefile.util.am
+cat $CORE_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.core.am
+
+for extra in contrib/*/Makefile.common; do
+ if test -e "$extra"; then
+ echo "include $extra" >> Makefile.util.am
+ echo "include $extra" >> grub-core/Makefile.core.am
+ fi
+done
+
+for extra in contrib/*/Makefile.util.common; do
+ if test -e "$extra"; then
+ echo "include $extra" >> Makefile.util.am
+ fi
+done
+
+for extra in contrib/*/Makefile.core.common; do
+ if test -e "$extra"; then
+ echo "include $extra" >> grub-core/Makefile.core.am
+ fi
+done
echo "Saving timestamps..."
echo timestamp > stamp-h.in
=== modified file 'conf/Makefile.common'
--- conf/Makefile.common 2010-09-21 12:37:50 +0000
+++ conf/Makefile.common 2010-09-22 13:09:44 +0000
@@ -146,11 +146,7 @@ $(top_srcdir)/Makefile.util.am: $(top_sr
mv $@.new $@
.PRECIOUS: $(top_srcdir)/grub-core/Makefile.core.am
-$(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/Makefile.tpl
- autogen -T $(top_srcdir)/Makefile.tpl $< | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
- mv $@.new $@
-
-.PRECIOUS: $(top_srcdir)/grub-core/Makefile.gcry.am
-$(top_srcdir)/grub-core/Makefile.gcry.am: $(top_srcdir)/grub-core/Makefile.gcry.def $(top_srcdir)/Makefile.tpl
- autogen -T $(top_srcdir)/Makefile.tpl $< | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
+$(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def $(top_srcdir)/Makefile.tpl
+ if [ "x$$GRUB_CONTRIB" != x ]; then echo "You need to run ./autogen.sh manually." >&2; exit 1; fi
+ autogen -T $(top_srcdir)/Makefile.tpl $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
mv $@.new $@
=== modified file 'configure.ac'
--- configure.ac 2010-09-21 09:42:30 +0000
+++ configure.ac 2010-09-22 12:11:35 +0000
@@ -235,6 +235,7 @@ AC_PROG_LEX
AC_PROG_YACC
AC_PROG_MAKE_SET
AC_PROG_MKDIR_P
+AC_PROG_LN_S
if test "x$LEX" = "x:"; then
AC_MSG_ERROR([flex is not found])
=== modified file 'gentpl.py'
--- gentpl.py 2010-09-19 13:24:45 +0000
+++ gentpl.py 2010-09-22 21:01:22 +0000
@@ -70,16 +70,15 @@ for platform in GRUB_PLATFORMS:
#
# Global variables
#
-GVARS = []
+GVARS = set()
def gvar_add(var, value):
- if var not in GVARS:
- GVARS.append(var)
+ GVARS.add(var)
return var + " += " + value + "\n"
def global_variable_initializers():
r = ""
- for var in GVARS:
+ for var in sorted(GVARS):
r += var + " ?= \n"
return r
@@ -87,6 +86,16 @@ def global_variable_initializers():
# Per PROGRAM/SCRIPT variables
#
+def vars_init(*var_list):
+ r = "[+ IF (if (not (assoc-ref seen-vars (get \".name\"))) \"seen\") +]"
+ r += "[+ (out-suspend \"v\") +]"
+ for var in var_list:
+ r += var + " = \n"
+ r += "[+ (out-resume \"v\") +]"
+ r += "[+ (set! seen-vars (assoc-set! seen-vars (get \".name\") 0)) +]"
+ r += "[+ ENDIF +]"
+ return first_time(r)
+
def var_set(var, value):
return var + " = " + value + "\n"
@@ -257,6 +266,15 @@ def platform_ccasflags(p): return platfo
def platform_stripflags(p): return platform_specific_values(p, "_stripflags", "stripflags")
def platform_objcopyflags(p): return platform_specific_values(p, "_objcopyflags", "objcopyflags")
+#
+# Emit snippet only the first time through for the current name.
+#
+def first_time(snippet):
+ r = "[+ IF (if (not (assoc-ref seen-target (get \".name\"))) \"seen\") +]"
+ r += snippet
+ r += "[+ ENDIF +]"
+ return r
+
def module(platform):
r = set_canonical_name_suffix(".module")
@@ -341,18 +359,25 @@ fi
def library(platform):
r = set_canonical_name_suffix("")
- r += gvar_add("noinst_LIBRARIES", "[+ name +]")
- r += var_set(cname() + "_SOURCES", platform_sources(platform))
- r += var_set("nodist_" + cname() + "_SOURCES", platform_nodist_sources(platform))
- r += var_set(cname() + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_LIBRARY) " + platform_cflags(platform))
- r += var_set(cname() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) " + platform_cppflags(platform))
- r += var_set(cname() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY) " + platform_ccasflags(platform))
- # r += var_set(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
- r += gvar_add("EXTRA_DIST", extra_dist())
- r += gvar_add("BUILT_SOURCES", "$(nodist_" + cname() + "_SOURCES)")
- r += gvar_add("CLEANFILES", "$(nodist_" + cname() + "_SOURCES)")
+ r += vars_init(cname() + "_SOURCES",
+ "nodist_" + cname() + "_SOURCES",
+ cname() + "_CFLAGS",
+ cname() + "_CPPFLAGS",
+ cname() + "_CCASFLAGS")
+ # cname() + "_DEPENDENCIES")
+ r += first_time(gvar_add("noinst_LIBRARIES", "[+ name +]"))
+ r += var_add(cname() + "_SOURCES", platform_sources(platform))
+ r += var_add("nodist_" + cname() + "_SOURCES", platform_nodist_sources(platform))
+ r += var_add(cname() + "_CFLAGS", first_time("$(AM_CFLAGS) $(CFLAGS_LIBRARY) ") + platform_cflags(platform))
+ r += var_add(cname() + "_CPPFLAGS", first_time("$(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) ") + platform_cppflags(platform))
+ r += var_add(cname() + "_CCASFLAGS", first_time("$(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY) ") + platform_ccasflags(platform))
+ # r += var_add(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
+
+ r += gvar_add("EXTRA_DIST", extra_dist())
+ r += first_time(gvar_add("BUILT_SOURCES", "$(nodist_" + cname() + "_SOURCES)"))
+ r += first_time(gvar_add("CLEANFILES", "$(nodist_" + cname() + "_SOURCES)"))
return r
def installdir(default="bin"):
@@ -376,7 +401,7 @@ def program(platform, test=False):
r += gvar_add("check_PROGRAMS", "[+ name +]")
r += gvar_add("TESTS", "[+ name +]")
r += "[+ ELSE +]"
- r += gvar_add(installdir() + "_PROGRAMS", "[+ name +]")
+ r += var_add(installdir() + "_PROGRAMS", "[+ name +]")
r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]"
r += "[+ ENDIF +]"
@@ -397,7 +422,7 @@ def program(platform, test=False):
def data(platform):
r = gvar_add("EXTRA_DIST", platform_sources(platform))
r += gvar_add("EXTRA_DIST", extra_dist())
- r += gvar_add(installdir() + "_DATA", platform_sources(platform))
+ r += var_add(installdir() + "_DATA", platform_sources(platform))
return r
def script(platform):
@@ -405,7 +430,7 @@ def script(platform):
r += gvar_add("check_SCRIPTS", "[+ name +]")
r += gvar_add ("TESTS", "[+ name +]")
r += "[+ ELSE +]"
- r += gvar_add(installdir() + "_SCRIPTS", "[+ name +]")
+ r += var_add(installdir() + "_SCRIPTS", "[+ name +]")
r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]"
r += "[+ ENDIF +]"
@@ -418,33 +443,43 @@ chmod a+x [+ name +]
r += gvar_add("dist_noinst_DATA", platform_sources(platform))
return r
+def rules(target, closure):
+ # Create association lists for the benefit of first_time and vars_init.
+ r = "[+ (define seen-target '()) +]"
+ r += "[+ (define seen-vars '()) +]"
+ # Most output goes to a diversion. This allows us to emit variable
+ # initializations before everything else.
+ r += "[+ (out-push-new) +]"
+
+ r += "[+ FOR " + target + " +]"
+ r += foreach_enabled_platform(
+ lambda p: under_platform_specific_conditionals(p, closure(p)))
+ # Remember that we've seen this target.
+ r += "[+ (set! seen-target (assoc-set! seen-target (get \".name\") 0)) +]"
+ r += "[+ ENDFOR +]"
+ r += "[+ (out-pop #t) +]"
+ return r
+
def module_rules():
- return "[+ FOR module +]" + foreach_enabled_platform(
- lambda p: under_platform_specific_conditionals(p, module(p))) + "[+ ENDFOR +]"
+ return rules("module", module)
def kernel_rules():
- return "[+ FOR kernel +]" + foreach_enabled_platform(
- lambda p: under_platform_specific_conditionals(p, kernel(p))) + "[+ ENDFOR +]"
+ return rules("kernel", kernel)
def image_rules():
- return "[+ FOR image +]" + foreach_enabled_platform(
- lambda p: under_platform_specific_conditionals(p, image(p))) + "[+ ENDFOR +]"
+ return rules("image", image)
def library_rules():
- return "[+ FOR library +]" + foreach_enabled_platform(
- lambda p: under_platform_specific_conditionals(p, library(p))) + "[+ ENDFOR +]"
+ return rules("library", library)
def program_rules():
- return "[+ FOR program +]" + foreach_enabled_platform(
- lambda p: under_platform_specific_conditionals(p, program(p))) + "[+ ENDFOR +]"
+ return rules("program", program)
def script_rules():
- return "[+ FOR script +]" + foreach_enabled_platform(
- lambda p: under_platform_specific_conditionals(p, script(p))) + "[+ ENDFOR +]"
+ return rules("script", script)
def data_rules():
- return "[+ FOR data +]" + foreach_enabled_platform(
- lambda p: under_platform_specific_conditionals(p, data(p))) + "[+ ENDFOR +]"
+ return rules("data", data)
print "[+ AutoGen5 template +]\n"
a = module_rules()
=== modified file 'grub-core/Makefile.am'
--- grub-core/Makefile.am 2010-09-19 20:22:43 +0000
+++ grub-core/Makefile.am 2010-09-22 13:11:11 +0000
@@ -51,7 +51,6 @@ grub_script.yy.c: grub_script.yy.h
CLEANFILES += grub_script.yy.c grub_script.yy.h
include $(srcdir)/Makefile.core.am
-include $(srcdir)/Makefile.gcry.am
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Re-enable grub-extras
2010-09-23 13:08 ` Colin Watson
@ 2010-09-23 13:12 ` Colin Watson
2010-09-23 14:23 ` Colin Watson
2010-09-23 14:36 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-23 20:27 ` [PATCH] Trunk: usbtrans.c - wrong max packet size for bulk transfer Aleš Nesrsta
2 siblings, 1 reply; 11+ messages in thread
From: Colin Watson @ 2010-09-23 13:12 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 241 bytes --]
On Thu, Sep 23, 2010 at 02:08:20PM +0100, Colin Watson wrote:
> Once again, the required patches to grub-extras modules are attached.
No, really! Here they are.
--
Colin Watson [cjwatson@ubuntu.com]
[-- Attachment #2: 915resolution.patch --]
[-- Type: text/x-diff, Size: 1150 bytes --]
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2010-09-21 17:58:53 +0000
@@ -0,0 +1,3 @@
+**/.deps-core
+**/.dirstamp
+Makefile.core.am
=== added file 'Makefile.core.def'
--- Makefile.core.def 1970-01-01 00:00:00 +0000
+++ Makefile.core.def 2010-09-22 08:26:06 +0000
@@ -0,0 +1,8 @@
+AutoGen definitions Makefile.tpl;
+
+module = {
+ name = '915resolution';
+ i386_pc = contrib/915resolution/915resolution.c;
+ cflags = -Wno-error;
+ enable = i386_pc;
+};
=== removed directory 'conf'
=== removed file 'conf/common.rmk'
--- conf/common.rmk 2009-11-29 21:11:48 +0000
+++ conf/common.rmk 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-# -*- makefile -*-
--include $(GRUB_CONTRIB)/915resolution/conf/$(target_cpu)-$(platform).mk
=== removed file 'conf/i386-pc.rmk'
--- conf/i386-pc.rmk 2009-10-26 20:15:26 +0000
+++ conf/i386-pc.rmk 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-# -*- makefile -*-
-
-pkglib_MODULES += 915resolution.mod
-915resolution_mod_SOURCES = $(GRUB_CONTRIB)/915resolution/915resolution.c
-915resolution_mod_CFLAGS = $(COMMON_CFLAGS) -Wno-error
-915resolution_mod_LDFLAGS = $(COMMON_LDFLAGS)
[-- Attachment #3: gpxe.patch --]
[-- Type: text/x-diff, Size: 25572 bytes --]
=== modified file '.bzrignore'
--- .bzrignore 2009-12-22 00:12:41 +0000
+++ .bzrignore 2010-09-21 18:31:40 +0000
@@ -1 +1,3 @@
-conf/common.mk
+**/.deps-core
+**/.dirstamp
+Makefile.core.am
=== added file 'Makefile.common'
--- Makefile.common 1970-01-01 00:00:00 +0000
+++ Makefile.common 2010-09-21 17:44:16 +0000
@@ -0,0 +1,2 @@
+GPXE_CPPFLAGS = '-DFILE_LICENCE(x)=' -Icontrib/gpxe/src/include -Icontrib/gpxe/include_wrap
+GPXE_CFLAGS = -Wno-pointer-arith -Wno-error
=== added file 'Makefile.core.def'
--- Makefile.core.def 1970-01-01 00:00:00 +0000
+++ Makefile.core.def 2010-09-22 08:27:07 +0000
@@ -0,0 +1,431 @@
+AutoGen definitions Makefile.tpl;
+
+module = {
+ name = gpxe;
+ common = contrib/gpxe/wrap/wrap.c;
+ common = contrib/gpxe/wrap/pci.c;
+ common = contrib/gpxe/wrap/nic.c;
+ common = contrib/gpxe/src/net/80211/net80211.c;
+ common = contrib/gpxe/src/net/80211/rc80211.c;
+ common = contrib/gpxe/src/net/arp.c;
+ common = contrib/gpxe/src/net/dhcpopts.c;
+ common = contrib/gpxe/src/net/dhcppkt.c;
+ common = contrib/gpxe/src/net/ethernet.c;
+ common = contrib/gpxe/src/net/fakedhcp.c;
+ common = contrib/gpxe/src/net/icmp.c;
+ common = contrib/gpxe/src/net/iobpad.c;
+ common = contrib/gpxe/src/net/ipv4.c;
+ common = contrib/gpxe/src/net/netdevice.c;
+ common = contrib/gpxe/src/net/netdev_settings.c;
+ common = contrib/gpxe/src/net/nullnet.c;
+ common = contrib/gpxe/src/net/rarp.c;
+ common = contrib/gpxe/src/net/retry.c;
+ common = contrib/gpxe/src/net/tcp/http.c;
+ common = contrib/gpxe/src/net/tcp.c;
+ common = contrib/gpxe/src/net/tcpip.c;
+ common = contrib/gpxe/src/net/udp/dhcp.c;
+ common = contrib/gpxe/src/net/udp/dns.c;
+ common = contrib/gpxe/src/net/udp/slam.c;
+ common = contrib/gpxe/src/net/udp/tftp.c;
+ common = contrib/gpxe/src/net/udp.c;
+ common = contrib/gpxe/src/core/base64.c;
+ common = contrib/gpxe/src/core/nvo.c;
+ common = contrib/gpxe/src/core/uri.c;
+ common = contrib/gpxe/src/core/uuid.c;
+ common = contrib/gpxe/src/core/random.c;
+ common = contrib/gpxe/src/core/open.c;
+ common = contrib/gpxe/src/core/cwuri.c;
+ common = contrib/gpxe/src/core/linebuf.c;
+ common = contrib/gpxe/src/core/xfer.c;
+ common = contrib/gpxe/src/core/settings.c;
+ common = contrib/gpxe/src/core/iobuf.c;
+ common = contrib/gpxe/src/core/refcnt.c;
+ common = contrib/gpxe/src/core/bitmap.c;
+ common = contrib/gpxe/src/core/process.c;
+ common = contrib/gpxe/src/core/job.c;
+ common = contrib/gpxe/src/core/resolv.c;
+ common = contrib/gpxe/src/core/interface.c;
+ common = contrib/gpxe/src/core/basename.c;
+ common = contrib/gpxe/src/core/misc.c;
+ common = contrib/gpxe/src/hci/strerror.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_infiniband;
+ common = contrib/gpxe/src/net/infiniband/ib_cm.c;
+ common = contrib/gpxe/src/net/infiniband/ib_cmrc.c;
+ common = contrib/gpxe/src/net/infiniband/ib_mcast.c;
+ common = contrib/gpxe/src/net/infiniband/ib_mi.c;
+ common = contrib/gpxe/src/net/infiniband/ib_packet.c;
+ common = contrib/gpxe/src/net/infiniband/ib_pathrec.c;
+ common = contrib/gpxe/src/net/infiniband/ib_sma.c;
+ common = contrib/gpxe/src/net/infiniband/ib_smc.c;
+ common = contrib/gpxe/src/net/infiniband/ib_srp.c;
+ common = contrib/gpxe/src/net/infiniband.c;
+ common = contrib/gpxe/src/drivers/net/ipoib.c;
+ common = contrib/gpxe/src/drivers/block/scsi.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c529;
+ common = contrib/gpxe/src/drivers/net/3c529.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c595;
+ common = contrib/gpxe/src/drivers/net/3c595.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c5x9;
+ common = contrib/gpxe/src/drivers/net/3c5x9.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c90x;
+ common = contrib/gpxe/src/drivers/net/3c90x.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_davicom;
+ common = contrib/gpxe/src/drivers/net/davicom.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_depca;
+ common = contrib/gpxe/src/drivers/net/depca.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_dmfe;
+ common = contrib/gpxe/src/drivers/net/dmfe.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_eepro100;
+ common = contrib/gpxe/src/drivers/net/eepro100.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_eepro;
+ common = contrib/gpxe/src/drivers/net/eepro.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_epic100;
+ common = contrib/gpxe/src/drivers/net/epic100.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ipoib;
+ common = contrib/gpxe/src/drivers/net/ipoib.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_legacy;
+ common = contrib/gpxe/src/drivers/net/legacy.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_natsemi;
+ common = contrib/gpxe/src/drivers/net/natsemi.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ne2k_isa;
+ common = contrib/gpxe/src/drivers/net/ne2k_isa.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ns83820;
+ common = contrib/gpxe/src/drivers/net/ns83820.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ns8390;
+ common = contrib/gpxe/src/drivers/net/ns8390.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_pnic;
+ common = contrib/gpxe/src/drivers/net/pnic.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_rtl8139;
+ common = contrib/gpxe/src/drivers/net/rtl8139.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_sis900;
+ common = contrib/gpxe/src/drivers/net/sis900.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_smc9000;
+ common = contrib/gpxe/src/drivers/net/smc9000.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_tulip;
+ common = contrib/gpxe/src/drivers/net/tulip.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_w89c840;
+ common = contrib/gpxe/src/drivers/net/w89c840.c;
+ /* Fails to preprocess without -Os! */
+ cppflags = '$(GPXE_CPPFLAGS) -Os';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_nvs;
+ common = contrib/gpxe/src/drivers/nvs/nvs.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_spi;
+ common = contrib/gpxe/src/drivers/nvs/spi.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_threewire;
+ common = contrib/gpxe/src/drivers/nvs/threewire.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_bitbash;
+ common = contrib/gpxe/src/drivers/bitbash/bitbash.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_i2c_bit;
+ common = contrib/gpxe/src/drivers/bitbash/i2c_bit.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_spi_bit;
+ common = contrib/gpxe/src/drivers/bitbash/spi_bit.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+#if 0
+
+/* Following ones require MII support which is GPLv2. */
+
+module = {
+ name = gpxe_amd8111e;
+ common = contrib/gpxe/src/drivers/net/amd8111e.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_atl1e;
+ common = contrib/gpxe/src/drivers/net/atl1e.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_b44;
+ common = contrib/gpxe/src/drivers/net/b44.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_bnx2;
+ common = contrib/gpxe/src/drivers/net/bnx2.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_etherfabric;
+ common = contrib/gpxe/src/drivers/net/etherfabric.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_forcedeth;
+ common = contrib/gpxe/src/drivers/net/forcedeth.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_pcnet32;
+ common = contrib/gpxe/src/drivers/net/pcnet32.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_mtd80x;
+ common = contrib/gpxe/src/drivers/net/mtd80x.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_r8169;
+ common = contrib/gpxe/src/drivers/net/r8169.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_sundance;
+ common = contrib/gpxe/src/drivers/net/sundance.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_tlan;
+ common = contrib/gpxe/src/drivers/net/tlan.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+/* Following is wireless (disabled for now). */
+
+module = {
+ name = gpxe_prism2;
+ common = contrib/gpxe/src/drivers/net/prism2.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_prism2_plx;
+ common = contrib/gpxe/src/drivers/net/prism2_plx.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ath5k;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_attach.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_caps.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_desc.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_dma.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_eeprom.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_gpio.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_initvals.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_pcu.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_phy.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_qcu.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_reset.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+/* Following require ISA/ISAPNP. Disable for now. */
+
+module = {
+ name = gpxe_3c509;
+ common = contrib/gpxe/src/drivers/net/3c509.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c515;
+ common = contrib/gpxe/src/drivers/net/3c515.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+/* Following uses crypto. Disable for now. */
+
+module = {
+ name = https;
+ common = contrib/gpxe/src/net/tcp/https.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = tls;
+ common = contrib/gpxe/src/net/tls.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = aoe;
+ common = contrib/gpxe/src/net/aoe.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = iscsi;
+ common = contrib/gpxe/src/net/tcp/iscsi.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+#endif
=== removed directory 'conf'
=== removed file 'conf/common.rmk'
--- conf/common.rmk 2009-12-30 18:10:26 +0000
+++ conf/common.rmk 1970-01-01 00:00:00 +0000
@@ -1,323 +0,0 @@
-# -*- makefile -*-
-
-GPXE_CFLAGS=$(COMMON_CFLAGS) '-DFILE_LICENCE(x)=' -I$(GRUB_CONTRIB)/gpxe/src/include -I$(GRUB_CONTRIB)/gpxe/include_wrap -Wno-pointer-arith -Wno-error
-
-# For gpxe.mod
-pkglib_MODULES += gpxe.mod
-gpxe_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/wrap/wrap.c \
- $(GRUB_CONTRIB)/gpxe/wrap/pci.c \
- $(GRUB_CONTRIB)/gpxe/wrap/nic.c \
- $(GRUB_CONTRIB)/gpxe/src/net/80211/net80211.c \
- $(GRUB_CONTRIB)/gpxe/src/net/80211/rc80211.c \
- $(GRUB_CONTRIB)/gpxe/src/net/arp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/dhcpopts.c \
- $(GRUB_CONTRIB)/gpxe/src/net/dhcppkt.c \
- $(GRUB_CONTRIB)/gpxe/src/net/ethernet.c \
- $(GRUB_CONTRIB)/gpxe/src/net/fakedhcp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/icmp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/iobpad.c \
- $(GRUB_CONTRIB)/gpxe/src/net/ipv4.c \
- $(GRUB_CONTRIB)/gpxe/src/net/netdevice.c \
- $(GRUB_CONTRIB)/gpxe/src/net/netdev_settings.c \
- $(GRUB_CONTRIB)/gpxe/src/net/nullnet.c \
- $(GRUB_CONTRIB)/gpxe/src/net/rarp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/retry.c \
- $(GRUB_CONTRIB)/gpxe/src/net/tcp/http.c \
- $(GRUB_CONTRIB)/gpxe/src/net/tcp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/tcpip.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/dhcp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/dns.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/slam.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/tftp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp.c \
- $(GRUB_CONTRIB)/gpxe/src/core/base64.c \
- $(GRUB_CONTRIB)/gpxe/src/core/nvo.c \
- $(GRUB_CONTRIB)/gpxe/src/core/uri.c \
- $(GRUB_CONTRIB)/gpxe/src/core/uuid.c \
- $(GRUB_CONTRIB)/gpxe/src/core/random.c \
- $(GRUB_CONTRIB)/gpxe/src/core/open.c \
- $(GRUB_CONTRIB)/gpxe/src/core/cwuri.c \
- $(GRUB_CONTRIB)/gpxe/src/core/linebuf.c \
- $(GRUB_CONTRIB)/gpxe/src/core/xfer.c \
- $(GRUB_CONTRIB)/gpxe/src/core/settings.c \
- $(GRUB_CONTRIB)/gpxe/src/core/iobuf.c \
- $(GRUB_CONTRIB)/gpxe/src/core/refcnt.c \
- $(GRUB_CONTRIB)/gpxe/src/core/bitmap.c \
- $(GRUB_CONTRIB)/gpxe/src/core/process.c \
- $(GRUB_CONTRIB)/gpxe/src/core/job.c \
- $(GRUB_CONTRIB)/gpxe/src/core/resolv.c \
- $(GRUB_CONTRIB)/gpxe/src/core/interface.c \
- $(GRUB_CONTRIB)/gpxe/src/core/basename.c \
- $(GRUB_CONTRIB)/gpxe/src/core/misc.c \
- $(GRUB_CONTRIB)/gpxe/src/hci/strerror.c
-gpxe_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_infiniband.mod
-gpxe_infiniband_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_cm.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_cmrc.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_mcast.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_mi.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_packet.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_pathrec.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_sma.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_smc.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_srp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband.c \
- $(GRUB_CONTRIB)/gpxe/src/drivers/net/ipoib.c \
- $(GRUB_CONTRIB)/gpxe/src/drivers/block/scsi.c
-gpxe_infiniband_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_infiniband_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c529.mod
-gpxe_3c529_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c529.c
-gpxe_3c529_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c529_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c595.mod
-gpxe_3c595_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c595.c
-gpxe_3c595_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c595_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c5x9.mod
-gpxe_3c5x9_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c5x9.c
-gpxe_3c5x9_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c5x9_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c90x.mod
-gpxe_3c90x_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c90x.c
-gpxe_3c90x_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c90x_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_davicom.mod
-gpxe_davicom_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/davicom.c
-gpxe_davicom_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_davicom_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_depca.mod
-gpxe_depca_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/depca.c
-gpxe_depca_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_depca_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_dmfe.mod
-gpxe_dmfe_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/dmfe.c
-gpxe_dmfe_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_dmfe_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_eepro100.mod
-gpxe_eepro100_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/eepro100.c
-gpxe_eepro100_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_eepro100_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_eepro.mod
-gpxe_eepro_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/eepro.c
-gpxe_eepro_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_eepro_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_epic100.mod
-gpxe_epic100_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/epic100.c
-gpxe_epic100_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_epic100_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ipoib.mod
-gpxe_ipoib_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ipoib.c
-gpxe_ipoib_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ipoib_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_legacy.mod
-gpxe_legacy_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/legacy.c
-gpxe_legacy_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_legacy_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_natsemi.mod
-gpxe_natsemi_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/natsemi.c
-gpxe_natsemi_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_natsemi_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ne2k_isa.mod
-gpxe_ne2k_isa_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ne2k_isa.c
-gpxe_ne2k_isa_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ne2k_isa_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ns83820.mod
-gpxe_ns83820_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ns83820.c
-gpxe_ns83820_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ns83820_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ns8390.mod
-gpxe_ns8390_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ns8390.c
-gpxe_ns8390_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ns8390_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_pnic.mod
-gpxe_pnic_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/pnic.c
-gpxe_pnic_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_pnic_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_rtl8139.mod
-gpxe_rtl8139_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/rtl8139.c
-gpxe_rtl8139_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_rtl8139_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_sis900.mod
-gpxe_sis900_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/sis900.c
-gpxe_sis900_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_sis900_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_smc9000.mod
-gpxe_smc9000_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/smc9000.c
-gpxe_smc9000_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_smc9000_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_tulip.mod
-gpxe_tulip_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/tulip.c
-gpxe_tulip_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_tulip_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_w89c840.mod
-gpxe_w89c840_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/w89c840.c
-gpxe_w89c840_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_w89c840_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_nvs.mod
-gpxe_nvs_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/nvs/nvs.c
-gpxe_nvs_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_nvs_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_spi.mod
-gpxe_spi_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/nvs/spi.c
-gpxe_spi_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_spi_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_threewire.mod
-gpxe_threewire_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/nvs/threewire.c
-gpxe_threewire_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_threewire_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_bitbash.mod
-gpxe_bitbash_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/bitbash/bitbash.c
-gpxe_bitbash_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_bitbash_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_i2c_bit.mod
-gpxe_i2c_bit_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/bitbash/i2c_bit.c
-gpxe_i2c_bit_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_i2c_bit_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_spi_bit.mod
-gpxe_spi_bit_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/bitbash/spi_bit.c
-gpxe_spi_bit_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_spi_bit_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following ones require MII support which is GPLv2.
-
-#pkglib_MODULES += gpxe_amd8111e.mod
-#gpxe_amd8111e_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/amd8111e.c
-#gpxe_amd8111e_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_amd8111e_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_atl1e.mod
-#gpxe_atl1e_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/atl1e.c
-#gpxe_atl1e_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_atl1e_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_b44.mod
-#gpxe_b44_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/b44.c
-#gpxe_b44_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_b44_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_bnx2.mod
-#gpxe_bnx2_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/bnx2.c
-#gpxe_bnx2_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_bnx2_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_etherfabric.mod
-#gpxe_etherfabric_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/etherfabric.c
-#gpxe_etherfabric_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_etherfabric_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_forcedeth.mod
-#gpxe_forcedeth_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/forcedeth.c
-#gpxe_forcedeth_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_forcedeth_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_pcnet32.mod
-#gpxe_pcnet32_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/pcnet32.c
-#gpxe_pcnet32_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_pcnet32_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_mtd80x.mod
-#gpxe_mtd80x_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/mtd80x.c
-#gpxe_mtd80x_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_mtd80x_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_r8169.mod
-#gpxe_r8169_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/r8169.c
-#gpxe_r8169_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_r8169_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_sundance.mod
-#gpxe_sundance_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/sundance.c
-#gpxe_sundance_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_sundance_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_tlan.mod
-#gpxe_tlan_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/tlan.c
-#gpxe_tlan_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_tlan_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following is wireless (disabled for now)
-
-#pkglib_MODULES += gpxe_prism2.mod
-#gpxe_prism2_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/prism2.c
-#gpxe_prism2_mod_CFLAGS = $(GPXE_CFLAGS)
-# gpxe_prism2_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_prism2_pci.mod
-#gpxe_prism2_pci_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/prism2_pci.c
-#gpxe_prism2_pci_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_prism2_pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_prism2_plx.mod
-#gpxe_prism2_plx_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/prism2_plx.c
-#gpxe_prism2_plx_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_prism2_plx_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_ath5k.mod
-#gpxe_ath5k_mod_SOURCES += $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_attach.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_caps.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_desc.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_dma.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_eeprom.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_gpio.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_initvals.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_pcu.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_phy.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_qcu.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_reset.c
-#gpxe_ath5k_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_ath5k_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following requires ISA/ISAPNP. Disable for now
-
-#pkglib_MODULES += gpxe_3c509.mod
-#gpxe_3c509_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c509.c
-#gpxe_3c509_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_3c509_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_3c515.mod
-#gpxe_3c515_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c515.c
-#gpxe_3c515_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_3c515_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following uses crypto. Disable for now.
-
-#pkglib_MODULES += https.mod
-#https_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/tcp/https.c
-#https_mod_CFLAGS = $(GPXE_CFLAGS)
-#https_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += tls.mod
-#tls_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/tls.c
-#tls_mod_CFLAGS = $(GPXE_CFLAGS)
-#tls_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += aoe.mod
-#aoe_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/aoe.c
-#aoe_mod_CFLAGS = $(GPXE_CFLAGS)
-#aoe_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += iscsi.mod
-#iscsi_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/tcp/iscsi.c
-#iscsi_mod_CFLAGS = $(GPXE_CFLAGS)
-#iscsi_mod_LDFLAGS = $(COMMON_LDFLAGS)
[-- Attachment #4: lua.patch --]
[-- Type: text/x-diff, Size: 2677 bytes --]
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2010-09-21 18:01:09 +0000
@@ -0,0 +1,3 @@
+**/.deps-core
+**/.dirstamp
+Makefile.core.am
=== added file 'Makefile.core.def'
--- Makefile.core.def 1970-01-01 00:00:00 +0000
+++ Makefile.core.def 2010-09-22 08:27:22 +0000
@@ -0,0 +1,36 @@
+AutoGen definitions Makefile.tpl;
+
+module = {
+ name = lua;
+ common = contrib/lua/lapi.c;
+ common = contrib/lua/lcode.c;
+ common = contrib/lua/ldebug.c;
+ common = contrib/lua/ldo.c;
+ common = contrib/lua/ldump.c;
+ common = contrib/lua/lfunc.c;
+ common = contrib/lua/lgc.c;
+ common = contrib/lua/llex.c;
+ common = contrib/lua/lmem.c;
+ common = contrib/lua/lobject.c;
+ common = contrib/lua/lopcodes.c;
+ common = contrib/lua/lparser.c;
+ common = contrib/lua/lstate.c;
+ common = contrib/lua/lstring.c;
+ common = contrib/lua/ltable.c;
+ common = contrib/lua/ltm.c;
+ common = contrib/lua/lundump.c;
+ common = contrib/lua/lvm.c;
+ common = contrib/lua/lzio.c;
+ common = contrib/lua/lauxlib.c;
+ common = contrib/lua/lbaselib.c;
+ common = contrib/lua/linit.c;
+ common = contrib/lua/ltablib.c;
+ common = contrib/lua/lstrlib.c;
+ common = contrib/lua/grub_main.c;
+ common = contrib/lua/grub_lib.c;
+ cflags = -Wno-error;
+};
+
+/* Extra libraries for lua
+ script/lua/lmathlib.c script/lua/loslib.c script/lua/liolib.c
+ script/lua/ldblib.c script/lua/loadlib.c */
=== removed directory 'conf'
=== removed file 'conf/common.rmk'
--- conf/common.rmk 2009-10-26 20:15:26 +0000
+++ conf/common.rmk 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-# -*- makefile -*-
-
-pkglib_MODULES += lua.mod
-lua_mod_SOURCES = $(GRUB_CONTRIB)/lua/lapi.c $(GRUB_CONTRIB)/lua/lcode.c $(GRUB_CONTRIB)/lua/ldebug.c \
- $(GRUB_CONTRIB)/lua/ldo.c $(GRUB_CONTRIB)/lua/ldump.c $(GRUB_CONTRIB)/lua/lfunc.c \
- $(GRUB_CONTRIB)/lua/lgc.c $(GRUB_CONTRIB)/lua/llex.c $(GRUB_CONTRIB)/lua/lmem.c \
- $(GRUB_CONTRIB)/lua/lobject.c $(GRUB_CONTRIB)/lua/lopcodes.c $(GRUB_CONTRIB)/lua/lparser.c \
- $(GRUB_CONTRIB)/lua/lstate.c $(GRUB_CONTRIB)/lua/lstring.c $(GRUB_CONTRIB)/lua/ltable.c \
- $(GRUB_CONTRIB)/lua/ltm.c $(GRUB_CONTRIB)/lua/lundump.c $(GRUB_CONTRIB)/lua/lvm.c \
- $(GRUB_CONTRIB)/lua/lzio.c $(GRUB_CONTRIB)/lua/lauxlib.c $(GRUB_CONTRIB)/lua/lbaselib.c \
- $(GRUB_CONTRIB)/lua/linit.c $(GRUB_CONTRIB)/lua/ltablib.c $(GRUB_CONTRIB)/lua/lstrlib.c \
- $(GRUB_CONTRIB)/lua/grub_main.c $(GRUB_CONTRIB)/lua/grub_lib.c
-lua_mod_CFLAGS = $(COMMON_CFLAGS) -Wno-error
-lua_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-# Extra libraries for lua
-# script/lua/lmathlib.c script/lua/loslib.c script/lua/liolib.c
-# script/lua/ldblib.c script/lua/loadlib.c
[-- Attachment #5: ntldr-img.patch --]
[-- Type: text/x-diff, Size: 3290 bytes --]
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2010-09-21 18:01:28 +0000
@@ -0,0 +1,3 @@
+**/.deps-core
+**/.dirstamp
+Makefile.core.am
=== added file 'Makefile.core.common'
--- Makefile.core.common 1970-01-01 00:00:00 +0000
+++ Makefile.core.common 2010-09-23 12:13:53 +0000
@@ -0,0 +1,27 @@
+# Compatibility symlink.
+noinst_PROGRAMS += g2hdr.bin
+g2hdr.bin: g2hdr.img
+ rm -f $@
+ $(LN_S) $< $@
+CLEANFILES += g2hdr.bin
+
+grldr.mbr: grldr.img
+ head -c 8192 $< > $@
+CLEANFILES += grldr.mbr
+
+bin2h: contrib/ntldr-img/bin2h.c
+ $(CC) $^ -o $@
+CLEANFILES += bin2h
+
+grub_mbr.h: grldr.mbr bin2h
+ ./bin2h grub_mbr 8192 < $< > $@
+CLEANFILES += grub_mbr.h
+
+grubinst: contrib/ntldr-img/grubinst.c contrib/ntldr-img/utils.c grub_mbr.h
+ $(CC) -I. -Icontrib/ntldr-img -DLINUX -o $@ contrib/ntldr-img/grubinst.c contrib/ntldr-img/utils.c
+CLEANFILES += grubinst
+
+noinst_PROGRAMS += g2ldr.mbr
+g2ldr.mbr: grubinst
+ ./grubinst --grub2 -o $@
+CLEANFILES += g2ldr.mbr
=== added file 'Makefile.core.def'
--- Makefile.core.def 1970-01-01 00:00:00 +0000
+++ Makefile.core.def 2010-09-22 12:12:29 +0000
@@ -0,0 +1,21 @@
+AutoGen definitions Makefile.tpl;
+
+image = {
+ name = g2hdr;
+ i386_pc = contrib/ntldr-img/g2hdr.S;
+ i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x0';
+ objcopyflags = '-O binary';
+ enable = i386_pc;
+};
+
+image = {
+ name = grldr;
+ i386_pc = contrib/ntldr-img/grldrstart.S;
+ i386_pc = contrib/ntldr-img/ntfsbs.S;
+ i386_pc_ccasflags = -DGRLDR_MBR;
+ i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7c00';
+ objcopyflags = '-O binary';
+ enable = i386_pc;
+};
=== removed directory 'conf'
=== removed file 'conf/common.rmk'
--- conf/common.rmk 2009-11-29 21:12:28 +0000
+++ conf/common.rmk 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-# -*- makefile -*-
--include $(GRUB_CONTRIB)/ntldr-img/conf/$(target_cpu)-$(platform).mk
=== removed file 'conf/i386-pc.rmk'
--- conf/i386-pc.rmk 2009-11-30 02:37:58 +0000
+++ conf/i386-pc.rmk 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-# -*- makefile -*-
-
-pkglib_IMAGES += g2ldr.mbr g2hdr.bin grldr.img
-
-all: g2ldr.mbr g2hdr.bin
-
-DISTCLEANFILES += g2ldr.mbr g2hdr.bin
-
-g2hdr_bin_SOURCES = $(GRUB_CONTRIB)/ntldr-img/g2hdr.S
-g2hdr_bin_ASFLAGS = $(COMMON_ASFLAGS)
-g2hdr_bin_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)0x0
-g2hdr_bin_FORMAT = binary
-
-grldr_img_SOURCES = $(GRUB_CONTRIB)/ntldr-img/grldrstart.S $(GRUB_CONTRIB)/ntldr-img/ntfsbs.S
-grldr_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRLDR_MBR
-grldr_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)0x7c00
-grldr_img_FORMAT = binary
-
-grldr.mbr: grldr.img
- head -c 8192 $< > $@
-DISTCLEANFILES += grldr.mbr
-
-bin2h: $(GRUB_CONTRIB)/ntldr-img/bin2h.c
- $(CC) $^ -o $@
-DISTCLEANFILES += bin2h
-
-grub_mbr.h: grldr.mbr bin2h
- ./bin2h grub_mbr 8192 < $< > $@
-DISTCLEANFILES += grub_mbr.h
-
-grubinst: $(GRUB_CONTRIB)/ntldr-img/grubinst.c $(GRUB_CONTRIB)/ntldr-img/utils.c grub_mbr.h
- $(CC) -I. -I$(GRUB_CONTRIB)/ntldr-img -DLINUX -o $@ $(GRUB_CONTRIB)/ntldr-img/grubinst.c $(GRUB_CONTRIB)/ntldr-img/utils.c
-DISTCLEANFILES += grubinst
-
-g2ldr.mbr: grubinst
- ./grubinst --grub2 -o $@
-DISTCLEANFILES += g2ldr.mbr
[-- Attachment #6: zfs.patch --]
[-- Type: text/x-diff, Size: 2078 bytes --]
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2010-09-23 12:56:33 +0000
@@ -0,0 +1,5 @@
+**/.deps-core
+**/.deps-util
+**/.dirstamp
+Makefile.core.am
+Makefile.util.am
=== added file 'Makefile.common'
--- Makefile.common 1970-01-01 00:00:00 +0000
+++ Makefile.common 2010-09-21 17:44:33 +0000
@@ -0,0 +1,2 @@
+ZFS_CPPFLAGS = -Icontrib/zfs/include
+ZFS_CFLAGS = -Wno-error
=== added file 'Makefile.core.def'
--- Makefile.core.def 1970-01-01 00:00:00 +0000
+++ Makefile.core.def 2010-09-22 08:25:58 +0000
@@ -0,0 +1,18 @@
+AutoGen definitions Makefile.tpl;
+
+module = {
+ name = zfs;
+ common = contrib/zfs/zfs.c;
+ common = contrib/zfs/zfs_lzjb.c;
+ common = contrib/zfs/zfs_sha256.c;
+ common = contrib/zfs/zfs_fletcher.c;
+ cppflags = '$(ZFS_CPPFLAGS)';
+ cflags = '$(ZFS_CFLAGS)';
+};
+
+module = {
+ name = zfsinfo;
+ common = contrib/zfs/zfsinfo.c;
+ cppflags = '$(ZFS_CPPFLAGS)';
+ cflags = '$(ZFS_CFLAGS)';
+};
=== added file 'Makefile.util.def'
--- Makefile.util.def 1970-01-01 00:00:00 +0000
+++ Makefile.util.def 2010-09-22 21:06:18 +0000
@@ -0,0 +1,11 @@
+AutoGen definitions Makefile.tpl;
+
+library = {
+ name = libgrub.a;
+ common = contrib/zfs/zfs.c;
+ common = contrib/zfs/zfs_lzjb.c;
+ common = contrib/zfs/zfs_sha256.c;
+ common = contrib/zfs/zfs_fletcher.c;
+ cppflags = '$(ZFS_CPPFLAGS)';
+ cflags = '$(ZFS_CFLAGS)';
+};
=== removed directory 'conf'
=== removed file 'conf/common.rmk'
--- conf/common.rmk 2009-10-26 20:15:26 +0000
+++ conf/common.rmk 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-# -*- makefile -*-
-
-COMMON_CFLAGS += -I$(GRUB_CONTRIB)/zfs/include
-
-pkglib_MODULES += zfs.mod
-zfs_mod_SOURCES = $(GRUB_CONTRIB)/zfs/zfs.c $(GRUB_CONTRIB)/zfs/zfs_lzjb.c $(GRUB_CONTRIB)/zfs/zfs_sha256.c $(GRUB_CONTRIB)/zfs/zfs_fletcher.c
-zfs_mod_CFLAGS = $(COMMON_CFLAGS) -Wno-error
-zfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += zfsinfo.mod
-zfsinfo_mod_SOURCES = $(GRUB_CONTRIB)/zfs/zfsinfo.c
-zfsinfo_mod_CFLAGS = $(COMMON_CFLAGS) -Wno-error
-zfsinfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Re-enable grub-extras
2010-09-23 13:12 ` Colin Watson
@ 2010-09-23 14:23 ` Colin Watson
0 siblings, 0 replies; 11+ messages in thread
From: Colin Watson @ 2010-09-23 14:23 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]
On Thu, Sep 23, 2010 at 02:12:53PM +0100, Colin Watson wrote:
> On Thu, Sep 23, 2010 at 02:08:20PM +0100, Colin Watson wrote:
> > Once again, the required patches to grub-extras modules are attached.
>
> No, really! Here they are.
At Keshav's request, I made sure 'make install' worked properly. This
required one additional change to gpxe, and the updated patch for that
is attached (commenting out gpxe_depca since it doesn't build anything
useful).
Keshav asked on IRC whether grubinst could be installed. This would
probably be a one-liner, but I wanted to check if other developers
thought that was OK. I do know that Wubi uses its own build of grubinst
(it runs it itself so that it can pass the --boot-file option), so maybe
this would indeed be something users of the ntldr-img extra module would
like to have. I think it's enough of a corner case that it should go in
pkglib_PROGRAMS or something, though - I'd prefer not to get people
confused between grubinst and grub-install.
Any objections?
--
Colin Watson [cjwatson@ubuntu.com]
[-- Attachment #2: gpxe.patch --]
[-- Type: text/x-diff, Size: 25625 bytes --]
=== modified file '.bzrignore'
--- .bzrignore 2009-12-22 00:12:41 +0000
+++ .bzrignore 2010-09-21 18:31:40 +0000
@@ -1 +1,3 @@
-conf/common.mk
+**/.deps-core
+**/.dirstamp
+Makefile.core.am
=== added file 'Makefile.common'
--- Makefile.common 1970-01-01 00:00:00 +0000
+++ Makefile.common 2010-09-21 17:44:16 +0000
@@ -0,0 +1,2 @@
+GPXE_CPPFLAGS = '-DFILE_LICENCE(x)=' -Icontrib/gpxe/src/include -Icontrib/gpxe/include_wrap
+GPXE_CFLAGS = -Wno-pointer-arith -Wno-error
=== added file 'Makefile.core.def'
--- Makefile.core.def 1970-01-01 00:00:00 +0000
+++ Makefile.core.def 2010-09-23 13:48:30 +0000
@@ -0,0 +1,434 @@
+AutoGen definitions Makefile.tpl;
+
+module = {
+ name = gpxe;
+ common = contrib/gpxe/wrap/wrap.c;
+ common = contrib/gpxe/wrap/pci.c;
+ common = contrib/gpxe/wrap/nic.c;
+ common = contrib/gpxe/src/net/80211/net80211.c;
+ common = contrib/gpxe/src/net/80211/rc80211.c;
+ common = contrib/gpxe/src/net/arp.c;
+ common = contrib/gpxe/src/net/dhcpopts.c;
+ common = contrib/gpxe/src/net/dhcppkt.c;
+ common = contrib/gpxe/src/net/ethernet.c;
+ common = contrib/gpxe/src/net/fakedhcp.c;
+ common = contrib/gpxe/src/net/icmp.c;
+ common = contrib/gpxe/src/net/iobpad.c;
+ common = contrib/gpxe/src/net/ipv4.c;
+ common = contrib/gpxe/src/net/netdevice.c;
+ common = contrib/gpxe/src/net/netdev_settings.c;
+ common = contrib/gpxe/src/net/nullnet.c;
+ common = contrib/gpxe/src/net/rarp.c;
+ common = contrib/gpxe/src/net/retry.c;
+ common = contrib/gpxe/src/net/tcp/http.c;
+ common = contrib/gpxe/src/net/tcp.c;
+ common = contrib/gpxe/src/net/tcpip.c;
+ common = contrib/gpxe/src/net/udp/dhcp.c;
+ common = contrib/gpxe/src/net/udp/dns.c;
+ common = contrib/gpxe/src/net/udp/slam.c;
+ common = contrib/gpxe/src/net/udp/tftp.c;
+ common = contrib/gpxe/src/net/udp.c;
+ common = contrib/gpxe/src/core/base64.c;
+ common = contrib/gpxe/src/core/nvo.c;
+ common = contrib/gpxe/src/core/uri.c;
+ common = contrib/gpxe/src/core/uuid.c;
+ common = contrib/gpxe/src/core/random.c;
+ common = contrib/gpxe/src/core/open.c;
+ common = contrib/gpxe/src/core/cwuri.c;
+ common = contrib/gpxe/src/core/linebuf.c;
+ common = contrib/gpxe/src/core/xfer.c;
+ common = contrib/gpxe/src/core/settings.c;
+ common = contrib/gpxe/src/core/iobuf.c;
+ common = contrib/gpxe/src/core/refcnt.c;
+ common = contrib/gpxe/src/core/bitmap.c;
+ common = contrib/gpxe/src/core/process.c;
+ common = contrib/gpxe/src/core/job.c;
+ common = contrib/gpxe/src/core/resolv.c;
+ common = contrib/gpxe/src/core/interface.c;
+ common = contrib/gpxe/src/core/basename.c;
+ common = contrib/gpxe/src/core/misc.c;
+ common = contrib/gpxe/src/hci/strerror.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_infiniband;
+ common = contrib/gpxe/src/net/infiniband/ib_cm.c;
+ common = contrib/gpxe/src/net/infiniband/ib_cmrc.c;
+ common = contrib/gpxe/src/net/infiniband/ib_mcast.c;
+ common = contrib/gpxe/src/net/infiniband/ib_mi.c;
+ common = contrib/gpxe/src/net/infiniband/ib_packet.c;
+ common = contrib/gpxe/src/net/infiniband/ib_pathrec.c;
+ common = contrib/gpxe/src/net/infiniband/ib_sma.c;
+ common = contrib/gpxe/src/net/infiniband/ib_smc.c;
+ common = contrib/gpxe/src/net/infiniband/ib_srp.c;
+ common = contrib/gpxe/src/net/infiniband.c;
+ common = contrib/gpxe/src/drivers/net/ipoib.c;
+ common = contrib/gpxe/src/drivers/block/scsi.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c529;
+ common = contrib/gpxe/src/drivers/net/3c529.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c595;
+ common = contrib/gpxe/src/drivers/net/3c595.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c5x9;
+ common = contrib/gpxe/src/drivers/net/3c5x9.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c90x;
+ common = contrib/gpxe/src/drivers/net/3c90x.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_davicom;
+ common = contrib/gpxe/src/drivers/net/davicom.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+#if 0
+/* Not fixed for relocation yet. */
+module = {
+ name = gpxe_depca;
+ common = contrib/gpxe/src/drivers/net/depca.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+#endif
+
+module = {
+ name = gpxe_dmfe;
+ common = contrib/gpxe/src/drivers/net/dmfe.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_eepro100;
+ common = contrib/gpxe/src/drivers/net/eepro100.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_eepro;
+ common = contrib/gpxe/src/drivers/net/eepro.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_epic100;
+ common = contrib/gpxe/src/drivers/net/epic100.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ipoib;
+ common = contrib/gpxe/src/drivers/net/ipoib.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_legacy;
+ common = contrib/gpxe/src/drivers/net/legacy.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_natsemi;
+ common = contrib/gpxe/src/drivers/net/natsemi.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ne2k_isa;
+ common = contrib/gpxe/src/drivers/net/ne2k_isa.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ns83820;
+ common = contrib/gpxe/src/drivers/net/ns83820.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ns8390;
+ common = contrib/gpxe/src/drivers/net/ns8390.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_pnic;
+ common = contrib/gpxe/src/drivers/net/pnic.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_rtl8139;
+ common = contrib/gpxe/src/drivers/net/rtl8139.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_sis900;
+ common = contrib/gpxe/src/drivers/net/sis900.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_smc9000;
+ common = contrib/gpxe/src/drivers/net/smc9000.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_tulip;
+ common = contrib/gpxe/src/drivers/net/tulip.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_w89c840;
+ common = contrib/gpxe/src/drivers/net/w89c840.c;
+ /* Fails to preprocess without -Os! */
+ cppflags = '$(GPXE_CPPFLAGS) -Os';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_nvs;
+ common = contrib/gpxe/src/drivers/nvs/nvs.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_spi;
+ common = contrib/gpxe/src/drivers/nvs/spi.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_threewire;
+ common = contrib/gpxe/src/drivers/nvs/threewire.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_bitbash;
+ common = contrib/gpxe/src/drivers/bitbash/bitbash.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_i2c_bit;
+ common = contrib/gpxe/src/drivers/bitbash/i2c_bit.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_spi_bit;
+ common = contrib/gpxe/src/drivers/bitbash/spi_bit.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+#if 0
+
+/* Following ones require MII support which is GPLv2. */
+
+module = {
+ name = gpxe_amd8111e;
+ common = contrib/gpxe/src/drivers/net/amd8111e.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_atl1e;
+ common = contrib/gpxe/src/drivers/net/atl1e.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_b44;
+ common = contrib/gpxe/src/drivers/net/b44.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_bnx2;
+ common = contrib/gpxe/src/drivers/net/bnx2.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_etherfabric;
+ common = contrib/gpxe/src/drivers/net/etherfabric.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_forcedeth;
+ common = contrib/gpxe/src/drivers/net/forcedeth.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_pcnet32;
+ common = contrib/gpxe/src/drivers/net/pcnet32.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_mtd80x;
+ common = contrib/gpxe/src/drivers/net/mtd80x.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_r8169;
+ common = contrib/gpxe/src/drivers/net/r8169.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_sundance;
+ common = contrib/gpxe/src/drivers/net/sundance.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_tlan;
+ common = contrib/gpxe/src/drivers/net/tlan.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+/* Following is wireless (disabled for now). */
+
+module = {
+ name = gpxe_prism2;
+ common = contrib/gpxe/src/drivers/net/prism2.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_prism2_plx;
+ common = contrib/gpxe/src/drivers/net/prism2_plx.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_ath5k;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_attach.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_caps.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_desc.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_dma.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_eeprom.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_gpio.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_initvals.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_pcu.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_phy.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_qcu.c;
+ common = contrib/gpxe/src/drivers/net/ath5k/ath5k_reset.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+/* Following require ISA/ISAPNP. Disable for now. */
+
+module = {
+ name = gpxe_3c509;
+ common = contrib/gpxe/src/drivers/net/3c509.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = gpxe_3c515;
+ common = contrib/gpxe/src/drivers/net/3c515.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+/* Following uses crypto. Disable for now. */
+
+module = {
+ name = https;
+ common = contrib/gpxe/src/net/tcp/https.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = tls;
+ common = contrib/gpxe/src/net/tls.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = aoe;
+ common = contrib/gpxe/src/net/aoe.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+module = {
+ name = iscsi;
+ common = contrib/gpxe/src/net/tcp/iscsi.c;
+ cppflags = '$(GPXE_CPPFLAGS)';
+ cflags = '$(GPXE_CFLAGS)';
+};
+
+#endif
=== removed directory 'conf'
=== removed file 'conf/common.rmk'
--- conf/common.rmk 2009-12-30 18:10:26 +0000
+++ conf/common.rmk 1970-01-01 00:00:00 +0000
@@ -1,323 +0,0 @@
-# -*- makefile -*-
-
-GPXE_CFLAGS=$(COMMON_CFLAGS) '-DFILE_LICENCE(x)=' -I$(GRUB_CONTRIB)/gpxe/src/include -I$(GRUB_CONTRIB)/gpxe/include_wrap -Wno-pointer-arith -Wno-error
-
-# For gpxe.mod
-pkglib_MODULES += gpxe.mod
-gpxe_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/wrap/wrap.c \
- $(GRUB_CONTRIB)/gpxe/wrap/pci.c \
- $(GRUB_CONTRIB)/gpxe/wrap/nic.c \
- $(GRUB_CONTRIB)/gpxe/src/net/80211/net80211.c \
- $(GRUB_CONTRIB)/gpxe/src/net/80211/rc80211.c \
- $(GRUB_CONTRIB)/gpxe/src/net/arp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/dhcpopts.c \
- $(GRUB_CONTRIB)/gpxe/src/net/dhcppkt.c \
- $(GRUB_CONTRIB)/gpxe/src/net/ethernet.c \
- $(GRUB_CONTRIB)/gpxe/src/net/fakedhcp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/icmp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/iobpad.c \
- $(GRUB_CONTRIB)/gpxe/src/net/ipv4.c \
- $(GRUB_CONTRIB)/gpxe/src/net/netdevice.c \
- $(GRUB_CONTRIB)/gpxe/src/net/netdev_settings.c \
- $(GRUB_CONTRIB)/gpxe/src/net/nullnet.c \
- $(GRUB_CONTRIB)/gpxe/src/net/rarp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/retry.c \
- $(GRUB_CONTRIB)/gpxe/src/net/tcp/http.c \
- $(GRUB_CONTRIB)/gpxe/src/net/tcp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/tcpip.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/dhcp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/dns.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/slam.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp/tftp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/udp.c \
- $(GRUB_CONTRIB)/gpxe/src/core/base64.c \
- $(GRUB_CONTRIB)/gpxe/src/core/nvo.c \
- $(GRUB_CONTRIB)/gpxe/src/core/uri.c \
- $(GRUB_CONTRIB)/gpxe/src/core/uuid.c \
- $(GRUB_CONTRIB)/gpxe/src/core/random.c \
- $(GRUB_CONTRIB)/gpxe/src/core/open.c \
- $(GRUB_CONTRIB)/gpxe/src/core/cwuri.c \
- $(GRUB_CONTRIB)/gpxe/src/core/linebuf.c \
- $(GRUB_CONTRIB)/gpxe/src/core/xfer.c \
- $(GRUB_CONTRIB)/gpxe/src/core/settings.c \
- $(GRUB_CONTRIB)/gpxe/src/core/iobuf.c \
- $(GRUB_CONTRIB)/gpxe/src/core/refcnt.c \
- $(GRUB_CONTRIB)/gpxe/src/core/bitmap.c \
- $(GRUB_CONTRIB)/gpxe/src/core/process.c \
- $(GRUB_CONTRIB)/gpxe/src/core/job.c \
- $(GRUB_CONTRIB)/gpxe/src/core/resolv.c \
- $(GRUB_CONTRIB)/gpxe/src/core/interface.c \
- $(GRUB_CONTRIB)/gpxe/src/core/basename.c \
- $(GRUB_CONTRIB)/gpxe/src/core/misc.c \
- $(GRUB_CONTRIB)/gpxe/src/hci/strerror.c
-gpxe_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_infiniband.mod
-gpxe_infiniband_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_cm.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_cmrc.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_mcast.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_mi.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_packet.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_pathrec.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_sma.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_smc.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband/ib_srp.c \
- $(GRUB_CONTRIB)/gpxe/src/net/infiniband.c \
- $(GRUB_CONTRIB)/gpxe/src/drivers/net/ipoib.c \
- $(GRUB_CONTRIB)/gpxe/src/drivers/block/scsi.c
-gpxe_infiniband_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_infiniband_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c529.mod
-gpxe_3c529_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c529.c
-gpxe_3c529_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c529_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c595.mod
-gpxe_3c595_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c595.c
-gpxe_3c595_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c595_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c5x9.mod
-gpxe_3c5x9_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c5x9.c
-gpxe_3c5x9_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c5x9_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_3c90x.mod
-gpxe_3c90x_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c90x.c
-gpxe_3c90x_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_3c90x_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_davicom.mod
-gpxe_davicom_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/davicom.c
-gpxe_davicom_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_davicom_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_depca.mod
-gpxe_depca_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/depca.c
-gpxe_depca_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_depca_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_dmfe.mod
-gpxe_dmfe_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/dmfe.c
-gpxe_dmfe_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_dmfe_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_eepro100.mod
-gpxe_eepro100_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/eepro100.c
-gpxe_eepro100_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_eepro100_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_eepro.mod
-gpxe_eepro_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/eepro.c
-gpxe_eepro_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_eepro_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_epic100.mod
-gpxe_epic100_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/epic100.c
-gpxe_epic100_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_epic100_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ipoib.mod
-gpxe_ipoib_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ipoib.c
-gpxe_ipoib_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ipoib_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_legacy.mod
-gpxe_legacy_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/legacy.c
-gpxe_legacy_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_legacy_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_natsemi.mod
-gpxe_natsemi_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/natsemi.c
-gpxe_natsemi_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_natsemi_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ne2k_isa.mod
-gpxe_ne2k_isa_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ne2k_isa.c
-gpxe_ne2k_isa_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ne2k_isa_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ns83820.mod
-gpxe_ns83820_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ns83820.c
-gpxe_ns83820_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ns83820_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_ns8390.mod
-gpxe_ns8390_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/ns8390.c
-gpxe_ns8390_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_ns8390_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_pnic.mod
-gpxe_pnic_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/pnic.c
-gpxe_pnic_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_pnic_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_rtl8139.mod
-gpxe_rtl8139_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/rtl8139.c
-gpxe_rtl8139_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_rtl8139_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_sis900.mod
-gpxe_sis900_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/sis900.c
-gpxe_sis900_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_sis900_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_smc9000.mod
-gpxe_smc9000_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/smc9000.c
-gpxe_smc9000_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_smc9000_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_tulip.mod
-gpxe_tulip_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/tulip.c
-gpxe_tulip_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_tulip_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_w89c840.mod
-gpxe_w89c840_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/w89c840.c
-gpxe_w89c840_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_w89c840_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_nvs.mod
-gpxe_nvs_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/nvs/nvs.c
-gpxe_nvs_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_nvs_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_spi.mod
-gpxe_spi_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/nvs/spi.c
-gpxe_spi_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_spi_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_threewire.mod
-gpxe_threewire_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/nvs/threewire.c
-gpxe_threewire_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_threewire_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_bitbash.mod
-gpxe_bitbash_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/bitbash/bitbash.c
-gpxe_bitbash_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_bitbash_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_i2c_bit.mod
-gpxe_i2c_bit_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/bitbash/i2c_bit.c
-gpxe_i2c_bit_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_i2c_bit_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-pkglib_MODULES += gpxe_spi_bit.mod
-gpxe_spi_bit_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/bitbash/spi_bit.c
-gpxe_spi_bit_mod_CFLAGS = $(GPXE_CFLAGS)
-gpxe_spi_bit_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following ones require MII support which is GPLv2.
-
-#pkglib_MODULES += gpxe_amd8111e.mod
-#gpxe_amd8111e_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/amd8111e.c
-#gpxe_amd8111e_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_amd8111e_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_atl1e.mod
-#gpxe_atl1e_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/atl1e.c
-#gpxe_atl1e_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_atl1e_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_b44.mod
-#gpxe_b44_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/b44.c
-#gpxe_b44_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_b44_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_bnx2.mod
-#gpxe_bnx2_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/bnx2.c
-#gpxe_bnx2_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_bnx2_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_etherfabric.mod
-#gpxe_etherfabric_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/etherfabric.c
-#gpxe_etherfabric_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_etherfabric_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_forcedeth.mod
-#gpxe_forcedeth_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/forcedeth.c
-#gpxe_forcedeth_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_forcedeth_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_pcnet32.mod
-#gpxe_pcnet32_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/pcnet32.c
-#gpxe_pcnet32_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_pcnet32_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_mtd80x.mod
-#gpxe_mtd80x_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/mtd80x.c
-#gpxe_mtd80x_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_mtd80x_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_r8169.mod
-#gpxe_r8169_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/r8169.c
-#gpxe_r8169_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_r8169_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_sundance.mod
-#gpxe_sundance_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/sundance.c
-#gpxe_sundance_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_sundance_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_tlan.mod
-#gpxe_tlan_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/tlan.c
-#gpxe_tlan_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_tlan_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following is wireless (disabled for now)
-
-#pkglib_MODULES += gpxe_prism2.mod
-#gpxe_prism2_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/prism2.c
-#gpxe_prism2_mod_CFLAGS = $(GPXE_CFLAGS)
-# gpxe_prism2_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_prism2_pci.mod
-#gpxe_prism2_pci_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/prism2_pci.c
-#gpxe_prism2_pci_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_prism2_pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_prism2_plx.mod
-#gpxe_prism2_plx_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/prism2_plx.c
-#gpxe_prism2_plx_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_prism2_plx_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_ath5k.mod
-#gpxe_ath5k_mod_SOURCES += $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_attach.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_caps.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_desc.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_dma.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_eeprom.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_gpio.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_initvals.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_pcu.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_phy.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_qcu.c $(GRUB_CONTRIB)/gpxe/src/drivers/net/ath5k/ath5k_reset.c
-#gpxe_ath5k_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_ath5k_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following requires ISA/ISAPNP. Disable for now
-
-#pkglib_MODULES += gpxe_3c509.mod
-#gpxe_3c509_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c509.c
-#gpxe_3c509_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_3c509_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += gpxe_3c515.mod
-#gpxe_3c515_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/drivers/net/3c515.c
-#gpxe_3c515_mod_CFLAGS = $(GPXE_CFLAGS)
-#gpxe_3c515_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#Following uses crypto. Disable for now.
-
-#pkglib_MODULES += https.mod
-#https_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/tcp/https.c
-#https_mod_CFLAGS = $(GPXE_CFLAGS)
-#https_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += tls.mod
-#tls_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/tls.c
-#tls_mod_CFLAGS = $(GPXE_CFLAGS)
-#tls_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += aoe.mod
-#aoe_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/aoe.c
-#aoe_mod_CFLAGS = $(GPXE_CFLAGS)
-#aoe_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
-#pkglib_MODULES += iscsi.mod
-#iscsi_mod_SOURCES = $(GRUB_CONTRIB)/gpxe/src/net/tcp/iscsi.c
-#iscsi_mod_CFLAGS = $(GPXE_CFLAGS)
-#iscsi_mod_LDFLAGS = $(COMMON_LDFLAGS)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Re-enable grub-extras
2010-09-23 13:08 ` Colin Watson
2010-09-23 13:12 ` Colin Watson
@ 2010-09-23 14:36 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-24 9:09 ` Colin Watson
2010-09-23 20:27 ` [PATCH] Trunk: usbtrans.c - wrong max packet size for bulk transfer Aleš Nesrsta
2 siblings, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-09-23 14:36 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 19637 bytes --]
Go ahead for both trunk and extras
On 09/23/2010 03:08 PM, Colin Watson wrote:
> On Tue, Sep 21, 2010 at 07:35:30PM +0100, Colin Watson wrote:
>
>> Here's a patch to re-enable grub-extras by allowing extra modules to
>> provide Autogen definitions files. A few things to note:
>>
> Vladimir commented on this on IRC, noting three problems. In reverse
> order of complexity:
>
> 1) The GRUB_CONTRIB check in autogen.sh should also check for
> grub-core/contrib.
>
> Fixed.
>
> 2) What's the problem with renaming g2hdr.bin to g2hdr.img?
>
> I know of at least one piece of software which expects the current file
> name: win32-loader, written by Robert and maintained in Debian. It
> probably wouldn't be completely awful to change this, but it would be
> nice not to need to. That said, perhaps g2hdr.bin could be a symlink to
> g2hdr.img (which could be done in Makefile.common). I've updated my
> patch to do this, and removed the extension-override facility from
> gentpl.py.
>
> 3) It would be nice if extra modules could add new sources to existing
> targets defined in one of the main definitions files: for example, it
> would be useful to be able to add zfs to libgrub.a.
>
> This was the hard bit that took me a day or two to fix.
>
> Vladimir's original suggestion on IRC was to create a separate
> libgrubzfs.a and arrange to link the utilities with that as well. When
> I looked into this, I decided that I didn't like this approach because
> it simply pushes the problem of appending to an existing list up a
> level; as far as the Autogen definitions go, there isn't a significant
> difference between appending to grub_probe_LDADD and appending to
> libgrub_a_SOURCES. I would prefer to solve this some other way.
>
> My preferred approach is to try not to expose any of the difficulties in
> the definitions file, so that it can just look like this:
>
> library = {
> name = libgrub.a;
> common = contrib/zfs/zfs.c;
> common = contrib/zfs/zfs_lzjb.c;
> common = contrib/zfs/zfs_sha256.c;
> common = contrib/zfs/zfs_fletcher.c;
> cppflags = '$(ZFS_CPPFLAGS)';
> cflags = '$(ZFS_CFLAGS)';
> };
>
> Doing this actually turned out to be very difficult because Autogen's
> native macros aren't powerful enough: they can only really emit text
> rather than using temporary storage, which means that you can't do
> things like "look for all the library blocks with the same name and
> concatenate them" or "append to _SOURCES variables if we've seen them
> before". Some Automake variables can be handled with simple appends
> while some of them have some boilerplate only at the start which
> shouldn't be repeated; Automake variables must be initialised exactly
> once on all possible intersections of conditional paths; and we should
> also avoid generating duplicate rules. All these constraints make it a
> hard problem.
>
> Fortunately, Autogen supports embedding bits of Guile, which makes the
> problem merely hard rather than impossible. I tried a few different
> approaches, and the one that I found to be most practical is in the
> following patch: effectively we remember whether we've seen a given
> target before and treat it slightly differently, and furthermore we emit
> initialisations for non-global variables to avoid problems with
> Automake's restrictions on variable initialisation.
>
> For now, I only implemented this for 'library' blocks, so something that
> wants to compile extra files into the GRUB kernel for example will be
> out of luck. If people feel this is an onerous restriction then it's
> fairly easy to fix; I was just trying not to change too much at once,
> particularly for paths I wasn't going to test.
>
> Doing this involved feeding all the files relevant to a given Automake
> input stream to Autogen in one go, so I eliminated Makefile.gcry.am.
>
> This was an exercise in programming in six languages at once (Python,
> Autogen native macros, Guile, Autogen definitions, Automake, and make).
> I found it to be a bit much, and my impression is that Autogen got in
> the way more than it helped. I suggest that after 1.99 we should look
> at having a Python program generate Automake input directly, which would
> avoid many contortions and allow us to improve the output (it could
> merge the multiple _SOURCES lines into just one per conditional path,
> for instance). The .def file format is of course just fine as it is,
> and could easily be preserved.
>
>
>> * Extra modules may also provide Makefile.common with literal Automake
>> input, for those cases where it's too hard to cram things into
>> Autogen.
>>
> I also added Makefile.core.common and Makefile.util.common (starting to
> run out of good names) for literal Automake input that should only be
> used in grub-core or at the top level respectively. ntldr-img needed
> the former.
>
> Once again, the required patches to grub-extras modules are attached.
>
> 2010-09-22 Colin Watson <cjwatson@ubuntu.com>
>
> Re-enable grub-extras.
>
> * autogen.sh: Create symlinks to ${GRUB_CONTRIB} if necessary to
> avoid confusing Automake. Run autogen only twice, once for the top
> level and once for grub-core. Add Makefile.util.def and
> Makefile.core.def from extra modules to the appropriate autogen
> invocations. If Makefile.common exists in an extra module, include
> it in both Makefile.util.am and grub-core/Makefile.core.am;
> similarly, include any Makefile.util.common file in Makefile.util.am
> and any Makefile.core.common file in grub-core/Makefile.core.am.
> * conf/Makefile.common ($(top_srcdir)/grub-core/Makefile.core.am):
> Depend on $(top_srcdir)/grub-core/Makefile.gcry.def.
> ($(top_srcdir)/grub-core/Makefile.gcry.def): Remove.
> * grub-core/Makefile.am: Remove inclusion of Makefile.gcry.am.
>
> * gentpl.py (gvar_add): Turn GVARS into a set.
> (global_variable_initializers): Sort global variables on output.
> (vars_init): New function.
> (first_time): Likewise.
> (library): Ensure that non-global variable initialisations are
> emitted before the first time we emit code for a library block.
> Append to variables rather than setting them. Only emit
> noinst_LIBRARIES, BUILT_SOURCES, and CLEANFILES the first time for
> each conditional path.
> (program): installdir() emits an Autogen macro, so must be passed to
> var_add rather than gvar_add.
> (data): Likewise.
> (script): Likewise.
> (rules): New function, centralising handling for different target
> types. Set up Guile association lists for first_time and vars_init,
> and send most output to a diversion so that variable initialisations
> can be emitted first.
> (module_rules): Use new rules function.
> (kernel_rules): Likewise.
> (image_rules): Likewise.
> (library_rules): Likewise.
> (program_rules): Likewise.
> (script_rules): Likewise.
> (data_rules): Likewise.
>
> * configure.ac: Add AC_PROG_LN_S, for the benefit of ntldr-img.
>
> * .bzrignore: Add contrib and grub-core/contrib. Remove
> grub-core/Makefile.gcry.am.
>
> === modified file '.bzrignore'
> --- .bzrignore 2010-09-20 13:03:47 +0000
> +++ .bzrignore 2010-09-22 13:07:15 +0000
> @@ -104,9 +104,10 @@ grub-core/lib/libgcrypt-grub
> **/.deps-core
> **/.dirstamp
> Makefile.util.am
> +contrib
> grub-core/Makefile.core.am
> -grub-core/Makefile.gcry.am
> grub-core/Makefile.gcry.def
> +grub-core/contrib
> grub-core/genmod.sh
> grub-core/gensyminfo.sh
> grub-core/*.module
>
> === modified file 'autogen.sh'
> --- autogen.sh 2010-08-23 08:37:29 +0000
> +++ autogen.sh 2010-09-23 10:36:52 +0000
> @@ -14,9 +14,50 @@ echo "Creating Makefile.tpl..."
> python gentpl.py | sed -e '/^$/{N;/^\n$/D;}' > Makefile.tpl
>
> echo "Running autogen..."
> -autogen -T Makefile.tpl Makefile.util.def | sed -e '/^$/{N;/^\n$/D;}' > Makefile.util.am
> -autogen -T Makefile.tpl grub-core/Makefile.core.def | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.core.am
> -autogen -T Makefile.tpl grub-core/Makefile.gcry.def | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.gcry.am
> +
> +# Automake doesn't like including files from a path outside the project.
> +rm -f contrib grub-core/contrib
> +if [ "x${GRUB_CONTRIB}" != x ]; then
> + [ "${GRUB_CONTRIB}" = contrib ] || ln -s "${GRUB_CONTRIB}" contrib
> + [ "${GRUB_CONTRIB}" = grub-core/contrib ] || ln -s ../contrib grub-core/contrib
> +fi
> +
> +UTIL_DEFS=Makefile.util.def
> +CORE_DEFS='grub-core/Makefile.core.def grub-core/Makefile.gcry.def'
> +
> +for extra in contrib/*/Makefile.util.def; do
> + if test -e "$extra"; then
> + UTIL_DEFS="$UTIL_DEFS $extra"
> + fi
> +done
> +
> +for extra in contrib/*/Makefile.core.def; do
> + if test -e "$extra"; then
> + CORE_DEFS="$CORE_DEFS $extra"
> + fi
> +done
> +
> +cat $UTIL_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > Makefile.util.am
> +cat $CORE_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.core.am
> +
> +for extra in contrib/*/Makefile.common; do
> + if test -e "$extra"; then
> + echo "include $extra" >> Makefile.util.am
> + echo "include $extra" >> grub-core/Makefile.core.am
> + fi
> +done
> +
> +for extra in contrib/*/Makefile.util.common; do
> + if test -e "$extra"; then
> + echo "include $extra" >> Makefile.util.am
> + fi
> +done
> +
> +for extra in contrib/*/Makefile.core.common; do
> + if test -e "$extra"; then
> + echo "include $extra" >> grub-core/Makefile.core.am
> + fi
> +done
>
> echo "Saving timestamps..."
> echo timestamp > stamp-h.in
>
> === modified file 'conf/Makefile.common'
> --- conf/Makefile.common 2010-09-21 12:37:50 +0000
> +++ conf/Makefile.common 2010-09-22 13:09:44 +0000
> @@ -146,11 +146,7 @@ $(top_srcdir)/Makefile.util.am: $(top_sr
> mv $@.new $@
>
> .PRECIOUS: $(top_srcdir)/grub-core/Makefile.core.am
> -$(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/Makefile.tpl
> - autogen -T $(top_srcdir)/Makefile.tpl $< | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
> - mv $@.new $@
> -
> -.PRECIOUS: $(top_srcdir)/grub-core/Makefile.gcry.am
> -$(top_srcdir)/grub-core/Makefile.gcry.am: $(top_srcdir)/grub-core/Makefile.gcry.def $(top_srcdir)/Makefile.tpl
> - autogen -T $(top_srcdir)/Makefile.tpl $< | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
> +$(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def $(top_srcdir)/Makefile.tpl
> + if [ "x$$GRUB_CONTRIB" != x ]; then echo "You need to run ./autogen.sh manually." >&2; exit 1; fi
> + autogen -T $(top_srcdir)/Makefile.tpl $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
> mv $@.new $@
>
> === modified file 'configure.ac'
> --- configure.ac 2010-09-21 09:42:30 +0000
> +++ configure.ac 2010-09-22 12:11:35 +0000
> @@ -235,6 +235,7 @@ AC_PROG_LEX
> AC_PROG_YACC
> AC_PROG_MAKE_SET
> AC_PROG_MKDIR_P
> +AC_PROG_LN_S
>
> if test "x$LEX" = "x:"; then
> AC_MSG_ERROR([flex is not found])
>
> === modified file 'gentpl.py'
> --- gentpl.py 2010-09-19 13:24:45 +0000
> +++ gentpl.py 2010-09-22 21:01:22 +0000
> @@ -70,16 +70,15 @@ for platform in GRUB_PLATFORMS:
> #
> # Global variables
> #
> -GVARS = []
> +GVARS = set()
>
> def gvar_add(var, value):
> - if var not in GVARS:
> - GVARS.append(var)
> + GVARS.add(var)
> return var + " += " + value + "\n"
>
> def global_variable_initializers():
> r = ""
> - for var in GVARS:
> + for var in sorted(GVARS):
> r += var + " ?= \n"
> return r
>
> @@ -87,6 +86,16 @@ def global_variable_initializers():
> # Per PROGRAM/SCRIPT variables
> #
>
> +def vars_init(*var_list):
> + r = "[+ IF (if (not (assoc-ref seen-vars (get \".name\"))) \"seen\") +]"
> + r += "[+ (out-suspend \"v\") +]"
> + for var in var_list:
> + r += var + " = \n"
> + r += "[+ (out-resume \"v\") +]"
> + r += "[+ (set! seen-vars (assoc-set! seen-vars (get \".name\") 0)) +]"
> + r += "[+ ENDIF +]"
> + return first_time(r)
> +
> def var_set(var, value):
> return var + " = " + value + "\n"
>
> @@ -257,6 +266,15 @@ def platform_ccasflags(p): return platfo
> def platform_stripflags(p): return platform_specific_values(p, "_stripflags", "stripflags")
> def platform_objcopyflags(p): return platform_specific_values(p, "_objcopyflags", "objcopyflags")
>
> +#
> +# Emit snippet only the first time through for the current name.
> +#
> +def first_time(snippet):
> + r = "[+ IF (if (not (assoc-ref seen-target (get \".name\"))) \"seen\") +]"
> + r += snippet
> + r += "[+ ENDIF +]"
> + return r
> +
> def module(platform):
> r = set_canonical_name_suffix(".module")
>
> @@ -341,18 +359,25 @@ fi
>
> def library(platform):
> r = set_canonical_name_suffix("")
> - r += gvar_add("noinst_LIBRARIES", "[+ name +]")
> - r += var_set(cname() + "_SOURCES", platform_sources(platform))
> - r += var_set("nodist_" + cname() + "_SOURCES", platform_nodist_sources(platform))
> - r += var_set(cname() + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_LIBRARY) " + platform_cflags(platform))
> - r += var_set(cname() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) " + platform_cppflags(platform))
> - r += var_set(cname() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY) " + platform_ccasflags(platform))
> - # r += var_set(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
>
> - r += gvar_add("EXTRA_DIST", extra_dist())
> - r += gvar_add("BUILT_SOURCES", "$(nodist_" + cname() + "_SOURCES)")
> - r += gvar_add("CLEANFILES", "$(nodist_" + cname() + "_SOURCES)")
> + r += vars_init(cname() + "_SOURCES",
> + "nodist_" + cname() + "_SOURCES",
> + cname() + "_CFLAGS",
> + cname() + "_CPPFLAGS",
> + cname() + "_CCASFLAGS")
> + # cname() + "_DEPENDENCIES")
>
> + r += first_time(gvar_add("noinst_LIBRARIES", "[+ name +]"))
> + r += var_add(cname() + "_SOURCES", platform_sources(platform))
> + r += var_add("nodist_" + cname() + "_SOURCES", platform_nodist_sources(platform))
> + r += var_add(cname() + "_CFLAGS", first_time("$(AM_CFLAGS) $(CFLAGS_LIBRARY) ") + platform_cflags(platform))
> + r += var_add(cname() + "_CPPFLAGS", first_time("$(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) ") + platform_cppflags(platform))
> + r += var_add(cname() + "_CCASFLAGS", first_time("$(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY) ") + platform_ccasflags(platform))
> + # r += var_add(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
> +
> + r += gvar_add("EXTRA_DIST", extra_dist())
> + r += first_time(gvar_add("BUILT_SOURCES", "$(nodist_" + cname() + "_SOURCES)"))
> + r += first_time(gvar_add("CLEANFILES", "$(nodist_" + cname() + "_SOURCES)"))
> return r
>
> def installdir(default="bin"):
> @@ -376,7 +401,7 @@ def program(platform, test=False):
> r += gvar_add("check_PROGRAMS", "[+ name +]")
> r += gvar_add("TESTS", "[+ name +]")
> r += "[+ ELSE +]"
> - r += gvar_add(installdir() + "_PROGRAMS", "[+ name +]")
> + r += var_add(installdir() + "_PROGRAMS", "[+ name +]")
> r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]"
> r += "[+ ENDIF +]"
>
> @@ -397,7 +422,7 @@ def program(platform, test=False):
> def data(platform):
> r = gvar_add("EXTRA_DIST", platform_sources(platform))
> r += gvar_add("EXTRA_DIST", extra_dist())
> - r += gvar_add(installdir() + "_DATA", platform_sources(platform))
> + r += var_add(installdir() + "_DATA", platform_sources(platform))
> return r
>
> def script(platform):
> @@ -405,7 +430,7 @@ def script(platform):
> r += gvar_add("check_SCRIPTS", "[+ name +]")
> r += gvar_add ("TESTS", "[+ name +]")
> r += "[+ ELSE +]"
> - r += gvar_add(installdir() + "_SCRIPTS", "[+ name +]")
> + r += var_add(installdir() + "_SCRIPTS", "[+ name +]")
> r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]"
> r += "[+ ENDIF +]"
>
> @@ -418,33 +443,43 @@ chmod a+x [+ name +]
> r += gvar_add("dist_noinst_DATA", platform_sources(platform))
> return r
>
> +def rules(target, closure):
> + # Create association lists for the benefit of first_time and vars_init.
> + r = "[+ (define seen-target '()) +]"
> + r += "[+ (define seen-vars '()) +]"
> + # Most output goes to a diversion. This allows us to emit variable
> + # initializations before everything else.
> + r += "[+ (out-push-new) +]"
> +
> + r += "[+ FOR " + target + " +]"
> + r += foreach_enabled_platform(
> + lambda p: under_platform_specific_conditionals(p, closure(p)))
> + # Remember that we've seen this target.
> + r += "[+ (set! seen-target (assoc-set! seen-target (get \".name\") 0)) +]"
> + r += "[+ ENDFOR +]"
> + r += "[+ (out-pop #t) +]"
> + return r
> +
> def module_rules():
> - return "[+ FOR module +]" + foreach_enabled_platform(
> - lambda p: under_platform_specific_conditionals(p, module(p))) + "[+ ENDFOR +]"
> + return rules("module", module)
>
> def kernel_rules():
> - return "[+ FOR kernel +]" + foreach_enabled_platform(
> - lambda p: under_platform_specific_conditionals(p, kernel(p))) + "[+ ENDFOR +]"
> + return rules("kernel", kernel)
>
> def image_rules():
> - return "[+ FOR image +]" + foreach_enabled_platform(
> - lambda p: under_platform_specific_conditionals(p, image(p))) + "[+ ENDFOR +]"
> + return rules("image", image)
>
> def library_rules():
> - return "[+ FOR library +]" + foreach_enabled_platform(
> - lambda p: under_platform_specific_conditionals(p, library(p))) + "[+ ENDFOR +]"
> + return rules("library", library)
>
> def program_rules():
> - return "[+ FOR program +]" + foreach_enabled_platform(
> - lambda p: under_platform_specific_conditionals(p, program(p))) + "[+ ENDFOR +]"
> + return rules("program", program)
>
> def script_rules():
> - return "[+ FOR script +]" + foreach_enabled_platform(
> - lambda p: under_platform_specific_conditionals(p, script(p))) + "[+ ENDFOR +]"
> + return rules("script", script)
>
> def data_rules():
> - return "[+ FOR data +]" + foreach_enabled_platform(
> - lambda p: under_platform_specific_conditionals(p, data(p))) + "[+ ENDFOR +]"
> + return rules("data", data)
>
> print "[+ AutoGen5 template +]\n"
> a = module_rules()
>
> === modified file 'grub-core/Makefile.am'
> --- grub-core/Makefile.am 2010-09-19 20:22:43 +0000
> +++ grub-core/Makefile.am 2010-09-22 13:11:11 +0000
> @@ -51,7 +51,6 @@ grub_script.yy.c: grub_script.yy.h
> CLEANFILES += grub_script.yy.c grub_script.yy.h
>
> include $(srcdir)/Makefile.core.am
> -include $(srcdir)/Makefile.gcry.am
>
> KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
> KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
>
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] Trunk: usbtrans.c - wrong max packet size for bulk transfer
2010-09-23 13:08 ` Colin Watson
2010-09-23 13:12 ` Colin Watson
2010-09-23 14:36 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-09-23 20:27 ` Aleš Nesrsta
2010-10-01 7:35 ` Vladimir 'φ-coder/phcoder' Serbinenko
2 siblings, 1 reply; 11+ messages in thread
From: Aleš Nesrsta @ 2010-09-23 20:27 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 840 bytes --]
Hi,
I discovered problem which happens if bulk EP has shorter wMaxPacketSize
value than control (zero) EP.
There was bug in usbtrans.c, see patch.
Another problem happens when bulk EP has wMaxPacketSize <= 16 - in this
case transfer error happens because it is not possible to allocate
sufficient number of TDs.
It can happen - according USB1.1 specification, any bulk EP can have
wMaxPacketSize value equal to 8, 16, 32 or 64 (USB 2.0 capable bulk EP
can have 512).
So I increased number of TDs in UHCI and OHCI driver to 640 - it should
be enough for the worse case wMaxPacketSize=8, with some reserve for
"background" communication.
I successfully tested included patch on UHCI with GARMIN OREGON 300
which has:
EP1 (OUT) wMaxPacketSize = 64
EP3 (IN) wMaxPacketSize = 16
(i.e. this device is related to both problems)
Regards
Ales
[-- Attachment #2: usb_maxpacketbulk_100923_0 --]
[-- Type: text/x-patch, Size: 2189 bytes --]
diff -urB ./grub/grub-core/bus/usb/ohci.c ./grub_patched/grub-core/bus/usb/ohci.c
--- ./grub/grub-core/bus/usb/ohci.c 2010-09-23 21:45:45.000000000 +0200
+++ ./grub_patched/grub-core/bus/usb/ohci.c 2010-09-23 21:13:00.000000000 +0200
@@ -150,7 +150,7 @@
#define GRUB_OHCI_RESET_CONNECT_CHANGE (1 << 16)
#define GRUB_OHCI_CTRL_EDS 256
#define GRUB_OHCI_BULK_EDS 510
-#define GRUB_OHCI_TDS 256
+#define GRUB_OHCI_TDS 640
#define GRUB_OHCI_ED_ADDR_MASK 0x7ff
diff -urB ./grub/grub-core/bus/usb/uhci.c ./grub_patched/grub-core/bus/usb/uhci.c
--- ./grub/grub-core/bus/usb/uhci.c 2010-09-23 21:45:45.000000000 +0200
+++ ./grub_patched/grub-core/bus/usb/uhci.c 2010-09-23 21:11:58.000000000 +0200
@@ -29,6 +29,7 @@
#define GRUB_UHCI_IOMASK (0x7FF << 5)
#define N_QH 256
+#define N_TD 640
typedef enum
{
@@ -105,7 +106,7 @@
/* N_QH Queue Heads. */
grub_uhci_qh_t qh;
- /* 256 Transfer Descriptors. */
+ /* N_TD Transfer Descriptors. */
grub_uhci_td_t td;
/* Free Transfer Descriptors. */
@@ -227,7 +228,7 @@
/* The TD pointer of UHCI is only 32 bits, make sure this
code works on on 64 bits architectures. */
- u->td = (grub_uhci_td_t) grub_memalign (4096, 4096*2);
+ u->td = (grub_uhci_td_t) grub_memalign (4096, 32*N_TD);
if (! u->td)
goto fail;
@@ -244,9 +245,9 @@
/* Link all Transfer Descriptors in a list of available Transfer
Descriptors. */
- for (i = 0; i < 256; i++)
+ for (i = 0; i < N_TD; i++)
u->td[i].linkptr = (grub_uint32_t) (grub_addr_t) &u->td[i + 1];
- u->td[255 - 1].linkptr = 0;
+ u->td[N_TD - 2].linkptr = 0;
u->tdfree = u->td;
/* Make sure UHCI is disabled! */
diff -urB ./grub/grub-core/bus/usb/usbtrans.c ./grub_patched/grub-core/bus/usb/usbtrans.c
--- ./grub/grub-core/bus/usb/usbtrans.c 2010-09-23 21:45:45.000000000 +0200
+++ ./grub_patched/grub-core/bus/usb/usbtrans.c 2010-09-23 21:13:56.000000000 +0200
@@ -228,7 +228,7 @@
if (dev->initialized)
{
struct grub_usb_desc_endp *endpdesc;
- endpdesc = grub_usb_get_endpdescriptor (dev, 0);
+ endpdesc = grub_usb_get_endpdescriptor (dev, endpoint);
if (endpdesc)
max = endpdesc->maxpacket;
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Re-enable grub-extras
2010-09-23 14:36 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-09-24 9:09 ` Colin Watson
0 siblings, 0 replies; 11+ messages in thread
From: Colin Watson @ 2010-09-24 9:09 UTC (permalink / raw)
To: grub-devel
On Thu, Sep 23, 2010 at 04:36:33PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> Go ahead for both trunk and extras
Thanks. I've committed all this now. Note that this means that
grub-extras is no longer compatible with 1.98; there were some modules
where the contortions required to do that would have been too
complicated, such as lua where some of the interfaces it was using in
GRUB proper changed. I hope this doesn't inconvenience anyone too much
(I know Robert has been hacking on the zfs module quite a bit), but it
doesn't seem too unreasonable given that 1.99 is close to release. If
you need 1.98-compatible code, I suggest either using the 1.98 tag in
each module, or making a branch.
The grubinst question remains slightly open; rough consensus on IRC
seems to be to rename it to grub-mkntldrimg and install it, but I
haven't got round to this yet.
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Trunk: usbtrans.c - wrong max packet size for bulk transfer
2010-09-23 20:27 ` [PATCH] Trunk: usbtrans.c - wrong max packet size for bulk transfer Aleš Nesrsta
@ 2010-10-01 7:35 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-10-01 15:07 ` Aleš Nesrsta
0 siblings, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-10-01 7:35 UTC (permalink / raw)
To: grub-devel
On 09/23/2010 10:27 PM, Aleš Nesrsta wrote:
> code works on on 64 bits architectures. */
> - u->td = (grub_uhci_td_t) grub_memalign (4096, 4096*2);
> + u->td = (grub_uhci_td_t) grub_memalign (4096, 32*N_TD);
> if (! u->td)
> goto fail;
>
Could you use sizeof while on it?
- endpdesc = grub_usb_get_endpdescriptor (dev, 0);
+ endpdesc = grub_usb_get_endpdescriptor (dev, endpoint);
It's hard to see the context of this change. Could you use --diff-options=-p in the future?
Other than that this patch is ok for trunk
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Trunk: usbtrans.c - wrong max packet size for bulk transfer
2010-10-01 7:35 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-10-01 15:07 ` Aleš Nesrsta
2010-10-01 18:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 11+ messages in thread
From: Aleš Nesrsta @ 2010-10-01 15:07 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 741 bytes --]
Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> On 09/23/2010 10:27 PM, Aleš Nesrsta wrote:
> > code works on on 64 bits architectures. */
> > - u->td = (grub_uhci_td_t) grub_memalign (4096, 4096*2);
> > + u->td = (grub_uhci_td_t) grub_memalign (4096, 32*N_TD);
> > if (! u->td)
> > goto fail;
> >
> Could you use sizeof while on it?
>
> - endpdesc = grub_usb_get_endpdescriptor (dev, 0);
> + endpdesc = grub_usb_get_endpdescriptor (dev, endpoint);
> It's hard to see the context of this change. Could you use --diff-options=-p in the future?
> Other than that this patch is ok for trunk
Hi,
there is corrected patch (with sizeof and -p) for review before going to
trunk.
Regards
Ales
[-- Attachment #2: usb_maxpacketbulk_101001_0 --]
[-- Type: text/x-patch, Size: 2718 bytes --]
diff -purB ./grub/grub-core/bus/usb/ohci.c ./grub_patched/grub-core/bus/usb/ohci.c
--- ./grub/grub-core/bus/usb/ohci.c 2010-09-30 22:17:31.000000000 +0200
+++ ./grub_patched/grub-core/bus/usb/ohci.c 2010-10-01 11:24:29.000000000 +0200
@@ -150,7 +150,7 @@ typedef enum
#define GRUB_OHCI_RESET_CONNECT_CHANGE (1 << 16)
#define GRUB_OHCI_CTRL_EDS 256
#define GRUB_OHCI_BULK_EDS 510
-#define GRUB_OHCI_TDS 256
+#define GRUB_OHCI_TDS 640
#define GRUB_OHCI_ED_ADDR_MASK 0x7ff
diff -purB ./grub/grub-core/bus/usb/uhci.c ./grub_patched/grub-core/bus/usb/uhci.c
--- ./grub/grub-core/bus/usb/uhci.c 2010-09-30 22:17:31.000000000 +0200
+++ ./grub_patched/grub-core/bus/usb/uhci.c 2010-10-01 11:31:44.000000000 +0200
@@ -29,6 +29,7 @@
#define GRUB_UHCI_IOMASK (0x7FF << 5)
#define N_QH 256
+#define N_TD 640
typedef enum
{
@@ -105,7 +106,7 @@ struct grub_uhci
/* N_QH Queue Heads. */
grub_uhci_qh_t qh;
- /* 256 Transfer Descriptors. */
+ /* N_TD Transfer Descriptors. */
grub_uhci_td_t td;
/* Free Transfer Descriptors. */
@@ -213,7 +214,7 @@ grub_uhci_pci_iter (grub_pci_device_t de
/* The QH pointer of UHCI is only 32 bits, make sure this
code works on on 64 bits architectures. */
- u->qh = (grub_uhci_qh_t) grub_memalign (4096, 4096);
+ u->qh = (grub_uhci_qh_t) grub_memalign (4096, sizeof(struct grub_uhci_qh)*N_QH);
if (! u->qh)
goto fail;
@@ -227,7 +228,7 @@ grub_uhci_pci_iter (grub_pci_device_t de
/* The TD pointer of UHCI is only 32 bits, make sure this
code works on on 64 bits architectures. */
- u->td = (grub_uhci_td_t) grub_memalign (4096, 4096*2);
+ u->td = (grub_uhci_td_t) grub_memalign (4096, sizeof(struct grub_uhci_td)*N_TD);
if (! u->td)
goto fail;
@@ -244,9 +245,9 @@ grub_uhci_pci_iter (grub_pci_device_t de
/* Link all Transfer Descriptors in a list of available Transfer
Descriptors. */
- for (i = 0; i < 256; i++)
+ for (i = 0; i < N_TD; i++)
u->td[i].linkptr = (grub_uint32_t) (grub_addr_t) &u->td[i + 1];
- u->td[255 - 1].linkptr = 0;
+ u->td[N_TD - 2].linkptr = 0;
u->tdfree = u->td;
/* Make sure UHCI is disabled! */
diff -purB ./grub/grub-core/bus/usb/usbtrans.c ./grub_patched/grub-core/bus/usb/usbtrans.c
--- ./grub/grub-core/bus/usb/usbtrans.c 2010-09-30 22:17:31.000000000 +0200
+++ ./grub_patched/grub-core/bus/usb/usbtrans.c 2010-10-01 11:24:29.000000000 +0200
@@ -228,7 +228,7 @@ grub_usb_bulk_setup_readwrite (grub_usb_
if (dev->initialized)
{
struct grub_usb_desc_endp *endpdesc;
- endpdesc = grub_usb_get_endpdescriptor (dev, 0);
+ endpdesc = grub_usb_get_endpdescriptor (dev, endpoint);
if (endpdesc)
max = endpdesc->maxpacket;
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Trunk: usbtrans.c - wrong max packet size for bulk transfer
2010-10-01 15:07 ` Aleš Nesrsta
@ 2010-10-01 18:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-10-02 18:58 ` Aleš Nesrsta
0 siblings, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-10-01 18:33 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]
On 10/01/2010 05:07 PM, Aleš Nesrsta wrote:
> Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>
>> On 09/23/2010 10:27 PM, Aleš Nesrsta wrote:
>>
>>> code works on on 64 bits architectures. */
>>> - u->td = (grub_uhci_td_t) grub_memalign (4096, 4096*2);
>>> + u->td = (grub_uhci_td_t) grub_memalign (4096, 32*N_TD);
>>> if (! u->td)
>>> goto fail;
>>>
>>>
>> Could you use sizeof while on it?
>>
>> - endpdesc = grub_usb_get_endpdescriptor (dev, 0);
>> + endpdesc = grub_usb_get_endpdescriptor (dev, endpoint);
>> It's hard to see the context of this change. Could you use --diff-options=-p in the future?
>> Other than that this patch is ok for trunk
>>
> Hi,
> there is corrected patch (with sizeof and -p) for review before going to
> trunk.
> Regards
> Ales
>
>
Go ahead
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Trunk: usbtrans.c - wrong max packet size for bulk transfer
2010-10-01 18:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-10-02 18:58 ` Aleš Nesrsta
0 siblings, 0 replies; 11+ messages in thread
From: Aleš Nesrsta @ 2010-10-02 18:58 UTC (permalink / raw)
To: The development of GNU GRUB
Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> > Hi,
> > there is corrected patch (with sizeof and -p) for review before going to
> > trunk.
> > Regards
> > Ales
> >
> >
> Go ahead
Done, revision 2873.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-10-02 18:58 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21 18:35 [PATCH] Re-enable grub-extras Colin Watson
2010-09-23 13:08 ` Colin Watson
2010-09-23 13:12 ` Colin Watson
2010-09-23 14:23 ` Colin Watson
2010-09-23 14:36 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-24 9:09 ` Colin Watson
2010-09-23 20:27 ` [PATCH] Trunk: usbtrans.c - wrong max packet size for bulk transfer Aleš Nesrsta
2010-10-01 7:35 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-10-01 15:07 ` Aleš Nesrsta
2010-10-01 18:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-10-02 18:58 ` Aleš Nesrsta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).