mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-02 19:03:20 +09:00
![Rohan Garg](/assets/img/avatar_default.png)
Generate a MAC address based on the cpuid available in the efuse block: Use the first 6 byte of the cpuid's SHA256 hash and set the locally administered bits. Also ensure that the multicast bit is cleared. The MAC address is only generated and set if there is no ethaddr present in the saved environment. This is based off of Klaus Goger's work in 8adc9d Signed-off-by: Rohan Garg <rohan.garg@collabora.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
14 lines
412 B
C
14 lines
412 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* RK3399: Architecture common definitions
|
|
*
|
|
* Copyright (C) 2019 Collabora Inc - https://www.collabora.com/
|
|
* Rohan Garg <rohan.garg@collabora.com>
|
|
*/
|
|
|
|
int rockchip_cpuid_from_efuse(const u32 cpuid_offset,
|
|
const u32 cpuid_length,
|
|
u8 *cpuid);
|
|
int rockchip_cpuid_set(const u8 *cpuid, const u32 cpuid_length);
|
|
int rockchip_setup_macaddr(void);
|