Upgrade script for uClibc retirement

Run samples through upgrade and fix accumulated breakages:

*-centos6-*: After 2.12.2 retirement, the samples selected most recent
glibc (2.34) which also forced kernels 3.2+. Revert to 2.12.1 and
2.6.32.71, respectively. Interestingly, 2.12.1 was marked as being used
in CentOS6, but the samples selected 2.12.2. Anyway, CentOS6 is EOL now
and glibc 2.12 is going to be marked obsolete, and retired soon.

arc-*: Make TARGET_VENDOR match the sample's name; otherwise `ct-ng
saveconfig` places the config file into a different location.

Fix 'savedefconfig' which was not saving the configuration file version
(CT_VCHECK was set to 'load' after CT_LoadConfig call).

Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
Alexey Neyman 2022-01-06 13:10:07 -08:00
parent cc6b7fad46
commit 196f62e18c
11 changed files with 31 additions and 15 deletions

View File

@ -41,7 +41,7 @@ export CT_VCHECK=
# need to pass it to the upgrade script - which may receive an input that
# was not preprocessed by kconfig, and hence have no string for "up-to-date"
# version.
export CT_CONFIG_VERSION_CURRENT=3
export CT_CONFIG_VERSION_CURRENT=4
# Download agents used by scripts.mk
CT_WGET := @wget@

View File

@ -1,8 +1,8 @@
CT_CONFIG_VERSION="3"
CT_CONFIG_VERSION="4"
CT_ARCH_ARC=y
CT_ARCH_CPU="arc700"
CT_TARGET_CFLAGS="-mno-atomic"
CT_TARGET_VENDOR="snps"
CT_TARGET_VENDOR="arc700"
CT_TARGET_ALIAS="arc-linux"
CT_KERNEL_LINUX=y
CT_LIBC_UCLIBC=y
CT_LIBC_UCLIBC_NG=y

View File

@ -1,6 +1,6 @@
CT_CONFIG_VERSION="3"
CT_CONFIG_VERSION="4"
CT_ARCH_ARC=y
CT_ARCH_CPU="archs"
CT_TARGET_VENDOR="snps"
CT_TARGET_VENDOR="archs"
CT_TARGET_ALIAS="arc-linux"
CT_KERNEL_LINUX=y

View File

@ -1,4 +1,4 @@
CT_CONFIG_VERSION="3"
CT_CONFIG_VERSION="4"
CT_ARCH_ARC=y
CT_MULTILIB=y
CT_TARGET_VENDOR="multilib"

View File

@ -1,4 +1,4 @@
CT_CONFIG_VERSION="3"
CT_CONFIG_VERSION="4"
CT_ARCH_ARC=y
CT_MULTILIB=y
CT_TARGET_CFLAGS="-matomic"

View File

@ -1,8 +1,8 @@
CT_CONFIG_VERSION="3"
CT_CONFIG_VERSION="4"
CT_ARCH_ARC=y
CT_MULTILIB=y
CT_TARGET_CFLAGS="-matomic"
CT_TARGET_VENDOR="multilib"
CT_TARGET_ALIAS="arc-linux"
CT_KERNEL_LINUX=y
CT_LIBC_UCLIBC=y
CT_LIBC_UCLIBC_NG=y

View File

@ -4,7 +4,5 @@ CT_ARCH_X86=y
CT_ARCH_ARCH="i686"
CT_TARGET_VENDOR="centos6"
CT_KERNEL_LINUX=y
CT_LINUX_V_2_6_32=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
CT_GLIBC_V_2_12_2=y
CT_CC_LANG_CXX=y

View File

@ -128,7 +128,7 @@ samples:
# Save a sample
saveconfig: .config samples
$(SILENT)CT_VCHECK=save CONF=$(CONF) $(bash) $(CT_LIB_DIR)/scripts/saveSample.sh
$(SILENT)CONF=$(CONF) $(bash) $(CT_LIB_DIR)/scripts/saveSample.sh
# The 'sample_dir' function prints the directory in which the sample is,
# searching first in local samples, then in global samples

View File

@ -1,4 +1,4 @@
CT_CONFIG_VERSION="3"
CT_CONFIG_VERSION="4"
CT_OBSOLETE=y
CT_ARCH_X86=y
CT_ARCH_64=y
@ -6,5 +6,7 @@ CT_TARGET_VENDOR="centos6"
CT_KERNEL_LINUX=y
CT_LINUX_V_2_6_32=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
CT_GLIBC_V_2_12_2=y
CT_GLIBC_V_2_12_1=y
CT_GLIBC_EXTRA_CFLAGS=""
# CT_GLIBC_ENABLE_COMMON_FLAG is not set
CT_CC_LANG_CXX=y

View File

@ -11,6 +11,10 @@
CT_LoadConfig
# Override CT_VCHECK: we're going to be saving it so need to force saving of
# the config version.
export CT_VCHECK=save
# We can not reliably save a sample which either uses local patches
# and/or custom Linux kernel headers. Warn the user about this issue
# and continue if he/she confirms sving the sample.

12
scripts/upgrade/v3 Normal file
View File

@ -0,0 +1,12 @@
# vim: set filetype=sh :
# Upgrade v3 -> v4:
# - uClibc retired, leaving only uClibc-ng
upgrade()
{
case "${opt}" in
CT_LIBC_UCLIBC)
replace CT_LIBC_UCLIBC_NG
;;
esac
}