summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/hyplnk-lld
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/hyplnk-lld')
-rwxr-xr-xrecipes-bsp/hyplnk-lld/files/init_hyplnk.sh43
-rw-r--r--recipes-bsp/hyplnk-lld/hyplnk-lld.inc9
-rw-r--r--recipes-bsp/hyplnk-lld/hyplnk-lld_git.bb24
3 files changed, 14 insertions, 62 deletions
diff --git a/recipes-bsp/hyplnk-lld/files/init_hyplnk.sh b/recipes-bsp/hyplnk-lld/files/init_hyplnk.sh
deleted file mode 100755
index d6795f16..00000000
--- a/recipes-bsp/hyplnk-lld/files/init_hyplnk.sh
+++ /dev/null
@@ -1,43 +0,0 @@
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
23compatible=$(cat /proc/device-tree/compatible)
24
25cd /usr/lib
26case "$compatible" in
27 *k2hk*)
28 device=k2hk
29 ln -sf libhyplnk_k2h.so.1.0.0 libhyplnk_device.so.1
30 ;;
31 *k2e*)
32 device=k2e
33 ln -sf libhyplnk_k2e.so.1.0.0 libhyplnk_device.so.1
34 ;;
35 *)
36 device=unknown
37 ;;
38esac
39
40if [ $device != unknown ]; then
41 ln -sf libhyplnk_device.so.1 libhyplnk_device.so
42 echo hyplnk library link established for device : $device
43fi
diff --git a/recipes-bsp/hyplnk-lld/hyplnk-lld.inc b/recipes-bsp/hyplnk-lld/hyplnk-lld.inc
index 09fec453..ecd68e9c 100644
--- a/recipes-bsp/hyplnk-lld/hyplnk-lld.inc
+++ b/recipes-bsp/hyplnk-lld/hyplnk-lld.inc
@@ -1,7 +1,8 @@
1DESCRIPTION = "TI Hyperlink Low Level Driver" 1DESCRIPTION = "TI Hyperlink Low Level Driver"
2LICENSE = "BSD-3-Clause" 2LICENSE = "BSD-3-Clause"
3 3
4COMPATIBLE_MACHINE = "keystone" 4COMPATIBLE_MACHINE = "k2hk-evm|k2e-evm"
5PACKAGE_ARCH = "${MACHINE_ARCH}"
5 6
6LLDNAME="hyplnk" 7LLDNAME="hyplnk"
7 8
@@ -22,9 +23,7 @@ SRCREV = "${HYPLNK_SRCREV}"
22PV = "2.1.0.5" 23PV = "2.1.0.5"
23INC_PR = "r2" 24INC_PR = "r2"
24 25
25DEVICELIST = " k2h \ 26DEVICELIST_k2hk-evm = "k2h k2k"
26 k2k \ 27DEVICELIST_k2e-evm = "k2e"
27 k2e \
28"
29 28
30S = "${WORKDIR}/${HYPLNK_GIT_DESTSUFFIX}" 29S = "${WORKDIR}/${HYPLNK_GIT_DESTSUFFIX}"
diff --git a/recipes-bsp/hyplnk-lld/hyplnk-lld_git.bb b/recipes-bsp/hyplnk-lld/hyplnk-lld_git.bb
index e20ad1f0..8ef3c823 100644
--- a/recipes-bsp/hyplnk-lld/hyplnk-lld_git.bb
+++ b/recipes-bsp/hyplnk-lld/hyplnk-lld_git.bb
@@ -1,16 +1,9 @@
1include hyplnk-lld.inc 1include hyplnk-lld.inc
2 2
3PR = "${INC_PR}.0" 3PR = "${INC_PR}.1"
4 4
5DEPENDS = "common-csl-ip" 5DEPENDS = "common-csl-ip"
6 6
7SRC_URI += "file://init_hyplnk.sh"
8
9inherit update-rc.d
10
11INITSCRIPT_NAME = "init_hyplnk.sh"
12INITSCRIPT_PARAMS = "defaults 10"
13
14do_compile () { 7do_compile () {
15 make -f makefile_armv7 clean PDK_INSTALL_PATH="${STAGING_INCDIR}" \ 8 make -f makefile_armv7 clean PDK_INSTALL_PATH="${STAGING_INCDIR}" \
16 HYPLNK_SRC_DIR="${S}" 9 HYPLNK_SRC_DIR="${S}"
@@ -25,12 +18,15 @@ do_install () {
25 make -f makefile_armv7 install PDK_INSTALL_PATH="${STAGING_INCDIR}" \ 18 make -f makefile_armv7 install PDK_INSTALL_PATH="${STAGING_INCDIR}" \
26 INSTALL_INC_BASE_DIR="${D}/${includedir}" \ 19 INSTALL_INC_BASE_DIR="${D}/${includedir}" \
27 INSTALL_LIB_BASE_DIR="${D}${libdir}" HYPLNK_SRC_DIR="${S}" 20 INSTALL_LIB_BASE_DIR="${D}${libdir}" HYPLNK_SRC_DIR="${S}"
28# Set the generic device library symbolic link to default k2h 21
22 # Set the generic device library symbolic link to default k2h
29 cd ${D}${libdir} 23 cd ${D}${libdir}
30 ln -sf libhyplnk_k2h.so.1.0.0 libhyplnk_device.so.1
31 ln -sf libhyplnk_device.so.1 libhyplnk_device.so
32# Copy init scripts
33 install -d ${D}${sysconfdir}/init.d/
34 install -c -m 755 ${WORKDIR}/init_hyplnk.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
35 24
25 # Link only the first device in the list
26 for device in ${DEVICELIST}
27 do
28 ln -sf libhyplnk_${device}.so.1.0.0 libhyplnk_device.so.1
29 break
30 done
31 ln -sf libhyplnk_device.so.1 libhyplnk_device.so
36} 32}