From patchwork Wed Sep 7 22:29:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georges Savoundararadj X-Patchwork-Id: 667199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sTyp953Svz9s3s for ; Thu, 8 Sep 2016 08:30:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=qNrZbirn; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 35F3B8A710; Wed, 7 Sep 2016 22:30:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GBECxJ+amPnK; Wed, 7 Sep 2016 22:30:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 1EDCB8A7A0; Wed, 7 Sep 2016 22:30:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 7025E1C285A for ; Wed, 7 Sep 2016 22:30:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6B07831462 for ; Wed, 7 Sep 2016 22:30:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MK5C3eKf8Xnc for ; Wed, 7 Sep 2016 22:30:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by silver.osuosl.org (Postfix) with ESMTPS id 9F36830CF5 for ; Wed, 7 Sep 2016 22:30:04 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id n24so1531641pfb.2 for ; Wed, 07 Sep 2016 15:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/rhQuXA6Cse8vmvlpqafoDwCqVhE1VuNRo+Ev2LSZRQ=; b=qNrZbirnvNQTmtj+isnOZ3mkN27MM0qKdPOfVx05ttCnXb43hMMQK8/3mY7Umz1sFO EQFXVagLZ/tjwyeq8IrI5py+R1yWYAq/ruNLuLREYnP1di7Q52NFVtArmOFIMYoMfAf3 oRkSlEFcboEQem5PK9QCHZ4fW2LNO0A4Vtx+V8/63qWW70lpXR4W5DRu1llxBTB8AgMm 2ScDmx2/qErnULKX9pG2nijGVSC4PqQe9GyD0ODW8kHC6q8d3LfL4PH9jwovMNsrI3t1 g8b/ofMjx8+pEpUvz+oWPYDEpuNSV0RCh5Fji0pV18PHPJPVxxXfAUNsbohbKm96dCR6 B69A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/rhQuXA6Cse8vmvlpqafoDwCqVhE1VuNRo+Ev2LSZRQ=; b=ChU8Ye4B5Sw7i9btcvmHylwb+VJAOOfYYSRGtzDurSKqyYnf4lfaeaWw7suNxUoflY TpDBQxVqi4yx4FSBteBeBv1A8D/ZLcfIAjiE8hPCumVlS2bXoQEweJ/2Y5icwh6hRfa3 dHUC8CKKRHzq5rvJkuG1piUys3xdu71o8UBRVcI6x7qTZF+KUfXUKbzD8mMEMAXZN+ID msjJvckzYLY0Fo7GUExCq9UPnDkfdXPg2bqlULq4Qfse8K4jBAhGk9duT3R/q8OKmnkT 5WXEcSX9NGM2Y7zjcbIanNZj91JzjzniNtTIauap9ldST+e9pL5lb94ImEO4yynYOGpU Mo2w== X-Gm-Message-State: AE9vXwO5ZuPaB9ZMb4zuiWMV32ZfrEyIrZQw+cRxpp6WC9Iu9W/bwjHO+4OnfSmHYKVv0A== X-Received: by 10.98.33.205 with SMTP id o74mr11336097pfj.81.1473287404294; Wed, 07 Sep 2016 15:30:04 -0700 (PDT) Received: from manoj-PC.lan (c-50-135-218-194.hsd1.wa.comcast.net. [50.135.218.194]) by smtp.gmail.com with ESMTPSA id ad15sm51291782pac.33.2016.09.07.15.30.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Sep 2016 15:30:03 -0700 (PDT) From: Georges Savoundararadj To: buildroot@buildroot.org Date: Wed, 7 Sep 2016 15:29:09 -0700 Message-Id: <20160907222912.26002-2-savoundg@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160907222912.26002-1-savoundg@gmail.com> References: <20160709064004.8844-1-savoundg@gmail.com> <20160907222912.26002-1-savoundg@gmail.com> Cc: Thomas Petazzoni , Fabio Estevam , "Yann E . MORIN" , Georges Savoundararadj Subject: [Buildroot] [PATCH v2 2/5] freescale: genimage: Use the common genimage template X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The boards imx6dlsabreauto, imx6dlsabresd, imx6qsabreauto, imx6qsabresd, imx6sxsabresd were referring to board/freescale/create-boot-sd.sh for the sdcard image generation: * Remove board/freescale/create-boot-sd.sh * Use the common Freescale genimage template instead. The offset of the first partition was 1MB in the script and is modified to 8MB in the template. * Fix the readme.txt file accordingly Signed-off-by: Georges Savoundararadj Cc: Fabio Estevam Cc: Thomas Petazzoni Cc: Peter Korsgaard Cc: Yann E. MORIN --- Changes v1 -> v2: - No change Signed-off-by: Georges Savoundararadj --- board/freescale/create-boot-sd.sh | 93 ----------------------------- board/freescale/imx6sabre/readme.txt | 10 +++- configs/freescale_imx6dlsabreauto_defconfig | 6 ++ configs/freescale_imx6dlsabresd_defconfig | 6 ++ configs/freescale_imx6qsabreauto_defconfig | 6 ++ configs/freescale_imx6qsabresd_defconfig | 6 ++ configs/freescale_imx6sxsabresd_defconfig | 6 ++ 7 files changed, 37 insertions(+), 96 deletions(-) delete mode 100755 board/freescale/create-boot-sd.sh diff --git a/board/freescale/create-boot-sd.sh b/board/freescale/create-boot-sd.sh deleted file mode 100755 index af45115..0000000 --- a/board/freescale/create-boot-sd.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh - -set -u -set -e - -PROGNAME=$(basename $0) - -usage() -{ - echo "Create an SD card that boots on an i.MX53/6 board." - echo - echo "Note: all data on the the card will be completely deleted!" - echo "Use with care!" - echo "Superuser permissions may be required to write to the device." - echo - echo "Usage: ${PROGNAME} " - echo "Arguments:" - echo " The device to be written to" - echo - echo "Example: ${PROGNAME} /dev/mmcblk0" - echo -} - -if [ $# -ne 1 ]; then - usage - exit 1 -fi - -if [ $(id -u) -ne 0 ]; then - echo "${PROGNAME} must be run as root" - exit 1 -fi - -DEV=${1} - -# The partition name prefix depends on the device name: -# - /dev/sde -> /dev/sde1 -# - /dev/mmcblk0 -> /dev/mmcblk0p1 -if echo ${DEV}|grep -q mmcblk ; then - PART="p" -else - PART="" -fi - -PART1=${DEV}${PART}1 -PART2=${DEV}${PART}2 - -# Unmount the partitions if mounted -umount ${PART1} || true -umount ${PART2} || true - -# First, clear the card -dd if=/dev/zero of=${DEV} bs=1M count=20 - -sync - -# Partition the card. -# SD layout for i.MX6 boot: -# - Bootloader at offset 1024 -# - FAT partition starting at 1MB offset, containing uImage and *.dtb -# - ext2/3 partition formatted as ext2 or ext3, containing the root filesystem. -sfdisk ${DEV} < *** WARNING! The script will destroy all the card content. Use with care! *** - ./board/freescale/create-boot-sd.sh +For details about the medium image layout, see the definition in +board/freescale/common/genimage.cfg.template. Boot the SABRE board ==================== diff --git a/configs/freescale_imx6dlsabreauto_defconfig b/configs/freescale_imx6dlsabreauto_defconfig index a58ab5d..5a8d4ce 100644 --- a/configs/freescale_imx6dlsabreauto_defconfig +++ b/configs/freescale_imx6dlsabreauto_defconfig @@ -23,8 +23,14 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-sabreauto" # filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh" BR2_TARGET_ROOTFS_EXT2=y +# required tools to create the microSD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + # bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="mx6dlsabreauto" diff --git a/configs/freescale_imx6dlsabresd_defconfig b/configs/freescale_imx6dlsabresd_defconfig index ecb5f8b..c01bf7a 100644 --- a/configs/freescale_imx6dlsabresd_defconfig +++ b/configs/freescale_imx6dlsabresd_defconfig @@ -23,8 +23,14 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-sabresd" # filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh" BR2_TARGET_ROOTFS_EXT2=y +# required tools to create the microSD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + # bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="mx6dlsabresd" diff --git a/configs/freescale_imx6qsabreauto_defconfig b/configs/freescale_imx6qsabreauto_defconfig index 6ed33ee..b9a9446 100644 --- a/configs/freescale_imx6qsabreauto_defconfig +++ b/configs/freescale_imx6qsabreauto_defconfig @@ -23,8 +23,14 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabreauto" # filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh" BR2_TARGET_ROOTFS_EXT2=y +# required tools to create the microSD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + # bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="mx6qsabreauto" diff --git a/configs/freescale_imx6qsabresd_defconfig b/configs/freescale_imx6qsabresd_defconfig index bd01f05..b7419b0 100644 --- a/configs/freescale_imx6qsabresd_defconfig +++ b/configs/freescale_imx6qsabresd_defconfig @@ -23,8 +23,14 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabresd" # filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh" BR2_TARGET_ROOTFS_EXT2=y +# required tools to create the microSD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + # bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="mx6qsabresd" diff --git a/configs/freescale_imx6sxsabresd_defconfig b/configs/freescale_imx6sxsabresd_defconfig index 2519f49..9f8df63 100644 --- a/configs/freescale_imx6sxsabresd_defconfig +++ b/configs/freescale_imx6sxsabresd_defconfig @@ -21,8 +21,14 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sx-sdb" # filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/post-image.sh" BR2_TARGET_ROOTFS_EXT2=y +# required tools to create the microSD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + # bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="mx6sxsabresd"