diff options
author | Michael Brown <mcb30@ipxe.org> | 2019-07-19 17:35:39 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2019-07-19 17:35:39 +0100 |
commit | e520a51df1c65d750798420d5ba1bab4271db264 (patch) | |
tree | 22f0bda67cd67738eac25ba56644eae399acc933 /src/config/config_fdt.c | |
parent | a385e2376859dc0195ec77aeab220876b201c16b (diff) | |
download | ipxe-e520a51df1c65d750798420d5ba1bab4271db264.tar.gz |
[fdt] Add ability to parse a MAC address from a flattened device tree
The Raspberry Pi NIC has no EEPROM to hold the MAC address. The
platform firmware (e.g. UEFI or U-Boot) will typically obtain the MAC
address from the VideoCore firmware and add it to the device tree,
which is then made available to subsequent programs such as iPXE or
the Linux kernel.
Add the ability to parse a flattened device tree and to extract the
MAC address.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/config/config_fdt.c')
-rw-r--r-- | src/config/config_fdt.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/config/config_fdt.c b/src/config/config_fdt.c new file mode 100644 index 000000000..85d62ace1 --- /dev/null +++ b/src/config/config_fdt.c @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2019 Michael Brown <mbrown@fensystems.co.uk>. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + * + * You can also choose to distribute this program under the terms of + * the Unmodified Binary Distribution Licence (as given in the file + * COPYING.UBDL), provided that you have satisfied its requirements. + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#include <config/fdt.h> + +/** @file + * + * Flattened Device Tree configuration options + * + */ + +PROVIDE_REQUIRING_SYMBOL(); + +/* + * Drag in devicetree sources + */ |