From patchwork Mon May 9 05:38:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 621298 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r4rMY65GNz9t66 for ; Thu, 12 May 2016 08:27:05 +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=ZV8b4YHK; dkim-atps=neutral Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3r4rMY4hPGzDqHF for ; Thu, 12 May 2016 08:27:05 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ZV8b4YHK; dkim-atps=neutral X-Original-To: petitboot@lists.ozlabs.org Delivered-To: petitboot@lists.ozlabs.org Received: from mail-pa0-x241.google.com (mail-pa0-x241.google.com [IPv6:2607:f8b0:400e:c03::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3r3B5S3RSyzDq5m for ; Mon, 9 May 2016 15:39:08 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ZV8b4YHK; dkim-atps=neutral Received: by mail-pa0-x241.google.com with SMTP id gh9so15140476pac.0 for ; Sun, 08 May 2016 22:39:08 -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; bh=shjte4oSP/9Bw+tfhinb5ZxYlG0jgAfQS+8/BJfwEBA=; b=ZV8b4YHKFlTtY0povpZH+P+MEZM694R/7tjCtPpj9kpP+Rc3Bgir8qT1iD79FEIcDb SzLgRPzEAMrZYr5DKHqXTgBTgTJ8FG2MzdY25zgfNHTaBmCtH6Ivr1PIXEiTlpXoyuRe RPk/rX2fUolbR8VqqNCKyrZ31E7R+PUcm4kKGsTP6sPzwK5UN25yogyKhLHUphW7D53L e2cdCP+tJKITeKNsvBOZCaxrhwHeWEfHZ1vq5zNgjO7sUFWpxWpEcqwdgYEj37Ghg+1n BMTf+2RC6l8w+I9vjlg0MK+TItNhpIw3bY6VTClPmOtLmbNynIBkkO0xDX+BRGdTIlW/ uwEQ== 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; bh=shjte4oSP/9Bw+tfhinb5ZxYlG0jgAfQS+8/BJfwEBA=; b=Fh8OVRW+AbXO7wjTU5k/Vz59AZZTmBkqctaeE83t0758MI3HwFYsZAg5lYWgdKltQ6 /gl6yovgNHafGcHpNpZnLFDDQCo/ugt4edIvqCT1Y8f2iTBL+HCUxZrSSgrIwk4z14mw 4bEcrwyJJVFtc81kYwq5Qu1WS33aDCxnz93DM/vaCT6tj5wBXLWU/KUajw0xL85Yuqw+ MINUZ/DPzgRBnNn0shtozPkf50xAkQQCikPxz72FsZbyJSv2FakD1ZvfCogzuruEE9YM UiMQQaKa+9Cjxq27Sbykhkyrl8e6MonN5pzg8H/2ZDO8WZ5kaTcJYvgPNpU9jRDTgNT0 tW0Q== X-Gm-Message-State: AOPr4FXFfpRPP72W+noLhJrPKoljgwDg1R2+S7s/HDZp7HZiI24Kng9p/6/7RHUvQjLfQA== X-Received: by 10.66.54.35 with SMTP id g3mr48439445pap.30.1462772346162; Sun, 08 May 2016 22:39:06 -0700 (PDT) Received: from canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id u65sm37078241pfa.9.2016.05.08.22.39.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 May 2016 22:39:05 -0700 (PDT) From: Oliver O'Halloran To: petitboot@lists.ozlabs.org Subject: [PATCH] pb-discover: add dtb support for PXE config Date: Mon, 9 May 2016 15:38:47 +1000 Message-Id: <1462772327-11436-1-git-send-email-oohall@gmail.com> X-Mailer: git-send-email 2.5.5 X-Mailman-Approved-At: Thu, 12 May 2016 08:26:55 +1000 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oliver O'Halloran MIME-Version: 1.0 Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" Currently there is no way to manually specify a DTB file when with a PXE network boot configuration file. This makes it difficult when you need to work with or emulate a special snowflake machines with special snowflake hardware. Some ARM systems provide this feature with the "fdt" option so this patch adds support for using the ftd or dtb configuration options to the PXE config parser. Signed-off-by: Oliver O'Halloran --- discover/pxe-parser.c | 4 ++++ test/parser/test-pxe-single.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/discover/pxe-parser.c b/discover/pxe-parser.c index 95547c389799..4812c374d199 100644 --- a/discover/pxe-parser.c +++ b/discover/pxe-parser.c @@ -189,6 +189,10 @@ static void pxe_process_pair(struct conf_context *ctx, type = strtoul(value, &end, 10); if (end != value && !(*end)) pxe_process_sysappend(ctx->dc, opt, type); + + } else if (streq(name, "DTB") || streq(name, "FDT")) { + url = pxe_url_join(ctx->dc, ctx->dc->conf_url, value); + opt->dtb = create_url_resource(opt, url); } } diff --git a/test/parser/test-pxe-single.c b/test/parser/test-pxe-single.c index 56c404cd9820..3c3ab2b9beae 100644 --- a/test/parser/test-pxe-single.c +++ b/test/parser/test-pxe-single.c @@ -8,6 +8,7 @@ label linux kernel ./pxe/de-ad-de-ad-be-ef.vmlinuz append command line initrd=./pxe/de-ad-de-ad-be-ef.initrd +dtb ./pxe/de-ad-de-ad-be-ef.dtb #endif void run_test(struct parser_test *test) @@ -35,4 +36,6 @@ void run_test(struct parser_test *test) "tftp://host/dir/./pxe/de-ad-de-ad-be-ef.vmlinuz"); check_resolved_url_resource(opt->initrd, "tftp://host/dir/./pxe/de-ad-de-ad-be-ef.initrd"); + check_resolved_url_resource(opt->dtb, + "tftp://host/dir/./pxe/de-ad-de-ad-be-ef.dtb"); }