9
0
Fork 0

net: dhcp: add private extention 224 to pass the oftree file via dhcp.

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>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-04-08 11:27:21 +02:00 committed by Sascha Hauer
parent cc6fba79e6
commit b00be49bdb
1 changed files with 5 additions and 0 deletions

View File

@ -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)");