mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 21:07:54 +00:00
Add DTC as a companion tool
(needed for cross-gdb targeting the moxie-* targets) Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
951afda508
commit
da76ae3ea3
4
config/comp_tools/dtc.in
Normal file
4
config/comp_tools/dtc.in
Normal file
@ -0,0 +1,4 @@
|
||||
# Kernel.org's device tree compiler
|
||||
|
||||
config DTC_VERBOSE
|
||||
bool "Verbose DTC build output"
|
@ -36,6 +36,9 @@ config CONFIGURE_has_automake_1_15_or_newer
|
||||
config CONFIGURE_has_gnu_m4_1_4_12_or_newer
|
||||
@KCONFIG_gnu_m4_1_4_12_or_newer@
|
||||
|
||||
config CONFIGURE_has_dtc
|
||||
@KCONFIG_dtc@
|
||||
|
||||
config CONFIGURE_has_cvs
|
||||
@KCONFIG_cvs@
|
||||
|
||||
|
@ -217,6 +217,9 @@ CTNG_PROG_VERSION([M4],
|
||||
|
||||
AC_SUBST([kconfig_options])
|
||||
|
||||
AC_CHECK_PROGS([dtc], [dtc])
|
||||
CTNG_SET_KCONFIG_OPTION([dtc])
|
||||
|
||||
AC_CHECK_PROGS([cvs], [cvs])
|
||||
CTNG_SET_KCONFIG_OPTION([cvs])
|
||||
|
||||
|
8
packages/dtc/1.4.7/chksum
vendored
Normal file
8
packages/dtc/1.4.7/chksum
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
md5 dtc-1.4.7.tar.xz cdf3bfae59374fdcd2bbc5ae4f0e835e
|
||||
sha1 dtc-1.4.7.tar.xz f9724c51caae4fef4da0c8a5d52e9d4d9fc7e8af
|
||||
sha256 dtc-1.4.7.tar.xz 6643e8f00ff86350f465bb54b2185058b5b1b7bac01a0842c81a52b86589cde7
|
||||
sha512 dtc-1.4.7.tar.xz 01e0c88aee154d8ce8a5b84a299c98d12df9698e5eff572409e5e912236028532309fd21ca6a146dffef859c665d476bbbe13c371c621c1dee4abe546e5e6ebf
|
||||
md5 dtc-1.4.7.tar.gz d51a50202d323fdafd0778f53e861cdd
|
||||
sha1 dtc-1.4.7.tar.gz 1de4ad95e08efd6d04dae5f1a71ce18f26565bba
|
||||
sha256 dtc-1.4.7.tar.gz 9f4ee98d402b55b4afd79a4bcfce52f891b160d16c0f46d9aee3c0f7e034516d
|
||||
sha512 dtc-1.4.7.tar.gz d58855746d9d05f19b2cc091438901acf2dc8cb2b24191de6292abffadfd1fa62a32ea82c300cde51ce30ca5facb0553bed42741a41bc4f4c20c1b9221bdd164
|
0
packages/dtc/1.4.7/version.desc
vendored
Normal file
0
packages/dtc/1.4.7/version.desc
vendored
Normal file
4
packages/dtc/package.desc
Normal file
4
packages/dtc/package.desc
Normal file
@ -0,0 +1,4 @@
|
||||
repository='git git://git.kernel.org/pub/scm/utils/dtc/dtc.git'
|
||||
mirrors='$(CT_Mirrors kernel.org dtc)'
|
||||
archive_formats='.tar.xz .tar.gz'
|
||||
signature_format='unpacked/.sign'
|
@ -1,14 +1,17 @@
|
||||
# Build script for make
|
||||
|
||||
do_companion_tools_make_get() {
|
||||
do_companion_tools_make_get()
|
||||
{
|
||||
CT_Fetch MAKE
|
||||
}
|
||||
|
||||
do_companion_tools_make_extract() {
|
||||
do_companion_tools_make_extract()
|
||||
{
|
||||
CT_ExtractPatch MAKE
|
||||
}
|
||||
|
||||
do_companion_tools_make_for_build() {
|
||||
do_companion_tools_make_for_build()
|
||||
{
|
||||
CT_DoStep INFO "Installing make for build"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-make-build"
|
||||
do_make_backend \
|
||||
@ -23,7 +26,8 @@ do_companion_tools_make_for_build() {
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_companion_tools_make_for_host() {
|
||||
do_companion_tools_make_for_host()
|
||||
{
|
||||
CT_DoStep INFO "Installing make for host"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-make-host"
|
||||
do_make_backend \
|
||||
@ -38,7 +42,8 @@ do_companion_tools_make_for_host() {
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_make_backend() {
|
||||
do_make_backend()
|
||||
{
|
||||
local host
|
||||
local prefix
|
||||
local cflags
|
||||
|
@ -1,14 +1,17 @@
|
||||
# Build script for m4
|
||||
|
||||
do_companion_tools_m4_get() {
|
||||
do_companion_tools_m4_get()
|
||||
{
|
||||
CT_Fetch M4
|
||||
}
|
||||
|
||||
do_companion_tools_m4_extract() {
|
||||
do_companion_tools_m4_extract()
|
||||
{
|
||||
CT_ExtractPatch M4
|
||||
}
|
||||
|
||||
do_companion_tools_m4_for_build() {
|
||||
do_companion_tools_m4_for_build()
|
||||
{
|
||||
CT_DoStep INFO "Installing m4 for build"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-m4-build"
|
||||
do_m4_backend \
|
||||
@ -20,7 +23,8 @@ do_companion_tools_m4_for_build() {
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_companion_tools_m4_for_host() {
|
||||
do_companion_tools_m4_for_host()
|
||||
{
|
||||
CT_DoStep INFO "Installing m4 for host"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-m4-host"
|
||||
do_m4_backend \
|
||||
@ -32,7 +36,8 @@ do_companion_tools_m4_for_host() {
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_m4_backend() {
|
||||
do_m4_backend()
|
||||
{
|
||||
local host
|
||||
local prefix
|
||||
local cflags
|
||||
|
@ -1,14 +1,17 @@
|
||||
# Build script for autoconf
|
||||
|
||||
do_companion_tools_autoconf_get() {
|
||||
do_companion_tools_autoconf_get()
|
||||
{
|
||||
CT_Fetch AUTOCONF
|
||||
}
|
||||
|
||||
do_companion_tools_autoconf_extract() {
|
||||
do_companion_tools_autoconf_extract()
|
||||
{
|
||||
CT_ExtractPatch AUTOCONF
|
||||
}
|
||||
|
||||
do_companion_tools_autoconf_for_build() {
|
||||
do_companion_tools_autoconf_for_build()
|
||||
{
|
||||
CT_DoStep INFO "Installing autoconf for build"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-autoconf-build"
|
||||
do_autoconf_backend host=${CT_BUILD} prefix="${CT_BUILD_COMPTOOLS_DIR}"
|
||||
@ -16,7 +19,8 @@ do_companion_tools_autoconf_for_build() {
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_companion_tools_autoconf_for_host() {
|
||||
do_companion_tools_autoconf_for_host()
|
||||
{
|
||||
CT_DoStep INFO "Installing autoconf for host"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-autoconf-host"
|
||||
do_autoconf_backend host=${CT_HOST} prefix="${CT_PREFIX_DIR}"
|
||||
@ -24,7 +28,8 @@ do_companion_tools_autoconf_for_host() {
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_autoconf_backend() {
|
||||
do_autoconf_backend()
|
||||
{
|
||||
local host
|
||||
local prefix
|
||||
|
||||
|
@ -1,14 +1,17 @@
|
||||
# Build script for automake
|
||||
|
||||
do_companion_tools_automake_get() {
|
||||
do_companion_tools_automake_get()
|
||||
{
|
||||
CT_Fetch AUTOMAKE
|
||||
}
|
||||
|
||||
do_companion_tools_automake_extract() {
|
||||
do_companion_tools_automake_extract()
|
||||
{
|
||||
CT_ExtractPatch AUTOMAKE
|
||||
}
|
||||
|
||||
do_companion_tools_automake_for_build() {
|
||||
do_companion_tools_automake_for_build()
|
||||
{
|
||||
CT_DoStep INFO "Installing automake for build"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-automake-build"
|
||||
do_automake_backend host=${CT_BUILD} prefix="${CT_BUILD_COMPTOOLS_DIR}"
|
||||
@ -16,7 +19,8 @@ do_companion_tools_automake_for_build() {
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_companion_tools_automake_for_host() {
|
||||
do_companion_tools_automake_for_host()
|
||||
{
|
||||
CT_DoStep INFO "Installing automake for host"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-automake-host"
|
||||
do_automake_backend host=${CT_HOST} prefix="${CT_PREFIX_DIR}"
|
||||
@ -24,7 +28,8 @@ do_companion_tools_automake_for_host() {
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_automake_backend() {
|
||||
do_automake_backend()
|
||||
{
|
||||
local host
|
||||
local prefix
|
||||
|
||||
|
@ -1,14 +1,17 @@
|
||||
# Build script for libtool
|
||||
|
||||
do_companion_tools_libtool_get() {
|
||||
do_companion_tools_libtool_get()
|
||||
{
|
||||
CT_Fetch LIBTOOL
|
||||
}
|
||||
|
||||
do_companion_tools_libtool_extract() {
|
||||
do_companion_tools_libtool_extract()
|
||||
{
|
||||
CT_ExtractPatch LIBTOOL
|
||||
}
|
||||
|
||||
do_companion_tools_libtool_for_build() {
|
||||
do_companion_tools_libtool_for_build()
|
||||
{
|
||||
CT_DoStep INFO "Installing libtool for build"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-libtool-build"
|
||||
do_libtool_backend host=${CT_BUILD} prefix="${CT_BUILD_COMPTOOLS_DIR}"
|
||||
@ -16,7 +19,8 @@ do_companion_tools_libtool_for_build() {
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_companion_tools_libtool_for_host() {
|
||||
do_companion_tools_libtool_for_host()
|
||||
{
|
||||
CT_DoStep INFO "Installing libtool for host"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-libtool-host"
|
||||
do_libtool_backend host=${CT_HOST} prefix="${CT_PREFIX_DIR}"
|
||||
@ -24,7 +28,8 @@ do_companion_tools_libtool_for_host() {
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_libtool_backend() {
|
||||
do_libtool_backend()
|
||||
{
|
||||
local host
|
||||
local prefix
|
||||
|
||||
|
81
scripts/build/companion_tools/500-dtc.sh
Normal file
81
scripts/build/companion_tools/500-dtc.sh
Normal file
@ -0,0 +1,81 @@
|
||||
# Build script for DTC (device tree compiler)
|
||||
|
||||
do_companion_tools_dtc_get()
|
||||
{
|
||||
CT_Fetch DTC
|
||||
}
|
||||
|
||||
do_companion_tools_dtc_extract()
|
||||
{
|
||||
CT_ExtractPatch DTC
|
||||
}
|
||||
|
||||
do_companion_tools_dtc_for_build()
|
||||
{
|
||||
CT_DoStep INFO "Installing dtc for build"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-dtc-build"
|
||||
do_dtc_backend \
|
||||
host=${CT_BUILD} \
|
||||
prefix="${CT_BUILD_COMPTOOLS_DIR}" \
|
||||
cflags="${CT_CFLAGS_FOR_BUILD}" \
|
||||
ldflags="${CT_LDFLAGS_FOR_BUILD}"
|
||||
CT_Popd
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_companion_tools_dtc_for_host()
|
||||
{
|
||||
CT_DoStep INFO "Installing dtc for host"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-dtc-host"
|
||||
do_dtc_backend \
|
||||
host=${CT_HOST} \
|
||||
prefix="${CT_PREFIX_DIR}" \
|
||||
cflags="${CT_CFLAGS_FOR_HOST}" \
|
||||
ldflags="${CT_LDFLAGS_FOR_HOST}"
|
||||
CT_Popd
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
do_dtc_backend()
|
||||
{
|
||||
local host
|
||||
local prefix
|
||||
local cflags
|
||||
local ldflags
|
||||
local -a extra_opts
|
||||
|
||||
for arg in "$@"; do
|
||||
eval "${arg// /\\ }"
|
||||
done
|
||||
|
||||
extra_opts=( \
|
||||
CC="${host}-gcc" \
|
||||
AR="${host}-ar" \
|
||||
PREFIX="${prefix}" \
|
||||
NO_PYTHON=1 \
|
||||
BIN=dtc \
|
||||
)
|
||||
if [ -n "${CT_DTC_VERBOSE}" ]; then
|
||||
extra_opts+=( V=1 )
|
||||
fi
|
||||
case "${host}" in
|
||||
*-mingw32)
|
||||
# Turn off warnings: mingw32 hosts complain about %zd formats even though
|
||||
# they seem to be supported by mingw32. Only build 'dtc', again, because
|
||||
# other binaries use syscalls not available under mingw32, but we also
|
||||
# do not need them. Hijack WARNINGS to override lstat with stat (Windows
|
||||
# does not have symlinks).
|
||||
extra_opts+=( BIN=dtc WARNINGS=-Dlstat=stat )
|
||||
;;
|
||||
esac
|
||||
|
||||
CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/dtc/." .
|
||||
|
||||
CT_DoLog EXTRA "Building dtc"
|
||||
CT_DoExecLog ALL make all "${extra_opts[@]}"
|
||||
|
||||
# Only install binaries, we don't support shared libraries in installation
|
||||
# directory yet.
|
||||
CT_DoLog EXTRA "Installing dtc"
|
||||
CT_DoExecLog ALL make install-bin "${extra_opts[@]}"
|
||||
}
|
@ -1719,27 +1719,34 @@ CT_Mirrors()
|
||||
echo "https://releases.linaro.org/archive/${yymm}/components/toolchain/${project}-linaro"
|
||||
;;
|
||||
kernel.org)
|
||||
# TBD move to linux.sh?
|
||||
if [ "${project}" != "linux" ]; then
|
||||
echo "-unknown-"
|
||||
fi
|
||||
local version="${CT_LINUX_VERSION}"
|
||||
case "${version}" in
|
||||
'')
|
||||
# Ignore, this happens before .config is fully evaluated
|
||||
;;
|
||||
[34].*)
|
||||
echo "http://www.kernel.org/pub/linux/kernel/v${version%%.*}.x"
|
||||
;;
|
||||
2.6.*)
|
||||
echo "http://www.kernel.org/pub/linux/kernel/v2.6"
|
||||
# TBD move to linux.sh and dtc.sh?
|
||||
case "${project}" in
|
||||
linux)
|
||||
local version="${CT_LINUX_VERSION}"
|
||||
case "${version}" in
|
||||
2.6.*.*)
|
||||
echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm"
|
||||
echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v${version%.*}"
|
||||
'')
|
||||
# Ignore, this happens before .config is fully evaluated
|
||||
;;
|
||||
[34].*)
|
||||
echo "http://www.kernel.org/pub/linux/kernel/v${version%%.*}.x"
|
||||
;;
|
||||
2.6.*)
|
||||
echo "http://www.kernel.org/pub/linux/kernel/v2.6"
|
||||
case "${version}" in
|
||||
2.6.*.*)
|
||||
echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm"
|
||||
echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v${version%.*}"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "-unknown-"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
dtc)
|
||||
echo "https://mirrors.edge.kernel.org/pub/software/utils/dtc"
|
||||
;;
|
||||
*)
|
||||
echo "-unknown-"
|
||||
;;
|
||||
|
@ -108,7 +108,7 @@ dump_single_sample()
|
||||
|
||||
dump_choice_desc LIBC "C library"
|
||||
dump_pkgs_desc DEBUG "Debug tools" DUMA GDB LTRACE STRACE
|
||||
dump_pkgs_desc COMP_TOOLS "Companion tools" AUTOCONF AUTOMAKE LIBTOOL M4 MAKE
|
||||
dump_pkgs_desc COMP_TOOLS "Companion tools" AUTOCONF AUTOMAKE LIBTOOL M4 MAKE DTC
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user