Skip to contentSkip to conversation

duplicate dtbs in deploydir

DISCUSSION Jonathan Richardson 2 participants 2 messages Jun 8, 2020 – Jun 9, 2020

lore
Share & tools
lore
#0 lore raw

Hi,

Just wondering why there are 2 symlinks to a dtb in the deploy dir. It has been like this for a while but creates a lot of clutter. It's from the last 2 lines in kernel-devicetree.bbclass. I was going to clean it up but wondered if it's there for a reason.. Thanks.

do_deploy_append() {
	for dtbf in ${KERNEL_DEVICETREE}; do
		dtb=`normalize_dtb "$dtbf"`
		dtb_ext=${dtb##*.}
		dtb_base_name=`basename $dtb .$dtb_ext`
		install -d $deployDir
		install -m 0644
${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
		ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
$deployDir/$dtb_base_name.$dtb_ext
		ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext

$deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext

#1 lore raw
Quoted 22 lines · Jonathan Richardson via lists.yoctoproject.org

Hi,

Just wondering why there are 2 symlinks to a dtb in the deploy dir. It has
been like this for a while but creates a lot of clutter. It's from the
last 2 lines in kernel-devicetree.bbclass. I was going to clean it up but
wondered if it's there for a reason.. Thanks.

do_deploy_append() {
	for dtbf in ${KERNEL_DEVICETREE}; do
		dtb=`normalize_dtb "$dtbf"`
		dtb_ext=${dtb##*.}
		dtb_base_name=`basename $dtb .$dtb_ext`
		install -d $deployDir
		install -m 0644
${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
		ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
$deployDir/$dtb_base_name.$dtb_ext
		ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
Quoted 1 line

$deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext

Some automated testing code relies upon symlinks in the deploy directory to find the latest dtb/image/whatever. The symlink names usually remove elements like date/timestamps.

Whether that is the case here and whether its used or not I'm not sure but that is why you see these as it saves pattern matching which may change over time.

Cheers,

Richard