Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

musl-cross-git patches do not apply successfully #617

Closed
sellerie98 opened this issue Oct 25, 2019 · 7 comments
Closed

musl-cross-git patches do not apply successfully #617

sellerie98 opened this issue Oct 25, 2019 · 7 comments

Comments

@sellerie98
Copy link

I just tried to build HEADS for the x230 (non-flash), but it fails trying to apply the HEADS patches to the HEAD of musl-cross-git. I tried building it on Fedora 30 on x86_64.

Log:

make[1]: Verzeichnis „/run/media/sellerie/Storage/git/heads/build/coreboot-4.8.1“ wird verlassen
#echo '******* Building crossgcc-arm (this might take a while) ******'
#make -C "/run/media/sellerie/Storage/git/heads/build/coreboot-4.8.1" crossgcc-arm
2019-10-25 22:16:20+02:00 CONFIG coreboot
git clone https://github.com/GregorR/musl-cross "/run/media/sellerie/Storage/git/heads/build/musl-cross-git"
Klone nach '/run/media/sellerie/Storage/git/heads/build/musl-cross-git' ...
remote: Enumerating objects: 73, done.
remote: Counting objects: 100% (73/73), done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 869 (delta 25), reused 68 (delta 23), pack-reused 796
Empfange Objekte: 100% (869/869), 323.01 KiB | 1.10 MiB/s, Fertig.
Löse Unterschiede auf: 100% (524/524), Fertig.
cd /run/media/sellerie/Storage/git/heads/build/musl-cross-git && git submodule update --init --checkout
if [ -r patches/musl-cross.patch ]; then ( cd /run/media/sellerie/Storage/git/heads/build/musl-cross-git ; patch -p1 ) < patches/musl-cross.patch || exit 1 ; fi
patching file config.sh
Hunk #2 FAILED at 22.
1 out of 2 hunks FAILED -- saving rejects to file config.sh.rej
@himu007
Copy link

himu007 commented Oct 25, 2019

Got the same error on Ubuntu 18.04

make[2]: Leaving directory '/home/user/heads/build/coreboot-4.8.1'
#echo '******* Building crossgcc-arm (this might take a while) ******'
#/home/user/heads/build/make-4.2.1/make -C "/home/user/heads/build/coreboot-4.8.1" crossgcc-arm
2019-10-25 22:49:56+01:00 CONFIG coreboot
git clone https://github.com/GregorR/musl-cross "/home/user/heads/build/musl-cross-git"
Cloning into '/home/user/heads/build/musl-cross-git'...
remote: Enumerating objects: 73, done.
remote: Counting objects: 100% (73/73), done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 869 (delta 25), reused 68 (delta 23), pack-reused 796
Receiving objects: 100% (869/869), 323.01 KiB | 1.13 MiB/s, done.
Resolving deltas: 100% (524/524), done.
cd /home/user/heads/build/musl-cross-git && git submodule update --init --checkout
if [ -r patches/musl-cross.patch ]; then ( cd /home/user/heads/build/musl-cross-git ; patch -p1 ) < patches/musl-cross.patch || exit 1 ; fi
patching file config.sh
Hunk #2 FAILED at 22.
1 out of 2 hunks FAILED -- saving rejects to file config.sh.rej
make[1]: *** [Makefile:379: /home/user/heads/build/musl-cross-git/.canary] Error 1
make[1]: Leaving directory '/home/user/heads'
Makefile:584: recipe for target 'all' failed
make: *** [all] Error 2

@osresearch
Copy link
Collaborator

The musl-cross-git dependency should be a specific tag, rather than checking out head. Looks like they've added some new code to config.sh that is breaking the build (and also potentially making things non reproducible).

osresearch added a commit that referenced this issue Oct 29, 2019
osresearch added a commit that referenced this issue Oct 29, 2019
Add `--strip 1` to tar file extraction in the `Makefile`,
which ensures that the directory name in `build/` will
match the one listed in `$($(MODULE)_dir)`.

Signed-off-by: Trammell hudson <[email protected]>
@osresearch
Copy link
Collaborator

Looks like even with our updated patch musl-cross still fails to build due to missing hashes in their tree. I opened an issue GregorR/musl-cross#75

I'm also working on an updated patch that will make it easier to pin to specific git commits.

osresearch added a commit that referenced this issue Oct 29, 2019
tlaurion pushed a commit to tlaurion/heads that referenced this issue Oct 30, 2019
tlaurion pushed a commit to tlaurion/heads that referenced this issue Oct 30, 2019
Add `--strip 1` to tar file extraction in the `Makefile`,
which ensures that the directory name in `build/` will
match the one listed in `$($(MODULE)_dir)`.

Signed-off-by: Trammell hudson <[email protected]>
tlaurion pushed a commit to tlaurion/heads that referenced this issue Oct 30, 2019
tlaurion pushed a commit to tlaurion/heads that referenced this issue Nov 3, 2019
tlaurion pushed a commit to tlaurion/heads that referenced this issue Nov 3, 2019
Add `--strip 1` to tar file extraction in the `Makefile`,
which ensures that the directory name in `build/` will
match the one listed in `$($(MODULE)_dir)`.

Signed-off-by: Trammell hudson <[email protected]>
tlaurion pushed a commit to tlaurion/heads that referenced this issue Nov 3, 2019
tlaurion pushed a commit to tlaurion/heads that referenced this issue Nov 4, 2019
Add `--strip 1` to tar file extraction in the `Makefile`,
which ensures that the directory name in `build/` will
match the one listed in `$($(MODULE)_dir)`.

Signed-off-by: Trammell hudson <[email protected]>
tlaurion pushed a commit to tlaurion/heads that referenced this issue Nov 4, 2019
tlaurion pushed a commit to tlaurion/heads that referenced this issue Nov 21, 2019
tlaurion pushed a commit to tlaurion/heads that referenced this issue Nov 21, 2019
Add `--strip 1` to tar file extraction in the `Makefile`,
which ensures that the directory name in `build/` will
match the one listed in `$($(MODULE)_dir)`.

Signed-off-by: Trammell hudson <[email protected]>
tlaurion pushed a commit to tlaurion/heads that referenced this issue Nov 21, 2019
@tlaurion
Copy link
Collaborator

tlaurion commented Nov 28, 2019

--strip 1
is resulting in microcode updates not being found in path by coreboot:

==> ./build/log/coreboot.log <==
    CC         ramstage/arch/x86/wakeup.o
    CC         ramstage/acpi/sata.o
    CP         ramstage/arch/x86/memlayout.ld
    CP         ramstage/lib/program.ld
    CC         generated/ramstage.o
    CC         cbfs/fallback/ramstage.debug
Microcode error: 3rdparty/blobs/cpu/intel/model_206ax/microcode.bin does not exist
Microcode error: 3rdparty/blobs/cpu/intel/model_306ax/microcode.bin does not exist
make[1]: *** [src/cpu/Makefile.inc:40: x230-libremkey/cpu_microcode_blob.bin] Error 1
make[1]: Leaving directory '/heads/build/coreboot-4.8.1'

Questioning the policy of pushing microcode updates in coreboot since we are not in a rolling release anyway. Removing the dependency fixes the problem. Playing here

tlaurion pushed a commit to tlaurion/heads that referenced this issue Dec 3, 2019
Add `--strip 1` to tar file extraction in the `Makefile`,
which ensures that the directory name in `build/` will
match the one listed in `$($(MODULE)_dir)`.

Signed-off-by: Trammell hudson <[email protected]>
tlaurion pushed a commit to tlaurion/heads that referenced this issue Dec 3, 2019
tlaurion pushed a commit to tlaurion/heads that referenced this issue Dec 3, 2019
tlaurion pushed a commit to tlaurion/heads that referenced this issue Dec 3, 2019
Add `--strip 1` to tar file extraction in the `Makefile`,
which ensures that the directory name in `build/` will
match the one listed in `$($(MODULE)_dir)`.

Signed-off-by: Trammell hudson <[email protected]>
tlaurion pushed a commit to tlaurion/heads that referenced this issue Dec 3, 2019
@tlaurion
Copy link
Collaborator

tlaurion commented Dec 8, 2019

Fixed with 8af849c

@tlaurion tlaurion closed this as completed Dec 8, 2019
@tlaurion tlaurion reopened this Dec 10, 2019
@tlaurion
Copy link
Collaborator

The patches apply successfully.

Resulting binaries crash dump. (Eg. lvm in my tests).

@osresearch proposed to base Heads on https://github.com/richfelker/musl-cross-make/ instead.
@rofl0r ?

@osresearch
Copy link
Collaborator

This seems to be working now in head after the tag pinning merge. The musl-cross-make suggestion is now in #650 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants