docs: Update README and compilation guides for clarity and consistency, including path corrections and improved formatting. Add copyright notices to source files and adjust file permissions for several scripts and directories.

This commit is contained in:
dian.yuan 2026-02-28 11:06:26 +08:00
parent f960c5030d
commit bd891a96dd
136 changed files with 14413 additions and 9399 deletions

View file

@ -94,7 +94,7 @@ To compile the CPP project using Android NDK, please follow these steps:
**Hardware Requirements**:
- SOC: A311D2
- DDR: 4GB
- DDR: = 4GB
**System Requirements**:
- OS: Ubuntu 22.04

View file

@ -1,3 +1,19 @@
#
# Copyright (C) 20242025 Amlogic, Inc. 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.
#
LOCAL_PATH := $(call my-dir)
LLM_SDK_PATH := $(LOCAL_PATH)/../../../../amlnn-toolkit/nn_runtime/llmsdk
3RDPARTY_PATH := $(LOCAL_PATH)/../../../dependency
@ -17,4 +33,15 @@ LOCAL_LDLIBS := -llog -ldl -lm -fuse-ld=ld
LOCAL_MODULE := demo_llm_main
LOCAL_LICENSE_KINDS := SPDX-License-Identifier: Apache-2.0
LOCAL_LICENSE_CONDITIONS := notice
LOCAL_LICENSE_COMMENTS := Copyright (C) 20242025 Amlogic, Inc. All rights reserved.
LOCAL_LICENSE_URL := https://www.apache.org/licenses/LICENSE-2.0
LOCAL_LICENSE_FILE := LICENSE
include $(BUILD_EXECUTABLE)

View file

@ -3,30 +3,6 @@ cmake_minimum_required(VERSION 3.5.1)
set(CMAKE_SYSTEM_NAME Linux)
project(AML_LLM_NNSDK)
# xinxin, when building the .so with Yocto using CMake, you can remove the sysroot settings
# from these CMakeLists.txt files and use the officially recommended approach instead:
# after sourcing the environment script, many environment variables will be set (check with `export`),
# and CMake will configure itself automatically based on them without needing explicit settings here.
# source /mnt/fileroot/xinxin.he/environment/new-yocto/64/environment-setup-armv8a-poky-linux
# export CXXFLAGS=$(echo "$CXXFLAGS" | sed 's/-g//g')
# export CFLAGS=$(echo "$CXXFLAGS" | sed 's/-g//g')
# cmake -DCMAKE_TOOLCHAIN_FILE=${OE_CMAKE_TOOLCHAIN_FILE} ..
# # Set Yocto cross-compilation environment
# set(SYSROOT_PATH /mnt/fileroot/xinxin.he/environment/new-yocto/64/sysroots/x86_64-pokysdk-linux)
# set(CMAKE_SYSROOT "${SYSROOT_PATH}")
# message(STATUS "Using sysroot path as ${SYSROOT_PATH}")
# include(CMakeForceCompiler)
# cmake_force_c_compiler("${SYSROOT_PATH}/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc" GNU)
# cmake_force_cxx_compiler("${SYSROOT_PATH}/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++" GNU)
# # Set the sysroot for the actual target board
# set(MYSYSROOT "/mnt/fileroot/xinxin.he/environment/new-yocto/64/sysroots/armv8a-poky-linux")
# add_definitions("--sysroot=${MYSYSROOT}")
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --sysroot=${MYSYSROOT}" CACHE INTERNAL "" FORCE)
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --sysroot=${MYSYSROOT}" CACHE INTERNAL "" FORCE)
# set(CMAKE_FIND_ROOT_PATH "${MYSYSROOT}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View file

@ -1,5 +1,21 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2026 Amlogic, Inc. 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 argparse
import sys
from datetime import datetime