mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 00:21:06 +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 | ||
lpddr4_timing.h | ||
lpddr4_timing_1gb.c | ||
lpddr4_timing_2gb.c | ||
lpddr4_timing_3gb.c | ||
lpddr4_timing_4gb.c | ||
MAINTAINERS | ||
Makefile | ||
pico-imx8mq.c | ||
README | ||
spl.c |
U-Boot for the Technexion Pico i.MX8MQ Quick Start =========== - Build the TFA binary - Get DDR and HDMI firmware - Build U-Boot - Boot Get and Build the TFA blob ========================== Note: srctree is U-Boot source directory Get ATF from: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git branch: master $ CROSS_COMPILE=aarch64-linux-gnu- make PLAT=imx8mq bl31 $ cp build/imx8mq/release/bl31.bin $(builddir) Get the DDR and HDMI firmware ============================= $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.9.bin $ chmod +x firmware-imx-7.9.bin $ ./firmware-imx-7.9.bin # Or use this to avoid running random scripts from the internet, # but note that you must agree to the license the script displays: # $ dd if=firmware-imx-7.9.bin of=firmware-imx-7.9.tar.bz2 bs=38868 skip=1 # $ tar -xf firmware-imx-7.9.tar.bz2 $ cp firmware-imx-7.9/firmware/hdmi/cadence/signed_hdmi_imx8m.bin $(builddir) $ cp firmware-imx-7.9/firmware/ddr/synopsys/lpddr4*.bin $(builddir) Build U-Boot ============ $ export CROSS_COMPILE=aarch64-poky-linux- $ make pico-imx8mq_defconfig $ make flash.bin Burn the flash.bin to MicroSD card offset 33KB $ dd if=flash.bin of=/dev/mmcblkX bs=1024 seek=33 Or into eMMC from a running system $ dhcp flash.bin && mmc write $loadaddr 0x42 0x800 Boot ==== "o" denotes a pin "[]" denotes two pins bridged by a jumper eMMC boot: J1 o[] []o J2 []o o[] USB upload via USB-C connector: J1 ooo ooo J2 o[] []o