Bump to next branch
Host: Ubuntu 21.04
This commit is contained in:
@@ -8,7 +8,7 @@ Soc | Boards |
|
||||
| Allwinner H6 | Orange Pi 3/3 LTS/Lite2/OnePlus|
|
||||
| Allwinner H616 | Orange Pi Zero2 |
|
||||
| Rockchip RK3328 | Orange Pi R1Plus/R1Plus LTS|
|
||||
| Rockchip RK3399 | Orange Pi 4/4B |
|
||||
| Rockchip RK3399 | Orange Pi 4/4 LTS/4B |
|
||||
|
||||
## Download links
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2015 Igor Pecovnik, igor.pecovnik@gma**.com
|
||||
# Copyright (c) 2013-2021 Igor Pecovnik, igor.pecovnik@gma**.com
|
||||
#
|
||||
# This file is licensed under the terms of the GNU General Public
|
||||
# License version 2. This program is licensed "as is" without any
|
||||
@@ -8,97 +8,158 @@
|
||||
|
||||
# DO NOT EDIT THIS FILE
|
||||
# use configuration files like config-default.conf to set the build configuration
|
||||
# check Orange Pi documentation for more info
|
||||
# Please check Orange Pi documentation for more info
|
||||
# http://www.orangepi.cn/downloadresourcescn
|
||||
# http://www.orangepi.org/downloadresources
|
||||
|
||||
SRC="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
|
||||
|
||||
# check for whitespace in $SRC and exit for safety reasons
|
||||
# check for whitespace in ${SRC} and exit for safety reasons
|
||||
grep -q "[[:space:]]" <<<"${SRC}" && { echo "\"${SRC}\" contains whitespace. Not supported. Aborting." >&2 ; exit 1 ; }
|
||||
|
||||
cd "${SRC}" || exit
|
||||
|
||||
if [[ "${ORANGEPI_ENABLE_CALL_TRACING}" == "yes" ]]; then
|
||||
set -T # inherit return/debug traps
|
||||
mkdir -p "${SRC}"/output/debug
|
||||
echo -n "" > "${SRC}"/output/debug/calls.txt
|
||||
trap 'echo "${BASH_LINENO[@]}|${BASH_SOURCE[@]}|${FUNCNAME[@]}" >> ${SRC}/output/debug/calls.txt ;' RETURN
|
||||
fi
|
||||
|
||||
if [[ -f "${SRC}"/scripts/general.sh ]]; then
|
||||
|
||||
# shellcheck source=scripts/general.sh
|
||||
source "${SRC}"/scripts/general.sh
|
||||
|
||||
else
|
||||
|
||||
echo "Error: missing build directory structure"
|
||||
echo "Please clone the full repository by https://github.com/orangepi-xunlong/orangepi-build"
|
||||
exit 255
|
||||
|
||||
fi
|
||||
|
||||
if [[ $EUID == 0 ]] || [[ "$1" == vagrant ]]; then
|
||||
:
|
||||
elif [[ "$1" == docker || "$1" == dockerpurge || "$1" == docker-shell ]] && grep -q `whoami` <(getent group docker); then
|
||||
:
|
||||
else
|
||||
display_alert "This script requires root privileges, trying to use sudo" "" "wrn"
|
||||
sudo "$SRC/build.sh" "$@"
|
||||
exit $?
|
||||
fi
|
||||
# Add the variables needed at the beginning of the path
|
||||
check_args ()
|
||||
{
|
||||
|
||||
for p in "$@"; do
|
||||
|
||||
case "${p%=*}" in
|
||||
LIB_TAG)
|
||||
# Take a variable if the branch exists locally
|
||||
if [ "${p#*=}" == "$(git branch | \
|
||||
gawk -v b="${p#*=}" '{if ( $NF == b ) {print $NF}}')" ]; then
|
||||
echo -e "[\e[0;35m warn \x1B[0m] Setting $p"
|
||||
eval "$p"
|
||||
else
|
||||
echo -e "[\e[0;35m warn \x1B[0m] Skip $p setting as LIB_TAG=\"\""
|
||||
eval LIB_TAG=""
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
|
||||
check_args "$@"
|
||||
|
||||
|
||||
update_src() {
|
||||
|
||||
cd "${SRC}" || exit
|
||||
if [[ ! -f $SRC/.ignore_changes ]]; then
|
||||
if [[ ! -f "${SRC}"/.ignore_changes ]]; then
|
||||
echo -e "[\e[0;32m o.k. \x1B[0m] This script will try to update"
|
||||
git pull
|
||||
|
||||
CHANGED_FILES=$(git diff --name-only)
|
||||
if [[ -n $CHANGED_FILES ]]; then
|
||||
if [[ -n "${CHANGED_FILES}" ]]; then
|
||||
echo -e "[\e[0;35m warn \x1B[0m] Can't update since you made changes to: \e[0;32m\n${CHANGED_FILES}\x1B[0m"
|
||||
while true; do
|
||||
echo -e "Press \e[0;33m<Ctrl-C>\x1B[0m or \e[0;33mexit\x1B[0m to abort compilation, \e[0;33m<Enter>\x1B[0m to ignore and continue, \e[0;33mdiff\x1B[0m to display changes"
|
||||
echo -e "Press \e[0;33m<Ctrl-C>\x1B[0m or \e[0;33mexit\x1B[0m to abort compilation"\
|
||||
", \e[0;33m<Enter>\x1B[0m to ignore and continue, \e[0;33mdiff\x1B[0m to display changes"
|
||||
read -r
|
||||
if [[ "$REPLY" == "diff" ]]; then
|
||||
if [[ "${REPLY}" == "diff" ]]; then
|
||||
git diff
|
||||
elif [[ "$REPLY" == "exit" ]]; then
|
||||
elif [[ "${REPLY}" == "exit" ]]; then
|
||||
exit 1
|
||||
elif [[ "$REPLY" == "" ]]; then
|
||||
elif [[ "${REPLY}" == "" ]]; then
|
||||
break
|
||||
else
|
||||
echo "Unknown command!"
|
||||
fi
|
||||
done
|
||||
else
|
||||
elif [[ $(git branch | grep "*" | awk '{print $2}') != "${LIB_TAG}" && -n "${LIB_TAG}" ]]; then
|
||||
git checkout "${LIB_TAG:-master}"
|
||||
git pull
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
#TMPFILE=`mktemp` && chmod 644 $TMPFILE
|
||||
#echo SRC=$SRC > $TMPFILE
|
||||
#echo LIB_TAG=$LIB_TAG >> $TMPFILE
|
||||
#declare -f update_src >> $TMPFILE
|
||||
#echo update_src >> $TMPFILE
|
||||
|
||||
TMPFILE=$(mktemp)
|
||||
chmod 644 "${TMPFILE}"
|
||||
{
|
||||
|
||||
echo SRC="$SRC"
|
||||
echo LIB_TAG="$LIB_TAG"
|
||||
declare -f update_src
|
||||
#echo "update_src"
|
||||
|
||||
} > "$TMPFILE"
|
||||
|
||||
#do not update/checkout git with root privileges to messup files onwership.
|
||||
#due to in docker/VM, we can't su to a normal user, so do not update/checkout git.
|
||||
#if [[ `systemd-detect-virt` == 'none' ]]; then
|
||||
# if [[ $EUID == 0 ]]; then
|
||||
# su `stat --format=%U $SRC/.git` -c "bash $TMPFILE"
|
||||
# else
|
||||
# bash $TMPFILE
|
||||
# fi
|
||||
#fi
|
||||
if [[ $(systemd-detect-virt) == 'none' ]]; then
|
||||
|
||||
#rm $TMPFILE
|
||||
if [[ "${EUID}" == "0" ]]; then
|
||||
su "$(stat --format=%U "${SRC}"/.git)" -c "bash ${TMPFILE}"
|
||||
else
|
||||
bash "${TMPFILE}"
|
||||
fi
|
||||
|
||||
# Check for required packages for compiling
|
||||
if [[ -z "$(which whiptail)" ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y whiptail
|
||||
fi
|
||||
if [[ -z "$(which getfacl)" ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y acl
|
||||
|
||||
|
||||
rm "${TMPFILE}"
|
||||
|
||||
|
||||
if [[ "${EUID}" == "0" ]] || [[ "${1}" == "vagrant" ]]; then
|
||||
:
|
||||
elif [[ "${1}" == docker || "${1}" == dockerpurge || "${1}" == docker-shell ]] && grep -q "$(whoami)" <(getent group docker); then
|
||||
:
|
||||
else
|
||||
display_alert "This script requires root privileges, trying to use sudo" "" "wrn"
|
||||
sudo "${SRC}/build.sh" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ "$OFFLINE_WORK" == "yes" ]; then
|
||||
|
||||
echo -e "\n"
|
||||
display_alert "* " "You are working offline."
|
||||
display_alert "* " "Sources, time and host will not be checked"
|
||||
echo -e "\n"
|
||||
sleep 3s
|
||||
|
||||
else
|
||||
|
||||
# check and install the basic utilities here
|
||||
prepare_host_basic
|
||||
|
||||
fi
|
||||
|
||||
# Check for Vagrant
|
||||
if [[ "$1" == vagrant && -z "$(which vagrant)" ]]; then
|
||||
if [[ "${1}" == vagrant && -z "$(command -v vagrant)" ]]; then
|
||||
display_alert "Vagrant not installed." "Installing"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y vagrant virtualbox
|
||||
fi
|
||||
|
||||
if [[ "$1" == dockerpurge && -f /etc/debian_version ]]; then
|
||||
# Purge Orange Pi Docker images
|
||||
if [[ "${1}" == dockerpurge && -f /etc/debian_version ]]; then
|
||||
display_alert "Purging Orange Pi Docker containers" "" "wrn"
|
||||
docker container ls -a | grep orangepi | awk '{print $1}' | xargs docker container rm &> /dev/null
|
||||
docker image ls | grep orangepi | awk '{print $3}' | xargs docker image rm &> /dev/null
|
||||
@@ -106,48 +167,57 @@ if [[ "$1" == dockerpurge && -f /etc/debian_version ]]; then
|
||||
set -- "docker" "$@"
|
||||
fi
|
||||
|
||||
if [[ "$1" == docker-shell ]]; then
|
||||
# Docker shell
|
||||
if [[ "${1}" == docker-shell ]]; then
|
||||
shift
|
||||
#shellcheck disable=SC2034
|
||||
SHELL_ONLY=yes
|
||||
set -- "docker" "$@"
|
||||
fi
|
||||
|
||||
# Install Docker if not there but wanted. We cover only Debian based distro install. Else, manual Docker install is needed
|
||||
if [[ "$1" == docker && -f /etc/debian_version && -z "$(which docker)" ]]; then
|
||||
# Install Docker if not there but wanted. We cover only Debian based distro install. On other distros, manual Docker install is needed
|
||||
if [[ "${1}" == docker && -f /etc/debian_version && -z "$(command -v docker)" ]]; then
|
||||
|
||||
DOCKER_BINARY="docker-ce"
|
||||
|
||||
# add exception for Ubuntu Focal until Docker provides dedicated binary
|
||||
codename=$(lsb_release -sc)
|
||||
codeid=$(lsb_release -is | awk '{print tolower($0)}')
|
||||
[[ $codeid == linuxmint && $codename == debbie ]] && codename="buster" && codeid="debian"
|
||||
[[ $codename == focal ]] && codename="bionic"
|
||||
codename=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d"=" -f2)
|
||||
codeid=$(cat /etc/os-release | grep ^NAME | cut -d"=" -f2 | awk '{print tolower($0)}' | tr -d '"' | awk '{print $1}')
|
||||
[[ "${codename}" == "debbie" ]] && codename="buster" && codeid="debian"
|
||||
[[ "${codename}" == "ulyana" || "${codename}" == "jammy" ]] && codename="focal" && codeid="ubuntu"
|
||||
|
||||
# different binaries for some. TBD. Need to check for all others
|
||||
[[ "${codename}" =~ focal|hirsute ]] && DOCKER_BINARY="docker containerd docker.io"
|
||||
|
||||
display_alert "Docker not installed." "Installing" "Info"
|
||||
echo "deb [arch=amd64] https://download.docker.com/linux/${codeid} ${codename} edge" > /etc/apt/sources.list.d/docker.list
|
||||
sudo bash -c "echo \"deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/${codeid} ${codename} stable\" > /etc/apt/sources.list.d/docker.list"
|
||||
|
||||
# minimal set of utilities that are needed for prep
|
||||
packages=("curl" "gnupg" "apt-transport-https")
|
||||
for i in "${packages[@]}"
|
||||
do
|
||||
[[ ! $(which $i) ]] && install_packages+=$i" "
|
||||
done
|
||||
[[ -z $install_packages ]] && apt-get update;apt-get install -y -qq --no-install-recommends $install_packages
|
||||
|
||||
curl -fsSL "https://download.docker.com/linux/${codeid}/gpg" | apt-key add -qq - > /dev/null 2>&1
|
||||
sudo bash -c "curl -fsSL \"https://download.docker.com/linux/${codeid}/gpg\" | apt-key add -qq - > /dev/null 2>&1 "
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update
|
||||
apt-get install -y -qq --no-install-recommends docker-ce
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y -qq --no-install-recommends ${DOCKER_BINARY}
|
||||
display_alert "Add yourself to docker group to avoid root privileges" "" "wrn"
|
||||
"$SRC/build.sh" "$@"
|
||||
"${SRC}/build.sh" "$@"
|
||||
exit $?
|
||||
|
||||
fi
|
||||
|
||||
EXTER="${SRC}/external"
|
||||
|
||||
# Create userpatches directory if not exists
|
||||
mkdir -p $SRC/userpatches
|
||||
mkdir -p "${SRC}"/userpatches
|
||||
|
||||
|
||||
# Create example configs if none found in userpatches
|
||||
if ! ls ${SRC}/userpatches/{config-example.conf,config-docker.conf,config-vagrant.conf} 1> /dev/null 2>&1; then
|
||||
if ! ls "${SRC}"/userpatches/{config-example.conf,config-docker.conf,config-vagrant.conf} 1> /dev/null 2>&1; then
|
||||
|
||||
# Migrate old configs
|
||||
if ls "${SRC}"/*.conf 1> /dev/null 2>&1; then
|
||||
display_alert "Migrate config files to userpatches directory" "all *.conf" "info"
|
||||
cp "${SRC}"/*.conf "${SRC}"/userpatches || exit 1
|
||||
rm "${SRC}"/*.conf
|
||||
[[ ! -L "${SRC}"/userpatches/config-example.conf ]] && ln -fs config-example.conf "${SRC}"/userpatches/config-default.conf || exit 1
|
||||
fi
|
||||
|
||||
display_alert "Create example config file using template" "config-default.conf" "info"
|
||||
|
||||
@@ -179,47 +249,59 @@ if ! ls ${SRC}/userpatches/{config-example.conf,config-docker.conf,config-vagran
|
||||
|
||||
fi
|
||||
|
||||
if [[ -z "$CONFIG" && -n "$1" && -f "${SRC}/userpatches/config-$1.conf" ]]; then
|
||||
if [[ -z "${CONFIG}" && -n "$1" && -f "${SRC}/userpatches/config-$1.conf" ]]; then
|
||||
CONFIG="userpatches/config-$1.conf"
|
||||
shift
|
||||
fi
|
||||
|
||||
# usind default if custom not found
|
||||
if [[ -z "$CONFIG" && -f "${SRC}/userpatches/config-default.conf" ]]; then
|
||||
CONFIG="$SRC/userpatches/config-default.conf"
|
||||
if [[ -z "${CONFIG}" && -f "${SRC}/userpatches/config-default.conf" ]]; then
|
||||
CONFIG="userpatches/config-default.conf"
|
||||
fi
|
||||
|
||||
# source build configuration file
|
||||
CONFIG_FILE="$(realpath "$CONFIG")"
|
||||
CONFIG_FILE="$(realpath "${CONFIG}")"
|
||||
|
||||
if [[ ! -f $CONFIG_FILE ]]; then
|
||||
display_alert "Config file does not exist" "$CONFIG" "error"
|
||||
if [[ ! -f "${CONFIG_FILE}" ]]; then
|
||||
display_alert "Config file does not exist" "${CONFIG}" "error"
|
||||
exit 254
|
||||
fi
|
||||
|
||||
CONFIG_PATH=$(dirname "$CONFIG_FILE")
|
||||
CONFIG_PATH=$(dirname "${CONFIG_FILE}")
|
||||
|
||||
display_alert "Using config file" "$CONFIG_FILE" "info"
|
||||
pushd $CONFIG_PATH > /dev/null
|
||||
# Source the extensions manager library at this point, before sourcing the config.
|
||||
# This allows early calls to enable_extension(), but initialization proper is done later.
|
||||
# shellcheck source=scripts/extensions.sh
|
||||
source "${SRC}"/scripts/extensions.sh
|
||||
|
||||
display_alert "Using config file" "${CONFIG_FILE}" "info"
|
||||
pushd "${CONFIG_PATH}" > /dev/null || exit
|
||||
# shellcheck source=/dev/null
|
||||
source "$CONFIG_FILE"
|
||||
popd > /dev/null
|
||||
source "${CONFIG_FILE}"
|
||||
popd > /dev/null || exit
|
||||
|
||||
[[ -z "${USERPATCHES_PATH}" ]] && USERPATCHES_PATH="$CONFIG_PATH"
|
||||
[[ -z "${USERPATCHES_PATH}" ]] && USERPATCHES_PATH="${CONFIG_PATH}"
|
||||
|
||||
# Script parameters handling
|
||||
while [[ $1 == *=* ]]; do
|
||||
parameter=${1%%=*}
|
||||
value=${1##*=}
|
||||
shift
|
||||
display_alert "Command line: setting $parameter to" "${value:-(empty)}" "info"
|
||||
eval "$parameter=\"$value\""
|
||||
while [[ "${1}" == *=* ]]; do
|
||||
|
||||
parameter=${1%%=*}
|
||||
value=${1##*=}
|
||||
shift
|
||||
display_alert "Command line: setting $parameter to" "${value:-(empty)}" "info"
|
||||
eval "$parameter=\"$value\""
|
||||
|
||||
done
|
||||
|
||||
if [[ $BUILD_ALL == yes || $BUILD_ALL == demo ]]; then
|
||||
|
||||
if [[ "${BUILD_ALL}" == "yes" || "${BUILD_ALL}" == "demo" ]]; then
|
||||
|
||||
# shellcheck source=scripts/build-all-ng.sh
|
||||
source "${SRC}"/scripts/build-all-ng.sh
|
||||
|
||||
else
|
||||
|
||||
# shellcheck source=scripts/main.sh
|
||||
source "${SRC}"/scripts/main.sh
|
||||
|
||||
fi
|
||||
|
||||
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
Executable
BIN
Binary file not shown.
Vendored
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
Executable
BIN
Binary file not shown.
Vendored
Executable
BIN
Binary file not shown.
Vendored
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
+14
-39
@@ -401,52 +401,27 @@ static unsigned char compare_char(unsigned char ch)
|
||||
static void set_mac_address(uint8_t *addr)
|
||||
{
|
||||
int i = 0;
|
||||
SPRD_DBG("%s", __func__);
|
||||
//for (i = 0; i < 6; i++)
|
||||
// addr[5-i] = (unsigned char)local_bdaddr[i];
|
||||
|
||||
FILE *fp = fopen("/sys/class/addr_mgt/addr_bt", "r+");
|
||||
unsigned char buff[255];
|
||||
unsigned char tmp[5];
|
||||
unsigned char str, str2;
|
||||
|
||||
FILE *fp = fopen("/sys/class/addr_mgt/addr_bt", "r");
|
||||
|
||||
SPRD_DBG("%s", __func__);
|
||||
|
||||
fscanf(fp, "%s", buff);
|
||||
fclose(fp);
|
||||
int k = 0;
|
||||
|
||||
unsigned char tmp[5];
|
||||
sprintf(tmp, "%c%c", buff[0], buff[1]);
|
||||
unsigned char str = compare_char(tmp[0]);
|
||||
unsigned char str2 = compare_char(tmp[1]);
|
||||
local_bdaddr[0] = (str << 4) | str2;
|
||||
|
||||
sprintf(tmp, "%c%c", buff[3], buff[4]);
|
||||
str = compare_char(tmp[0]);
|
||||
str2 = compare_char(tmp[1]);
|
||||
local_bdaddr[1] = (str << 4) | str2;
|
||||
|
||||
sprintf(tmp, "%c%c", buff[6], buff[7]);
|
||||
str = compare_char(tmp[0]);
|
||||
str2 = compare_char(tmp[1]);
|
||||
local_bdaddr[2] = (str << 4) | str2;
|
||||
|
||||
sprintf(tmp, "%c%c", buff[9], buff[10]);
|
||||
str = compare_char(tmp[0]);
|
||||
str2 = compare_char(tmp[1]);
|
||||
local_bdaddr[3] = (str << 4) | str2;
|
||||
|
||||
sprintf(tmp, "%c%c", buff[12], buff[13]);
|
||||
str = compare_char(tmp[0]);
|
||||
str2 = compare_char(tmp[1]);
|
||||
local_bdaddr[4] = (str << 4) | str2;
|
||||
|
||||
sprintf(tmp, "%c%c", buff[15], buff[16]);
|
||||
str = compare_char(tmp[0]);
|
||||
str2 = compare_char(tmp[1]);
|
||||
local_bdaddr[5] = (str << 4) | str2;
|
||||
|
||||
for (i=0; i<6; i++)
|
||||
{
|
||||
for (i = 0; i < 6; i++)
|
||||
addr[5-i] = (unsigned char)local_bdaddr[i];
|
||||
sprintf(tmp, "%c%c", buff[3*i], buff[3*i+1]);
|
||||
str = compare_char(tmp[0]);
|
||||
str2 = compare_char(tmp[1]);
|
||||
local_bdaddr[i] = (str << 4) | str2;
|
||||
}
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
addr[5-i] = (unsigned char)local_bdaddr[i];
|
||||
}
|
||||
|
||||
static void vnd_load_configure(const char *p_path, const conf_entry_t *entry)
|
||||
|
||||
+809
@@ -0,0 +1,809 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <limits.h>
|
||||
#include "hciattach.h"
|
||||
|
||||
/******************************************************************************
|
||||
** Constants & Macros
|
||||
******************************************************************************/
|
||||
#define LOG_STR "SPRD Bluetooth"
|
||||
#define DBG_ON 1
|
||||
|
||||
#define SPRD_DBG(fmt, arg...) \
|
||||
do { \
|
||||
if (DBG_ON) \
|
||||
fprintf(stderr, "%s: " fmt "\n" , LOG_STR, ##arg); \
|
||||
} while(0)
|
||||
|
||||
#define SPRD_ERR(fmt, arg...) \
|
||||
do { \
|
||||
fprintf(stderr, "%s ERROR: " fmt "\n", LOG_STR, ##arg);\
|
||||
perror(LOG_STR" ERROR reason"); \
|
||||
} while(0)
|
||||
|
||||
#define SPRD_DUMP(buffer, len) \
|
||||
fprintf(stderr, "%s: ", LOG_STR); \
|
||||
do { \
|
||||
int i = 0; \
|
||||
for (i = 0; i < len; i++) { \
|
||||
if (i && !(i % 16)) { \
|
||||
fprintf(stderr, "\n"); \
|
||||
fprintf(stderr, "%s: ", LOG_STR); \
|
||||
} \
|
||||
fprintf(stderr, "%02x ", buffer[i]); \
|
||||
} \
|
||||
fprintf(stderr, "\n"); \
|
||||
} while (0)
|
||||
|
||||
#define CONF_ITEM_TABLE(ITEM, ACTION, BUF, LEN) \
|
||||
{ #ITEM, ACTION, &(BUF.ITEM), LEN, (sizeof(BUF.ITEM) / LEN) }
|
||||
|
||||
#define UINT8_TO_STREAM(p, u8) \
|
||||
{ *(p)++ = (uint8_t)(u8); }
|
||||
|
||||
#define STREAM_TO_UINT8(u8, p) \
|
||||
{ \
|
||||
(u8) = (uint8_t)(*(p)); \
|
||||
(p) += 1; \
|
||||
}
|
||||
|
||||
#define UINT16_TO_STREAM(p, u16) \
|
||||
{ \
|
||||
*(p)++ = (uint8_t)(u16); \
|
||||
*(p)++ = (uint8_t)((u16) >> 8); \
|
||||
}
|
||||
|
||||
#define STREAM_TO_UINT16(u16, p) \
|
||||
{ \
|
||||
(u16) = ((uint16_t)(*(p)) + (((uint16_t)(*((p) + 1))) << 8)); \
|
||||
(p) += 2; \
|
||||
}
|
||||
|
||||
#define UINT32_TO_STREAM(p, u32) \
|
||||
{ \
|
||||
*(p)++ = (uint8_t)(u32); \
|
||||
*(p)++ = (uint8_t)((u32) >> 8); \
|
||||
*(p)++ = (uint8_t)((u32) >> 16); \
|
||||
*(p)++ = (uint8_t)((u32) >> 24); \
|
||||
}
|
||||
|
||||
#define CONF_COMMENT '#'
|
||||
#define CONF_DELIMITERS " =\n\r\t"
|
||||
#define CONF_VALUES_DELIMITERS "=\n\r\t#"
|
||||
#define CONF_VALUES_PARTITION " ,=\n\r\t#"
|
||||
#define CONF_MAX_LINE_LEN 255
|
||||
|
||||
#define HCI_PSKEY 0xFCA0
|
||||
#define HCI_VSC_ENABLE_COMMMAND 0xFCA1
|
||||
#define HCI_RF_PARA 0xFCA2
|
||||
|
||||
#define RESPONSE_LENGTH 100
|
||||
#define HCI_CMD_MAX_LEN 258
|
||||
#define HCI_EVT_CMD_CMPL_OPCODE 3
|
||||
#define HCI_PACKET_TYPE_COMMAND 1
|
||||
#define HCI_CMD_PREAMBLE_SIZE 3
|
||||
|
||||
#define FW_NODE_BYTE 6
|
||||
#define FW_DATE_D_BYTE 8
|
||||
#define FW_DATE_M_BYTE 9
|
||||
#define FW_DATE_Y_BYTE 10
|
||||
|
||||
#define BT_CONFIG_PATH "/lib/firmware"
|
||||
#define BT_HC_HDR_SIZE (sizeof(HC_BT_HDR))
|
||||
#define BT_VND_OP_RESULT_SUCCESS 0
|
||||
#define BT_VND_OP_RESULT_FAIL 1
|
||||
#define MSG_STACK_TO_HC_HCI_CMD 0x2000
|
||||
#define START_STOP_CMD_SIZE 3
|
||||
#define DUAL_MODE 0
|
||||
#define DISABLE_BT 0
|
||||
#define ENABLE_BT 1
|
||||
|
||||
typedef void (*hci_cback)(void *);
|
||||
typedef int (conf_action_t)(char *p_conf_name, char *p_conf_value, void *buf, int len, int size);
|
||||
|
||||
typedef struct {
|
||||
uint16_t event;
|
||||
uint16_t len;
|
||||
uint16_t offset;
|
||||
uint16_t layer_specific;
|
||||
uint8_t data[];
|
||||
} HC_BT_HDR;
|
||||
|
||||
typedef struct {
|
||||
uint32_t device_class;
|
||||
uint8_t feature_set[16];
|
||||
uint8_t device_addr[6];
|
||||
uint16_t comp_id;
|
||||
uint8_t g_sys_uart0_communication_supported;
|
||||
uint8_t cp2_log_mode;
|
||||
uint8_t LogLevel;
|
||||
uint8_t g_central_or_perpheral;
|
||||
uint16_t Log_BitMask;
|
||||
uint8_t super_ssp_enable;
|
||||
uint8_t common_rfu_b3;
|
||||
uint32_t common_rfu_w[2];
|
||||
uint32_t le_rfu_w[2];
|
||||
uint32_t lmp_rfu_w[2];
|
||||
uint32_t lc_rfu_w[2];
|
||||
uint16_t g_wbs_nv_117;
|
||||
uint16_t g_wbs_nv_118;
|
||||
uint16_t g_nbv_nv_117;
|
||||
uint16_t g_nbv_nv_118;
|
||||
uint8_t g_sys_sco_transmit_mode;
|
||||
uint8_t audio_rfu_b1;
|
||||
uint8_t audio_rfu_b2;
|
||||
uint8_t audio_rfu_b3;
|
||||
uint32_t audio_rfu_w[2];
|
||||
uint8_t g_sys_sleep_in_standby_supported;
|
||||
uint8_t g_sys_sleep_master_supported;
|
||||
uint8_t g_sys_sleep_slave_supported;
|
||||
uint8_t power_rfu_b1;
|
||||
uint32_t power_rfu_w[2];
|
||||
uint32_t win_ext;
|
||||
uint8_t edr_tx_edr_delay;
|
||||
uint8_t edr_rx_edr_delay;
|
||||
uint8_t tx_delay;
|
||||
uint8_t rx_delay;
|
||||
uint32_t bb_rfu_w[2];
|
||||
uint8_t agc_mode;
|
||||
uint8_t diff_or_eq;
|
||||
uint8_t ramp_mode;
|
||||
uint8_t modem_rfu_b1;
|
||||
uint32_t modem_rfu_w[2];
|
||||
uint32_t BQB_BitMask_1;
|
||||
uint32_t BQB_BitMask_2;
|
||||
uint16_t bt_coex_threshold[8];
|
||||
uint32_t other_rfu_w[6];
|
||||
} pskey_config_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t g_GainValue_A[6];
|
||||
uint16_t g_ClassicPowerValue_A[10];
|
||||
uint16_t g_LEPowerValue_A[16];
|
||||
uint16_t g_BRChannelpwrvalue_A[8];
|
||||
uint16_t g_EDRChannelpwrvalue_A[8];
|
||||
uint16_t g_LEChannelpwrvalue_A[8];
|
||||
uint16_t g_GainValue_B[6];
|
||||
uint16_t g_ClassicPowerValue_B[10];
|
||||
uint16_t g_LEPowerValue_B[16];
|
||||
uint16_t g_BRChannelpwrvalue_B[8];
|
||||
uint16_t g_EDRChannelpwrvalue_B[8];
|
||||
uint16_t g_LEChannelpwrvalue_B[8];
|
||||
uint16_t LE_fix_powerword;
|
||||
uint8_t Classic_pc_by_channel;
|
||||
uint8_t LE_pc_by_channel;
|
||||
uint8_t RF_switch_mode;
|
||||
uint8_t Data_Capture_Mode;
|
||||
uint8_t Analog_IQ_Debug_Mode;
|
||||
uint8_t RF_common_rfu_b3;
|
||||
uint32_t RF_common_rfu_w[5];
|
||||
} rf_config_t;
|
||||
|
||||
typedef struct {
|
||||
const char *conf_entry;
|
||||
conf_action_t *p_action;
|
||||
void *buf;
|
||||
int len;
|
||||
int size;
|
||||
} conf_entry_t;
|
||||
|
||||
static uint8_t local_bdaddr[6]={0x10, 0x11, 0x12, 0x13, 0x14, 0x15};
|
||||
static pskey_config_t marlin3_pskey;
|
||||
static rf_config_t marlin3_rf_config;
|
||||
static int s_bt_fd = -1;
|
||||
|
||||
static const conf_entry_t marlin3_pksey_table[] = {
|
||||
CONF_ITEM_TABLE(device_class, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(feature_set, 0, marlin3_pskey, 16),
|
||||
CONF_ITEM_TABLE(device_addr, 0, marlin3_pskey, 6),
|
||||
CONF_ITEM_TABLE(comp_id, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(g_sys_uart0_communication_supported, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(cp2_log_mode, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(LogLevel, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(g_central_or_perpheral, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(Log_BitMask, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(super_ssp_enable, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(common_rfu_b3, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(common_rfu_w, 0, marlin3_pskey, 2),
|
||||
CONF_ITEM_TABLE(le_rfu_w, 0, marlin3_pskey, 2),
|
||||
CONF_ITEM_TABLE(lmp_rfu_w, 0, marlin3_pskey, 2),
|
||||
CONF_ITEM_TABLE(lc_rfu_w, 0, marlin3_pskey, 2),
|
||||
CONF_ITEM_TABLE(g_wbs_nv_117, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(g_wbs_nv_118, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(g_nbv_nv_117, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(g_nbv_nv_118, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(g_sys_sco_transmit_mode, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(audio_rfu_b1, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(audio_rfu_b2, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(audio_rfu_b3, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(audio_rfu_w, 0, marlin3_pskey, 2),
|
||||
CONF_ITEM_TABLE(g_sys_sleep_in_standby_supported, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(g_sys_sleep_master_supported, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(g_sys_sleep_slave_supported, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(power_rfu_b1, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(power_rfu_w, 0, marlin3_pskey, 2),
|
||||
CONF_ITEM_TABLE(win_ext, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(edr_tx_edr_delay, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(edr_rx_edr_delay, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(tx_delay, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(rx_delay, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(bb_rfu_w, 0, marlin3_pskey, 2),
|
||||
CONF_ITEM_TABLE(agc_mode, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(diff_or_eq, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(ramp_mode, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(modem_rfu_b1, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(modem_rfu_w, 0, marlin3_pskey, 2),
|
||||
CONF_ITEM_TABLE(BQB_BitMask_1, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(BQB_BitMask_2, 0, marlin3_pskey, 1),
|
||||
CONF_ITEM_TABLE(bt_coex_threshold, 0, marlin3_pskey, 8),
|
||||
CONF_ITEM_TABLE(other_rfu_w, 0, marlin3_pskey, 6),
|
||||
{0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
static const conf_entry_t marlin3_rf_table[] = {
|
||||
CONF_ITEM_TABLE(g_GainValue_A, 0, marlin3_rf_config, 6),
|
||||
CONF_ITEM_TABLE(g_ClassicPowerValue_A, 0, marlin3_rf_config, 10),
|
||||
CONF_ITEM_TABLE(g_LEPowerValue_A, 0, marlin3_rf_config, 16),
|
||||
CONF_ITEM_TABLE(g_BRChannelpwrvalue_A, 0, marlin3_rf_config, 8),
|
||||
CONF_ITEM_TABLE(g_EDRChannelpwrvalue_A, 0, marlin3_rf_config, 8),
|
||||
CONF_ITEM_TABLE(g_LEChannelpwrvalue_A, 0, marlin3_rf_config, 8),
|
||||
CONF_ITEM_TABLE(g_GainValue_B, 0, marlin3_rf_config, 6),
|
||||
CONF_ITEM_TABLE(g_ClassicPowerValue_B, 0, marlin3_rf_config, 10),
|
||||
CONF_ITEM_TABLE(g_LEPowerValue_B, 0, marlin3_rf_config, 16),
|
||||
CONF_ITEM_TABLE(g_BRChannelpwrvalue_B, 0, marlin3_rf_config, 8),
|
||||
CONF_ITEM_TABLE(g_EDRChannelpwrvalue_B, 0, marlin3_rf_config, 8),
|
||||
CONF_ITEM_TABLE(g_LEChannelpwrvalue_B, 0, marlin3_rf_config, 8),
|
||||
CONF_ITEM_TABLE(LE_fix_powerword, 0, marlin3_rf_config, 1),
|
||||
CONF_ITEM_TABLE(Classic_pc_by_channel, 0, marlin3_rf_config, 1),
|
||||
CONF_ITEM_TABLE(LE_pc_by_channel, 0, marlin3_rf_config, 1),
|
||||
CONF_ITEM_TABLE(RF_switch_mode, 0, marlin3_rf_config, 1),
|
||||
CONF_ITEM_TABLE(Data_Capture_Mode, 0, marlin3_rf_config, 1),
|
||||
CONF_ITEM_TABLE(Analog_IQ_Debug_Mode, 0, marlin3_rf_config, 1),
|
||||
CONF_ITEM_TABLE(RF_common_rfu_b3, 0, marlin3_rf_config, 1),
|
||||
CONF_ITEM_TABLE(RF_common_rfu_w, 0, marlin3_rf_config, 5),
|
||||
{0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
static void log_bin_to_hexstr(uint8_t *bin, uint8_t binsz, const char *log_tag)
|
||||
{
|
||||
SPRD_DBG("%s", log_tag);
|
||||
SPRD_DUMP(bin, binsz);
|
||||
}
|
||||
|
||||
static void parse_number(char *p_conf_name, char *p_conf_value, void *buf, int len, int size)
|
||||
{
|
||||
uint8_t *dest = (uint8_t *)buf;
|
||||
char *sub_value, *p;
|
||||
uint32_t value;
|
||||
(void)p_conf_name;
|
||||
sub_value = strtok_r(p_conf_value, CONF_VALUES_PARTITION, &p);
|
||||
do {
|
||||
if (sub_value == NULL)
|
||||
break;
|
||||
|
||||
if (sub_value[0] == '0' && (sub_value[1] == 'x' || sub_value[1] == 'X'))
|
||||
value = strtoul(sub_value, 0, 16) & 0xFFFFFFFF;
|
||||
else
|
||||
value = strtoul(sub_value, 0, 10) & 0xFFFFFFFF;
|
||||
|
||||
switch (size) {
|
||||
case sizeof(uint8_t):
|
||||
*dest = value & 0xFF;
|
||||
dest += size;
|
||||
break;
|
||||
|
||||
case sizeof(uint16_t):
|
||||
*((uint16_t *)dest) = value & 0xFFFF;
|
||||
dest += size;
|
||||
break;
|
||||
|
||||
case sizeof(uint32_t):
|
||||
*((uint32_t *)dest) = value & 0xFFFFFFFF;
|
||||
dest += size;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
sub_value = strtok_r(NULL, CONF_VALUES_PARTITION, &p);
|
||||
} while (--len);
|
||||
}
|
||||
|
||||
static unsigned char compare_char(unsigned char ch)
|
||||
{
|
||||
unsigned char data = 0x0;
|
||||
|
||||
switch(ch)
|
||||
{
|
||||
case 0:
|
||||
case '0':
|
||||
data = 0x0;
|
||||
break;
|
||||
case 1:
|
||||
case '1':
|
||||
data = 0x1;
|
||||
break;
|
||||
case 2:
|
||||
case '2':
|
||||
data = 0x2;
|
||||
break;
|
||||
case 3:
|
||||
case '3':
|
||||
data = 0x3;
|
||||
break;
|
||||
case 4:
|
||||
case '4':
|
||||
data = 0x4;
|
||||
break;
|
||||
case 5:
|
||||
case '5':
|
||||
data = 0x5;
|
||||
break;
|
||||
case 6:
|
||||
case '6':
|
||||
data = 0x6;
|
||||
break;
|
||||
case 7:
|
||||
case '7':
|
||||
data = 0x7;
|
||||
break;
|
||||
case 8:
|
||||
case '8':
|
||||
data = 0x8;
|
||||
break;
|
||||
case 9:
|
||||
case '9':
|
||||
data = 0x9;
|
||||
break;
|
||||
case 10:
|
||||
case 'a':
|
||||
case 'A':
|
||||
data = 0xA;
|
||||
break;
|
||||
case 11:
|
||||
case 'b':
|
||||
case 'B':
|
||||
data = 0xB;
|
||||
break;
|
||||
case 12:
|
||||
case 'c':
|
||||
case 'C':
|
||||
data = 0xC;
|
||||
break;
|
||||
case 13:
|
||||
case 'd':
|
||||
case 'D':
|
||||
data = 0xD;
|
||||
break;
|
||||
case 14:
|
||||
case 'e':
|
||||
case 'E':
|
||||
data = 0xE;
|
||||
break;
|
||||
case 15:
|
||||
case 'f':
|
||||
case 'F':
|
||||
data = 0xF;
|
||||
break;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
static void set_mac_address(uint8_t *addr)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
FILE *fp = fopen("/sys/class/net/wlan0/address", "r");
|
||||
unsigned char buff[255];
|
||||
unsigned char tmp[5];
|
||||
unsigned char str, str2;
|
||||
|
||||
SPRD_DBG("%s", __func__);
|
||||
|
||||
fscanf(fp, "%s", buff);
|
||||
fclose(fp);
|
||||
|
||||
for (i=0; i<6; i++)
|
||||
{
|
||||
sprintf(tmp, "%c%c", buff[3*i], buff[3*i+1]);
|
||||
str = compare_char(tmp[0]);
|
||||
str2 = compare_char(tmp[1]);
|
||||
local_bdaddr[i] = (str << 4) | str2;
|
||||
}
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
addr[5-i] = (unsigned char)local_bdaddr[i];
|
||||
|
||||
addr[0] += 1;
|
||||
addr[1] += 1;
|
||||
}
|
||||
|
||||
static void vnd_load_configure(const char *p_path, const conf_entry_t *entry)
|
||||
{
|
||||
FILE *p_file;
|
||||
char *p_name, *p_value, *p;
|
||||
conf_entry_t *p_entry;
|
||||
char line[CONF_MAX_LINE_LEN + 1]; /* add 1 for \0 char */
|
||||
|
||||
SPRD_DBG("Attempt to load conf from %s", p_path);
|
||||
|
||||
if ((p_file = fopen(p_path, "r")) != NULL) {
|
||||
/* read line by line */
|
||||
while (fgets(line, CONF_MAX_LINE_LEN + 1, p_file) != NULL) {
|
||||
if (line[0] == CONF_COMMENT) continue;
|
||||
|
||||
p_name = strtok_r(line, CONF_DELIMITERS, &p);
|
||||
|
||||
if (NULL == p_name) {
|
||||
continue;
|
||||
}
|
||||
|
||||
p_value = strtok_r(NULL, CONF_VALUES_DELIMITERS, &p);
|
||||
|
||||
if (NULL == p_value) {
|
||||
SPRD_DBG("vnd_load_conf: missing value for name: %s", p_name);
|
||||
continue;
|
||||
}
|
||||
|
||||
p_entry = (conf_entry_t*)entry;
|
||||
|
||||
while (p_entry->conf_entry != NULL) {
|
||||
if (strcmp(p_entry->conf_entry, (const char *)p_name) == 0) {
|
||||
if (p_entry->p_action) {
|
||||
p_entry->p_action(p_name, p_value, p_entry->buf, p_entry->len,
|
||||
p_entry->size);
|
||||
} else {
|
||||
SPRD_DBG("%s -> %s", p_name, p_value);
|
||||
parse_number(p_name, p_value, p_entry->buf, p_entry->len,
|
||||
p_entry->size);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
p_entry++;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(p_file);
|
||||
} else {
|
||||
SPRD_DBG("vnd_load_conf file >%s< not found", p_path);
|
||||
}
|
||||
}
|
||||
|
||||
static size_t H4Protocol_Send(uint8_t type, const uint8_t* data, size_t length)
|
||||
{
|
||||
struct iovec iov[] = {
|
||||
{&type, sizeof(type)},
|
||||
{(uint8_t *)data, length}};
|
||||
|
||||
ssize_t ret = 0;
|
||||
do {
|
||||
ret = writev(s_bt_fd, iov, sizeof(iov) / sizeof(iov[0]));
|
||||
} while (-1 == ret && EAGAIN == errno);
|
||||
|
||||
if (ret == -1) {
|
||||
SPRD_ERR("%s error writing to UART (%s)", __func__, strerror(errno));
|
||||
} else if (ret < length + 1) {
|
||||
SPRD_ERR("%s: %d / %d bytes written - something went wrong...", __func__, ret, length + 1);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void *bt_vendor_alloc(int size)
|
||||
{
|
||||
void *p = (uint8_t *)malloc(size);
|
||||
return p;
|
||||
}
|
||||
|
||||
static void bt_vendor_free(void *buffer)
|
||||
{
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
static uint8_t bt_vendor_xmit(uint16_t opcode, void* buffer, hci_cback callback)
|
||||
{
|
||||
uint8_t type = HCI_PACKET_TYPE_COMMAND;
|
||||
(void)opcode;
|
||||
HC_BT_HDR* bt_hdr = (HC_BT_HDR *)buffer;
|
||||
H4Protocol_Send(type, bt_hdr->data, bt_hdr->len);
|
||||
return BT_VND_OP_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static uint8_t sprd_vnd_send_hci_vsc(uint16_t cmd, uint8_t *payload, uint8_t len, hci_cback cback)
|
||||
{
|
||||
HC_BT_HDR *p_buf;
|
||||
uint8_t *p, ret;
|
||||
|
||||
p_buf = (HC_BT_HDR *)bt_vendor_alloc(
|
||||
BT_HC_HDR_SIZE + HCI_CMD_PREAMBLE_SIZE + len);
|
||||
if (p_buf) {
|
||||
p_buf->event = MSG_STACK_TO_HC_HCI_CMD;
|
||||
p_buf->offset = 0;
|
||||
p_buf->layer_specific = 0;
|
||||
p_buf->len = HCI_CMD_PREAMBLE_SIZE + len;
|
||||
p = (uint8_t *)(p_buf + 1);
|
||||
|
||||
UINT16_TO_STREAM(p, cmd);
|
||||
*p++ = len;
|
||||
memcpy(p, payload, len);
|
||||
log_bin_to_hexstr((uint8_t *)(p_buf + 1), HCI_CMD_PREAMBLE_SIZE + len, __FUNCTION__);
|
||||
ret = bt_vendor_xmit(cmd, p_buf, cback);
|
||||
bt_vendor_free(p_buf);
|
||||
return ret;
|
||||
}
|
||||
return BT_VND_OP_RESULT_FAIL;
|
||||
}
|
||||
|
||||
static void hw_core_cback(void *p_mem)
|
||||
{
|
||||
uint8_t *p_evt_buf = (uint8_t *)p_mem;
|
||||
uint8_t *p, status;
|
||||
uint16_t opcode, mode;
|
||||
|
||||
p = (uint8_t *)(p_evt_buf + 1) + HCI_EVT_CMD_CMPL_OPCODE;
|
||||
STREAM_TO_UINT16(opcode,p);
|
||||
STREAM_TO_UINT16(mode,p);
|
||||
STREAM_TO_UINT8(status,p);
|
||||
SPRD_DBG("%s hw_core_cback response: [0x%04X, 0x%04X, 0x%02X]", __func__, opcode, mode, status);
|
||||
bt_vendor_free(p_evt_buf);
|
||||
}
|
||||
|
||||
static void hw_core_enable(unsigned char enable)
|
||||
{
|
||||
uint8_t *p, msg_req[HCI_CMD_MAX_LEN];
|
||||
p = msg_req;
|
||||
UINT16_TO_STREAM(p, DUAL_MODE);
|
||||
UINT8_TO_STREAM(p, enable ? ENABLE_BT : DISABLE_BT);
|
||||
sprd_vnd_send_hci_vsc(HCI_VSC_ENABLE_COMMMAND, msg_req, (uint8_t)(p - msg_req), NULL);
|
||||
}
|
||||
|
||||
static void hw_rf_cback(void *p_mem)
|
||||
{
|
||||
uint8_t *p_evt_buf = (uint8_t *)p_mem, len;
|
||||
uint8_t *p, status;
|
||||
uint16_t opcode, mode = 0;
|
||||
|
||||
p = (uint8_t *)(p_evt_buf + 1) + 1;
|
||||
STREAM_TO_UINT8(len, p);
|
||||
|
||||
p = (uint8_t *)(p_evt_buf + 1) + HCI_EVT_CMD_CMPL_OPCODE;
|
||||
STREAM_TO_UINT16(opcode, p);
|
||||
if (len == 6)
|
||||
STREAM_TO_UINT16(mode, p);
|
||||
|
||||
STREAM_TO_UINT8(status, p);
|
||||
|
||||
SPRD_DBG("%s hw_rf_cback response: [0x%04X, 0x%04X, 0x%02X]", __func__, opcode, mode, status);
|
||||
/* Must free the RX event buffer */
|
||||
bt_vendor_free(p_evt_buf);
|
||||
}
|
||||
|
||||
static int marlin3_rf_preload()
|
||||
{
|
||||
uint8_t *p, msg_req[HCI_CMD_MAX_LEN];
|
||||
int i;
|
||||
|
||||
SPRD_DBG("yujian.qin %s", __FUNCTION__);
|
||||
p = msg_req;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_GainValue_A[i]);
|
||||
|
||||
for (i = 0; i < 10; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_ClassicPowerValue_A[i]);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_LEPowerValue_A[i]);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_BRChannelpwrvalue_A[i]);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_EDRChannelpwrvalue_A[i]);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_LEChannelpwrvalue_A[i]);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_GainValue_B[i]);
|
||||
|
||||
for (i = 0; i < 10; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_ClassicPowerValue_B[i]);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_LEPowerValue_B[i]);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_BRChannelpwrvalue_B[i]);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_EDRChannelpwrvalue_B[i]);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.g_LEChannelpwrvalue_B[i]);
|
||||
|
||||
UINT16_TO_STREAM(p, marlin3_rf_config.LE_fix_powerword);
|
||||
|
||||
UINT8_TO_STREAM(p, marlin3_rf_config.Classic_pc_by_channel);
|
||||
UINT8_TO_STREAM(p, marlin3_rf_config.LE_pc_by_channel);
|
||||
UINT8_TO_STREAM(p, marlin3_rf_config.RF_switch_mode);
|
||||
UINT8_TO_STREAM(p, marlin3_rf_config.Data_Capture_Mode);
|
||||
UINT8_TO_STREAM(p, marlin3_rf_config.Analog_IQ_Debug_Mode);
|
||||
UINT8_TO_STREAM(p, marlin3_rf_config.RF_common_rfu_b3);
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
UINT32_TO_STREAM(p, marlin3_rf_config.RF_common_rfu_w[i]);
|
||||
|
||||
sprd_vnd_send_hci_vsc(HCI_RF_PARA, msg_req, (uint8_t)(p - msg_req), NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void marlin3_pskey_cback(void *p_mem)
|
||||
{
|
||||
uint8_t *p_evt_buf = (uint8_t *)p_mem;
|
||||
|
||||
uint16_t opcode, node, year;
|
||||
uint8_t *p, month, day;
|
||||
(void)opcode;
|
||||
|
||||
p = (uint8_t *)(p_evt_buf + 1) + HCI_EVT_CMD_CMPL_OPCODE;
|
||||
STREAM_TO_UINT16(opcode, p);
|
||||
|
||||
p = (uint8_t *)(p_evt_buf + 1) + FW_NODE_BYTE;
|
||||
STREAM_TO_UINT16(node, p);
|
||||
p = (uint8_t *)(p_evt_buf + 1) + FW_DATE_Y_BYTE;
|
||||
STREAM_TO_UINT16(year, p);
|
||||
p = (uint8_t *)(p_evt_buf + 1) + FW_DATE_M_BYTE;
|
||||
STREAM_TO_UINT8(month, p);
|
||||
p = (uint8_t *)(p_evt_buf + 1) + FW_DATE_D_BYTE;
|
||||
STREAM_TO_UINT8(day, p);
|
||||
|
||||
SPRD_DBG("Bluetooth Firmware Node: %04X Date: %04x-%02x-%02x", node, year, month, day);
|
||||
|
||||
/* Must free the RX event buffer */
|
||||
bt_vendor_free(p_evt_buf);
|
||||
}
|
||||
|
||||
static int marlin3_pskey_preload(void *arg)
|
||||
{
|
||||
uint8_t *p, msg_req[HCI_CMD_MAX_LEN];
|
||||
int i;
|
||||
(void)arg;
|
||||
|
||||
SPRD_DBG("%s", __FUNCTION__);
|
||||
p = msg_req;
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.device_class);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.feature_set[i]);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.device_addr[i]);
|
||||
|
||||
UINT16_TO_STREAM(p, marlin3_pskey.comp_id);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.g_sys_uart0_communication_supported);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.cp2_log_mode);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.LogLevel);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.g_central_or_perpheral);
|
||||
|
||||
UINT16_TO_STREAM(p, marlin3_pskey.Log_BitMask);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.super_ssp_enable);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.common_rfu_b3);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.common_rfu_w[i]);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.le_rfu_w[i]);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.lmp_rfu_w[i]);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.lc_rfu_w[i]);
|
||||
|
||||
UINT16_TO_STREAM(p, marlin3_pskey.g_wbs_nv_117);
|
||||
UINT16_TO_STREAM(p, marlin3_pskey.g_wbs_nv_118);
|
||||
UINT16_TO_STREAM(p, marlin3_pskey.g_nbv_nv_117);
|
||||
UINT16_TO_STREAM(p, marlin3_pskey.g_nbv_nv_118);
|
||||
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.g_sys_sco_transmit_mode);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.audio_rfu_b1);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.audio_rfu_b2);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.audio_rfu_b3);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.audio_rfu_w[i]);
|
||||
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.g_sys_sleep_in_standby_supported);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.g_sys_sleep_master_supported);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.g_sys_sleep_slave_supported);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.power_rfu_b1);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.power_rfu_w[i]);
|
||||
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.win_ext);
|
||||
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.edr_tx_edr_delay);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.edr_rx_edr_delay);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.tx_delay);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.rx_delay);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.bb_rfu_w[i]);
|
||||
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.agc_mode);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.diff_or_eq);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.ramp_mode);
|
||||
UINT8_TO_STREAM(p, marlin3_pskey.modem_rfu_b1);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.modem_rfu_w[i]);
|
||||
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.BQB_BitMask_1);
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.BQB_BitMask_2);
|
||||
for (i = 0; i < 8; i++)
|
||||
UINT16_TO_STREAM(p, marlin3_pskey.bt_coex_threshold[i]);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
UINT32_TO_STREAM(p, marlin3_pskey.other_rfu_w[i]);
|
||||
|
||||
sprd_vnd_send_hci_vsc(HCI_PSKEY, msg_req, (uint8_t)(p - msg_req), NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int sprd_config_init(int fd, struct uart_t *u, struct termios *ti)
|
||||
{
|
||||
uint8_t *recv = NULL;
|
||||
int len = 0;
|
||||
|
||||
s_bt_fd = fd;
|
||||
|
||||
memset(&marlin3_pskey, 0, sizeof(marlin3_pskey));
|
||||
memset(&marlin3_rf_config, 0, sizeof(marlin3_rf_config));
|
||||
vnd_load_configure(BT_CONFIG_PATH "/bt_configure_pskey.ini", &marlin3_pksey_table[0]);
|
||||
vnd_load_configure(BT_CONFIG_PATH "/bt_configure_rf.ini", &marlin3_rf_table[0]);
|
||||
set_mac_address(marlin3_pskey.device_addr);
|
||||
|
||||
marlin3_pskey_preload(NULL);
|
||||
recv = bt_vendor_alloc(RESPONSE_LENGTH);
|
||||
len = read_hci_event(s_bt_fd, recv, RESPONSE_LENGTH);
|
||||
SPRD_DBG("Received event, len: %d", len);
|
||||
SPRD_DUMP(recv, len);
|
||||
marlin3_pskey_cback(recv);
|
||||
|
||||
marlin3_rf_preload();
|
||||
recv = bt_vendor_alloc(RESPONSE_LENGTH);
|
||||
len = read_hci_event(s_bt_fd, recv, RESPONSE_LENGTH);
|
||||
SPRD_DBG("Received event, len: %d", len);
|
||||
SPRD_DUMP(recv, len);
|
||||
hw_rf_cback(recv);
|
||||
|
||||
hw_core_enable(1);
|
||||
recv = bt_vendor_alloc(RESPONSE_LENGTH);
|
||||
len = read_hci_event(s_bt_fd, recv, RESPONSE_LENGTH);
|
||||
SPRD_DBG("Received event, len: %d", len);
|
||||
SPRD_DUMP(recv, len);
|
||||
hw_core_cback(recv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sprd_config_post(int fd, struct uart_t *u, struct termios *ti)
|
||||
{
|
||||
SPRD_DBG("Done setting line discpline");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Regular → Executable
Vendored
+1
-1
@@ -9,7 +9,7 @@
|
||||
"dependencyFollowSource": false,
|
||||
"gpgDisableSign": false,
|
||||
"gpgDisableVerify": false,
|
||||
"gpgProvider": "gpg2",
|
||||
"gpgProvider": "internal",
|
||||
"downloadSourcePackages": false,
|
||||
"ppaDistributorID": "ubuntu",
|
||||
"ppaCodename": "",
|
||||
|
||||
Vendored
+1
@@ -9,6 +9,7 @@
|
||||
"dependencyFollowSource": false,
|
||||
"gpgDisableSign": false,
|
||||
"gpgDisableVerify": false,
|
||||
"gpgProvider": "internal",
|
||||
"downloadSourcePackages": false,
|
||||
"ppaDistributorID": "ubuntu",
|
||||
"ppaCodename": "",
|
||||
|
||||
Vendored
+1
-1
@@ -9,7 +9,7 @@
|
||||
"dependencyFollowSource": false,
|
||||
"gpgDisableSign": false,
|
||||
"gpgDisableVerify": false,
|
||||
"gpgProvider": "gpg2",
|
||||
"gpgProvider": "internal",
|
||||
"downloadSourcePackages": false,
|
||||
"ppaDistributorID": "ubuntu",
|
||||
"ppaCodename": "",
|
||||
|
||||
+2
-1
@@ -5,5 +5,6 @@ BOOTCONFIG="orangepi_3_lts_defconfig"
|
||||
KERNEL_TARGET="legacy,current"
|
||||
MODULES="uwe5622_bsp_sdio sprdbt_tty sprdwl_ng"
|
||||
MODULES_BLACKLIST_LEGACY="bcmdhd"
|
||||
FULL_DESKTOP="yes"
|
||||
ATFBRANCH="tag:v2.2"
|
||||
DISTRIB_TYPE_LEGACY="buster focal"
|
||||
DISTRIB_TYPE_CURRENT="bullseye"
|
||||
|
||||
-1
@@ -3,5 +3,4 @@ BOARD_NAME="Orange Pi 3"
|
||||
BOARDFAMILY="sun50iw6"
|
||||
BOOTCONFIG="orangepi_3_defconfig"
|
||||
KERNEL_TARGET="legacy,current"
|
||||
FULL_DESKTOP="yes"
|
||||
ATFBRANCH="tag:v2.2"
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# Rockchip RK3399 hexa core 4GB RAM SoC GBE eMMC USB3 USB-C WiFi/BT
|
||||
BOARD_NAME="OPI 4 LTS"
|
||||
BOARDFAMILY="rk3399"
|
||||
BOOTCONFIG="orangepi-4-rk3399_defconfig"
|
||||
KERNEL_TARGET="legacy current"
|
||||
MODULES="sprdbt_tty sprdwl_ng"
|
||||
MODULES_BLACKLIST_LEGACY="bcmdhd"
|
||||
BOOT_LOGO="desktop"
|
||||
BOOT_FDT_FILE="rockchip/rk3399-orangepi-4-lts.dtb"
|
||||
DISTRIB_TYPE_LEGACY="buster"
|
||||
DISTRIB_TYPE_CURRENT="bullseye focal"
|
||||
+2
-3
@@ -1,7 +1,6 @@
|
||||
# Rockchip RK3399 hexa core 4GB RAM SoC GBE eMMC USB3 USB-C WiFi/BT
|
||||
BOARD_NAME="OrangePi 4"
|
||||
BOARD_NAME="Orange Pi 4"
|
||||
BOARDFAMILY="rk3399"
|
||||
BOOTCONFIG="orangepi-4-rk3399_defconfig"
|
||||
KERNEL_TARGET="legacy"
|
||||
FULL_DESKTOP="no"
|
||||
KERNEL_TARGET="legacy,current"
|
||||
BOOT_LOGO="desktop"
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
# Allwinner H616 quad core 4GB RAM
|
||||
BOARD_NAME="Orange Pi 400"
|
||||
BOARDFAMILY="sun50iw9"
|
||||
BOOTCONFIG="orangepi_400_defconfig"
|
||||
KERNEL_TARGET="legacy,current"
|
||||
MODULES="uwe5622_bsp_sdio sprdwl_ng sprdbt_tty"
|
||||
MODULES_BLACKLIST_LEGACY="bcmdhd"
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# Rockchip RK3399 hexa core 4GB RAM SoC GBE eMMC USB3 USB-C WiFi/BT
|
||||
BOARD_NAME="OPI 800"
|
||||
BOARDFAMILY="rk3399"
|
||||
BOOTCONFIG="orangepi-800-rk3399_defconfig"
|
||||
KERNEL_TARGET="current"
|
||||
MODULES="sprdbt_tty sprdwl_ng"
|
||||
MODULES_BLACKLIST_LEGACY="bcmdhd"
|
||||
BOOT_LOGO="desktop"
|
||||
DISTRIB_TYPE_LEGACY="buster"
|
||||
DISTRIB_TYPE_CURRENT="bullseye focal jammy"
|
||||
#DISTRIB_TYPE_CURRENT="bullseye bookworm focal jammy"
|
||||
-1
@@ -4,4 +4,3 @@ BOARDFAMILY="sun50iw2"
|
||||
BOOTCONFIG="orangepi_pc2_defconfig"
|
||||
MODULES_LEGACY="sunxi_gpiokey"
|
||||
KERNEL_TARGET="legacy,current"
|
||||
FULL_DESKTOP="yes"
|
||||
|
||||
-1
@@ -4,4 +4,3 @@ BOARDFAMILY="sun8i"
|
||||
BOOTCONFIG="orangepi_plus2e_defconfig"
|
||||
MODULES_LEGACY="8189fs #w1-sunxi #w1-gpio #w1-therm #gc2035 #vfe_v4l2 #sunxi-cir"
|
||||
KERNEL_TARGET="legacy,current"
|
||||
FULL_DESKTOP="yes"
|
||||
|
||||
-1
@@ -5,4 +5,3 @@ BOOTCONFIG="orangepi_prime_defconfig"
|
||||
DEFAULT_OVERLAYS="analog-codec"
|
||||
MODULES_LEGACY="8723bs sunxi_gpiokey"
|
||||
KERNEL_TARGET="legacy,current"
|
||||
FULL_DESKTOP="yes"
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ BOARDFAMILY="rockchip64"
|
||||
BOOTCONFIG="orangepi_r1_plus_rk3328_defconfig"
|
||||
KERNEL_TARGET="current"
|
||||
DEFAULT_CONSOLE="serial"
|
||||
MODULES="g_serial ledtrig_netdev"
|
||||
MODULES="g_serial"
|
||||
MODULES_BLACKLIST="rockchipdrm analogix_dp dw_mipi_dsi dw_hdmi gpu_sched lima hantro_vpu"
|
||||
SERIALCON="ttyS2:1500000,ttyGS0"
|
||||
BUILD_DESKTOP="no"
|
||||
BOOT_FDT_FILE="rockchip/rk3328-orangepi-r1-plus.dtb"
|
||||
BOOT_FDT_FILE="rockchip/rk3328-orangepi-r1plus.dtb"
|
||||
|
||||
-1
@@ -3,5 +3,4 @@ BOARD_NAME="Orange Pi RK3399"
|
||||
BOARDFAMILY="rk3399"
|
||||
BOOTCONFIG="orangepi-rk3399_defconfig"
|
||||
KERNEL_TARGET="current"
|
||||
FULL_DESKTOP="yes"
|
||||
BOOT_LOGO="desktop"
|
||||
|
||||
+4
-2
@@ -1,7 +1,9 @@
|
||||
# Allwinner H616 quad core 1GB RAM
|
||||
BOARD_NAME="Orange Pi Zero 2"
|
||||
# Allwinner H616 quad core 512MB/1GB RAM SoC WiFi USB-C
|
||||
BOARD_NAME="Orange Pi Zero2"
|
||||
BOARDFAMILY="sun50iw9"
|
||||
BOOTCONFIG="orangepi_zero2_defconfig"
|
||||
KERNEL_TARGET="legacy,current"
|
||||
MODULES="uwe5622_bsp_sdio sprdwl_ng sprdbt_tty"
|
||||
MODULES_BLACKLIST_LEGACY="bcmdhd"
|
||||
DISTRIB_TYPE_LEGACY="buster focal"
|
||||
DISTRIB_TYPE_CURRENT="bullseye bookworm focal"
|
||||
|
||||
+18
-3
@@ -11,12 +11,13 @@ setenv rootfstype "ext4"
|
||||
setenv console "both"
|
||||
setenv docker_optimizations "off"
|
||||
setenv bootlogo "false"
|
||||
setenv emmc_max_frequency "0x5f5e100"
|
||||
setenv debug_uart "ttyS0"
|
||||
|
||||
# Print boot source
|
||||
itest.b *0x10028 == 0x00 && echo "U-boot loaded from SD"
|
||||
itest.b *0x10028 == 0x02 && echo "U-boot loaded from eMMC or secondary SD"
|
||||
itest.b *0x10028 == 0x03 && echo "U-boot loaded from SPI"
|
||||
#itest.b *0x10028 == 0x00 && echo "U-boot loaded from SD"
|
||||
#itest.b *0x10028 == 0x02 && echo "U-boot loaded from eMMC or secondary SD"
|
||||
#itest.b *0x10028 == 0x03 && echo "U-boot loaded from SPI"
|
||||
|
||||
echo "Boot script loaded from ${devtype}"
|
||||
|
||||
@@ -56,6 +57,20 @@ fdt set mmc0 cap-sd-highspeed
|
||||
#fdt set mmc0 sd-uhs-ddr50
|
||||
#fdt set mmc0 sd-uhs-sdr104
|
||||
|
||||
if test "${mmc_bootdev}" = "2"; then
|
||||
|
||||
if test "${emmc_max_frequency}" = "0x5f5e100"; then
|
||||
|
||||
fdt set /soc/sdmmc@04022000 cap-mmc-highspeed
|
||||
fdt set /soc/sdmmc@04022000 mmc-ddr-1_8v
|
||||
fdt set /soc/sdmmc@04022000 mmc-hs200-1_8v
|
||||
fdt set /soc/sdmmc@04022000 mmc-hs400-1_8v
|
||||
fi
|
||||
|
||||
echo "Set emmc_max_frequency to ${emmc_max_frequency}"
|
||||
fdt set /soc/sdmmc@04022000 max-frequency <${emmc_max_frequency}>
|
||||
fi
|
||||
|
||||
for overlay_file in ${user_overlays}; do
|
||||
if load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then
|
||||
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
focal
|
||||
@@ -0,0 +1 @@
|
||||
main
|
||||
@@ -0,0 +1 @@
|
||||
libgtk2.0-bin
|
||||
@@ -0,0 +1,33 @@
|
||||
apt-utils
|
||||
bzip2
|
||||
ca-certificates
|
||||
console-setup
|
||||
cpio
|
||||
cron
|
||||
dbus
|
||||
dmsetup
|
||||
fdisk
|
||||
gnupg
|
||||
haveged
|
||||
ifupdown
|
||||
init
|
||||
initramfs-tools
|
||||
iputils-ping
|
||||
isc-dhcp-client
|
||||
kmod
|
||||
less
|
||||
libpam-systemd
|
||||
linux-base
|
||||
locales
|
||||
logrotate
|
||||
netbase
|
||||
netcat-openbsd
|
||||
rsync
|
||||
rsyslog
|
||||
sudo
|
||||
systemd
|
||||
tzdata
|
||||
ucf
|
||||
udev
|
||||
whiptail
|
||||
wireless-regdb
|
||||
@@ -0,0 +1,33 @@
|
||||
apt-file
|
||||
automake
|
||||
bison
|
||||
build-essential
|
||||
ca-certificates
|
||||
command-not-found
|
||||
console-setup
|
||||
dkms
|
||||
expect
|
||||
fbset
|
||||
flex
|
||||
gnupg2
|
||||
hping3
|
||||
html2text
|
||||
initramfs-tools
|
||||
iptables
|
||||
iw
|
||||
keyboard-configuration
|
||||
libnl-3-dev
|
||||
libnl-genl-3-dev
|
||||
libssl-dev
|
||||
libwrap0-dev
|
||||
linux-base
|
||||
man-db
|
||||
networkd-dispatcher
|
||||
python3-distutils
|
||||
python3-lib2to3
|
||||
sudo
|
||||
unattended-upgrades
|
||||
unicode-data
|
||||
vnstat
|
||||
wireless-regdb
|
||||
wpasupplicant
|
||||
@@ -0,0 +1,38 @@
|
||||
alsa-utils
|
||||
aptitude
|
||||
avahi-autoipd
|
||||
bash-completion
|
||||
btrfs-progs
|
||||
dnsutils
|
||||
dosfstools
|
||||
ethtool
|
||||
evtest
|
||||
f2fs-tools
|
||||
f3
|
||||
git
|
||||
haveged
|
||||
hdparm
|
||||
hostapd
|
||||
i2c-tools
|
||||
ifenslave
|
||||
iotop
|
||||
iperf3
|
||||
iputils-arping
|
||||
libdigest-sha-perl
|
||||
libfuse2
|
||||
libnss-myhostname
|
||||
libpam-systemd
|
||||
libproc-processtable-perl
|
||||
nfs-common
|
||||
ntfs-3g
|
||||
pciutils
|
||||
pv
|
||||
qrencode
|
||||
rfkill
|
||||
screen
|
||||
software-properties-common
|
||||
stress
|
||||
sunxi-tools
|
||||
unzip
|
||||
vim
|
||||
vlan
|
||||
@@ -0,0 +1,23 @@
|
||||
automake
|
||||
bison
|
||||
build-essential
|
||||
ca-certificates
|
||||
console-setup
|
||||
expect
|
||||
fbset
|
||||
flex
|
||||
html2text
|
||||
initramfs-tools
|
||||
iptables
|
||||
iw
|
||||
keyboard-configuration
|
||||
libnl-3-dev
|
||||
libnl-genl-3-dev
|
||||
libssl-dev
|
||||
libwrap0-dev
|
||||
linux-base
|
||||
sudo
|
||||
unattended-upgrades
|
||||
unicode-data
|
||||
wireless-regdb
|
||||
wpasupplicant
|
||||
@@ -0,0 +1,36 @@
|
||||
alsa-utils
|
||||
aptitude
|
||||
avahi-autoipd
|
||||
bash-completion
|
||||
btrfs-progs
|
||||
dnsutils
|
||||
dosfstools
|
||||
ethtool
|
||||
evtest
|
||||
f2fs-tools
|
||||
f3
|
||||
git
|
||||
haveged
|
||||
hdparm
|
||||
hostapd
|
||||
ifenslave
|
||||
iotop
|
||||
iperf3
|
||||
iputils-arping
|
||||
libdigest-sha-perl
|
||||
libfuse2
|
||||
libnss-myhostname
|
||||
libpam-systemd
|
||||
libproc-processtable-perl
|
||||
ntfs-3g
|
||||
pciutils
|
||||
pv
|
||||
qrencode
|
||||
rfkill
|
||||
screen
|
||||
software-properties-common
|
||||
stress
|
||||
sunxi-tools
|
||||
unzip
|
||||
vim
|
||||
vlan
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
bc
|
||||
chrony
|
||||
cpufrequtils
|
||||
debconf-utils
|
||||
device-tree-compiler
|
||||
dialog
|
||||
fake-hwclock
|
||||
figlet
|
||||
fping
|
||||
ncurses-term
|
||||
nocache
|
||||
openssh-server
|
||||
parted
|
||||
psmisc
|
||||
python3-apt
|
||||
smartmontools
|
||||
sysfsutils
|
||||
toilet
|
||||
u-boot-tools
|
||||
usbutils
|
||||
@@ -0,0 +1,18 @@
|
||||
cracklib-runtime
|
||||
curl
|
||||
htop
|
||||
i2c-tools
|
||||
iozone3
|
||||
jq
|
||||
libcrack2
|
||||
lsof
|
||||
mc
|
||||
mmc-utils
|
||||
nano
|
||||
net-tools
|
||||
network-manager
|
||||
network-manager-openvpn
|
||||
resolvconf
|
||||
sysstat
|
||||
wget
|
||||
wireless-tools
|
||||
@@ -0,0 +1 @@
|
||||
main
|
||||
@@ -0,0 +1 @@
|
||||
libgtk2.0-bin
|
||||
@@ -0,0 +1,34 @@
|
||||
apt-utils
|
||||
bzip2
|
||||
ca-certificates
|
||||
console-setup
|
||||
cpio
|
||||
crda
|
||||
cron
|
||||
dbus
|
||||
dmsetup
|
||||
fdisk
|
||||
gnupg
|
||||
haveged
|
||||
ifupdown
|
||||
init
|
||||
initramfs-tools
|
||||
iputils-ping
|
||||
isc-dhcp-client
|
||||
kmod
|
||||
less
|
||||
libpam-systemd
|
||||
linux-base
|
||||
locales
|
||||
logrotate
|
||||
netbase
|
||||
netcat-openbsd
|
||||
rsync
|
||||
rsyslog
|
||||
sudo
|
||||
systemd
|
||||
tzdata
|
||||
ucf
|
||||
udev
|
||||
whiptail
|
||||
wireless-regdb
|
||||
@@ -0,0 +1,35 @@
|
||||
apt-file
|
||||
automake
|
||||
bison
|
||||
bridge-utils
|
||||
build-essential
|
||||
ca-certificates
|
||||
command-not-found
|
||||
console-setup
|
||||
crda
|
||||
dkms
|
||||
expect
|
||||
fbset
|
||||
flex
|
||||
gnupg2
|
||||
hping3
|
||||
html2text
|
||||
initramfs-tools
|
||||
iptables
|
||||
iw
|
||||
keyboard-configuration
|
||||
libnl-3-dev
|
||||
libnl-genl-3-dev
|
||||
libssl-dev
|
||||
libwrap0-dev
|
||||
linux-base
|
||||
man-db
|
||||
networkd-dispatcher
|
||||
python3-distutils
|
||||
python3-lib2to3
|
||||
sudo
|
||||
unattended-upgrades
|
||||
unicode-data
|
||||
vnstat
|
||||
wireless-regdb
|
||||
wpasupplicant
|
||||
@@ -0,0 +1,38 @@
|
||||
alsa-utils
|
||||
aptitude
|
||||
avahi-autoipd
|
||||
bash-completion
|
||||
btrfs-progs
|
||||
dnsutils
|
||||
dosfstools
|
||||
ethtool
|
||||
evtest
|
||||
f2fs-tools
|
||||
f3
|
||||
git
|
||||
haveged
|
||||
hdparm
|
||||
hostapd
|
||||
i2c-tools
|
||||
ifenslave
|
||||
iotop
|
||||
iperf3
|
||||
iputils-arping
|
||||
libdigest-sha-perl
|
||||
libfuse2
|
||||
libnss-myhostname
|
||||
libpam-systemd
|
||||
libproc-processtable-perl
|
||||
nfs-common
|
||||
ntfs-3g
|
||||
pciutils
|
||||
pv
|
||||
qrencode
|
||||
rfkill
|
||||
screen
|
||||
software-properties-common
|
||||
stress
|
||||
sunxi-tools
|
||||
unzip
|
||||
vim
|
||||
vlan
|
||||
@@ -0,0 +1,25 @@
|
||||
automake
|
||||
bison
|
||||
bridge-utils
|
||||
build-essential
|
||||
ca-certificates
|
||||
console-setup
|
||||
crda
|
||||
expect
|
||||
fbset
|
||||
flex
|
||||
html2text
|
||||
initramfs-tools
|
||||
iptables
|
||||
iw
|
||||
keyboard-configuration
|
||||
libnl-3-dev
|
||||
libnl-genl-3-dev
|
||||
libssl-dev
|
||||
libwrap0-dev
|
||||
linux-base
|
||||
sudo
|
||||
unattended-upgrades
|
||||
unicode-data
|
||||
wireless-regdb
|
||||
wpasupplicant
|
||||
@@ -0,0 +1,36 @@
|
||||
alsa-utils
|
||||
aptitude
|
||||
avahi-autoipd
|
||||
bash-completion
|
||||
btrfs-progs
|
||||
dnsutils
|
||||
dosfstools
|
||||
ethtool
|
||||
evtest
|
||||
f2fs-tools
|
||||
f3
|
||||
git
|
||||
haveged
|
||||
hdparm
|
||||
hostapd
|
||||
ifenslave
|
||||
iotop
|
||||
iperf3
|
||||
iputils-arping
|
||||
libdigest-sha-perl
|
||||
libfuse2
|
||||
libnss-myhostname
|
||||
libpam-systemd
|
||||
libproc-processtable-perl
|
||||
ntfs-3g
|
||||
pciutils
|
||||
pv
|
||||
qrencode
|
||||
rfkill
|
||||
screen
|
||||
software-properties-common
|
||||
stress
|
||||
sunxi-tools
|
||||
unzip
|
||||
vim
|
||||
vlan
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
bc
|
||||
chrony
|
||||
cpufrequtils
|
||||
debconf-utils
|
||||
device-tree-compiler
|
||||
dialog
|
||||
fake-hwclock
|
||||
figlet
|
||||
fping
|
||||
ncurses-term
|
||||
nocache
|
||||
openssh-server
|
||||
parted
|
||||
psmisc
|
||||
python3-apt
|
||||
smartmontools
|
||||
sysfsutils
|
||||
toilet
|
||||
u-boot-tools
|
||||
usbutils
|
||||
@@ -0,0 +1,19 @@
|
||||
cracklib-runtime
|
||||
curl
|
||||
htop
|
||||
i2c-tools
|
||||
iozone3
|
||||
jq
|
||||
libcrack2
|
||||
lsof
|
||||
mc
|
||||
mmc-utils
|
||||
nano
|
||||
net-tools
|
||||
netplan.io
|
||||
network-manager
|
||||
network-manager-openvpn
|
||||
resolvconf
|
||||
sysstat
|
||||
wget
|
||||
wireless-tools
|
||||
@@ -0,0 +1 @@
|
||||
main
|
||||
@@ -0,0 +1 @@
|
||||
libgtk2.0-bin
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
apt-utils
|
||||
bzip2
|
||||
ca-certificates
|
||||
console-setup
|
||||
cpio
|
||||
cron
|
||||
dbus
|
||||
dmsetup
|
||||
fdisk
|
||||
gnupg
|
||||
haveged
|
||||
ifupdown
|
||||
init
|
||||
initramfs-tools
|
||||
iputils-ping
|
||||
isc-dhcp-client
|
||||
kmod
|
||||
less
|
||||
libpam-systemd
|
||||
linux-base
|
||||
locales
|
||||
logrotate
|
||||
netbase
|
||||
netcat-openbsd
|
||||
rsync
|
||||
rsyslog
|
||||
sudo
|
||||
systemd
|
||||
tzdata
|
||||
ucf
|
||||
udev
|
||||
whiptail
|
||||
wireless-regdb
|
||||
@@ -0,0 +1,36 @@
|
||||
apt-file
|
||||
automake
|
||||
bison
|
||||
bridge-utils
|
||||
build-essential
|
||||
ca-certificates
|
||||
command-not-found
|
||||
console-setup
|
||||
dkms
|
||||
expect
|
||||
fbset
|
||||
flex
|
||||
gnupg2
|
||||
hping3
|
||||
html2text
|
||||
initramfs-tools
|
||||
iptables
|
||||
iw
|
||||
keyboard-configuration
|
||||
libnl-3-dev
|
||||
libnl-genl-3-dev
|
||||
libssl-dev
|
||||
libwrap0-dev
|
||||
linux-base
|
||||
man-db
|
||||
networkd-dispatcher
|
||||
python3-distutils
|
||||
python3-lib2to3
|
||||
rng-tools
|
||||
selinux-policy-default
|
||||
sudo
|
||||
unattended-upgrades
|
||||
unicode-data
|
||||
vnstat
|
||||
wireless-regdb
|
||||
wpasupplicant
|
||||
@@ -0,0 +1,38 @@
|
||||
alsa-utils
|
||||
aptitude
|
||||
avahi-autoipd
|
||||
bash-completion
|
||||
btrfs-progs
|
||||
dnsutils
|
||||
dosfstools
|
||||
ethtool
|
||||
evtest
|
||||
f2fs-tools
|
||||
f3
|
||||
git
|
||||
haveged
|
||||
hdparm
|
||||
hostapd
|
||||
i2c-tools
|
||||
ifenslave
|
||||
iotop
|
||||
iperf3
|
||||
iputils-arping
|
||||
libdigest-sha-perl
|
||||
libfuse2
|
||||
libnss-myhostname
|
||||
libpam-systemd
|
||||
libproc-processtable-perl
|
||||
nfs-common
|
||||
ntfs-3g
|
||||
pciutils
|
||||
pv
|
||||
qrencode
|
||||
rfkill
|
||||
screen
|
||||
software-properties-common
|
||||
stress
|
||||
sunxi-tools
|
||||
unzip
|
||||
vim
|
||||
vlan
|
||||
@@ -0,0 +1,24 @@
|
||||
automake
|
||||
bison
|
||||
bridge-utils
|
||||
build-essential
|
||||
ca-certificates
|
||||
console-setup
|
||||
expect
|
||||
fbset
|
||||
flex
|
||||
html2text
|
||||
initramfs-tools
|
||||
iptables
|
||||
iw
|
||||
keyboard-configuration
|
||||
libnl-3-dev
|
||||
libnl-genl-3-dev
|
||||
libssl-dev
|
||||
libwrap0-dev
|
||||
linux-base
|
||||
sudo
|
||||
unattended-upgrades
|
||||
unicode-data
|
||||
wireless-regdb
|
||||
wpasupplicant
|
||||
@@ -0,0 +1,36 @@
|
||||
alsa-utils
|
||||
aptitude
|
||||
avahi-autoipd
|
||||
bash-completion
|
||||
btrfs-progs
|
||||
dnsutils
|
||||
dosfstools
|
||||
ethtool
|
||||
evtest
|
||||
f2fs-tools
|
||||
f3
|
||||
git
|
||||
haveged
|
||||
hdparm
|
||||
hostapd
|
||||
ifenslave
|
||||
iotop
|
||||
iperf3
|
||||
iputils-arping
|
||||
libdigest-sha-perl
|
||||
libfuse2
|
||||
libnss-myhostname
|
||||
libpam-systemd
|
||||
libproc-processtable-perl
|
||||
ntfs-3g
|
||||
pciutils
|
||||
pv
|
||||
qrencode
|
||||
rfkill
|
||||
screen
|
||||
software-properties-common
|
||||
stress
|
||||
sunxi-tools
|
||||
unzip
|
||||
vim
|
||||
vlan
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
bc
|
||||
chrony
|
||||
cpufrequtils
|
||||
debconf-utils
|
||||
device-tree-compiler
|
||||
dialog
|
||||
fake-hwclock
|
||||
figlet
|
||||
fping
|
||||
ncurses-term
|
||||
nocache
|
||||
openssh-server
|
||||
parted
|
||||
psmisc
|
||||
python3-apt
|
||||
smartmontools
|
||||
sysfsutils
|
||||
toilet
|
||||
u-boot-tools
|
||||
usbutils
|
||||
@@ -0,0 +1,19 @@
|
||||
cracklib-runtime
|
||||
curl
|
||||
htop
|
||||
i2c-tools
|
||||
iozone3
|
||||
jq
|
||||
libcrack2
|
||||
lsof
|
||||
mc
|
||||
mmc-utils
|
||||
nano
|
||||
netplan.io
|
||||
net-tools
|
||||
network-manager
|
||||
network-manager-openvpn
|
||||
resolvconf
|
||||
sysstat
|
||||
wget
|
||||
wireless-tools
|
||||
@@ -0,0 +1 @@
|
||||
main universe
|
||||
@@ -0,0 +1,3 @@
|
||||
dconf-cli
|
||||
libglib2.0-dev
|
||||
libgtk2.0-bin
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
apt-utils
|
||||
bzip2
|
||||
ca-certificates
|
||||
console-setup
|
||||
cpio
|
||||
crda
|
||||
cron
|
||||
dbus
|
||||
dmsetup
|
||||
fdisk
|
||||
gnupg
|
||||
ifupdown
|
||||
init
|
||||
initramfs-tools
|
||||
iputils-ping
|
||||
isc-dhcp-client
|
||||
kmod
|
||||
less
|
||||
libpam-systemd
|
||||
linux-base
|
||||
locales
|
||||
logrotate
|
||||
netbase
|
||||
netcat-openbsd
|
||||
rng-tools
|
||||
rsync
|
||||
rsyslog
|
||||
sudo
|
||||
systemd
|
||||
tzdata
|
||||
ucf
|
||||
udev
|
||||
whiptail
|
||||
wireless-regdb
|
||||
@@ -0,0 +1,34 @@
|
||||
automake
|
||||
bison
|
||||
bridge-utils
|
||||
build-essential
|
||||
ca-certificates
|
||||
console-setup
|
||||
crda
|
||||
dkms
|
||||
expect
|
||||
fbset
|
||||
flex
|
||||
gnupg2
|
||||
hping3
|
||||
html2text
|
||||
initramfs-tools
|
||||
iptables
|
||||
iw
|
||||
keyboard-configuration
|
||||
libnl-3-dev
|
||||
libnl-genl-3-dev
|
||||
libssl-dev
|
||||
libwrap0-dev
|
||||
linux-base
|
||||
man-db
|
||||
networkd-dispatcher
|
||||
python3-distutils
|
||||
python3-lib2to3
|
||||
selinux-policy-default
|
||||
sudo
|
||||
unattended-upgrades
|
||||
unicode-data
|
||||
vnstat
|
||||
wireless-regdb
|
||||
wpasupplicant
|
||||
@@ -0,0 +1,37 @@
|
||||
alsa-utils
|
||||
aptitude
|
||||
avahi-autoipd
|
||||
bash-completion
|
||||
btrfs-progs
|
||||
dnsutils
|
||||
dosfstools
|
||||
ethtool
|
||||
evtest
|
||||
f2fs-tools
|
||||
f3
|
||||
git
|
||||
haveged
|
||||
hdparm
|
||||
hostapd
|
||||
ifenslave
|
||||
iotop
|
||||
iperf3
|
||||
iputils-arping
|
||||
libdigest-sha-perl
|
||||
libfuse2
|
||||
libnss-myhostname
|
||||
libpam-systemd
|
||||
libproc-processtable-perl
|
||||
nfs-common
|
||||
ntfs-3g
|
||||
pciutils
|
||||
pv
|
||||
qrencode
|
||||
rfkill
|
||||
screen
|
||||
software-properties-common
|
||||
stress
|
||||
sunxi-tools
|
||||
unzip
|
||||
vim
|
||||
vlan
|
||||
@@ -0,0 +1,26 @@
|
||||
automake
|
||||
bison
|
||||
bridge-utils
|
||||
build-essential
|
||||
ca-certificates
|
||||
console-setup
|
||||
crda
|
||||
emacs-nox
|
||||
expect
|
||||
fbset
|
||||
flex
|
||||
html2text
|
||||
initramfs-tools
|
||||
iptables
|
||||
iw
|
||||
keyboard-configuration
|
||||
libnl-3-dev
|
||||
libnl-genl-3-dev
|
||||
libssl-dev
|
||||
libwrap0-dev
|
||||
linux-base
|
||||
sudo
|
||||
unattended-upgrades
|
||||
unicode-data
|
||||
wireless-regdb
|
||||
wpasupplicant
|
||||
@@ -0,0 +1,36 @@
|
||||
alsa-utils
|
||||
aptitude
|
||||
avahi-autoipd
|
||||
bash-completion
|
||||
btrfs-progs
|
||||
dnsutils
|
||||
dosfstools
|
||||
ethtool
|
||||
evtest
|
||||
f2fs-tools
|
||||
f3
|
||||
git
|
||||
haveged
|
||||
hdparm
|
||||
hostapd
|
||||
ifenslave
|
||||
iotop
|
||||
iperf3
|
||||
iputils-arping
|
||||
libdigest-sha-perl
|
||||
libfuse2
|
||||
libnss-myhostname
|
||||
libpam-systemd
|
||||
libproc-processtable-perl
|
||||
ntfs-3g
|
||||
pciutils
|
||||
pv
|
||||
qrencode
|
||||
rfkill
|
||||
screen
|
||||
software-properties-common
|
||||
stress
|
||||
sunxi-tools
|
||||
unzip
|
||||
vim
|
||||
vlan
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
bc
|
||||
chrony
|
||||
cpufrequtils
|
||||
debconf-utils
|
||||
device-tree-compiler
|
||||
dialog
|
||||
fake-hwclock
|
||||
figlet
|
||||
fping
|
||||
ncurses-term
|
||||
nocache
|
||||
openssh-server
|
||||
parted
|
||||
psmisc
|
||||
python3-apt
|
||||
smartmontools
|
||||
sysfsutils
|
||||
toilet
|
||||
u-boot-tools
|
||||
usbutils
|
||||
@@ -0,0 +1,19 @@
|
||||
cracklib-runtime
|
||||
curl
|
||||
htop
|
||||
i2c-tools
|
||||
iozone3
|
||||
jq
|
||||
libcrack2
|
||||
lsof
|
||||
mc
|
||||
mmc-utils
|
||||
nano
|
||||
net-tools
|
||||
netplan.io
|
||||
network-manager
|
||||
network-manager-openvpn
|
||||
resolvconf
|
||||
sysstat
|
||||
wget
|
||||
wireless-tools
|
||||
+1
@@ -0,0 +1 @@
|
||||
main universe
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
dconf-cli
|
||||
libglib2.0-dev
|
||||
libgtk2.0-bin
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
apt-utils
|
||||
bzip2
|
||||
ca-certificates
|
||||
console-setup
|
||||
cpio
|
||||
crda
|
||||
cron
|
||||
dbus
|
||||
dmsetup
|
||||
fdisk
|
||||
gnupg
|
||||
ifupdown
|
||||
init
|
||||
initramfs-tools
|
||||
iputils-ping
|
||||
isc-dhcp-client
|
||||
kmod
|
||||
less
|
||||
libpam-systemd
|
||||
linux-base
|
||||
locales
|
||||
logrotate
|
||||
netbase
|
||||
netcat-openbsd
|
||||
rng-tools
|
||||
rsync
|
||||
rsyslog
|
||||
sudo
|
||||
systemd
|
||||
tzdata
|
||||
ucf
|
||||
udev
|
||||
whiptail
|
||||
wireless-regdb
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
automake
|
||||
bison
|
||||
bridge-utils
|
||||
build-essential
|
||||
ca-certificates
|
||||
console-setup
|
||||
crda
|
||||
dkms
|
||||
expect
|
||||
fbset
|
||||
flex
|
||||
gnupg2
|
||||
hping3
|
||||
html2text
|
||||
initramfs-tools
|
||||
iptables
|
||||
iw
|
||||
keyboard-configuration
|
||||
libnl-3-dev
|
||||
libnl-genl-3-dev
|
||||
libssl-dev
|
||||
libwrap0-dev
|
||||
linux-base
|
||||
man-db
|
||||
networkd-dispatcher
|
||||
python3-distutils
|
||||
python3-lib2to3
|
||||
selinux-policy-default
|
||||
sudo
|
||||
unattended-upgrades
|
||||
unicode-data
|
||||
vnstat
|
||||
wireless-regdb
|
||||
wpasupplicant
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
alsa-utils
|
||||
aptitude
|
||||
avahi-autoipd
|
||||
bash-completion
|
||||
btrfs-progs
|
||||
dnsutils
|
||||
dosfstools
|
||||
ethtool
|
||||
evtest
|
||||
f2fs-tools
|
||||
f3
|
||||
git
|
||||
haveged
|
||||
hdparm
|
||||
hostapd
|
||||
ifenslave
|
||||
iotop
|
||||
iperf3
|
||||
iputils-arping
|
||||
libdigest-sha-perl
|
||||
libfuse2
|
||||
libnss-myhostname
|
||||
libpam-systemd
|
||||
libproc-processtable-perl
|
||||
nfs-common
|
||||
ntfs-3g
|
||||
pciutils
|
||||
pv
|
||||
qrencode
|
||||
rfkill
|
||||
screen
|
||||
software-properties-common
|
||||
stress
|
||||
sunxi-tools
|
||||
unzip
|
||||
vim
|
||||
vlan
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
automake
|
||||
bison
|
||||
bridge-utils
|
||||
build-essential
|
||||
ca-certificates
|
||||
console-setup
|
||||
crda
|
||||
emacs-nox
|
||||
expect
|
||||
fbset
|
||||
flex
|
||||
html2text
|
||||
initramfs-tools
|
||||
iptables
|
||||
iw
|
||||
keyboard-configuration
|
||||
libnl-3-dev
|
||||
libnl-genl-3-dev
|
||||
libssl-dev
|
||||
libwrap0-dev
|
||||
linux-base
|
||||
sudo
|
||||
unattended-upgrades
|
||||
unicode-data
|
||||
wireless-regdb
|
||||
wpasupplicant
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
alsa-utils
|
||||
aptitude
|
||||
avahi-autoipd
|
||||
bash-completion
|
||||
btrfs-progs
|
||||
dnsutils
|
||||
dosfstools
|
||||
ethtool
|
||||
evtest
|
||||
f2fs-tools
|
||||
f3
|
||||
git
|
||||
haveged
|
||||
hdparm
|
||||
hostapd
|
||||
ifenslave
|
||||
iotop
|
||||
iperf3
|
||||
iputils-arping
|
||||
libdigest-sha-perl
|
||||
libfuse2
|
||||
libnss-myhostname
|
||||
libpam-systemd
|
||||
libproc-processtable-perl
|
||||
ntfs-3g
|
||||
pciutils
|
||||
pv
|
||||
qrencode
|
||||
rfkill
|
||||
screen
|
||||
software-properties-common
|
||||
stress
|
||||
sunxi-tools
|
||||
unzip
|
||||
vim
|
||||
vlan
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
bc
|
||||
chrony
|
||||
cpufrequtils
|
||||
debconf-utils
|
||||
device-tree-compiler
|
||||
dialog
|
||||
fake-hwclock
|
||||
figlet
|
||||
fping
|
||||
ncurses-term
|
||||
nocache
|
||||
openssh-server
|
||||
parted
|
||||
psmisc
|
||||
python3-apt
|
||||
smartmontools
|
||||
sysfsutils
|
||||
toilet
|
||||
u-boot-tools
|
||||
usbutils
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
cracklib-runtime
|
||||
curl
|
||||
htop
|
||||
i2c-tools
|
||||
iozone3
|
||||
jq
|
||||
libcrack2
|
||||
lsof
|
||||
mc
|
||||
mmc-utils
|
||||
nano
|
||||
net-tools
|
||||
netplan.io
|
||||
network-manager
|
||||
network-manager-openvpn
|
||||
resolvconf
|
||||
sysstat
|
||||
wget
|
||||
wireless-tools
|
||||
+1
@@ -0,0 +1 @@
|
||||
buster
|
||||
Vendored
+102
@@ -0,0 +1,102 @@
|
||||
<h3>Desktop configuration</h3>
|
||||
|
||||
Please use lowercase letters for all config / folder files
|
||||
|
||||
```
|
||||
├──${RELEASE} The name of the distribution
|
||||
│ ├──environments DE packages lists and scripts
|
||||
│ │ ├──${DESKTOP_ENVIRONMENT} The name of the DE (xfce, gnome, kde, ...)
|
||||
│ │ │ |──${DESKTOP_ENVIRONMENT_CONFIG_NAME} Different configuration name prefixed with "config_" (config_basic, config_full, ... )
|
||||
│ │──appgroups Application groups packages lists and scripts
|
||||
│ │ ├──${DESKTOP_APPGROUPS_SELECTED} Appgroups names (editors, programming, ...)
|
||||
```
|
||||
|
||||
In each directory representing a desktop environment, a desktop environment configuration or an appgroup, the following files can be present :
|
||||
|
||||
* `packages`
|
||||
If present, the content of the file will be added to the list
|
||||
of packages 'required' by the OrangePi desktop package.
|
||||
* `debian/postinst`
|
||||
If present, the content of the file will be added to the `postinst`
|
||||
script of the OrangePi desktop package, which will be executed after
|
||||
installing it.
|
||||
* `armbian/create_desktop_package.sh`
|
||||
If present the content of this script will be executed, by the build
|
||||
script, just before actually creating the OrangePi Desktop `.deb`
|
||||
package.
|
||||
Any variable recognized and function defined by the build script,
|
||||
at that point, can be used.
|
||||
* `sources/apt`
|
||||
If present, the directory will be scanned for `.source` files,
|
||||
which should contain APT URL, in a form that `add-apt-repository`
|
||||
understand.
|
||||
The system is restricted to ONLY ONE APT URL per file, since it's
|
||||
basically calling :
|
||||
`add-apt-repository $(cat "/that/apt/file.source")`
|
||||
For each `.source` file parsed, if there's a corresponding
|
||||
`.source.gpg` file, the file will be considered as a package
|
||||
signing key and will be passed to `apt-key`.
|
||||
For this one, the file is copied into `${SDCARD}/tmp` and then
|
||||
**apt-key** is called like this : `apt-key "/tmp/file.source.gpg"`.
|
||||
|
||||
Then in each directory representing a desktop environment, a desktop
|
||||
environment configuration or an appgroup, you can add :
|
||||
|
||||
* `custom/boards/${BOARD}/`
|
||||
For example `custom/orangepipc`.
|
||||
A Board (odroidc4, tinkerboard, bananapi, ...) specific directory
|
||||
where you can provide additional`packages`, `debian/postinst` and
|
||||
`armbian/create_desktop_package.sh`.
|
||||
The files, if present, will be parsed accordingly when building
|
||||
for that specific board, if the element (desktop environment,
|
||||
appgroup, ...) is selected.
|
||||
|
||||
Then in each appgroup, you can add :
|
||||
|
||||
* `custom/desktops/${DESTKOP_ENVIRONMENT}/`
|
||||
For example `custom/desktops/xfce`.
|
||||
A desktop environment specific directory where you can provide
|
||||
additional `packages`, `debian/postinst` and
|
||||
`armbian/create_desktop_package.sh`.
|
||||
The files, if present, will be parsed accordingly if the appgroup
|
||||
AND that desktop environment are both selected during a build.
|
||||
* `custom/boards/${BOARD}/custom/desktops/${DESTKOP_ENVIRONMENT}/`
|
||||
For example `custom/boards/tinkerboard/custom/desktops/kde`.
|
||||
A Board AND desktop environment specific directory where you can
|
||||
provided additional `packages`, `debian/postinst` and
|
||||
`armbian/create_desktop_package.sh`.
|
||||
The files, if present, will be parsed accordingly if the appgroup,
|
||||
that specific board and that specific desktop environments are
|
||||
all selected during a build.
|
||||
|
||||
### Adding a desktop environment
|
||||
|
||||
> Currently, only official repositories are supported.
|
||||
|
||||
Let's say that you want to add that new desktop environment
|
||||
"superduperde", that is now available on official on Debian/Ubuntu
|
||||
repositories.
|
||||
|
||||
First, focus on one specific distribution like `focal` (Ubuntu)
|
||||
or `buster` (Debian). In our example, will take `focal`.
|
||||
We'll create our first configuration 'full', which should provide the
|
||||
DE along with all its specific apps, widgets and the kitchen sink.
|
||||
|
||||
* Create the directory
|
||||
`config/desktop/focal/environments/superduperde/config_full`
|
||||
* Create the file
|
||||
`config/desktop/focal/environments/superduperde/config_full/packages`
|
||||
* Open the `packages` file, add the list of packages for `apt`.
|
||||
|
||||
Then select it in the configuration menu, or pass the following
|
||||
variables to `./compile.sh` :
|
||||
|
||||
```bash
|
||||
BUILD_DESKTOP="yes" RELEASE="focal" DESKTOP_ENVIRONMENT="superduperde" DESKTOP_ENVIRONMENT_CONFIG_NAME="config_full"
|
||||
```
|
||||
|
||||
Then test the resulting image !
|
||||
|
||||
### Tips
|
||||
|
||||
Keep most complete configuration in latest stable versions (Ubuntu Focal and Ubuntu Buster) and link their sub-components / directories. The same goes for DE. We keep XFCE as a base and others linked to it - where this make sense.
|
||||
@@ -0,0 +1,3 @@
|
||||
glmark2
|
||||
mesa-utils
|
||||
mesa-utils-extra
|
||||
@@ -0,0 +1 @@
|
||||
ppa:oibaf/graphics-drivers
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user