i.mx6 MAC Address Hacking

Source: Internet
Author: User

/************************************************************************** * i.mx6 MAC Address ha cking * Description: * This document describes how the i.mx6 driver obtains the MAC address. * 2016-6-24 Shenzhen Nanshan Ping Shan village Zengjianfeng ************************************************************** ************//** Initialize __MACH_DESC_MX6Q_SABRESD data structure.*/Machine_start (MX6Q_SABRESD,"Freescale i. mx 6quad/duallite/solo sabre-sd Board")    /*Maintainer:freescale Semiconductor, Inc.*/. Boot_params= Mx6_phys_offset +0x100,. Fixup=Fixup_mxc_board,. Map_io=mx6_map_io,. Init_irq=Mx6_init_irq,. Init_machine= Mx6_sabresd_board_init,--------------+. Timer= &mx6_sabresd_timer, |. Reserve= Mx6q_sabresd_reserve, |Machine_end|                                                                 | |Static void__init Mx6_sabresd_board_init (void) <-------------+{... imx6_init_fec (fec_data); --------------------+    ......                                                             |}                                                                      | |void__init IMX6_INIT_FEC (structFec_platform_data Fec_data) <----+{fec_get_mac_addr (FEC_DATA.MAC); ----------+if(!is_valid_ether_addr (FEC_DATA.MAC)) |random_ether_addr (FEC_DATA.MAC); | |if(CPU_IS_MX6SL ()) |IMX6SL_ADD_FEC (&fec_data); |Else|IMX6Q_ADD_FEC (&fec_data); |}                                                                  | |Static intFEC_GET_MAC_ADDR (unsignedChar*MAC) <----------+{unsignedintvalue; Value= Readl (mx6_io_address (OCOTP_BASE_ADDR) + HW_OCOTP_MACN (0)); mac[5] = value &0xFF; mac[4] = (Value >>8) &0xFF; mac[3] = (Value >> -) &0xFF; mac[2] = (Value >> -) &0xFF; Value= Readl (mx6_io_address (OCOTP_BASE_ADDR) + HW_OCOTP_MACN (1)); mac[1] = value &0xFF; mac[0] = (Value >>8) &0xFF; return 0;}

i.mx6 MAC Address Hacking

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.