#!/bin/bash
PSGWRKDIR=`pwd`
cd ..
rm -rf buildroot
git clone https://github.com/buildroot/buildroot.git
cd buildroot
#git checkout 2021.11.3
#==== Patches
for i in ../PSG/patches/*.patch
do
        echo "==Apply patch : <$i> =="
        patch -p1 < $i
done
#----
chmod a+x *.sh
cp ../PSG/configs/* ./configs
git add .
git commit -m "PSG wrk changes and setup"
make  BR2_EXTERNAL=../PSG iot2050_V2_defconfig
cd $PSGWRKDIR
