Skip to content
Snippets Groups Projects
Commit f3489840 authored by Frieder Schrempf's avatar Frieder Schrempf
Browse files

Remove KED i.MX production-tool (ptool) as it causes more pain than it helps

For customers it is more helpful to provide guiding in the docs for the production
steps instead of using this horrible shell script that doesn't do what you want in
most cases.
parent d9ff3533
No related branches found
No related tags found
1 merge request!39Remove KED i.MX production-tool (ptool) as it causes more pain than it helps
Pipeline #18763 passed
#!/bin/sh
# ptool settings for Kontron i.MX6UL boards
# bootconfiguration
# bits 31-24 23-16 15-8 7-0
# [ BOOT_CFG4 BOOT_CFG3 BOOT_CFG2 BOOT_CFG1
# boot device select : 40: SD/eSD
# BOOT_CFG2: sd config : 20: 4-bit auf SDHC1
# BOOT_CFG3: cpu/ddr config : 00: single DDR, 792/396 MHz CPU/DDR
# BOOT_CFG4: alternativ bootdev: 49: enable, eCSPIx_SS0 chip select, 3-Byte eCSPI2 (NOR Flash)
BOOT_CONFIG=0x49002040
SPL_BIN=flash.bin
UBOOT_ENV=u-boot-initial-env-kontron-mx6ul
ROOTFS_IMG=image-ked-kontron-mx6ul.tar.gz
BOOTFS_IMG=image-ked-bootfs-kontron-mx6ul-ked-dunfell.tar.gz
USERFS_IMG=image-ked-userfs-kontron-mx6ul-ked-dunfell.tar.gz
SWU_ARCHIVE="swupdate-img.swu"
MTD_ROOT=/dev/mtd0
MTD_UBOOT_SPL=/dev/mtd1
MTD_UBOOT_ENV=/dev/mtd2
MTD_UBOOT_ENV_REDUNDANT=/dev/mtd3
#partition size on NAND-Flash (512MB)
rootfs_size=150
bootfs_size=30
#userfs (if size empty -> all remaining space taken else SIZE in MiB)
userfs_size=""
FW_DIR="/home/root/fw" # Use persistent dir on SD card to cache FW
SRC_MEDIA="HTTP_SERVER"
HTTP_URL="https://files.kontron-electronics.de/imx/latest/kontron-mx6ul"
EMMC_DEV=/dev/mmcblk1
EMMC_PART=/dev/mmcblk1p1
b_flash_emmc=0
b_flash_ubi=1
b_lan2_mac_otp=1
#!/bin/sh
# ptool settings for Kontron i.MX8MM boards
SOC_FAMILY="mx8mm"
#BOOT_CONFIG=0x18002020 # Boot from eMMC (SD1, 8bit buswidth, 3.3V)
#BOOT_CONFIG2=0x03000010 # Use SPI NOR as fallback (eCSPI1, CS0)
BOOT_CONFIG=0x18001410 # Boot from SD (SD2, 4bit buswidth, 3.3V)
BOOT_CONFIG2=0x03000010 # Use SPI NOR as fallback (eCSPI1, CS0)
#Image Files
SPL_BIN=flash.bin
UBOOT_ENV=u-boot-initial-env-kontron-mx8mm
ROOTFS_IMG=image-ked-kontron-mx8mm.tar.gz
BOOTFS_IMG=image-ked-bootfs-kontron-mx8mm-ked-dunfell.tar.gz
USERFS_IMG=image-ked-userfs-kontron-mx8mm-ked-dunfell.tar.gz
SWU_ARCHIVE="swupdate-img.swu"
# check images with md5sum (md5sum.IMAGE_NAME.txt file must be available)
# set to "yes" when desired
images_md5=""
#partition sizes on eMMC (MB)
rootfs_size=10000
bootfs_size=50
#userfs (if size empty -> all remaining space taken else SIZE in MiB)
userfs_size=""
#partition devices
MTD_UBOOT_SPL=/dev/mtd0
MTD_UBOOT_ENV=/dev/mtd1
MTD_UBOOT_ENV_REDUNDANT=/dev/mtd2
EMMC_DEV=/dev/mmcblk0
EMMC_PART=/dev/mmcblk0p2
FW_DIR="/home/root/fw" # Use persistent dir on SD card to cache FW
SRC_MEDIA="HTTP_SERVER"
HTTP_URL="https://files.kontron-electronics.de/imx/latest/kontron-mx8mm"
MD5_PRE="$FW_DIR/md5sum."
MD5_UBOOT_BIN=$MD5_PRE$UBOOT_BIN
MD5_UBOOT_ENV=$MD5_PRE$UBOOT_ENV
MD5_ROOT_UBI=$MD5_PRE$ROOT_UBI
MD5_ROOT_EXT=$MD5_PRE$ROOT_EXT
b_flash_emmc=1
b_flash_ubi=0
b_lan2_mac_otp=1
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
......@@ -48,9 +48,6 @@ MACHINE_FEATURES:remove = "fip fw-update"
# Machine specific software packages
# =========================================================================
# HACK: Remove imx specific ptool. production-tool is included in image-ked-minimal by default
IMAGE_INSTALL:remove = "production-tool"
CORE_IMAGE_EXTRA_INSTALL:append = ""
# List of packages required to boot the device
......
......@@ -25,7 +25,6 @@ IMAGE_INSTALL += " \
nfs-utils \
os-release \
packagegroup-base \
production-tool \
rng-tools \
u-boot-default-env \
"
......
#!/bin/sh
# This is a dummy file for yocto not to complain about a non existent file
#!/bin/sh
. /usr/share/production/testLib.sh
. /usr/share/production/productionLib.sh
# Include test cases here
DESCRIPTION = "ptool is used to run testing, production and serialization tasks on Kontron Linux hardware"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
inherit update-rc.d
PV = "0.4+git${SRCPV}"
SRCBRANCH = "develop"
SRCREV = "d4aa99622c79db2862b27e83d1b61da36698c186"
#SRCREV = "${AUTOREV}"
SRC_URI = " \
git://${KED_GIT_APPS}/ptool.git;protocol=https;branch=${SRCBRANCH} \
file://prod-env.sh;subdir=git \
file://production-prod.sh;subdir=git \
"
PACKAGES += "${PN}-prod ${PN}-autoprod"
FILES:${PN} = "/usr/bin/ptool /usr/bin/production-tool.sh /usr/share/production/productionLib.sh /usr/share/production/prod-env.sh /usr/bin/fwinfo"
FILES:${PN}-prod = "/usr/share/production/testLib.sh /usr/share/production/production-prod.sh /usr/share/production/resizesd.sh"
FILES:${PN}-autoprod = "/etc/init.d/autoprod"
FILES:${PN}-dbg = ""
RDEPENDS:${PN}-autoprod = "${PN}-prod"
RDEPENDS:${PN}-prod = "bash"
RDEPENDS:${PN} = "ethtool u-boot-fw-utils u-boot-tools-mkenvimage e2fsprogs e2fsprogs-resize2fs ntpdate"
INITSCRIPT_PACKAGES = "${PN}-autoprod"
INITSCRIPT_NAME:${PN}-autoprod = "autoprod"
INITSCRIPT_PARAMS:${PN}-autoprod = "start 99 5 ."
S = "${WORKDIR}/git"
do_install () {
install -D -m 0755 ${S}/ptool ${D}/usr/bin/ptool
install -D -m 0755 ${S}/fwinfo ${D}/usr/bin/fwinfo
install -D -m 0755 ${S}/production-prod.sh ${D}/usr/share/production/production-prod.sh
install -D -m 0755 ${S}/testLib.sh ${D}/usr/share/production/testLib.sh
install -D -m 0755 ${S}/productionLib.sh ${D}/usr/share/production/productionLib.sh
install -D -m 0755 ${S}/resizesd.sh ${D}/usr/share/production/resizesd.sh
install -D -m 0755 ${S}/prod-env.sh ${D}/usr/share/production/prod-env.sh
install -d ${D}${sysconfdir}/init.d
install -D -m 0755 ${S}/autoprod.sh ${D}${sysconfdir}/init.d/autoprod
echo "echo '###################################################\n\
Note: production-tool.sh was renamed to ptool.\n\
Please use ptool in the future!\n\
###################################################'; ptool \$@;" > ${D}/usr/bin/production-tool.sh
chmod +x ${D}/usr/bin/production-tool.sh
}
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