mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-02 09:30:10 +00:00
b75d8dc564
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> |
||
---|---|---|
.. | ||
Kconfig | ||
MAINTAINERS | ||
Makefile | ||
mx6ul_14x14_evk.c | ||
README |
How to use U-Boot on Freescale MX6UL 14x14 EVK ----------------------------------------------- - Build U-Boot for MX6UL 14x14 EVK: $ make mrproper $ make mx6ul_14x14_evk_defconfig $ make This will generate the SPL image called SPL and the u-boot.img. 1. Booting via SDCard --------------------- - Flash the SPL image into the micro SD card: sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync - Flash the u-boot.img image into the micro SD card: sudo dd if=u-boot.img of=/dev/mmcblk0 bs=1k seek=69; sync - Jumper settings: SW601: 0 0 1 0 Sw602: 1 0 where 0 means bottom position and 1 means top position (from the switch label numbers reference). - Connect the USB cable between the EVK and the PC for the console. (The USB console connector is the one close the push buttons) - Insert the micro SD card in the board, power it up and U-Boot messages should come up. 2. Booting via Serial Download Protocol (SDP) --------------------------------------------- The mx6ulevk board can boot from USB OTG port using the SDP, target will enter in SDP mode in case an SD Card is not connect or boot switches are set as below: Sw602: 0 1 SW601: x x x x The following tools can be used to boot via SDP, for both tools you must connect an USB cable in USB OTG port. - Method 1: Universal Update Utility (uuu) The UUU binary can be downloaded in release tab from link below: https://github.com/NXPmicro/mfgtools The following script should be created to boot SPL + u-boot-dtb.img binaries: $ cat uuu_script uuu_version 1.1.4 SDP: boot -f SPL SDPU: write -f u-boot-dtb.img -addr 0x877fffc0 SDPU: jump -addr 0x877fffc0 SDPU: done Please note that the address above is calculated based on SYS_TEXT_BASE address: 0x877fffc0 = 0x87800000 (SYS_TEXT_BASE) - 0x40 (U-Boot proper Header size) Power on the target and run the following command from U-Boot root directory: $ sudo ./uuu uuu_script - Method 2: imx usb loader tool (imx_usb): The imx_usb_loader tool can be downloaded in link below: https://github.com/boundarydevices/imx_usb_loader Build the source code and run the following commands from U-Boot root directory: $ sudo ./imx_usb SPL $ sudo ./imx_usb u-boot-dtb.img