mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 21:17:55 +00:00
musl-libc patches to build a successfull qemu image
This commit is contained in:
parent
3e5be157e9
commit
84064debbe
12
Makefile
12
Makefile
@ -115,7 +115,7 @@ endef
|
||||
|
||||
$(foreach _, $(modules), $(eval $(call define_module,$_)))
|
||||
|
||||
initrd_lib_dir := initrd/lib/x86_64-linux-gnu
|
||||
initrd_lib_dir := initrd/lib
|
||||
initrd_bin_dir := initrd/bin
|
||||
|
||||
#
|
||||
@ -194,11 +194,11 @@ initrd_lib_install: $(initrd_bins) $(initrd_libs)
|
||||
| xargs -0 strip
|
||||
LD_LIBRARY_PATH="$(INSTALL)/lib" \
|
||||
./populate-lib \
|
||||
./initrd/lib/x86_64-linux-gnu/ \
|
||||
$(initrd_lib_dir) \
|
||||
initrd/bin/* \
|
||||
initrd/sbin/* \
|
||||
|
||||
-strip ./initrd/lib/x86_64-linux-gnu/*
|
||||
-strip $(initrd_lib_dir)/* ; true
|
||||
|
||||
|
||||
#
|
||||
@ -259,3 +259,9 @@ x230.rom: $(build)/$(coreboot_dir)/x230/coreboot.rom
|
||||
|
||||
qemu.rom: $(build)/$(coreboot_dir)/qemu/coreboot.rom
|
||||
cp -a "$<" "$@"
|
||||
|
||||
clean-modules:
|
||||
for dir in busybox-1.25.0 cryptsetup-1.7.3 gnupg-1.4.21 kexec-tools-2.0.12 libuuid-1.0.3 LVM2.2.02.168 mbedtls-2.3.0 popt-1.16 qrencode-3.4.4 tpmtotp-git ; do \
|
||||
make -C build/$$dir clean; \
|
||||
rm build/$$dir/.configured; \
|
||||
done
|
||||
|
1
initrd/lib/ld-musl-x86_64.so.1
Symbolic link
1
initrd/lib/ld-musl-x86_64.so.1
Symbolic link
@ -0,0 +1 @@
|
||||
./libc.so
|
@ -1 +0,0 @@
|
||||
../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
|
10
modules/musl
10
modules/musl
@ -8,9 +8,17 @@ musl_hash := 97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa
|
||||
|
||||
musl_output := $(INSTALL)/bin/musl-gcc
|
||||
|
||||
#
|
||||
# Note that for syslibdir to be /lib the install will likely fail.
|
||||
# this is unfortunate, but can be worked around by making sure that
|
||||
# a /lib/ld-musl-x86_64.so.1 symlink exists and points to libc.so
|
||||
# for your musl build.
|
||||
#
|
||||
# Otherwise we'll have to make a whole cross compiler setup.
|
||||
#
|
||||
musl_configure := ./configure \
|
||||
--prefix="$(INSTALL)" \
|
||||
--syslibdir="$(INSTALL)/lib" \
|
||||
--syslibdir="/lib" \
|
||||
|
||||
musl_target := -j 8 install
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user