On Sun, 2021-02-07 at 14:15 +0100, Pierre Labastie wrote:
> On Sun, 2021-02-07 at 13:38 +0100, Frans de Boer wrote:
> > LS,
> > 
> > Finally had a change to finish the LFS build. Alas, the grub-
> > install 
> > reported the old error "Decompression is too big".
> > Here is the solution to add to the section to compile grub:
> > 
> > # Patch gentpl.py to avoid an error from grub-mkinstall
> > "Decompressor
> > is 
> > too big"
> > # Source:
> > https://www.mail-archive.com/grub-devel@gnu.org/msg29840.html
> > #
> > sed -i -E "s@(.*-R .note.gnu.gold-version -R)(.*)@\1
> > .note.gnu.property 
> > -R\2@" gentpl.py
> > ln -fs /usr/bin/python3 /usr/bin/python  # grub needs 'python'
> > ./autogen.sh
> > rm -f /usr/bin/python
> > 
> 
> Very interesting, thanks! There are several hundreds of commits in
> grub
> repositories since the last release. I hope we'll see a release
> soon...
> 
> For us, instead of running autogen, can't the generated file be
> patched
> directly? I looks like gentpl.py generates Makefile.*.am, and my
> guess
> is that this ends up in Makefile.*.in after running autofu...
> 
> Will look more closely

Yes this can be simplified to (sorry for format, need to fit into 80
chars per line):
sed -i -E \
"s@(.*-R .note.gnu.gold-version -R)(.*)@\1 .note.gnu.property -R\2@" \
 Makefile.in grub-core/Makefile.in

before running configure. Results:
- without the sed, after make:
------
$ ls -l grub-core/lzma*
-rwxr-xr-x 1 pierre pierre      4972  7 févr. 15:01 grub-
core/lzma_decompress.image
-rwxr-xr-x 1 pierre pierre 134479612  7 févr. 15:01 grub-
core/lzma_decompress.img
------
- with the sed, after make:
------
$ ls -l grub-core/lzma*
-rwxr-xr-x 1 pierre pierre 4972  7 févr. 15:09 grub-
core/lzma_decompress.image
-rwxr-xr-x 1 pierre pierre 2848  7 févr. 15:09 grub-
core/lzma_decompress.img
------

If nobody speaks up, will add that tomorrow to grub page.

Pierre

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to