Commit Graph

42 Commits (1634461bd208f4bd108ea5c3d3f1cf9eb56d4a7e)

Author SHA1 Message Date
Kevin Darbyshire-Bryant fcd1401700 grub2: fix build when ASLR enabled
Disable ASLR and filter '-fno-plt' from CFLAGS: solves building when
ASLR enabled by basically disabling ASLR.

Solves errors similar to:
relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
or
module missing GLOBAL_OFFSET_TABLE

Suggested-by: 李国 <uxgood.org@gmail.com>
Acked-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years ago
李国 d9228514cc grub2: make some change to add efi platform support
1.generate boot image at Package/install section
2.move boot image to $(STAGING_DIR_IMAGE)/grub2/
3.add efi variant to support efi platform

Signed-off-by: 李国 <uxgood.org@gmail.com>
4 years ago
Paul Spooren 5a5df62d95 x86/grub2: move grub2 image creation to package
Let the grub2 package take care of creating installable grub2 images,
this will allow creating grub2 images without first calling x86 image
generation recipe. Also as side effect, since those images are now
shared, it'll reduce the number of calling grub-mkimage.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[rebase, adjusted commit title]
Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years ago
Tomasz Maciej Nowak b322243d2f x86: add bootloader upgrade on sysupgrade
Currently bootloader always stays on the same version as when first
written to boot medium (not true if partition layout changed, which will
trigger sysupgrade process to write full disk image). That creates
inconveniences as it always stays with same features or/and bugs. Users
wishing to add support to additional modules or new version, would need
to write the whole image, potentially destroying previous system
configuration. To fix these, this commit adds additional routine to
sysupgrade which upgrades unconditionally the bootloader to the latest
state provided by OpenWrt.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years ago
Felix Fietkau 9f07d1519c grub2: fix a build regression on non-linux systems
Merge an upstream commit to correct a missing rename in generic code

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Tomasz Maciej Nowak 3fa0f32a68 grub2: bump to 2.04
* GCC 8 and 9 support.
* Gnulib integration overhaul.
* RISC-V support.
* Xen PVH support.
* Native UEFI secure boot support.
* UEFI TPM driver.
* New IEEE 1275 obdisk driver.
* Btrfs RAID 5 and RIAD 6 support.
* bootin from F2FS support.
* PARTUUID support.
* VLAN support.
* Native DHCP support.
* Many ARM and ARM64 fixes.
* Many SPARC fixes.
* Many IEEE 1275 fixes.
* ...and tons of other fixes and cleanups...

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Tomasz Maciej Nowak bb0e4f9fb0 build: remove leftovers from previous x86 commits
VBoxManage is not used and the image is created with proper permisions:
0f5d0f6  image: use internal qemu-img for vmdk and vdi images drop host
         dependencies on qemu-utils and VirtualBox

Unreachable config symbols:
9e0759e  x86: merge all geode based subtargets into one

No need to define those symbols since x86_64 is subtarget of x86:
196fb76  x86: make x86_64 a subtarget instead of a standalone target

Unreachable config symbols, so remove GRUB_ROOT:
371b382  x86: remove the xen_domu subtarget

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Philip Prindeville a6d02a7572 grub2: fix regression caused by binutils-2.31.1
grub-efi no longer works:

grub-mkimage: error: relocation 0x4 is not implemented yet.

See:

http://git.savannah.gnu.org/cgit/grub.git/commit/util?id=842c390469e2c2e10b5aa36700324cd3bde25875

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>i [PKG_RELEASE increase]
6 years ago
Jo-Philipp Wich 9ffbe84ea4 grub2: rebase patches
Patch 300-CVE-2015-8370.patch was added without proper rebasing on the
version used by OpenWrt, make it apply and refresh the patch to fix
compilation.

Fixes: 7e73e9128f ("grub2: Fix CVE-2015-8370")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Rosen Penev 7e73e9128f grub2: Fix CVE-2015-8370
This CVE is a culmination of multiple integer overflow issues that cause
multiple issues like Denial of Service and authentication bypass.

More info: https://nvd.nist.gov/vuln/detail/CVE-2015-8370

Taken from Fedora.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years ago
Edi Turn e9dee19487 grub2: fix packed-not-aligned error on GCC 8
Fix the compile error "packed-not-aligned" when using GCC 8.

Signed-off-by: Edi Turn <yyxstter@gmail.com>
6 years ago
Felix Fietkau 1b13cbc15b grub2: disable building platform code for target utility
It is not used and it was causing a build error with GCC 7.3

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Alexander Couzens c61a239514
add PKG_CPE_ID ids to package and tools
CPE ids helps to tracks CVE in packages.
https://cpe.mitre.org/specification/

Thanks to swalker for CPE to package mapping and
keep tracking CVEs.

Acked-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Alif M. Ahmad 415c47de79 package/grub2: update to 2.02
Update to version 2.02

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years ago
Alif M. Ahmad ffd055d5bb grub2: update to 2.02~rc2
Update to version 2.02~rc2.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years ago
Alif M. Ahmad 399cbbd127 grub2: update to 2.02~rc1
Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years ago
Mathias Kresin dc5ba0a48a packages: mark packages depending on a target as nonshared
The packages can't be build as shared packages due to the unmet
dependencies.

Fixes FS#418.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Alexandru Ardelean 65c8f2890c grub2: upgrade to 2.02-beta3 (3 years newer than previous)
'100-musl-compat.patch' does not seem to be required anymore.
'210-fix_serial_rtscts.patchi' is superseeded by:
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=bac5d1a64ab4191058a8fd4c05f6b3b339e249e7

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
7 years ago
Alexandru Ardelean 77812cdfec grub2: disable 'check-macro-version' build rule in 'po' build
This seems to occur when gettext-full is built on the host-side
and the autoreconf stuff re-generates some of the build files,
except for the po/Makefile.in.in

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
7 years ago
Alexandru Ardelean 2b54fa4dff grub2: do not generate mkfonts at build time
Even though these fonts may not be installed, they seem to be
generated at build time.

Seems that the configure script re-generated from configure.ac
is a bit more annoying than it has to be.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
7 years ago
Alexandru Ardelean b33845b2da grub2: add PKG_FIXUP:=autoreconf
Reboot of: a0ea22ac43
Reverted: 3c52cbfa53

The host-side build of grub2 requires this sometimes.
This will re-generate the ./configure script from configure.ac.
I don't know the conditions of how this reproduces, it just
sometimes appears, and sometimes doesn't.

Build error
```
<lede-dir>/build_dir/target-x86_64_musl-1.1.15_yogi/host/grub-2.02~beta2/build-aux/missing: line 81: aclocal-1.14: command not found
WARNING: 'aclocal-1.14' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
Makefile:3962: recipe for target 'aclocal.m4' failed
```

Adding PKG_FIXUP adds sanity (i.e. autoreconf is used for host & target
builds) over just using HOST_FIXUP.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
7 years ago
Felix Fietkau 720b99215d treewide: clean up download hashes
Replace *MD5SUM with *HASH, replace MD5 hashes with SHA256

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
John Crispin 3c52cbfa53 Revert "grub2: add PKG_FIXUP:=autoreconf"
this caused build errors on x86

This reverts commit a0ea22ac43.

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Alexandru Ardelean a0ea22ac43 grub2: add PKG_FIXUP:=autoreconf
The host-side build of grub2 requires this sometimes.
This will re-generate the ./configure script from configure.ac.
I don't know the conditions of how this reproduces, it just
sometimes appears, and sometimes doesn't.

Build error
```
<lede-dir>/build_dir/target-x86_64_musl-1.1.15_yogi/host/grub-2.02~beta2/build-aux/missing: line 81: aclocal-1.14: command not found
WARNING: 'aclocal-1.14' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
Makefile:3962: recipe for target 'aclocal.m4' failed
```

Adding PKG_FIXUP adds sanity (i.e. autoreconf is used for host & target
builds) over just using HOST_FIXUP.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Jo-Philipp Wich f2752f4735 grub2: add missing SECTION variable and remove non breaking space
Fix metadata scan failure in the grub2 package by removing an unexpected
invisible space character and by adding back the missing SECTION variable
which was removed with d140648.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Alberto Bursi d140648622 grub2: move to Boot Loaders category
because boot loaders are in Boot Loaders, not in Utilities -> Boot Loaders

Also moved brub2-editenv in Utilities -> Boot Loaders

Part of a wider housekeeping effort on the packages repository.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
8 years ago
Felix Fietkau 59e3a4714a grub2: switch back to installing to STAGING_DIR_HOST
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48424
8 years ago
Jo-Philipp Wich 9b01282515 grub2: disable stack-protector
- enabling "-fstack-protector" results in build errors
- Upstream explicitly tests & disables it

v2:
- use override

reference: upstream commit baa2a121e004a95a12e2bb7f2419de6625a30c2d

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>

SVN-Revision: 46126
9 years ago
Jo-Philipp Wich 25eddec9cb grub2: fix build against musl
Invert the `__GLIBC__` guards into `!__UCLIBC__` ones to avoid
invalid references to `_llseek` on musl.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 46125
9 years ago
Hauke Mehrtens fcc6f801ca grub: add download mirrors
Add three download mirrors for 'grub', as the Makefile currently defines only
one download location.

@GNU can not be used, as the most recent version of 'grub' is not available
at the general GNU mirrors, and can only be found at the "gnu-alpha" mirrors.

Signed-off-by: Hannu Nyman <hannu.nyman at iki.fi>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 45909
9 years ago
Felix Fietkau 5011d85ee8 grub2: fix processing the serial rts/cts option
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44752
9 years ago
John Crispin 74a3a77bcd license info - revert r43155
turns out that r43155 adds duplicate info.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43167
10 years ago
John Crispin c10d97484a Add more license tags with SPDX identifiers
Note, that licensing stuff is a nightmare: many packages does not clearly
state their licenses, and often multiple source files are simply copied
together - each with different licensing information in the file headers.

I tried hard to ensure, that the license information extracted into the OpenWRT's
makefiles fit the "spirit" of the packages, e.g. such small packages which
come without a dedicated source archive "inherites" the OpenWRT's own license
in my opinion.

However, I can not garantee that I always picked the correct information
and/or did not miss license information.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 43155
10 years ago
John Crispin c890f71b95 package:grub2: fix build error on linux missing libzfs
configure enables libzfs support on default.
This will break the build, on systems without libzfs.

Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>

SVN-Revision: 41935
10 years ago
Felix Fietkau a558ce7e21 grub2: disable mkfont - fix build on Archlinux
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

SVN-Revision: 40350
10 years ago
Felix Fietkau fa4d4a62bf grub2: disable libdevmapper - fix build when it's available
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

SVN-Revision: 40349
10 years ago
Felix Fietkau 24095302aa grub2: update to 2.02-beta2, fixes mac os x 10.9 support (and many other things)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39889
10 years ago
Imre Kaloz 7aaa9bc91c add x86_64 target support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 39208
10 years ago
John Crispin d48ad63b9d grub2: Add sub package grub-editenv for target installation
grub-editenv allows to modify grub2 environment files. Add a new package
that build grub2 for the target and packs up grub-editenv.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 36574
11 years ago
Jo-Philipp Wich 78cec2cfca grub2: fix another case of gnulib failing under gnu libc
SVN-Revision: 34389
12 years ago
Florian Fainelli 49cfa54509 grub2: accept the linux-musl* tuple
Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 34306
12 years ago
John Crispin e75106aa0d move boot related packages to their own folder
SVN-Revision: 33781
12 years ago