From patchwork Wed Apr 13 20:03:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 610248 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 3qlZXX6GnXz9s9W for ; Thu, 14 Apr 2016 06:05:00 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=vanguardiasur-com-ar.20150623.gappssmtp.com header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.b=F7MgdkRT; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 747BB88D66; Wed, 13 Apr 2016 20:04:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S98WTUbBjHJ8; Wed, 13 Apr 2016 20:04:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id DFD1B86D5B; Wed, 13 Apr 2016 20:04:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 02C961C2647 for ; Wed, 13 Apr 2016 20:04:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F3AEB897E3 for ; Wed, 13 Apr 2016 20:04:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RiRDgG6pA5aO for ; Wed, 13 Apr 2016 20:04:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f169.google.com (mail-qk0-f169.google.com [209.85.220.169]) by whitealder.osuosl.org (Postfix) with ESMTPS id 400EA888DD for ; Wed, 13 Apr 2016 20:04:48 +0000 (UTC) Received: by mail-qk0-f169.google.com with SMTP id n130so23583971qke.3 for ; Wed, 13 Apr 2016 13:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VnaUh8scZ4U5LMWAiKT4zR9S8ZUPyp9lsGvLJMuAYdU=; b=F7MgdkRTpkAejb1TPoYO3CIBIxYHutDS2HZTjczQMDq3Yi/duqIVtORA4Hiv4mUE39 wKmKZuHnxh3n295YAbhGNqcpZeOb4iitvEUqiUSJ73n1KohqkjXoa5Q957KwfvNppBE3 a/kB7EGClGCfHnrbmwYIskHEmjb3iWpRCCTmoZIeOc/C4AWkvL05JOhiLar7W7vUQ/+D OfsdP+ct1qagGikh/STuCA9z/J5fQrievUhxYgmHqqymsXhJOgIlEsZI94JI05zexj8D qUhSQtEVSvsZ6emdgeTQ5HZhToG5NW3mJ5A+hnu5RTz3vpZWGI6o1UsxFFvaMbIgIM62 dIng== 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=VnaUh8scZ4U5LMWAiKT4zR9S8ZUPyp9lsGvLJMuAYdU=; b=LpB/qsQU5K8UXuFL1Xs1Bkw3tmSbV8zo8eNEwOJ3S5Mtd5IUgdPMn6ASyWNhyQj+wJ o9rUHEw6XCQLS+L4cSw4gzXurASBOMrZJ21QLPxea1E8VBY/P8XmA/SdNFZCZ4GKnk4J 3n0Lju0jeG/ig4Op0TPGkz9dm/+hh0J+lvWMQmGheXRcIVmPjozWmiz4sfSHRhUKTVii R6B63zmd3stS1bRU/BlzOjkofZ7O68RhTHtX7xOZacvplmLrXJVqsVpax3ZP1Ev9tk6b MsAhgIHJdxfaVXz2qknjc+qaJr3mjLckWouoWExbgI1LYFXsfDCez0vstumeoaoEtWiY v2Ow== X-Gm-Message-State: AOPr4FXcNkWjVytaQNL8g6Svh4j7D3V0T6B5Ikr99WpBMGIWb8yVds7by/53q4/44cTbZg== X-Received: by 10.55.76.84 with SMTP id z81mr13730493qka.17.1460577887489; Wed, 13 Apr 2016 13:04:47 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.156]) by smtp.gmail.com with ESMTPSA id 76sm16453856qhs.21.2016.04.13.13.04.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Apr 2016 13:04:46 -0700 (PDT) From: Ezequiel Garcia To: Date: Wed, 13 Apr 2016 17:03:39 -0300 Message-Id: <1460577820-32164-15-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1460577820-32164-1-git-send-email-ezequiel@vanguardiasur.com.ar> References: <1460577820-32164-1-git-send-email-ezequiel@vanguardiasur.com.ar> Cc: Thomas Petazzoni , "Yann E . MORIN" Subject: [Buildroot] [PATCH 14/15] board/raspberry*: Leverage the new genimage infra 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" Let's rework the board and config files to use the recently added genimage infra, which generates the SD card image directly. Signed-off-by: Ezequiel Garcia --- board/raspberrypi/post-build.sh | 8 ++++++++ board/raspberrypi/post-image.sh | 22 ---------------------- configs/raspberrypi2_defconfig | 5 +++-- configs/raspberrypi_defconfig | 5 +++-- 4 files changed, 14 insertions(+), 26 deletions(-) create mode 100755 board/raspberrypi/post-build.sh delete mode 100755 board/raspberrypi/post-image.sh diff --git a/board/raspberrypi/post-build.sh b/board/raspberrypi/post-build.sh new file mode 100755 index 000000000000..8b66536d84c6 --- /dev/null +++ b/board/raspberrypi/post-build.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# Mark the kernel as DT-enabled +mkdir -p "${BINARIES_DIR}/kernel-marked" +${HOST_DIR}/usr/bin/mkknlimg "${BINARIES_DIR}/zImage" \ + "${BINARIES_DIR}/kernel-marked/zImage" + +exit $? diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh deleted file mode 100755 index 73ffd658e7ca..000000000000 --- a/board/raspberrypi/post-image.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -BOARD_DIR="$(dirname $0)" -BOARD_NAME="$(basename ${BOARD_DIR})" -GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg" -GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" - -# Mark the kernel as DT-enabled -mkdir -p "${BINARIES_DIR}/kernel-marked" -${HOST_DIR}/usr/bin/mkknlimg "${BINARIES_DIR}/zImage" \ - "${BINARIES_DIR}/kernel-marked/zImage" - -rm -rf "${GENIMAGE_TMP}" - -genimage \ - --rootpath "${TARGET_DIR}" \ - --tmppath "${GENIMAGE_TMP}" \ - --inputpath "${BINARIES_DIR}" \ - --outputpath "${BINARIES_DIR}" \ - --config "${GENIMAGE_CFG}" - -exit $? diff --git a/configs/raspberrypi2_defconfig b/configs/raspberrypi2_defconfig index 1d82f6041742..fed926869cc9 100644 --- a/configs/raspberrypi2_defconfig +++ b/configs/raspberrypi2_defconfig @@ -25,11 +25,12 @@ BR2_PACKAGE_RPI_FIRMWARE=y # Required tools to create the SD image BR2_PACKAGE_HOST_DOSFSTOOLS=y -BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y # Filesystem / image BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_GENIMAGE=y +BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/raspberrypi2/genimage-raspberrypi2.cfg" # BR2_TARGET_ROOTFS_TAR is not set -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi2/post-image.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi2/post-build.sh" diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig index 615c052bdd26..10cb812a3371 100644 --- a/configs/raspberrypi_defconfig +++ b/configs/raspberrypi_defconfig @@ -24,11 +24,12 @@ BR2_PACKAGE_RPI_FIRMWARE=y # Required tools to create the SD image BR2_PACKAGE_HOST_DOSFSTOOLS=y -BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y # Filesystem / image BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_GENIMAGE=y +BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/raspberrypi/genimage-raspberrypi.cfg" # BR2_TARGET_ROOTFS_TAR is not set -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi/post-image.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi/post-build.sh"