modules/linux: fix linux.*config targets for non-x86 architectures

This patch adds ARCH="$(LINUX_ARCH)" to Linux targets working on config
files. Without it, the architecture defaults to that of host, which for
cross-compilation isn't right.

Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
This commit is contained in:
Krystian Hebel 2023-03-24 15:19:28 +01:00
parent 2995376cda
commit e7997abdcc
No known key found for this signature in database
GPG Key ID: 6CD35B07297B3CF9

View File

@ -215,10 +215,12 @@ linux.modifydefconfig:
$(MAKE) \ $(MAKE) \
-C "$(build)/$(linux_base_dir)" \ -C "$(build)/$(linux_base_dir)" \
O="$(build)/$(linux_dir)" \ O="$(build)/$(linux_dir)" \
ARCH="$(LINUX_ARCH)" \
menuconfig && \ menuconfig && \
$(MAKE) \ $(MAKE) \
-C "$(build)/$(linux_base_dir)" \ -C "$(build)/$(linux_base_dir)" \
O="$(build)/$(linux_dir)" \ O="$(build)/$(linux_dir)" \
ARCH="$(LINUX_ARCH)" \
savedefconfig && \ savedefconfig && \
mv "$(build)/$(linux_dir)/defconfig" "$(pwd)/$(linux_kconfig)" mv "$(build)/$(linux_dir)/defconfig" "$(pwd)/$(linux_kconfig)"
@ -231,6 +233,7 @@ linux.generateoldconfig:
&& cp "$(pwd)/$(linux_kconfig)" "$(build)/$(linux_dir)/.config" \ && cp "$(pwd)/$(linux_kconfig)" "$(build)/$(linux_dir)/.config" \
&& $(MAKE) -C "$(build)/$(linux_base_dir)" \ && $(MAKE) -C "$(build)/$(linux_base_dir)" \
O="$(build)/$(linux_dir)" \ O="$(build)/$(linux_dir)" \
ARCH="$(LINUX_ARCH)" \
olddefconfig \ olddefconfig \
&& echo "" \ && echo "" \
&& echo "You can now edit $(build)/$(linux_dir)/.config" \ && echo "You can now edit $(build)/$(linux_dir)/.config" \
@ -247,6 +250,7 @@ linux.menuconfig:
$(MAKE) \ $(MAKE) \
-C "$(build)/$(linux_base_dir)" \ -C "$(build)/$(linux_base_dir)" \
O="$(build)/$(linux_dir)" \ O="$(build)/$(linux_dir)" \
ARCH="$(LINUX_ARCH)" \
menuconfig \ menuconfig \
# The config file in the repo is stored as a "defconfig" format # The config file in the repo is stored as a "defconfig" format
@ -255,5 +259,6 @@ linux.saveconfig:
$(MAKE) \ $(MAKE) \
-C "$(build)/$(linux_base_dir)" \ -C "$(build)/$(linux_base_dir)" \
O="$(build)/$(linux_dir)" \ O="$(build)/$(linux_dir)" \
ARCH="$(LINUX_ARCH)" \
savedefconfig savedefconfig
mv "$(build)/$(linux_dir)/defconfig" "$(pwd)/$(linux_kconfig)" mv "$(build)/$(linux_dir)/defconfig" "$(pwd)/$(linux_kconfig)"