Hi, seems like there is a problem in gnu-efi Makefiles: When you are not on Debian, this will be installed (from $source/inc/Makefile, called from $source/Makefile): install: mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH) $(INSTALL) -m 644 *.h $(INSTALLROOT)$(PREFIX)/include/efi $(INSTALL) -m 644 protocol/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol $(INSTALL) -m 644 $(ARCH)/*.h $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH) ifeq ($(ARCH),ia64) mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64 $(INSTALL) -m 644 protocol/ia64/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64 endif So if you are not on ia32/ia64, no ia32/ia64 headers will be installed. But on Debian (from $source/Debian/Makefile): install: build dh_testdir dh_testroot dh_clean -k dh_installdirs -A # gnu-efi files cp -r inc/* debian/gnu-efi/usr/include/efi/ rm debian/gnu-efi/usr/include/efi/Makefile rm debian/gnu-efi/usr/include/efi/inc.mak rm debian/gnu-efi/usr/include/efi/make.inf rm debian/gnu-efi/usr/include/efi/makefile.hdr rm debian/gnu-efi/usr/include/efi/protocol/make.inf rm debian/gnu-efi/usr/include/efi/protocol/makefile.hdr rm debian/gnu-efi/usr/include/efi/protocol/readme.txt ifeq ($(buildarch),ia64) rm -rf debian/gnu-efi/usr/include/efi/ia32 rm -rf debian/gnu-efi/usr/include/efi/x84_64 else rm -rf debian/gnu-efi/usr/include/efi/ia64 endif [...] Debian will copy *everything* from inc. When it is an ia64 system, they will remove the ia32 and x84_64 headers (so you should be unable to build syslinux in ia64 on Debian, too). This will raise the question: Why does syslinux require these headers if you don't build for these archs? This would require gnu-efi too install headers for every arch, not only the arch you are on... But maybe I am totally wrong :) -- Regards, Igor
On Sat, 29 Jun, at 04:40:00PM, Igor Sverkos wrote:> Hi, > > seems like there is a problem in gnu-efi Makefiles: > > When you are not on Debian, this will be installed (from > $source/inc/Makefile, called from $source/Makefile): > > install: > mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi > mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol > mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH) > $(INSTALL) -m 644 *.h $(INSTALLROOT)$(PREFIX)/include/efi > $(INSTALL) -m 644 protocol/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol > $(INSTALL) -m 644 $(ARCH)/*.h $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH) > ifeq ($(ARCH),ia64) > mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64 > $(INSTALL) -m 644 protocol/ia64/*.h > $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64 > endif > > So if you are not on ia32/ia64, no ia32/ia64 headers will be installed. > > But on Debian (from $source/Debian/Makefile): > > install: build > dh_testdir > dh_testroot > dh_clean -k > dh_installdirs -A > > # gnu-efi files > cp -r inc/* debian/gnu-efi/usr/include/efi/ > rm debian/gnu-efi/usr/include/efi/Makefile > rm debian/gnu-efi/usr/include/efi/inc.mak > rm debian/gnu-efi/usr/include/efi/make.inf > rm debian/gnu-efi/usr/include/efi/makefile.hdr > rm debian/gnu-efi/usr/include/efi/protocol/make.inf > rm debian/gnu-efi/usr/include/efi/protocol/makefile.hdr > rm debian/gnu-efi/usr/include/efi/protocol/readme.txt > ifeq ($(buildarch),ia64) > rm -rf debian/gnu-efi/usr/include/efi/ia32 > rm -rf debian/gnu-efi/usr/include/efi/x84_64 > else > rm -rf debian/gnu-efi/usr/include/efi/ia64 > endif > > [...] > > Debian will copy *everything* from inc. When it is an ia64 system, > they will remove the ia32 and x84_64 headers (so you should be unable > to build syslinux in ia64 on Debian, too).To my knowledge, Syslinux has not been tested on ia64. Despite the fact that it uses a version of EFI, I very much doubt it would work out of the box without quite a bit of hacking.> This will raise the question: Why does syslinux require these headers > if you don't build for these archs? This would require gnu-efi too > install headers for every arch, not only the arch you are on...You can explicitly build Syslinux for only the architectures you care about using, 'make bios', 'make efi32', etc. It's just that by default 'make' will build for BIOS, EFI 32-bit and EFI 64-bit. -- Matt Fleming, Intel Open Source Technology Center
Hi, Matt Fleming wrote:>> [...] >> >> Debian will copy *everything* from inc. When it is an ia64 system, >> they will remove the ia32 and x84_64 headers (so you should be unable >> to build syslinux in ia64 on Debian, too). > > To my knowledge, Syslinux has not been tested on ia64. Despite the fact > that it uses a version of EFI, I very much doubt it would work out of > the box without quite a bit of hacking.Well, this wasn't my point. I don't care about i64 :) I just wanted to say, that per default, gnu-efi will only install the headers for your architecture. So when you are on x86_64, gnu-efi will only install x86_64 related files. No ia32 and or ia64 for example. When you now call "make efi32" on syslinux source, to get a EFI-version of syslinux, this call will fail, because syslinux will require ia32 headers, which aren't installed by gnu-efi's Makefile per default as I thought I'd explained in my previous mail (if I am not wrong). Debian seems to have a workaround: Their changes to gnu-efi will override gnu-efi's default behavior. On an x86_64 system on Debian, you will end with x86_64 headers *and* ia32 headers, that's why you are able to call 'make efi32' on Debian x86_64 systems. So my question is: 1) Is gnu-efi's behavior right? Should gnu-efi only install x86_64 headers on a x86_64 system and no ia32 (and or ia64 headers)? Maybe there's just a mistake and they forgot to also install ia32 on x86_64. 2) If gnu-efi's behavior is right, is it than correct to depend on ia32 in syslinux ('make efi32')? Or do we need another switch to build an EFI-version for x86_64 only? -- Regards, Igor