From 3a397d4448ace2dbdfcb3c63ad5d90e75a3ec1cb Mon Sep 17 00:00:00 2001
From: Tobias Poganiuch <tobias.poganiuch@garz-fricke.com>
Date: Mon, 11 Jul 2022 13:25:10 +0200
Subject: [PATCH] fng-install:prepare-kernel: Removed i.MX8 specific script

The i.MX8 used a custom post-install script for the prepare-kernel
step. Since the default script has been adopted for the i.MX8, the
custom script is removed.

BCS 746-000877
---
 .../prepare-image/mx8/gf-prepare-kernel.sh    | 80 -------------------
 1 file changed, 80 deletions(-)
 delete mode 100644 recipes-bsp/fng-install/prepare-image/mx8/gf-prepare-kernel.sh

diff --git a/recipes-bsp/fng-install/prepare-image/mx8/gf-prepare-kernel.sh b/recipes-bsp/fng-install/prepare-image/mx8/gf-prepare-kernel.sh
deleted file mode 100644
index b1512bfa..00000000
--- a/recipes-bsp/fng-install/prepare-image/mx8/gf-prepare-kernel.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-# shellcheck disable=2154
-#
-# This script is called during installation from the fng-install script.
-# In this case the following env variables are set from the caller:
-#               DEVICETREE='$DEVICETREE' \
-#               DEVICETREEOV='$DEVICETREEOV' \
-#               ROOTPARTITION='$TARGET_PARTITION_ROOT' \
-#               BOOTPARTITION='$TARGET_PARTITION_BOOT' \
-#
-# The script can also be called standalone, or by the fnginstall-postinstallation
-# script in the target OS, to update configurations 
-#
-# This helper script to select the used base kernel and base devicetree
-# and combine those together to linux image
-# In dunfell we currently use the feature to load the devicetree directly
-# after the kernel in the memory by concat both files
-#
-# Kernel and devicetree files are detect automatically
-# but may be specified on the commandline
-# After the selection, the result is written to two textfiles
-# 'kernel' and 'devicetree'.
-# When these are found, these values override the autodetection
-#
-# The files to work on, are selected by a list of known boot partitions
-# from which the first one is selected.
-# To work on an other folder it needs to be mounted externally
-# and specified in the environment variable BOOTDIR
-
-# shellcheck source=../../../../recipes-guf/sharedconf/sharedconf/gf-functions.sh
-if ! . /usr/sbin/gf-functions.sh; then
-    echo "Unable to include gf-functions"
-fi
-# shellcheck source=../gf-prepare-common.sh
-if ! . /usr/sbin/gf-prepare-common.sh; then
-    echo "Unable to include gf-prepare-common"
-fi
-
-#========================================================
-
-# Get the directory containing the bootfiles
-mount_bootpartition BOOTFILES_DIR
-# Get the bootscript in that directory
-find_bootscript BOOTSCRIPT "$BOOTFILES_DIR"
-
-#========================================================
-
-cd "$BOOTFILES_DIR" || exit 1
-
-# Exchange the devicetree to load during boot in boot.cfg
-if [ -n "$DEVICETREE" ]; then
-        DEVICETREE="${DEVICETREE##*/}"
-
-        if [ ! -e "${DEVICETREE}" ]; then
-                echo "Unable to find $DEVICETREE"
-                exit 1
-        fi
-
-        sed -i -e "s/^devicetree=.*\$/devicetree=${DEVICETREE}/g" "$BOOTSCRIPT"
-fi
-
-#==============================================================
-# Change boot file to load the correct kernel image
-#==============================================================
-KERNEL_FILE="$( find . -maxdepth 1 -name "*Image*" | head -n 1 )"
-if [ -z "$KERNEL_FILE" ];then
-    echo "Failed to determine the kernel file to use."
-    exit 1
-fi
-KERNEL_FILE="${KERNEL_FILE##*/}"
-echo "$KERNEL_FILE" > kernel
-# Exchange the kernel file to load during boot in boot.cfg
-sed -i -e "s/^kernel=.*\$/kernel=${KERNEL_FILE}/g" "$BOOTSCRIPT" || echo "Failed to set kernel image file in ${BOOTSCRIPT}."
-
-# We are done, cleanup
-umount_bootpartition
-
-exit 0
-
-# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
-- 
GitLab