mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
create rootf's & SDK from 2018.02.9 buildroot (#10)
--------- Co-authored-by: tiopex <tiopxyz@gmail.com> Co-authored-by: tiopex <67048640+tiopex@users.noreply.github.com>
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
# 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
|
||||
@@ -1,9 +1,14 @@
|
||||
# Set this to either 3.16 or higher, depending on the highest minimum
|
||||
# Versions before 3.0 are affected by the bug described in
|
||||
# https://git.busybox.net/buildroot/commit/?id=ef2c1970e4bff3be3992014070392b0e6bc28bd2
|
||||
# and fixed in upstream CMake in version 3.0:
|
||||
# https://cmake.org/gitweb?p=cmake.git;h=e8b8b37ef6fef094940d3384df5a1d421b9fa568
|
||||
#
|
||||
# Set this to either 3.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 cmake infra will catch it and build its own.
|
||||
# version, our cmake infra will catch it and whine.
|
||||
#
|
||||
BR2_CMAKE_VERSION_MIN = 3.16
|
||||
BR2_CMAKE_VERSION_MIN = 3.1
|
||||
|
||||
BR2_CMAKE_CANDIDATES ?= cmake cmake3
|
||||
BR2_CMAKE ?= $(call suitable-host-package,cmake,\
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# 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
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,3 +0,0 @@
|
||||
ifeq (,$(call suitable-host-package,gzip))
|
||||
BR2_GZIP_HOST_DEPENDENCY = host-gzip
|
||||
endif
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/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}"
|
||||
@@ -1,4 +1,5 @@
|
||||
ifeq (,$(call suitable-host-package,lzip,$(LZCAT)))
|
||||
BR2_LZIP_HOST_DEPENDENCY = host-lzip
|
||||
DEPENDENCIES_HOST_PREREQ += host-lzip
|
||||
EXTRACTOR_DEPENDENCY_PRECHECKED_EXTENSIONS += .lz
|
||||
LZCAT = $(HOST_DIR)/bin/lzip -d -c
|
||||
endif
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
# 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
|
||||
@@ -1,37 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,8 +0,0 @@
|
||||
# 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
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,6 +1,6 @@
|
||||
TAR ?= tar
|
||||
|
||||
ifeq (,$(call suitable-host-package,tar,$(TAR)))
|
||||
DEPENDENCIES_HOST_PREREQ += host-tar
|
||||
TAR = $(HOST_DIR)/bin/tar
|
||||
BR2_TAR_HOST_DEPENDENCY = host-tar
|
||||
endif
|
||||
|
||||
@@ -20,11 +20,10 @@ 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
|
||||
if [ ! -z "${version_bsd}" ] ; then
|
||||
# mark as invalid version - not all command line options are available
|
||||
major=0
|
||||
minor=0
|
||||
fi
|
||||
|
||||
# Minimal version = 1.27 (previous versions do not correctly unpack archives
|
||||
@@ -33,7 +32,14 @@ fi
|
||||
major_min=1
|
||||
minor_min=27
|
||||
|
||||
if [ $major -lt $major_min ]; then
|
||||
# Maximal version = 1.29 (1.30 changed --numeric-owner output for
|
||||
# filenames > 100 characters). This is really a fix for a bug in
|
||||
# earlier tar versions regarding deterministic output so it is
|
||||
# unlikely to be reverted in later versions.
|
||||
major_max=1
|
||||
minor_max=29
|
||||
|
||||
if [ $major -lt $major_min -o $major -gt $major_max ]; then
|
||||
# echo nothing: no suitable tar found
|
||||
exit 1
|
||||
fi
|
||||
@@ -43,5 +49,10 @@ if [ $major -eq $major_min -a $minor -lt $minor_min ]; then
|
||||
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
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# If it is not present, build our own host-xzcat
|
||||
|
||||
ifeq (,$(call suitable-host-package,xzcat,$(XZCAT)))
|
||||
BR2_XZCAT_HOST_DEPENDENCY = host-xz
|
||||
DEPENDENCIES_HOST_PREREQ += host-xz
|
||||
EXTRACTOR_DEPENDENCY_PRECHECKED_EXTENSIONS += .xz .lzma
|
||||
XZCAT = $(HOST_DIR)/bin/xzcat
|
||||
endif
|
||||
|
||||
@@ -5,31 +5,35 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
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)))
|
||||
$(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:
|
||||
ifeq ($(BR2_CCACHE),y)
|
||||
DEPENDENCIES_HOST_PREREQ += host-ccache
|
||||
endif
|
||||
|
||||
core-dependencies:
|
||||
@MAKE="$(MAKE)" DL_TOOLS="$(sort $(DL_TOOLS_DEPENDENCIES))" \
|
||||
$(TOPDIR)/support/dependencies/dependencies.sh
|
||||
|
||||
$(DEPENDENCIES_HOST_PREREQ): HOSTCC=$(HOSTCC_NOCCACHE)
|
||||
$(DEPENDENCIES_HOST_PREREQ): HOSTCXX=$(HOSTCXX_NOCCACHE)
|
||||
$(DEPENDENCIES_HOST_PREREQ): core-dependencies
|
||||
|
||||
dependencies: core-dependencies $(DEPENDENCIES_HOST_PREREQ)
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Toplevel Makefile options
|
||||
#
|
||||
################################################################################
|
||||
.PHONY: dependencies
|
||||
.PHONY: dependencies core-dependencies
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
# 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
|
||||
@@ -38,9 +35,10 @@ case ":${PATH:-unset}:" in
|
||||
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 "\n"
|
||||
# Break the '\n' sequence, or a \n is printed (which is not what we want).
|
||||
printf "Your PATH contains a newline (%sn) character.\n" "\\"
|
||||
printf "This doesn't work. Fix you PATH.\n"
|
||||
exit 1
|
||||
;;
|
||||
@@ -115,9 +113,9 @@ if [ -z "$COMPILER_VERSION" ] ; then
|
||||
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
|
||||
if [ $COMPILER_MAJOR -lt 3 -o $COMPILER_MAJOR -eq 2 -a $COMPILER_MINOR -lt 95 ] ; then
|
||||
echo
|
||||
echo "You have gcc '$COMPILER_VERSION' installed. gcc >= 4.8 is required"
|
||||
echo "You have gcc '$COMPILER_VERSION' installed. gcc >= 2.95 is required"
|
||||
exit 1;
|
||||
fi;
|
||||
|
||||
@@ -143,9 +141,9 @@ 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
|
||||
if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then
|
||||
echo
|
||||
echo "You have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 4.8 is required"
|
||||
echo "You have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 2.95 is required"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@@ -163,7 +161,7 @@ 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
|
||||
for prog in patch perl tar wget cpio python unzip rsync bc ${DL_TOOLS} ; do
|
||||
if ! which $prog > /dev/null ; then
|
||||
echo "You must install '$prog' on your build machine";
|
||||
missing_progs="yes"
|
||||
@@ -175,12 +173,6 @@ for prog in perl tar wget cpio unzip rsync bc cmp find xargs ${DL_TOOLS} ; do
|
||||
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
|
||||
done
|
||||
@@ -189,20 +181,6 @@ 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 ^BR2_NEEDS_HOST_UTF8_LOCALE=y $BR2_CONFIG > /dev/null; then
|
||||
if ! which locale > /dev/null ; then
|
||||
echo
|
||||
@@ -227,6 +205,14 @@ if grep -q ^BR2_NEEDS_HOST_JAVA=y $BR2_CONFIG ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_NEEDS_HOST_JAVAC=y $BR2_CONFIG ; then
|
||||
check_prog_host "javac"
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_NEEDS_HOST_JAR=y $BR2_CONFIG ; then
|
||||
check_prog_host "jar"
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BR2_CONFIG ; then
|
||||
if test ! -f /lib/ld-linux.so.2 ; then
|
||||
echo
|
||||
@@ -238,7 +224,6 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BR2_CONFIG ; then
|
||||
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
|
||||
@@ -263,16 +248,6 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep ^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 ExtUtils::MakeMaker" # Used by host-libxml-parser-perl
|
||||
@@ -283,14 +258,6 @@ if grep -q ^BR2_PACKAGE_MPV=y $BR2_CONFIG ; then
|
||||
required_perl_modules="$required_perl_modules Math::BigRat"
|
||||
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
|
||||
|
||||
# This variable will keep the modules that are missing in your system.
|
||||
missing_perl_modules=""
|
||||
|
||||
@@ -310,3 +277,8 @@ if [ -n "$missing_perl_modules" ] ; then
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! python -c "import argparse" > /dev/null 2>&1 ; then
|
||||
echo "Your Python installation is not complete enough: argparse module is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user