Commit 50351adc authored by carbon's avatar carbon

use buildroot to create rootfs

parent 713cbc4b
...@@ -37,4 +37,5 @@ CONFIG_ENABLE_RTOS_DUMP_PRINT=y ...@@ -37,4 +37,5 @@ CONFIG_ENABLE_RTOS_DUMP_PRINT=y
CONFIG_DUMP_PRINT_SZ_IDX=17 CONFIG_DUMP_PRINT_SZ_IDX=17
CONFIG_USE_4K_ERASE_SIZE_FOR_JFFS2=y CONFIG_USE_4K_ERASE_SIZE_FOR_JFFS2=y
CONFIG_USB_OSDRV_CVITEK_GADGET=n CONFIG_USB_OSDRV_CVITEK_GADGET=n
CONFIG_BUILDROOT_FS=y
CONFIG_BUILD_FOR_DEBUG=y CONFIG_BUILD_FOR_DEBUG=y
#!/bin/bash
function _build_default_env()
{
# Please keep these default value!!!
BRAND=${BRAND:-cvitek}
DEBUG=${DEBUG:-0}
RELEASE_VERSION=${RELEASE_VERSION:-0}
BUILD_VERBOSE=${BUILD_VERBOSE:-1}
ATF_BL32=${ATF_BL32:-1}
UBOOT_VBOOT=${UBOOT_VBOOT:-0}
COMPRESSOR=${COMPRESSOR:-xz}
COMPRESSOR_UBOOT=${COMPRESSOR_UBOOT:-lzma} # or none to disable
MULTI_PROCESS_SUPPORT=${MULTI_PROCESS_SUPPORT:-0}
ENABLE_BOOTLOGO=${ENABLE_BOOTLOGO:-0}
TPU_REL=${TPU_REL:-0} # TPU release build
SENSOR=${SENSOR:-sony_imx327}
}
function gettop()
{
local TOPFILE=build/cvisetup.sh
if [ -n "$TOP" -a -f "$TOP/$TOPFILE" ] ; then
# The following circumlocution ensures we remove symlinks from TOP.
(cd "$TOP"; PWD= /bin/pwd)
else
if [ -f $TOPFILE ] ; then
# The following circumlocution (repeated below as well) ensures
# that we record the true directory name and not one that is
# faked up with symlink names.
PWD= /bin/pwd
else
local HERE=$PWD
T=
while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
\cd ..
T=$(PWD= /bin/pwd -P)
done
\cd "$HERE"
if [ -f "$T/$TOPFILE" ]; then
echo "$T"
fi
fi
fi
}
function _build_fsbl_env()
{
export FSBL_PATH
}
function build_fsbl()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_uboot_env
_build_opensbi_env
cd "$BUILD_PATH" || return
make fsbl-build
)}
function clean_fsbl()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_uboot_env
cd "$BUILD_PATH" || return
make fsbl-clean
)}
function _build_atf_env()
{
export ATF_BL32 FAKE_BL31_32
}
function build_atf()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_atf_env
cd "$BUILD_PATH" || return
make arm-trusted-firmware
)}
function clean_atf()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_atf_env
cd "$BUILD_PATH" || return
make arm-trusted-firmware-clean
)}
function _build_uboot_env()
{
_build_atf_env
_build_fsbl_env
export UBOOT_OUTPUT_FOLDER IMGTOOL_PATH FLASH_PARTITION_XML FIP_BIN_PATH
export UBOOT_VBOOT RELEASE_VERSION ENABLE_BOOTLOGO STORAGE_TYPE COMPRESSOR_UBOOT
export PANEL_TUNING_PARAM PANEL_LANE_NUM_TUNING_PARAM PANEL_LANE_SWAP_TUNING_PARAM
}
function build_fip_pre()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_uboot_env
cd "$BUILD_PATH" || return
make fip-pre-merge
)}
function build_rtos()
{(
print_notice "Run ${FUNCNAME[0]}() function"
cd "$BUILD_PATH" || return
make rtos
)}
function clean_rtos()
{(
print_notice "Run ${FUNCNAME[0]}() function"
cd "$BUILD_PATH" || return
make rtos-clean
)}
function menuconfig_uboot()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_uboot_env
cd "$BUILD_PATH" || return
make u-boot-menuconfig || return "$?"
)}
function _link_uboot_logo()
{(
print_notice "Run ${FUNCNAME[0]}() function"
cd "$BUILD_PATH" || return
if [[ x"${PANEL_TUNING_PARAM}" =~ x"I80" ]]; then
ln -sf "$COMMON_TOOLS_PATH"/bootlogo/logo_320x240.BMP "$COMMON_TOOLS_PATH"/bootlogo/logo.jpg
fi
)}
function build_uboot()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_uboot_env
_build_opensbi_env
_link_uboot_logo
cd "$BUILD_PATH" || return
[[ "$CHIP_ARCH" == CV182X ]] || [[ "$CHIP_ARCH" == CV183X ]] && \
cp -f "$OUTPUT_DIR"/fip_pre/fip_pre_${ATF_KEY_SEL}.bin \
"$OUTPUT_DIR"/fip_pre/fip_pre.bin
make u-boot
)}
function build_uboot_env_tools()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_uboot_env
cd "$BUILD_PATH" || return
make u-boot-env-tools
)}
function clean_uboot()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_uboot_env
cd "$BUILD_PATH" || return
make u-boot-clean
)}
function _build_kernel_env()
{
export KERNEL_OUTPUT_FOLDER RAMDISK_OUTPUT_FOLDER SYSTEM_OUT_DIR
}
function menuconfig_kernel()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_kernel_env
cd "$BUILD_PATH" || return
make kernel-menuconfig || return "$?"
)}
function setconfig_kernel()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_kernel_env
cd "$BUILD_PATH" || return
make kernel-setconfig "SCRIPT_ARG=$1" || return "$?"
)}
# shellcheck disable=SC2120
function build_kernel()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_kernel_env
cd "$BUILD_PATH" || return
make kernel || return "$?"
# generate boot.itb image.
if [[ ${1} != noitb ]]; then
pack_boot || return "$?"
fi
)}
function clean_kernel()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_kernel_env
cd "$BUILD_PATH" || return
make kernel-clean
)}
function build_bld()
{(
print_notice "Run ${FUNCNAME[0]}() function"
cd "$BUILD_PATH" || return
make bld
)}
function clean_bld()
{(
print_notice "Run ${FUNCNAME[0]}() function"
cd "$BUILD_PATH" || return
make bld-clean
)}
function _build_middleware_env()
{
export MULTI_PROCESS_SUPPORT
}
function build_middleware()
{(
print_notice "Run ${FUNCNAME[0]}() function"
_build_middleware_env
cd "$BUILD_PATH" || return
make "$ROOTFS_DIR"
mkdir -p "$SYSTEM_OUT_DIR"/usr/bin
mkdir -p "$SYSTEM_OUT_DIR"/lib
pushd $MW_PATH
rm -rf lib
if [ -d $(echo ${CHIP_ARCH} | tr A-Z a-z)/lib_"$SDK_VER" ];
then
ln -s $(echo ${CHIP_ARCH} | tr A-Z a-z)/lib_"$SDK_VER" lib
else
ln -s lib_"$SDK_VER" lib
fi
if [ -d $(echo ${CHIP_ARCH} | tr A-Z a-z)/ko ];
then
rm -rf ko
ln -s $(echo ${CHIP_ARCH} | tr A-Z a-z)/ko ko
fi
popd
pushd "$MW_PATH"/component/isp
make all || return "$?"
popd
pushd "$MW_PATH"/sample
make all || return "$?"
find ./ -type f \( -iname "sample_*" ! -iname "*.*" \) -exec cp '{}' $SYSTEM_OUT_DIR/usr/bin \;
popd
# copy mw lib
cp -af "$MW_PATH"/lib/*.so* "$SYSTEM_OUT_DIR"/lib
cp -af "$MW_PATH"/lib/3rd/*.so* "$SYSTEM_OUT_DIR"/lib
# copy ko
mkdir -p "$SYSTEM_OUT_DIR"/ko
if [[ "$BUILD_FOR_DEBUG" != "y" ]]; then
cp -af "$MW_PATH"/ko_shrink/* "$SYSTEM_OUT_DIR"/ko/
else
cp -af "$MW_PATH"/ko/* "$SYSTEM_OUT_DIR"/ko/
fi
# add sdk version
echo "SDK_VERSION=${SDK_VER}" > "$SYSTEM_OUT_DIR"/sdk-release
)}
function clean_middleware()
{
print_notice "Run ${FUNCNAME[0]}() function "
pushd "$MW_PATH"/sample
make clean
popd
pushd "$MW_PATH"/component/isp
make clean
popd
}
function clean_ramdisk()
{
rm -rf "${RAMDISK_PATH:?}"/"$RAMDISK_OUTPUT_BASE"
rm -rf "$SYSTEM_OUT_DIR"
rm -rf "$ROOTFS_DIR"
}
function build_all()
{
# build bsp
build_uboot || return $?
build_kernel || return $?
build_middleware || return $?
pack_access_guard_turnkey_app || return $?
pack_ipc_turnkey_app || return $?
pack_boot || return $?
pack_cfg || return $?
pack_rootfs || return $?
pack_data
pack_system || return $?
copy_tools
pack_upgrade
}
function clean_all()
{
clean_uboot
clean_kernel
clean_ramdisk
clean_middleware
}
# shellcheck disable=SC2120
function envs_sdk_ver()
{
if [ -n "$1" ]; then
SDK_VER="$1"
fi
if [ "$SDK_VER" = 64bit ]; then
CROSS_COMPILE="$CROSS_COMPILE_64"
CROSS_COMPILE_PATH="$CROSS_COMPILE_PATH_64"
SYSROOT_PATH="$SYSROOT_PATH_64"
elif [ "$SDK_VER" = 32bit ]; then
CROSS_COMPILE="$CROSS_COMPILE_32"
CROSS_COMPILE_PATH="$CROSS_COMPILE_PATH_32"
SYSROOT_PATH="$SYSROOT_PATH_32"
elif [ "$SDK_VER" = uclibc ]; then
CROSS_COMPILE="$CROSS_COMPILE_UCLIBC"
CROSS_COMPILE_PATH="$CROSS_COMPILE_PATH_UCLIBC"
SYSROOT_PATH="$SYSROOT_PATH_UCLIBC"
elif [ "$SDK_VER" = glibc_riscv64 ]; then
CROSS_COMPILE="$CROSS_COMPILE_GLIBC_RISCV64"
CROSS_COMPILE_PATH="$CROSS_COMPILE_PATH_GLIBC_RISCV64"
SYSROOT_PATH="$SYSROOT_PATH_GLIBC_RISCV64"
elif [ "$SDK_VER" = musl_riscv64 ]; then
CROSS_COMPILE="$CROSS_COMPILE_MUSL_RISCV64"
CROSS_COMPILE_PATH="$CROSS_COMPILE_PATH_MUSL_RISCV64"
SYSROOT_PATH="$SYSROOT_PATH_MUSL_RISCV64"
else
echo -e "Invalid SDK_VER=${SDK_VER}"
exit 1
fi
TPU_OUTPUT_PATH="$OUTPUT_DIR"/tpu_"$SDK_VER"
# ramdisk packages PATH
pushd $BUILD_PATH || return $?
CVI_TARGET_PACKAGES_LIBDIR=$(make print-target-packages-libdir)
CVI_TARGET_PACKAGES_INCLUDE=$(make print-target-packages-include)
popd
export CVI_TARGET_PACKAGES_LIBDIR
export CVI_TARGET_PACKAGES_INCLUDE
OSS_TARBALL_PATH="$TPU_OUTPUT_PATH"/third_party
TPU_SDK_INSTALL_PATH="$TPU_OUTPUT_PATH"/cvitek_tpu_sdk
IVE_SDK_INSTALL_PATH="$TPU_OUTPUT_PATH"/cvitek_ive_sdk
IVS_SDK_INSTALL_PATH="$TPU_OUTPUT_PATH"/cvitek_ivs_sdk
AI_SDK_INSTALL_PATH="$TPU_OUTPUT_PATH"/cvitek_ai_sdk
CNV_SDK_INSTALL_PATH="$TPU_OUTPUT_PATH"/cvitek_cnv_sdk
TPU_MODEL_PATH="$TPU_OUTPUT_PATH"/models
IVE_CMODEL_INSTALL_PATH="$TPU_OUTPUT_PATH"/tools/ive_cmodel
}
function cvi_setup_env()
{
local _tmp ret
_build_default_env
_tmp=$(python3 "${TOP_DIR}/build/scripts/boards_scan.py" --gen-board-env="${CHIP}_${BOARD}")
ret=$?
[[ "$ret" == 0 ]] || return "$ret"
# shellcheck disable=SC1090
source <(echo "${_tmp}")
if [[ "$CHIP_ARCH" == "CV183X" ]];then
export CVIARCH="CV183X"
fi
if [[ "$CHIP_ARCH" == "CV182X" ]];then
export CVIARCH="CV182X"
fi
if [[ "$CHIP_ARCH" == "CV181X" ]];then
export CVIARCH="CV181X"
fi
if [[ "$CHIP_ARCH" == "CV180X" ]];then
export CVIARCH="CV180X"
fi
export BRAND BUILD_VERBOSE DEBUG PROJECT_FULLNAME
export OUTPUT_DIR ATF_PATH BM_BLD_PATH OPENSBI_PATH UBOOT_PATH FREERTOS_PATH
export KERNEL_PATH RAMDISK_PATH OSDRV_PATH TOOLS_PATH COMMON_TOOLS_PATH
PROJECT_FULLNAME="$CHIP"_"$BOARD"
# output folder path
INSTALL_PATH="$TOP_DIR"/install
OUTPUT_DIR="$INSTALL_PATH"/soc_"$PROJECT_FULLNAME"
ROOTFS_DIR="$OUTPUT_DIR"/rootfs
SYSTEM_OUT_DIR="$OUTPUT_DIR"/rootfs/mnt/system
# source file folders
FSBL_PATH="$TOP_DIR"/fsbl
ATF_PATH="$TOP_DIR"/arm-trusted-firmware
UBOOT_PATH="$TOP_DIR/$UBOOT_SRC"
FREERTOS_PATH="$TOP_DIR"/freertos
ALIOS_PATH="$TOP_DIR"/alios
KERNEL_PATH="$TOP_DIR"/"$KERNEL_SRC"
RAMDISK_PATH="$TOP_DIR"/ramdisk
BM_BLD_PATH="$TOP_DIR"/bm_bld
TOOLCHAIN_PATH="$TOP_DIR"/host-tools
OSS_PATH="$TOP_DIR"/oss
OPENCV_PATH="$TOP_DIR"/opencv
APPS_PATH="$TOP_DIR"/apps
MW_PATH="$TOP_DIR"/middleware/"$MW_VER"
ISP_TUNING_PATH="$TOP_DIR"/isp_tuning
TPU_SDK_PATH="$TOP_DIR"/cviruntime
IVE_SDK_PATH="$TOP_DIR"/ive
IVS_SDK_PATH="$TOP_DIR"/ivs
CNV_SDK_PATH="$TOP_DIR"/cnv
ACCESSGUARD_PATH="$TOP_DIR"/access-guard-turnkey
IPC_APP_PATH="$TOP_DIR"/framework/applications/ipc
AI_SDK_PATH="$TOP_DIR"/cviai
CVI_PIPELINE_PATH="$TOP_DIR"/cvi_pipeline
OPENSBI_PATH="$TOP_DIR"/opensbi
TOOLS_PATH="$BUILD_PATH"/tools
COMMON_TOOLS_PATH="$TOOLS_PATH"/common
VENC_PATH="$MW_PATH"/modules/venc
IMGTOOL_PATH="$COMMON_TOOLS_PATH"/image_tool
EMMCTOOL_PATH="$COMMON_TOOLS_PATH"/emmc_tool
SCRIPTTOOL_PATH="$COMMON_TOOLS_PATH"/scripts
ROOTFSTOOL_PATH="$COMMON_TOOLS_PATH"/rootfs_tool
SPINANDTOOL_PATH="$COMMON_TOOLS_PATH"/spinand_tool
BOOTLOGO_PATH="$COMMON_TOOLS_PATH"/bootlogo/logo.jpg
# subfolder path for buidling, chosen accroding to .gitignore rules
UBOOT_OUTPUT_FOLDER=build/"$PROJECT_FULLNAME"
RAMDISK_OUTPUT_BASE=build/"$PROJECT_FULLNAME"
KERNEL_OUTPUT_FOLDER=build/"$PROJECT_FULLNAME"
RAMDISK_OUTPUT_FOLDER="$RAMDISK_OUTPUT_BASE"/workspace
# toolchain
export CROSS_COMPILE_64=aarch64-linux-gnu-
export CROSS_COMPILE_32=arm-linux-gnueabihf-
export CROSS_COMPILE_UCLIBC=arm-cvitek-linux-uclibcgnueabihf-
export CROSS_COMPILE_64_NONOS=aarch64-elf-
export CROSS_COMPILE_64_NONOS_RISCV64=riscv64-unknown-elf-
export CROSS_COMPILE_GLIBC_RISCV64=riscv64-unknown-linux-gnu-
export CROSS_COMPILE_MUSL_RISCV64=riscv64-unknown-linux-musl-
export CROSS_COMPILE="$CROSS_COMPILE_64"
# toolchain path
CROSS_COMPILE_PATH_64="$TOOLCHAIN_PATH"/gcc/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu
CROSS_COMPILE_PATH_32="$TOOLCHAIN_PATH"/gcc/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf
CROSS_COMPILE_PATH_UCLIBC="$TOOLCHAIN_PATH"/gcc/arm-cvitek-linux-uclibcgnueabihf
CROSS_COMPILE_PATH_64_NONOS="$TOOLCHAIN_PATH"/gcc/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-elf
CROSS_COMPILE_PATH_64_NONOS_RISCV64="$TOOLCHAIN_PATH"/gcc/riscv64-elf-x86_64
CROSS_COMPILE_PATH_GLIBC_RISCV64="$TOOLCHAIN_PATH"/gcc/riscv64-linux-x86_64
CROSS_COMPILE_PATH_MUSL_RISCV64="$TOOLCHAIN_PATH"/gcc/riscv64-linux-musl-x86_64
CROSS_COMPILE_PATH="$CROSS_COMPILE_PATH_64"
# add toolchain path
pathprepend "$CROSS_COMPILE_PATH_64"/bin
pathprepend "$CROSS_COMPILE_PATH_32"/bin
pathprepend "$CROSS_COMPILE_PATH_64_NONOS"/bin
pathprepend "$CROSS_COMPILE_PATH_64_NONOS_RISCV64"/bin
pathprepend "$CROSS_COMPILE_PATH_GLIBC_RISCV64"/bin
pathprepend "$CROSS_COMPILE_PATH_MUSL_RISCV64"/bin
pathappend "$CROSS_COMPILE_PATH_UCLIBC"/bin
# sysroot
SYSROOT_PATH_64="$RAMDISK_PATH"/sysroot/sysroot-glibc-linaro-2.23-2017.05-aarch64-linux-gnu
SYSROOT_PATH_32="$RAMDISK_PATH"/sysroot/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf
SYSROOT_PATH_UCLIBC="$RAMDISK_PATH"/sysroot/sysroot-uclibc
SYSROOT_PATH_GLIBC_RISCV64="$RAMDISK_PATH"/sysroot/sysroot-glibc-riscv64
SYSROOT_PATH_MUSL_RISCV64="$RAMDISK_PATH"/sysroot/sysroot-musl-riscv64
SYSROOT_PATH="$SYSROOT_PATH_64"
# envs setup for specific ${SDK_VER}
envs_sdk_ver
if [ "${STORAGE_TYPE}" == "spinand" ]; then
PAGE_SUFFIX=2k
if [ ${NANDFLASH_PAGESIZE} == 4096 ]; then
PAGE_SUFFIX=4k
fi
if [[ "$ENABLE_ALIOS" != "y" ]]; then
pushd "$BUILD_PATH"/boards/"${CHIP_ARCH,,}"/"$PROJECT_FULLNAME"/partition/
ln -fs ../../../default/partition/partition_spinand_page_"$PAGE_SUFFIX".xml \
partition_"$STORAGE_TYPE".xml
popd
fi
fi
# configure flash partition table
if [ -z "${STORAGE_TYPE}" ]; then
FLASH_PARTITION_XML="$BUILD_PATH"/boards/default/partition/partition_none.xml
else
FLASH_PARTITION_XML="$BUILD_PATH"/boards/"${CHIP_ARCH,,}"/"$PROJECT_FULLNAME"/partition/partition_"$STORAGE_TYPE".xml
if ! [ -e "$FLASH_PARTITION_XML" ]; then
print_error "${FLASH_PARTITION_XML} does not exist!!"
return 1
fi
fi
export SYSTEM_OUT_DIR
export CROSS_COMPILE_PATH
# buildroot config
export BR_DIR="$TOP_DIR"/buildroot-2021.05
export BR_BOARD=milkv_duo_${SDK_VER}
export BR_OVERLAY_DIR=${BR_DIR}/board/milkv/${CHIP_ARCH}/overlay
export BR_DEFCONFIG=${BR_BOARD}_defconfig
export BR_ROOTFS_DIR="$OUTPUT_DIR"/tmp-rootfs
}
cvi_print_env()
{
echo -e ""
echo -e "\e[1;32m====== Environment Variables ======= \e[0m\n"
echo -e " PROJECT: \e[34m$PROJECT_FULLNAME\e[0m, DDR_CFG=\e[34m$DDR_CFG\e[0m"
echo -e " CHIP_ARCH: \e[34m$CHIP_ARCH\e[0m, DEBUG=\e[34m$DEBUG\e[0m"
echo -e " SDK VERSION: \e[34m$SDK_VER\e[0m, RPC=\e[34m$MULTI_PROCESS_SUPPORT\e[0m"
echo -e " ATF options: ATF_KEY_SEL=\e[34m$ATF_KEY_SEL\e[0m, BL32=\e[34m$ATF_BL32\e[0m"
echo -e " Linux source folder:\e[34m$KERNEL_SRC\e[0m, Uboot source folder: \e[34m$UBOOT_SRC\e[0m"
echo -e " CROSS_COMPILE_PREFIX: \e[34m$CROSS_COMPILE\e[0m"
echo -e " ENABLE_BOOTLOGO: $ENABLE_BOOTLOGO"
echo -e " Flash layout xml: $FLASH_PARTITION_XML"
echo -e " Sensor tuning bin: $SENSOR_TUNING_PARAM"
echo -e " Output path: \e[33m$OUTPUT_DIR\e[0m"
echo -e ""
}
function pack_access_guard_turnkey_app()
{
if [[ -d "$ACCESSGUARD_PATH" ]] && [[ "$BUILD_TURNKEY_ACCESSGUARD" = "y" ]]; then
mkdir -p "$SYSTEM_OUT_DIR"/data
cp -a ${ACCESSGUARD_PATH}/install "$SYSTEM_OUT_DIR"/data/
fi
}
function pack_ipc_turnkey_app()
{
if [[ -d "$IPC_APP_PATH" ]] && [[ "$BUILD_TURNKEY_IPC" = "y" ]]; then
mkdir -p "$SYSTEM_OUT_DIR"/data
cp -a ${IPC_APP_PATH}/install "$SYSTEM_OUT_DIR"/data/
fi
}
function print_usage()
{
printf " -------------------------------------------------------------------------------------------------------\n"
printf " Usage:\n"
printf " (1)\33[94m menuconfig \33[0m- Use menu to configure your board.\n"
printf " ex: $ menuconfig\n\n"
printf " (2)\33[96m defconfig \$CHIP_ARCH \33[0m- List EVB boards(\$BOARD) by CHIP_ARCH.\n"
"${BUILD_PATH}/scripts/boards_scan.py" --list-chip-arch
printf " ex: $ defconfig cv183x\n\n"
printf " (3)\33[92m defconfig \$BOARD\33[0m - Choose EVB board settings.\n"
printf " ex: $ defconfig cv1835_wevb_0002a\n"
printf " ex: $ defconfig cv1826_wevb_0005a_spinand\n"
printf " ex: $ defconfig cv181x_fpga_c906\n"
printf " -------------------------------------------------------------------------------------------------------\n"
}
TOP_DIR=$(gettop)
BUILD_PATH="$TOP_DIR/build"
export TOP_DIR BUILD_PATH
"${BUILD_PATH}/scripts/boards_scan.py" --gen-build-kconfig
"${BUILD_PATH}/scripts/gen_sensor_config.py"
"${BUILD_PATH}/scripts/gen_panel_config.py"
# import common functions
# shellcheck source=./common_functions.sh
source "$TOP_DIR/build/common_functions.sh"
print_usage
mnt/system/
\ No newline at end of file
#!/bin/sh
${CVI_SHOPTS}
#
# Start firmware
#
export USERDATAPATH=/mnt/data/
export SYSTEMPATH=/mnt/system/
case "$1" in
start)
echo "init mpp system..."
if [ -d $SYSTEMPATH/ko ]; then
sh $SYSTEMPATH/ko/loadsystemko.sh
fi
echo "Starting app..."
if [ -f $USERDATAPATH/auto.sh ]; then
usleep 30000
. $USERDATAPATH/auto.sh &
exit 1
fi
if [ -f $SYSTEMPATH/auto.sh ]; then
usleep 30000
. $SYSTEMPATH/auto.sh &
fi
;;
stop)
;;
restart|reload)
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels. The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# process == program to run
# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mount -o remount,rw /
::sysinit:/bin/mkdir -p /dev/pts /dev/shm
::sysinit:/bin/mount -a
::sysinit:/sbin/swapon -a
null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd
null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin
null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout
null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr
::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS
# Put a getty on the serial port
# console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL
console::respawn:/sbin/getty -L console 115200 vt100 -n -l /usr/local/bin/autologin
# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
::shutdown:/etc/init.d/rcK
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/mnt/system/usr/bin:/mnt/system/usr/sbin:/mnt/data/bin:/mnt/data/sbin"
if [ "$PS1" ]; then
if [ "`id -u`" -eq 0 ]; then
export PS1='# '
else
export PS1='$ '
fi
fi
export PAGER='/bin/more '
export EDITOR='/bin/vi'
# Source configuration files from /etc/profile.d
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
unset i
done
export HOSTNAME="$(hostname)"
export OLDPWD=/root
if [ '$USER' == 'root' ]; then
export PS1='[\u@\h]\w\# '
else
export PS1='[\u@\h]\w\$ '
fi
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
export TERM=vt100
export TERMINFO=/usr/share/terminfo
CLASS=acm
VID=0x3346
PID=0x1003
MSC_PID=0x1008
RNDIS_PID=0x1009
UVC_PID=0x100A
UAC_PID=0x100B
ADB_VID=0x18D1
ADB_PID=0x4EE0
ADB_PID_M1=0x4EE2
ADB_PID_M2=0x4EE4
MANUFACTURER="Cvitek"
PRODUCT="USB Com Port"
PRODUCT_RNDIS="RNDIS"
PRODUCT_UVC="UVC"
PRODUCT_UAC="UAC"
PRODUCT_ADB="ADB"
ADBD_PATH=/usr/bin/
SERIAL="0123456789"
MSC_FILE=$3
CVI_DIR=/tmp/usb
CVI_GADGET=$CVI_DIR/usb_gadget/cvitek
CVI_FUNC=$CVI_GADGET/functions
FUNC_NUM=0
MAX_EP_NUM=4
TMP_NUM=0
INTF_NUM=0
EP_IN=0
EP_OUT=0
case "$2" in
acm)
CLASS=acm
;;
msc)
CLASS=mass_storage
PID=$MSC_PID
;;
cvg)
CLASS=cvg
;;
rndis)
CLASS=rndis
PID=$RNDIS_PID
PRODUCT=$PRODUCT_RNDIS
;;
uvc)
CLASS=uvc
PID=$UVC_PID
PRODUCT=$PRODUCT_UVC
;;
uac1)
CLASS=uac1
PID=$UAC_PID
PRODUCT=$PRODUCT_UAC
;;
adb)
CLASS=ffs.adb
VID=$ADB_VID
PID=$ADB_PID
PRODUCT=$PRODUCT_ADB
;;
*)
if [ "$1" = "probe" ] ; then
echo "Usage: $0 probe {acm|msc|cvg|rndis|uvc|uac1|adb}"
exit 1
fi
esac
calc_func() {
FUNC_NUM=$(ls $CVI_GADGET/functions -l | grep ^d | wc -l)
echo "$FUNC_NUM file(s)"
}
res_check() {
TMP_NUM=$(find $CVI_GADGET/functions/ -name "acm*" | wc -l)
EP_OUT=$(($EP_OUT+$TMP_NUM))
TMP_NUM=$(($TMP_NUM * 2))
EP_IN=$(($EP_IN+$TMP_NUM))
INTF_NUM=$(($INTF_NUM+$TMP_NUM))
TMP_NUM=$(find $CVI_GADGET/functions/ -name "mass_storage*" | wc -l)
EP_IN=$(($EP_IN+$TMP_NUM))
EP_OUT=$(($EP_OUT+$TMP_NUM))
INTF_NUM=$(($INTF_NUM+$TMP_NUM))
TMP_NUM=$(find $CVI_GADGET/functions/ -name "cvg*" | wc -l)
EP_IN=$(($EP_IN+$TMP_NUM))
EP_OUT=$(($EP_OUT+$TMP_NUM))
INTF_NUM=$(($INTF_NUM+$TMP_NUM))
TMP_NUM=$(find $CVI_GADGET/functions/ -name "rndis*" | wc -l)
EP_OUT=$(($EP_OUT+$TMP_NUM))
TMP_NUM=$(($TMP_NUM * 2))
EP_IN=$(($EP_IN+$TMP_NUM))
INTF_NUM=$(($INTF_NUM+$TMP_NUM))
TMP_NUM=$(find $CVI_GADGET/functions/ -name "uvc*" | wc -l)
TMP_NUM=$(($TMP_NUM * 2))
EP_IN=$(($EP_IN+$TMP_NUM))
INTF_NUM=$(($INTF_NUM+$TMP_NUM))
TMP_NUM=$(find $CVI_GADGET/functions/ -name "uac1*" | wc -l)
TMP_NUM=$(($TMP_NUM * 2))
EP_IN=$(($EP_IN+$TMP_NUM))
EP_OUT=$(($EP_OUT+$TMP_NUM))
INTF_NUM=$(($INTF_NUM+$TMP_NUM))
TMP_NUM=$(find $CVI_GADGET/functions/ -name ffs.adb | wc -l)
EP_IN=$(($EP_IN+$TMP_NUM))
EP_OUT=$(($EP_OUT+$TMP_NUM))
INTF_NUM=$(($INTF_NUM+$TMP_NUM))
if [ "$CLASS" = "acm" ] ; then
EP_IN=$(($EP_IN+2))
EP_OUT=$(($EP_OUT+1))
fi
if [ "$CLASS" = "mass_storage" ] ; then
EP_IN=$(($EP_IN+1))
EP_OUT=$(($EP_OUT+1))
fi
if [ "$CLASS" = "cvg" ] ; then
EP_IN=$(($EP_IN+1))
EP_OUT=$(($EP_OUT+1))
fi
if [ "$CLASS" = "rndis" ] ; then
EP_IN=$(($EP_IN+2))
EP_OUT=$(($EP_OUT+1))
fi
if [ "$CLASS" = "uvc" ] ; then
EP_IN=$(($EP_IN+2))
fi
if [ "$CLASS" = "uac1" ] ; then
EP_IN=$(($EP_IN+1))
EP_OUT=$(($EP_OUT+1))
fi
if [ "$CLASS" = "ffs.adb" ] ; then
EP_IN=$(($EP_IN+1))
EP_OUT=$(($EP_OUT+1))
fi
echo "$EP_IN in ep"
echo "$EP_OUT out ep"
if [ $EP_IN -gt $MAX_EP_NUM ]; then
echo "reach maximum resource"
exit 1
fi
if [ $EP_OUT -gt $MAX_EP_NUM ]; then
echo "reach maximum resource"
exit 1
fi
}
probe() {
if [ ! -d $CVI_DIR ]; then
mkdir $CVI_DIR
fi
if [ ! -d $CVI_DIR/usb_gadget ]; then
# Enale USB ConfigFS
mount none $CVI_DIR -t configfs
# Create gadget dev
mkdir $CVI_GADGET
# Set the VID and PID
echo $VID >$CVI_GADGET/idVendor
echo $PID >$CVI_GADGET/idProduct
# Set the product information string
mkdir $CVI_GADGET/strings/0x409
echo $MANUFACTURER>$CVI_GADGET/strings/0x409/manufacturer
echo $PRODUCT>$CVI_GADGET/strings/0x409/product
echo $SERIAL>$CVI_GADGET/strings/0x409/serialnumber
# Set the USB configuration
mkdir $CVI_GADGET/configs/c.1
mkdir $CVI_GADGET/configs/c.1/strings/0x409
echo "config1">$CVI_GADGET/configs/c.1/strings/0x409/configuration
# Set the MaxPower of USB descriptor
echo 120 >$CVI_GADGET/configs/c.1/MaxPower
fi
# get current functions number
calc_func
# assign the class code for composite device
if [ ! $FUNC_NUM -eq 0 ]; then
echo 0xEF >$CVI_GADGET/bDeviceClass
echo 0x02 >$CVI_GADGET/bDeviceSubClass
echo 0x01 >$CVI_GADGET/bDeviceProtocol
fi
# resource check
res_check
# create the desired function
if [ "$CLASS" = "ffs.adb" ] ; then
# adb shall be the last function to probe. Override the pid/vid
echo $VID >$CVI_GADGET/idVendor
echo $PID >$CVI_GADGET/idProduct
# choose pid for different function number
if [ $INTF_NUM -eq 1 ]; then
echo $ADB_PID_M1 >$CVI_GADGET/idProduct
fi
if [ $INTF_NUM -eq 2 ]; then
echo $ADB_PID_M2 >$CVI_GADGET/idProduct
fi
mkdir $CVI_GADGET/functions/$CLASS
else
mkdir $CVI_GADGET/functions/$CLASS.usb$FUNC_NUM
fi
if [ "$CLASS" = "mass_storage" ] ; then
echo $MSC_FILE >$CVI_GADGET/functions/$CLASS.usb$FUNC_NUM/lun.0/file
fi
if [ "$CLASS" = "rndis" ] ; then
#OS STRING
echo 1 >$CVI_GADGET/os_desc/use
echo 0xcd >$CVI_GADGET/os_desc/b_vendor_code
echo MSFT100 >$CVI_GADGET/os_desc/qw_sign
#COMPATIBLE ID
echo RNDIS >$CVI_FUNC/rndis.usb$FUNC_NUM/os_desc/interface.rndis/compatible_id
#MAKE c.1 THE ONE ASSOCIATED WITH OS DESCRIPTORS
ln -s $CVI_GADGET/configs/c.1 $CVI_GADGET/os_desc
#MAKE "Icons" EXTENDED PROPERTY
mkdir $CVI_FUNC/rndis.usb$FUNC_NUM/os_desc/interface.rndis/Icons
echo 2 >$CVI_FUNC/rndis.usb$FUNC_NUM/os_desc/interface.rndis/Icons/type
echo "%SystemRoot%\\system32\\shell32.dll,-233" >$CVI_FUNC/rndis.usb$FUNC_NUM/os_desc/interface.rndis/Icons/data
#MAKE "Label" EXTENDED PROPERTY
mkdir $CVI_FUNC/rndis.usb$FUNC_NUM/os_desc/interface.rndis/Label
echo 1 >$CVI_FUNC/rndis.usb$FUNC_NUM/os_desc/interface.rndis/Label/type
echo "XYZ Device" >$CVI_FUNC/rndis.usb$FUNC_NUM/os_desc/interface.rndis/Label/data
fi
}
start() {
# link this function to the configuration
calc_func
if [ $FUNC_NUM -eq 0 ]; then
echo "Functions Empty!"
exit 1
fi
if [ -d $CVI_GADGET/functions/ffs.adb ]; then
FUNC_NUM=$(($FUNC_NUM-1))
fi
for i in `seq 0 $(($FUNC_NUM-1))`;
do
find $CVI_GADGET/functions/ -name "*.usb$i" | xargs -I % ln -s % $CVI_GADGET/configs/c.1
done
if [ -d $CVI_GADGET/functions/ffs.adb ]; then
ln -s $CVI_GADGET/functions/ffs.adb $CVI_GADGET/configs/c.1
mkdir /dev/usb-ffs/adb -p
mount -t functionfs adb /dev/usb-ffs/adb
if [ -f $ADBD_PATH/adbd ]; then
$ADBD_PATH/adbd &
fi
else
# Start the gadget driver
UDC=`ls /sys/class/udc/ | awk '{print $1}'`
echo ${UDC} >$CVI_GADGET/UDC
fi
}
stop() {
if [ -d $CVI_GADGET/configs/c.1/ffs.adb ]; then
pkill adbd
rm $CVI_GADGET/configs/c.1/ffs.adb
else
echo "" >$CVI_GADGET/UDC
fi
find $CVI_GADGET/configs/ -name "*.usb*" | xargs rm -f
rmdir $CVI_GADGET/configs/c.*/strings/0x409/
tmp_dirs=$(find $CVI_GADGET/os_desc/c.* -type d)
if [ -n tmp_dirs ]; then
echo "remove os_desc!"
rm -rf $CVI_GADGET/os_desc/c.*/
find $CVI_GADGET/functions/ -name Icons | xargs rmdir
find $CVI_GADGET/functions/ -name Label | xargs rmdir
fi
rmdir $CVI_GADGET/configs/c.*/
rmdir $CVI_GADGET/functions/*
rmdir $CVI_GADGET/strings/0x409/
rmdir $CVI_GADGET
umount $CVI_DIR
rmdir $CVI_DIR
}
case "$1" in
start)
start
;;
stop)
stop
;;
probe)
probe
;;
UDC)
ls /sys/class/udc/ >$CVI_GADGET/UDC
;;
*)
echo "Usage: $0 probe {acm|msc|cvg|uvc|uac1} {file (msc)}"
echo "Usage: $0 start"
echo "Usage: $0 stop"
exit 1
esac
exit $?
GPIO_HUBPORT_EN=449
GPIO_ROLESEL=450
GPIO_HUBRST=451
SYS_GPIO=/sys/class/gpio
hub_on() {
echo "turn on usb hub"
if [ ! -d $SYS_GPIO/gpio$GPIO_HUBPORT_EN ]; then
echo $GPIO_HUBPORT_EN >/sys/class/gpio/export
fi
if [ ! -d $SYS_GPIO/gpio$GPIO_ROLESEL ]; then
echo $GPIO_ROLESEL >/sys/class/gpio/export
fi
if [ ! -d $SYS_GPIO/gpio$GPIO_HUBRST ]; then
echo $GPIO_HUBRST >/sys/class/gpio/export
fi
echo "out" >/sys/class/gpio/gpio$GPIO_HUBPORT_EN/direction
echo "out" >/sys/class/gpio/gpio$GPIO_ROLESEL/direction
echo "out" >/sys/class/gpio/gpio$GPIO_HUBRST/direction
echo 1 >/sys/class/gpio/gpio$GPIO_HUBPORT_EN/value
echo 0 >/sys/class/gpio/gpio$GPIO_ROLESEL/value
echo 0 >/sys/class/gpio/gpio$GPIO_HUBRST/value
}
hub_off() {
echo "turn off usb hub"
if [ ! -d $SYS_GPIO/gpio$GPIO_HUBPORT_EN ]; then
echo $GPIO_HUBPORT_EN >/sys/class/gpio/export
fi
if [ ! -d $SYS_GPIO/gpio$GPIO_ROLESEL ]; then
echo $GPIO_ROLESEL >/sys/class/gpio/export
fi
if [ ! -d $SYS_GPIO/gpio$GPIO_HUBRST ]; then
echo $GPIO_HUBRST >/sys/class/gpio/export
fi
echo "out" >/sys/class/gpio/gpio$GPIO_HUBPORT_EN/direction
echo "out" >/sys/class/gpio/gpio$GPIO_ROLESEL/direction
echo "out" >/sys/class/gpio/gpio$GPIO_HUBRST/direction
echo 0 >/sys/class/gpio/gpio$GPIO_HUBPORT_EN/value
echo 1 >/sys/class/gpio/gpio$GPIO_ROLESEL/value
echo 1 >/sys/class/gpio/gpio$GPIO_HUBRST/value
}
inst_mod() {
insmod /mnt/system/ko/configfs.ko
insmod /mnt/system/ko/libcomposite.ko
insmod /mnt/system/ko/u_serial.ko
insmod /mnt/system/ko/usb_f_acm.ko
insmod /mnt/system/ko/cvi_usb_f_cvg.ko
insmod /mnt/system/ko/usb_f_uvc.ko
insmod /mnt/system/ko/usb_f_fs.ko
insmod /mnt/system/ko/u_audio.ko
insmod /mnt/system/ko/usb_f_uac1.ko
insmod /mnt/system/ko/usb_f_serial.ko
insmod /mnt/system/ko/usb_f_mass_storage.ko
insmod /mnt/system/ko/u_ether.ko
insmod /mnt/system/ko/usb_f_ecm.ko
insmod /mnt/system/ko/usb_f_eem.ko
insmod /mnt/system/ko/usb_f_rndis.ko
}
case "$1" in
host)
insmod /mnt/system/ko/dwc2.ko
echo host > /proc/cviusb/otg_role
;;
device)
echo device > /proc/cviusb/otg_role
;;
*)
echo "Usage: $0 host"
echo "Usage: $0 device"
exit 1
esac
exit $?
../usr/lib64v0p7_xthead/lp64d/libc.so
\ No newline at end of file
#
# Automatically generated file; DO NOT EDIT.
# Buildroot -g8c59e72e33-dirty Configuration
#
BR2_HAVE_DOT_CONFIG=y
BR2_HOST_GCC_AT_LEAST_4_9=y
BR2_HOST_GCC_AT_LEAST_5=y
BR2_HOST_GCC_AT_LEAST_6=y
BR2_HOST_GCC_AT_LEAST_7=y
#
# Target options
#
BR2_ARCH_IS_64=y
BR2_ARCH_HAS_MMU_MANDATORY=y
BR2_riscv=y
BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT=y
BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8=y
BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9=y
BR2_ARCH_NEEDS_GCC_AT_LEAST_5=y
BR2_ARCH_NEEDS_GCC_AT_LEAST_6=y
BR2_ARCH_NEEDS_GCC_AT_LEAST_7=y
BR2_ARCH="riscv64"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ABI="lp64d"
BR2_BINFMT_SUPPORTS_SHARED=y
BR2_READELF_ARCH_NAME="RISC-V"
BR2_BINFMT_ELF=y
BR2_RISCV_ISA_RVI=y
BR2_RISCV_ISA_RVM=y
BR2_RISCV_ISA_RVA=y
BR2_RISCV_ISA_RVF=y
BR2_RISCV_ISA_RVD=y
BR2_riscv_g=y
# BR2_riscv_custom is not set
# BR2_RISCV_32 is not set
BR2_RISCV_64=y
# BR2_RISCV_ABI_LP64 is not set
# BR2_RISCV_ABI_LP64F is not set
BR2_RISCV_ABI_LP64D=y
#
# Build options
#
#
# Commands
#
BR2_WGET="wget --passive-ftp -nd -t 3"
BR2_SVN="svn --non-interactive"
BR2_BZR="bzr"
BR2_GIT="git"
BR2_CVS="cvs"
BR2_LOCALFILES="cp"
BR2_SCP="scp"
BR2_HG="hg"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_XZCAT="xzcat"
BR2_LZCAT="lzip -d -c"
BR2_TAR_OPTIONS=""
BR2_DEFCONFIG="./configs/milkv_duo_musl_riscv64_defconfig"
BR2_DL_DIR="$(TOPDIR)/dl"
BR2_HOST_DIR="$(BASE_DIR)/host"
#
# Mirrors and Download locations
#
BR2_PRIMARY_SITE=""
BR2_BACKUP_SITE="http://sources.buildroot.net"
BR2_KERNEL_MIRROR="https://cdn.kernel.org/pub"
BR2_GNU_MIRROR="http://ftpmirror.gnu.org"
BR2_LUAROCKS_MIRROR="http://rocks.moonscript.org"
BR2_CPAN_MIRROR="http://cpan.metacpan.org"
BR2_JLEVEL=0
# BR2_CCACHE is not set
# BR2_ENABLE_DEBUG is not set
BR2_STRIP_strip=y
BR2_STRIP_EXCLUDE_FILES=""
BR2_STRIP_EXCLUDE_DIRS=""
# BR2_OPTIMIZE_0 is not set
# BR2_OPTIMIZE_1 is not set
# BR2_OPTIMIZE_2 is not set
# BR2_OPTIMIZE_3 is not set
# BR2_OPTIMIZE_G is not set
BR2_OPTIMIZE_S=y
# BR2_OPTIMIZE_FAST is not set
# BR2_STATIC_LIBS is not set
BR2_SHARED_LIBS=y
# BR2_SHARED_STATIC_LIBS is not set
BR2_PACKAGE_OVERRIDE_FILE="$(CONFIG_DIR)/local.mk"
BR2_GLOBAL_PATCH_DIR=""
#
# Advanced
#
BR2_COMPILER_PARANOID_UNSAFE_PATH=y
# BR2_FORCE_HOST_BUILD is not set
# BR2_REPRODUCIBLE is not set
# BR2_PER_PACKAGE_DIRECTORIES is not set
#
# Security Hardening Options
#
BR2_PIC_PIE=y
# BR2_SSP_NONE is not set
# BR2_SSP_REGULAR is not set
BR2_SSP_STRONG=y
# BR2_SSP_ALL is not set
BR2_SSP_OPTION="-fstack-protector-strong"
# BR2_RELRO_NONE is not set
# BR2_RELRO_PARTIAL is not set
BR2_RELRO_FULL=y
#
# Fortify Source needs a glibc toolchain and optimization
#
#
# Toolchain
#
BR2_TOOLCHAIN=y
BR2_TOOLCHAIN_USES_MUSL=y
# BR2_TOOLCHAIN_BUILDROOT is not set
BR2_TOOLCHAIN_EXTERNAL=y
#
# Toolchain External Options
#
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
# BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD is not set
BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED=y
# BR2_TOOLCHAIN_EXTERNAL_PATH="/data/sam/sdk/cv180x_v400/host-tools/gcc/riscv64-linux-musl-x86_64"
BR2_TOOLCHAIN_EXTERNAL_MUSL=y
BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL="toolchain-external-custom"
BR2_TOOLCHAIN_EXTERNAL_PREFIX="riscv64-unknown-linux-musl"
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="riscv64-unknown-linux-musl"
BR2_TOOLCHAIN_EXTERNAL_GCC_10=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_10=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
BR2_TOOLCHAIN_EXTERNAL_HAS_SSP=y
BR2_TOOLCHAIN_EXTERNAL_HAS_SSP_STRONG=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
#
# Toolchain Generic Options
#
BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS=y
BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK=y
BR2_USE_WCHAR=y
BR2_ENABLE_LOCALE=y
BR2_INSTALL_LIBSTDCPP=y
BR2_TOOLCHAIN_HAS_THREADS=y
BR2_TOOLCHAIN_HAS_THREADS_DEBUG=y
BR2_TOOLCHAIN_HAS_THREADS_NPTL=y
BR2_TOOLCHAIN_HAS_SSP=y
BR2_TOOLCHAIN_HAS_SSP_STRONG=y
BR2_TOOLCHAIN_HAS_UCONTEXT=y
BR2_TOOLCHAIN_SUPPORTS_PIE=y
BR2_TOOLCHAIN_EXTRA_LIBS=""
BR2_USE_MMU=y
BR2_TARGET_OPTIMIZATION=""
BR2_TARGET_LDFLAGS="-mcpu=c906fdv -march=rv64imafdcv0p7xthead -mcmodel=medany -mabi=lp64d"
# BR2_ECLIPSE_REGISTER is not set
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_6=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_8=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST="5.10"
BR2_TOOLCHAIN_GCC_AT_LEAST_4_3=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_4=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_5=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_6=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_7=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_8=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_9=y
BR2_TOOLCHAIN_GCC_AT_LEAST_5=y
BR2_TOOLCHAIN_GCC_AT_LEAST_6=y
BR2_TOOLCHAIN_GCC_AT_LEAST_7=y
BR2_TOOLCHAIN_GCC_AT_LEAST_8=y
BR2_TOOLCHAIN_GCC_AT_LEAST_9=y
BR2_TOOLCHAIN_GCC_AT_LEAST_10=y
BR2_TOOLCHAIN_GCC_AT_LEAST="10"
BR2_TOOLCHAIN_HAS_MNAN_OPTION=y
BR2_TOOLCHAIN_HAS_SYNC_1=y
BR2_TOOLCHAIN_HAS_SYNC_2=y
BR2_TOOLCHAIN_HAS_SYNC_4=y
BR2_TOOLCHAIN_HAS_SYNC_8=y
BR2_TOOLCHAIN_HAS_LIBATOMIC=y
BR2_TOOLCHAIN_HAS_ATOMIC=y
#
# System configuration
#
BR2_ROOTFS_SKELETON_DEFAULT=y
# BR2_ROOTFS_SKELETON_CUSTOM is not set
BR2_TARGET_GENERIC_HOSTNAME="milkv"
BR2_TARGET_GENERIC_ISSUE="Welcome to Milk-V"
BR2_TARGET_GENERIC_PASSWD_SHA256=y
# BR2_TARGET_GENERIC_PASSWD_SHA512 is not set
BR2_TARGET_GENERIC_PASSWD_METHOD="sha-256"
BR2_INIT_BUSYBOX=y
# BR2_INIT_SYSV is not set
# BR2_INIT_OPENRC is not set
#
# systemd needs a glibc toolchain w/ SSP, headers >= 3.10, host and target gcc >= 5
#
# BR2_INIT_NONE is not set
# BR2_ROOTFS_DEVICE_CREATION_STATIC is not set
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV is not set
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt"
# BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES is not set
# BR2_ROOTFS_MERGED_USR is not set
BR2_TARGET_ENABLE_ROOT_LOGIN=y
BR2_TARGET_GENERIC_ROOT_PASSWD="milkv"
BR2_SYSTEM_BIN_SH_BUSYBOX=y
#
# bash, dash, mksh, zsh need BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
#
# BR2_SYSTEM_BIN_SH_NONE is not set
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="console"
BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP=y
# BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 is not set
# BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 is not set
# BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400 is not set
# BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 is not set
# BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 is not set
BR2_TARGET_GENERIC_GETTY_BAUDRATE="0"
BR2_TARGET_GENERIC_GETTY_TERM="vt100"
BR2_TARGET_GENERIC_GETTY_OPTIONS=""
BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=y
BR2_SYSTEM_DHCP=""
BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
BR2_ENABLE_LOCALE_PURGE=y
BR2_ENABLE_LOCALE_WHITELIST="C en_US"
# BR2_SYSTEM_ENABLE_NLS is not set
# BR2_TARGET_TZ_INFO is not set
BR2_ROOTFS_USERS_TABLES=""
BR2_ROOTFS_OVERLAY="board/milkv/CV180X/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT=""
BR2_ROOTFS_POST_FAKEROOT_SCRIPT=""
BR2_ROOTFS_POST_IMAGE_SCRIPT=""
#
# Kernel
#
# BR2_LINUX_KERNEL is not set
#
# Target packages
#
BR2_PACKAGE_BUSYBOX=y
BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox.config"
BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES=""
# BR2_PACKAGE_BUSYBOX_SHOW_OTHERS is not set
# BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES is not set
# BR2_PACKAGE_BUSYBOX_WATCHDOG is not set
BR2_PACKAGE_SKELETON=y
BR2_PACKAGE_HAS_SKELETON=y
BR2_PACKAGE_PROVIDES_SKELETON="skeleton-init-sysv"
BR2_PACKAGE_SKELETON_INIT_COMMON=y
BR2_PACKAGE_SKELETON_INIT_SYSV=y
#
# dt needs a glibc or uClibc toolchain w/ threads
#
# BR2_PACKAGE_DUMA is not set
# BR2_PACKAGE_FIO is not set
BR2_PACKAGE_GDB_ARCH_SUPPORTS=y
BR2_PACKAGE_GDB=y
# BR2_PACKAGE_IOZONE is not set
#
# ktap needs a Linux kernel to be built
#
# BR2_PACKAGE_LATENCYTOP is not set
# BR2_PACKAGE_LMBENCH is not set
BR2_PACKAGE_LTP_TESTSUITE_ARCH_SUPPORTS=y
# BR2_PACKAGE_LTP_TESTSUITE is not set
# BR2_PACKAGE_LTTNG_BABELTRACE is not set
#
# Development tools
#
BR2_PACKAGE_PROVIDES_HOST_GETTEXT="host-gettext-tiny"
#
# Filesystem and flash utilities
#
# BR2_PACKAGE_ABOOTIMG is not set
#
# davfs2 needs a glibc or uClibc toolchain
#
# BR2_PACKAGE_DOSFSTOOLS is not set
BR2_PACKAGE_E2FSPROGS=y
# BR2_PACKAGE_E2FSPROGS_DEBUGFS is not set
# BR2_PACKAGE_E2FSPROGS_E2IMAGE is not set
#
# e2scrub needs bash, coreutils, lvm2, and util-linux
#
# BR2_PACKAGE_E2FSPROGS_E4DEFRAG is not set
BR2_PACKAGE_E2FSPROGS_FSCK=y
# BR2_PACKAGE_E2FSPROGS_FUSE2FS is not set
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
#
# eudev needs eudev /dev management
#
# BR2_PACKAGE_EVEMU is not set
BR2_PACKAGE_EVTEST=y
# BR2_PACKAGE_FAN_CTRL is not set
# BR2_PACKAGE_FCONFIG is not set
BR2_PACKAGE_FLASHROM_ARCH_SUPPORTS=y
#
# Compression and decompression
#
BR2_PACKAGE_PROVIDES_HOST_ZLIB="host-libzlib"
# BR2_PACKAGE_ZZIPLIB is not set
#
# Crypto
#
# BR2_PACKAGE_BEARSSL is not set
# BR2_PACKAGE_BEECRYPT is not set
BR2_PACKAGE_BOTAN_ARCH_SUPPORTS=y
# BR2_PACKAGE_BOTAN is not set
# BR2_PACKAGE_CA_CERTIFICATES is not set
#
# cryptodev needs a Linux kernel to be built
#
BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBGPG_ERROR is not set
BR2_PACKAGE_LIBGPG_ERROR_SYSCFG="riscv64-unknown-linux-gnu"
BR2_PACKAGE_PROVIDES_HOST_OPENSSL="host-libopenssl"
#
# JSON/XML
#
BR2_PACKAGE_JSON_C=y
#
# Multimedia
#
BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBCAMERA is not set
#
# libcgroup needs a glibc toolchain w/ C++
#
BR2_PACKAGE_MUSL_COMPAT_HEADERS=y
# BR2_PACKAGE_MUSL_FTS is not set
# BR2_PACKAGE_ORC is not set
# BR2_PACKAGE_P11_KIT is not set
BR2_PACKAGE_POCO_ARCH_SUPPORTS=y
# BR2_PACKAGE_POCO is not set
BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS=y
# BR2_PACKAGE_PROTOBUF is not set
# BR2_PACKAGE_PROTOBUF_C is not set
#
# vdr needs a glibc toolchain w/ C++, dynamic library, NPTL, wchar, headers >= 3.9
#
BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO=y
# BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE is not set
BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE=y
# BR2_PACKAGE_WPA_SUPPLICANT_DBUS is not set
#
# emlog needs a Linux kernel to be built
#
BR2_PACKAGE_INITSCRIPTS=y
#
# iotop depends on python or python3
#
# BR2_PACKAGE_IPRUTILS is not set
# BR2_PACKAGE_IRQBALANCE is not set
# BR2_PACKAGE_KEYUTILS is not set
BR2_PACKAGE_KMOD=y
#
# unscd needs a glibc toolchain
#
BR2_PACKAGE_UTIL_LINUX=y
BR2_PACKAGE_UTIL_LINUX_LIBBLKID=y
# BR2_PACKAGE_UTIL_LINUX_LIBFDISK is not set
# BR2_PACKAGE_UTIL_LINUX_LIBMOUNT is not set
# BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS is not set
BR2_PACKAGE_UTIL_LINUX_LIBUUID=y
#
# su needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library
#
BR2_PACKAGE_UTIL_LINUX_UUIDD=y
#
# Filesystem images
#
BR2_TARGET_ROOTFS_EXT2=y
# BR2_TARGET_ROOTFS_EXT2_2r0 is not set
# BR2_TARGET_ROOTFS_EXT2_2r1 is not set
# BR2_TARGET_ROOTFS_EXT2_3 is not set
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_GEN=4
BR2_TARGET_ROOTFS_EXT2_REV=1
BR2_TARGET_ROOTFS_EXT2_LABEL="rootfs"
BR2_TARGET_ROOTFS_EXT2_SIZE="200M"
BR2_TARGET_ROOTFS_EXT2_INODES=0
BR2_TARGET_ROOTFS_EXT2_RESBLKS=5
BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O ^64bit"
BR2_TARGET_ROOTFS_EXT2_NONE=y
#
# initramfs needs a Linux kernel to be built
#
BR2_TARGET_ROOTFS_TAR=y
BR2_TARGET_ROOTFS_TAR_XZ=y
BR2_TARGET_ROOTFS_TAR_OPTIONS=""
#
# Host utilities
#
BR2_PACKAGE_HOST_E2FSPROGS=y
BR2_PACKAGE_HOST_UTIL_LINUX=y
#
# Legacy options removed in 2019.11
#
BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS=""
#
# Legacy options removed in 2017.08
#
# BR2_TARGET_GRUB is not set
# BR2_PACKAGE_SIMICSFS is not set
# BR2_BINUTILS_VERSION_2_26_X is not set
BR2_XTENSA_OVERLAY_DIR=""
BR2_XTENSA_CUSTOM_NAME=""
# BR2_PACKAGE_HOST_MKE2IMG is not set
BR2_TARGET_ROOTFS_EXT2_BLOCKS=0
BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES=0
#
# Legacy options removed in 2017.05
#
BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS=0
BR2_PACKAGE_STRACE=y
#
# NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 3.2, dynamic library, wchar, threads
#
BR2_PACKAGE_DROPBEAR=y
BR2_PACKAGE_DROPBEAR_CLIENT=y
# # BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS is not set
BR2_PACKAGE_DROPBEAR_SMALL=y
# # BR2_PACKAGE_DROPBEAR_WTMP is not set
# # BR2_PACKAGE_DROPBEAR_LASTLOG is not set
# # BR2_PACKAGE_DROPBEAR_LEGACY_CRYPTO is not set
# BR2_PACKAGE_DROPBEAR_LOCALOPTIONS_FILE=""
#!/bin/bash #!/bin/bash
export MV_BOARD_CPU=cv1800b export MV_BOARD_CPU=cv1800b
export MV_BUILD_ENV=cvisetup.sh export MV_BUILD_ENV=milkvsetup.sh
export MV_BOARD_LINK=cv1800b_milkv_duo_sd export MV_BOARD_LINK=cv1800b_milkv_duo_sd
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment