* [Buildroot] [PATCH v2 0/5] Various x86 bootloaders and board support
@ 2014-02-18 23:33 Thomas Petazzoni
2014-02-18 23:33 ` [Buildroot] [PATCH v2 1/5] grub2: add new package Thomas Petazzoni
` (4 more replies)
0 siblings, 5 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 23:33 UTC (permalink / raw)
To: buildroot
Hello,
This is the v2 of a patch series I sent a long time ago. Changes since
v1:
* Dropped all patches that have been merged.
* Confirmed that grub2 can be built with a pure target 64 bits
compiler, for both the 64 bits Grub2 and the 32 bits Grub2. This
answers Peter's question at
http://lists.busybox.net/pipermail/buildroot/2013-December/083682.html.
* Integrated the changes made by Christophe Vu Brugier on gummiboot
and gnu-efi.
* Added dependency on wchar and largefile for gummiboot, since
gummiboot selects util-linux.
* Adjust the two boards defconfig to lock down the kernel headers
version to 3.8, since the kernel being built is derived from 3.8.
Thomas
Thomas Petazzoni (5):
grub2: add new package
gnu-efi: new package
gummiboot: new package
board: add support for the MinnowBoard
board: add support for the Fri2 board
board/fri2/grub.cfg | 6 +
board/fri2/linux-3.8.config | 336 +++++++++++++++++++++
board/fri2/post-build.sh | 2 +
board/fri2/readme.txt | 40 +++
board/minnowboard/grub.cfg | 6 +
board/minnowboard/linux-3.8.config | 172 +++++++++++
board/minnowboard/post-build.sh | 2 +
board/minnowboard/readme.txt | 40 +++
boot/Config.in | 2 +
boot/grub2/Config.in | 120 ++++++++
boot/grub2/grub.cfg | 6 +
boot/grub2/grub2-remove-gets.patch | 21 ++
boot/grub2/grub2.mk | 88 ++++++
boot/gummiboot/Config.in | 28 ++
boot/gummiboot/buildroot.conf | 4 +
boot/gummiboot/gummiboot.mk | 42 +++
boot/gummiboot/loader.conf | 2 +
configs/fri2_defconfig | 23 ++
configs/minnowboard_defconfig | 23 ++
package/Config.in | 1 +
package/gnu-efi/Config.in | 9 +
.../gnu-efi/gnu-efi-01-use-override-cflags.patch | 53 ++++
.../gnu-efi-02-parallel-make-archives.patch | 48 +++
package/gnu-efi/gnu-efi-03-parallel-make.patch | 22 ++
package/gnu-efi/gnu-efi.mk | 40 +++
25 files changed, 1136 insertions(+)
create mode 100644 board/fri2/grub.cfg
create mode 100644 board/fri2/linux-3.8.config
create mode 100755 board/fri2/post-build.sh
create mode 100644 board/fri2/readme.txt
create mode 100644 board/minnowboard/grub.cfg
create mode 100644 board/minnowboard/linux-3.8.config
create mode 100755 board/minnowboard/post-build.sh
create mode 100644 board/minnowboard/readme.txt
create mode 100644 boot/grub2/Config.in
create mode 100644 boot/grub2/grub.cfg
create mode 100644 boot/grub2/grub2-remove-gets.patch
create mode 100644 boot/grub2/grub2.mk
create mode 100644 boot/gummiboot/Config.in
create mode 100644 boot/gummiboot/buildroot.conf
create mode 100644 boot/gummiboot/gummiboot.mk
create mode 100644 boot/gummiboot/loader.conf
create mode 100644 configs/fri2_defconfig
create mode 100644 configs/minnowboard_defconfig
create mode 100644 package/gnu-efi/Config.in
create mode 100644 package/gnu-efi/gnu-efi-01-use-override-cflags.patch
create mode 100644 package/gnu-efi/gnu-efi-02-parallel-make-archives.patch
create mode 100644 package/gnu-efi/gnu-efi-03-parallel-make.patch
create mode 100644 package/gnu-efi/gnu-efi.mk
--
1.8.3.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 1/5] grub2: add new package
2014-02-18 23:33 [Buildroot] [PATCH v2 0/5] Various x86 bootloaders and board support Thomas Petazzoni
@ 2014-02-18 23:33 ` Thomas Petazzoni
2014-02-18 23:33 ` [Buildroot] [PATCH v2 2/5] gnu-efi: " Thomas Petazzoni
` (3 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 23:33 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
boot/Config.in | 1 +
boot/grub2/Config.in | 120 +++++++++++++++++++++++++++++++++++++
boot/grub2/grub.cfg | 6 ++
boot/grub2/grub2-remove-gets.patch | 21 +++++++
boot/grub2/grub2.mk | 88 +++++++++++++++++++++++++++
5 files changed, 236 insertions(+)
create mode 100644 boot/grub2/Config.in
create mode 100644 boot/grub2/grub.cfg
create mode 100644 boot/grub2/grub2-remove-gets.patch
create mode 100644 boot/grub2/grub2.mk
diff --git a/boot/Config.in b/boot/Config.in
index d23c761..c410d12 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -6,6 +6,7 @@ source "boot/at91dataflashboot/Config.in"
source "boot/barebox/Config.in"
source "boot/boot-wrapper-aarch64/Config.in"
source "boot/grub/Config.in"
+source "boot/grub2/Config.in"
source "boot/lpc32xxcdl/Config.in"
source "boot/mxs-bootlets/Config.in"
source "boot/syslinux/Config.in"
diff --git a/boot/grub2/Config.in b/boot/grub2/Config.in
new file mode 100644
index 0000000..e59626a
--- /dev/null
+++ b/boot/grub2/Config.in
@@ -0,0 +1,120 @@
+config BR2_TARGET_GRUB2
+ bool "grub2"
+ depends on BR2_i386 || BR2_x86_64
+ help
+ GNU GRUB is a Multiboot boot loader. It was derived from
+ GRUB, the GRand Unified Bootloader, which was originally
+ designed and implemented by Erich Stefan Boleyn. GRUB 2 has
+ replaced what was formerly known as GRUB (i.e. version
+ 0.9x), which has, in turn, become GRUB Legacy.
+
+ Amongst others, GRUB2 offers EFI support, which GRUB Legacy
+ doesn't provide.
+
+ Notes on using Grub2 for BIOS-based platforms
+ =============================================
+
+ 1. Create a disk image
+ dd if=/dev/zero of=disk.img bs=1M count=32
+ 2. Partition it (either legacy or GPT style partitions work)
+ cfdisk disk.img
+ - Create one partition, type Linux, for the root
+ filesystem. The only constraint is to make sure there
+ is enough free space *before* the first partition to
+ store Grub2. Leaving 1 MB of free space is safe.
+ 3. Setup loop device and loop partitions
+ sudo losetup -f disk.img
+ sudo partx -a disk.img
+ 4. Prepare the root partition
+ sudo mkfs.ext3 -L root /dev/loop0p1
+ sudo mount /dev/loop0p1 /mnt
+ sudo tar -C /mnt -xf output/images/rootfs.tar
+ sudo umount /mnt
+ 5. Install Grub2
+ ./output/host/usr/sbin/grub-bios-setup \
+ -b ./output/host/usr/lib/grub/i386-pc/boot.img \
+ -c ./output/images/grub.img -d . /dev/loop0
+ 6. Your disk.img is ready!
+
+ To test your BIOS image in Qemu:
+
+ qemu-system-{i386,x86-64} -hda disk.img
+
+ Notes on using Grub2 for EFI-based platforms
+ ============================================
+
+ 1. Create a disk image
+ dd if=/dev/zero of=disk.img bs=1M count=32
+ 2. Partition it with GPT partitions
+ cgdisk disk.img
+ - Create a first partition, type EF00, for the
+ bootloader and kernel image
+ - Create a second partition, type 8300, for the root
+ filesystem.
+ 3. Setup loop device and loop partitions
+ sudo losetup -f disk.img
+ sudo partx -a /dev/loop0
+ 4. Prepare the boot partition
+ sudo mkfs.vfat -n boot /dev/loop0p1
+ sudo mount /dev/loop0p1 /mnt
+ sudo cp -a output/images/efi-part/* /mnt/
+ sudo cp output/images/bzImage /mnt/
+ sudo umount /mnt
+ 5. Prepare the root partition
+ sudo mkfs.ext3 -L root /dev/loop0p2
+ sudo mount /dev/loop0p2 /mnt
+ sudo tar -C /mnt -xf output/images/rootfs.tar
+ sudo umount /mnt
+ 6 Cleanup loop device
+ sudo partx -d /dev/loop0
+ sudo losetup -d /dev/loop0
+ 7. Your disk.img is ready!
+
+ To test your EFI image in Qemu:
+
+ 1. Download the EFI BIOS for Qemu
+ Version IA32 or X64 depending on the chosen Grub2
+ platform (i386-efi vs. x86-64-efi)
+ http://sourceforge.net/projects/edk2/files/OVMF/
+ 2. Extract, and rename OVMF.fd to bios.bin and
+ CirrusLogic5446.rom to vgabios-cirrus.bin.
+ 3. qemu-system-{i386,x86-64} -L ovmf-dir/ -hda disk.img
+ 4. Make sure to pass pci=nocrs to the kernel command line,
+ to workaround a bug in the EFI BIOS regarding the
+ EFI framebuffer.
+
+ http://www.gnu.org/software/grub/
+
+if BR2_TARGET_GRUB2
+
+choice
+ prompt "Platform"
+
+config BR2_TARGET_GRUB2_I386_PC
+ bool "i386-pc"
+ help
+ Select this option if the platform you're targetting is a
+ x86 or x86-64 legacy BIOS based platform.
+
+config BR2_TARGET_GRUB2_I386_EFI
+ bool "i386-efi"
+ help
+ Select this option if the platform you're targetting has a
+ 32 bits EFI BIOS. Note that some x86-64 platforms use a 32
+ bits EFI BIOS, and this option should be used in this case.
+
+config BR2_TARGET_GRUB2_X86_64_EFI
+ bool "x86-64-efi"
+ help
+ Select this option if the platform you're targetting has a
+ 64 bits EFI BIOS.
+
+endchoice
+
+config BR2_TARGET_GRUB2_BUILTIN_MODULES
+ string "builtin modules"
+ default "boot linux ext2 fat part_msdos part_gpt normal biosdisk" if BR2_TARGET_GRUB2_I386_PC
+ default "boot linux ext2 fat part_msdos part_gpt normal efi_gop" \
+ if BR2_TARGET_GRUB2_I386_EFI || BR2_TARGET_GRUB2_X86_64_EFI
+
+endif # BR2_TARGET_GRUB2
diff --git a/boot/grub2/grub.cfg b/boot/grub2/grub.cfg
new file mode 100644
index 0000000..9ea5281
--- /dev/null
+++ b/boot/grub2/grub.cfg
@@ -0,0 +1,6 @@
+set default="0"
+set timeout="5"
+
+menuentry "Buildroot" {
+ linux /bzImage root=/dev/sda1 console=tty1
+}
diff --git a/boot/grub2/grub2-remove-gets.patch b/boot/grub2/grub2-remove-gets.patch
new file mode 100644
index 0000000..0da71b3
--- /dev/null
+++ b/boot/grub2/grub2-remove-gets.patch
@@ -0,0 +1,21 @@
+ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Upstream-Status: Pending
+Index: grub-1.99/grub-core/gnulib/stdio.in.h
+===================================================================
+--- grub-1.99.orig/grub-core/gnulib/stdio.in.h 2010-12-01 06:45:43.000000000 -0800
++++ grub-1.99/grub-core/gnulib/stdio.in.h 2012-07-04 12:25:02.057099107 -0700
+@@ -140,8 +140,10 @@
+ /* It is very rare that the developer ever has full control of stdin,
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
++#if defined gets
+ #undef gets
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk
new file mode 100644
index 0000000..5bb8884
--- /dev/null
+++ b/boot/grub2/grub2.mk
@@ -0,0 +1,88 @@
+################################################################################
+#
+# grub2
+#
+################################################################################
+
+GRUB2_VERSION = 2.00
+GRUB2_SITE = $(BR2_GNU_MIRROR)/grub/
+GRUB2_SOURCE = grub-$(GRUB2_VERSION).tar.xz
+GRUB2_LICENSE = GPLv3+
+GRUB2_LICENSE_FILES = COPYING
+GRUB2_DEPENDENCIES = host-bison host-flex
+
+ifeq ($(BR2_TARGET_GRUB2_I386_PC),y)
+GRUB2_IMAGE = $(BINARIES_DIR)/grub.img
+GRUB2_CFG = $(TARGET_DIR)/boot/grub/grub.cfg
+GRUB2_TUPLE = i386-pc
+GRUB2_TARGET = i386
+GRUB2_PLATFORM = pc
+else ifeq ($(BR2_TARGET_GRUB2_I386_EFI),y)
+GRUB2_IMAGE = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootia32.efi
+GRUB2_CFG = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg
+GRUB2_PREFIX = /EFI/BOOT
+GRUB2_TUPLE = i386-efi
+GRUB2_TARGET = i386
+GRUB2_PLATFORM = efi
+else ifeq ($(BR2_TARGET_GRUB2_X86_64_EFI),y)
+GRUB2_IMAGE = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootx64.efi
+GRUB2_CFG = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg
+GRUB2_PREFIX = /EFI/BOOT
+GRUB2_TUPLE = x86_64-efi
+GRUB2_TARGET = x86_64
+GRUB2_PLATFORM = efi
+endif
+
+GRUB2_BUILTIN_MODULES = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES))
+
+# Grub2 is kind of special: it considers CC, LD and so on to be the
+# tools to build the native tools (i.e to be executed on the build
+# machine), and uses TARGET_CC, TARGET_CFLAGS, TARGET_CPPFLAGS to
+# build the bootloader itself.
+
+GRUB2_CONF_ENV = \
+ $(HOST_CONFIGURE_OPTS) \
+ CPP="$(HOSTCC) -E" \
+ TARGET_CC="$(TARGET_CC)" \
+ TARGET_CFLAGS="$(TARGET_CFLAGS)" \
+ TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)"
+
+GRUB2_CONF_OPT = \
+ --target=$(GRUB2_TARGET) \
+ --with-platform=$(GRUB2_PLATFORM) \
+ --disable-grub-mkfont \
+ --enable-efiemu=no \
+ --enable-liblzma=no \
+ --enable-device-mapper=no \
+ --enable-libzfs=no \
+ --disable-werror
+
+# We don't want all the native tools and Grub2 modules to be installed
+# in the target. So we in fact install everything into the host
+# directory, and the image generation process (below) will use the
+# grub-mkimage tool and Grub2 modules from the host directory.
+
+GRUB2_INSTALL_TARGET_OPT = DESTDIR=$(HOST_DIR) install
+
+define GRUB2_IMAGE_INSTALLATION
+ mkdir -p $(dir $(GRUB2_IMAGE))
+ $(HOST_DIR)/usr/bin/grub-mkimage \
+ -d $(HOST_DIR)/usr/lib/grub/$(GRUB2_TUPLE) \
+ -O $(GRUB2_TUPLE) \
+ -o $(GRUB2_IMAGE) \
+ $(if $(GRUB2_PREFIX),-p $(GRUB2_PREFIX)) \
+ $(GRUB2_BUILTIN_MODULES)
+ mkdir -p $(dir $(GRUB2_CFG))
+ $(INSTALL) -D -m 0644 boot/grub2/grub.cfg $(GRUB2_CFG)
+endef
+GRUB2_POST_INSTALL_TARGET_HOOKS += GRUB2_IMAGE_INSTALLATION
+
+ifeq ($(GRUB2_PLATFORM),efi)
+define GRUB2_EFI_STARTUP_NSH
+ echo $(notdir $(GRUB2_IMAGE)) > \
+ $(BINARIES_DIR)/efi-part/startup.nsh
+endef
+GRUB2_POST_INSTALL_TARGET_HOOKS += GRUB2_EFI_STARTUP_NSH
+endif
+
+$(eval $(autotools-package))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 2/5] gnu-efi: new package
2014-02-18 23:33 [Buildroot] [PATCH v2 0/5] Various x86 bootloaders and board support Thomas Petazzoni
2014-02-18 23:33 ` [Buildroot] [PATCH v2 1/5] grub2: add new package Thomas Petazzoni
@ 2014-02-18 23:33 ` Thomas Petazzoni
2014-02-19 17:53 ` Yann E. MORIN
2014-02-18 23:33 ` [Buildroot] [PATCH v2 3/5] gummiboot: " Thomas Petazzoni
` (2 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 23:33 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
---
package/Config.in | 1 +
package/gnu-efi/Config.in | 9 ++++
.../gnu-efi/gnu-efi-01-use-override-cflags.patch | 53 ++++++++++++++++++++++
.../gnu-efi-02-parallel-make-archives.patch | 48 ++++++++++++++++++++
package/gnu-efi/gnu-efi-03-parallel-make.patch | 22 +++++++++
package/gnu-efi/gnu-efi.mk | 40 ++++++++++++++++
6 files changed, 173 insertions(+)
create mode 100644 package/gnu-efi/Config.in
create mode 100644 package/gnu-efi/gnu-efi-01-use-override-cflags.patch
create mode 100644 package/gnu-efi/gnu-efi-02-parallel-make-archives.patch
create mode 100644 package/gnu-efi/gnu-efi-03-parallel-make.patch
create mode 100644 package/gnu-efi/gnu-efi.mk
diff --git a/package/Config.in b/package/Config.in
index cb2d31b..a7a93f0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -584,6 +584,7 @@ endmenu
menu "Hardware handling"
source "package/ccid/Config.in"
source "package/dtc/Config.in"
+source "package/gnu-efi/Config.in"
source "package/lcdapi/Config.in"
source "package/libaio/Config.in"
source "package/libatasmart/Config.in"
diff --git a/package/gnu-efi/Config.in b/package/gnu-efi/Config.in
new file mode 100644
index 0000000..982102f
--- /dev/null
+++ b/package/gnu-efi/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_GNU_EFI
+ bool "gnu-efi"
+ depends on BR2_i386 || BR2_x86_64
+ help
+ Develop EFI applications for IA-64 (IPF), IA-32 (x86), and
+ x86_64 platforms using the GNU toolchain and the EFI
+ development environment.
+
+ http://gnu-efi.sourceforge.net/
diff --git a/package/gnu-efi/gnu-efi-01-use-override-cflags.patch b/package/gnu-efi/gnu-efi-01-use-override-cflags.patch
new file mode 100644
index 0000000..07c3a9f
--- /dev/null
+++ b/package/gnu-efi/gnu-efi-01-use-override-cflags.patch
@@ -0,0 +1,53 @@
+Allow CFLAGS/CPPFLAGS to be completed from the environment
+
+Buildroot passes its own CPPFLAGS and CFLAGS in the environment, so
+the CFLAGS += and CPPFLAGS += statements in gnu-efi Makefile have no
+effect. Change these to override <VARIABLE> += so that they extend the
+flags passed by Buildroot.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/Make.defaults
+===================================================================
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -83,25 +83,25 @@
+ && [ $(GCCMINOR) -ge "7" ] ) ) \
+ && echo 1)
+ ifeq ($(GCCNEWENOUGH),1)
+- CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
++ override CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
+ endif
+
+ # Arch-specific compilation flags
+-CPPFLAGS += -DCONFIG_$(ARCH)
++override CPPFLAGS += -DCONFIG_$(ARCH)
+
+ ifeq ($(ARCH),ia64)
+- CFLAGS += -mfixed-range=f32-f127
++ override CFLAGS += -mfixed-range=f32-f127
+ endif
+
+ ifeq ($(ARCH),ia32)
+- CFLAGS += -mno-mmx -mno-sse
++ override CFLAGS += -mno-mmx -mno-sse
+ ifeq ($(HOSTARCH),x86_64)
+ ARCH3264 = -m32
+ endif
+ endif
+
+ ifeq ($(ARCH),x86_64)
+- CFLAGS += -mno-red-zone -mno-mmx -mno-sse
++ override CFLAGS += -mno-red-zone -mno-mmx -mno-sse
+ ifeq ($(HOSTARCH),ia32)
+ ARCH3264 = -m64
+ endif
+@@ -110,7 +110,7 @@
+ # Generic compilation flags
+ INCDIR += -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) \
+ -I$(TOPDIR)/inc/protocol
+-CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
++override CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
+ -fno-merge-constants -ffreestanding -fno-stack-protector \
+ -fno-stack-check
+ ASFLAGS += $(ARCH3264)
diff --git a/package/gnu-efi/gnu-efi-02-parallel-make-archives.patch b/package/gnu-efi/gnu-efi-02-parallel-make-archives.patch
new file mode 100644
index 0000000..e5b47c1
--- /dev/null
+++ b/package/gnu-efi/gnu-efi-02-parallel-make-archives.patch
@@ -0,0 +1,48 @@
+Fix parallel make failure for archives
+
+Upstream-Status: Pending
+
+The lib and gnuefi makefiles were using the lib.a() form which compiles
+and ar's as a pair instead of compiling all and then ar'ing which can
+parallelize better. This was resulting in build failures on larger values
+of -j.
+
+See http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_toc.html#TOC105
+for details.
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Darren Hart <dvhart@linux.intel.com>
+---
+---
+ gnuefi/Makefile | 3 ++-
+ lib/Makefile | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+Index: gnu-efi-3.0/lib/Makefile
+===================================================================
+--- gnu-efi-3.0.orig/lib/Makefile
++++ gnu-efi-3.0/lib/Makefile
+@@ -66,7 +66,8 @@ all: libsubdirs libefi.a
+ libsubdirs:
+ for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
+
+-libefi.a: $(patsubst %,libefi.a(%),$(OBJS))
++libefi.a: $(OBJS)
++ $(AR) rv $@ $(OBJS)
+
+ clean:
+ rm -f libefi.a *~ $(OBJS) */*.o
+Index: gnu-efi-3.0/gnuefi/Makefile
+===================================================================
+--- gnu-efi-3.0.orig/gnuefi/Makefile
++++ gnu-efi-3.0/gnuefi/Makefile
+@@ -51,7 +51,8 @@ TARGETS = crt0-efi-$(ARCH).o libgnuefi.a
+
+ all: $(TARGETS)
+
+-libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS))
++libgnuefi.a: $(OBJS)
++ $(AR) rv $@ $(OBJS)
+
+ clean:
+ rm -f $(TARGETS) *~ *.o $(OBJS)
diff --git a/package/gnu-efi/gnu-efi-03-parallel-make.patch b/package/gnu-efi/gnu-efi-03-parallel-make.patch
new file mode 100644
index 0000000..27c94e8
--- /dev/null
+++ b/package/gnu-efi/gnu-efi-03-parallel-make.patch
@@ -0,0 +1,22 @@
+Fix parallel make failure
+
+Upstream-Status: Submitted [Maintainer directly]
+
+Add a missing dependency which resulted in a race leading to failure
+on larger values of -j.
+
+Signed-off-by: Darren Hart <dvhart@linux.intel.com>
+
+Index: gnu-efi-3.0/Makefile
+===================================================================
+--- gnu-efi-3.0.orig/Makefile
++++ gnu-efi-3.0/Makefile
+@@ -42,6 +42,8 @@ include $(SRCDIR)/Make.defaults
+
+ SUBDIRS = lib gnuefi inc apps
+
++gnuefi: lib
++
+ all: check_gcc $(SUBDIRS)
+
+ $(SUBDIRS):
diff --git a/package/gnu-efi/gnu-efi.mk b/package/gnu-efi/gnu-efi.mk
new file mode 100644
index 0000000..28eb17e
--- /dev/null
+++ b/package/gnu-efi/gnu-efi.mk
@@ -0,0 +1,40 @@
+################################################################################
+#
+# gnu-efi
+#
+################################################################################
+
+GNU_EFI_VERSION = 3.0u
+GNU_EFI_SOURCE = gnu-efi_$(GNU_EFI_VERSION).orig.tar.gz
+GNU_EFI_SITE = http://downloads.sourceforge.net/project/gnu-efi/
+GNU_EFI_INSTALL_STAGING = YES
+GNU_EFI_LICENSE = GPLv2+ (gnuefi), BSD (efilib)
+GNU_EFI_LICENSE_FILES = debian/copyright
+
+ifeq ($(BR2_i386),y)
+GNU_EFI_PLATFORM=ia32
+else ifeq ($(BR2_x86_64),y)
+GNU_EFI_PLATFORM=x86_64
+endif
+
+define GNU_EFI_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+ $(TARGET_CONFIGURE_OPTS) \
+ ARCH=$(GNU_EFI_PLATFORM)
+endef
+
+define GNU_EFI_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+ $(TARGET_CONFIGURE_OPTS) \
+ INSTALLROOT=$(TARGET_DIR) \
+ PREFIX=/usr ARCH=$(GNU_EFI_PLATFORM) install
+endef
+
+define GNU_EFI_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+ $(TARGET_CONFIGURE_OPTS) \
+ INSTALLROOT=$(STAGING_DIR) \
+ PREFIX=/usr ARCH=$(GNU_EFI_PLATFORM) install
+endef
+
+$(eval $(generic-package))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 3/5] gummiboot: new package
2014-02-18 23:33 [Buildroot] [PATCH v2 0/5] Various x86 bootloaders and board support Thomas Petazzoni
2014-02-18 23:33 ` [Buildroot] [PATCH v2 1/5] grub2: add new package Thomas Petazzoni
2014-02-18 23:33 ` [Buildroot] [PATCH v2 2/5] gnu-efi: " Thomas Petazzoni
@ 2014-02-18 23:33 ` Thomas Petazzoni
2014-02-19 17:59 ` Yann E. MORIN
2014-02-18 23:34 ` [Buildroot] [PATCH v2 4/5] board: add support for the MinnowBoard Thomas Petazzoni
2014-02-18 23:34 ` [Buildroot] [PATCH v2 5/5] board: add support for the Fri2 board Thomas Petazzoni
4 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 23:33 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
---
boot/Config.in | 1 +
boot/gummiboot/Config.in | 28 ++++++++++++++++++++++++++++
boot/gummiboot/buildroot.conf | 4 ++++
boot/gummiboot/gummiboot.mk | 42 ++++++++++++++++++++++++++++++++++++++++++
boot/gummiboot/loader.conf | 2 ++
5 files changed, 77 insertions(+)
create mode 100644 boot/gummiboot/Config.in
create mode 100644 boot/gummiboot/buildroot.conf
create mode 100644 boot/gummiboot/gummiboot.mk
create mode 100644 boot/gummiboot/loader.conf
diff --git a/boot/Config.in b/boot/Config.in
index c410d12..54760b9 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -7,6 +7,7 @@ source "boot/barebox/Config.in"
source "boot/boot-wrapper-aarch64/Config.in"
source "boot/grub/Config.in"
source "boot/grub2/Config.in"
+source "boot/gummiboot/Config.in"
source "boot/lpc32xxcdl/Config.in"
source "boot/mxs-bootlets/Config.in"
source "boot/syslinux/Config.in"
diff --git a/boot/gummiboot/Config.in b/boot/gummiboot/Config.in
new file mode 100644
index 0000000..8d70680
--- /dev/null
+++ b/boot/gummiboot/Config.in
@@ -0,0 +1,28 @@
+config BR2_TARGET_GUMMIBOOT
+ bool "gummiboot"
+ depends on BR2_i386 || BR2_x86_64
+ select BR2_PACKAGE_GNU_EFI
+ select BR2_PACKAGE_UTIL_LINUX
+ select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+ depends on BR2_LARGEFILE # util-linux
+ depends on BR2_USE_WCHAR # util-linux
+ help
+ gummiboot is a simple UEFI boot manager which executes
+ configured EFI images. The default entry is selected by a
+ configured pattern (glob) or an on-screen menu.
+
+ gummiboot operates on the EFI System Partition (ESP)
+ only. Configuration file fragments, kernels, initrds, other
+ EFI images need to reside on the ESP. Linux kernels need to
+ be built with CONFIG_EFI_STUB to be able to be directly
+ executed as an EFI image.
+
+ See the Grub2 help text for details on preparing an EFI
+ capable disk image using Gummiboot: the instructions are
+ exactly the same, except that the Gummiboot configuration
+ files will be located in /loader/ inside the EFI partition.
+
+ http://freedesktop.org/wiki/Software/gummiboot/
+
+comment "gummiboot needs a toolchain w/ largefile, wchar"
+ depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
diff --git a/boot/gummiboot/buildroot.conf b/boot/gummiboot/buildroot.conf
new file mode 100644
index 0000000..8a6f02e
--- /dev/null
+++ b/boot/gummiboot/buildroot.conf
@@ -0,0 +1,4 @@
+title Buildroot
+version 1
+linux /bzImage
+options console=ttyS0 root=/dev/sda2
diff --git a/boot/gummiboot/gummiboot.mk b/boot/gummiboot/gummiboot.mk
new file mode 100644
index 0000000..165a1b0
--- /dev/null
+++ b/boot/gummiboot/gummiboot.mk
@@ -0,0 +1,42 @@
+################################################################################
+#
+# gummiboot
+#
+################################################################################
+
+GUMMIBOOT_SITE = git://anongit.freedesktop.org/gummiboot
+GUMMIBOOT_VERSION = 43
+GUMMIBOOT_LICENSE = LGPLv2.1+
+GUMMIBOOT_LICENSE_FILES = LICENSE
+
+# The git archive does not have the autoconf/automake stuff generated.
+GUMMIBOOT_AUTORECONF = YES
+GUMMIBOOT_DEPENDENCIES = gnu-efi host-pkgconf util-linux
+GUMMIBOOT_INSTALL_TARGET = NO
+GUMMIBOOT_INSTALL_IMAGES = YES
+
+ifeq ($(BR2_i386),y)
+GUMMIBOOT_IMGARCH = ia32
+else ifeq ($(BR2_x86_64),y)
+GUMMIBOOT_IMGARCH = x64
+endif
+
+GUMMIBOOT_CONF_OPT = \
+ --host=$(BR2_ARCH) \
+ --with-efi-libdir=$(STAGING_DIR)/usr/lib \
+ --with-efi-ldsdir=$(STAGING_DIR)/usr/lib \
+ --with-efi-includedir=$(STAGING_DIR)/usr/include \
+ --disable-manpages
+
+define GUMMIBOOT_INSTALL_IMAGES_CMDS
+ $(INSTALL) -D -m 0644 $(@D)/gummiboot$(GUMMIBOOT_IMGARCH).efi \
+ $(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(GUMMIBOOT_IMGARCH).efi
+ echo "boot$(GUMMIBOOT_IMGARCH).efi" > \
+ $(BINARIES_DIR)/efi-part/startup.nsh
+ $(INSTALL) -D -m 0644 boot/gummiboot/loader.conf \
+ $(BINARIES_DIR)/efi-part/loader/loader.conf
+ $(INSTALL) -D -m 0644 boot/gummiboot/buildroot.conf \
+ $(BINARIES_DIR)/efi-part/loader/entries/buildroot.conf
+endef
+
+$(eval $(autotools-package))
diff --git a/boot/gummiboot/loader.conf b/boot/gummiboot/loader.conf
new file mode 100644
index 0000000..93b77b8
--- /dev/null
+++ b/boot/gummiboot/loader.conf
@@ -0,0 +1,2 @@
+timeout 3
+default buildroot
--
1.8.3.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 4/5] board: add support for the MinnowBoard
2014-02-18 23:33 [Buildroot] [PATCH v2 0/5] Various x86 bootloaders and board support Thomas Petazzoni
` (2 preceding siblings ...)
2014-02-18 23:33 ` [Buildroot] [PATCH v2 3/5] gummiboot: " Thomas Petazzoni
@ 2014-02-18 23:34 ` Thomas Petazzoni
2014-02-18 23:34 ` [Buildroot] [PATCH v2 5/5] board: add support for the Fri2 board Thomas Petazzoni
4 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 23:34 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
board/minnowboard/grub.cfg | 6 ++
board/minnowboard/linux-3.8.config | 172 +++++++++++++++++++++++++++++++++++++
board/minnowboard/post-build.sh | 2 +
board/minnowboard/readme.txt | 40 +++++++++
configs/minnowboard_defconfig | 23 +++++
5 files changed, 243 insertions(+)
create mode 100644 board/minnowboard/grub.cfg
create mode 100644 board/minnowboard/linux-3.8.config
create mode 100755 board/minnowboard/post-build.sh
create mode 100644 board/minnowboard/readme.txt
create mode 100644 configs/minnowboard_defconfig
diff --git a/board/minnowboard/grub.cfg b/board/minnowboard/grub.cfg
new file mode 100644
index 0000000..33a0f4a
--- /dev/null
+++ b/board/minnowboard/grub.cfg
@@ -0,0 +1,6 @@
+set default="0"
+set timeout="5"
+
+menuentry "Buildroot" {
+ linux /bzImage root=/dev/mmcblk0p2 rootwait console=ttyPCH0,115200
+}
diff --git a/board/minnowboard/linux-3.8.config b/board/minnowboard/linux-3.8.config
new file mode 100644
index 0000000..460aa2d
--- /dev/null
+++ b/board/minnowboard/linux-3.8.config
@@ -0,0 +1,172 @@
+CONFIG_EXPERIMENTAL=y
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_RCU_FANOUT=32
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_DEBUG=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CPUSETS=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_MEMCG=y
+CONFIG_MEMCG_SWAP=y
+CONFIG_MEMCG_KMEM=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_RT_GROUP_SCHED=y
+CONFIG_BLK_CGROUP=y
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_EMBEDDED=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
+CONFIG_KPROBES=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_SMP=y
+CONFIG_MATOM=y
+CONFIG_SCHED_SMT=y
+CONFIG_PREEMPT=y
+CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
+CONFIG_X86_CHECK_BIOS_CORRUPTION=y
+# CONFIG_MTRR_SANITIZER is not set
+CONFIG_EFI=y
+CONFIG_EFI_STUB=y
+CONFIG_HZ_1000=y
+CONFIG_PM_RUNTIME=y
+CONFIG_PM_DEBUG=y
+CONFIG_PM_ADVANCED_DEBUG=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_X86_ACPI_CPUFREQ=y
+CONFIG_INTEL_IDLE=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCI_MSI=y
+CONFIG_HOTPLUG_PCI=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_XFRM_SUB_POLICY=y
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_FW_LOADER=m
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_PCH_PHUB=m
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_ATA=y
+CONFIG_SATA_AHCI=y
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+CONFIG_NETCONSOLE=y
+CONFIG_TUN=m
+CONFIG_PCH_GBE=m
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO_POLLED=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_SERIO_I8042 is not set
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_PCH_UART=y
+CONFIG_SERIAL_PCH_UART_CONSOLE=y
+CONFIG_GEN_RTC=y
+CONFIG_GEN_RTC_X=y
+CONFIG_HPET=y
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=m
+CONFIG_I2C_EG20T=m
+CONFIG_SPI=y
+CONFIG_SPI_GPIO=m
+CONFIG_SPI_TOPCLIFF_PCH=m
+CONFIG_SPI_SPIDEV=m
+CONFIG_GPIOLIB=y
+CONFIG_DEBUG_GPIO=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_GPIO_SCH=y
+CONFIG_GPIO_PCH=y
+CONFIG_WATCHDOG=y
+CONFIG_SOFT_WATCHDOG=m
+CONFIG_AGP=m
+CONFIG_DRM=m
+CONFIG_FB=y
+CONFIG_FB_EFI=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+CONFIG_SOUND=m
+CONFIG_SND=m
+CONFIG_SND_HDA_INTEL=m
+CONFIG_USB=y
+CONFIG_USB_SUSPEND=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=m
+CONFIG_USB_EG20T=m
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PCI=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_ONESHOT=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_BACKLIGHT=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_GPIO=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
+CONFIG_DMADEVICES=y
+CONFIG_PCH_DMA=y
+CONFIG_MINNOWBOARD=y
+CONFIG_MINNOWBOARD_GPIO=m
+CONFIG_MINNOWBOARD_KEYS=m
+CONFIG_EFI_VARS=y
+CONFIG_EXT4_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
+CONFIG_FANOTIFY=y
+CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
+CONFIG_ISO9660_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_CONFIGFS_FS=m
+CONFIG_NFS_FS=y
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+CONFIG_PRINTK_TIME=y
+CONFIG_FRAME_WARN=1024
+CONFIG_TIMER_STATS=y
+CONFIG_LATENCYTOP=y
+CONFIG_BLK_DEV_IO_TRACE=y
diff --git a/board/minnowboard/post-build.sh b/board/minnowboard/post-build.sh
new file mode 100755
index 0000000..e3f4a92
--- /dev/null
+++ b/board/minnowboard/post-build.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+cp board/minnowboard/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
diff --git a/board/minnowboard/readme.txt b/board/minnowboard/readme.txt
new file mode 100644
index 0000000..b62b677
--- /dev/null
+++ b/board/minnowboard/readme.txt
@@ -0,0 +1,40 @@
+Prepare the SD card for the Minnow Board
+========================================
+
+ 1. Partition the SD card with a GPT partition table
+
+ sudo cgdisk /dev/mmcblk0
+
+ Create two partitions:
+
+ a) First partition of a few dozens of megabytes, which will be
+ used to store the bootloader and the kernel image. Type must
+ be EF00 (EFI partition).
+
+ b) Second partition of any size, which will be used to store the
+ root filesystem. Type must be 8300 (Linux filesystem)
+
+ 2. Prepare the boot partition
+
+ We will format it, mount it, copy the EFI data generated by
+ Buildroot, and the kernel image.
+
+ sudo mkfs.vfat -F 32 -n boot /dev/mmcblk0p1
+ sudo mount /dev/mmcblk0p1 /mnt
+ sudo cp -a output/images/efi-part/* /mnt/
+ sudo cp output/images/bzImage /mnt/
+ sudo umount /mnt
+
+ 3. Prepare the root partition
+
+ We will format it, mount it, and extract the root filesystem.
+
+ sudo mkfs.ext3 -L root /dev/mmcblk0p2
+ sudo mount /dev/mmcblk0p2 /mnt
+ sudo tar -C /mnt -xf output/images/rootfs.tar
+ sudo umount /mnt
+
+ 4. Enjoy
+
+Additional informations about this board can be found at
+http://www.minnowboard.org/.
diff --git a/configs/minnowboard_defconfig b/configs/minnowboard_defconfig
new file mode 100644
index 0000000..5fdfd43
--- /dev/null
+++ b/configs/minnowboard_defconfig
@@ -0,0 +1,23 @@
+# Architecture
+BR2_x86_64=y
+BR2_x86_atom=y
+
+# Misc
+BR2_TARGET_GENERIC_GETTY_PORT="ttyPCH0"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard/post-build.sh"
+
+# Lock to 3.8 headers
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="3.8"
+
+# Linux kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.yoctoproject.org/linux-yocto-3.8"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="ba1587b9b62c801d161897303aa6d22809485f9b"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/minnowboard/linux-3.8.config"
+
+# Bootloader
+BR2_TARGET_GRUB2=y
+BR2_TARGET_GRUB2_I386_EFI=y
--
1.8.3.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 5/5] board: add support for the Fri2 board
2014-02-18 23:33 [Buildroot] [PATCH v2 0/5] Various x86 bootloaders and board support Thomas Petazzoni
` (3 preceding siblings ...)
2014-02-18 23:34 ` [Buildroot] [PATCH v2 4/5] board: add support for the MinnowBoard Thomas Petazzoni
@ 2014-02-18 23:34 ` Thomas Petazzoni
4 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 23:34 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
board/fri2/grub.cfg | 6 +
board/fri2/linux-3.8.config | 336 ++++++++++++++++++++++++++++++++++++++++++++
board/fri2/post-build.sh | 2 +
board/fri2/readme.txt | 40 ++++++
configs/fri2_defconfig | 23 +++
5 files changed, 407 insertions(+)
create mode 100644 board/fri2/grub.cfg
create mode 100644 board/fri2/linux-3.8.config
create mode 100755 board/fri2/post-build.sh
create mode 100644 board/fri2/readme.txt
create mode 100644 configs/fri2_defconfig
diff --git a/board/fri2/grub.cfg b/board/fri2/grub.cfg
new file mode 100644
index 0000000..f762714
--- /dev/null
+++ b/board/fri2/grub.cfg
@@ -0,0 +1,6 @@
+set default="0"
+set timeout="5"
+
+menuentry "Buildroot" {
+ linux /bzImage root=/dev/mmcblk0p2 rootwait console=ttyPCH1,115200
+}
diff --git a/board/fri2/linux-3.8.config b/board/fri2/linux-3.8.config
new file mode 100644
index 0000000..5bb2da0
--- /dev/null
+++ b/board/fri2/linux-3.8.config
@@ -0,0 +1,336 @@
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCALVERSION="-yocto-standard"
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_RCU_FANOUT=32
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_DEBUG=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CPUSETS=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_MEMCG=y
+CONFIG_MEMCG_SWAP=y
+CONFIG_MEMCG_KMEM=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_RT_GROUP_SCHED=y
+CONFIG_BLK_CGROUP=y
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_EMBEDDED=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
+CONFIG_KPROBES=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_SMP=y
+CONFIG_MATOM=y
+CONFIG_SCHED_SMT=y
+CONFIG_PREEMPT=y
+CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
+CONFIG_X86_CHECK_BIOS_CORRUPTION=y
+# CONFIG_MTRR_SANITIZER is not set
+CONFIG_EFI=y
+CONFIG_EFI_STUB=y
+CONFIG_HZ_1000=y
+CONFIG_PM_RUNTIME=y
+CONFIG_PM_DEBUG=y
+CONFIG_PM_ADVANCED_DEBUG=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+CONFIG_X86_ACPI_CPUFREQ=y
+CONFIG_INTEL_IDLE=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCI_MSI=y
+CONFIG_HOTPLUG_PCI=y
+CONFIG_BINFMT_MISC=m
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_XFRM_USER=m
+CONFIG_XFRM_SUB_POLICY=y
+CONFIG_NET_KEY=m
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_IPV6=y
+CONFIG_IPV6_ROUTER_PREF=y
+CONFIG_INET6_AH=y
+CONFIG_INET6_ESP=y
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_NETFILTER=y
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_RAW=m
+CONFIG_IP_SCTP=m
+CONFIG_TIPC=m
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+CONFIG_IEEE802154=y
+CONFIG_IEEE802154_6LOWPAN=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_CODEL=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_CLS_BASIC=y
+CONFIG_NET_CLS_CGROUP=y
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_PKTGEN=m
+CONFIG_CAN=y
+CONFIG_PCH_CAN=y
+CONFIG_BT=y
+CONFIG_CFG80211=m
+CONFIG_MAC80211=m
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_FW_LOADER=m
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_PCH_PHUB=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_ATA=y
+CONFIG_SATA_AHCI=y
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_LINEAR=y
+CONFIG_MD_RAID0=y
+CONFIG_MD_RAID1=y
+CONFIG_MD_RAID10=y
+CONFIG_MD_MULTIPATH=y
+CONFIG_MD_FAULTY=y
+CONFIG_BLK_DEV_DM=y
+CONFIG_DM_CRYPT=y
+CONFIG_DM_SNAPSHOT=y
+CONFIG_DM_MIRROR=y
+CONFIG_DM_ZERO=y
+CONFIG_NETDEVICES=y
+CONFIG_BONDING=m
+CONFIG_DUMMY=m
+CONFIG_NETCONSOLE=y
+CONFIG_TUN=m
+CONFIG_PCH_GBE=y
+CONFIG_PPP=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPPOE=m
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_SLIP=m
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLIP_SMART=y
+CONFIG_SLIP_MODE_SLIP6=y
+CONFIG_USB_KAWETH=y
+CONFIG_USB_PEGASUS=y
+CONFIG_USB_USBNET=y
+CONFIG_USB_NET_CDC_NCM=m
+CONFIG_USB_NET_DM9601=y
+CONFIG_USB_NET_SMSC75XX=y
+CONFIG_USB_NET_SMSC95XX=y
+CONFIG_USB_NET_MCS7830=y
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_KC2190=y
+CONFIG_USB_NET_INT51X1=y
+CONFIG_IWLWIFI=m
+CONFIG_SERIAL_PCH_UART=y
+CONFIG_SERIAL_PCH_UART_CONSOLE=y
+CONFIG_HPET=y
+CONFIG_I2C_EG20T=y
+CONFIG_SPI=y
+CONFIG_SPI_GPIO=y
+CONFIG_SPI_TOPCLIFF_PCH=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_PCH=y
+CONFIG_WATCHDOG=y
+CONFIG_SOFT_WATCHDOG=m
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_AGP=y
+CONFIG_DRM=y
+CONFIG_FB=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_VESA=y
+CONFIG_FB_EFI=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_HDA_INTEL=y
+CONFIG_USB=y
+CONFIG_USB_SUSPEND=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_ACM=m
+CONFIG_USB_WDM=m
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_EG20T=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PCI=y
+CONFIG_DMADEVICES=y
+CONFIG_PCH_DMA=y
+CONFIG_EFI_VARS=y
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_EXT4_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
+CONFIG_REISERFS_FS=m
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_BTRFS_FS=y
+CONFIG_BTRFS_FS_POSIX_ACL=y
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+CONFIG_CUSE=m
+CONFIG_ISO9660_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_TMPFS=y
+CONFIG_CONFIGFS_FS=m
+CONFIG_MINIX_FS=m
+CONFIG_ROMFS_FS=m
+CONFIG_NFS_FS=y
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+CONFIG_CIFS=m
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+CONFIG_FRAME_WARN=1024
+CONFIG_TIMER_STATS=y
+CONFIG_DEBUG_INFO=y
+CONFIG_LATENCYTOP=y
+CONFIG_FUNCTION_TRACER=y
+CONFIG_FTRACE_SYSCALLS=y
+CONFIG_BLK_DEV_IO_TRACE=y
+CONFIG_UPROBE_EVENT=y
+CONFIG_KGDB=y
+CONFIG_KGDB_LOW_LEVEL_TRAP=y
+CONFIG_KGDB_KDB=y
+CONFIG_KDB_KEYBOARD=y
+CONFIG_SECURITY=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_TEST=m
+CONFIG_CRYPTO_CTR=m
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_TWOFISH=m
diff --git a/board/fri2/post-build.sh b/board/fri2/post-build.sh
new file mode 100755
index 0000000..02b103a
--- /dev/null
+++ b/board/fri2/post-build.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+cp board/fri2/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
diff --git a/board/fri2/readme.txt b/board/fri2/readme.txt
new file mode 100644
index 0000000..9174081
--- /dev/null
+++ b/board/fri2/readme.txt
@@ -0,0 +1,40 @@
+Prepare the SD card for the FRI2 Board
+======================================
+
+ 1. Partition the SD card with a GPT partition table
+
+ sudo cgdisk /dev/mmcblk0
+
+ Create two partitions:
+
+ a) First partition of a few dozens of megabytes, which will be
+ used to store the bootloader and the kernel image. Type must
+ be EF00 (EFI partition).
+
+ b) Second partition of any size, which will be used to store the
+ root filesystem. Type must be 8300 (Linux filesystem)
+
+ 2. Prepare the boot partition
+
+ We will format it, mount it, copy the EFI data generated by
+ Buildroot, and the kernel image.
+
+ sudo mkfs.vfat -F 32 -n boot /dev/mmcblk0p1
+ sudo mount /dev/mmcblk0p1 /mnt
+ sudo cp -a output/images/efi-part/* /mnt/
+ sudo cp output/images/bzImage /mnt/
+ sudo umount /mnt
+
+ 3. Prepare the root partition
+
+ We will format it, mount it, and extract the root filesystem.
+
+ sudo mkfs.ext3 -L root /dev/mmcblk0p2
+ sudo mount /dev/mmcblk0p2 /mnt
+ sudo tar -C /mnt -xf output/images/rootfs.tar
+ sudo umount /mnt
+
+ 4. Enjoy
+
+Additional informations about this board can be found at
+http://us.kontron.com/products/systems+and+platforms/m2m/m2m+smart+services+developer+kit.html.
diff --git a/configs/fri2_defconfig b/configs/fri2_defconfig
new file mode 100644
index 0000000..a7e22c7
--- /dev/null
+++ b/configs/fri2_defconfig
@@ -0,0 +1,23 @@
+# Architecture
+BR2_x86_64=y
+BR2_x86_atom=y
+
+# Misc
+BR2_TARGET_GENERIC_GETTY_PORT="ttyPCH1"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/fri2/post-build.sh"
+
+# Lock to 3.8 headers
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="3.8"
+
+# Linux kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.yoctoproject.org/linux-yocto-3.8"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="f20047520a57322f05d95a18a5fbd082fb15cb87"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/fri2/linux-3.8.config"
+
+# Bootloader
+BR2_TARGET_GRUB2=y
+BR2_TARGET_GRUB2_I386_EFI=y
--
1.8.3.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 2/5] gnu-efi: new package
2014-02-18 23:33 ` [Buildroot] [PATCH v2 2/5] gnu-efi: " Thomas Petazzoni
@ 2014-02-19 17:53 ` Yann E. MORIN
2014-02-19 18:57 ` Thomas Petazzoni
0 siblings, 1 reply; 12+ messages in thread
From: Yann E. MORIN @ 2014-02-19 17:53 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2014-02-19 00:33 +0100, Thomas Petazzoni spake thusly:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
[--SNIP--]
> diff --git a/package/gnu-efi/gnu-efi.mk b/package/gnu-efi/gnu-efi.mk
> new file mode 100644
> index 0000000..28eb17e
> --- /dev/null
> +++ b/package/gnu-efi/gnu-efi.mk
> @@ -0,0 +1,40 @@
> +################################################################################
> +#
> +# gnu-efi
> +#
> +################################################################################
> +
> +GNU_EFI_VERSION = 3.0u
> +GNU_EFI_SOURCE = gnu-efi_$(GNU_EFI_VERSION).orig.tar.gz
> +GNU_EFI_SITE = http://downloads.sourceforge.net/project/gnu-efi/
> +GNU_EFI_INSTALL_STAGING = YES
> +GNU_EFI_LICENSE = GPLv2+ (gnuefi), BSD (efilib)
> +GNU_EFI_LICENSE_FILES = debian/copyright
> +
> +ifeq ($(BR2_i386),y)
> +GNU_EFI_PLATFORM=ia32
> +else ifeq ($(BR2_x86_64),y)
> +GNU_EFI_PLATFORM=x86_64
> +endif
Shouldn't we do like for grub: some EFI-BIOS on x86-64 machines might be
a 32-bit EFI-BIOS, in which case we'd want to build the 32-bit version
even if the target is 64-bit?
> +define GNU_EFI_BUILD_CMDS
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> + $(TARGET_CONFIGURE_OPTS) \
> + ARCH=$(GNU_EFI_PLATFORM)
> +endef
> +
> +define GNU_EFI_INSTALL_TARGET_CMDS
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> + $(TARGET_CONFIGURE_OPTS) \
> + INSTALLROOT=$(TARGET_DIR) \
> + PREFIX=/usr ARCH=$(GNU_EFI_PLATFORM) install
> +endef
> +
> +define GNU_EFI_INSTALL_STAGING_CMDS
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> + $(TARGET_CONFIGURE_OPTS) \
> + INSTALLROOT=$(STAGING_DIR) \
> + PREFIX=/usr ARCH=$(GNU_EFI_PLATFORM) install
> +endef
Why install in target/ and staging/, and not in images/ ?
Also, this is used to build EFI applications, so I'd expect some host
tools to be built and isntalled, too. What am I missing?
(Hmm... Maybe I should look at the rest of the series...)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 3/5] gummiboot: new package
2014-02-18 23:33 ` [Buildroot] [PATCH v2 3/5] gummiboot: " Thomas Petazzoni
@ 2014-02-19 17:59 ` Yann E. MORIN
2014-02-19 18:59 ` Thomas Petazzoni
0 siblings, 1 reply; 12+ messages in thread
From: Yann E. MORIN @ 2014-02-19 17:59 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2014-02-19 00:33 +0100, Thomas Petazzoni spake thusly:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
[--SNIP--]
> --- /dev/null
> +++ b/boot/gummiboot/gummiboot.mk
> @@ -0,0 +1,42 @@
> +################################################################################
> +#
> +# gummiboot
> +#
> +################################################################################
> +
> +GUMMIBOOT_SITE = git://anongit.freedesktop.org/gummiboot
> +GUMMIBOOT_VERSION = 43
> +GUMMIBOOT_LICENSE = LGPLv2.1+
> +GUMMIBOOT_LICENSE_FILES = LICENSE
> +
> +# The git archive does not have the autoconf/automake stuff generated.
> +GUMMIBOOT_AUTORECONF = YES
> +GUMMIBOOT_DEPENDENCIES = gnu-efi host-pkgconf util-linux
Ah, gnu-efi is used here. That's why we need to install it in staging/
and target/, right?
Still, since this is a boot-related stuff, do we really need to have
gnu-efi installed in target/ ?
> +GUMMIBOOT_INSTALL_TARGET = NO
> +GUMMIBOOT_INSTALL_IMAGES = YES
> +
> +ifeq ($(BR2_i386),y)
> +GUMMIBOOT_IMGARCH = ia32
> +else ifeq ($(BR2_x86_64),y)
> +GUMMIBOOT_IMGARCH = x64
> +endif
Ditto: what about 32-bit EFI-BIOS on a 64-bit machine?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 2/5] gnu-efi: new package
2014-02-19 17:53 ` Yann E. MORIN
@ 2014-02-19 18:57 ` Thomas Petazzoni
2014-02-19 19:06 ` Yann E. MORIN
0 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni @ 2014-02-19 18:57 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Wed, 19 Feb 2014 18:53:38 +0100, Yann E. MORIN wrote:
> > +ifeq ($(BR2_i386),y)
> > +GNU_EFI_PLATFORM=ia32
> > +else ifeq ($(BR2_x86_64),y)
> > +GNU_EFI_PLATFORM=x86_64
> > +endif
>
> Shouldn't we do like for grub: some EFI-BIOS on x86-64 machines might be
> a 32-bit EFI-BIOS, in which case we'd want to build the 32-bit version
> even if the target is 64-bit?
No, because it doesn't work. Building gnu-efi 32 bits with a 64 bits
toolchain fails.
> > +define GNU_EFI_BUILD_CMDS
> > + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> > + $(TARGET_CONFIGURE_OPTS) \
> > + ARCH=$(GNU_EFI_PLATFORM)
> > +endef
> > +
> > +define GNU_EFI_INSTALL_TARGET_CMDS
> > + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> > + $(TARGET_CONFIGURE_OPTS) \
> > + INSTALLROOT=$(TARGET_DIR) \
> > + PREFIX=/usr ARCH=$(GNU_EFI_PLATFORM) install
> > +endef
> > +
> > +define GNU_EFI_INSTALL_STAGING_CMDS
> > + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> > + $(TARGET_CONFIGURE_OPTS) \
> > + INSTALLROOT=$(STAGING_DIR) \
> > + PREFIX=/usr ARCH=$(GNU_EFI_PLATFORM) install
> > +endef
>
> Why install in target/ and staging/, and not in images/ ?
Because gnu-efi is not a bootloader. gnu-efi is a set of header files
and a small library to be linked into an EFI application. So installing
it in images/ doesn't make any sense.
However, I agree that the installation to the target is useless, so I
will remove it.
> Also, this is used to build EFI applications, so I'd expect some host
> tools to be built and isntalled, too. What am I missing?
There are no host tools. As far as I understand, gnu-efi only contains
runtime code, to be linked into an EFI application that will be
executed on the target.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 3/5] gummiboot: new package
2014-02-19 17:59 ` Yann E. MORIN
@ 2014-02-19 18:59 ` Thomas Petazzoni
2014-02-19 19:08 ` Yann E. MORIN
0 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni @ 2014-02-19 18:59 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Wed, 19 Feb 2014 18:59:29 +0100, Yann E. MORIN wrote:
> > +# The git archive does not have the autoconf/automake stuff generated.
> > +GUMMIBOOT_AUTORECONF = YES
> > +GUMMIBOOT_DEPENDENCIES = gnu-efi host-pkgconf util-linux
>
> Ah, gnu-efi is used here. That's why we need to install it in staging/
> and target/, right?
To staging: no.
> Still, since this is a boot-related stuff, do we really need to have
> gnu-efi installed in target/ ?
Correct, I believe installation to target is useless, as I've
mentioned in my reply to your comments on the gnu-efi package.
> > +GUMMIBOOT_INSTALL_TARGET = NO
> > +GUMMIBOOT_INSTALL_IMAGES = YES
> > +
> > +ifeq ($(BR2_i386),y)
> > +GUMMIBOOT_IMGARCH = ia32
> > +else ifeq ($(BR2_x86_64),y)
> > +GUMMIBOOT_IMGARCH = x64
> > +endif
>
> Ditto: what about 32-bit EFI-BIOS on a 64-bit machine?
From my testing, it doesn't work. And I'd say that if someone wants to
work on this, it could be seen as a possible extension of the proposed
patches, to be implemented and submitted later.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 2/5] gnu-efi: new package
2014-02-19 18:57 ` Thomas Petazzoni
@ 2014-02-19 19:06 ` Yann E. MORIN
0 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-02-19 19:06 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2014-02-19 19:57 +0100, Thomas Petazzoni spake thusly:
> On Wed, 19 Feb 2014 18:53:38 +0100, Yann E. MORIN wrote:
> > > +ifeq ($(BR2_i386),y)
> > > +GNU_EFI_PLATFORM=ia32
> > > +else ifeq ($(BR2_x86_64),y)
> > > +GNU_EFI_PLATFORM=x86_64
> > > +endif
> >
> > Shouldn't we do like for grub: some EFI-BIOS on x86-64 machines might be
> > a 32-bit EFI-BIOS, in which case we'd want to build the 32-bit version
> > even if the target is 64-bit?
>
> No, because it doesn't work. Building gnu-efi 32 bits with a 64 bits
> toolchain fails.
OK.
Since we have such a selection in grub2, maybe we could add a little
comment in gnu-eif's Config.in saying building a 32-bit gnu-eif for a
64-bit target is not supported?
> > > +define GNU_EFI_BUILD_CMDS
> > > + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> > > + $(TARGET_CONFIGURE_OPTS) \
> > > + ARCH=$(GNU_EFI_PLATFORM)
> > > +endef
> > > +
> > > +define GNU_EFI_INSTALL_TARGET_CMDS
> > > + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> > > + $(TARGET_CONFIGURE_OPTS) \
> > > + INSTALLROOT=$(TARGET_DIR) \
> > > + PREFIX=/usr ARCH=$(GNU_EFI_PLATFORM) install
> > > +endef
> > > +
> > > +define GNU_EFI_INSTALL_STAGING_CMDS
> > > + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> > > + $(TARGET_CONFIGURE_OPTS) \
> > > + INSTALLROOT=$(STAGING_DIR) \
> > > + PREFIX=/usr ARCH=$(GNU_EFI_PLATFORM) install
> > > +endef
> >
> > Why install in target/ and staging/, and not in images/ ?
>
> Because gnu-efi is not a bootloader. gnu-efi is a set of header files
> and a small library to be linked into an EFI application. So installing
> it in images/ doesn't make any sense.
OK, now I understand. Thanks for the explanations.
> However, I agree that the installation to the target is useless, so I
> will remove it.
>
> > Also, this is used to build EFI applications, so I'd expect some host
> > tools to be built and isntalled, too. What am I missing?
>
> There are no host tools. As far as I understand, gnu-efi only contains
> runtime code, to be linked into an EFI application that will be
> executed on the target.
I asked because I did not find the help text (or even the text on
gnu-efi's website mainpage very helpful either).
Thanks for the clarifications. :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 3/5] gummiboot: new package
2014-02-19 18:59 ` Thomas Petazzoni
@ 2014-02-19 19:08 ` Yann E. MORIN
0 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-02-19 19:08 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2014-02-19 19:59 +0100, Thomas Petazzoni spake thusly:
> Dear Yann E. MORIN,
>
> On Wed, 19 Feb 2014 18:59:29 +0100, Yann E. MORIN wrote:
>
> > > +# The git archive does not have the autoconf/automake stuff generated.
> > > +GUMMIBOOT_AUTORECONF = YES
> > > +GUMMIBOOT_DEPENDENCIES = gnu-efi host-pkgconf util-linux
> >
> > Ah, gnu-efi is used here. That's why we need to install it in staging/
> > and target/, right?
>
> To staging: no.
>
> > Still, since this is a boot-related stuff, do we really need to have
> > gnu-efi installed in target/ ?
>
> Correct, I believe installation to target is useless, as I've
> mentioned in my reply to your comments on the gnu-efi package.
OK, it now makes sense. :-)
> > > +GUMMIBOOT_INSTALL_TARGET = NO
> > > +GUMMIBOOT_INSTALL_IMAGES = YES
> > > +
> > > +ifeq ($(BR2_i386),y)
> > > +GUMMIBOOT_IMGARCH = ia32
> > > +else ifeq ($(BR2_x86_64),y)
> > > +GUMMIBOOT_IMGARCH = x64
> > > +endif
> >
> > Ditto: what about 32-bit EFI-BIOS on a 64-bit machine?
>
> From my testing, it doesn't work. And I'd say that if someone wants to
> work on this, it could be seen as a possible extension of the proposed
> patches, to be implemented and submitted later.
Maybe add a little note in the help text stating this is not suported,
then?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-02-19 19:08 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-18 23:33 [Buildroot] [PATCH v2 0/5] Various x86 bootloaders and board support Thomas Petazzoni
2014-02-18 23:33 ` [Buildroot] [PATCH v2 1/5] grub2: add new package Thomas Petazzoni
2014-02-18 23:33 ` [Buildroot] [PATCH v2 2/5] gnu-efi: " Thomas Petazzoni
2014-02-19 17:53 ` Yann E. MORIN
2014-02-19 18:57 ` Thomas Petazzoni
2014-02-19 19:06 ` Yann E. MORIN
2014-02-18 23:33 ` [Buildroot] [PATCH v2 3/5] gummiboot: " Thomas Petazzoni
2014-02-19 17:59 ` Yann E. MORIN
2014-02-19 18:59 ` Thomas Petazzoni
2014-02-19 19:08 ` Yann E. MORIN
2014-02-18 23:34 ` [Buildroot] [PATCH v2 4/5] board: add support for the MinnowBoard Thomas Petazzoni
2014-02-18 23:34 ` [Buildroot] [PATCH v2 5/5] board: add support for the Fri2 board Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox