4545
4646apply_external_patches () {
4747 if [ $1 = ' apply' ]; then
48- git -C sources_$JETPACK_VERSION /$2 apply ${PWD} /$2 /$JETPACK_VERSION /*
48+ echo WOJTEK: git -C sources_$JETPACK_VERSION /$3 apply ${PWD} /$3 /$2 /*
49+ git -C sources_$JETPACK_VERSION /$3 apply ${PWD} /$3 /$2 /*
4950 elif [ $1 = ' reset' ]; then
50- if [[ -n $( git -C sources_$JETPACK_VERSION /$2 diff --quiet) || -n $( git -C sources_$JETPACK_VERSION /$2 diff --cached --quiet) ]]; then
51- read -p " Repo sources_$JETPACK_VERSION /$2 has changes that will be hard reset. Continue? (y/N): " confirm
51+ if [[ -n $( git -C sources_$JETPACK_VERSION /$3 diff --quiet) || -n $( git -C sources_$JETPACK_VERSION /$3 diff --cached --quiet) ]]; then
52+ read -p " Repo sources_$JETPACK_VERSION /$3 has changes that will be hard reset. Continue? (y/N): " confirm
5253 if [[ ! " $confirm " == " y" && ! " $confirm " == " Y" ]]; then
5354 exit 1
5455 fi
5556 fi
56- git -C sources_$JETPACK_VERSION /$2 reset --hard $3
57+ git -C sources_$JETPACK_VERSION /$2 reset --hard $4
5758 fi
5859}
5960
60- apply_external_patches $1 $D4XX_SRC_DST $L4T_VERSION
61+ apply_external_patches $1 $2 $ D4XX_SRC_DST $L4T_VERSION
6162
6263if [ -d ${KERNEL_DIR} /${JETPACK_VERSION} ]; then
63- apply_external_patches $1 $KERNEL_DIR $L4T_VERSION
64+ apply_external_patches $1 $2 $ KERNEL_DIR $L4T_VERSION
6465fi
6566
6667if [[ " $JETPACK_VERSION " == " 6.x" ]]; then
67- apply_external_patches $1 hardware/nvidia/t23x/nv-public $L4T_VERSION
68+ apply_external_patches $1 $2 hardware/nvidia/t23x/nv-public $L4T_VERSION
6869else
69- apply_external_patches $1 hardware/nvidia/platform/t19x/galen/kernel-dts $L4T_VERSION
70+ apply_external_patches $1 $2 hardware/nvidia/platform/t19x/galen/kernel-dts $L4T_VERSION
7071fi
7172
7273if [ $1 = ' apply' ]; then
@@ -79,4 +80,5 @@ if [ $1 = 'apply' ]; then
7980 fi
8081elif [ $1 = ' reset' ]; then
8182 [[ -f $DEVDIR /sources_$JETPACK_VERSION /${D4XX_SRC_DST} /drivers/media/i2c/d4xx.c ]] && rm $DEVDIR /sources_$JETPACK_VERSION /${D4XX_SRC_DST} /drivers/media/i2c/d4xx.c
83+ [[ -f $DEVDIR /sources_$JETPACK_VERSION /hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-camera-d4xx.dtsi ]] && rm $DEVDIR /sources_$JETPACK_VERSION /hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-camera-d4xx.dtsi
8284fi
0 commit comments