i.MX BSP定制指南:Linux移植与配置详解

需积分: 11 12 下载量 155 浏览量 更新于2023-05-14 收藏 766KB PDF 举报
本指南详细阐述了如何基于i.MX基础软件平台(BSP, i.MX BSPPorting Guide)构建定制的i.MX解决方案。该文档主要关注Linux内核定制、U-Boot移植以及针对特定硬件配置的相关步骤,适用于在独立开发环境和Yocto Project中进行开发。 第1章“介绍”概述了文档的目的和背景,包括基本概念和参考文献,帮助读者理解整个过程的上下文。它可能涵盖了i.MX SoC的特点和为何选择定制BSP的重要性。 第二部分是“Porting Kernel”,分为两个小节: 1. **Kernel overview**:这部分介绍了如何在独立环境中构建和加载定制的Linux内核,包括必要的编译步骤和加载机制。对于有经验的开发者来说,这将指导他们如何适应新的硬件特性并确保内核与i.MX SoC兼容。 2. **Yocto Project支持**:接着,章节详细说明了如何在Yocto Project平台上集成和配置内核,这是一个流行的开源项目管理工具,用于构建嵌入式Linux系统。 第三章“Porting U-Boot”涵盖了U-Boot的移植流程: 1. **U-Boot overview**:简要介绍了U-Boot的作用,它是低级启动加载器,用于引导Linux内核。开发者需要了解如何构建和加载U-Boot以支持定制硬件。 2. **Building U-Boot in standalone environment**:提供了在独立环境中构建U-Boot的方法,包括对内存初始化表(DCD table)的自定义,以便适配i.MX DDR内存。 3. **Customizing the i.MX board code**:这部分深入讲解如何修改U-Boot代码,添加新的驱动初始化代码,并在系统启动时进一步定制。 4. **Debugging**:为了确保开发过程中的问题解决,文档还介绍了使用JTAG工具和printf进行调试的方法。 第四章“Configuring IOMUX Controller”专用于i.MX的输入/输出接口管理器(IOMUX): 1. **IOMUX overview**:介绍IOMUX控制器的基本原理和功能,以及设置其寄存器的必要信息。 2. **Setting IOMUX controller registers**:提供实际操作步骤,帮助开发者配置IOMUX以支持特定的硬件连接和信号传输。 通过这个i.MX BSPPorting Guide,开发人员可以遵循清晰的指导,从基础配置到高级定制,有效地为他们的定制硬件平台创建一个完整的Linux支持系统。无论是在独立开发还是利用Yocto Project这样的工具链,都能从中获益良多。
2019-07-26 上传
RTL819X系列的芯片方案,SDK开发指导手册。 1. Introduction .................................................................................................................................7 1.1. Feature Lists .................................................................................................................7 1.2. Channel Plan ................................................................................................................8 1.2.1. 2.4G Channel Plan ................................................................................................8 1.2.2. 5G Channel Plan ...................................................................................................8 2. Configuration..............................................................................................................................10 2.1. Configuration Files .....................................................................................................10 2.2. MIB .............................................................................................................................11 2.3. iwconfig/iwlist............................................................................................................29 2.3.1. iwconfig ..............................................................................................................29 2.3.2. iwlist ...................................................................................................................30 3. Basic Driver Operation and Setting ............................................................................................32 3.1. Basic Driver Operation ...............................................................................................32 3.1.1. Bring up Interface...............................................................................................32 3.1.2. Set MAC Address ................................................................................................32 3.1.3. Down Interface...................................................................................................32 3.2. Basic Driver Setting ....................................................................................................32 3.2.1. 802.11 b/g/n mode ............................................................................................32 3.2.2. Channel ..............................................................................................................33 3.2.3. SSID ....................................................................................................................34 3.2.4. TX Rate ...............................................................................................................34 3.2.5. Hidden AP...........................................................................................................34 3.2.6. No Encryption.....................................................................................................35 4. Dual-band Configuration............................................................................................................36 4.1. Related MIB................................................................................................................36 4.2. Examples ....................................................................................................................37 4.2.1. Setting as 5G Single MAC/PHY selective mode..................................................37 4.2.2. Setting as 2G Single MAC/PHY selective mode..................................................38 4.2.3. Setting as the Dual MAC/PHY concurrent mode................................................38 5. Security Policy ............................................................................................................................40 5.1. WEP ............................................................................................................................40 5.1.1. Related MIB........................................................................................................40 5.1.2. WEP 64 example ................................................................................................40 5.1.3. WEP 128 example ..............................................................................................40 5.2. WPA/WPA2 PSK..........................................................................................................41 5.2.1. Related MIB........................................................................................................41 5.2.2. WPA AES example ..............................................................................................41 5.2.3. WPA TKIP example .............................................................................................41 5.2.4. WPA2 AES example ............................................................................................42 5.2.5. WPA2 TKIP example ...........................................................................................42 5.2.6. WPA/WPA2 AES mixed mode example ..............................................................42 5.2.7. WPA/WPA2 TKIP mixed mode example .............................................................42 5.2.8. WPA/WPA2 auto mixed mode example.............................................................43 5.3. Mix Security Setting for Client Mode .........................................................................43 5.3.1. Related MIB........................................................................................................44 6. Dynamic Frequency Selection (DFS) ..........................................................................................45 7. Multiple BSSID............................................................................................................................45 7.1. Related MIB................................................................................................................45 7.2. Example of Setup .......................................................................................................46 7.2.1. Enable MBSSID feature and Open two VAP interfaces ......................................46 7.2.2. Stop one VAP interface.......................................................................................47 7.2.3. Disable MBSSID feature and stop two VAP interfaces .......................................47 7.2.4. Set VAP SSID .......................................................................................................47 7.3. Important Notes.........................................................................................................47 8. WMM .........................................................................................................................................49 8.1. Feature Description....................................................................................................49 8.2. Related MIB................................................................................................................49 9. WDS............................................................................................................................................50 9.1. Feature Description....................................................................................................50 9.2. Related MIB................................................................................................................50 9.3. WDS Example .............................................................................................................51 9.3.1. WDS with No Encryption Example .....................................................................51 9.3.2. WDS with WEP 64 bit Encryption Example........................................................51 9.3.3. WDS with AES Encryption Example....................................................................52 9.4. Important Notes.........................................................................................................53 10. 802.1X ................................................................................................................................54 10.1. System Architecture ...................................................................................................54 10.2. 802.1X Related Daemons Introduction ......................................................................54 10.2.1. iwcontrol Daemon Introduction.........................................................................54 10.2.2. 802.1X Daemon Introduction.............................................................................55 10.3. 802.1X Start Procedure ..............................................................................................55 10.4. WPA Config File..........................................................................................................55 10.4.1. Config File Related Parameters ..........................................................................55 10.5. 802.1X Example..........................................................................................................57 10.5.1. 802.1X with WPA AES Example ..........................................................................57 10.5.2. 802.1X with WPA2 AES Example ........................................................................58 10.5.3. 802.1X with WPA/WPA2 AES/TKIP mixed mode Example .................................58 11. IAPP ....................................................................................................................................60 12. WPS ....................................................................................................................................60 13. IGMP Snooping...................................................................................................................61 13.1. The process flow of IGMP snooping ..........................................................................61 13.2. Related MIB................................................................................................................62 13.3. IGMP snooping Example ............................................................................................62 14. Multiple AP profile .............................................................................................................63 14.1. Related MIB................................................................................................................63 14.2. How to debug.............................................................................................................65 15. Mesh...................................................................................................................................66 15.1. Related MIB................................................................................................................66 15.2. Pathsel Deamon .........................................................................................................67 15.3. Example......................................................................................................................67 15.3.1. Enable Mesh.......................................................................................................67 15.3.2. Disable Mesh......................................................................................................68 15.3.3. Enable Dual-Band Mesh.....................................................................................68 15.3.4. Disable Dual-Band Mesh ....................................................................................69 15.4. Debug and Web Information .....................................................................................69 16. Mass Production ................................................................................................................70 17. Other User Space Utilities ..................................................................................................70 17.1. iwpriv Utility...............................................................................................................70 17.1.1. Read WLAN register ...........................................................................................70 17.1.2. Write WLAN register ..........................................................................................70 17.1.3. Read WLAN memory..........................................................................................70 17.1.4. Write WLAN memory.........................................................................................70 17.2. Proc Files ....................................................................................................................71 17.3. IOCTL ..........................................................................................................................72 18. Hardware Limitation ..........................................................................................................75 18.1. Limitation ...................................................................................................................75 19. 802.11R Support ................................................................................................................76 19.1.1. Enable fast roaming............................................................................................76 19.1.2. Disable fast roaming...........................................................................................76 19.1.3. Debug information of fast roaming....................................................................76

void sl_notify_gap_evt_to_porting_layer(sl_bt_msg_t *evt) { sl_status_t sc; bd_addr address; uint8_t address_type; struct ble_gap_event event; memset(&event, 0, sizeof(event)); switch (SL_BT_MSG_ID(evt->header)) { // ------------------------------- // This event is generated when an advertisement packet or a scan response // is received from a responder case sl_bt_evt_scanner_legacy_advertisement_report_id: memset(&event, 0, sizeof(event)); event.type = BLE_GAP_EVENT_DISC; event.disc.event_type = convert_to_nimble_adv_type(evt->data.evt_scanner_legacy_advertisement_report.event_flags); event.disc.length_data = evt->data.evt_scanner_legacy_advertisement_report.data.len; event.disc.data = evt->data.evt_scanner_legacy_advertisement_report.data.data; event.disc.addr.type = evt->data.evt_scanner_legacy_advertisement_report.address_type; memcpy(event.disc.addr.val, evt->data.evt_scanner_legacy_advertisement_report.address.addr, 6); event.disc.rssi = evt->data.evt_scanner_legacy_advertisement_report.rssi; notify_ble_event_to_listeners(&event); break; // ------------------------------- // This event indicates that a new connection was opened. case sl_bt_evt_connection_opened_id: event.type = BLE_GAP_EVENT_CONNECT; event.connect.conn_handle = evt->data.evt_connection_opened.connection; app_log_info("BLE connected, conn_id:%d\n", event.connect.conn_handle); notify_ble_event_to_listeners(&event); break; // ------------------------------- // This event indicates that a connection was closed. case sl_bt_evt_connection_closed_id: event.type = BLE_GAP_EVENT_DISCONNECT; event.disconnect.conn.conn_handle = evt->data.evt_connection_closed.connection; event.disconnect.reason = evt->data.evt_connection_closed.reason; app_log_info("BLE disconnected, conn_id:%d, reason:0x%02x\n", event.disconnect.conn.conn_handle, event.disconnect.reason); notify_ble_event_to_listeners(&event); break; case sl_bt_evt_gatt_mtu_exchanged_id: event.type = BLE_GAP_EVENT_MTU; event.mtu.conn_handle = evt->data.evt_gatt_mtu_exchanged.connection; event.mtu.value = evt->data.evt_gatt_mtu_exchanged.mtu; app_log_info("exchange mtu req: %d\n", event.mtu.value); notify_ble_event_to_listeners(&event); break; default: break; } }

2023-06-10 上传