Skip to content

Commit cd683b1

Browse files
authored
Merge pull request #1841 from tlaurion/musl-cross-make_bump_rename
musl-cross-make: bump musl (1.2.0 -> 1.2.5) + rename module to reflect reality, bump newt ( whiptail:0.52.20 -> 0.52.24) to fix crash with newer musl
2 parents 9d656fc + a8ba6ba commit cd683b1

File tree

9 files changed

+71
-55
lines changed

9 files changed

+71
-55
lines changed

.circleci/config.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ jobs:
6565
- run:
6666
name: Creating coreboot (and associated patches) and musl-cross-make modules digest (musl-cross-make and coreboot cache digest)
6767
command: |
68-
find .circleci/config.yml ./Makefile ./flake.lock ./modules/coreboot ./modules/musl-cross* ./patches/coreboot* -type f | sort -h | xargs sha256sum > ./tmpDir/coreboot_musl-cross.sha256sums
68+
find .circleci/config.yml ./Makefile ./flake.lock ./modules/coreboot ./modules/musl-cross-make* ./patches/coreboot* -type f | sort -h | xargs sha256sum > ./tmpDir/coreboot_musl-cross-make.sha256sums
6969
- run:
7070
name: Creating musl-cross-make and musl-cross-make patches digest (musl-cross-make cache digest)
7171
command: |
72-
find .circleci/config.yml ./Makefile ./flake.lock modules/musl-cross* -type f | sort -h | xargs sha256sum > ./tmpDir/musl-cross.sha256sums
72+
find .circleci/config.yml ./Makefile ./flake.lock modules/musl-cross-make* -type f | sort -h | xargs sha256sum > ./tmpDir/musl-cross-make.sha256sums
7373
- restore_cache:
7474
# First matched/found key wins and following keys are not tried
7575
keys:
@@ -79,10 +79,10 @@ jobs:
7979
- nix-docker-heads-modules-and-patches-{{ checksum "./tmpDir/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
8080

8181
# Cache for coreboot module (and patches) and musl-cross-make digests (coreboot: triannual release)
82-
- nix-docker-heads-coreboot-musl-cross-{{ checksum "./tmpDir/coreboot_musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }}
82+
- nix-docker-heads-coreboot-musl-cross-make-{{ checksum "./tmpDir/coreboot_musl-cross-make.sha256sums" }}{{ .Environment.CACHE_VERSION }}
8383

8484
# Cache for musl-cross-make module digest (rarely modified).
85-
- nix-docker-heads-musl-cross-{{ checksum "./tmpDir/musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }}
85+
- nix-docker-heads-musl-cross-make-{{ checksum "./tmpDir/musl-cross-make.sha256sums" }}{{ .Environment.CACHE_VERSION }}
8686
- run:
8787
name: Download and neuter xx20 ME (keep generated GBE and extracted IFD in tree)
8888
command: |
@@ -171,26 +171,26 @@ jobs:
171171
- attach_workspace:
172172
at: ~/heads
173173
- save_cache:
174-
# Generate cache for the same musl-cross module definition if hash is not previously existing
174+
# Generate cache for the same musl-cross-make module definition if hash is not previously existing
175175
# CircleCI removed their wildcard support, so we have to list precise versions to cache in directory names
176-
key: nix-docker-heads-musl-cross-{{ checksum "./tmpDir/musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }}
176+
key: nix-docker-heads-musl-cross-make-{{ checksum "./tmpDir/musl-cross-make.sha256sums" }}{{ .Environment.CACHE_VERSION }}
177177
paths:
178-
- build/ppc64/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1
179-
- build/x86/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1
178+
- build/ppc64/musl-cross-make-38e52db8358c043ae82b346a2e6e66bc86a53bc1
179+
- build/x86/musl-cross-make-38e52db8358c043ae82b346a2e6e66bc86a53bc1
180180
- crossgcc
181181
- packages
182182
- save_cache:
183183
# Generate cache for the same coreboot and musl-cross-make modules definition if hash is not previously existing
184184
# CircleCI removed their wildcard support, so we have to list precise versions to cache in directory names
185-
key: nix-docker-heads-coreboot-musl-cross-{{ checksum "./tmpDir/coreboot_musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }}
185+
key: nix-docker-heads-coreboot-musl-cross-make-{{ checksum "./tmpDir/coreboot_musl-cross-make.sha256sums" }}{{ .Environment.CACHE_VERSION }}
186186
paths:
187187
- build/ppc64/coreboot-talos_2
188-
- build/ppc64/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1
188+
- build/ppc64/musl-cross-make-38e52db8358c043ae82b346a2e6e66bc86a53bc1
189189
- build/x86/coreboot-4.11
190190
- build/x86/coreboot-24.02.01
191191
- build/x86/coreboot-dasharo
192192
- build/x86/coreboot-purism
193-
- build/x86/musl-cross-38e52db8358c043ae82b346a2e6e66bc86a53bc1
193+
- build/x86/musl-cross-make-38e52db8358c043ae82b346a2e6e66bc86a53bc1
194194
- crossgcc
195195
- packages
196196
- save_cache:
@@ -208,20 +208,20 @@ workflows:
208208
jobs:
209209
- prep_env
210210

211-
# This step builds musl-cross for x86 architecture, which will be used by subsequent x86 board builds
211+
# This step builds musl-cross-make for x86 architecture, which will be used by subsequent x86 board builds
212212
- build_and_persist:
213-
name: x86-musl-cross
213+
name: x86-musl-cross-make
214214
target: x230-hotp-maximized
215-
subcommand: "musl-cross"
215+
subcommand: "musl-cross-make"
216216
requires:
217217
- prep_env
218218

219-
# This step builds musl-cross for ppc64 architecture, which will be used by subsequent ppc64 board builds
219+
# This step builds musl-cross-make for ppc64 architecture, which will be used by subsequent ppc64 board builds
220220
- build_and_persist:
221-
name: ppc64-musl-cross
221+
name: ppc64-musl-cross-make
222222
arch: ppc64
223-
target: talos-2
224-
subcommand: "musl-cross"
223+
target: UNTESTED_talos-2
224+
subcommand: "musl-cross-make"
225225
requires:
226226
- prep_env
227227

@@ -234,7 +234,7 @@ workflows:
234234
target: x230-hotp-maximized
235235
subcommand: ""
236236
requires:
237-
- x86-musl-cross
237+
- x86-musl-cross-make
238238

239239
# coreboot purism
240240
- build_and_persist:
@@ -254,30 +254,30 @@ workflows:
254254
target: nitropad-nv41
255255
subcommand: ""
256256
requires:
257-
- x86-musl-cross
257+
- x86-musl-cross-make
258258

259259
# coreboot talos_2
260260
- build_and_persist:
261-
name: talos-2
261+
name: UNTESTED_talos-2
262262
arch: ppc64
263-
target: talos-2
263+
target: UNTESTED_talos-2
264264
subcommand: ""
265265
requires:
266-
- ppc64-musl-cross
266+
- ppc64-musl-cross-make
267267

268268
# coreboot 4.11
269269
- build_and_persist:
270270
name: librem_l1um
271271
target: librem_l1um
272272
subcommand: ""
273273
requires:
274-
- x86-musl-cross
274+
- x86-musl-cross-make
275275

276276
# Cache one workspace per architecture
277277
# Make sure workspace caches are chainloaded and the last in chain for an arch is saved
278278
- save_cache:
279279
requires:
280-
- talos-2
280+
- UNTESTED_talos-2
281281
- librem_14
282282

283283
# Those onboarding new boards should add their entries below.

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ $(shell mkdir -p "$(initrd_lib_dir)" "$(initrd_bin_dir)" "$(initrd_data_dir)")
189189
SHELL := /usr/bin/env bash
190190
.SHELLFLAGS := -o pipefail -c
191191

192-
# Include the musl-cross module early so that $(CROSS) will
192+
# Include the musl-cross-make module early so that $(CROSS) will
193193
# be defined prior to any other module.
194-
include modules/musl-cross
194+
include modules/musl-cross-make
195195

196-
musl_dep := musl-cross
196+
musl_dep := musl-cross-make
197197
target := $(shell echo $(CROSS) | grep -Eoe '([^/]*?)-linux-musl')
198198
arch := $(subst -linux-musl, , $(target))
199199
heads_cc := $(CROSS)gcc \
@@ -231,9 +231,9 @@ ifeq ($(CONFIG_COREBOOT), y)
231231
# Legacy flash boards don't generate an update package, the only purpose of
232232
# those boards is to be flashed over vendor firmware via an exploit.
233233
ifneq ($(CONFIG_LEGACY_FLASH), y)
234-
# talos-2 builds its own update package, which is not integrated with the ZIP
235-
# method currently
236-
ifneq ($(BOARD), talos-2)
234+
# Boards containing 'talos-2' build their own update package, which is not integrated with the ZIP method currently
235+
ifneq ($(findstring talos-2, $(BOARD)),)
236+
else
237237
# Coreboot targets create an update package that can be applied with integrity
238238
# verification before flashing (see flash-gui.sh). The ZIP package format
239239
# allows other metadata that might be needed to added in the future without
@@ -568,8 +568,8 @@ endef
568568

569569
$(call map, define_module, $(modules-y))
570570

571-
# hack to force musl-cross to be built before musl
572-
#$(build)/$(musl_dir)/.configured: $(build)/$(musl-cross_dir)/../../crossgcc/x86_64-linux-musl/bin/x86_64-musl-linux-gcc
571+
# hack to force musl-cross-make to be built before musl
572+
#$(build)/$(musl_dir)/.configured: $(build)/$(musl-cross-make_dir)/../../crossgcc/x86_64-linux-musl/bin/x86_64-musl-linux-gcc
573573

574574
#
575575
# Install a file into the initrd, if it changed from
@@ -606,7 +606,7 @@ endef
606606

607607
# Only some modules have binaries that we install
608608
# Shouldn't this be specified in the module file?
609-
#bin_modules-$(CONFIG_MUSL) += musl-cross
609+
#bin_modules-$(CONFIG_MUSL) += musl-cross-make
610610
bin_modules-$(CONFIG_KEXEC) += kexec
611611
bin_modules-$(CONFIG_TPMTOTP) += tpmtotp
612612
bin_modules-$(CONFIG_PCIUTILS) += pciutils
@@ -666,7 +666,7 @@ endif
666666
$(COREBOOT_UTIL_DIR)/cbmem/cbmem \
667667
$(COREBOOT_UTIL_DIR)/superiotool/superiotool \
668668
$(COREBOOT_UTIL_DIR)/inteltool/inteltool \
669-
: $(build)/$(coreboot_base_dir)/.canary musl-cross
669+
: $(build)/$(coreboot_base_dir)/.canary musl-cross-make
670670
+$(call do,MAKE,$(notdir $@),\
671671
$(MAKE) -C "$(dir $@)" $(CROSS_TOOLS) \
672672
)
@@ -785,7 +785,7 @@ $(build)/$(initrd_dir)/tools.cpio: $(foreach d,$(bin_modules-y),$(build)/$($d_di
785785

786786

787787
# List of all modules, excluding the slow to-build modules
788-
modules-slow := musl musl-cross kernel_headers
788+
modules-slow := musl musl-cross-make kernel_headers
789789
module_dirs := $(foreach m,$(filter-out $(modules-slow),$(modules-y)),$($m_dir))
790790

791791
echo_modules:
File renamed without changes.

config/linux-talos-2.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ CONFIG_CC_HAS_INT128=y
128128
# CONFIG_SYSFS_DEPRECATED is not set
129129
CONFIG_RELAY=y
130130
CONFIG_BLK_DEV_INITRD=y
131-
CONFIG_INITRAMFS_SOURCE="../../talos-2/initrd.cpio"
131+
CONFIG_INITRAMFS_SOURCE="../@BOARD_BUILD_DIR@/initrd.cpio"
132132
CONFIG_INITRAMFS_ROOT_UID=0
133133
CONFIG_INITRAMFS_ROOT_GID=0
134134
# CONFIG_RD_GZIP is not set

modules/linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ linux_target := \
159159
$(MAKE_JOBS) \
160160

161161
# We cross compile linux now
162-
linux_depends := musl-cross
162+
linux_depends := musl-cross-make
163163

164164
#
165165
# Linux kernel module installation

modules/musl-cross renamed to modules/musl-cross-make

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ CONFIG_MUSL ?= y
22

33
ifeq "$(MUSL_CROSS_ONCE)" ""
44
MUSL_CROSS_ONCE := 1
5-
modules-$(CONFIG_MUSL) += musl-cross
5+
modules-$(CONFIG_MUSL) += musl-cross-make
66

7-
musl-cross_version := 38e52db8358c043ae82b346a2e6e66bc86a53bc1
8-
musl-cross_dir := musl-cross-$(musl-cross_version)
9-
musl-cross_url := https://github.com/richfelker/musl-cross-make/archive/$(musl-cross_version).tar.gz
10-
musl-cross_tar := musl-cross-$(musl-cross_version).tar.gz
11-
musl-cross_hash := b4b85d6d3ddab0f2b8650a53e775673f8c346fa2fb07d652a9880bd206ade100
7+
musl-cross-make_version := fd6be58297ee21fcba89216ccd0d4aca1e3f1c5c
8+
musl-cross-make_dir := musl-cross-make-$(musl-cross-make_version)
9+
musl-cross-make_url := https://github.com/richfelker/musl-cross-make/archive/$(musl-cross-make_version).tar.gz
10+
musl-cross-make_tar := musl-cross-make-$(musl-cross-make_version).tar.gz
11+
musl-cross-make_hash := 15b8e0a287d738a46e069e90d67a8d96213b357b79aaf3e8cf0cd40e4b230d9e
1212

1313

1414
ifneq "$(CROSS)" ""
@@ -20,42 +20,42 @@ else
2020
$(info Using $(CROSS)gcc)
2121
endif
2222

23-
# The cross compiler has already been built, so the musl-cross target
23+
# The cross compiler has already been built, so the musl-cross-make target
2424
# is a NOP. We really don't need to check out this code tree, but it is easier
2525
# if we have a target for it.
26-
musl-cross_target := --version
26+
musl-cross-make_target := --version
2727

2828
# Ask the compiler where to find its own libc.so
29-
musl-cross_libraries := \
29+
musl-cross-make_libraries := \
3030
$(shell $(CROSS)gcc --print-file-name=libc.so) \
3131

3232
else
3333

3434
# Force a full build of the cross compiler for target platform
3535
# No need to build i386 for x86 since coreboot uses its own compiler
36-
musl-cross_configure := \
36+
musl-cross-make_configure := \
3737
echo -e >> Makefile 'musl-target:' ; \
3838
echo -e >> Makefile '\t$$$$(MAKE) TARGET="$(MUSL_ARCH)-linux-musl" install' ;
3939

4040
CROSS_PATH ?= $(pwd)/crossgcc/$(CONFIG_TARGET_ARCH)
4141

42-
musl-cross_target := \
42+
musl-cross-make_target := \
4343
OUTPUT="$(CROSS_PATH)" \
4444
MAKE="$(MAKE)" \
4545
$(MAKE_JOBS) \
4646
"musl-target"
4747

4848
CROSS := $(CROSS_PATH)/bin/$(subst -,_,$(MUSL_ARCH))-linux-musl-
49-
musl-cross_libraries := $(CROSS_PATH)/$(subst -,_,$(MUSL_ARCH))-linux-musl/lib/libc.so
49+
musl-cross-make_libraries := $(CROSS_PATH)/$(subst -,_,$(MUSL_ARCH))-linux-musl/lib/libc.so
5050

5151
endif
5252

5353

54-
musl-cross_output := $(CROSS)gcc
54+
musl-cross-make_output := $(CROSS)gcc
5555

5656
## Fake a target so that musl will force a header install by the
5757
## Linux kernel sources.
58-
$(build)/$(musl-cross_dir)/.build: $(INSTALL)/include/linux/limits.h
58+
$(build)/$(musl-cross-make_dir)/.build: $(INSTALL)/include/linux/limits.h
5959

6060

6161
endif

modules/newt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ modules-$(CONFIG_NEWT) += newt
22

33
newt_depends := popt slang $(musl_dep)
44

5-
newt_version := 0.52.20
5+
newt_version := 0.52.24
66
newt_dir := newt-$(newt_version)
77
newt_tar := newt-$(newt_version).tar.gz
88
newt_url := https://releases.pagure.org/newt/$(newt_tar)
9-
newt_hash := 8d66ba6beffc3f786d4ccfee9d2b43d93484680ef8db9397a4fb70b5adbb6dbc
9+
newt_hash := 5ded7e221f85f642521c49b1826c8de19845aa372baf5d630a51774b544fbdbb
1010

1111
newt_target := \
1212
#We remove Makefile passed number of jobs to only pass one job, otherwise fails to build
1313
#$(MAKE_JOBS) \
14-
-j1 \
1514
$(CROSS_TOOLS) \
1615

1716
newt_output := \
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/payloads/external/skiboot/patches/0002-ugly_fix_for_newer_gcc_from_musl_125.patch b/payloads/external/skiboot/patches/0002-ugly_fix_for_newer_gcc_from_musl_125.patch
2+
new file mode 100644
3+
index 0000000..5db9bca
4+
--- /dev/null
5+
+++ b/payloads/external/skiboot/patches/0002-ugly_fix_for_newer_gcc_from_musl_125.patch
6+
@@ -0,0 +1,11 @@
7+
+--- Makefile.main.orig 2024-11-06 16:19:12.161240140 -0500
8+
++++ Makefile.main 2024-11-06 16:23:01.119252412 -0500
9+
+@@ -74,7 +74,7 @@
10+
+ CPPFLAGS += -DDEBUG -DCCAN_LIST_DEBUG
11+
+ endif
12+
+
13+
+-CFLAGS := -fno-strict-aliasing -pie -fpie -fno-pic -mbig-endian -m64 -fno-asynchronous-unwind-tables
14+
++CFLAGS := -Wno-error=address-of-packed-member -Wno-error=format-overflow -fno-strict-aliasing -pie -fpie -fno-pic -mbig-endian -m64 -fno-asynchronous-unwind-tables
15+
+ CFLAGS += -mcpu=power7
16+
+ CFLAGS += -Wl,--oformat,elf64-powerpc -ggdb
17+
+ CFLAGS += $(call try-cflag,$(CC),-ffixed-r13)
File renamed without changes.

0 commit comments

Comments
 (0)