Bump buidlroot version to 2018.02.6
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
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@
|
||||
@@ -1,39 +0,0 @@
|
||||
From f30c692c1f9ef0e93bee2b408a24baa017f1ca9d Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Thu, 7 Nov 2013 01:01:47 +0100
|
||||
Subject: [PATCH] * grub-core/gettext/gettext.c (main_context),
|
||||
(secondary_context): Define after defining type and not before.
|
||||
|
||||
[Thomas: backport from upstream commit
|
||||
f30c692c1f9ef0e93bee2b408a24baa017f1ca9d, and remove ChangeLog
|
||||
modifications to avoid conflicts.]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
grub-core/gettext/gettext.c | 4 ++--
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
|
||||
index df73570..4880cef 100644
|
||||
--- a/grub-core/gettext/gettext.c
|
||||
+++ b/grub-core/gettext/gettext.c
|
||||
@@ -34,8 +34,6 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
http://www.gnu.org/software/autoconf/manual/gettext/MO-Files.html .
|
||||
*/
|
||||
|
||||
-static struct grub_gettext_context main_context, secondary_context;
|
||||
-
|
||||
static const char *(*grub_gettext_original) (const char *s);
|
||||
|
||||
struct grub_gettext_msg
|
||||
@@ -69,6 +67,8 @@ struct grub_gettext_context
|
||||
struct grub_gettext_msg *grub_gettext_msg_list;
|
||||
};
|
||||
|
||||
+static struct grub_gettext_context main_context, secondary_context;
|
||||
+
|
||||
#define MO_MAGIC_NUMBER 0x950412de
|
||||
|
||||
static grub_err_t
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
config BR2_TARGET_GRUB2_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_i386
|
||||
default y if BR2_x86_64
|
||||
|
||||
config BR2_TARGET_GRUB2
|
||||
bool "grub2"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
|
||||
depends on BR2_USE_WCHAR
|
||||
help
|
||||
GNU GRUB is a Multiboot boot loader. It was derived from
|
||||
GRUB, the GRand Unified Bootloader, which was originally
|
||||
@@ -11,104 +17,8 @@ config BR2_TARGET_GRUB2
|
||||
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 /dev/loop0
|
||||
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
|
||||
sudo ./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. Cleanup loop device
|
||||
sudo partx -d /dev/loop0
|
||||
sudo losetup -d /dev/loop0
|
||||
7. Your disk.img is ready!
|
||||
|
||||
Using genimage
|
||||
--------------
|
||||
|
||||
If you use genimage to generate your complete image,
|
||||
installing Grub can be tricky. Here is how to achieve Grub's
|
||||
installation with genimage:
|
||||
|
||||
partition boot {
|
||||
in-partition-table = "no"
|
||||
image = "path_to_boot.img"
|
||||
offset = 0
|
||||
size = 512
|
||||
}
|
||||
partition grub {
|
||||
in-partition-table = "no"
|
||||
image = "path_to_grub.img"
|
||||
offset = 512
|
||||
}
|
||||
|
||||
The result is not byte to byte identical to what
|
||||
grub-bios-setup does but it works anyway.
|
||||
|
||||
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.
|
||||
For additional notes on using Grub 2 with Buildroot, see
|
||||
boot/grub2/readme.txt
|
||||
|
||||
http://www.gnu.org/software/grub/
|
||||
|
||||
@@ -167,3 +77,7 @@ config BR2_TARGET_GRUB2_BUILTIN_CONFIG
|
||||
entries cannot be described in this embedded configuration.
|
||||
|
||||
endif # BR2_TARGET_GRUB2
|
||||
|
||||
comment "grub2 needs a toolchain w/ wchar"
|
||||
depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
|
||||
depends on !BR2_USE_WCHAR
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
sha256 784ec38e7edc32239ad75b8e66df04dc8bfb26d88681bc9f627133a6eb85c458 grub-2.00.tar.xz
|
||||
# Locally computed:
|
||||
sha256 810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f grub-2.02.tar.xz
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
GRUB2_VERSION = 2.00
|
||||
GRUB2_SITE = $(BR2_GNU_MIRROR)/grub
|
||||
GRUB2_VERSION = 2.02
|
||||
GRUB2_SITE = http://ftp.gnu.org/gnu/grub
|
||||
GRUB2_SOURCE = grub-$(GRUB2_VERSION).tar.xz
|
||||
GRUB2_LICENSE = GPLv3+
|
||||
GRUB2_LICENSE = GPL-3.0+
|
||||
GRUB2_LICENSE_FILES = COPYING
|
||||
GRUB2_DEPENDENCIES = host-bison host-flex
|
||||
|
||||
@@ -46,15 +46,15 @@ endif
|
||||
# bootloader itself; none of these are used to build the native
|
||||
# tools.
|
||||
#
|
||||
# NOTE: TARGET_STRIP is overridden by BR2_STRIP_none, so always
|
||||
# NOTE: TARGET_STRIP is overridden by !BR2_STRIP_strip, so always
|
||||
# use the cross compile variant to ensure grub2 builds
|
||||
|
||||
GRUB2_CONF_ENV = \
|
||||
$(HOST_CONFIGURE_OPTS) \
|
||||
CPP="$(HOSTCC) -E" \
|
||||
TARGET_CC="$(TARGET_CC)" \
|
||||
TARGET_CFLAGS="$(TARGET_CFLAGS) -fno-stack-protector" \
|
||||
TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
||||
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
|
||||
TARGET_CPPFLAGS="$(TARGET_CPPFLAGS) -fno-stack-protector" \
|
||||
TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
NM="$(TARGET_NM)" \
|
||||
OBJCOPY="$(TARGET_OBJCOPY)" \
|
||||
@@ -63,6 +63,8 @@ GRUB2_CONF_ENV = \
|
||||
GRUB2_CONF_OPTS = \
|
||||
--target=$(GRUB2_TARGET) \
|
||||
--with-platform=$(GRUB2_PLATFORM) \
|
||||
--prefix=/ \
|
||||
--exec-prefix=/ \
|
||||
--disable-grub-mkfont \
|
||||
--enable-efiemu=no \
|
||||
ac_cv_lib_lzma_lzma_code=no \
|
||||
@@ -79,15 +81,15 @@ GRUB2_INSTALL_TARGET_OPTS = DESTDIR=$(HOST_DIR) install
|
||||
|
||||
ifeq ($(BR2_TARGET_GRUB2_I386_PC),y)
|
||||
define GRUB2_IMAGE_INSTALL_ELTORITO
|
||||
cat $(HOST_DIR)/usr/lib/grub/$(GRUB2_TUPLE)/cdboot.img $(GRUB2_IMAGE) > \
|
||||
cat $(HOST_DIR)/lib/grub/$(GRUB2_TUPLE)/cdboot.img $(GRUB2_IMAGE) > \
|
||||
$(BINARIES_DIR)/grub-eltorito.img
|
||||
endef
|
||||
endif
|
||||
|
||||
define GRUB2_IMAGE_INSTALLATION
|
||||
mkdir -p $(dir $(GRUB2_IMAGE))
|
||||
$(HOST_DIR)/usr/bin/grub-mkimage \
|
||||
-d $(HOST_DIR)/usr/lib/grub/$(GRUB2_TUPLE) \
|
||||
$(HOST_DIR)/bin/grub-mkimage \
|
||||
-d $(HOST_DIR)/lib/grub/$(GRUB2_TUPLE) \
|
||||
-O $(GRUB2_TUPLE) \
|
||||
-o $(GRUB2_IMAGE) \
|
||||
-p "$(GRUB2_PREFIX)" \
|
||||
|
||||
98
bsp/buildroot/boot/grub2/readme.txt
Normal file
98
bsp/buildroot/boot/grub2/readme.txt
Normal file
@@ -0,0 +1,98 @@
|
||||
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 /dev/loop0
|
||||
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
|
||||
sudo ./output/host/sbin/grub-bios-setup \
|
||||
-b ./output/host/lib/grub/i386-pc/boot.img \
|
||||
-c ./output/images/grub.img -d . /dev/loop0
|
||||
6. Cleanup loop device
|
||||
sudo partx -d /dev/loop0
|
||||
sudo losetup -d /dev/loop0
|
||||
7. Your disk.img is ready!
|
||||
|
||||
Using genimage
|
||||
--------------
|
||||
|
||||
If you use genimage to generate your complete image,
|
||||
installing Grub can be tricky. Here is how to achieve Grub's
|
||||
installation with genimage:
|
||||
|
||||
partition boot {
|
||||
in-partition-table = "no"
|
||||
image = "path_to_boot.img"
|
||||
offset = 0
|
||||
size = 512
|
||||
}
|
||||
partition grub {
|
||||
in-partition-table = "no"
|
||||
image = "path_to_grub.img"
|
||||
offset = 512
|
||||
}
|
||||
|
||||
The result is not byte to byte identical to what
|
||||
grub-bios-setup does but it works anyway.
|
||||
|
||||
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.
|
||||
Reference in New Issue
Block a user