OpenWRT files updated
This commit is contained in:
parent
8921164799
commit
4fc75b215e
2 changed files with 30 additions and 5 deletions
|
@ -5,15 +5,40 @@ PACKAGE=cronosagent
|
||||||
PROJECT=$(pwd)/..
|
PROJECT=$(pwd)/..
|
||||||
OPENWRT=${HOME}/openwrt
|
OPENWRT=${HOME}/openwrt
|
||||||
|
|
||||||
rm -rf $OPENWRT/package/$PACKAGE
|
test -d $OPENWRT/package/$PACKAGE
|
||||||
|
STATE=$?
|
||||||
|
|
||||||
|
if [ "$STATE" -eq "0" ]
|
||||||
|
then
|
||||||
|
# Remove existing package in buildroot
|
||||||
|
rm -rf $OPENWRT/package/$PACKAGE
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create package directory and copy all stuff
|
||||||
mkdir -p $OPENWRT/package/$PACKAGE/source
|
mkdir -p $OPENWRT/package/$PACKAGE/source
|
||||||
cp -R $PROJECT $OPENWRT/package/$PACKAGE/source
|
cp -R $PROJECT $OPENWRT/package/$PACKAGE/source
|
||||||
rm $OPENWRT/package/$PACKAGE/source/OpenWRT/package/Makefile
|
|
||||||
rm -rf $OPENWRT/package/$PACKAGE/source/.git
|
rm -rf $OPENWRT/package/$PACKAGE/source/.git
|
||||||
|
|
||||||
pushd .
|
pushd . > /dev/null
|
||||||
|
|
||||||
cd $OPENWRT
|
cd $OPENWRT
|
||||||
make
|
|
||||||
|
|
||||||
popd
|
if [ "$STATE" -eq "1" ]
|
||||||
|
then
|
||||||
|
# Build predefined packages for the first run
|
||||||
|
make
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make Makefile visible to Buildroot
|
||||||
|
mv package/$PACKAGE/source/OpenWRT/Makefile package/$PACKAGE
|
||||||
|
|
||||||
|
if [ "$STATE" -eq "1" ]
|
||||||
|
then
|
||||||
|
# Give user to choose package $PACKAGE
|
||||||
|
make menuconfig
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build package
|
||||||
|
make package/$PACKAGE/compile V=99 2>&1 | tee $PROJECT/../build.log | grep -i error
|
||||||
|
|
||||||
|
popd > /dev/null
|
||||||
|
|
Loading…
Add table
Reference in a new issue