#!/bin/sh

set -e

PREREQ=""

# Output pre-requisites
prereqs()
{
        echo "$PREREQ"
}

case "$1" in
    prereqs)
        prereqs
        exit 0
        ;;
esac

. /usr/share/initramfs-tools/hook-functions

# Include dtbo files and tool to access fru data

find /usr/share/xlnx-kria-firmware/devicetree/ -type f |
    while read -r file; do
        if [ "${file##*.}" = dtbo ]
        then copy_file dtbo "$file"
        fi
    done

copy_exec /bin/fru-dump /bin
