buildroot long term support release 2024.02.3
buildroot-2024.02.3.tar.gz Signed-off-by: carbon <carbon@milkv.io>
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
BR2_aarch64=y
|
||||
BR2_cortex_a72=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_aarch64=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
|
||||
@ -0,0 +1,5 @@
|
||||
BR2_arcle=y
|
||||
BR2_archs38=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_HS38_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_arm=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,6 @@
|
||||
BR2_arm=y
|
||||
BR2_cortex_a9=y
|
||||
BR2_ARM_ENABLE_VFP=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_BLEEDING_EDGE=y
|
||||
@ -0,0 +1,6 @@
|
||||
BR2_arm=y
|
||||
BR2_cortex_a9=y
|
||||
BR2_ARM_ENABLE_VFP=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_STABLE=y
|
||||
@ -0,0 +1,5 @@
|
||||
BR2_arm=y
|
||||
BR2_cortex_m4=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7M_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_m68k=y
|
||||
BR2_m68k_cf5208=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_COLDFIRE_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_m68k=y
|
||||
BR2_m68k_68040=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_68XXX_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,3 @@
|
||||
BR2_microblazeel=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_mipsel=y
|
||||
# BR2_MIPS_SOFT_FLOAT is not set
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,6 @@
|
||||
BR2_mipsel=y
|
||||
BR2_mips_32r6=y
|
||||
# BR2_MIPS_SOFT_FLOAT is not set
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_GLIBC_STABLE=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_nios2=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_NIOS2_GLIBC_STABLE=y
|
||||
@ -0,0 +1,3 @@
|
||||
BR2_or1k=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_OPENRISC_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_powerpc=y
|
||||
BR2_powerpc_e500mc=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_powerpc64le=y
|
||||
BR2_powerpc_power8=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64LE_POWER8_GLIBC_STABLE=y
|
||||
@ -0,0 +1,5 @@
|
||||
BR2_riscv=y
|
||||
BR2_RISCV_32=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV32_ILP32D_GLIBC_BLEEDING_EDGE=y
|
||||
@ -0,0 +1,5 @@
|
||||
BR2_riscv=y
|
||||
BR2_RISCV_ABI_LP64D=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_LP64D_GLIBC_BLEEDING_EDGE=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_riscv=y
|
||||
BR2_RISCV_ABI_LP64D=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_LP64D_MUSL_STABLE=y
|
||||
@ -0,0 +1,5 @@
|
||||
BR2_s390x=y
|
||||
BR2_s390x_z13=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_S390X_Z13_GLIBC_BLEEDING_EDGE=y
|
||||
@ -0,0 +1,3 @@
|
||||
BR2_sh=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,3 @@
|
||||
BR2_sparc=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARCV8_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,3 @@
|
||||
BR2_sparc64=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARC64_GLIBC_STABLE=y
|
||||
@ -0,0 +1,5 @@
|
||||
BR2_x86_64=y
|
||||
BR2_x86_corei7=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_GLIBC_BLEEDING_EDGE=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_x86_64=y
|
||||
BR2_x86_corei7=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_MUSL_STABLE=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_x86_64=y
|
||||
BR2_x86_corei7=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,5 @@
|
||||
BR2_i386=y
|
||||
BR2_x86_i686=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_STABLE=y
|
||||
@ -0,0 +1,5 @@
|
||||
BR2_xtensa=y
|
||||
BR2_XTENSA_CUSTOM=y
|
||||
BR2_XTENSA_LITTLE_ENDIAN=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_XTENSA_LX60_UCLIBC_STABLE=y
|
||||
@ -0,0 +1,3 @@
|
||||
BR2_arcle=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_arcle=y
|
||||
BR2_archs38=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
@ -0,0 +1,8 @@
|
||||
BR2_arm=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-basic-2020.11.2.tar.bz2"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y
|
||||
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
|
||||
@ -0,0 +1,11 @@
|
||||
BR2_arm=y
|
||||
BR2_arm1176jzf_s=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm11-full-nothread-2020.11.2.tar.bz2"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
|
||||
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS is not set
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
@ -0,0 +1,11 @@
|
||||
BR2_arm=y
|
||||
BR2_STATIC_LIBS=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-static-2020.11.2.tar.bz2"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
|
||||
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
@ -0,0 +1,5 @@
|
||||
BR2_arm=y
|
||||
BR2_ARM_EABI=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
@ -0,0 +1,6 @@
|
||||
BR2_arm=y
|
||||
BR2_cortex_a8=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
|
||||
BR2_BINUTILS_VERSION_2_39_X=y
|
||||
BR2_GCC_VERSION_12_X=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_arm=y
|
||||
BR2_cortex_a8=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_MUSL=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
@ -0,0 +1,10 @@
|
||||
BR2_x86_pentium4=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-i386-pentium4-full-2020.11.2.tar.bz2"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
|
||||
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
@ -0,0 +1 @@
|
||||
BR2_microblazeel=y
|
||||
@ -0,0 +1,10 @@
|
||||
BR2_mips64el=y
|
||||
BR2_MIPS_NABI64=y
|
||||
# BR2_MIPS_SOFT_FLOAT is not set
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-mips64-n64-full-2020.11.2.tar.bz2"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_8=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
@ -0,0 +1,12 @@
|
||||
BR2_mips64el=y
|
||||
BR2_mips_64r6=y
|
||||
BR2_MIPS_NABI64=y
|
||||
# BR2_MIPS_SOFT_FLOAT is not set
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-mips64r6-n64-el-hf-2020.11.2.tar.bz2"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
@ -0,0 +1,10 @@
|
||||
BR2_powerpc=y
|
||||
BR2_powerpc_603e=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-powerpc-603e-basic-cpp-2020.11.2.tar.bz2"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y
|
||||
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_powerpc=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
@ -0,0 +1,9 @@
|
||||
BR2_powerpc64=y
|
||||
BR2_powerpc_power7=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.net/toolchains/tarballs/br-powerpc64-power7-glibc-2020.11.2.tar.bz2"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_riscv=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_s390x=y
|
||||
BR2_s390x_z13=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
@ -0,0 +1,3 @@
|
||||
BR2_xtensa=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
@ -0,0 +1,3 @@
|
||||
BR2_aarch64_be=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE=y
|
||||
@ -0,0 +1,3 @@
|
||||
BR2_aarch64=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64=y
|
||||
@ -0,0 +1,5 @@
|
||||
BR2_arm=y
|
||||
BR2_cortex_a8=y
|
||||
BR2_ARM_EABIHF=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM=y
|
||||
@ -0,0 +1,4 @@
|
||||
BR2_mips=y
|
||||
BR2_mips_32r2=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS=y
|
||||
@ -0,0 +1,5 @@
|
||||
BR2_mips64el=y
|
||||
BR2_mips_64r2=y
|
||||
BR2_MIPS_NABI64=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS=y
|
||||
@ -0,0 +1,3 @@
|
||||
BR2_nios2=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII=y
|
||||
@ -0,0 +1,68 @@
|
||||
# This file is sorted by "importance" of toolchains, so that by
|
||||
# default test-pkg tests a useful subset of toolchains
|
||||
|
||||
# Toolchains used by default by test-pkg:
|
||||
|
||||
# Test a regular uClibc toolchain
|
||||
support/config-fragments/autobuild/bootlin-armv5-uclibc.config,x86_64
|
||||
|
||||
# Test a toolchain with glibc and a very recent gcc version
|
||||
support/config-fragments/autobuild/bootlin-armv7-glibc.config,x86_64
|
||||
|
||||
# Test a noMMU toolchain with no dynamic library support
|
||||
support/config-fragments/autobuild/bootlin-armv7m-uclibc.config,x86_64
|
||||
|
||||
# Test a musl toolchain
|
||||
support/config-fragments/autobuild/bootlin-x86-64-musl.config,x86_64
|
||||
|
||||
# Test a MMU toolchain without dynamic library support
|
||||
support/config-fragments/autobuild/br-arm-full-static.config,x86_64
|
||||
|
||||
# Toolchains used by test-pkg only when the '-a' option is passed:
|
||||
support/config-fragments/autobuild/arm-aarch64.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-aarch64-glibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-arcle-hs38-uclibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-armv7-musl.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-m68k-68040-uclibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-m68k-5208-uclibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-microblazeel-uclibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-mipsel-uclibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-mipsel32r6-glibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-nios2-glibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-openrisc-uclibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-powerpc64le-power8-glibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-powerpc-e500mc-uclibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-riscv32-glibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-riscv64-glibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-riscv64-musl.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-s390x-z13-glibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-sh4-uclibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-sparc-uclibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-sparc64-glibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-x86-i686-musl.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-x86-64-glibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-x86-64-uclibc.config,x86_64
|
||||
support/config-fragments/autobuild/bootlin-xtensa-uclibc.config,x86_64
|
||||
support/config-fragments/autobuild/br-arc-full-internal.config,any
|
||||
support/config-fragments/autobuild/br-arc-internal-glibc.config,any
|
||||
support/config-fragments/autobuild/br-arm-basic.config,x86_64
|
||||
support/config-fragments/autobuild/br-arm-full-nothread.config,x86_64
|
||||
support/config-fragments/autobuild/br-arm-internal-full.config,any
|
||||
support/config-fragments/autobuild/br-arm-internal-glibc.config,any
|
||||
support/config-fragments/autobuild/br-arm-internal-musl.config,any
|
||||
support/config-fragments/autobuild/br-i386-pentium4-full.config,x86_64
|
||||
support/config-fragments/autobuild/br-microblazeel-full-internal.config,any
|
||||
support/config-fragments/autobuild/br-mips64-n64-full.config,x86_64
|
||||
support/config-fragments/autobuild/br-mips64r6-el-hf-glibc.config,x86_64
|
||||
support/config-fragments/autobuild/br-powerpc-603e-basic-cpp.config,x86_64
|
||||
support/config-fragments/autobuild/br-powerpc64-power7-glibc.config,x86_64
|
||||
support/config-fragments/autobuild/br-powerpc-internal-full.config,any
|
||||
support/config-fragments/autobuild/br-riscv64-full-internal.config,any
|
||||
support/config-fragments/autobuild/br-s390x-z13-internal-glibc.config,any
|
||||
support/config-fragments/autobuild/br-xtensa-full-internal.config,any
|
||||
support/config-fragments/autobuild/linaro-aarch64.config,x86
|
||||
support/config-fragments/autobuild/linaro-aarch64-be.config,x86
|
||||
support/config-fragments/autobuild/linaro-arm.config,x86
|
||||
support/config-fragments/autobuild/sourcery-mips64.config,x86
|
||||
support/config-fragments/autobuild/sourcery-mips.config,x86
|
||||
support/config-fragments/autobuild/sourcery-nios2.config,x86
|
||||
|
Can't render this file because it contains an unexpected character in line 1 and column 26.
|
@ -0,0 +1,7 @@
|
||||
# This config fragment disables Buildroot options that are turned on by
|
||||
# default, in order to arrive at minimal build time.
|
||||
BR2_INIT_NONE=y
|
||||
BR2_SYSTEM_BIN_SH_NONE=y
|
||||
# BR2_PACKAGE_BUSYBOX is not set
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
|
||||
36
buildroot-2024.02/support/dependencies/check-host-asciidoc.sh
Executable file
36
buildroot-2024.02/support/dependencies/check-host-asciidoc.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
candidate="$1" #ignored
|
||||
|
||||
asciidoc=`which asciidoc`
|
||||
if [ ! -x "$asciidoc" ]; then
|
||||
# echo nothing: no suitable asciidoc found
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Output of 'asciidoc --version' examples:
|
||||
# asciidoc 8.6.7
|
||||
version=`$asciidoc --version | cut -d\ -f2`
|
||||
major=`echo "$version" | cut -d. -f1`
|
||||
minor=`echo "$version" | cut -d. -f2`
|
||||
bugfix=`echo "$version" | cut -d. -f3`
|
||||
|
||||
# To generate the manual, we need asciidoc >= 8.6.3
|
||||
major_min=8
|
||||
minor_min=6
|
||||
bugfix_min=3
|
||||
if [ $major -gt $major_min ]; then
|
||||
echo $asciidoc
|
||||
else
|
||||
if [ $major -eq $major_min -a $minor -ge $minor_min ]; then
|
||||
echo $asciidoc
|
||||
else
|
||||
if [ $major -eq $major_min -a $minor -eq $minor_min \
|
||||
-a $bugfix -ge $bugfix_min ]; then
|
||||
echo $asciidoc
|
||||
else
|
||||
# echo nothing: no suitable asciidoc found
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -0,0 +1,14 @@
|
||||
# If the system lacks bison or flex, add
|
||||
# dependencies to suitable host packages
|
||||
#
|
||||
# BR2_{BISON,FLES}_HOST_DEPENDENCY should only be used to build code
|
||||
# that runs on host, e.g. Kconfig. To build code for target use plain
|
||||
# host-{bison,flex}.
|
||||
|
||||
ifeq ($(shell which bison 2>/dev/null),)
|
||||
BR2_BISON_HOST_DEPENDENCY = host-bison
|
||||
endif
|
||||
|
||||
ifeq ($(shell which flex 2>/dev/null),)
|
||||
BR2_FLEX_HOST_DEPENDENCY = host-flex
|
||||
endif
|
||||
16
buildroot-2024.02/support/dependencies/check-host-cmake.mk
Normal file
16
buildroot-2024.02/support/dependencies/check-host-cmake.mk
Normal file
@ -0,0 +1,16 @@
|
||||
# The cmake minimum version is set to either 3.18 or higher,
|
||||
# depending on the highest minimum version required by any
|
||||
# of the packages bundled in Buildroot. If a package is
|
||||
# bumped or a new one added, and it requires a higher
|
||||
# cmake version than the one provided by the host, our
|
||||
# cmake infra will catch it and build its own.
|
||||
#
|
||||
BR2_CMAKE_VERSION_MIN = $(BR2_HOST_CMAKE_AT_LEAST)
|
||||
|
||||
BR2_CMAKE_CANDIDATES ?= cmake cmake3
|
||||
BR2_CMAKE ?= $(call suitable-host-package,cmake,\
|
||||
$(BR2_CMAKE_VERSION_MIN) $(BR2_CMAKE_CANDIDATES))
|
||||
ifeq ($(BR2_CMAKE),)
|
||||
BR2_CMAKE = $(HOST_DIR)/bin/cmake
|
||||
BR2_CMAKE_HOST_DEPENDENCY = host-cmake
|
||||
endif
|
||||
45
buildroot-2024.02/support/dependencies/check-host-cmake.sh
Executable file
45
buildroot-2024.02/support/dependencies/check-host-cmake.sh
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
# prevent shift error
|
||||
[ $# -lt 2 ] && exit 1
|
||||
|
||||
major_min="${1%.*}"
|
||||
minor_min="${1#*.}"
|
||||
|
||||
shift
|
||||
|
||||
for candidate; do
|
||||
|
||||
# Try to locate the candidate. Discard it if not located.
|
||||
cmake=`which "${candidate}" 2>/dev/null`
|
||||
[ -n "${cmake}" ] || continue
|
||||
|
||||
# Extract version X.Y from versions in the form X.Y or X.Y.Z
|
||||
# with X, Y and Z numbers with one or more digits each, e.g.
|
||||
# 3.2 -> 3.2
|
||||
# 3.2.3 -> 3.2
|
||||
# 3.2.42 -> 3.2
|
||||
# 3.10 -> 3.10
|
||||
# 3.10.4 -> 3.10
|
||||
# 3.10.42 -> 3.10
|
||||
# Discard the candidate if no version can be obtained
|
||||
version="$(${cmake} --version \
|
||||
|sed -r -e '/.* ([[:digit:]]+\.[[:digit:]]+).*$/!d;' \
|
||||
-e 's//\1/'
|
||||
)"
|
||||
[ -n "${version}" ] || continue
|
||||
|
||||
major="${version%.*}"
|
||||
minor="${version#*.}"
|
||||
|
||||
if [ ${major} -gt ${major_min} ]; then
|
||||
echo "${cmake}"
|
||||
exit
|
||||
elif [ ${major} -eq ${major_min} -a ${minor} -ge ${minor_min} ]; then
|
||||
echo "${cmake}"
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
# echo nothing: no suitable cmake found
|
||||
exit 1
|
||||
@ -0,0 +1,6 @@
|
||||
# Check whether the host's coreutils are up to date enough
|
||||
# to provide 'ln --relative' and 'realpath'.
|
||||
|
||||
ifeq (,$(call suitable-host-package,coreutils))
|
||||
BR2_COREUTILS_HOST_DEPENDENCY = host-coreutils
|
||||
endif
|
||||
12
buildroot-2024.02/support/dependencies/check-host-coreutils.sh
Executable file
12
buildroot-2024.02/support/dependencies/check-host-coreutils.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Exit on the first error
|
||||
set -e
|
||||
|
||||
# Does ln supports the --relative/-r option?
|
||||
ln --relative --help >/dev/null 2>&1
|
||||
|
||||
# Does realpath exist?
|
||||
realpath --help >/dev/null 2>&1
|
||||
|
||||
echo OK
|
||||
@ -0,0 +1,3 @@
|
||||
ifeq (,$(call suitable-host-package,gzip))
|
||||
BR2_GZIP_HOST_DEPENDENCY = host-gzip
|
||||
endif
|
||||
21
buildroot-2024.02/support/dependencies/check-host-gzip.sh
Executable file
21
buildroot-2024.02/support/dependencies/check-host-gzip.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
candidate="$1" # ignored
|
||||
|
||||
gzip="$(which gzip)"
|
||||
if [ ! -x "${gzip}" ]; then
|
||||
# echo nothing: no suitable gzip found
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# gzip displays its version string on stdout
|
||||
# pigz displays its version string on stderr
|
||||
version="$("${gzip}" --version 2>&1)"
|
||||
case "${version}" in
|
||||
(*pigz*)
|
||||
# echo nothing: no suitable gzip found
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
printf "%s" "${gzip}"
|
||||
@ -0,0 +1,4 @@
|
||||
ifeq (,$(call suitable-host-package,lzip,$(LZCAT)))
|
||||
BR2_LZIP_HOST_DEPENDENCY = host-lzip
|
||||
LZCAT = $(HOST_DIR)/bin/lzip -d -c
|
||||
endif
|
||||
14
buildroot-2024.02/support/dependencies/check-host-lzip.sh
Executable file
14
buildroot-2024.02/support/dependencies/check-host-lzip.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
candidate="$1"
|
||||
|
||||
lzip=`which $candidate 2>/dev/null`
|
||||
if [ ! -x "$lzip" ]; then
|
||||
lzip=`which lzip 2>/dev/null`
|
||||
if [ ! -x "$lzip" ]; then
|
||||
# echo nothing: no suitable lzip found
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $lzip
|
||||
21
buildroot-2024.02/support/dependencies/check-host-make.mk
Normal file
21
buildroot-2024.02/support/dependencies/check-host-make.mk
Normal file
@ -0,0 +1,21 @@
|
||||
# Since version 2.28, glibc requires GNU Make >= 4.0
|
||||
# https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
|
||||
#
|
||||
# Set this to either 4.0 or higher, depending on the highest minimum
|
||||
# version required by any of the packages bundled in Buildroot. If a
|
||||
# package is bumped or a new one added, and it requires a higher
|
||||
# version, our package infra will catch it and whine.
|
||||
#
|
||||
BR2_MAKE_VERSION_MIN = 4.0
|
||||
|
||||
BR2_MAKE ?= $(call suitable-host-package,make,\
|
||||
$(BR2_MAKE_VERSION_MIN) $(MAKE))
|
||||
|
||||
ifeq ($(BR2_MAKE),)
|
||||
BR2_MAKE = $(HOST_DIR)/bin/host-make -j$(PARALLEL_JOBS)
|
||||
BR2_MAKE1 = $(HOST_DIR)/bin/host-make -j1
|
||||
BR2_MAKE_HOST_DEPENDENCY = host-make
|
||||
else
|
||||
BR2_MAKE = $(MAKE)
|
||||
BR2_MAKE1 = $(MAKE1)
|
||||
endif
|
||||
37
buildroot-2024.02/support/dependencies/check-host-make.sh
Executable file
37
buildroot-2024.02/support/dependencies/check-host-make.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
# prevent shift error
|
||||
[ $# -lt 2 ] && exit 1
|
||||
|
||||
major_min="${1%.*}"
|
||||
minor_min="${1#*.}"
|
||||
|
||||
shift
|
||||
|
||||
# The host make program is already checked by dependencies.sh but we
|
||||
# want to check the version number even if Buildroot is able to use
|
||||
# GNU make >= 3.81 but some packages may require a more recent version.
|
||||
make="$1"
|
||||
|
||||
# Output of 'make --version' examples:
|
||||
# GNU Make 4.2.1
|
||||
# GNU Make 4.0
|
||||
# GNU Make 3.81
|
||||
version=`$make --version 2>&1 | sed -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\
|
||||
].*//g' -e '1q'`
|
||||
|
||||
major=`echo "$version" | cut -d. -f1`
|
||||
minor=`echo "$version" | cut -d. -f2`
|
||||
|
||||
if [ $major -lt $major_min ]; then
|
||||
# echo nothing: no suitable make found
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $major -eq $major_min -a $minor -lt $minor_min ]; then
|
||||
# echo nothing: no suitable make found
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# valid
|
||||
echo $make
|
||||
@ -0,0 +1,8 @@
|
||||
# Since version 2.29, glibc requires python 3.4 or later to build the GNU C Library.
|
||||
# https://www.sourceware.org/ml/libc-alpha/2019-01/msg00723.html
|
||||
|
||||
BR2_PYTHON3_VERSION_MIN = 3.4
|
||||
|
||||
ifeq (,$(call suitable-host-package,python3,$(BR2_PYTHON3_VERSION_MIN) python3 python))
|
||||
BR2_PYTHON3_HOST_DEPENDENCY = host-python3
|
||||
endif
|
||||
31
buildroot-2024.02/support/dependencies/check-host-python3.sh
Executable file
31
buildroot-2024.02/support/dependencies/check-host-python3.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
# prevent shift error
|
||||
[ $# -lt 2 ] && exit 1
|
||||
|
||||
version_min="$(echo ${1} | awk '{ split($1, v, "."); print v[1] v[2] }')"
|
||||
|
||||
shift
|
||||
|
||||
# The host python interpreter is already checked by dependencies.sh but
|
||||
# it only check if the version is at least 2.7.
|
||||
# We want to check the version number of the python3 interpreter even
|
||||
# if Buildroot is able to use any version but some packages may require
|
||||
# a more recent version.
|
||||
|
||||
for candidate in "${@}" ; do
|
||||
python3=`which $candidate 2>/dev/null`
|
||||
if [ ! -x "$python3" ]; then
|
||||
continue
|
||||
fi
|
||||
version=`$python3 -V 2>&1 | awk '{ split($2, v, "."); print v[1] v[2] }'`
|
||||
|
||||
if [ $version -lt $version_min ]; then
|
||||
# no suitable python3 found
|
||||
continue
|
||||
fi
|
||||
|
||||
# suitable python3 found
|
||||
echo $python3
|
||||
break
|
||||
done
|
||||
6
buildroot-2024.02/support/dependencies/check-host-tar.mk
Normal file
6
buildroot-2024.02/support/dependencies/check-host-tar.mk
Normal file
@ -0,0 +1,6 @@
|
||||
TAR ?= tar
|
||||
|
||||
ifeq (,$(call suitable-host-package,tar,$(TAR)))
|
||||
TAR = $(HOST_DIR)/bin/tar
|
||||
BR2_TAR_HOST_DEPENDENCY = host-tar
|
||||
endif
|
||||
57
buildroot-2024.02/support/dependencies/check-host-tar.sh
Executable file
57
buildroot-2024.02/support/dependencies/check-host-tar.sh
Executable file
@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
|
||||
candidate="$1"
|
||||
|
||||
tar=`which $candidate`
|
||||
if [ ! -x "$tar" ]; then
|
||||
tar=`which tar`
|
||||
if [ ! -x "$tar" ]; then
|
||||
# echo nothing: no suitable tar found
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Output of 'tar --version' examples:
|
||||
# tar (GNU tar) 1.15.1
|
||||
# tar (GNU tar) 1.25
|
||||
# bsdtar 2.8.3 - libarchive 2.8.3
|
||||
version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'`
|
||||
major=`echo "$version" | cut -d. -f1`
|
||||
minor=`echo "$version" | cut -d. -f2`
|
||||
bugfix=`echo "$version" | cut -d. -f3`
|
||||
version_bsd=`$tar --version | grep 'bsdtar'`
|
||||
|
||||
# BSD tar does not have all the command-line options
|
||||
if [ -n "${version_bsd}" ] ; then
|
||||
# echo nothing: no suitable tar found
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Minimal version = 1.27 (previous versions do not correctly unpack archives
|
||||
# containing hard-links if the --strip-components option is used or create
|
||||
# different gnu long link headers for path elements > 100 characters).
|
||||
major_min=1
|
||||
minor_min=27
|
||||
|
||||
# Maximal version = 1.34 (1.35 changed devmajor/devminor for files)
|
||||
# https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00005.html
|
||||
major_max=1
|
||||
minor_max=34
|
||||
|
||||
if [ $major -lt $major_min -o $major -gt $major_max ]; then
|
||||
# echo nothing: no suitable tar found
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $major -eq $major_min -a $minor -lt $minor_min ]; then
|
||||
# echo nothing: no suitable tar found
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $major -eq $major_max -a $minor -gt $minor_max ]; then
|
||||
# echo nothing: no suitable tar found
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# valid
|
||||
echo $tar
|
||||
@ -0,0 +1,7 @@
|
||||
# XZCAT is taken from BR2_XZCAT (defaults to 'xzcat') (see Makefile)
|
||||
# If it is not present, build our own host-xzcat
|
||||
|
||||
ifeq (,$(call suitable-host-package,xzcat,$(XZCAT)))
|
||||
BR2_XZCAT_HOST_DEPENDENCY = host-xz
|
||||
XZCAT = $(HOST_DIR)/bin/xzcat
|
||||
endif
|
||||
14
buildroot-2024.02/support/dependencies/check-host-xzcat.sh
Executable file
14
buildroot-2024.02/support/dependencies/check-host-xzcat.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
candidate="$1"
|
||||
|
||||
xzcat=`which $candidate 2>/dev/null`
|
||||
if [ ! -x "$xzcat" ]; then
|
||||
xzcat=`which xzcat 2>/dev/null`
|
||||
if [ ! -x "$xzcat" ]; then
|
||||
# echo nothing: no suitable xzcat found
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $xzcat
|
||||
35
buildroot-2024.02/support/dependencies/dependencies.mk
Normal file
35
buildroot-2024.02/support/dependencies/dependencies.mk
Normal file
@ -0,0 +1,35 @@
|
||||
################################################################################
|
||||
#
|
||||
# Check buildroot dependencies and bail out if the user's
|
||||
# system is judged to be lacking....
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ifeq ($(BR2_FORCE_HOST_BUILD),y)
|
||||
# ignore all available host packages
|
||||
define suitable-host-package
|
||||
endef
|
||||
else
|
||||
# suitable-host-pkg: calls check-host-$(1).sh shell script. Parameter (2)
|
||||
# can be the candidate to be checked. If not present, the check-host-$(1).sh
|
||||
# script should use 'which' to find a candidate. The script should return
|
||||
# the path to the suitable host tool, or nothing if no suitable tool was found.
|
||||
define suitable-host-package
|
||||
$(if $(1),$(shell support/dependencies/check-host-$(1).sh $(2)))
|
||||
endef
|
||||
endif
|
||||
# host utilities needs host-tar to extract the source code tarballs, so
|
||||
# ensure check-host-tar.mk is included before the rest
|
||||
include support/dependencies/check-host-tar.mk
|
||||
-include $(sort $(filter-out %-tar.mk,$(wildcard support/dependencies/check-host-*.mk)))
|
||||
|
||||
dependencies:
|
||||
@MAKE="$(MAKE)" DL_TOOLS="$(sort $(DL_TOOLS_DEPENDENCIES))" \
|
||||
$(TOPDIR)/support/dependencies/dependencies.sh
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Toplevel Makefile options
|
||||
#
|
||||
################################################################################
|
||||
.PHONY: dependencies
|
||||
339
buildroot-2024.02/support/dependencies/dependencies.sh
Executable file
339
buildroot-2024.02/support/dependencies/dependencies.sh
Executable file
@ -0,0 +1,339 @@
|
||||
#!/bin/sh
|
||||
# vi: set sw=4 ts=4:
|
||||
|
||||
export LC_ALL=C
|
||||
TAB="$(printf '\t')"
|
||||
NL="
|
||||
"
|
||||
|
||||
# Verify that grep works
|
||||
echo "WORKS" | grep "WORKS" >/dev/null 2>&1
|
||||
if test $? != 0 ; then
|
||||
echo
|
||||
echo "grep doesn't work"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Sanity check for CWD in LD_LIBRARY_PATH
|
||||
case ":${LD_LIBRARY_PATH:-unset}:" in
|
||||
(*::*|*:.:*)
|
||||
echo
|
||||
echo "You seem to have the current working directory in your"
|
||||
echo "LD_LIBRARY_PATH environment variable. This doesn't work."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Sanity check for CWD in PATH. Having the current working directory
|
||||
# in the PATH makes various packages (e.g. toolchain, coreutils...)
|
||||
# build process break.
|
||||
# PATH should not contain a newline, otherwise it fails in spectacular
|
||||
# ways as soon as PATH is referenced in a package rule
|
||||
# An empty PATH is technically possible, but in practice we would not
|
||||
# even arrive here if that was the case.
|
||||
case ":${PATH:-unset}:" in
|
||||
(*::*|*:.:*)
|
||||
echo
|
||||
echo "You seem to have the current working directory in your"
|
||||
echo "PATH environment variable. This doesn't work."
|
||||
exit 1
|
||||
;;
|
||||
(*" "*|*"${TAB}"*|*"${NL}"*)
|
||||
printf "\n"
|
||||
printf "Your PATH contains spaces, TABs, and/or newline (\\\n) characters.\n"
|
||||
printf "This doesn't work. Fix you PATH.\n"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
check_prog_host()
|
||||
{
|
||||
prog="$1"
|
||||
if ! which $prog > /dev/null ; then
|
||||
echo >&2
|
||||
echo "You must install '$prog' on your build machine" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Verify that which is installed
|
||||
check_prog_host "which"
|
||||
# Verify that sed is installed
|
||||
check_prog_host "sed"
|
||||
|
||||
# 'file' must be present and must be exactly /usr/bin/file,
|
||||
# otherwise libtool fails in incomprehensible ways.
|
||||
check_prog_host "/usr/bin/file"
|
||||
|
||||
# Check make
|
||||
MAKE=$(which make 2> /dev/null)
|
||||
if [ -z "$MAKE" ] ; then
|
||||
echo
|
||||
echo "You must install 'make' on your build machine";
|
||||
exit 1;
|
||||
fi;
|
||||
MAKE_VERSION=$($MAKE --version 2>&1 | sed -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
|
||||
if [ -z "$MAKE_VERSION" ] ; then
|
||||
echo
|
||||
echo "You must install 'make' on your build machine";
|
||||
exit 1;
|
||||
fi;
|
||||
MAKE_MAJOR=$(echo $MAKE_VERSION | sed -e "s/\..*//g")
|
||||
MAKE_MINOR=$(echo $MAKE_VERSION | sed -e "s/^$MAKE_MAJOR\.//g" -e "s/\..*//g" -e "s/[a-zA-Z].*//g")
|
||||
if [ $MAKE_MAJOR -lt 3 ] || [ $MAKE_MAJOR -eq 3 -a $MAKE_MINOR -lt 81 ] ; then
|
||||
echo
|
||||
echo "You have make '$MAKE_VERSION' installed. GNU make >=3.81 is required"
|
||||
exit 1;
|
||||
fi;
|
||||
|
||||
# Check host gcc
|
||||
COMPILER=$(which $HOSTCC_NOCCACHE 2> /dev/null)
|
||||
if [ -z "$COMPILER" ] ; then
|
||||
COMPILER=$(which cc 2> /dev/null)
|
||||
fi;
|
||||
if [ -z "$COMPILER" ] ; then
|
||||
echo
|
||||
echo "You must install 'gcc' on your build machine";
|
||||
exit 1;
|
||||
fi;
|
||||
|
||||
COMPILER_VERSION=$($COMPILER -v 2>&1 | sed -n '/^gcc version/p' |
|
||||
sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
|
||||
if [ -z "$COMPILER_VERSION" ] ; then
|
||||
echo
|
||||
echo "You must install 'gcc' on your build machine";
|
||||
exit 1;
|
||||
fi;
|
||||
COMPILER_MAJOR=$(echo $COMPILER_VERSION | sed -e "s/\..*//g")
|
||||
COMPILER_MINOR=$(echo $COMPILER_VERSION | sed -e "s/^$COMPILER_MAJOR\.//g" -e "s/\..*//g")
|
||||
if [ $COMPILER_MAJOR -lt 4 -o $COMPILER_MAJOR -eq 4 -a $COMPILER_MINOR -lt 8 ] ; then
|
||||
echo
|
||||
echo "You have gcc '$COMPILER_VERSION' installed. gcc >= 4.8 is required"
|
||||
exit 1;
|
||||
fi;
|
||||
|
||||
# check for host CXX
|
||||
CXXCOMPILER=$(which $HOSTCXX_NOCCACHE 2> /dev/null)
|
||||
if [ -z "$CXXCOMPILER" ] ; then
|
||||
CXXCOMPILER=$(which c++ 2> /dev/null)
|
||||
fi
|
||||
|
||||
if [ -z "$CXXCOMPILER" ] ; then
|
||||
echo
|
||||
echo "You may have to install 'g++' on your build machine"
|
||||
fi
|
||||
if [ ! -z "$CXXCOMPILER" ] ; then
|
||||
CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | sed -n '/^gcc version/p' |
|
||||
sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
|
||||
if [ -z "$CXXCOMPILER_VERSION" ] ; then
|
||||
echo
|
||||
echo "You may have to install 'g++' on your build machine"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$CXXCOMPILER_VERSION" ] ; then
|
||||
CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/\..*//g")
|
||||
CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g")
|
||||
if [ $CXXCOMPILER_MAJOR -lt 4 -o $CXXCOMPILER_MAJOR -eq 4 -a $CXXCOMPILER_MINOR -lt 8 ] ; then
|
||||
echo
|
||||
echo "You have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 4.8 is required"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check bash
|
||||
# We only check bash is available, setting SHELL appropriately is done
|
||||
# in the top-level Makefile, and we mimick the same sequence here
|
||||
if [ -n "${BASH}" ]; then :
|
||||
elif [ -x /bin/bash ]; then :
|
||||
elif [ -z "$( sh -c 'echo $BASH' )" ]; then
|
||||
echo
|
||||
echo "You must install 'bash' on your build machine"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check that a few mandatory programs are installed
|
||||
missing_progs="no"
|
||||
for prog in perl tar wget cpio unzip rsync bc cmp find xargs ${DL_TOOLS} ; do
|
||||
if ! which $prog > /dev/null ; then
|
||||
echo "You must install '$prog' on your build machine";
|
||||
missing_progs="yes"
|
||||
if test $prog = "svn" ; then
|
||||
echo " svn is usually part of the subversion package in your distribution"
|
||||
elif test $prog = "hg" ; then
|
||||
echo " hg is usually part of the mercurial package in your distribution"
|
||||
elif test $prog = "zcat" ; then
|
||||
echo " zcat is usually part of the gzip package in your distribution"
|
||||
elif test $prog = "bzcat" ; then
|
||||
echo " bzcat is usually part of the bzip2 package in your distribution"
|
||||
elif test $prog = "cmp" ; then
|
||||
echo " cmp is usually part of the diffutils package in your distribution"
|
||||
elif test $prog = "find" ; then
|
||||
echo " find is usually part of the findutils package in your distribution"
|
||||
elif test $prog = "xargs" ; then
|
||||
echo " xargs is usually part of the findutils package in your distribution"
|
||||
fi
|
||||
fi
|
||||
|
||||
# we need git >= 2.0.0 for shallow clones / vendoring
|
||||
if test $prog = "git" ; then
|
||||
GIT_VERSION="$(git --version | sed -n 's/^git version \(.*\)/\1/p')"
|
||||
GIT_MAJOR="$(echo "${GIT_VERSION}" | cut -d . -f 1)"
|
||||
if [ "${GIT_MAJOR}" -lt 2 ]; then
|
||||
echo "You have git '${GIT_VERSION}' installed. Git >= 2.0.0 is required"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if test "${missing_progs}" = "yes" ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PATCH_VERSION="$(patch -v 2>/dev/null | sed -n 's/^GNU patch \(.*\)/\1/p')"
|
||||
if [ -z "${PATCH_VERSION}" ] ; then
|
||||
echo
|
||||
echo "You must install GNU patch"
|
||||
exit 1
|
||||
fi
|
||||
PATCH_MAJOR="$(echo "${PATCH_VERSION}" | cut -d . -f 1)"
|
||||
PATCH_MINOR="$(echo "${PATCH_VERSION}" | cut -d . -f 2)"
|
||||
if [ "${PATCH_MAJOR}" -lt 2 ] || [ "${PATCH_MAJOR}" -eq 2 -a "${PATCH_MINOR}" -lt 7 ] ; then
|
||||
echo
|
||||
echo "You have GNU patch '${PATCH_VERSION}' installed. GNU patch >= 2.7 is required"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_NEEDS_HOST_UTF8_LOCALE=y $BR2_CONFIG ; then
|
||||
if ! which locale > /dev/null ; then
|
||||
echo
|
||||
echo "You need locale support on your build machine to build a toolchain supporting locales"
|
||||
exit 1 ;
|
||||
fi
|
||||
if ! locale -a | grep -q -i -E 'utf-?8$' ; then
|
||||
echo
|
||||
echo "You need at least one UTF8 locale to build a toolchain supporting locales"
|
||||
exit 1 ;
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_NEEDS_HOST_JAVA=y $BR2_CONFIG ; then
|
||||
check_prog_host "java"
|
||||
JAVA_GCJ=$(java -version 2>&1 | grep gcj)
|
||||
if [ ! -z "$JAVA_GCJ" ] ; then
|
||||
echo
|
||||
echo "$JAVA_GCJ is not sufficient to compile your package selection."
|
||||
echo "Please install an OpenJDK/IcedTea/Oracle Java."
|
||||
exit 1 ;
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BR2_CONFIG ; then
|
||||
if test ! -f /lib/ld-linux.so.2 ; then
|
||||
echo
|
||||
echo "Your Buildroot configuration uses pre-built tools for the x86 architecture,"
|
||||
echo "but your build machine uses the x86-64 architecture without the 32 bits compatibility"
|
||||
echo "library."
|
||||
echo "If you're running a Debian/Ubuntu distribution, install the libc6-i386,"
|
||||
echo "lib32stdc++6, and lib32z1 packages (or alternatively libc6:i386,"
|
||||
echo "libstdc++6:i386, and zlib1g:i386)."
|
||||
echo "If you're running a RedHat/Fedora distribution, install the glibc.i686 and"
|
||||
echo "zlib.i686 packages."
|
||||
echo "If you're running an ArchLinux distribution, install lib32-glibc."
|
||||
echo "For other distributions, refer to the documentation on how to install the 32 bits"
|
||||
echo "compatibility libraries."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
|
||||
if ! echo "int main(void) {}" | gcc -m32 -x c - -o /dev/null 2>/dev/null; then
|
||||
echo
|
||||
echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries."
|
||||
echo "If you're running a Debian/Ubuntu distribution, install the gcc-multilib package."
|
||||
echo "For other distributions, refer to their documentation."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! echo "int main(void) {}" | g++ -m32 -x c++ - -o /dev/null 2>/dev/null; then
|
||||
echo
|
||||
echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries."
|
||||
echo "If you're running a Debian/Ubuntu distribution, install the g++-multilib package."
|
||||
echo "For other distributions, refer to their documentation."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT=y $BR2_CONFIG ; then
|
||||
if ! echo "#include <gcc-plugin.h>" | $HOSTCXX_NOCCACHE -I$($HOSTCXX_NOCCACHE -print-file-name=plugin)/include -x c++ -c - -o /dev/null ; then
|
||||
echo
|
||||
echo "Your Buildroot configuration needs a host compiler capable of building gcc plugins."
|
||||
echo "If you're running a Debian/Ubuntu distribution, install gcc-X-plugin-dev package."
|
||||
echo "For other distributions, refer to their documentation."
|
||||
exit 1 ;
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check that the Perl installation is complete enough for Buildroot.
|
||||
required_perl_modules="Data::Dumper" # Needed to build host-autoconf
|
||||
required_perl_modules="$required_perl_modules English" # Used by host-libxml-parser-perl
|
||||
required_perl_modules="$required_perl_modules ExtUtils::MakeMaker" # Used by host-libxml-parser-perl
|
||||
required_perl_modules="$required_perl_modules Thread::Queue" # Used by host-automake
|
||||
required_perl_modules="$required_perl_modules FindBin" # Used by (host-)libopenssl
|
||||
required_perl_modules="$required_perl_modules IPC::Cmd" # Used by (host-)libopenssl
|
||||
|
||||
if grep -q ^BR2_PACKAGE_LIBOPENSSL=y $BR2_CONFIG && grep -q ^BR2_s390x=y $BR2_CONFIG ; then
|
||||
required_perl_modules="$required_perl_modules bigint"
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_PACKAGE_MOSH=y $BR2_CONFIG ; then
|
||||
required_perl_modules="$required_perl_modules diagnostics"
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_PACKAGE_MPV=y $BR2_CONFIG ; then
|
||||
required_perl_modules="$required_perl_modules Math::BigInt"
|
||||
required_perl_modules="$required_perl_modules Math::BigRat"
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_PACKAGE_NETSURF=y $BR2_CONFIG ; then
|
||||
required_perl_modules="$required_perl_modules Digest::MD5"
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_PACKAGE_WHOIS=y $BR2_CONFIG ; then
|
||||
required_perl_modules="$required_perl_modules autodie"
|
||||
fi
|
||||
|
||||
if grep -q -E '^BR2_PACKAGE_(WEBKITGTK|WPEWEBKIT)=y' $BR2_CONFIG ; then
|
||||
required_perl_modules="${required_perl_modules} JSON::PP"
|
||||
fi
|
||||
|
||||
if grep -q -E '^BR2_(PACKAGE_ACE|TARGET_SYSLINUX)=y' $BR2_CONFIG ; then
|
||||
required_perl_modules="$required_perl_modules FileHandle"
|
||||
fi
|
||||
|
||||
# This variable will keep the modules that are missing in your system.
|
||||
missing_perl_modules=""
|
||||
|
||||
if grep -q ^BR2_PACKAGE_LIBXCRYPT=y $BR2_CONFIG ; then
|
||||
# open cannot be used with require
|
||||
if ! perl -e "use open ':std'" > /dev/null 2>&1 ; then
|
||||
missing_perl_modules="$missing_perl_modules open"
|
||||
fi
|
||||
fi
|
||||
|
||||
for pm in $required_perl_modules ; do
|
||||
if ! perl -e "require $pm" > /dev/null 2>&1 ; then
|
||||
missing_perl_modules="$missing_perl_modules $pm"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$missing_perl_modules" ] ; then
|
||||
echo "Your Perl installation is not complete enough; at least the following"
|
||||
echo "modules are missing:"
|
||||
echo
|
||||
for pm in $missing_perl_modules ; do
|
||||
printf "\t $pm\n"
|
||||
done
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
68
buildroot-2024.02/support/docker/Dockerfile
Normal file
68
buildroot-2024.02/support/docker/Dockerfile
Normal file
@ -0,0 +1,68 @@
|
||||
# This Dockerfile generates the docker image that gets used by Gitlab CI
|
||||
# To build it (YYYYMMDD.HHMM is the current date and time in UTC):
|
||||
# docker build -t registry.gitlab.com/buildroot.org/buildroot/base:YYYYMMDD.HHMM support/docker
|
||||
# docker push registry.gitlab.com/buildroot.org/buildroot/base:YYYYMMDD.HHMM
|
||||
|
||||
# We use a specific tag for the base image *and* the corresponding date
|
||||
# for the repository., so do not forget to update the apt-sources.list
|
||||
# file that is shipped next to this Dockerfile.
|
||||
FROM debian:bullseye-20230202
|
||||
|
||||
LABEL maintainer="Buildroot mailing list <buildroot@buildroot.org>" \
|
||||
vendor="Buildroot" \
|
||||
description="Container with everything needed to run Buildroot"
|
||||
|
||||
# Setup environment
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# This repository can be a bit slow at times. Don't panic...
|
||||
COPY apt-sources.list /etc/apt/sources.list
|
||||
|
||||
# The container has no package lists, so need to update first
|
||||
RUN dpkg --add-architecture i386 && \
|
||||
apt-get -o APT::Retries=3 update -y
|
||||
RUN apt-get -o APT::Retries=3 install -y --no-install-recommends \
|
||||
bc \
|
||||
build-essential \
|
||||
bzr \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
cpio \
|
||||
cvs \
|
||||
file \
|
||||
g++-multilib \
|
||||
git \
|
||||
libc6:i386 \
|
||||
libncurses5-dev \
|
||||
locales \
|
||||
mercurial \
|
||||
openssh-server \
|
||||
python3 \
|
||||
python3-flake8 \
|
||||
python3-magic \
|
||||
python3-nose2 \
|
||||
python3-pexpect \
|
||||
python3-pytest \
|
||||
qemu-system-arm \
|
||||
qemu-system-misc \
|
||||
qemu-system-x86 \
|
||||
rsync \
|
||||
shellcheck \
|
||||
subversion \
|
||||
unzip \
|
||||
wget \
|
||||
&& \
|
||||
apt-get -y autoremove && \
|
||||
apt-get -y clean
|
||||
|
||||
# To be able to generate a toolchain with locales, enable one UTF-8 locale
|
||||
RUN sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \
|
||||
/usr/sbin/locale-gen
|
||||
|
||||
RUN useradd -ms /bin/bash br-user && \
|
||||
chown -R br-user:br-user /home/br-user
|
||||
|
||||
USER br-user
|
||||
WORKDIR /home/br-user
|
||||
ENV HOME /home/br-user
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
4
buildroot-2024.02/support/docker/apt-sources.list
Normal file
4
buildroot-2024.02/support/docker/apt-sources.list
Normal file
@ -0,0 +1,4 @@
|
||||
# Latest just before 20230207T102800Z:
|
||||
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20230206T092119Z/ bullseye main
|
||||
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/20230206T092119Z/ bullseye-security main
|
||||
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20230206T092119Z/ bullseye-updates main
|
||||
65
buildroot-2024.02/support/download/bzr
Executable file
65
buildroot-2024.02/support/download/bzr
Executable file
@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# We want to catch any unexpected failure, and exit immediately
|
||||
set -e
|
||||
|
||||
# Download helper for bzr, to be called from the download wrapper script
|
||||
#
|
||||
# Options:
|
||||
# -q Be quiet
|
||||
# -o FILE Generate archive in FILE.
|
||||
# -u URI Clone from repository at URI.
|
||||
# -c CSET Use changeset (or revision) CSET.
|
||||
# -n NAME Use basename NAME.
|
||||
#
|
||||
# Environment:
|
||||
# BZR : the bzr command to call
|
||||
|
||||
|
||||
quiet=
|
||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||
case "${OPT}" in
|
||||
q) quiet=-q;;
|
||||
o) output="${OPTARG}";;
|
||||
u) uri="${OPTARG}";;
|
||||
c) cset="${OPTARG}";;
|
||||
n) basename="${OPTARG}";;
|
||||
:) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;;
|
||||
\?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1)) # Get rid of our options
|
||||
|
||||
# Caller needs to single-quote its arguments to prevent them from
|
||||
# being expanded a second time (in case there are spaces in them)
|
||||
_bzr() {
|
||||
if [ -z "${quiet}" ]; then
|
||||
printf '%s ' ${BZR} "${@}"; printf '\n'
|
||||
fi
|
||||
_plain_bzr "$@"
|
||||
}
|
||||
# Note: please keep command below aligned with what is printed above
|
||||
_plain_bzr() {
|
||||
eval ${BZR} "${@}"
|
||||
}
|
||||
|
||||
# --per-file-timestamps comes with bzr-2.2 (released August 2010),
|
||||
# so only pass it if bzr is recent enough. We compute versions as:
|
||||
# major*1000 + minor
|
||||
bzr_min_version=2002
|
||||
bzr_version=$(($(bzr --version |
|
||||
sed -r -n 's/^Bazaar \(bzr\) ([[:digit:]]+)\.([[:digit:]]+)\..*$/\1*1000+\2/p')
|
||||
))
|
||||
|
||||
# If the version is recent enough, we can generate reproducible
|
||||
# archives; otherwise, we just hope for the best (as it would
|
||||
# be downloaded from the BR mirror if what we generate here does
|
||||
# not match the hash we have for it).
|
||||
if [ ${bzr_version} -ge ${bzr_min_version} ]; then
|
||||
timestamp_opt="--per-file-timestamps"
|
||||
fi
|
||||
|
||||
_bzr export ${quiet} --root="'${basename}/'" --format=tgz \
|
||||
${timestamp_opt} - "${@}" "'${uri}'" -r "'${cset}'" \
|
||||
>"${output}"
|
||||
43
buildroot-2024.02/support/download/cargo-post-process
Executable file
43
buildroot-2024.02/support/download/cargo-post-process
Executable file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
. "${0%/*}/helpers"
|
||||
|
||||
while getopts "n:o:" OPT; do
|
||||
case "${OPT}" in
|
||||
o) output="${OPTARG}";;
|
||||
n) base_name="${OPTARG}";;
|
||||
:) error "option '%s' expects a mandatory argument\n" "${OPTARG}";;
|
||||
\?) error "unknown option '%s'\n" "${OPTARG}";;
|
||||
esac
|
||||
done
|
||||
|
||||
# Already vendored tarball, nothing to do
|
||||
if tar tf "${output}" | grep -q "^[^/]*/VENDOR" ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
post_process_unpack "${base_name}" "${output}"
|
||||
|
||||
# Do the Cargo vendoring
|
||||
pushd "${base_name}" > /dev/null
|
||||
|
||||
# Create the local .cargo/config with vendor info
|
||||
mkdir -p .cargo/
|
||||
mkdir -p "${CARGO_HOME}"
|
||||
flock "${CARGO_HOME}"/.br-lock \
|
||||
cargo vendor \
|
||||
--manifest-path ${BR_CARGO_MANIFEST_PATH-Cargo.toml} \
|
||||
--locked VENDOR \
|
||||
> .cargo/config
|
||||
|
||||
# "cargo vendor' outputs on stderr a message directing to add some data
|
||||
# to the project's .cargo/config.toml, data that it outputs on stdout.
|
||||
# Since we redirect stdout to .cargo/config.toml, the message on stderr
|
||||
# gets confusing, so instruct the user that it's been handled.
|
||||
printf '(note: .cargo/config.toml automatically updated by Buildroot)\n\n'
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
post_process_repack "$(pwd)" "${base_name}" "${output}"
|
||||
115
buildroot-2024.02/support/download/check-hash
Executable file
115
buildroot-2024.02/support/download/check-hash
Executable file
@ -0,0 +1,115 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Helper to check a file matches its known hash
|
||||
# Call it with:
|
||||
# $1: the full path to the temporary file that was downloaded, and
|
||||
# that is to be checked
|
||||
# $2: the final basename of the file, to which it will be ultimately
|
||||
# saved as, to be able to match it to the corresponding hashes
|
||||
# in the .hash file
|
||||
# $*: the paths of the files containing all the expected hashes
|
||||
#
|
||||
# Exit codes:
|
||||
# 0: the hash file exists and the file to check matches all its hashes,
|
||||
# or the hash file does not exist
|
||||
# 1: unknown command-line option
|
||||
# 2: the hash file exists and the file to check does not match at least
|
||||
# one of its hashes
|
||||
# 3: the hash file exists and there was no hash to check the file against
|
||||
# 4: the hash file exists and at least one hash type is unknown
|
||||
|
||||
while getopts :q OPT; do
|
||||
case "${OPT}" in
|
||||
q) exec >/dev/null;;
|
||||
\?) exit 1;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
file="${1}"
|
||||
base="${2}"
|
||||
shift 2
|
||||
declare -a h_files=( "${@}" )
|
||||
|
||||
# Check one hash for a file
|
||||
# $1: algo hash
|
||||
# $2: known hash
|
||||
# $3: file (full path)
|
||||
# $4: hash file (full path)
|
||||
check_one_hash() {
|
||||
_h="${1}"
|
||||
_known="${2}"
|
||||
_file="${3}"
|
||||
_h_file="${4}"
|
||||
|
||||
# Note: md5 is supported, but undocumented on purpose.
|
||||
# Note: sha3 is not supported, since there is currently no implementation
|
||||
# (the NIST has yet to publish the parameters).
|
||||
case "${_h}" in
|
||||
md5|sha1) ;;
|
||||
sha224|sha256|sha384|sha512) ;;
|
||||
*) # Unknown hash, exit with error
|
||||
printf "ERROR: unknown hash '%s' for '%s'\n" \
|
||||
"${_h}" "${base}" >&2
|
||||
exit 4
|
||||
;;
|
||||
esac
|
||||
|
||||
# Do the hashes match?
|
||||
_hash="$( "${_h}sum" "${_file}" |cut -d ' ' -f 1 )"
|
||||
if [ "${_hash}" = "${_known}" ]; then
|
||||
printf "%s: OK (%s: %s)\n" "${base}" "${_h}" "${_hash}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
printf "ERROR: while checking hashes from %s\n" "${_h_file}" >&2
|
||||
printf "ERROR: %s has wrong %s hash:\n" "${base}" "${_h}" >&2
|
||||
printf "ERROR: expected: %s\n" "${_known}" >&2
|
||||
printf "ERROR: got : %s\n" "${_hash}" >&2
|
||||
printf "ERROR: Incomplete download, or man-in-the-middle (MITM) attack\n" >&2
|
||||
|
||||
exit 2
|
||||
}
|
||||
|
||||
# Do we know one or more hashes for that file?
|
||||
nb_h_files=0
|
||||
nb_checks=0
|
||||
for h_file in "${h_files[@]}"; do
|
||||
[ -f "${h_file}" ] || continue
|
||||
: $((nb_h_files++))
|
||||
# shellcheck disable=SC2094 # we're really reading it only once
|
||||
while read -r t h f; do
|
||||
case "${t}" in
|
||||
''|'#'*)
|
||||
# Skip comments and empty lines
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
if [ "${f}" = "${base}" ]; then
|
||||
# shellcheck disable=SC2094 # we're only printing the h_file filename
|
||||
check_one_hash "${t}" "${h}" "${file}" "${h_file}"
|
||||
: $((nb_checks++))
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done <"${h_file}"
|
||||
done
|
||||
|
||||
# shellcheck disable=SC2086 # nb_h_files is a non-empty int
|
||||
if [ ${nb_h_files} -eq 0 ]; then
|
||||
printf "WARNING: no hash file for %s\n" "${base}" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086 # nb_checks is a non-empty int
|
||||
if [ ${nb_checks} -eq 0 ]; then
|
||||
case " ${BR_NO_CHECK_HASH_FOR} " in
|
||||
*" ${base} "*)
|
||||
# File explicitly has no hash
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
printf "ERROR: No hash found for %s\n" "${base}" >&2
|
||||
exit 3
|
||||
fi
|
||||
70
buildroot-2024.02/support/download/cvs
Executable file
70
buildroot-2024.02/support/download/cvs
Executable file
@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# We want to catch any unexpected failure, and exit immediately
|
||||
set -e
|
||||
|
||||
# Download helper for cvs, to be called from the download wrapper script
|
||||
#
|
||||
# Options:
|
||||
# -q Be quiet
|
||||
# -o FILE Generate archive in FILE.
|
||||
# -u URI Checkout from repository at URI.
|
||||
# -c REV Use revision REV.
|
||||
# -N RAWNAME Use rawname (aka module name) RAWNAME.
|
||||
# -n NAME Use basename NAME.
|
||||
#
|
||||
# Environment:
|
||||
# CVS : the cvs command to call
|
||||
|
||||
quiet=
|
||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||
case "${OPT}" in
|
||||
q) quiet=-Q;;
|
||||
o) output="${OPTARG}";;
|
||||
u) uri="${OPTARG#*://}";;
|
||||
c) rev="${OPTARG}";;
|
||||
N) rawname="${OPTARG}";;
|
||||
n) basename="${OPTARG}";;
|
||||
:) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;;
|
||||
\?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1)) # Get rid of our options
|
||||
|
||||
# Caller needs to single-quote its arguments to prevent them from
|
||||
# being expanded a second time (in case there are spaces in them).
|
||||
# If the CVS server is deadlocked, the client will never return (cfr.
|
||||
# http://autobuild.buildroot.net/results/23d/23d1034b33d0354de15de2ec4a8ccd0603e8db78/build-end.log
|
||||
# ). Since nobody sane will put large code bases in CVS, a timeout of
|
||||
# 10 minutes should do the trick.
|
||||
_cvs() {
|
||||
if [ -z "${quiet}" ]; then
|
||||
printf '%s ' timeout 10m ${CVS} "${@}"; printf '\n'
|
||||
fi
|
||||
_plain_cvs "$@"
|
||||
}
|
||||
# Note: please keep command below aligned with what is printed above
|
||||
_plain_cvs() {
|
||||
eval timeout 10m ${CVS} "${@}"
|
||||
}
|
||||
|
||||
if [[ ${rev} =~ ^[0-9] ]]; then
|
||||
# Date, because a tag or a branch cannot begin with a number
|
||||
select="-D"
|
||||
else
|
||||
# Tag or branch
|
||||
select="-r"
|
||||
fi
|
||||
|
||||
# The absence of an initial : on ${uri} means access method undefined
|
||||
if [[ ! "${uri}" =~ ^: ]]; then
|
||||
# defaults to anonymous pserver
|
||||
uri=":pserver:anonymous@${uri}"
|
||||
fi
|
||||
|
||||
export TZ=UTC
|
||||
_cvs ${quiet} -z3 -d"'${uri}'" \
|
||||
co "${@}" -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'"
|
||||
|
||||
tar czf "${output}" "${basename}"
|
||||
233
buildroot-2024.02/support/download/dl-wrapper
Executable file
233
buildroot-2024.02/support/download/dl-wrapper
Executable file
@ -0,0 +1,233 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is a wrapper to the other download backends.
|
||||
# Its role is to ensure atomicity when saving downloaded files
|
||||
# back to BR2_DL_DIR, and not clutter BR2_DL_DIR with partial,
|
||||
# failed downloads.
|
||||
|
||||
# To avoid cluttering BR2_DL_DIR, we download to a trashable
|
||||
# location, namely in $(BUILD_DIR).
|
||||
# Then, we move the downloaded file to a temporary file in the
|
||||
# same directory as the final output file.
|
||||
# This allows us to finally atomically rename it to its final
|
||||
# name.
|
||||
# If anything goes wrong, we just remove all the temporaries
|
||||
# created so far.
|
||||
|
||||
# We want to catch any unexpected failure, and exit immediately.
|
||||
set -e
|
||||
|
||||
export BR_BACKEND_DL_GETOPTS=":hc:d:o:n:N:H:lru:qf:e"
|
||||
|
||||
main() {
|
||||
local OPT OPTARG
|
||||
local backend output large_file recurse quiet rc
|
||||
local -a uris hfiles
|
||||
|
||||
# Parse our options; anything after '--' is for the backend
|
||||
while getopts ":c:d:D:o:n:N:H:lrf:u:qp:" OPT; do
|
||||
case "${OPT}" in
|
||||
c) cset="${OPTARG}";;
|
||||
d) dl_dir="${OPTARG}";;
|
||||
D) old_dl_dir="${OPTARG}";;
|
||||
o) output="${OPTARG}";;
|
||||
n) raw_base_name="${OPTARG}";;
|
||||
N) base_name="${OPTARG}";;
|
||||
H) hfiles+=( "${OPTARG}" );;
|
||||
l) large_file="-l";;
|
||||
r) recurse="-r";;
|
||||
f) filename="${OPTARG}";;
|
||||
u) uris+=( "${OPTARG}" );;
|
||||
p) post_process="${OPTARG}";;
|
||||
q) quiet="-q";;
|
||||
:) error "option '%s' expects a mandatory argument\n" "${OPTARG}";;
|
||||
\?) error "unknown option '%s'\n" "${OPTARG}";;
|
||||
esac
|
||||
done
|
||||
|
||||
# Forget our options, and keep only those for the backend
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [ -z "${output}" ]; then
|
||||
error "no output specified, use -o\n"
|
||||
fi
|
||||
|
||||
# Legacy handling: check if the file already exists in the global
|
||||
# download directory. If it does, hard-link it. If it turns out it
|
||||
# was an incorrect download, we'd still check it below anyway.
|
||||
# If we can neither link nor copy, fallback to doing a download.
|
||||
# NOTE! This is not atomic, is subject to TOCTTOU, but the whole
|
||||
# dl-wrapper runs under an flock, so we're safe.
|
||||
if [ ! -e "${output}" -a -e "${old_dl_dir}/${filename}" ]; then
|
||||
ln "${old_dl_dir}/${filename}" "${output}" || \
|
||||
cp "${old_dl_dir}/${filename}" "${output}" || \
|
||||
true
|
||||
fi
|
||||
|
||||
# If the output file already exists and:
|
||||
# - there's no .hash file: do not download it again and exit promptly
|
||||
# - matches all its hashes: do not download it again and exit promptly
|
||||
# - fails at least one of its hashes: force a re-download
|
||||
# - there's no hash (but a .hash file): consider it a hard error
|
||||
if [ -e "${output}" ]; then
|
||||
if support/download/check-hash ${quiet} "${output}" "${output##*/}" "${hfiles[@]}"; then
|
||||
exit 0
|
||||
elif [ ${?} -ne 2 ]; then
|
||||
# Do not remove the file, otherwise it might get re-downloaded
|
||||
# from a later location (i.e. primary -> upstream -> mirror).
|
||||
# Do not print a message, check-hash already did.
|
||||
exit 1
|
||||
fi
|
||||
rm -f "${output}"
|
||||
warn "Re-downloading '%s'...\n" "${output##*/}"
|
||||
fi
|
||||
|
||||
# Look through all the uris that we were given to download the package
|
||||
# source
|
||||
download_and_check=0
|
||||
rc=1
|
||||
for uri in "${uris[@]}"; do
|
||||
backend_urlencode="${uri%%+*}"
|
||||
backend="${backend_urlencode%|*}"
|
||||
case "${backend}" in
|
||||
git|svn|cvs|bzr|file|scp|hg|sftp) ;;
|
||||
*) backend="wget" ;;
|
||||
esac
|
||||
uri=${uri#*+}
|
||||
|
||||
urlencode=${backend_urlencode#*|}
|
||||
# urlencode must be "urlencode"
|
||||
[ "${urlencode}" != "urlencode" ] && urlencode=""
|
||||
|
||||
# tmpd is a temporary directory in which backends may store
|
||||
# intermediate by-products of the download.
|
||||
# tmpf is the file in which the backends should put the downloaded
|
||||
# content.
|
||||
# tmpd is located in $(BUILD_DIR), so as not to clutter the (precious)
|
||||
# $(BR2_DL_DIR)
|
||||
# We let the backends create tmpf, so they are able to set whatever
|
||||
# permission bits they want (although we're only really interested in
|
||||
# the executable bit.)
|
||||
tmpd="$(mktemp -d "${BUILD_DIR}/.${output##*/}.XXXXXX")"
|
||||
tmpf="${tmpd}/output"
|
||||
|
||||
# Helpers expect to run in a directory that is *really* trashable, so
|
||||
# they are free to create whatever files and/or sub-dirs they might need.
|
||||
# Doing the 'cd' here rather than in all backends is easier.
|
||||
cd "${tmpd}"
|
||||
|
||||
# If the backend fails, we can just remove the content of the temporary
|
||||
# directory to remove all the cruft it may have left behind, and try
|
||||
# the next URI until it succeeds. Once out of URI to try, we need to
|
||||
# cleanup and exit.
|
||||
if ! "${OLDPWD}/support/download/${backend}" \
|
||||
$([ -n "${urlencode}" ] && printf %s '-e') \
|
||||
-c "${cset}" \
|
||||
-d "${dl_dir}" \
|
||||
-n "${raw_base_name}" \
|
||||
-N "${base_name}" \
|
||||
-f "${filename}" \
|
||||
-u "${uri}" \
|
||||
-o "${tmpf}" \
|
||||
${quiet} ${large_file} ${recurse} -- "${@}"
|
||||
then
|
||||
# cd back to keep path coherence
|
||||
cd "${OLDPWD}"
|
||||
rm -rf "${tmpd}"
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ -n "${post_process}" ] ; then
|
||||
if ! "${OLDPWD}/support/download/${post_process}-post-process" \
|
||||
-o "${tmpf}" \
|
||||
-n "${raw_base_name}"
|
||||
then
|
||||
# cd back to keep path coherence
|
||||
cd "${OLDPWD}"
|
||||
rm -rf "${tmpd}"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# cd back to free the temp-dir, so we can remove it later
|
||||
cd "${OLDPWD}"
|
||||
|
||||
# Check if the downloaded file is sane, and matches the stored hashes
|
||||
# for that file
|
||||
if support/download/check-hash ${quiet} "${tmpf}" "${output##*/}" "${hfiles[@]}"; then
|
||||
rc=0
|
||||
else
|
||||
if [ ${?} -ne 3 ]; then
|
||||
rm -rf "${tmpd}"
|
||||
continue
|
||||
fi
|
||||
|
||||
# the hash file exists and there was no hash to check the file
|
||||
# against
|
||||
rc=1
|
||||
fi
|
||||
download_and_check=1
|
||||
break
|
||||
done
|
||||
|
||||
# We tried every URI possible, none seems to work or to check against the
|
||||
# available hash. *ABORT MISSION*
|
||||
if [ "${download_and_check}" -eq 0 ]; then
|
||||
rm -rf "${tmpd}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# tmp_output is in the same directory as the final output, so we can
|
||||
# later move it atomically.
|
||||
tmp_output="$(mktemp "${output}.XXXXXX")"
|
||||
|
||||
# 'mktemp' creates files with 'go=-rwx', so the files are not accessible
|
||||
# to users other than the one doing the download (and root, of course).
|
||||
# This can be problematic when a shared BR2_DL_DIR is used by different
|
||||
# users (e.g. on a build server), where all users may write to the shared
|
||||
# location, since other users would not be allowed to read the files
|
||||
# another user downloaded.
|
||||
# So, we restore the 'go' access rights to a more sensible value, while
|
||||
# still abiding by the current user's umask. We must do that before the
|
||||
# final 'mv', so just do it now.
|
||||
# Some backends (cp and scp) may create executable files, so we need to
|
||||
# carry the executable bit if needed.
|
||||
[ -x "${tmpf}" ] && new_mode=755 || new_mode=644
|
||||
new_mode=$(printf "%04o" $((0${new_mode} & ~0$(umask))))
|
||||
chmod ${new_mode} "${tmp_output}"
|
||||
|
||||
# We must *not* unlink tmp_output, otherwise there is a small window
|
||||
# during which another download process may create the same tmp_output
|
||||
# name (very, very unlikely; but not impossible.)
|
||||
# Using 'cp' is not reliable, since 'cp' may unlink the destination file
|
||||
# if it is unable to open it with O_WRONLY|O_TRUNC; see:
|
||||
# http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html
|
||||
# Since the destination filesystem can be anything, it might not support
|
||||
# O_TRUNC, so 'cp' would unlink it first.
|
||||
# Use 'cat' and append-redirection '>>' to save to the final location,
|
||||
# since that is the only way we can be 100% sure of the behaviour.
|
||||
if ! cat "${tmpf}" >>"${tmp_output}"; then
|
||||
rm -rf "${tmpd}" "${tmp_output}"
|
||||
exit 1
|
||||
fi
|
||||
rm -rf "${tmpd}"
|
||||
|
||||
# tmp_output and output are on the same filesystem, so POSIX guarantees
|
||||
# that 'mv' is atomic, because it then uses rename() that POSIX mandates
|
||||
# to be atomic, see:
|
||||
# http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html
|
||||
if ! mv -f "${tmp_output}" "${output}"; then
|
||||
rm -f "${tmp_output}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
return ${rc}
|
||||
}
|
||||
|
||||
trace() { local msg="${1}"; shift; printf "%s: ${msg}" "${my_name}" "${@}"; }
|
||||
warn() { trace "${@}" >&2; }
|
||||
errorN() { local ret="${1}"; shift; warn "${@}"; exit ${ret}; }
|
||||
error() { errorN 1 "${@}"; }
|
||||
|
||||
my_name="${0##*/}"
|
||||
main "${@}"
|
||||
49
buildroot-2024.02/support/download/file
Executable file
49
buildroot-2024.02/support/download/file
Executable file
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# We want to catch any unexpected failure, and exit immediately
|
||||
set -e
|
||||
|
||||
# Download helper for cp, to be called from the download wrapper script
|
||||
#
|
||||
# Options:
|
||||
# -q Be quiet.
|
||||
# -o FILE Copy to file FILE.
|
||||
# -f FILE Copy from basename file FILE.
|
||||
# -u DIR Copy from FILE in DIR.
|
||||
#
|
||||
# Environment:
|
||||
# LOCALFILES: the cp command to call
|
||||
|
||||
# 'cp' usually does not print anything on its stdout, whereas the
|
||||
# other download backends, even if not verbose, at least print some
|
||||
# progress information.
|
||||
# Make 'cp' verbose by default, so it behaves a bit like the others.
|
||||
verbose=-v
|
||||
|
||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||
case "${OPT}" in
|
||||
q) verbose=;;
|
||||
o) output="${OPTARG}";;
|
||||
f) file="${OPTARG}";;
|
||||
u) dir="${OPTARG}";;
|
||||
:) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;;
|
||||
\?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1)) # Get rid of our options
|
||||
|
||||
# Caller needs to single-quote its arguments to prevent them from
|
||||
# being expanded a second time (in case there are spaces in them)
|
||||
_localfiles() {
|
||||
if [ -n "${verbose}" ]; then
|
||||
printf '%s ' ${LOCALFILES} "${@}"; printf '\n'
|
||||
fi
|
||||
_plain_localfiles "$@"
|
||||
}
|
||||
# Note: please keep command below aligned with what is printed above
|
||||
_plain_localfiles() {
|
||||
eval ${LOCALFILES} "${@}"
|
||||
}
|
||||
|
||||
_localfiles ${verbose} "'${dir##file://}/${file}'" "'${output}'"
|
||||
237
buildroot-2024.02/support/download/git
Executable file
237
buildroot-2024.02/support/download/git
Executable file
@ -0,0 +1,237 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# NOTE: if the output of this backend has to change (e.g. we change what gets
|
||||
# included in the archive (e.g. LFS), or we change the format of the archive
|
||||
# (e.g. tar options, compression ratio or method)), we MUST update the format
|
||||
# version in the variable BR_FMT_VERSION_git, in package/pkg-download.mk.
|
||||
|
||||
# We want to catch any unexpected failure
|
||||
set -e
|
||||
|
||||
# Download helper for git, to be called from the download wrapper script
|
||||
#
|
||||
# Options:
|
||||
# -q Be quiet.
|
||||
# -r Clone and archive sub-modules.
|
||||
# -o FILE Generate archive in FILE.
|
||||
# -u URI Clone from repository at URI.
|
||||
# -c CSET Use changeset CSET.
|
||||
# -n NAME Use basename NAME.
|
||||
#
|
||||
# Environment:
|
||||
# GIT : the git command to call
|
||||
|
||||
# shellcheck disable=SC1090 # Only provides mk_tar_gz()
|
||||
. "${0%/*}/helpers"
|
||||
|
||||
# Save our path and options in case we need to call ourselves again
|
||||
myname="${0}"
|
||||
declare -a OPTS=("${@}")
|
||||
|
||||
# This function is called when an error occurs. Its job is to attempt a
|
||||
# clone from scratch (only once!) in case the git tree is borked, or in
|
||||
# case an unexpected and unsupported situation arises with submodules
|
||||
# or uncommitted stuff (e.g. if the user manually mucked around in the
|
||||
# git cache).
|
||||
_on_error() {
|
||||
local ret=${?}
|
||||
|
||||
printf "Detected a corrupted git cache.\n" >&2
|
||||
if ${BR_GIT_BACKEND_FIRST_FAULT:-false}; then
|
||||
printf "This is the second time in a row; bailing out\n" >&2
|
||||
exit ${ret}
|
||||
fi
|
||||
export BR_GIT_BACKEND_FIRST_FAULT=true
|
||||
|
||||
printf "Removing it and starting afresh.\n" >&2
|
||||
|
||||
popd >/dev/null
|
||||
rm -rf "${git_cache}"
|
||||
|
||||
exec "${myname}" "${OPTS[@]}" || exit ${ret}
|
||||
}
|
||||
|
||||
quiet=
|
||||
large_file=0
|
||||
recurse=0
|
||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||
case "${OPT}" in
|
||||
q) quiet=-q; exec >/dev/null;;
|
||||
l) large_file=1;;
|
||||
r) recurse=1;;
|
||||
o) output="${OPTARG}";;
|
||||
u) uri="${OPTARG}";;
|
||||
c) cset="${OPTARG}";;
|
||||
d) dl_dir="${OPTARG}";;
|
||||
n) basename="${OPTARG}";;
|
||||
:) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;;
|
||||
\?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1)) # Get rid of our options
|
||||
|
||||
# Create and cd into the directory that will contain the local git cache
|
||||
git_cache="${dl_dir}/git"
|
||||
mkdir -p "${git_cache}"
|
||||
pushd "${git_cache}" >/dev/null
|
||||
|
||||
# Any error now should try to recover
|
||||
trap _on_error ERR
|
||||
set -E
|
||||
|
||||
# Caller needs to single-quote its arguments to prevent them from
|
||||
# being expanded a second time (in case there are spaces in them)
|
||||
_git() {
|
||||
if [ -z "${quiet}" ]; then
|
||||
printf '%s ' GIT_DIR="${git_cache}/.git" "${GIT}" "${@}"; printf '\n'
|
||||
fi
|
||||
_plain_git "$@"
|
||||
}
|
||||
# Note: please keep command below aligned with what is printed above
|
||||
_plain_git() {
|
||||
# shellcheck disable=SC2086 # We want word-splitting for GIT
|
||||
eval GIT_DIR="${git_cache}/.git" ${GIT} "${@}"
|
||||
}
|
||||
|
||||
# Create a warning file, that the user should not use the git cache.
|
||||
# It's ours. Our precious.
|
||||
cat <<-_EOF_ >"${dl_dir}/git.readme"
|
||||
IMPORTANT NOTE!
|
||||
|
||||
The git tree located in this directory is for the exclusive use
|
||||
by Buildroot, which uses it as a local cache to reduce bandwidth
|
||||
usage.
|
||||
|
||||
Buildroot *will* trash any changes in that tree whenever it needs
|
||||
to use it. Buildroot may even remove it in case it detects the
|
||||
repository may have been damaged or corrupted.
|
||||
|
||||
Do *not* work in that directory; your changes will eventually get
|
||||
lost. Do *not* even use it as a remote, or as the source for new
|
||||
worktrees; your commits will eventually get lost.
|
||||
_EOF_
|
||||
|
||||
# Initialise a repository in the git cache. If the repository already
|
||||
# existed, this is a noop, unless the repository was broken, in which
|
||||
# case this magically restores it to working conditions. In the latter
|
||||
# case, we might be missing blobs, but that's not a problem: we'll
|
||||
# fetch what we need later anyway.
|
||||
#
|
||||
# We can still go through the wrapper, because 'init' does not use the
|
||||
# path pointed to by GIT_DIR, but really uses the directory passed as
|
||||
# argument.
|
||||
_git init .
|
||||
|
||||
# Ensure the repo has an origin (in case a previous run was killed).
|
||||
if ! _plain_git remote |grep -q -E '^origin$'; then
|
||||
_git remote add origin "'${uri}'"
|
||||
fi
|
||||
|
||||
_git remote set-url origin "'${uri}'"
|
||||
|
||||
printf "Fetching all references\n"
|
||||
_git fetch origin
|
||||
_git fetch origin -t
|
||||
|
||||
# Try to get the special refs exposed by some forges (pull-requests for
|
||||
# github, changes for gerrit...). There is no easy way to know whether
|
||||
# the cset the user passed us is such a special ref or a tag or a sha1
|
||||
# or whatever else. We'll eventually fail at checking out that cset,
|
||||
# below, if there is an issue anyway. Since most of the cset we're gonna
|
||||
# have to clone are not such special refs, consign the output to oblivion
|
||||
# so as not to alarm unsuspecting users, but still trace it as a warning.
|
||||
if ! _git fetch origin "'${cset}:${cset}'" >/dev/null 2>&1; then
|
||||
printf "Could not fetch special ref '%s'; assuming it is not special.\n" "${cset}"
|
||||
fi
|
||||
|
||||
# Check that the changeset does exist. If it does not, re-cloning from
|
||||
# scratch won't help, so we don't want to trash the repository for a
|
||||
# missing commit. We just exit without going through the ERR trap.
|
||||
if ! _git rev-parse --quiet --verify "'${cset}^{commit}'" >/dev/null 2>&1; then
|
||||
printf "Commit '%s' does not exist in this repository.\n" "${cset}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# The new cset we want to checkout might have different submodules, or
|
||||
# have sub-dirs converted to/from a submodule. So we would need to
|
||||
# deregister _current_ submodules before we checkout.
|
||||
#
|
||||
# Using "git submodule deinit --all" would remove all the files for
|
||||
# all submodules, including the corresponding .git files or directories.
|
||||
# However, it was only introduced with git-1.8.3, which is too recent
|
||||
# for some enterprise-grade distros.
|
||||
#
|
||||
# So, we fall-back to just removing all submodules directories. We do
|
||||
# not need to be recursive, as removing a submodule will de-facto remove
|
||||
# its own submodules.
|
||||
#
|
||||
# For recent git versions, the repository for submodules is stored
|
||||
# inside the repository of the super repository, so the following will
|
||||
# only remove the working copies of submodules, effectively caching the
|
||||
# submodules.
|
||||
#
|
||||
# For older versions however, the repository is stored in the .git/ of
|
||||
# the submodule directory, so the following will effectively remove the
|
||||
# the working copy as well as the repository, which means submodules
|
||||
# will not be cached for older versions.
|
||||
#
|
||||
# shellcheck disable=SC2016 # Will be expanded by git-foreach
|
||||
cmd='printf "Deregistering submodule \"%s\"\n" "${path}" && cd .. && rm -rf "${path##*/}"'
|
||||
_git submodule --quiet foreach "'${cmd}'"
|
||||
|
||||
# Checkout the required changeset, so that we can update the required
|
||||
# submodules.
|
||||
_git checkout -f -q "'${cset}'"
|
||||
|
||||
# Get rid of now-untracked directories (in case a git operation was
|
||||
# interrupted in a previous run, or to get rid of empty directories
|
||||
# that were parents of submodules removed above).
|
||||
_git clean -ffdx
|
||||
|
||||
# Get date of commit to generate a reproducible archive.
|
||||
# %ci is ISO 8601, so it's fully qualified, with TZ and all.
|
||||
date="$( _plain_git log -1 --pretty=format:%ci )"
|
||||
|
||||
# There might be submodules, so fetch them.
|
||||
if [ ${recurse} -eq 1 ]; then
|
||||
_git submodule update --init --recursive
|
||||
|
||||
# Older versions of git will store the absolute path of the git tree
|
||||
# in the .git of submodules, while newer versions just use relative
|
||||
# paths. Detect and fix the older variants to use relative paths, so
|
||||
# that the archives are reproducible across a wider range of git
|
||||
# versions. However, we can't do that if git is too old and uses
|
||||
# full repositories for submodules.
|
||||
# shellcheck disable=SC2016 # Will be expanded by git-foreach
|
||||
cmd='printf "%s\n" "${path}/"'
|
||||
for module_dir in $( _plain_git submodule --quiet foreach "'${cmd}'" ); do
|
||||
[ -f "${module_dir}/.git" ] || continue
|
||||
relative_dir="$( sed -r -e 's,/+,/,g; s,[^/]+/,../,g' <<<"${module_dir}" )"
|
||||
sed -r -i -e "s:^gitdir\: $(pwd)/:gitdir\: ${relative_dir}:" "${module_dir}/.git"
|
||||
done
|
||||
fi
|
||||
|
||||
# If there are large files then fetch them.
|
||||
if [ ${large_file} -eq 1 ]; then
|
||||
_git lfs install --local
|
||||
_git lfs fetch
|
||||
_git lfs checkout
|
||||
# If there are also submodules, recurse into them,
|
||||
# shellcheck disable=SC2086 # We want word-splitting for GIT
|
||||
if [ ${recurse} -eq 1 ]; then
|
||||
_git submodule foreach --recursive ${GIT} lfs install --local
|
||||
_git submodule foreach --recursive ${GIT} lfs fetch
|
||||
_git submodule foreach --recursive ${GIT} lfs checkout
|
||||
fi
|
||||
fi
|
||||
|
||||
popd >/dev/null
|
||||
|
||||
# Generate the archive.
|
||||
# We do not want the .git dir; we keep other .git files, in case they are the
|
||||
# only files in their directory.
|
||||
# The .git dir would generate non reproducible tarballs as it depends on
|
||||
# the state of the remote server. It also would generate large tarballs
|
||||
# (gigabytes for some linux trees) when a full clone took place.
|
||||
mk_tar_gz "${git_cache}" "${basename}" "${date}" "${output}" ".git/*"
|
||||
35
buildroot-2024.02/support/download/go-post-process
Executable file
35
buildroot-2024.02/support/download/go-post-process
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
. "${0%/*}/helpers"
|
||||
|
||||
# Parse our options
|
||||
while getopts "n:o:" OPT; do
|
||||
case "${OPT}" in
|
||||
o) output="${OPTARG}";;
|
||||
n) base_name="${OPTARG}";;
|
||||
:) error "option '%s' expects a mandatory argument\n" "${OPTARG}";;
|
||||
\?) error "unknown option '%s'\n" "${OPTARG}";;
|
||||
esac
|
||||
done
|
||||
|
||||
# Already vendored tarball, nothing to do
|
||||
if tar tf "${output}" | grep -q "^[^/]*/vendor" ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
post_process_unpack "${base_name}" "${output}"
|
||||
|
||||
# Do the Go vendoring
|
||||
pushd "${base_name}" > /dev/null
|
||||
|
||||
if [ ! -f go.mod ]; then
|
||||
echo "ERROR: no vendor/ folder and no go.mod, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
go mod vendor -v -modcacherw
|
||||
popd > /dev/null
|
||||
|
||||
post_process_repack $(pwd) "${base_name}" "${output}"
|
||||
98
buildroot-2024.02/support/download/helpers
Executable file
98
buildroot-2024.02/support/download/helpers
Executable file
@ -0,0 +1,98 @@
|
||||
# Generate a reproducible archive from the content of a directory
|
||||
#
|
||||
# $1 : input directory
|
||||
# $2 : leading component in archive
|
||||
# $3 : ISO8601 date: YYYY-MM-DDThh:mm:ssZZ
|
||||
# $4 : output file
|
||||
# $5... : globs of filenames to exclude from the archive, suitable for
|
||||
# find's -path option, and relative to the input directory $1
|
||||
#
|
||||
# Notes :
|
||||
# - the timestamp is internally rounded to the highest entire second
|
||||
# less than or equal to the timestamp (i.e. any sub-second fractional
|
||||
# part is ignored)
|
||||
# - must not be called with CWD as, or below, the input directory
|
||||
# - some temporary files are created in CWD, and removed at the end
|
||||
#
|
||||
# Example:
|
||||
# $ find /path/to/temp/dir
|
||||
# /path/to/temp/dir/
|
||||
# /path/to/temp/dir/some-file
|
||||
# /path/to/temp/dir/some-dir/
|
||||
# /path/to/temp/dir/some-dir/some-other-file
|
||||
#
|
||||
# $ mk_tar_gz /path/to/some/dir \
|
||||
# foo_bar-1.2.3 \
|
||||
# 1970-01-01T00:00:00Z \
|
||||
# /path/to/foo.tar.gz \
|
||||
# '.git/*' '.svn/*'
|
||||
#
|
||||
# $ tar tzf /path/to/foo.tar.gz
|
||||
# foo_bar-1.2.3/some-file
|
||||
# foo_bar-1.2.3/some-dir/some-other-file
|
||||
#
|
||||
mk_tar_gz() {
|
||||
local in_dir="${1}"
|
||||
local base_dir="${2}"
|
||||
local date="${3}"
|
||||
local out="${4}"
|
||||
shift 4
|
||||
local glob tmp pax_options
|
||||
local -a find_opts
|
||||
|
||||
for glob; do
|
||||
find_opts+=( -or -path "./${glob#./}" )
|
||||
done
|
||||
|
||||
# Drop sub-second precision to play nice with GNU tar's valid_timespec check
|
||||
date="$(date -d "${date}" -u +%Y-%m-%dT%H:%M:%S+00:00)"
|
||||
|
||||
pax_options="delete=atime,delete=ctime,delete=mtime"
|
||||
pax_options+=",exthdr.name=%d/PaxHeaders/%f,exthdr.mtime={${date}}"
|
||||
|
||||
tmp="$(mktemp --tmpdir="$(pwd)")"
|
||||
pushd "${in_dir}" >/dev/null
|
||||
|
||||
# Establish list
|
||||
find . -not -type d -and -not \( -false "${find_opts[@]}" \) >"${tmp}.list"
|
||||
# Sort list for reproducibility
|
||||
LC_ALL=C sort <"${tmp}.list" >"${tmp}.sorted"
|
||||
|
||||
# Create POSIX tarballs, since that's the format the most reproducible
|
||||
tar cf - --transform="s#^\./#${base_dir}/#S" \
|
||||
--numeric-owner --owner=0 --group=0 --mtime="${date}" \
|
||||
--format=posix --pax-option="${pax_options}" \
|
||||
-T "${tmp}.sorted" >"${tmp}.tar"
|
||||
|
||||
# Compress the archive
|
||||
gzip -6 -n <"${tmp}.tar" >"${out}"
|
||||
|
||||
rm -f "${tmp}"{.list,.sorted,.tar}
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
post_process_unpack() {
|
||||
local dest="${1}"
|
||||
local tarball="${2}"
|
||||
local one_file
|
||||
|
||||
mkdir "${dest}"
|
||||
tar -C "${dest}" --strip-components=1 -xzf "${tarball}"
|
||||
one_file="$(find "${dest}" -type f -print0 |LC_ALL=C sort -z |sed 's/\x0.*//')"
|
||||
touch -r "${one_file}" "${dest}.timestamp"
|
||||
}
|
||||
|
||||
post_process_repack() {
|
||||
local in_dir="${1}"
|
||||
local base_dir="${2}"
|
||||
local out="${3}"
|
||||
local date
|
||||
|
||||
date="@$(stat -c '%Y' "${in_dir}/${base_dir}.timestamp")"
|
||||
|
||||
mk_tar_gz "${in_dir}/${base_dir}" "${base_dir}" "${date}" "${out}"
|
||||
}
|
||||
|
||||
# Keep this line and the following as last lines in this file.
|
||||
# vim: ft=bash
|
||||
50
buildroot-2024.02/support/download/hg
Executable file
50
buildroot-2024.02/support/download/hg
Executable file
@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# We want to catch any unexpected failure, and exit immediately
|
||||
set -e
|
||||
|
||||
# Download helper for hg, to be called from the download wrapper script
|
||||
#
|
||||
# Options:
|
||||
# -q Be quiet.
|
||||
# -o FILE Generate archive in FILE.
|
||||
# -u URI Clone from repository at URI.
|
||||
# -c CSET Use changeset (or revision) CSET.
|
||||
# -n NAME Use basename NAME.
|
||||
#
|
||||
# Environment:
|
||||
# HG : the hg command to call
|
||||
|
||||
quiet=
|
||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||
case "${OPT}" in
|
||||
q) quiet=-q;;
|
||||
o) output="${OPTARG}";;
|
||||
u) uri="${OPTARG}";;
|
||||
c) cset="${OPTARG}";;
|
||||
n) basename="${OPTARG}";;
|
||||
:) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;;
|
||||
\?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1)) # Get rid of our options
|
||||
|
||||
# Caller needs to single-quote its arguments to prevent them from
|
||||
# being expanded a second time (in case there are spaces in them)
|
||||
_hg() {
|
||||
if [ -z "${quiet}" ]; then
|
||||
printf '%s ' ${HG} "${@}"; printf '\n'
|
||||
fi
|
||||
_plain_hg "$@"
|
||||
}
|
||||
# Note: please keep command below aligned with what is printed above
|
||||
_plain_hg() {
|
||||
eval ${HG} "${@}"
|
||||
}
|
||||
|
||||
_hg clone ${quiet} "${@}" --noupdate "'${uri}'" "'${basename}'"
|
||||
|
||||
_plain_hg archive ${quiet} --repository "'${basename}'" --type tgz \
|
||||
--prefix "'${basename}'" --rev "'${cset}'" \
|
||||
- >"${output}"
|
||||
47
buildroot-2024.02/support/download/scp
Executable file
47
buildroot-2024.02/support/download/scp
Executable file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# We want to catch any unexpected failure, and exit immediately
|
||||
set -e
|
||||
|
||||
# Download helper for scp, to be called from the download wrapper script
|
||||
#
|
||||
# Options:
|
||||
# -q Be quiet.
|
||||
# -o FILE Copy to local file FILE.
|
||||
# -f FILE Copy from remote file FILE.
|
||||
# -u URI Download file at URI.
|
||||
#
|
||||
# Environment:
|
||||
# SCP : the scp command to call
|
||||
|
||||
quiet=
|
||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||
case "${OPT}" in
|
||||
q) quiet=-q;;
|
||||
o) output="${OPTARG}";;
|
||||
f) filename="${OPTARG}";;
|
||||
u) uri="${OPTARG}";;
|
||||
:) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;;
|
||||
\?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1)) # Get rid of our options
|
||||
|
||||
# Caller needs to single-quote its arguments to prevent them from
|
||||
# being expanded a second time (in case there are spaces in them)
|
||||
_scp() {
|
||||
if [ -z "${quiet}" ]; then
|
||||
printf '%s ' ${SCP} "${@}"; printf '\n'
|
||||
fi
|
||||
_plain_scp "$@"
|
||||
}
|
||||
# Note: please keep command below aligned with what is printed above
|
||||
_plain_scp() {
|
||||
eval ${SCP} "${@}"
|
||||
}
|
||||
|
||||
# Remove any scheme prefix
|
||||
uri="${uri##scp://}"
|
||||
|
||||
_scp ${quiet} "${@}" "'${uri}/${filename}'" "'${output}'"
|
||||
41
buildroot-2024.02/support/download/sftp
Executable file
41
buildroot-2024.02/support/download/sftp
Executable file
@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# We want to catch any unexpected failure, and exit immediately
|
||||
set -e
|
||||
|
||||
# Download helper for sftp, to be called from the download wrapper script
|
||||
#
|
||||
# Options:
|
||||
# -q Be quiet.
|
||||
# -o FILE Copy to local file FILE.
|
||||
# -f FILE Copy from remote file FILE.
|
||||
# -u URI Download file at URI.
|
||||
#
|
||||
# Environment:
|
||||
# SFTP : the sftp command to call
|
||||
|
||||
quiet=
|
||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||
case "${OPT}" in
|
||||
q) quiet=-q;;
|
||||
o) output="${OPTARG}";;
|
||||
f) filename="${OPTARG}";;
|
||||
u) uri="${OPTARG}";;
|
||||
:) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;;
|
||||
\?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1)) # Get rid of our options
|
||||
|
||||
# Caller needs to single-quote its arguments to prevent them from
|
||||
# being expanded a second time (in case there are spaces in them)
|
||||
_sftp() {
|
||||
if [ -z "${quiet}" ]; then
|
||||
printf '%s ' ${SFTP} "${@}"; printf '\n'
|
||||
fi
|
||||
# Note: please keep command below aligned with what is printed above
|
||||
eval ${SFTP} "${@}"
|
||||
}
|
||||
|
||||
_sftp ${quiet} "${@}" "'${uri}/${filename}'" "'${output}'"
|
||||
89
buildroot-2024.02/support/download/svn
Executable file
89
buildroot-2024.02/support/download/svn
Executable file
@ -0,0 +1,89 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# NOTE: if the output of this backend has to change (e.g. we change what gets
|
||||
# included in the archive, or we change the format of the archive (e.g. tar
|
||||
# options, compression ratio or method)), we MUST update the format version
|
||||
# in the variable BR_FTM_VERSION_svn, in package/pkg-download.mk.
|
||||
|
||||
# We want to catch any unexpected failure, and exit immediately
|
||||
set -e
|
||||
|
||||
# Download helper for svn, to be called from the download wrapper script
|
||||
#
|
||||
# Options:
|
||||
# -q Be quiet.
|
||||
# -o FILE Generate archive in FILE.
|
||||
# -u URI Checkout from repository at URI.
|
||||
# -c REV Use revision REV.
|
||||
# -n NAME Use basename NAME.
|
||||
# -r Recursive, i.e. use externals
|
||||
#
|
||||
# Environment:
|
||||
# SVN : the svn command to call
|
||||
|
||||
# shellcheck disable=SC1090 # Only provides mk_tar_gz()
|
||||
. "${0%/*}/helpers"
|
||||
|
||||
quiet=
|
||||
externals=--ignore-externals
|
||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||
case "${OPT}" in
|
||||
q) quiet=-q;;
|
||||
o) output="${OPTARG}";;
|
||||
u) uri="${OPTARG}";;
|
||||
c) rev="${OPTARG}";;
|
||||
n) basename="${OPTARG}";;
|
||||
r) externals=;;
|
||||
:) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;;
|
||||
\?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1)) # Get rid of our options
|
||||
|
||||
# Caller needs to single-quote its arguments to prevent them from
|
||||
# being expanded a second time (in case there are spaces in them)
|
||||
_svn() {
|
||||
if [ -z "${quiet}" ]; then
|
||||
printf '%s ' "${SVN}" "${@}"; printf '\n'
|
||||
fi
|
||||
_plain_svn "$@"
|
||||
}
|
||||
# Note: please keep command below aligned with what is printed above
|
||||
_plain_svn() {
|
||||
# shellcheck disable=SC2086 # We want word-splitting for SVN
|
||||
eval ${SVN} "${@}"
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2086 # externals and quiet may be empty
|
||||
_svn export --ignore-keywords ${quiet} ${externals} "${@}" "'${uri}@${rev}'" "'${basename}'"
|
||||
|
||||
# For 'svn info', we only need the credentials, if any; other options
|
||||
# would be invalid, as they are intended for 'svn export'.
|
||||
# We can also consume the positional parameters, as we'll no longer
|
||||
# be calling any other remote-reaching svn command.
|
||||
creds=
|
||||
while [ ${#} -gt 0 ]; do
|
||||
case "${1}" in
|
||||
--username=*) creds+=" ${1}"; shift;;
|
||||
--password=*) creds+=" ${1}"; shift;;
|
||||
--username) creds+=" ${1} ${2}"; shift 2;;
|
||||
--password) creds+=" ${1} ${2}"; shift 2;;
|
||||
*) shift;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Get the date of the revision, to generate reproducible archives.
|
||||
# The output format is YYYY-MM-DDTHH:MM:SS.mmmuuuZ (i.e. always in the
|
||||
# UTC timezone), which we can feed as-is to the --mtime option for tar.
|
||||
# In case there is a redirection (e.g. http -> https), just keep the
|
||||
# last line (svn outputs everything on stdout)
|
||||
# shellcheck disable=SC2086 # creds may be empty
|
||||
date="$( _plain_svn info ${creds} "'${uri}@${rev}'" \
|
||||
|sed -r -e '/^Last Changed Date: /!d; s///'
|
||||
)"
|
||||
|
||||
# Generate the archive.
|
||||
# We did a 'svn export' above, so it's not a working copy (there is no .svn
|
||||
# directory or file to ignore).
|
||||
mk_tar_gz "${basename}" "${basename}" "${date}" "${output}"
|
||||
50
buildroot-2024.02/support/download/wget
Executable file
50
buildroot-2024.02/support/download/wget
Executable file
@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# We want to catch any unexpected failure, and exit immediately
|
||||
set -e
|
||||
|
||||
# Download helper for wget, to be called from the download wrapper script
|
||||
#
|
||||
# Options:
|
||||
# -q Be quiet.
|
||||
# -o FILE Save into file FILE.
|
||||
# -f FILENAME The filename of the tarball to get at URL
|
||||
# -u URL Download file at URL.
|
||||
# -e ENCODE Tell wget to urlencode the filename passed to it
|
||||
#
|
||||
# Environment:
|
||||
# WGET : the wget command to call
|
||||
|
||||
quiet=
|
||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||
case "${OPT}" in
|
||||
q) quiet=-q;;
|
||||
o) output="${OPTARG}";;
|
||||
f) filename="${OPTARG}";;
|
||||
u) url="${OPTARG}";;
|
||||
e) encode="-e";;
|
||||
:) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;;
|
||||
\?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1)) # Get rid of our options
|
||||
|
||||
# Caller needs to single-quote its arguments to prevent them from
|
||||
# being expanded a second time (in case there are spaces in them)
|
||||
_wget() {
|
||||
if [ -z "${quiet}" ]; then
|
||||
printf '%s ' ${WGET} "${@}"; printf '\n'
|
||||
fi
|
||||
_plain_wget "$@"
|
||||
}
|
||||
# Note: please keep command below aligned with what is printed above
|
||||
_plain_wget() {
|
||||
eval ${WGET} "${@}"
|
||||
}
|
||||
|
||||
# Replace every '?' with '%3F' in the filename; only for the PRIMARY and BACKUP
|
||||
# mirror
|
||||
[ -n "${encode}" ] && filename=${filename//\?/%3F}
|
||||
|
||||
_wget ${quiet} "${@}" -O "'${output}'" "'${url}/${filename}'"
|
||||
21
buildroot-2024.02/support/gnuconfig/README.buildroot
Normal file
21
buildroot-2024.02/support/gnuconfig/README.buildroot
Normal file
@ -0,0 +1,21 @@
|
||||
--- HOWTO ---
|
||||
If your package uses config.guess and/or config.sub, then it probably
|
||||
relies on the autotools as its build system. In this case, you should
|
||||
use the autotools-package infrastructure, which will take care of updating
|
||||
the config.guess and/or config.sub files appropriately. See the
|
||||
Buildroot documentation for details about the autotools-package
|
||||
infrastructure.
|
||||
|
||||
If for some reason your package does not use the autotools-package
|
||||
infrastructure, you can request the config.guess and/or config.sub
|
||||
files of your package to be updated by using:
|
||||
|
||||
<pkg>_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
|
||||
|
||||
--- UPDATE ---
|
||||
Run the script 'update' in this directory, and commit the result.
|
||||
|
||||
The current Buildroot version is based on this commit of the config.git
|
||||
repository (leave alone on its own line, the script updates it):
|
||||
|
||||
d7a4dee7cc25e332b990d0a6d9f0ddd42cb33cf5
|
||||
1685
buildroot-2024.02/support/gnuconfig/config.guess
vendored
Executable file
1685
buildroot-2024.02/support/gnuconfig/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1847
buildroot-2024.02/support/gnuconfig/config.sub
vendored
Executable file
1847
buildroot-2024.02/support/gnuconfig/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
14
buildroot-2024.02/support/gnuconfig/update
Executable file
14
buildroot-2024.02/support/gnuconfig/update
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
cd "${0%/*}"
|
||||
|
||||
git clone https://git.savannah.gnu.org/git/config.git
|
||||
sha="$(cd config; git log -1 --pretty=tformat:%H)"
|
||||
sed -r -i -e "\$s/.*/${sha}/" README.buildroot
|
||||
cp config/config.* .
|
||||
for p in $(ls patches/*.patch 2>/dev/null); do
|
||||
patch -p1 < "${p}"
|
||||
done
|
||||
rm -rf config
|
||||
4
buildroot-2024.02/support/kconfig/.gitignore
vendored
Normal file
4
buildroot-2024.02/support/kconfig/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
#
|
||||
# Quilt is being used to handle the patch series
|
||||
#
|
||||
.pc
|
||||
342
buildroot-2024.02/support/kconfig/Makefile
Normal file
342
buildroot-2024.02/support/kconfig/Makefile
Normal file
@ -0,0 +1,342 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# ===========================================================================
|
||||
# Kernel configuration targets
|
||||
# These targets are used from top-level makefile
|
||||
|
||||
PHONY += xconfig gconfig menuconfig config syncconfig update-po-config \
|
||||
localmodconfig localyesconfig
|
||||
|
||||
# Easy method for doing a status message
|
||||
kecho := :
|
||||
quiet_kecho := echo
|
||||
silent_kecho := :
|
||||
kecho := $($(quiet)kecho)
|
||||
|
||||
ifdef KBUILD_KCONFIG
|
||||
Kconfig := $(KBUILD_KCONFIG)
|
||||
else
|
||||
Kconfig := Kconfig
|
||||
endif
|
||||
|
||||
ifeq ($(quiet),silent_)
|
||||
silent := -s
|
||||
endif
|
||||
|
||||
# We need this, in case the user has it in its environment
|
||||
unexport CONFIG_
|
||||
|
||||
xconfig: $(obj)/qconf
|
||||
$< $(silent) $(Kconfig)
|
||||
|
||||
gconfig: $(obj)/gconf
|
||||
$< $(silent) $(Kconfig)
|
||||
|
||||
menuconfig: $(obj)/mconf
|
||||
$< $(silent) $(Kconfig)
|
||||
|
||||
config: $(obj)/conf
|
||||
$< $(silent) --oldaskconfig $(Kconfig)
|
||||
|
||||
nconfig: $(obj)/nconf
|
||||
$< $(silent) $(Kconfig)
|
||||
|
||||
# This has become an internal implementation detail and is now deprecated
|
||||
# for external use.
|
||||
syncconfig: $(obj)/conf
|
||||
$(Q)mkdir -p include/config include/generated
|
||||
$< $(silent) --$@ $(Kconfig)
|
||||
|
||||
localyesconfig localmodconfig: $(obj)/conf
|
||||
$(Q)mkdir -p include/config include/generated
|
||||
$(Q)perl $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config
|
||||
$(Q)if [ -f .config ]; then \
|
||||
cmp -s .tmp.config .config || \
|
||||
(mv -f .config .config.old.1; \
|
||||
mv -f .tmp.config .config; \
|
||||
$< $(silent) --oldconfig $(Kconfig); \
|
||||
mv -f .config.old.1 .config.old) \
|
||||
else \
|
||||
mv -f .tmp.config .config; \
|
||||
$< $(silent) --oldconfig $(Kconfig); \
|
||||
fi
|
||||
$(Q)rm -f .tmp.config
|
||||
|
||||
# Create new linux.pot file
|
||||
# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
|
||||
update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
|
||||
$(Q)$(kecho) " GEN config.pot"
|
||||
$(Q)xgettext --default-domain=linux \
|
||||
--add-comments --keyword=_ --keyword=N_ \
|
||||
--from-code=UTF-8 \
|
||||
--files-from=$(srctree)/scripts/kconfig/POTFILES.in \
|
||||
--directory=$(srctree) --directory=$(objtree) \
|
||||
--output $(obj)/config.pot
|
||||
$(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
|
||||
$(Q)(for i in `ls $(srctree)/arch/*/Kconfig \
|
||||
$(srctree)/arch/*/um/Kconfig`; \
|
||||
do \
|
||||
$(kecho) " GEN $$i"; \
|
||||
$(obj)/kxgettext $$i \
|
||||
>> $(obj)/config.pot; \
|
||||
done )
|
||||
$(Q)$(kecho) " GEN linux.pot"
|
||||
$(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
|
||||
--output $(obj)/linux.pot
|
||||
$(Q)rm -f $(obj)/config.pot
|
||||
|
||||
# These targets map 1:1 to the commandline options of 'conf'
|
||||
simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
|
||||
alldefconfig randconfig listnewconfig olddefconfig
|
||||
PHONY += $(simple-targets)
|
||||
|
||||
$(simple-targets): $(obj)/conf
|
||||
$< $(silent) --$@ $(Kconfig)
|
||||
|
||||
PHONY += oldnoconfig silentoldconfig savedefconfig defconfig
|
||||
|
||||
# oldnoconfig is an alias of olddefconfig, because people already are dependent
|
||||
# on its behavior (sets new symbols to their default value but not 'n') with the
|
||||
# counter-intuitive name.
|
||||
oldnoconfig: olddefconfig
|
||||
@echo " WARNING: \"oldnoconfig\" target will be removed after Linux 4.19"
|
||||
@echo " Please use \"olddefconfig\" instead, which is an alias."
|
||||
|
||||
# We do not expect manual invokcation of "silentoldcofig" (or "syncconfig").
|
||||
silentoldconfig: syncconfig
|
||||
@echo " WARNING: \"silentoldconfig\" has been renamed to \"syncconfig\""
|
||||
@echo " and is now an internal implementation detail."
|
||||
@echo " What you want is probably \"oldconfig\"."
|
||||
@echo " \"silentoldconfig\" will be removed after Linux 4.19"
|
||||
|
||||
savedefconfig: $(obj)/conf
|
||||
$< $(silent) --$@=defconfig $(Kconfig)
|
||||
|
||||
defconfig: $(obj)/conf
|
||||
ifeq ($(KBUILD_DEFCONFIG),)
|
||||
$< $(silent) --defconfig $(Kconfig)
|
||||
else
|
||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
|
||||
@$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
|
||||
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
|
||||
else
|
||||
@$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'"
|
||||
$(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG)
|
||||
endif
|
||||
endif
|
||||
|
||||
%_defconfig: $(obj)/conf
|
||||
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
|
||||
|
||||
configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
|
||||
|
||||
%.config: $(obj)/conf
|
||||
$(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles)
|
||||
+$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
|
||||
|
||||
PHONY += kvmconfig
|
||||
kvmconfig: kvm_guest.config
|
||||
@:
|
||||
|
||||
PHONY += xenconfig
|
||||
xenconfig: xen.config
|
||||
@:
|
||||
|
||||
PHONY += tinyconfig
|
||||
tinyconfig:
|
||||
$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
|
||||
|
||||
# CHECK: -o cache_dir=<path> working?
|
||||
PHONY += testconfig
|
||||
testconfig: $(obj)/conf
|
||||
$(PYTHON3) -B -m pytest $(srctree)/$(src)/tests \
|
||||
-o cache_dir=$(abspath $(obj)/tests/.cache) \
|
||||
$(if $(findstring 1,$(KBUILD_VERBOSE)),--capture=no)
|
||||
clean-dirs += tests/.cache
|
||||
|
||||
# Help text used by make help
|
||||
help:
|
||||
@echo ' config - Update current config utilising a line-oriented program'
|
||||
@echo ' nconfig - Update current config utilising a ncurses menu based'
|
||||
@echo ' program'
|
||||
@echo ' menuconfig - Update current config utilising a menu based program'
|
||||
@echo ' xconfig - Update current config utilising a Qt based front-end'
|
||||
@echo ' gconfig - Update current config utilising a GTK+ based front-end'
|
||||
@echo ' oldconfig - Update current config utilising a provided .config as base'
|
||||
@echo ' localmodconfig - Update current config disabling modules not loaded'
|
||||
@echo ' localyesconfig - Update current config converting local mods to core'
|
||||
@echo ' defconfig - New config with default from ARCH supplied defconfig'
|
||||
@echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
|
||||
@echo ' allnoconfig - New config where all options are answered with no'
|
||||
@echo ' allyesconfig - New config where all options are accepted with yes'
|
||||
@echo ' allmodconfig - New config selecting modules when possible'
|
||||
@echo ' alldefconfig - New config with all symbols set to default'
|
||||
@echo ' randconfig - New config with random answer to all options'
|
||||
@echo ' listnewconfig - List new options'
|
||||
@echo ' olddefconfig - Same as oldconfig but sets new symbols to their'
|
||||
@echo ' default value without prompting'
|
||||
@echo ' kvmconfig - Enable additional options for kvm guest kernel support'
|
||||
@echo ' xenconfig - Enable additional options for xen dom0 and guest kernel support'
|
||||
@echo ' tinyconfig - Configure the tiniest possible kernel'
|
||||
|
||||
# lxdialog stuff
|
||||
check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
|
||||
|
||||
# Use recursively expanded variables so we do not call gcc unless
|
||||
# we really need to do so. (Do not call gcc as part of make mrproper)
|
||||
HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
|
||||
-DLOCALE
|
||||
|
||||
# ===========================================================================
|
||||
# Shared Makefile for the various kconfig executables:
|
||||
# conf: Used for defconfig, oldconfig and related targets
|
||||
# nconf: Used for the nconfig target.
|
||||
# Utilizes ncurses
|
||||
# mconf: Used for the menuconfig target
|
||||
# Utilizes the lxdialog package
|
||||
# qconf: Used for the xconfig target
|
||||
# Based on Qt which needs to be installed to compile it
|
||||
# gconf: Used for the gconfig target
|
||||
# Based on GTK+ which needs to be installed to compile it
|
||||
# object files used by all kconfig flavours
|
||||
|
||||
lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o
|
||||
lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
|
||||
|
||||
conf-objs := conf.o zconf.tab.o
|
||||
mconf-objs := mconf.o zconf.tab.o $(lxdialog)
|
||||
nconf-objs := nconf.o zconf.tab.o nconf.gui.o
|
||||
kxgettext-objs := kxgettext.o zconf.tab.o
|
||||
qconf-cxxobjs := qconf.o
|
||||
qconf-objs := zconf.tab.o
|
||||
gconf-objs := gconf.o zconf.tab.o
|
||||
|
||||
hostprogs-y := conf
|
||||
|
||||
ifeq ($(MAKECMDGOALS),nconf)
|
||||
hostprogs-y += nconf
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),mconf)
|
||||
hostprogs-y += mconf
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),update-po-config)
|
||||
hostprogs-y += kxgettext
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),qconf)
|
||||
qconf-target := 1
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),gconf)
|
||||
gconf-target := 1
|
||||
endif
|
||||
|
||||
ifeq ($(qconf-target),1)
|
||||
hostprogs-y += qconf
|
||||
endif
|
||||
|
||||
ifeq ($(gconf-target),1)
|
||||
hostprogs-y += gconf
|
||||
endif
|
||||
|
||||
targets += zconf.lex.c
|
||||
clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
|
||||
clean-files += gconf.glade.h
|
||||
clean-files += config.pot linux.pot
|
||||
|
||||
# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
|
||||
PHONY += $(obj)/dochecklxdialog
|
||||
$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/dochecklxdialog
|
||||
$(obj)/dochecklxdialog:
|
||||
$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
|
||||
|
||||
always := dochecklxdialog
|
||||
|
||||
# Add environment specific flags
|
||||
HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
|
||||
HOST_EXTRACXXFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCXX) $(HOSTCXXFLAGS))
|
||||
|
||||
# generated files seem to need this to find local include files
|
||||
HOSTCFLAGS_zconf.lex.o := -I$(src)
|
||||
HOSTCFLAGS_zconf.tab.o := -I$(src)
|
||||
|
||||
HOSTLOADLIBES_qconf = $(KC_QT_LIBS)
|
||||
HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
|
||||
|
||||
HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
|
||||
HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
|
||||
-Wno-missing-prototypes
|
||||
|
||||
HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
|
||||
|
||||
HOSTLOADLIBES_nconf = $(shell \
|
||||
pkg-config --libs menuw panelw ncursesw 2>/dev/null \
|
||||
|| pkg-config --libs menu panel ncurses 2>/dev/null \
|
||||
|| echo "-lmenu -lpanel -lncurses" )
|
||||
$(obj)/qconf.o: $(obj)/.tmp_qtcheck
|
||||
|
||||
ifeq ($(MAKECMDGOALS),qconf)
|
||||
$(obj)/.tmp_qtcheck: $(src)/Makefile
|
||||
-include $(obj)/.tmp_qtcheck
|
||||
|
||||
# Qt needs some extra effort...
|
||||
$(obj)/.tmp_qtcheck:
|
||||
@set -e; $(kecho) " CHECK qt"; \
|
||||
if pkg-config --exists Qt5Core; then \
|
||||
cflags="-std=c++11 -fPIC `pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets`"; \
|
||||
libs=`pkg-config --libs Qt5Core Qt5Gui Qt5Widgets`; \
|
||||
moc=`pkg-config --variable=host_bins Qt5Core`/moc; \
|
||||
elif pkg-config --exists QtCore; then \
|
||||
cflags=`pkg-config --cflags QtCore QtGui`; \
|
||||
libs=`pkg-config --libs QtCore QtGui`; \
|
||||
moc=`pkg-config --variable=moc_location QtCore`; \
|
||||
else \
|
||||
echo >&2 "*"; \
|
||||
echo >&2 "* Could not find Qt via pkg-config."; \
|
||||
echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH"; \
|
||||
echo >&2 "*"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
echo "KC_QT_CFLAGS=$$cflags" > $@; \
|
||||
echo "KC_QT_LIBS=$$libs" >> $@; \
|
||||
echo "KC_QT_MOC=$$moc" >> $@
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),gconf)
|
||||
$(obj)/gconf.o: $(obj)/.tmp_gtkcheck
|
||||
-include $(obj)/.tmp_gtkcheck
|
||||
|
||||
# GTK+ needs some extra effort, too...
|
||||
$(obj)/.tmp_gtkcheck:
|
||||
@if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \
|
||||
if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \
|
||||
touch $@; \
|
||||
else \
|
||||
echo >&2 "*"; \
|
||||
echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \
|
||||
echo >&2 "*"; \
|
||||
false; \
|
||||
fi \
|
||||
else \
|
||||
echo >&2 "*"; \
|
||||
echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; \
|
||||
echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; \
|
||||
echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \
|
||||
echo >&2 "*"; \
|
||||
false; \
|
||||
fi
|
||||
endif
|
||||
|
||||
$(obj)/zconf.tab.o: $(obj)/zconf.lex.c
|
||||
|
||||
$(obj)/qconf.o: $(obj)/qconf.moc
|
||||
|
||||
$(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck
|
||||
$(KC_QT_MOC) -i $< -o $@
|
||||
|
||||
# Extract gconf menu items for i18n support
|
||||
$(obj)/gconf.glade.h: $(obj)/gconf.glade
|
||||
$(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
|
||||
$(obj)/gconf.glade
|
||||
53
buildroot-2024.02/support/kconfig/Makefile.br
Normal file
53
buildroot-2024.02/support/kconfig/Makefile.br
Normal file
@ -0,0 +1,53 @@
|
||||
src := .
|
||||
top_srcdir=../../
|
||||
top_builddir=../../
|
||||
srctree := .
|
||||
obj ?= .
|
||||
|
||||
include Makefile
|
||||
#HOSTCFLAGS+=-Dinline="" -include foo.h
|
||||
-include $(obj)/.depend
|
||||
$(obj)/.depend: $(wildcard *.h *.c)
|
||||
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || :
|
||||
|
||||
__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
|
||||
host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m)))
|
||||
host-cmulti := $(foreach m,$(__hostprogs),\
|
||||
$(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m))))
|
||||
host-cxxmulti := $(foreach m,$(__hostprogs),\
|
||||
$(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),)))
|
||||
host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs))))
|
||||
host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs))))
|
||||
|
||||
HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\"
|
||||
|
||||
$(host-csingle): %: %.c
|
||||
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@
|
||||
|
||||
$(host-cmulti): %: $(host-cobjs) $(host-cshlib)
|
||||
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
|
||||
|
||||
$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib)
|
||||
$(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
|
||||
|
||||
$(obj)/%.o: %.c
|
||||
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@
|
||||
|
||||
$(obj)/%.o: $(obj)/%.c
|
||||
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@
|
||||
|
||||
$(obj)/%.o: %.cc
|
||||
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$(@F)) -c $< -o $@
|
||||
|
||||
$(obj)/%:: $(src)/%_shipped
|
||||
$(Q)cat $< > $@
|
||||
|
||||
clean:
|
||||
$(Q)rm -f $(addprefix $(obj)/,$(clean-files))
|
||||
distclean: clean
|
||||
$(Q)rm -f $(addprefix $(obj)/,$(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \
|
||||
$(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \
|
||||
mconf .depend)
|
||||
|
||||
FORCE:
|
||||
.PHONY: FORCE clean distclean
|
||||
12
buildroot-2024.02/support/kconfig/POTFILES.in
Normal file
12
buildroot-2024.02/support/kconfig/POTFILES.in
Normal file
@ -0,0 +1,12 @@
|
||||
scripts/kconfig/lxdialog/checklist.c
|
||||
scripts/kconfig/lxdialog/inputbox.c
|
||||
scripts/kconfig/lxdialog/menubox.c
|
||||
scripts/kconfig/lxdialog/textbox.c
|
||||
scripts/kconfig/lxdialog/util.c
|
||||
scripts/kconfig/lxdialog/yesno.c
|
||||
scripts/kconfig/mconf.c
|
||||
scripts/kconfig/conf.c
|
||||
scripts/kconfig/confdata.c
|
||||
scripts/kconfig/gconf.c
|
||||
scripts/kconfig/gconf.glade.h
|
||||
scripts/kconfig/qconf.cc
|
||||
25
buildroot-2024.02/support/kconfig/README.buildroot
Normal file
25
buildroot-2024.02/support/kconfig/README.buildroot
Normal file
@ -0,0 +1,25 @@
|
||||
This is a copy of the kconfig code in the kernel (currently 4.17-rc2) tweaked
|
||||
to suit Buildroot.
|
||||
|
||||
To update:
|
||||
cp -r /usr/src/linux/scripts/kconfig support/kconfig.new
|
||||
cd support/kconfig.new
|
||||
# zconf.lex.c and zconf.tab.c needs to be generated by 'make menuconfig'
|
||||
mv zconf.lex.c zconf.lex.c_shipped
|
||||
mv zconf.tab.c zconf.tab.c_shipped
|
||||
rm -rf tests/
|
||||
cp -a ../kconfig/patches ../kconfig/README.buildroot ../kconfig/.gitignore .
|
||||
quilt push -a
|
||||
# Fix any conflict
|
||||
cd ..
|
||||
rm -rf kconfig
|
||||
mv kconfig.new kconfig
|
||||
|
||||
Then verify the toplevel targets work:
|
||||
config
|
||||
defconfig
|
||||
menuconfig
|
||||
nconfig
|
||||
xconfig
|
||||
gconfig
|
||||
oldconfig
|
||||
14
buildroot-2024.02/support/kconfig/check.sh
Executable file
14
buildroot-2024.02/support/kconfig/check.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Needed for systems without gettext
|
||||
$* -x c -o /dev/null - > /dev/null 2>&1 << EOF
|
||||
#include <libintl.h>
|
||||
int main()
|
||||
{
|
||||
gettext("");
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if [ ! "$?" -eq "0" ]; then
|
||||
echo -DKBUILD_NO_NLS;
|
||||
fi
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user