mirror of
https://github.com/PartialVolume/shredos.x86_64.git
synced 2026-02-20 17:42:10 +00:00
Upgrade buildroot to 2023.05 (from 2021.08.2), kernel is upgraded to 6.3 (from 5.13.19).
This commit is contained in:
145
Makefile
145
Makefile
@@ -1,8 +1,6 @@
|
||||
# Makefile for buildroot
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
# Copyright (C) 2006-2014 by the Buildroot developers <buildroot@uclibc.org>
|
||||
# Copyright (C) 2014-2020 by the Buildroot developers <buildroot@buildroot.org>
|
||||
# Copyright (C) the Buildroot developers <buildroot@buildroot.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -92,9 +90,9 @@ all:
|
||||
.PHONY: all
|
||||
|
||||
# Set and export the version string
|
||||
export BR2_VERSION := 2021.08.2
|
||||
export BR2_VERSION := 2023.05
|
||||
# Actual time the release is cut (for reproducible builds)
|
||||
BR2_VERSION_EPOCH = 1636546000
|
||||
BR2_VERSION_EPOCH = 1686172000
|
||||
|
||||
# Save running make version since it's clobbered by the make package
|
||||
RUNNING_MAKE_VERSION := $(MAKE_VERSION)
|
||||
@@ -125,7 +123,7 @@ endif
|
||||
noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
|
||||
defconfig %_defconfig allyesconfig allnoconfig alldefconfig syncconfig release \
|
||||
randpackageconfig allyespackageconfig allnopackageconfig \
|
||||
print-version olddefconfig distclean manual manual-% check-package check-flake8
|
||||
print-version olddefconfig distclean manual manual-% check-package
|
||||
|
||||
# Some global targets do not trigger a build, but are used to collect
|
||||
# metadata, or do various checks. When such targets are triggered,
|
||||
@@ -141,7 +139,7 @@ nobuild_targets := source %-source \
|
||||
clean distclean help show-targets graph-depends \
|
||||
%-graph-depends %-show-depends %-show-version \
|
||||
graph-build graph-size list-defconfigs \
|
||||
savedefconfig update-defconfig printvars
|
||||
savedefconfig update-defconfig printvars show-vars
|
||||
ifeq ($(MAKECMDGOALS),)
|
||||
BR_BUILDING = y
|
||||
else ifneq ($(filter-out $(nobuild_targets),$(MAKECMDGOALS)),)
|
||||
@@ -286,12 +284,16 @@ ifndef HOSTCC
|
||||
HOSTCC := gcc
|
||||
HOSTCC := $(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
|
||||
endif
|
||||
ifndef HOSTCC_NOCCACHE
|
||||
HOSTCC_NOCCACHE := $(HOSTCC)
|
||||
endif
|
||||
ifndef HOSTCXX
|
||||
HOSTCXX := g++
|
||||
HOSTCXX := $(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
|
||||
endif
|
||||
ifndef HOSTCXX_NOCCACHE
|
||||
HOSTCXX_NOCCACHE := $(HOSTCXX)
|
||||
endif
|
||||
ifndef HOSTCPP
|
||||
HOSTCPP := cpp
|
||||
endif
|
||||
@@ -392,6 +394,9 @@ unexport DESTDIR
|
||||
# Causes breakage with packages that needs host-ruby
|
||||
unexport RUBYOPT
|
||||
|
||||
# Compilation of perl-related packages will fail otherwise
|
||||
unexport PERL_MM_OPT
|
||||
|
||||
include package/pkg-utils.mk
|
||||
include package/doc-asciidoc.mk
|
||||
|
||||
@@ -422,6 +427,7 @@ unexport O
|
||||
unexport GCC_COLORS
|
||||
unexport PLATFORM
|
||||
unexport OS
|
||||
unexport DEVICE_TREE
|
||||
|
||||
GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
|
||||
|
||||
@@ -433,22 +439,8 @@ QUIET := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),-q)
|
||||
|
||||
# Strip off the annoying quoting
|
||||
ARCH := $(call qstrip,$(BR2_ARCH))
|
||||
|
||||
KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \
|
||||
-e s/i.86/i386/ -e s/sun4u/sparc64/ \
|
||||
-e s/arcle/arc/ \
|
||||
-e s/arceb/arc/ \
|
||||
-e s/arm.*/arm/ -e s/sa110/arm/ \
|
||||
-e s/aarch64.*/arm64/ \
|
||||
-e s/nds32.*/nds32/ \
|
||||
-e s/or1k/openrisc/ \
|
||||
-e s/parisc64/parisc/ \
|
||||
-e s/powerpc64.*/powerpc/ \
|
||||
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
|
||||
-e s/riscv.*/riscv/ \
|
||||
-e s/sh.*/sh/ \
|
||||
-e s/s390x/s390/ \
|
||||
-e s/microblazeel/microblaze/)
|
||||
NORMALIZED_ARCH := $(call qstrip,$(BR2_NORMALIZED_ARCH))
|
||||
KERNEL_ARCH := $(call qstrip,$(BR2_NORMALIZED_ARCH))
|
||||
|
||||
ZCAT := $(call qstrip,$(BR2_ZCAT))
|
||||
BZCAT := $(call qstrip,$(BR2_BZCAT))
|
||||
@@ -487,8 +479,7 @@ BR_CACHE_DIR ?= $(call qstrip,$(BR2_CCACHE_DIR))
|
||||
export BR_CACHE_DIR
|
||||
HOSTCC = $(CCACHE) $(HOSTCC_NOCCACHE)
|
||||
HOSTCXX = $(CCACHE) $(HOSTCXX_NOCCACHE)
|
||||
else
|
||||
export BR_NO_CCACHE
|
||||
export BR2_USE_CCACHE ?= 1
|
||||
endif
|
||||
|
||||
# Scripts in support/ or post-build scripts may need to reference
|
||||
@@ -574,14 +565,12 @@ ifeq ($(BR_FORCE_CHECK_DEPENDENCIES),YES)
|
||||
|
||||
define CHECK_ONE_DEPENDENCY
|
||||
ifeq ($$($(2)_TYPE),target)
|
||||
ifeq ($$($(2)_IS_VIRTUAL),)
|
||||
ifneq ($$($$($(2)_KCONFIG_VAR)),y)
|
||||
$$(error $$($(2)_NAME) is in the dependency chain of $$($(1)_NAME) that \
|
||||
has added it to its _DEPENDENCIES variable without selecting it or \
|
||||
depending on it from Config.in)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
$(foreach pkg,$(call UPPERCASE,$(PACKAGES)),\
|
||||
@@ -595,6 +584,9 @@ $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
|
||||
|
||||
.PHONY: prepare
|
||||
prepare: $(BUILD_DIR)/buildroot-config/auto.conf
|
||||
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_PRE_BUILD_SCRIPT)), \
|
||||
$(call MESSAGE,"Executing pre-build script $(s)"); \
|
||||
$(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
|
||||
|
||||
.PHONY: world
|
||||
world: target-post-image
|
||||
@@ -655,14 +647,6 @@ STRIP_FIND_SPECIAL_LIBS_CMD = \
|
||||
\( -name 'ld-*.so*' -o -name 'libpthread*.so*' \) \
|
||||
-print0
|
||||
|
||||
ifeq ($(BR2_ECLIPSE_REGISTER),y)
|
||||
define TOOLCHAIN_ECLIPSE_REGISTER
|
||||
./support/scripts/eclipse-register-toolchain `readlink -f $(O)` \
|
||||
$(notdir $(TARGET_CROSS)) $(BR2_ARCH)
|
||||
endef
|
||||
TARGET_FINALIZE_HOOKS += TOOLCHAIN_ECLIPSE_REGISTER
|
||||
endif
|
||||
|
||||
# Generate locale data.
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
|
||||
GLIBC_GENERATE_LOCALES = $(call qstrip,$(BR2_GENERATE_LOCALE))
|
||||
@@ -670,7 +654,7 @@ ifneq ($(GLIBC_GENERATE_LOCALES),)
|
||||
PACKAGES += host-localedef
|
||||
|
||||
define GENERATE_GLIBC_LOCALES
|
||||
$(MAKE) -f support/misc/gen-glibc-locales.mk \
|
||||
+$(MAKE) -f support/misc/gen-glibc-locales.mk \
|
||||
ENDIAN=$(call LOWERCASE,$(BR2_ENDIAN)) \
|
||||
LOCALES="$(GLIBC_GENERATE_LOCALES)" \
|
||||
Q=$(Q)
|
||||
@@ -741,7 +725,7 @@ target-finalize: $(PACKAGES) $(TARGET_DIR) host-finalize
|
||||
rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
|
||||
$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
|
||||
$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake \
|
||||
$(TARGET_DIR)/usr/doc
|
||||
$(TARGET_DIR)/usr/lib/rpm $(TARGET_DIR)/usr/doc
|
||||
find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
|
||||
find $(TARGET_DIR)/lib/ $(TARGET_DIR)/usr/lib/ $(TARGET_DIR)/usr/libexec/ \
|
||||
\( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | xargs -0 rm -f
|
||||
@@ -816,6 +800,14 @@ endif # merged /usr
|
||||
|
||||
touch $(TARGET_DIR)/usr
|
||||
|
||||
# Note: this will run in the filesystem context, so will use a copy
|
||||
# of target/, not the real one, so the files are still available on
|
||||
# re-builds (foo-rebuild, etc...)
|
||||
define ROOTFS_RM_HWDB_DATA
|
||||
rm -rf $(TARGET_DIR)/usr/lib/udev/hwdb.d/ $(TARGET_DIR)/etc/udev/hwdb.d/
|
||||
endef
|
||||
ROOTFS_PRE_CMD_HOOKS += ROOTFS_RM_HWDB_DATA
|
||||
|
||||
.PHONY: target-post-image
|
||||
target-post-image: $(TARGETS_ROOTFS) target-finalize staging-finalize
|
||||
@rm -f $(ROOTFS_COMMON_TAR)
|
||||
@@ -879,6 +871,9 @@ graph-build: $(O)/build/build-time.log
|
||||
--type=pie-$(t) --input=$(<) \
|
||||
--output=$(GRAPHS_DIR)/build.pie-$(t).$(BR_GRAPH_OUT) \
|
||||
$(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep))
|
||||
./support/scripts/graph-build-time --type=timeline --input=$(<) \
|
||||
--output=$(GRAPHS_DIR)/build.timeline.$(BR_GRAPH_OUT) \
|
||||
$(if $(BR2_GRAPH_ALT),--alternate-colors)
|
||||
|
||||
.PHONY: graph-depends-requirements
|
||||
graph-depends-requirements:
|
||||
@@ -1016,13 +1011,18 @@ oldconfig syncconfig olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmake
|
||||
defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
|
||||
|
||||
define percent_defconfig
|
||||
# Override the BR2_DEFCONFIG from COMMON_CONFIG_ENV with the new defconfig
|
||||
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(1)/configs/%_defconfig outputmakefile
|
||||
@$$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(1)/configs/$$@ \
|
||||
$$< --defconfig=$(1)/configs/$$@ $$(CONFIG_CONFIG_IN)
|
||||
endef
|
||||
$(eval $(foreach d,$(call reverse,$(TOPDIR) $(BR2_EXTERNAL_DIRS)),$(call percent_defconfig,$(d))$(sep)))
|
||||
%_defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
@defconfig=$(or \
|
||||
$(firstword \
|
||||
$(foreach d, \
|
||||
$(call reverse,$(TOPDIR) $(BR2_EXTERNAL_DIRS)), \
|
||||
$(wildcard $(d)/configs/$@) \
|
||||
) \
|
||||
), \
|
||||
$(error "Can't find $@") \
|
||||
); \
|
||||
$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$${defconfig} \
|
||||
$< --defconfig=$${defconfig} $(CONFIG_CONFIG_IN)
|
||||
|
||||
update-defconfig: savedefconfig
|
||||
|
||||
@@ -1042,7 +1042,7 @@ savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
|
||||
|
||||
# staging and target directories do NOT list these as
|
||||
# dependencies anywhere else
|
||||
$(BUILD_DIR) $(BASE_TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST) $(PER_PACKAGE_DIR):
|
||||
$(BASE_DIR) $(BUILD_DIR) $(BASE_TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST) $(PER_PACKAGE_DIR):
|
||||
@mkdir -p $@
|
||||
|
||||
# outputmakefile generates a Makefile in the output directory, if using a
|
||||
@@ -1058,17 +1058,48 @@ endif
|
||||
# Makefiles. Alternatively, if a non-empty VARS variable is passed,
|
||||
# only the variables matching the make pattern passed in VARS are
|
||||
# displayed.
|
||||
# show-vars does the same, but as a JSON dictionnary.
|
||||
#
|
||||
# Note: we iterate of .VARIABLES and filter each variable individually,
|
||||
# to workaround a bug in make 4.3; see https://savannah.gnu.org/bugs/?59093
|
||||
.PHONY: printvars
|
||||
printvars:
|
||||
ifndef VARS
|
||||
$(error Please pass a non-empty VARS to 'make printvars')
|
||||
endif
|
||||
@:
|
||||
$(foreach V, \
|
||||
$(sort $(filter $(VARS),$(.VARIABLES))), \
|
||||
$(sort $(foreach X, $(.VARIABLES), $(filter $(VARS),$(X)))), \
|
||||
$(if $(filter-out environment% default automatic, \
|
||||
$(origin $V)), \
|
||||
$(if $(QUOTED_VARS),\
|
||||
$(info $V='$(subst ','\'',$(if $(RAW_VARS),$(value $V),$($V)))'), \
|
||||
$(info $V=$(if $(RAW_VARS),$(value $V),$($V))))))
|
||||
# ' Syntax colouring...
|
||||
# ')))) # Syntax colouring...
|
||||
|
||||
# See details above, same as for printvars
|
||||
.PHONY: show-vars
|
||||
show-vars: VARS?=%
|
||||
show-vars:
|
||||
@:
|
||||
$(foreach i, \
|
||||
$(call clean-json, { \
|
||||
$(foreach V, \
|
||||
$(.VARIABLES), \
|
||||
$(and $(filter $(VARS),$(V)) \
|
||||
, \
|
||||
$(filter-out environment% default automatic, $(origin $V)) \
|
||||
, \
|
||||
"$V": { \
|
||||
"expanded": $(call mk-json-str,$($V))$(comma) \
|
||||
"raw": $(call mk-json-str,$(value $V)) \
|
||||
}$(comma) \
|
||||
) \
|
||||
) \
|
||||
} ) \
|
||||
, \
|
||||
$(info $(i)) \
|
||||
)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@@ -1162,6 +1193,8 @@ help:
|
||||
@echo ' pkg-stats - generate info about packages as JSON and HTML'
|
||||
@echo ' missing-cpe - generate XML snippets for missing CPE identifiers'
|
||||
@echo ' printvars - dump internal variables selected with VARS=...'
|
||||
@echo ' show-vars - dump all internal variables as a JSON blurb; use VARS=...'
|
||||
@echo ' to limit the list to variables names matching that pattern'
|
||||
@echo
|
||||
@echo ' make V=0|1 - 0 => quiet build (default), 1 => verbose build'
|
||||
@echo ' make O=dir - Locate all output files in "dir", including .config'
|
||||
@@ -1210,22 +1243,20 @@ release:
|
||||
$(MAKE) O=$(OUT) distclean
|
||||
tar rf $(OUT).tar $(OUT)
|
||||
gzip -9 -c < $(OUT).tar > $(OUT).tar.gz
|
||||
bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2
|
||||
xz -9 -c < $(OUT).tar > $(OUT).tar.xz
|
||||
rm -rf $(OUT) $(OUT).tar
|
||||
|
||||
print-version:
|
||||
@echo $(BR2_VERSION_FULL)
|
||||
|
||||
check-flake8:
|
||||
$(Q)git ls-tree -r --name-only HEAD \
|
||||
| xargs file \
|
||||
| grep 'Python script' \
|
||||
| cut -d':' -f1 \
|
||||
| xargs -- python3 -m flake8 --statistics
|
||||
|
||||
check-package:
|
||||
find $(TOPDIR) -type f \( -name '*.mk' -o -name '*.hash' -o -name 'Config.*' \) \
|
||||
-exec ./utils/check-package {} +
|
||||
$(Q)./utils/check-package `git ls-tree -r --name-only HEAD` \
|
||||
--ignore-list=$(TOPDIR)/.checkpackageignore
|
||||
|
||||
.PHONY: .checkpackageignore
|
||||
.checkpackageignore:
|
||||
$(Q)./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` \
|
||||
> .checkpackageignore
|
||||
|
||||
include docs/manual/manual.mk
|
||||
-include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(sort $(wildcard $(dir)/docs/*/*.mk)))
|
||||
|
||||
Reference in New Issue
Block a user