Hi Ganesh

We do something similar. We use a oe-init-build-env script in our
layer:

layer specific oe-init-build-env --------------------------------------
-----------------

#!/bin/sh

# Normally this is called as '. ./oe-init-build-env <builddir>'
#
# This works in most shells (not dash), but not all of them pass the
arguments
# when being sourced. To workaround the shell limitation use "set
<builddir>"
# prior to sourcing this script.
#
if [ -n "$BASH_SOURCE" ]; then
  THIS_SCRIPT=$BASH_SOURCE
elif [ -n "$ZSH_NAME" ]; then
  THIS_SCRIPT=$0
else
  THIS_SCRIPT="$(pwd)/oe-init-build-env"
  if [ ! -e "$THIS_SCRIPT" ]; then
    echo "Error: $THIS_SCRIPT doesn't exist!" >&2
    echo "Please run this script in oe-init-build-env's directory." >&2
    exit 1
  fi
fi
if [ -n "$BBSERVER" ]; then
  unset BBSERVER
fi

if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then
  echo "Error: This script needs to be sourced. Please run as '.
$THIS_SCRIPT'" >&2
  exit 1
fi

if [ -z "$OEROOT" ]; then
  OEROOT=$(dirname "$THIS_SCRIPT")/poky
  OEROOT=$(readlink -f "$OEROOT")
fi

export OEROOT
. "$OEROOT"/scripts/oe-buildenv-internal &&
TEMPLATECONF="$(cat "$BUILDDIR"/conf/templateconf.cfg)"
"$OEROOT"/scripts/oe-setup-builddir || {
  unset OEROOT
  return 1
}
unset OEROOT

# Generate an initial configuration for VSCode and the yocto-bitbake
plugin.
OEINIT=$(dirname "$THIS_SCRIPT")
OEINIT=$(readlink -f "$OEINIT")
if command -v code > /dev/null && [ ! -d "$OEINIT/.vscode" ]; then
  "$OEINIT"/scripts/oe-setup-vscode "$OEINIT" "$BUILDDIR"
"$OEINIT"/projects/*
fi
unset OEINIT
unset THIS_SCRIPT

end -------------------------------------------------------


The build build-1/conf/template.cfg file looks like

../meta-eaton/conf/templates/build-1


and in the folder meta-eaton/conf/templates/build-1 the are:

conf-notes.txt local.conf.sample


not sure that's exactly how it is supposed to be used, but it works in
the same way as older releases did.
It depends on the exact folder structure if you need some ../ paths

Regards
Adrian







On Tue, 2025-01-14 at 22:21 -0800, Ganesh Mahajan via
lists.yoctoproject.org wrote:
> I am trying to upgrade from dunfell to scarthgap-5.0.5
> 
> meta-eaton is my custom layer.
> source setup worked for dunfell but when trying with scarthgap facing
> TEMPLATECONF error.
> 
> Error is as below
> /home/build/project/meta-eaton/conf/templates/template-name
> build@ubuntu-bionic:~/project$ source meta-eaton/setup-build-env
> Error: TEMPLATECONF value (which is /home/build/project/meta-
> eaton/conf/templates/template-name) must point to meta-some-
> layer/conf/templates/template-name
>  changed the dir structure as mentioned in error, UNSET TEMPLATECONF
> and verified its path which is 
> build@ubuntu-bionic:~/project$ echo $TEMPLATECONF
> /home/build/project/meta-eaton/conf/templates/template-name
> 
> what am i doing wrong can anyone help.
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64556): https://lists.yoctoproject.org/g/yocto/message/64556
Mute This Topic: https://lists.yoctoproject.org/mt/110623411/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

  • [yocto] [HELP] Ganesh Mahajan via lists.yoctoproject.org
    • Re: [yocto] [HELP] Adrian Freihofer via lists.yoctoproject.org
      • Re: [yocto] [HELP] Ganesh Mahajan via lists.yoctoproject.org
        • Re: [yocto] [HEL... Peter Marko via lists.yoctoproject.org
        • Re: [yocto] [HEL... Alexander Kanavin via lists.yoctoproject.org
          • Re: [yocto] ... Ganesh Mahajan via lists.yoctoproject.org
            • Re: [yo... Ganesh Mahajan via lists.yoctoproject.org
              • Re:... Alexander Kanavin via lists.yoctoproject.org
                • ... Ganesh Mahajan via lists.yoctoproject.org
                • ... Alexander Kanavin via lists.yoctoproject.org
                • ... Ganesh Mahajan via lists.yoctoproject.org
                • ... Alexander Kanavin via lists.yoctoproject.org

Reply via email to