]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/dfe/create_dfe_lld_src_code_patch_from_git.sh
dfe-lld: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / dfe / create_dfe_lld_src_code_patch_from_git.sh
1 #!/bin/bash
3 set -e # Stop on the first error
4 #set -x # Echo on
6 # Use input arg as LLD version to put in patch filename
7 LLD_VERSION=$1
8 OUTPUT_FILENAME=dfe_pdklinuxdevkit_src_patch_3_01_04_07_ver_${LLD_VERSION}.tar.gz
10 # Print usage instructions
11 if [ "$LLD_VERSION" == "" ]
12 then
13     echo "Script to create DFE LLD source code patch from DFE LLD GIT repo which can be un-tarred"
14     echo "in the MCSDK install directory before rebuilding the DFE LLD libraries for ARM and DSP."
15     echo ""
16     echo "Usage:  $0 <LLD_version_number_to_use_in_patch_filename>"
17     echo "  i.e.  $0 01_00_00_08"
18     exit
19 else
20     echo "Creating source code patch file with name $OUTPUT_FILENAME"
21 fi
23 # Remove previous temp_patch_dir and create new one
24 rm -rf temp_patch_dir
25 mkdir -p temp_patch_dir
27 # Copy PDK directory patched source files
28 mkdir -p temp_patch_dir/pdk_keystone2_3_01_04_07/packages/ti/drv/dfe
29 cp --parents -t temp_patch_dir/pdk_keystone2_3_01_04_07/packages/ti/drv/dfe  build/armv7/*.mk build/c66/*.mk docs/ReleaseNotes_DFE_LLD.pdf src/*/*.c *.h package.xdc
31 # Copy mcsdk_linux directory patched source files
32 mkdir -p temp_patch_dir/mcsdk_linux_3_01_04_07/linux-devkit/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/include/ti/drv/dfe
33 cp --parents -t temp_patch_dir/mcsdk_linux_3_01_04_07/linux-devkit/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/include/ti/drv/dfe  *.h
35 # Copy script that will be used later to rebuild the LLD from the MCSDK and create the full patch file including libraries
36 cp --parents -t temp_patch_dir rebuild_dfe_lld_from_mcsdk_and_create_full_patch.sh
38 # Create tar.gz file with all patched source files
39 cd temp_patch_dir
40 tar czf $OUTPUT_FILENAME *
41 cd ..
42 mv temp_patch_dir/$OUTPUT_FILENAME .
43 rm -rf temp_patch_dir