luckfox-pico-sdk/sysdrv/drv_ko/wifi/aic8800_netdrv/mkvers.sh
luckfox-eng29 8f34c2760d project:build.sh: Added fastboot support; custom modifications to U-Boot and kernel implemented using patches.
project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between
the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door
for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more
usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp:
Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for
compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem.
sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device
tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately.
sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick
boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades.
sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for
fastboot.

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
2024-10-14 09:47:04 +08:00

83 lines
1.9 KiB
Bash

#!/bin/bash
#
# Outputs svn revision of directory $VERDIR into $TARGET if it changes $TARGET
# example output omitting enclosing quotes:
#
# '#define RWNX_VERS_REV "svn1676M"'
# '#define RWNX_VERS_MOD "vX.X.X.X"'
# '#define RWNX_VERS_OTH "build: username date hour"'
set -e
VERDIR=$(dirname $(readlink -f $0))
TARGET=$1
DATE_FORMAT="%b %d %Y %T"
RWNX_VERS_MOD=$(grep RWNX_VERS_NUM $VERDIR/Makefile | cut -f2 -d=)
tmpout=$TARGET.tmp
cd $VERDIR
if (svn info . >& /dev/null)
then
svnrev=svn$(svnversion -c | sed 's/.*://')
elif (git status -uno >& /dev/null)
then
# If git-svn find the corresponding svn revision
if (git svn info >& /dev/null)
then
idx=0
while [ ! "$svnrev" ]
do
# loop on all commit to find the first one that match a svn revision
svnrev=$(git svn find-rev HEAD~$idx)
if [ $? -ne 0 ]
then
break;
elif [ ! "$svnrev" ]
then
idx=$((idx + 1))
elif [ $idx -gt 0 ] || (git status -uno --porcelain | grep -q '^ M')
then
# If this is not the HEAD, or working copy is not clean then we're
# not at a commited svn revision so add 'M'
svnrev=$svnrev"M"
fi
done
fi
# append git info (sha1 and branch name)
git_sha1=$(git rev-parse --short HEAD)
if (git status -uno --porcelain | grep -q '^ M')
then
git_sha1+="M"
fi
git_branch=$(git symbolic-ref --short HEAD 2>/dev/null || echo "detached")
if [ "$svnrev" ]
then
svnrev="svn$svnrev ($git_sha1/$git_branch)"
else
svnrev="$git_sha1 ($git_branch)"
fi
else
svnrev="Unknown Revision"
fi
date=$(LC_TIME=C date +"$DATE_FORMAT")
RWNX_VERS_REV="$svnrev"
# "lmac vX.X.X.X - build:"
banner="rwnx v$RWNX_VERS_MOD - build: $(whoami) $date - $RWNX_VERS_REV"
define() { echo "#define $1 \"$2\""; }
{
define "RWNX_VERS_REV" "$RWNX_VERS_REV"
define "RWNX_VERS_MOD" "$RWNX_VERS_MOD"
define "RWNX_VERS_BANNER" "$banner"
} > $tmpout
cmp -s $TARGET $tmpout && rm -f $tmpout || mv $tmpout $TARGET