Skip to content

Commit c023632

Browse files
committed
Merge commit '7db8a7d66ee9f2919310ac5e7a5f9c10a290f021'
2 parents 6ce558e + 7db8a7d commit c023632

17 files changed

+231
-227
lines changed

meta-linkx/README

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Welcome to AliOS Things Linux Edition !!!
22

3-
Linkx for Alios Things.
3+
LinkX for AliOS Things.
File renamed without changes.

meta-linkx/classes/base.bbclass

-67
This file was deleted.

meta-linkx/conf/bitbake.conf

-50
This file was deleted.
-1.37 MB
Binary file not shown.

meta-linkx/recipes-linkkit/linkkit.inc

-46
This file was deleted.

meta-linkx/recipes-linkkit/linkkit.init

-37
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
test -x /usr/bin/comboapp || (echo "Error: missing comboapp"; exit 0)
3+
test -x /usr/bin/rtk_hciattach || (echo "Error: missing rtk_hciattach"; exit 0)
4+
test -x /usr/bin/hciconfig || (echo "Error: missing hciconfig"; exit 0)
5+
6+
function start_bluetooth()
7+
{
8+
echo "Starting bluetooth..."
9+
rm -f /etc/init.d/bluetooth
10+
echo 0 > /sys/class/rfkill/rfkill0/state
11+
sleep 1
12+
echo 1 > /sys/class/rfkill/rfkill0/state
13+
sleep 1
14+
rtk_hciattach -n -s 115200 /dev/ttyS4 rtk_h5 &
15+
sleep 3
16+
}
17+
18+
case "$1" in
19+
start)
20+
start_bluetooth
21+
echo "Starting comboapp..."
22+
start-stop-daemon --start --exec /usr/bin/comboapp &
23+
;;
24+
stop)
25+
echo "Stopping comboapp..."
26+
start-stop-daemon --stop --exec /usr/bin/comboapp
27+
;;
28+
restart)
29+
$0 stop
30+
sleep 1
31+
$0 start
32+
;;
33+
*)
34+
echo "Usage: /etc/init.d/linkkit {start|stop|restart}"
35+
exit 1
36+
;;
37+
esac
38+
39+
exit 0
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/sh
2+
3+
### BEGIN INIT INFO
4+
# Provides: linkkit
5+
# Required-Start: $network
6+
# Required-Stop: $network
7+
# Default-Start: S 2 3 4 5
8+
# Default-Stop: 0 1 6
9+
# Description: Living Link is platform service which provides customers with a
10+
# smart devices developerment management platform, especially for smart life area.
11+
# link to https://living.aliyun.com/
12+
### END INIT INFO
13+
14+
test -x /usr/bin/linkkitapp || exit 0
15+
16+
case "$1" in
17+
start)
18+
echo "Starting linkkitapp..."
19+
start-stop-daemon --start --exec /usr/bin/linkkitapp > /var/log/linkkit.log 2>&1 &
20+
;;
21+
stop)
22+
echo "Stopping linkkitapp..."
23+
start-stop-daemon --stop --exec /usr/bin/linkkitapp
24+
;;
25+
restart)
26+
$0 stop
27+
sleep 1
28+
$0 start
29+
;;
30+
*)
31+
echo "Usage: /etc/init.d/linkkit {start|stop|restart}"
32+
exit 1
33+
;;
34+
esac
35+
36+
exit 0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh
2+
3+
test -x /usr/bin/ywssapp || exit 0
4+
5+
case "$1" in
6+
start)
7+
echo "Starting ywssapp..."
8+
start-stop-daemon --start --exec /usr/bin/ywssapp > /var/log/ywss.log 2>&1 &
9+
;;
10+
stop)
11+
echo "Stopping ywssapp..."
12+
start-stop-daemon --stop --exec /usr/bin/ywssapp
13+
;;
14+
restart)
15+
$0 stop
16+
sleep 1
17+
$0 start
18+
;;
19+
*)
20+
echo "Usage: /etc/init.d/ywss {start|stop|restart}"
21+
exit 1
22+
;;
23+
esac
24+
25+
exit 0
+32-26
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
1-
# FILESEXTRAPATHS_prepend := "${THISDIR}/patches:"
2-
# PATCH_FILE_X86_64 = " file://0001-Port-x86-64.patch;patch=1"
3-
# PATCH_FILE_RPI = " file://0002-Port-raspberrypi.patch;patch=1"
4-
5-
# patching according to MACHINE
6-
# python() {
7-
# bb.note("xiaxiaowen")
8-
# getmachine = d.getVar("MACHINE", True)
9-
# bb.note("%s" % getmachine)
10-
# if getmachine == "qemux86-64":
11-
# bb.note("patching %s" % d.getVar("PATCH_FILE_X86_64", True))
12-
# d.setVar("SRC_URI_append", d.getVar("PATCH_FILE_X86_64", True))
13-
# elif getmachine == "raspberrypi3-64":
14-
# bb.note("patching %s" % d.getVar("PATCH_FILE_RPI", True))
15-
# d.setVar("SRC_URI_append", d.getVar("PATCH_FILE_RPI", True))
16-
# else:
17-
# bb.note("do not need to patch")
18-
# }
19-
20-
SRC_URI = "file://${THISDIR}/Linkkit-0.6.tar.gz \
21-
file://${THISDIR}/linkkit.init"
22-
23-
# source code dir
24-
S = "${WORKDIR}/Linkkit-0.6"
25-
1+
DESCRIPTION = "AliOS Things Linux Edition comboapp"
2+
SUMMARY = "AliOS Things Linux Edition comboapp"
3+
LICENSE = "Apache-2.0"
264
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
275

6+
#CFLAGS_prepend = " -g "
7+
8+
#DEPENDS += "bluez5"
9+
#DEPENDS := "${@bb.utils.contains('DISTRO_FEATURES','bluez5','bluez5','bluez4',d)}"
10+
11+
SRC_URI = "file://linkkit-0.6.tar.gz \
12+
file://combo.init \
13+
file://linkkit.kv"
14+
15+
# only support sysvinit for now.
16+
inherit update-rc.d
17+
18+
INITSCRIPT_NAME = "combo"
19+
INITSCRIPT_PARAMS = "defaults 87"
20+
21+
TARGET_CC_ARCH += "${LDFLAGS}"
22+
23+
do_compile() {
24+
make ARCH=${TARGET_ARCH} -f Makefile.comboapp wifi_module=rtk ble_module=rtk
25+
}
2826

29-
require linkkit.inc
27+
do_install() {
28+
# create linkkit dir
29+
install -d ${D}/${bindir}/
30+
install -d ${D}/${datadir}/linkkit/
31+
install -d ${D}/${INIT_D_DIR}
32+
install -m 0644 ${WORKDIR}/linkkit.kv ${D}/${datadir}/linkkit/linkkit.kv
33+
install -m 0755 ${WORKDIR}/combo.init ${D}/${INIT_D_DIR}/combo
34+
install -m 0755 ${B}/comboapp ${D}/${bindir}/comboapp
35+
}

0 commit comments

Comments
 (0)