Update install script to be used on second level directory from Linux_for_Tegra/*/install.sh

This commit is contained in:
dchvs 2021-01-21 13:02:31 -06:00
parent 1f0f122de2
commit 554c6d4c02
1 changed files with 12 additions and 12 deletions

View File

@ -30,7 +30,7 @@ chkhost(){
#check if bsp installed in the correct folder on host machine
chkfolder(){
if [ $(basename $(dirname $(pwd))) != "Linux_for_Tegra" ] || [ $(basename $(pwd)) != "CTI-L4T" ]; then
if [ $(basename $(dirname $(dirname $(pwd)))) != "Linux_for_Tegra" ] || [ $(basename $(pwd)) != "CTI-L4T" ]; then
echo "This BSP should be extracted in the Linux_for_Tegra directory"
echo "of your Jetpack install. This install script must be run from the"
echo "Linux_for_Tegra/CTI-L4T directory"
@ -41,32 +41,32 @@ chkfolder(){
install_conf(){
cp -r ./conf/* ..
cp -r ./conf/* $PWD/../..
}
install_dtb(){
cp ./kernel/dtb/* ../kernel/dtb/
cp ./kernel/dtb/* $PWD/../../kernel/dtb/
}
install_kernel(){
cp ./kernel/*Image ../kernel/
cp ./kernel/kernel_supplements.tbz2 ../kernel/
cp ./kernel/*Image $PWD/../../kernel/
cp ./kernel/kernel_supplements.tbz2 $PWD/../../kernel/
}
install_bl(){
cp -r ./bl/* ../bootloader/
cp -r ./bl/* $PWD/../../bootloader/
}
install_rootfs(){
cp -r ./rootfs/* ../rootfs/
cp -r ./rootfs/* $PWD/../../rootfs/
}
install_ver_file(){
mkdir -p ../rootfs/etc/cti
mkdir -p $PWD/../../rootfs/etc/cti
echo $CTI_L4T_VER > ../rootfs/etc/cti/CTI-L4T.version
echo $CTI_L4T_VER > $PWD/../../rootfs/etc/cti/CTI-L4T.version
}
@ -110,8 +110,8 @@ chkfolder
tar -pxzf resources.tgz
#install CTI-flash
mv cti-flash.sh ..
chmod +x ../cti-flash.sh
mv cti-flash.sh $PWD/../..
chmod +x $PWD/../../cti-flash.sh
install_conf
@ -123,7 +123,7 @@ install_kernel
install_ver_file
pushd ..
pushd $PWD/../..
./apply_binaries.sh