forked from ZigFisher/glutinium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
96 changed files
with
1,051 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# | ||
# Copyright (C) 2006-2018 OpenWrt.org | ||
# | ||
# This is free software, licensed under the GNU General Public License v2. | ||
# See /LICENSE for more information. | ||
# | ||
|
||
# 2018.06.09 | ||
# В будущем сделать зависимость от платформы Hisilicon и конкретной версии ядра | ||
# Включить сборку из исходников himm, некоторых модулей ябра и библиотек сенсоров | ||
|
||
|
||
include $(TOPDIR)/rules.mk | ||
|
||
PKG_NAME:=hisi-osdrv1 | ||
PKG_VERSION:=3.0.8 | ||
PKG_RELEASE:=1.0.B.0 | ||
|
||
PKG_LICENSE:=MIT | ||
PKG_LICENSE_FILES:=HISILICON COPYING | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
define Package/$(PKG_NAME)/default | ||
SECTION:=openipc | ||
CATEGORY:=OpenIPC | ||
MAINTAINER:=Igor Zalatov <[email protected]> | ||
TITLE:=Hisilicon OSDRV-1 | ||
SUBMENU:=Hisilicon OSDRV-1 with kernel 3.0.8 | ||
URL:=http://zftlab.org | ||
DEPENDS:=+libstdcpp | ||
endef | ||
|
||
define Package/$(PKG_NAME)/Default/description | ||
Hisilicon OSDRV kernel modules, drivers, libs and tools | ||
endef | ||
|
||
define Package/$(PKG_NAME)-base | ||
$(call Package/$(PKG_NAME)/default) | ||
TITLE+= - base package | ||
endef | ||
|
||
define Package/$(PKG_NAME)-binary | ||
$(call Package/$(PKG_NAME)/default) | ||
TITLE+= - binary package | ||
endef | ||
|
||
define Package/$(PKG_NAME)-kmod | ||
$(call Package/$(PKG_NAME)/default) | ||
TITLE+= - kmod package | ||
endef | ||
|
||
define Package/$(PKG_NAME)-lib | ||
$(call Package/$(PKG_NAME)/default) | ||
TITLE+= - lib package | ||
endef | ||
|
||
define Package/$(PKG_NAME)-sensor | ||
$(call Package/$(PKG_NAME)/default) | ||
TITLE+= - sensor package | ||
endef | ||
|
||
define Package/$(PKG_NAME)-tool | ||
$(call Package/$(PKG_NAME)/default) | ||
TITLE+= - tool package | ||
DEPENDS:=+$(PKG_NAME)-base +$(PKG_NAME)-kmod +$(PKG_NAME)-lib +$(PKG_NAME)-sensor +libpthread | ||
endef | ||
|
||
define Build/Prepare | ||
endef | ||
|
||
define Build/Configure | ||
endef | ||
|
||
define Build/Compile | ||
endef | ||
|
||
define Build/InstallDev | ||
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/$(PKG_NAME) | ||
$(CP) ./include/* $(STAGING_DIR)/usr/include/$(PKG_NAME)/ | ||
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib | ||
$(CP) ./lib/*.so $(STAGING_DIR)/usr/lib/ | ||
endef | ||
|
||
define Package/$(PKG_NAME)-base/install | ||
$(INSTALL_DIR) $(1)/usr/bin | ||
$(CP) ./script/* $(1)/usr/bin/ | ||
endef | ||
|
||
define Package/$(PKG_NAME)-binary/install | ||
$(INSTALL_DIR) $(1)/usr/bin | ||
$(CP) ./binary/* $(1)/usr/bin/ | ||
endef | ||
|
||
define Package/$(PKG_NAME)-kmod/install | ||
$(INSTALL_DIR) $(1)/lib/modules/$(PKG_VERSION) | ||
$(CP) ./kmod/*.ko $(1)/lib/modules/$(PKG_VERSION) | ||
endef | ||
|
||
define Package/$(PKG_NAME)-lib/install | ||
$(INSTALL_DIR) $(1)/usr/lib | ||
$(CP) ./lib/lib*.so $(1)/usr/lib/ | ||
endef | ||
|
||
define Package/$(PKG_NAME)-sensor/install | ||
$(INSTALL_DIR) $(1)/usr/lib | ||
$(CP) ./sensor/libsns_*.so $(1)/usr/lib/ | ||
$(INSTALL_DIR) $(1)/etc/sensors | ||
$(CP) ./sensor/config/* $(1)/etc/sensors | ||
endef | ||
|
||
define Package/$(PKG_NAME)-tool/install | ||
$(INSTALL_DIR) $(1)/usr/bin | ||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-tool/himm $(1)/usr/bin/ | ||
endef | ||
|
||
$(eval $(call BuildPackage,$(PKG_NAME)-base)) | ||
$(eval $(call BuildPackage,$(PKG_NAME)-binary)) | ||
$(eval $(call BuildPackage,$(PKG_NAME)-kmod)) | ||
$(eval $(call BuildPackage,$(PKG_NAME)-lib)) | ||
$(eval $(call BuildPackage,$(PKG_NAME)-sensor)) | ||
#$(eval $(call BuildPackage,$(PKG_NAME)-tool)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
hisi-osdrv1 | ||
=========== | ||
|
||
Hisilicon OSDRV-1 kernel modules, drivers, libs and tools | ||
|
||
Support Hisilicon HI35xx SoC based devices with kernel 3.0.8 | ||
|
||
|
||
License | ||
======= | ||
|
||
This script is free software; you can redistribute it and/or modify it under the terms of | ||
the GNU Lesser General Public License as published by the Free Software Foundation; | ||
either version 2.1 of the License, or (at your option) any later version. | ||
|
||
You should have received a copy of the GNU Lesser General Public License along with this | ||
script; if not, please visit http://www.gnu.org/copyleft/gpl.html for more information. | ||
|
||
|
||
Usage | ||
===== | ||
|
||
More info for use rtsp-hisi on OpenWRT routers you can see [here (Russian)](http://zftlab.org) | ||
|
||
|
||
Links | ||
===== | ||
|
||
* [My Experiments with OpenWrt + Hisilicon and other SoC](https://github.com/ZigFisher/chaos_calmer) | ||
* [Glutinium - OpenWRT packages for extends functionality](https://github.com/ZigFisher/Glutinium) | ||
|
||
* [Best camopenwrt_docker](https://github.com/chertov/camopenwrt_docker) | ||
* [Сборка OpenWrt в Docker](http://telegra.ph/Sborka-openwrt-v-docker-06-09) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/sh | ||
# | ||
# Start himpp.... | ||
# | ||
|
||
HIMPP_PREFIX=/usr | ||
SENSOR_TYPE=$(fw_printenv sensor_type 2>/dev/null) | ||
SENSOR_TYPE=${SENSOR_TYPE:12} | ||
SENSOR_TYPE=${SENSOR_TYPE:-ov9712} | ||
|
||
start() { | ||
( | ||
echo -n "Starting himpp: " | ||
cd ${HIMPP_PREFIX}/lib/himpp-ko | ||
./load3518.sh -i ${SENSOR_TYPE} | ||
[ $? = 0 ] && echo "OK" || echo "FAIL" | ||
) | ||
} | ||
|
||
stop() { | ||
( | ||
echo -n "Stopping himpp: " | ||
cd ${HIMPP_PREFIX}/lib/himpp-ko | ||
./load3518.sh -r | ||
[ $? = 0 ] && echo "OK" || echo "FAIL" | ||
) | ||
} | ||
|
||
case "$1" in | ||
start) | ||
start | ||
;; | ||
stop) | ||
stop | ||
;; | ||
restart|reload) | ||
stop | ||
start | ||
;; | ||
*) | ||
echo "Usage: $0 {start|stop|restart}" | ||
exit 1 | ||
esac | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh | ||
|
||
# This is a sample, you should rewrite it according to your chip # | ||
# clock will be closed at uboot, so you needn't call it! | ||
|
||
clk_close() | ||
{ | ||
# Below clock operation is all from Hi3518, you should modify by datasheet! | ||
# himm 0x2003002c 0x15 # VIU reset and clock close(PERI_CRG16) | ||
# himm 0x20030034 0x57 # VOU reset and clock close, DAC PowerDown (PERI_CRG17) | ||
# himm 0x20030040 0x0 # VEDU reset and clock close (PERI_CRG18) | ||
# himm 0x20030060 0x0 # JPEG reset and clock close (PERI_CRG19) | ||
# himm 0x20030068 0x1 # MDU reset and clock close (PERI_CRG20) | ||
# himm 0x2003006c 0x1 # IVE reset and clock close (PERI_CRG22) | ||
# himm 0x20030058 0x1 # TDE reset and clock close (PERI_CRG23) | ||
# himm 0x2003008c 0x1; # SIO reset and clock close | ||
echo "clock close operation done!" | ||
} | ||
|
||
# open module clock while you need it! | ||
clk_cfg() | ||
{ | ||
himm 0x2003002c 0x2a; # VICAP, ISP unreset & clock enable | ||
himm 0x20030048 0x2; # VPSS unreset, code also config | ||
himm 0x20030034 0x510; # VDP unreset & HD clock enable | ||
himm 0x20030040 0x2; # VEDU unreset | ||
himm 0x20030060 0x2; # JPEG unreset | ||
himm 0x20030058 0x2; # TDE unreset | ||
himm 0x20030068 0x2; # MDU unreset | ||
|
||
#himm 0x2003006c 0x2; # IVE unreset | ||
#himm 0x2003008c 0x2; # SIO unreset and clock enable,m/f/bclk config in code. | ||
#himm 0x20050068 0x58000000 # Audio Codec channel config for power down. | ||
|
||
# USB not set | ||
# SDIO not set | ||
# SFC not set | ||
# NAND not set | ||
# CIPHER not set #(PERI_CRG31)himm 0x2003007c 0x2 | ||
# RTC use external clk | ||
# PWM not set #(PERI_CRG38)himm 0x20030038 0x2 | ||
# DMAC not set #(PERI_CRG56)himm 0x200300E0 0x2 | ||
# SPI not set | ||
# I2C not set | ||
# SENSE CLK not set | ||
# WDG not set | ||
|
||
echo "clock configure operation done!" | ||
} | ||
|
||
#clk_close | ||
clk_cfg |
Oops, something went wrong.