mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] net: dhcp: add private extention 224 to pass the oftree file via dhcp.
Date: Sun,  8 Apr 2012 11:27:21 +0200	[thread overview]
Message-ID: <1333877242-582-2-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1333877242-582-1-git-send-email-plagnioj@jcrosoft.com>

DHCP option 224 to 254 are for private use, so use one.

Export it via env dhcp_oftree_file.

E.g. the ISC dhcp server can be configured with

   | option oftree-path code 224 = string
   | class "at91sam9x5ek" {
   | match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x5ek";
   |
   | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage";
   | option tftp-server-name "192.168.200.98";
   | option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target";
   | option oftree-path "/tftpboot/atmel/at91sam9x5/sam9x5ek/sam9g25ek/dtb";
   | }

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 net/dhcp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/dhcp.c b/net/dhcp.c
index ad32b53..0116ba4 100644
--- a/net/dhcp.c
+++ b/net/dhcp.c
@@ -201,6 +201,10 @@ struct dhcp_opt dhcp_options[] = {
 		.option = 67,
 		.handle = bootfile_vendorex_handle,
 		.barebox_var_name = "bootfile",
+	}, {
+		.option = 224,
+		.handle = env_str_handle,
+		.barebox_var_name = "dhcp_oftree_file",
 	},
 };
 
@@ -702,3 +706,4 @@ BAREBOX_MAGICVAR(dhcp_client_uuid, "cliend uuid to send to the DHCP server");
 BAREBOX_MAGICVAR(dhcp_client_id, "cliend id to send to the DHCP server");
 BAREBOX_MAGICVAR(dhcp_user_class, "user class to send to the DHCP server");
 BAREBOX_MAGICVAR(dhcp_tftp_server_name, "TFTP server Name returned from DHCP request");
+BAREBOX_MAGICVAR(dhcp_oftree_file, "OF tree returned from DHCP request (option 224)");
-- 
1.7.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-04-08  9:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-08  9:27 [PATCH 1/3] defaultenv/boot: add support for oftree boot option support Jean-Christophe PLAGNIOL-VILLARD
2012-04-08  9:27 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-04-08  9:27 ` [PATCH 3/3] defaultenv: add support of oftree file pass via dhcp (option 224) Jean-Christophe PLAGNIOL-VILLARD
2012-04-10  7:55 ` [PATCH 1/3] defaultenv/boot: add support for oftree boot option support Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1333877242-582-2-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox