#!/bin/bash
#-- build kernelsources from RCN Repos
#--
GFAWRKDIR=`pwd`
cd ..
rm -rf bb-kernel
git clone https://github.com/RobertCNelson/bb-kernel
cd bb-kernel
git checkout -b GfA 4.4.65-bone-rt-r17
# -- patch kernelbuild
patch -p1 < ../GfA/build_kernel.sh.patch
#---------------------------------
./build_kernel.sh
cd $GFAWRKDIR
tar -C ../bb-kernel/KERNEL --exclude=./.config --exclude=./.git  -czvf GfAkernel.tar.gz ./
#--
#--
#!/bin/bash
GFAWRKDIR=`pwd`
cd ..
rm -rf buildroot
git clone git://git.buildroot.net/buildroot
cd buildroot
git checkout 63a20d5dfebe83e2b2bd683dc78ebdf787dff100 -b gfawrk
patch -p1 < ../GfA/GfA-buildroot-changes.patch
patch -p1 < ../GfA/GfA-buildroot_revert_S80ti-gfx_frambuffersettings.patch
patch -p1 < ../GfA/GfA-buildroot_MapImage_build_path.patch
patch -p1 < ../GfA/GfA-buildroot-LegalInfo_zip_in_separate_script.patch
patch -p1 < ../GfA/GfA-buildroot_mysql_posgres_update_fixes.patch
patch -p1 < ../GfA/GfA-buildroot_remove_crontab_root_entry_from_update.patch
patch -p1 < ../GfA/GfA-buildroot_bump_tinc_to_v_1_0_31.patch
patch -p1 < ../GfA/GfA-buildroot_linux_headers_for_rs485.patch
patch -p1 < ../GfA/GfA-buildroot_force_mutt_to_bind_openssl.patch
patch -p1 < ../GfA/GfA-buildroot_remove_hostapd_and_wpa_supplicant_from_update.patch
patch -p1 < ../GfA/GfA-buildroot_qt57-qt5quickcontrols_mk.patch
patch -p1 < ../GfA/GfA-buildroot_qt57-qt5quickcontrols2_mk.patch
patch -p1 < ../GfA/GfA-buildroot_qt-latest_qt-LTS-5.6.2.patch
#
chmod a+x *.sh
cp ../GfA/configs/* ./configs
git add .
git commit -m "GfA wrk changes and setup"
make BR2_EXTERNAL=../GfA Display001_4.4.65_rt17_defconfig
##make BR2_EXTERNAL=../GfA Display001_4.4.65_rt17_Qt5.6.2_defconfig
cd $GFAWRKDIR
#------

