Skip to content

Commit

Permalink
1.12.01 release: Apache license updates
Browse files Browse the repository at this point in the history
Update Docs with latest docs based on 2.08.01 release

Delete FW file
  • Loading branch information
Eman Copty committed Oct 8, 2018
1 parent fd8fd03 commit b634f48
Show file tree
Hide file tree
Showing 198 changed files with 3,392 additions and 1,161 deletions.
471 changes: 471 additions & 0 deletions ATTRIBUTIONS

Large diffs are not rendered by default.

225 changes: 32 additions & 193 deletions LICENSE

Large diffs are not rendered by default.

225 changes: 32 additions & 193 deletions api/LICENSE

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions api/include/mvnc.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
*
* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef __MVNC_H_INCLUDED__
#define __MVNC_H_INCLUDED__

Expand Down
17 changes: 17 additions & 0 deletions api/include/mvnc_deprecated.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
*
* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef __MVNC_DEPRECATED_H_INCLUDED__
#define __MVNC_DEPRECATED_H_INCLUDED__

Expand Down
28 changes: 13 additions & 15 deletions api/python/mvnc/mvncapi.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# Copyright 2017 Intel Corporation.
# The source code, information and material ("Material") contained herein is
# owned by Intel Corporation or its suppliers or licensors, and title to such
# Material remains with Intel Corporation or its suppliers or licensors.
# The Material contains proprietary information of Intel or its suppliers and
# licensors. The Material is protected by worldwide copyright laws and treaty
# provisions.
# No part of the Material may be used, copied, reproduced, modified, published,
# uploaded, posted, transmitted, distributed or disclosed in any way without
# Intel's prior express written permission. No license under any patent,
# copyright or other intellectual property rights in the Material is granted to
# or conferred upon you, either expressly, by implication, inducement, estoppel
# or otherwise.
# Any license under such intellectual property rights must be express and
# approved by Intel in writing.
# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
import numpy
Expand Down
9 changes: 7 additions & 2 deletions api/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ LDFLAGS += -shared
OBJS := $(SRCS:%.c=$(OBJDIR)/%.o)
DEPS := $(OBJS:.o=.d)

all: obj-$(ARCH)/libmvnc.so.0
all: $(OBJDIR)/$(OUT) get_mvcmd

$(OBJDIR)/$(OUT): $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
Expand All @@ -39,6 +39,10 @@ $(OBJDIR):

-include $(DEPS)

.PHONY: get_mvcmd
get_mvcmd:
@./get_mvcmd.sh

basicinstall: $(OBJDIR)/$(OUT)
mkdir -p $(INSTALLDIR)/include/
mkdir -p $(INSTALLDIR)/lib/
Expand All @@ -61,7 +65,7 @@ postinstall:
udevadm trigger
ldconfig

install: basicinstall pythoninstall postinstall
install: get_mvcmd basicinstall pythoninstall postinstall

uninstall:
rm -f $(INSTALLDIR)/lib/libmvnc.so.0
Expand All @@ -79,3 +83,4 @@ clean:
rm -f $(OBJS)
rm -rf $(OBJDIR)
rm -f libmvnc.so
find mvnc/ -type f -delete
6 changes: 6 additions & 0 deletions api/src/Makefile.rpi
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ LDFLAGS += -shared
OBJS := $(SRCS:%.c=$(OBJDIR)/%.o)
DEPS := $(OBJS:.o=.d)

all: $(OBJDIR)/$(OUT) get_mvcmd

get_mvcmd:
@./get_mvcmd.sh

$(OBJDIR)/$(OUT): $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)

Expand All @@ -41,3 +46,4 @@ clean:
rm -f $(OUT)
rm -f $(OBJS)
rm -rf $(OBJDIR)
find mvnc/ -type f -delete
29 changes: 14 additions & 15 deletions api/src/USBLinkDefines.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
/*
* Copyright 2017 Intel Corporation.
* The source code, information and material ("Material") contained herein is
* owned by Intel Corporation or its suppliers or licensors, and title to such
* Material remains with Intel Corporation or its suppliers or licensors.
* The Material contains proprietary information of Intel or its suppliers and
* licensors. The Material is protected by worldwide copyright laws and treaty
* provisions.
* No part of the Material may be used, copied, reproduced, modified, published,
* uploaded, posted, transmitted, distributed or disclosed in any way without
* Intel's prior express written permission. No license under any patent,
* copyright or other intellectual property rights in the Material is granted to
* or conferred upon you, either expressly, by implication, inducement, estoppel
* or otherwise.
* Any license under such intellectual property rights must be express and
* approved by Intel in writing.
*
* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef _USBLINKCOMMONDEFINES_H
Expand Down
29 changes: 14 additions & 15 deletions api/src/common.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
/*
* Copyright 2017 Intel Corporation.
* The source code, information and material ("Material") contained herein is
* owned by Intel Corporation or its suppliers or licensors, and title to such
* Material remains with Intel Corporation or its suppliers or licensors.
* The Material contains proprietary information of Intel or its suppliers and
* licensors. The Material is protected by worldwide copyright laws and treaty
* provisions.
* No part of the Material may be used, copied, reproduced, modified, published,
* uploaded, posted, transmitted, distributed or disclosed in any way without
* Intel's prior express written permission. No license under any patent,
* copyright or other intellectual property rights in the Material is granted to
* or conferred upon you, either expressly, by implication, inducement, estoppel
* or otherwise.
* Any license under such intellectual property rights must be express and
* approved by Intel in writing.
*
* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// Common logging macros
Expand Down
107 changes: 107 additions & 0 deletions api/src/get_mvcmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#! /bin/bash
#
# Attempt to download tar file to get firmware.
# If download fails, restore saved firmware if the NCSDK installed version in /opt/movidius matches NCSDK version of this distribution.
# If download fails and versions mismatch, then existing firmware isn't restored.
#

# ncsdk_link is the url (set in install.sh & get_mvcmd.sh)
ncsdk_link=https://downloadmirror.intel.com/28192/eng/NCSDK-1.12.01.01.tar.gz
NCSDK_API_VERSION=$(basename $ncsdk_link | awk -F. '{print $1"."$2"."$3"."$4}' | awk -F'NCSDK-' '{print $2}')
download_filename="NCSDK-${NCSDK_API_VERSION}.tar.gz"

mvcmd_dir=./mvnc
mvcmd_old_dir=./mvnc.old


function restore_old_fw()
{
# remove the tar file if downloaded
[ -f ./${download_filename} ] && rm -rf ./${download_filename}

# Require old FW to exist
if [ ! -d ${mvcmd_old_dir} ] ; then
echo "Error restoring old firmware - directory ${mvcmd_old_dir} doesn't exist. Will exit"
exit 1
fi

# Remove FW directory if it exists
[ -d ${mvcmd_dir} ] && rm -rf ${mvcmd_dir}

# check version of installed NCSDK vs. version of API
NCSDK_installed_version_file="/opt/movidius/version.txt"
if [ -f ${NCSDK_installed_version_file} ] ; then
NCSDK_INSTALLED_VERSION=$(cat ${NCSDK_installed_version_file} )

# compare installed version with API
if [ "${NCSDK_API_VERSION}" = "${NCSDK_INSTALLED_VERSION}" ] ; then
mv -f ${mvcmd_old_dir} ${mvcmd_dir}
echo "Warning: Restored old firmware"
else
echo "Error: Old firmware version=${NCSDK_API_VERSION} doesn't match installed NCSDK version ${NCSDK_INSTALLED_VERSION}."
echo " Not restoring old firmware directory, ${mvcmd_old_dir}. Will exit"
exit 1
fi

else
echo "Warning: Cannot find NCSDK installed version file ${NCSDK_installed_version_file}."
mv -f ${mvcmd_old_dir} ${mvcmd_dir}
echo "Warning: Restored old firmware and exiting"
fi

exit 0
}


# If exists, rename existing FW
[ -d ${mvcmd_old_dir} ] && rm -rf ${mvcmd_old_dir}
[ -d ${mvcmd_dir} ] && mv -f ${mvcmd_dir} ${mvcmd_old_dir}


# download file if not already available
if [ -f ../../${download_filename} ] ; then
[ -f ${download_filename} ] && rm -f ${download_filename}
ln -s ../../${download_filename} .
else
# download, ncsdk_download_link set in install-utilities.sh function initialize_constants()
wget -q --no-cache -O ${download_filename} ${ncsdk_link}
if [ $? -ne 0 ]; then
echo "Error downloading $ncsdk_download_link. Will try to restore existing firmware"
restore_old_fw
fi
fi

# ncsdk_pkg is the filename without the .tar.gz extension
ncsdk_pkg=${download_filename%%.tar.gz}

# create mvnc directory
mkdir -p ${mvcmd_dir}

# search for FW in tarball
ARCH=$(uname -m)
tar -tf ${download_filename} | grep -q "ncsdk-${ARCH}/fw/$"
if [ $? -ne 0 ] ; then
echo "Error firmware, ncsdk-${ARCH}/fw/, not found in tar file ${download_filename}. Will try to restore existing firmware"
restore_old_fw
fi


tar -xf ${download_filename} --strip-components=3 -C ${mvcmd_dir} NCSDK-${NCSDK_API_VERSION}/ncsdk-${ARCH}/fw/
if [ $? -ne 0 ]; then
echo "Error extracting tar file ${download_filename}. Will try to restore existing firmware"
restore_old_fw
fi

# check for FW
ls mvnc/*.mvcmd >& /dev/null
if [ $? -eq 0 ]; then
echo "NCSDK FW successfully installed"
# remove old FW dir if it exists
[ -d ${mvcmd_old_dir} ] && rm -rf ${mvcmd_old_dir}
else
echo "ERROR NCSDK FW not found after downloading. Will try to restore existing firmware"
restore_old_fw
fi

# remove the tar file
rm -rf ${download_filename}
Binary file removed api/src/mvnc/MvNCAPI.mvcmd
Binary file not shown.
29 changes: 14 additions & 15 deletions api/src/mvnc_api.c
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
/*
* Copyright 2017 Intel Corporation.
* The source code, information and material ("Material") contained herein is
* owned by Intel Corporation or its suppliers or licensors, and title to such
* Material remains with Intel Corporation or its suppliers or licensors.
* The Material contains proprietary information of Intel or its suppliers and
* licensors. The Material is protected by worldwide copyright laws and treaty
* provisions.
* No part of the Material may be used, copied, reproduced, modified, published,
* uploaded, posted, transmitted, distributed or disclosed in any way without
* Intel's prior express written permission. No license under any patent,
* copyright or other intellectual property rights in the Material is granted to
* or conferred upon you, either expressly, by implication, inducement, estoppel
* or otherwise.
* Any license under such intellectual property rights must be express and
* approved by Intel in writing.
*
* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#define _GNU_SOURCE
Expand Down
29 changes: 14 additions & 15 deletions api/src/usb_boot.c
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
/*
* Copyright 2017 Intel Corporation.
* The source code, information and material ("Material") contained herein is
* owned by Intel Corporation or its suppliers or licensors, and title to such
* Material remains with Intel Corporation or its suppliers or licensors.
* The Material contains proprietary information of Intel or its suppliers and
* licensors. The Material is protected by worldwide copyright laws and treaty
* provisions.
* No part of the Material may be used, copied, reproduced, modified, published,
* uploaded, posted, transmitted, distributed or disclosed in any way without
* Intel's prior express written permission. No license under any patent,
* copyright or other intellectual property rights in the Material is granted to
* or conferred upon you, either expressly, by implication, inducement, estoppel
* or otherwise.
* Any license under such intellectual property rights must be express and
* approved by Intel in writing.
*
* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// USB utility for use with Myriad2v2 ROM
Expand Down
Loading

0 comments on commit b634f48

Please sign in to comment.