From patchwork Mon Jun 10 19:41:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joris OFFOUGA X-Patchwork-Id: 1113301 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Hlt4ZyTq"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45N3Ry6rXbz9s6w for ; Tue, 11 Jun 2019 05:42:06 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2994D8653F; Mon, 10 Jun 2019 19:42:04 +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 Zy5tM0TA5EsU; Mon, 10 Jun 2019 19:42:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9E7FC86D92; Mon, 10 Jun 2019 19:42:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 05B101BF47D for ; Mon, 10 Jun 2019 19:42:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 02B2986D92 for ; Mon, 10 Jun 2019 19:42:03 +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 29Grn5Kzy2oP for ; Mon, 10 Jun 2019 19:42:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by hemlock.osuosl.org (Postfix) with ESMTPS id 35FDC8653F for ; Mon, 10 Jun 2019 19:42:02 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id e16so10429433wrn.1 for ; Mon, 10 Jun 2019 12:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=PLtXlZYSsVMZEGkOnXAQ29dtXEeVq2T6Z8s0mD5IX7Y=; b=Hlt4ZyTq3IIAa9licGDvKt+gPorD+dM2Rbs/WIRsK6OKxSP5Zoc+NJ6lX8MCJUP4WI o344FIFXRXDIOnY5zOIV6vxwVKf91TGy0nT2bUL/dyyUmpKSBikSlLadX+0mDyhzSGpV /wV2rRB8c/ZTsgpp6L/4UFrI5z8Om0EiBxrS63t4jOtNMHwnlG8dAmjkIg07ytzRY5gm srXrNrVWsR4YgdXKIRP3IyLyzPa4BTXdo230pGQ8VIsnq6PDR7JFrsAit8zSlZttxsP4 IZ0p+PKozBS0ctoPSSXf4Gd4fij1vf2L5vlXUq6hLh3puViEj6HWpgeClPDSDN9Qp71V 5VhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PLtXlZYSsVMZEGkOnXAQ29dtXEeVq2T6Z8s0mD5IX7Y=; b=ohPOjmL8Hgg812/4iD4iobJxw7U5Z0a8oPwsXkmJURwClKM+YYEFK4vzW0vY3hXB87 y9htyi99SwAiuTi7Dqe5PLxRb48R1rlPMqw3LPcUUPg5YOgI4pMziBwPUqb7QVER1U7O EE7vdN6HJI+qLBy0ShaRze+k4+AYALMi2TgEYiyiesCk+BGBdyRNgyQsqTGmksJz5ETA G6wbGI8S0C2wDlvZdOW5m0RVjUZY7bDWG6ohjGav9sv6DNngxKlcZA+MLbQv/UgoaVIj BInZZRrCNEG4pyYLyWr3ClRs1rBBzvieuTWbGcrOWq/bEs8MNChN7HG4S/XYqyZJgenW iV8Q== X-Gm-Message-State: APjAAAXTWNHTVnVPSuLtgfODaxVzR17f2cD2jqG+Z+7OyDA9h78o7Pzv H/dwUQZvXXWNikmHoDjzG4S2uAv25nA= X-Google-Smtp-Source: APXvYqxMJEPfgumNfBM28IPzi1tR2YTb2woJlfSrCPePqRVkLNfxNC39qtgGxvWtrXi3E6C8qyTa1Q== X-Received: by 2002:adf:fd8b:: with SMTP id d11mr12943915wrr.90.1560195720604; Mon, 10 Jun 2019 12:42:00 -0700 (PDT) Received: from furher.home ([2a01:cb19:16b:9900:a924:2336:79a9:d19d]) by smtp.gmail.com with ESMTPSA id c24sm341327wmb.21.2019.06.10.12.41.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 12:42:00 -0700 (PDT) From: Joris Offouga To: buildroot@buildroot.org Date: Mon, 10 Jun 2019 21:41:42 +0200 Message-Id: <20190610194144.25958-1-offougajoris@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH v2 1/3] boards/freescale/common: Introduce template_no_boot_part_spl X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pierre-Jean Texier , Joris Offouga MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This includes the no_boot_part_spl templates which use a /boot included in rootfs. Signed-off-by: Joris Offouga Signed-off-by: Pierre-Jean Texier Tested-by: Pierre-Jean Texier --- changes v1 -> v2 - remove no_boot_part feature - rename commit - add tested-by - fix comment for template header file .../genimage.cfg.template_no_boot_part_spl | 30 +++++++++++++++++++ board/freescale/common/imx/post-image.sh | 4 +++ 2 files changed, 34 insertions(+) create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl new file mode 100644 index 0000000000..9cdecc6ce0 --- /dev/null +++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl @@ -0,0 +1,30 @@ +# Minimal SD card image for the Freescale boards Template for SPL Boot +# +# We mimic the .sdcard Freescale's image format: +# * the SD card must have 1 kB free space at the beginning, +# * SPL is at the offset expected by ROM, +# * U-Boot is at the offset expected by SPL, +# * The first partition is expected to be an ext2 and have a /boot directory. +# + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "SPL" + offset = 1024 + } + + partition u-boot-img { + in-partition-table = "no" + image = "u-boot.img" + offset = 69K + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh index d07ad2ef5d..12756c63d5 100755 --- a/board/freescale/common/imx/post-image.sh +++ b/board/freescale/common/imx/post-image.sh @@ -38,6 +38,10 @@ genimage_type() echo "genimage.cfg.template_imx8" elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y$" ${BR2_CONFIG}; then echo "genimage.cfg.template_imx8" + elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" ${BR2_CONFIG}; then + if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then + echo "genimage.cfg.template_no_boot_part_spl" + fi elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then echo "genimage.cfg.template_spl" else