From patchwork Sun Feb 17 23:04:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 221111 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 9DAAE2C007C for ; Mon, 18 Feb 2013 10:05:21 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A536410B938; Sun, 17 Feb 2013 23:05:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eNCU5p7G84Uc; Sun, 17 Feb 2013 23:05:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A1415101A42; Sun, 17 Feb 2013 23:05:02 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 35CBF8F753 for ; Sun, 17 Feb 2013 23:05:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0BA2087134 for ; Sun, 17 Feb 2013 23:04:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R9o7IW8cUvN7 for ; Sun, 17 Feb 2013 23:04:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by whitealder.osuosl.org (Postfix) with ESMTPS id C2F6D8C057 for ; Sun, 17 Feb 2013 23:04:53 +0000 (UTC) Received: by mail-we0-f172.google.com with SMTP id x10so4244658wey.31 for ; Sun, 17 Feb 2013 15:04:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references; bh=OZe3EQ20E+zgtN/uCa3jYd2bZHwEyJV26hYO9NkXTc8=; b=BdDMicCP007xYQPwNrRNHfmmBeIPK1Xkt1L9cPiBldsCBTzalECf4ThOXY5KYoTvLb FUIClrv5hykn0ZQdsosCPoUag9Iul2jaJsuoIAzVMm0jZ2PcpSXufpvndtdo4xb+2lHP PLxcoFhVLLtI14lW2WJ/j6cE+AcinTtPG9oWJqg287GElhwJXlx7dZt49dGJjdwp4vOT VienEgu5Oanhz0hhjBu+Bu0WDf7Z8uvTMQvnxz2SHskK2aNJA95LeHAzHGIfq8CVJ9Mz vIh//RTBHdcuO9Q4OsKhwTRO2QGfy0xBVxQZR07/bSsvqKPL6/q4p4Kfiy9Qg2Pli1O9 Eivg== X-Received: by 10.180.84.199 with SMTP id b7mr15036457wiz.22.1361142291817; Sun, 17 Feb 2013 15:04:51 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-67-109.w90-32.abo.wanadoo.fr. [90.32.146.109]) by mx.google.com with ESMTPS id eo1sm16994134wib.8.2013.02.17.15.04.50 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 17 Feb 2013 15:04:51 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Mon, 18 Feb 2013 00:04:37 +0100 Message-Id: <93d4e70f16161e39b93a466d85de18d19e4f973b.1361142190.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 5/6] package/genpart: new host-only package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net Signed-off-by: "Yann E. MORIN" --- package/Config.in.host | 1 + package/genpart/Config.in.host | 8 ++++++++ package/genpart/genpart-fix-return-code.patch | 25 +++++++++++++++++++++++++ package/genpart/genpart.mk | 11 +++++++++++ 4 files changed, 45 insertions(+), 0 deletions(-) create mode 100644 package/genpart/Config.in.host create mode 100644 package/genpart/genpart-fix-return-code.patch create mode 100644 package/genpart/genpart.mk diff --git a/package/Config.in.host b/package/Config.in.host index c456d5d..e97f6e8 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -4,6 +4,7 @@ source "package/dfu-util/Config.in.host" source "package/dosfstools/Config.in.host" source "package/e2fsprogs/Config.in.host" source "package/genimage/Config.in.host" +source "package/genpart/Config.in.host" source "package/lpc3250loader/Config.in.host" source "package/omap-u-boot-utils/Config.in.host" source "package/openocd/Config.in.host" diff --git a/package/genpart/Config.in.host b/package/genpart/Config.in.host new file mode 100644 index 0000000..f986504 --- /dev/null +++ b/package/genpart/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_GENPART + bool "host genpart" + help + Generate a 16 byte partition table entry defined by command line + arguments and dump it to stdout. No CHS magic is done, only lba + entries are filled out. + + http://www.pengutronix.de/software/genpart/index_en.html diff --git a/package/genpart/genpart-fix-return-code.patch b/package/genpart/genpart-fix-return-code.patch new file mode 100644 index 0000000..14ff165 --- /dev/null +++ b/package/genpart/genpart-fix-return-code.patch @@ -0,0 +1,25 @@ +genpart: return 0 if partition writen OK, with no do_magic + +If do_magic is false, we don't won't write the 0xaa55 magic. +However, if we succesfully wrote the partition entry, we still +want to return 0 to indicate success. + +Signed-off-by: "Yann E. MORIN" +Cc: Robert Schwebel + +-- +Patch sent upstream, but no mailing list. +Status: pending... + +diff -durN host-genpart-1.0.2.orig/src/genpart.c host-genpart-1.0.2/src/genpart.c +--- host-genpart-1.0.2.orig/src/genpart.c 2009-12-20 21:54:56.000000000 +0100 ++++ host-genpart-1.0.2/src/genpart.c 2013-01-22 23:13:24.109752579 +0100 +@@ -92,6 +92,8 @@ + if (do_magic) { + if (fwrite(&magic, 2, 1, stdout) > 0) + rc=0; ++ } else { ++ rc=0; + } + } + return rc; diff --git a/package/genpart/genpart.mk b/package/genpart/genpart.mk new file mode 100644 index 0000000..735333a --- /dev/null +++ b/package/genpart/genpart.mk @@ -0,0 +1,11 @@ +############################################################# +# +# genpart +# +############################################################# + +GENPART_VERSION = 1.0.2 +GENPART_SOURCE = genpart-$(GENPART_VERSION).tar.bz2 +GENPART_SITE = http://www.pengutronix.de/software/genpart/download/ + +$(eval $(host-autotools-package))