setdate \
strip-debug-symbols \
tildes-clean \
+ hvk-common.sh \
+ hvk-compile.sh \
+ hvk-compile-sendpatch.sh \
+ hvk-configure.sh \
+ hvk-debug.sh \
+ hvk-init.sh \
+ hvk-save-defconfig.sh \
+ hvk-dt.sh \
+ hvk-x86.sh \
hv-hg-functions.sh \
hg-format-patch hg-update-subrepos \
git-hg-sub-import git-hg-sub-update \
--- /dev/null
+#!/bin/bash
+
+if [ -f include/linux/linux_logo.h ]; then
+ mode=linux
+elif [ -f include/asm-generic/u-boot.h ]; then
+ mode=uboot
+else
+ echo "Error: no kernel or U-Boot repo detected, aborting."
+ exit 1
+fi
+
+if [ -f .hvk ]; then
+ # Source project definition file (in project's git repo):
+ source .hvk
+else
+ # Source x86 generic definition file
+ source ${SCRIPTPATH}/hvk-x86.sh
+fi
+
+: ${MAKEJOBS:="-j$(nproc)"}
+
+KMAKE="make ${MAKEJOBS}"
+
+# Needed to compile sample userspace programs (rtc-test):
+export CROSS_COMPILE_KCFLAGS=${KCFLAGS}
+
+# Arg1: src file
+# Arg2: destination user@host
+copy_exec()
+{
+ scp ${1} ${2}:/tmp
+ ssh ${2} "install -m 755 /tmp/$(basename ${1}) \${HOME}"
+}
--- /dev/null
+#!/bin/bash
+
+set -e
+
+# Compile and validate all DT/schemas, usefull when testing each patch in a
+# series.
+
+hvk-compile.sh
+hvk-dt.sh
--- /dev/null
+#!/bin/bash
+
+SCRIPT="`readlink -e $0`"
+SCRIPTPATH=$(dirname ${SCRIPT})
+source ${SCRIPTPATH}/hvk-common.sh
+
+${KMAKE}
+
+if [ x"${mode}" = x"linux" ]; then
+ ${KMAKE} modules_prepare
+ ${KMAKE} modules
+
+ if [ x"${DTB_SRC}" != x"" ]; then
+ ${KMAKE} dtbs
+ fi
+elif [ x"${mode}" = x"uboot" ]; then
+ ${KMAKE} u-boot-initial-env
+fi
+
+if [ ${#} -eq 1 ]; then
+ EVK_IP="${1}"
+
+ scp ${BOOT_SRC}/Image root@${EVK_IP}:${BOOT_DEST}/Image-latest
+
+ scp ${DTB_SRC} root@${EVK_IP}:${BOOT_DEST}/latest.dtb
+
+ rm -rf modules-tmp
+ ${KMAKE} INSTALL_MOD_PATH=modules-tmp modules_install
+ pushd modules-tmp/lib/
+ tar cf - modules/* | gzip -9 > /tmp/modules.tar.gz
+ popd
+
+ scp /tmp/modules.tar.gz root@${EVK_IP}:/tmp
+
+ ssh root@${EVK_IP} "cd /lib && tar -xf /tmp/modules.tar.gz"
+ rm /tmp/modules.tar.gz
+
+ # Switch to latest kernel and DTB:
+ ssh root@${EVK_IP} "fw_setenv image Image-latest; fw_setenv fdt_file latest.dtb"
+fi
--- /dev/null
+#!/bin/bash
+
+SCRIPT="`readlink -e $0`"
+SCRIPTPATH=$(dirname ${SCRIPT})
+source ${SCRIPTPATH}/hvk-common.sh
+
+${KMAKE} menuconfig
--- /dev/null
+#!/bin/bash
+
+SCRIPT="`readlink -e $0`"
+SCRIPTPATH=$(dirname ${SCRIPT})
+source ${SCRIPTPATH}/hvk-common.sh
+
+KVER_BASE=$(make kernelversion)
+
+# -W:
+# Not all compiler warnings are enabled by default. Build the
+# kernel with "make EXTRA_CFLAGS=-W" to get the full set.
+#
+# C=1: run Sparse semantic checker for C programs
+# W=1: Enable extra build checks:
+# 1: warnings which may be relevant and do not occur too often
+# V=1: Disable Makefile silent mode
+
+
+# Temporaire: désactivé W=1 car cause un problème avec kernel 5.17-rc...
+#KMAKE="${KMAKE} W=1 C=1 KCFLAGS=-W"
+KMAKE="${KMAKE} C=1 KCFLAGS=-W"
+
+# The path to the specific drivers we want to compile:
+DRIVER_PATH[0]=drivers/rtc
+DRIVER_NAME[0]=rtc-pcf2127
+
+DRIVER_PATH[1]=drivers/iio/adc
+DRIVER_NAME[1]=ti-ads7924
+
+if [ ${#} -eq 1 ]; then
+ EVK_IP="${1}"
+fi
+
+k=0
+for driver_path in "${DRIVER_PATH[@]}"; do
+ p="${DRIVER_PATH[${k}]}"
+ n="${DRIVER_NAME[${k}]}"
+
+ ${KMAKE} M=${p}
+
+ if [ x"${EVK_IP}" != x"" ]; then
+ scp ${p}/${n}.ko root@${EVK_IP}:/lib/modules/${KVER_BASE}*/kernel/${p}/
+ fi
+
+ k=$((${k} + 1))
+done
+
+${KMAKE} dtbs
+
+${KMAKE} samples
+
+if [ x"${EVK_IP}" != x"" ]; then
+ scp ${DTB_SRC} root@${EVK_IP}:${DTB_DEST}
+ if [ -f samples/rtc-test/rtc-test ]; then
+ scp samples/rtc-test/rtc-test root@${EVK_IP}:
+ fi
+
+ #ssh root@${EVK_IP} "/sbin/depmod -a"
+fi
--- /dev/null
+#!/bin/bash
+
+SCRIPT="`readlink -e $0`"
+SCRIPTPATH=$(dirname ${SCRIPT})
+source ${SCRIPTPATH}/hvk-common.sh
+
+if [ x"${DTS_BOARD}" != x"" ]; then
+ DTB_FILES="${DTB_FILES} ${DTS_BOARD}.dtb"
+fi
+
+if [ x"${DTB_FILES}" != x"" ]; then
+ # See https://lore.kernel.org/lkml/20221102214654.axyptitp5kpq3wcq@notapiano/T/
+ ${KMAKE} CHECK_DTBS=y ${DTB_FILES}
+fi
+
+DT_CHECKER="${KMAKE} DT_CHECKER_FLAGS=-m dt_binding_check"
+
+if [ x"${DT_SCHEMA_FILES}" != x"" ]; then
+ ${DT_CHECKER} DT_SCHEMA_FILES=${DT_SCHEMA_FILES}
+fi
+
+# To check all:
+#${DT_CHECKER}
+
+#${KMAKE} checkstack
--- /dev/null
+#!/bin/bash
+
+SCRIPT="`readlink -e $0`"
+SCRIPTPATH=$(dirname ${SCRIPT})
+source ${SCRIPTPATH}/hvk-common.sh
+
+if [ x"${DEFCONFIG_AUTOGEN}" != x"" ]; then
+ if [ -x ${DEFCONFIG_AUTOGEN} ]; then
+ dir=$(dirname ${DEFCONFIG_AUTOGEN})
+ echo "Autogen defconfig from configuration fragments..."
+ pushd ${dir}
+ ./$(basename ${DEFCONFIG_AUTOGEN})
+ popd
+ else
+ echo "Error: cannot execute configuration autogen script"
+ exit 1
+ fi
+fi
+
+if [ x"${DEFCONFIG_BOARD}" = x"all" ]; then
+ ${KMAKE} allyesconfig
+else
+ ${KMAKE} ${DEFCONFIG_BOARD}_defconfig
+fi
+
+if [ x"${1}" = x"yocto" ]; then
+ LOCALVERSION="${YOCTO_LOCALVERSION}"
+
+ # Add GIT revision to the local version
+ head=`git --git-dir=.git rev-parse --verify --short HEAD 2> /dev/null`
+
+ SCMVERSION=$(printf "%s%s" +g $head)
+else
+ LOCALVERSION="-latest"
+ SCMVERSION=""
+fi
+
+echo "Force local kernel version to: ${LOCALVERSION}"
+sed -e "s/^\(CONFIG_LOCALVERSION=\"\).*/\1${LOCALVERSION}\"/" -i .config
+
+echo ${SCMVERSION} > .scmversion
+
+${KMAKE} olddefconfig
--- /dev/null
+#!/bin/bash
+
+SCRIPT="`readlink -e $0`"
+SCRIPTPATH=$(dirname ${SCRIPT})
+source ${SCRIPTPATH}/hvk-common.sh
+
+if [ x"${DEFCONFIG_BOARD}" = x"all" ]; then
+ "Error, cannot save defconfig for \"all\""
+ exit 1
+fi
+
+cfg_prefix="arch/${ARCH}/"
+
+if [ x"${mode}" = x"uboot" ]; then
+ cfg_prefix=""
+fi
+
+${KMAKE} savedefconfig
+cp defconfig ${cfg_prefix}configs/${DEFCONFIG_BOARD}_defconfig
--- /dev/null
+#!/bin/bash
+
+DEFCONFIG_BOARD=all
+
+ARCH=x86
+
+# List of DT schema files to validate:
+DT_SCHEMA_FILES="\
+ Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml \
+"