added mtd-utils
This commit is contained in:
@@ -25,7 +25,7 @@ export makeflags=-j$(nproc) # makeflags
|
||||
export CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabihf
|
||||
export ARCH=arm
|
||||
export sdroot=$out/sdroot
|
||||
|
||||
export COFIG_NOCLEAN=n
|
||||
export UCLIBC_VERSION=1.0.56
|
||||
export UCLIBC_CONFIG_FILE=${root}/board/${BOARD_NAME}/uclibc-${UCLIBC_VERSION}.config
|
||||
|
||||
@@ -67,4 +67,5 @@ export LRZSZ_ENABLE=n
|
||||
export TCC_C_COMPILER_ENABLE=n
|
||||
export NGINX_ENABLE=n
|
||||
export DUF_BIN_ENABLE=n
|
||||
export CONFIG_MTD_UTILS=n
|
||||
#--------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@ export makeflags=-j$(nproc) # makeflags
|
||||
export CROSS_COMPILE=aarch64-buildroot-linux-uclibc
|
||||
export ARCH=arm64
|
||||
export sdroot=$out/sdroot
|
||||
|
||||
export COFIG_NOCLEAN=n
|
||||
export UCLIBC_VERSION=1.0.56
|
||||
export UCLIBC_CONFIG_FILE=$root/board/${BOARD_NAME}/uclibc-${UCLIBC_VERSION}.config
|
||||
|
||||
@@ -67,4 +67,5 @@ export LRZSZ_ENABLE=n
|
||||
export TCC_C_COMPILER_ENABLE=n
|
||||
export NGINX_ENABLE=n
|
||||
export DUF_BIN_ENABLE=n
|
||||
export CONFIG_MTD_UTILS=n
|
||||
#--------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@ export makeflags=-j$(nproc) # makeflags
|
||||
export CROSS_COMPILE=x86_64-buildroot-linux-uclibc
|
||||
export ARCH=x86_64
|
||||
export diskroot=$out/diskroot
|
||||
|
||||
export COFIG_NOCLEAN=n
|
||||
export UCLIBC_VERSION=1.0.56
|
||||
export UCLIBC_CONFIG_FILE=${root}/board/${BOARD_NAME}/uclibc-${UCLIBC_VERSION}.config
|
||||
|
||||
@@ -55,4 +55,5 @@ export LRZSZ_ENABLE=n
|
||||
export TCC_C_COMPILER_ENABLE=n
|
||||
export NGINX_ENABLE=n
|
||||
export DUF_BIN_ENABLE=n
|
||||
export CONFIG_MTD_UTILS=n
|
||||
#--------------------------------------
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
. ./scripts/sftp_server.sh
|
||||
. ./scripts/uclibc.sh
|
||||
. ./scripts/bash.sh
|
||||
. ./scripts/mtd-utils.sh
|
||||
|
||||
case $1 in
|
||||
build)
|
||||
@@ -122,6 +123,9 @@ case $1 in
|
||||
bash)
|
||||
bash
|
||||
;;
|
||||
mtd-utils)
|
||||
mtd-utils
|
||||
;;
|
||||
*)
|
||||
printf "$UYELLOW** $0 script using: $0 {clean|build|download|rootfs}\n$RESET"
|
||||
exit 1
|
||||
|
||||
@@ -7,7 +7,7 @@ set -x
|
||||
. ./scripts/config.sh
|
||||
|
||||
cleanup_rootfs() {
|
||||
if [ "${TCC_C_COMPILER_ENABLE}" = "n" ]; then
|
||||
if [ "${TCC_C_COMPILER_ENABLE}" = "n" ] && [ "${CONFIG_NOCLEAN}" = "n" ]; then
|
||||
find $rootfspath -type f -name "*.a" -delete
|
||||
find $rootfspath -type f -name "*.la" -delete
|
||||
rm -rv $rootfspath/usr/include
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ./scripts/colors.sh
|
||||
. ./scripts/funcs.sh
|
||||
. ./scripts/config.sh
|
||||
|
||||
mtd-utils() {
|
||||
pkgname=mtd-utils
|
||||
pkgver=2.3.0
|
||||
srcurl=ftp://ftp.infradead.org/pub/mtd-utils/${pkgname}-${pkgver}.tar.bz2
|
||||
print_info "** Building and installing ${pkgname}"
|
||||
[ -d $build/${pkgname} ] && return 0
|
||||
mkdir -p $build/${pkgname}
|
||||
cd $build/${pkgname}
|
||||
if [ ! -f $root/downloads/${pkgname}-${pkgver}.tar.bz2 ]; then
|
||||
print_info "** Downloading $srcurl"
|
||||
cd $root/downloads
|
||||
wget $srcurl
|
||||
check $? "download $srcurl"
|
||||
cd -
|
||||
fi
|
||||
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.bz2
|
||||
check $? "Extract ${pkgname}"
|
||||
cd ${pkgname}-${pkgver}
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--host=${CROSS_COMPILE} \
|
||||
--without-tests \
|
||||
--without-ubifs \
|
||||
--disable-ubihealthd
|
||||
check $? "Configure ${pkgname}"
|
||||
make $makeflags
|
||||
check $? "Build ${pkgname}"
|
||||
make DESTDIR=$rootfspath install
|
||||
check $? "Installing to rootfs ${pkgname}"
|
||||
}
|
||||
@@ -29,6 +29,7 @@
|
||||
. ./scripts/cleanup_rootfs.sh
|
||||
. ./scripts/nginx.sh
|
||||
. ./scripts/duf_bin.sh
|
||||
. ./scripts/mtd-utils.sh
|
||||
|
||||
#----------- Building rootfs ----------------------
|
||||
rootfs() {
|
||||
@@ -85,6 +86,7 @@ EOF
|
||||
[ "$TCC_C_COMPILER_ENABLE" = "y" ] && tcc_build
|
||||
[ "$NGINX_ENABLE" = "y" ] && nginx_build
|
||||
[ "$DUF_BIN_ENABLE" = "y" ] && duf_bin
|
||||
[ "$CONFIG_MTD_UTILS" = "y" ] && mtd-utils
|
||||
|
||||
if [ ! -z "$DEFAULT_HOSTNAME" ]; then
|
||||
echo "$DEFAULT_HOSTNAME" > $rootfspath/etc/hostname
|
||||
|
||||
@@ -29,3 +29,4 @@ https://dl.gitea.com/gitea/1.22.4/gitea-1.22.4-linux-arm-5
|
||||
# https://w1.fi/releases/wpa_supplicant-2.11.tar.gz
|
||||
# https://download.savannah.gnu.org/releases/tinycc/tcc-0.9.27.tar.bz2
|
||||
https://github.com/nginx/nginx/releases/download/release-1.29.5/nginx-1.29.5.tar.gz
|
||||
ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-2.3.0.tar.bz2
|
||||
|
||||
Reference in New Issue
Block a user