added tiny c compiler and cgroups for orangepi pc
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
. ./scripts/lm_sensors.sh
|
||||
. ./scripts/wpa_supplicant.sh
|
||||
. ./scripts/lrzsz.sh
|
||||
. ./scripts/tcc.sh
|
||||
|
||||
case $1 in
|
||||
build)
|
||||
@@ -84,6 +85,9 @@ case $1 in
|
||||
lrzsz)
|
||||
lrzsz-build
|
||||
;;
|
||||
tcc)
|
||||
tcc_build
|
||||
;;
|
||||
*)
|
||||
printf "$UYELLOW** $0 script using: $0 {clean|build|download|rootfs}\n$RESET"
|
||||
exit 1
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
. ./scripts/lm_sensors.sh
|
||||
. ./scripts/wpa_supplicant.sh
|
||||
. ./scripts/lrzsz.sh
|
||||
. ./scripts/tcc.sh
|
||||
|
||||
#----------- Building rootfs ----------------------
|
||||
rootfs() {
|
||||
@@ -90,6 +91,7 @@ EOF
|
||||
[ "$LIBSQLITE3_ENABLE" = "y"] && libsqlite3
|
||||
[ "$LM_SENSORS_ENABLE" = "y" ] && lm_sensors
|
||||
[ "$LRZSZ_ENABLE" = "y" ] && lrzsz-build
|
||||
[ "$TCC_C_COMPILER_ENABLE" = "y" ] && tcc_build
|
||||
|
||||
if [ ! -z "$DEFAULT_HOSTNAME" ]; then
|
||||
echo "$DEFAULT_HOSTNAME" > $rootfspath/etc/hostname
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ./scripts/colors.sh
|
||||
. ./scripts/funcs.sh
|
||||
. ./scripts/config.sh
|
||||
|
||||
tcc_build() {
|
||||
pkgname=tcc
|
||||
pkgver=0.9.27
|
||||
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
|
||||
mkdir $build/${pkgname}
|
||||
cd $build/${pkgname}
|
||||
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.bz2
|
||||
check $? "Extract ${pkgname}"
|
||||
cd ${pkgname}-${pkgver}
|
||||
export QEMU_LD_PREFIX=${rootfspath}
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--cross-prefix=${CROSS_COMPILE}- \
|
||||
--cpu=${ARCH} \
|
||||
--disable-static \
|
||||
--config-uClibc \
|
||||
--with-sysroot=${rootfspath}
|
||||
check $? "Configure ${pkgname}"
|
||||
make $makeflags
|
||||
check $? "Build ${pkgname}"
|
||||
make DESTDIR=$rootfspath install
|
||||
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/bin/tcc $rootfspath/usr/lib/libtcc.so
|
||||
check $? "Installing to rootfs ${pkgname}"
|
||||
find $rootfspath -type f -name "*.a" -delete
|
||||
find $rootfspath -type f -name "*.la" -delete
|
||||
rm -rvf $rootfspath/usr/share/{info,man,doc}
|
||||
}
|
||||
Reference in New Issue
Block a user