libc/uClibc: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.
Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation, don't patch custom dir location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <712995e3e719fbbe24af.1349931201@localhost.localdomain>
PatchWork-Id: 190794
1.1 --- a/config/libc/uClibc.in Wed Oct 31 23:25:33 2012 +0100
1.2 +++ b/config/libc/uClibc.in Thu Oct 11 14:39:44 2012 +1000
1.3 @@ -99,8 +99,27 @@
1.4 select LIBC_SUPPORT_NPTL
1.5 select LIBC_UCLIBC_0_9_30_or_later
1.6
1.7 +config LIBC_UCLIBC_CUSTOM
1.8 + bool
1.9 + prompt "Custom uClibc"
1.10 + depends on EXPERIMENTAL
1.11 + select LIBC_SUPPORT_NPTL
1.12 + select LIBC_UCLIBC_0_9_30_or_later
1.13 +
1.14 endchoice
1.15
1.16 +if LIBC_UCLIBC_CUSTOM
1.17 +
1.18 +config LIBC_UCLIBC_CUSTOM_LOCATION
1.19 + string
1.20 + prompt "Full path to custom uClibc source"
1.21 + default ""
1.22 + help
1.23 + Enter the path to the directory (or tarball) of your source for uClibc,
1.24 + or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/uClibc
1.25 +
1.26 +endif # LIBC_UCLIBC_CUSTOM
1.27 +
1.28 config LIBC_VERSION
1.29 string
1.30 prompt "Enter date (YYYYMMDD)" if LIBC_UCLIBC_V_specific_date
1.31 @@ -119,6 +138,7 @@
1.32 default "0.9.29" if LIBC_UCLIBC_V_0_9_29
1.33 default "0.9.28.3" if LIBC_UCLIBC_V_0_9_28_3
1.34 default "snapshot" if LIBC_UCLIBC_V_snapshot
1.35 + default "custom" if LIBC_UCLIBC_CUSTOM
1.36
1.37 config LIBC_UCLIBC_0_9_32_or_later
1.38 bool
2.1 --- a/scripts/build/libc/uClibc.sh Wed Oct 31 23:25:33 2012 +0100
2.2 +++ b/scripts/build/libc/uClibc.sh Thu Oct 11 14:39:44 2012 +1000
2.3 @@ -15,7 +15,12 @@
2.4 # For uClibc, we have almost every thing: releases, and snapshots
2.5 # for the last month or so. We'll have to deal with svn revisions
2.6 # later...
2.7 - CT_GetFile "uClibc-${CT_LIBC_VERSION}" ${libc_src}
2.8 + if [ "${CT_LIBC_UCLIBC_CUSTOM}" = "y" ]; then
2.9 + CT_GetCustom "uClibc" "${CT_LIBC_VERSION}" \
2.10 + "${CT_LIBC_UCLIBC_CUSTOM_LOCATION}"
2.11 + else
2.12 + CT_GetFile "uClibc-${CT_LIBC_VERSION}" ${libc_src}
2.13 + fi
2.14 # uClibc locales
2.15 if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" ]; then
2.16 CT_GetFile "${uclibc_local_tarball}" ${libc_src}
2.17 @@ -26,6 +31,11 @@
2.18
2.19 # Extract uClibc
2.20 do_libc_extract() {
2.21 + # If using custom directory location, nothing to do
2.22 + if [ "${CT_LIBC_UCLIBC_CUSTOM}" = "y" \
2.23 + -a -d "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" ]; then
2.24 + return 0
2.25 + fi
2.26 CT_Extract "uClibc-${CT_LIBC_VERSION}"
2.27 # Don't patch snapshots
2.28 if [ -z "${CT_LIBC_UCLIBC_V_snapshot}" \