added coreutils toolchain build
This commit is contained in:
27
build.sh
27
build.sh
@@ -56,6 +56,9 @@ NCURSES_URL=https://mirror.ufs.ac.za/gnu/ncurses/ncurses-$NCURSES_VERSION.tar.gz
|
||||
BASH_VERSION=5.3
|
||||
BASH_URL=https://mirror.ufs.ac.za/gnu/bash/bash-$BASH_VERSION.tar.gz
|
||||
|
||||
COREUTILS_VERSION=9.9
|
||||
COREUTILS_URL=https://mirror.ufs.ac.za/gnu/coreutils/coreutils-$COREUTILS_VERSION.tar.xz
|
||||
|
||||
if [ ! -d "$SYSROOT" ]; then
|
||||
mkdir -p "$SYSROOT"/{etc,cross,sources,usr,dev,proc,sys,run}
|
||||
mkdir -p "$SYSROOT"/usr/{bin,sbin,lib,include}
|
||||
@@ -277,6 +280,27 @@ toolchain_bash() {
|
||||
cd "$SOURCES" && rm -rf bash-$BASH_VERSION
|
||||
}
|
||||
|
||||
toolchain_coreutils() {
|
||||
fetch $COREUTILS_URL
|
||||
|
||||
cd "$SOURCES" && tar xf coreutils-$COREUTILS_VERSION.tar.xz && cd coreutils-$COREUTILS_VERSION
|
||||
|
||||
sed -r '/_GL_EXTERN_C/s/w?memchr|bsearch/(&)/' -i $(find -name \*.in.h)
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--host=$TARGET \
|
||||
--build=$(build-aux/config.guess) \
|
||||
--enable-install-program=hostname \
|
||||
--enable-no-install-program=kill,uptime
|
||||
|
||||
make && make DESTDIR="$SYSROOT" install
|
||||
|
||||
mv "$SYSROOT"/usr/bin/chroot "$SYSROOT"/usr/sbin
|
||||
|
||||
cd "$SOURCES" && rm -rf coreutils-$COREUTILS_VERSION
|
||||
}
|
||||
|
||||
#bootstrap_binutils
|
||||
#bootstap_gcc
|
||||
#bootstap_linux
|
||||
@@ -284,4 +308,5 @@ toolchain_bash() {
|
||||
#bootstap_libstdcpp
|
||||
#toolchain_m4
|
||||
#toolchain_ncurses
|
||||
toolchain_bash
|
||||
#toolchain_bash
|
||||
toolchain_coreutils
|
||||
Reference in New Issue
Block a user