Various x86 bootloaders and board support
v2 cover Various x86 bootloaders and board support
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
Signature · 1 line
1.8.3.2
PATCH v2 1/5 grub2: add new package
--- 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
boot/Config.in +1 -0
@@ -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"
boot/grub2/Config.in new file +120 -0
120 lines not on this page · raw message
boot/grub2/grub.cfg new file +6 -0
@@ -0,0 +1,6 @@ +set default="0" +set timeout="5" + +menuentry "Buildroot" { + linux /bzImage root=/dev/sda1 console=tty1 +}
boot/grub2/grub2-remove-gets.patch new file +21 -0
@@ -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 <[email protected]> +Signed-off-by: Thomas Petazzoni <[email protected]> + +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@
boot/grub2/grub2.mk new file +88 -0
88 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v2 2/5 gnu-efi: new package
In reply to Thomas Petazzoni--- 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
package/Config.in +1 -0
@@ -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"
package/gnu-efi/Config.in new file +9 -0
@@ -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/
package/gnu-efi/gnu-efi-01-use-override-cflags.patch new file +53 -0
53 lines not on this page · raw message
package/gnu-efi/gnu-efi-02-parallel-make-archives.patch new file +48 -0
48 lines not on this page · raw message
package/gnu-efi/gnu-efi-03-parallel-make.patch new file +22 -0
@@ -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 <[email protected]> + +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):
package/gnu-efi/gnu-efi.mk new file +40 -0
@@ -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))
Signature · 1 line
1.8.3.2
PATCH v2 2/5 gnu-efi: new package
Thomas, All,
On 2014-02-19 00:33 +0100, Thomas Petazzoni spake thusly:
Quoted 2 lines
Signed-off-by Thomas Petazzoni <[email protected]>Signed-off-by Christophe Vu-Brugier <[email protected]>
[--SNIP--]
Quoted 14 lines
package/gnu-efi/gnu-efi.mk new file +8
-0@@ -0,0 +1,40 @@ +################################################################################ +# +# gnu-efi +# +################################################################################ + +GNU_EFI_VERSION = 3.0u +GNU_EFI_SOURCE = gnu-efi_$(GNU_EFI_VERSION).orig.tar.gz
package/gnu-efi/gnu-efi.mk line 18
Quoted 10 lines
package/gnu-efi/gnu-efi.mk new file +10
-0+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?
Quoted 9 lines
package/gnu-efi/gnu-efi.mk new file +9
-0+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) \
package/gnu-efi/gnu-efi.mk line 38
Quoted 10 lines
package/gnu-efi/gnu-efi.mk new file +10
-0+ 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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v2 2/5 gnu-efi: new package
Dear Yann E. MORIN,
Quoted 9 lines · Yann E. MORIN
package/gnu-efi/gnu-efi.mk line 18
Quoted 5 lines
package/gnu-efi/gnu-efi.mk new file +5
-0+ifeq ($(BR2_i386),y) +GNU_EFI_PLATFORM=ia32 +else ifeq ($(BR2_x86_64),y) +GNU_EFI_PLATFORM=x86_64 +endifShouldn'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.
Quoted 13 lines
Quoted 13 lines
package/gnu-efi/gnu-efi.mk new file +13
-0+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 +
Quoted 8 lines
package/gnu-efi/gnu-efi.mk line 38
Quoted 6 lines
package/gnu-efi/gnu-efi.mk new file +6
-0+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 +endefWhy 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.
Quoted 2 lines
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 2/5 gnu-efi: new package
Thomas, All,
On 2014-02-19 19:57 +0100, Thomas Petazzoni spake thusly:
Quoted 11 lines · Yann E. MORIN
Quoted 9 lines
package/gnu-efi/gnu-efi.mk line 18
Quoted 5 lines
package/gnu-efi/gnu-efi.mk new file +5
-0+ifeq ($(BR2_i386),y) +GNU_EFI_PLATFORM=ia32 +else ifeq ($(BR2_x86_64),y) +GNU_EFI_PLATFORM=x86_64 +endifShouldn'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?
Quoted 2 lines
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?
Quoted 22 lines
Quoted 13 lines
Quoted 13 lines
package/gnu-efi/gnu-efi.mk new file +13
-0+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 +Quoted 8 lines
package/gnu-efi/gnu-efi.mk line 38
Quoted 6 lines
package/gnu-efi/gnu-efi.mk new file +6
-0+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 +endefWhy install in target/ and staging/, and not in images/ ?
Quoted 3 lines
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.
Quoted 9 lines
However, I agree that the installation to the target is useless, so I will remove it.
Quoted 2 lines
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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v2 3/5 gummiboot: new package
In reply to Thomas Petazzoni--- 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
boot/Config.in +1 -0
@@ -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"
boot/gummiboot/Config.in new file +28 -0
@@ -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)
boot/gummiboot/buildroot.conf new file +4 -0
@@ -0,0 +1,4 @@ +title Buildroot +version 1 +linux /bzImage +options console=ttyS0 root=/dev/sda2
boot/gummiboot/gummiboot.mk new file +42 -0
42 lines not on this page · raw message
boot/gummiboot/loader.conf new file +2 -0
@@ -0,0 +1,2 @@ +timeout 3 +default buildroot
Signature · 1 line
1.8.3.2
PATCH v2 3/5 gummiboot: new package
Thomas, All,
On 2014-02-19 00:33 +0100, Thomas Petazzoni spake thusly:
Quoted 2 lines
Signed-off-by Thomas Petazzoni <[email protected]>Signed-off-by Christophe Vu-Brugier <[email protected]>
[--SNIP--]
Quoted 7 lines
boot/gummiboot/gummiboot.mk new file +4
-0@@ -0,0 +1,42 @@ +################################################################################ +# +# gummiboot +#
boot/gummiboot/gummiboot.mk line 14
Quoted 10 lines
boot/gummiboot/gummiboot.mk new file +10
-0+################################################################################ + +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/ ?
boot/gummiboot/gummiboot.mk line 22
Quoted 8 lines
boot/gummiboot/gummiboot.mk new file +8
-0+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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v2 3/5 gummiboot: new package
Dear Yann E. MORIN,
Quoted 6 lines · Yann E. MORIN
boot/gummiboot/gummiboot.mk line 14
Quoted 3 lines
boot/gummiboot/gummiboot.mk new file +3
-0+# The git archive does not have the autoconf/automake stuff generated. +GUMMIBOOT_AUTORECONF = YES +GUMMIBOOT_DEPENDENCIES = gnu-efi host-pkgconf util-linuxAh, gnu-efi is used here. That's why we need to install it in staging/ and target/, right?
To staging: no.
Quoted 2 lines
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.
Quoted 10 lines
boot/gummiboot/gummiboot.mk line 22
Quoted 8 lines
boot/gummiboot/gummiboot.mk new file +8
-0+GUMMIBOOT_INSTALL_TARGET = NO +GUMMIBOOT_INSTALL_IMAGES = YES + +ifeq ($(BR2_i386),y) +GUMMIBOOT_IMGARCH = ia32 +else ifeq ($(BR2_x86_64),y) +GUMMIBOOT_IMGARCH = x64 +endifDitto: 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 3/5 gummiboot: new package
Thomas, All,
On 2014-02-19 19:59 +0100, Thomas Petazzoni spake thusly:
Quoted 11 lines
Dear Yann E. MORIN,
Quoted 6 lines · Yann E. MORIN
boot/gummiboot/gummiboot.mk line 14
Quoted 3 lines
boot/gummiboot/gummiboot.mk new file +3
-0+# The git archive does not have the autoconf/automake stuff generated. +GUMMIBOOT_AUTORECONF = YES +GUMMIBOOT_DEPENDENCIES = gnu-efi host-pkgconf util-linuxAh, gnu-efi is used here. That's why we need to install it in staging/ and target/, right?
Quoted 7 lines
To staging: no.
Quoted 2 lines
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. :-)
Quoted 11 lines
Quoted 10 lines
boot/gummiboot/gummiboot.mk line 22
Quoted 8 lines
boot/gummiboot/gummiboot.mk new file +8
-0+GUMMIBOOT_INSTALL_TARGET = NO +GUMMIBOOT_INSTALL_IMAGES = YES + +ifeq ($(BR2_i386),y) +GUMMIBOOT_IMGARCH = ia32 +else ifeq ($(BR2_x86_64),y) +GUMMIBOOT_IMGARCH = x64 +endifDitto: what about 32-bit EFI-BIOS on a 64-bit machine?
Quoted 3 lines
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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v2 4/5 board: add support for the MinnowBoard
In reply to Thomas Petazzoni--- 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
board/minnowboard/grub.cfg new file +6 -0
@@ -0,0 +1,6 @@ +set default="0" +set timeout="5" + +menuentry "Buildroot" { + linux /bzImage root=/dev/mmcblk0p2 rootwait console=ttyPCH0,115200 +}
board/minnowboard/linux-3.8.config new file +172 -0
172 lines not on this page · raw message
board/minnowboard/post-build.sh new file +2 -0
@@ -0,0 +1,2 @@ +#!/bin/sh +cp board/minnowboard/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
board/minnowboard/readme.txt new file +40 -0
@@ -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/.
configs/minnowboard_defconfig new file +23 -0
@@ -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
Signature · 1 line
1.8.3.2
PATCH v2 5/5 board: add support for the Fri2 board
In reply to Thomas Petazzoni--- 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
board/fri2/grub.cfg new file +6 -0
@@ -0,0 +1,6 @@ +set default="0" +set timeout="5" + +menuentry "Buildroot" { + linux /bzImage root=/dev/mmcblk0p2 rootwait console=ttyPCH1,115200 +}
board/fri2/linux-3.8.config new file +336 -0
336 lines not on this page · raw message
board/fri2/post-build.sh new file +2 -0
@@ -0,0 +1,2 @@ +#!/bin/sh +cp board/fri2/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
board/fri2/readme.txt new file +40 -0
@@ -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.
configs/fri2_defconfig new file +23 -0
@@ -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
Signature · 1 line
1.8.3.2