diff options
Diffstat (limited to 'recipes-bsp/cppi-lld/files/init_cppi.sh')
-rwxr-xr-x | recipes-bsp/cppi-lld/files/init_cppi.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/recipes-bsp/cppi-lld/files/init_cppi.sh b/recipes-bsp/cppi-lld/files/init_cppi.sh new file mode 100755 index 00000000..7a602dab --- /dev/null +++ b/recipes-bsp/cppi-lld/files/init_cppi.sh | |||
@@ -0,0 +1,47 @@ | |||
1 | #* | ||
2 | #* Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ | ||
3 | #* | ||
4 | #* | ||
5 | #* Redistribution and use in source and binary forms, with or without | ||
6 | #* modification, are permitted provided that the following conditions | ||
7 | #* are met: | ||
8 | #* | ||
9 | #* Redistributions of source code must retain the above copyright | ||
10 | #* notice, this list of conditions and the following disclaimer. | ||
11 | #* | ||
12 | #* Redistributions in binary form must reproduce the above copyright | ||
13 | #* notice, this list of conditions and the following disclaimer in the | ||
14 | #* documentation and/or other materials provided with the | ||
15 | #* distribution. | ||
16 | #* | ||
17 | #* Neither the name of Texas Instruments Incorporated nor the names of | ||
18 | #* its contributors may be used to endorse or promote products derived | ||
19 | #* from this software without specific prior written permission. | ||
20 | #* | ||
21 | |||
22 | #! /bin/sh | ||
23 | compatible=$(cat /proc/device-tree/compatible) | ||
24 | |||
25 | cd /usr/lib | ||
26 | case "$compatible" in | ||
27 | *k2hk*) | ||
28 | device=k2hk | ||
29 | ln -sf libcppi_k2h.so.1.0.0 libcppi_device.so.1 | ||
30 | ;; | ||
31 | *k2l*) | ||
32 | device=k2l | ||
33 | ln -sf libcppi_k2l.so.1.0.0 libcppi_device.so.1 | ||
34 | ;; | ||
35 | *k2e*) | ||
36 | device=k2e | ||
37 | ln -sf libcppi_k2e.so.1.0.0 libcppi_device.so.1 | ||
38 | ;; | ||
39 | *) | ||
40 | device=unknown | ||
41 | ;; | ||
42 | esac | ||
43 | |||
44 | if [ $device != unknown ]; then | ||
45 | ln -sf libcppi_device.so.1 libcppi_device.so | ||
46 | echo cppi library link established for device : $device | ||
47 | fi | ||