Skip to content
Snippets Groups Projects
Commit 6d71abbd authored by Clemens Terasa's avatar Clemens Terasa Committed by Jonas Höppner
Browse files

fng-install: Add fng-install script recipe

Import the rocko version 6626f780eb3517a96caf7806177c740025f331e2.

Edits:
* Use correctly spelled guf-recipe.inc
* Uncomment the require release (may become depricated)
* Added BOOTLOADER_MINIMAL_VERSION="5.0r3274" and
  FNGSYS_MINIMAL_VERSION="4.0r4820"
* Increased the boot partition size to 128 MB for fuuture use.

It is not tested and might not work correctly.
parent 35974667
No related branches found
No related tags found
1 merge request!2Install script
--OS=uImage-imx6guf.bin
--DTB=uImage-imx6q-santoka.dtb
--DTB=uImage-imx6dl-hydra.dtb
--DTB=uImage-imx6dl-santaro.dtb
--DTB=uImage-imx6dl-santino.dtb
--DTB=uImage-imx6dl-santino-lt.dtb
--DTB=uImage-imx6dl-sanvito.dtb
--DTB=uImage-imx6q-sanvito.dtb
--DTB=uImage-imx6qp-sanvito.dtb
--DTB=uImage-imx6dl-santoka.dtb
--DTB=uImage-imx6dl-santvend-bat.dtb
--DTB=uImage-imx6q-hydra.dtb
--DTB=uImage-imx6q-santaro.dtb
--DTB=uImage-imx6q-santoka.dtb
--DTB=uImage-imx6q-santvend.dtb
--BS=boot-imx6guf.cfg
This diff is collapsed.
from install_script import PackageDownloader
from install_script import Installer
class installer(Installer):
"""
This installs a Garz&Fricke Yocto release on an i.MX6 platform, using the
Flash-N-Go Update application.
These files are needed:
GUF-Yocto-<VERSION>-<PLATFORM>-root.tar.gz
GUF-Yocto-<VERSION>-<PLATFORM>-fng-install.sh
The files can be found in the 'prebuilt_images' directory of G&F Linux releases
"""
MINIMAL_UPDATER_VERSION = 7723
PKG_PLATFORM="@PKG_PLATFORM@"
PKG_DEFAULT_PARAM="""
--US=@PKG_INSTALLER@
--FS=@ROOTFS@
--packageName=@PKG_VERSION@
"""
def __init__(self, pkg_dir):
super(installer, self).__init__()
self.setup_package(pkg_dir)
SUMMARY = "Garz & Fricke install script for Flash-N-Go System"
require conf/guf-recipe.inc
inherit deploy
PE="1"
SCRIPT_NAME = "fng-install.sh"
PKG_NAME = "pkg.py"
COMPATIBLE_MACHINE = "mx6"
RDEPENDS_${PN} = " \
kernel-image \
kernel-devicetree \
"
SRC_URI = " \
file://${SCRIPT_NAME} \
file://${PKG_NAME} \
file://deploykernel.txt \
"
S = "${WORKDIR}"
ROOTFS_TYPE = "ext4"
DEPLOY_ROOTFS = "guf-image-${MACHINE}.tar.gz"
DEPLOY_PKG_NAME = "${PKG_NAME}"
# Those are now part of the rootfs
DEPLOY_KERNEL = ""
DEPLOY_BOOTSCRIPT = ""
DEPLOY_DEVICETREE = ""
DEPLOY_DEVICETREE_PREFIX = ""
DEPLOY_MD5SUM = ""
DEPLOY_PKG_VERSION = "Yocto-${DISTRO_VERSION}"
BOOTLOADER_MINIMAL_VERSION="5.0r3274"
FNGSYS_MINIMAL_VERSION="4.0r4820"
do_deploy() {
install -m 0755 ${S}/${SCRIPT_NAME} ${DEPLOYDIR}/${SCRIPT_NAME}
sed -i "s/@ROOTFS@/${DEPLOY_ROOTFS}/g" ${DEPLOYDIR}/${SCRIPT_NAME}
sed -i "s/@KERNEL@/${DEPLOY_KERNEL}/g" ${DEPLOYDIR}/${SCRIPT_NAME}
sed -i "s/@ROOTFS_TYPE@/${ROOTFS_TYPE}/g" ${DEPLOYDIR}/${SCRIPT_NAME}
sed -i "s/@BOOTSCRIPT@/${DEPLOY_BOOTSCRIPT}/g" ${DEPLOYDIR}/${SCRIPT_NAME}
sed -i "s/@DEVICETREE@/${DEPLOY_DEVICETREE}/g" ${DEPLOYDIR}/${SCRIPT_NAME}
sed -i "s/@DEVICETREE_PREFIX@/${DEPLOY_DEVICETREE_PREFIX}/g" ${DEPLOYDIR}/${SCRIPT_NAME}
sed -i "s/@BOOTLOADER_MINIMAL_VERSION@/${BOOTLOADER_MINIMAL_VERSION}/g" ${DEPLOYDIR}/${SCRIPT_NAME}
sed -i "s/@FNGSYS_MINIMAL_VERSION@/${FNGSYS_MINIMAL_VERSION}/g" ${DEPLOYDIR}/${SCRIPT_NAME}
sed -i "s/@MD5SUMS@/${DEPLAY_MD5SUM}/g" ${DEPLOYDIR}/${SCRIPT_NAME}
# Generate supported platforms from devicetree list
PLATFORMS=""
if test -n "${KERNEL_DEVICETREE}"; then
for DTB in ${KERNEL_DEVICETREE}; do
DTB_BASE_NAME=`basename ${DTB} .dtb`
PLATFORMS="$PLATFORMS ${DTB_BASE_NAME#*-}"
done
fi
install -m 0755 ${S}/${PKG_NAME} ${DEPLOYDIR}/${DEPLOY_PKG_NAME}
sed -i "s/@ROOTFS@/${DEPLOY_ROOTFS}/g" ${DEPLOYDIR}/${DEPLOY_PKG_NAME}
sed -i "s/@PKG_VERSION@/${DEPLOY_PKG_VERSION}/g" ${DEPLOYDIR}/${DEPLOY_PKG_NAME}
sed -i "s/@PKG_PLATFORM@/${PLATFORMS}/g" ${DEPLOYDIR}/${DEPLOY_PKG_NAME}
sed -i "s/@PKG_INSTALLER@/${SCRIPT_NAME}/g" ${DEPLOYDIR}/${DEPLOY_PKG_NAME}
# Install deploykernel.txt so the kernel from deploy can be installed with fng-install.sh --ParamFile=deploykernel.txt
install -m 0755 ${S}/deploykernel.txt ${DEPLOYDIR}/deploykernel.txt
}
addtask do_deploy after do_install
RELEASE_SCRIPT_NAME = "${RELEASE_PREFIX}-${SCRIPT_NAME}"
RELEASE_ROOTFS = "${RELEASE_PREFIX}-root.tar.gz"
RELEASE_PKG_NAME = "${RELEASE_PREFIX}-${PKG_NAME}"
# Those are now part of the rootfs
RELEASE_KERNEL = ""
RELEASE_BOOTSCRIPT = ""
RELEASE_DEVICETREE = ""
RELEASE_DEVICETREE_PREFIX = ""
RELEASE_MD5SUM = ""
RELEASE_PKG_VERSION = "Yocto-${DISTRO_VERSION}"
do_release() {
install -m 0755 ${S}/${SCRIPT_NAME} ${RELEASEDIR}/${RELEASE_SCRIPT_NAME}
sed -i "s/@ROOTFS@/${RELEASE_ROOTFS}/g" ${RELEASEDIR}/${RELEASE_SCRIPT_NAME}
sed -i "s/@KERNEL@/${RELEASE_KERNEL}/g" ${RELEASEDIR}/${RELEASE_SCRIPT_NAME}
sed -i "s/@BOOTSCRIPT@/${RELEASE_BOOTSCRIPT}/g" ${RELEASEDIR}/${RELEASE_SCRIPT_NAME}
sed -i "s/@ROOTFS_TYPE@/${ROOTFS_TYPE}/g" ${RELEASEDIR}/${RELEASE_SCRIPT_NAME}
sed -i "s/${SCRIPT_NAME}/${RELEASE_SCRIPT_NAME}/g" ${RELEASEDIR}/${RELEASE_SCRIPT_NAME}
sed -i "s/@DEVICETREE@/${RELEASE_DEVICETREE}/g" ${RELEASEDIR}/${RELEASE_SCRIPT_NAME}
sed -i "s/@DEVICETREE_PREFIX@/${RELEASE_DEVICETREE_PREFIX}/g" ${RELEASEDIR}/${RELEASE_SCRIPT_NAME}
sed -i "s/@BOOTLOADER_MINIMAL_VERSION@/${BOOTLOADER_MINIMAL_VERSION}/g" ${RELEASEDIR}/${RELEASE_SCRIPT_NAME}
sed -i "s/@FNGSYS_MINIMAL_VERSION@/${FNGSYS_MINIMAL_VERSION}/g" ${RELEASEDIR}/${RELEASE_SCRIPT_NAME}
sed -i "s/@MD5SUMS@/${RELEASE_MD5SUM}/g" ${RELEASEDIR}/${RELEASE_SCRIPT_NAME}
# Generate supported platforms from devicetree list
PLATFORMS=""
if test -n "${KERNEL_DEVICETREE}"; then
for DTB in ${KERNEL_DEVICETREE}; do
DTB_BASE_NAME=`basename ${DTB} .dtb`
PLATFORMS="$PLATFORMS ${DTB_BASE_NAME#*-}"
done
fi
install -m 0755 ${S}/${PKG_NAME} ${RELEASEDIR}/${RELEASE_PKG_NAME}
sed -i "s/@ROOTFS@/${RELEASE_ROOTFS}/g" ${RELEASEDIR}/${RELEASE_PKG_NAME}
sed -i "s/@PKG_VERSION@/${RELEASE_PKG_VERSION}/g" ${RELEASEDIR}/${RELEASE_PKG_NAME}
sed -i "s/@PKG_PLATFORM@/${PLATFORMS}/g" ${RELEASEDIR}/${RELEASE_PKG_NAME}
sed -i "s/@PKG_INSTALLER@/${RELEASE_SCRIPT_NAME}/g" ${RELEASEDIR}/${RELEASE_PKG_NAME}
}
addtask do_release after do_install
# We do not install anything to the root file system
ALLOW_EMPTY_${PN} = "1"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment