Difference between revisions of "Internal Used/By-pass advloader"
From ESS-WIKI
Line 36: | Line 36: | ||
− | build u-boot | + | build u-boot (we take DDR 1G for example) |
+ | |||
+ | make make mx6qrom5420_1G_config | ||
make u-boot.imx -j4 | make u-boot.imx -j4 | ||
+ | |||
Then you can put this file to mfgtool folder | Then you can put this file to mfgtool folder | ||
+ | |||
== Yocto 2.1 == | == Yocto 2.1 == | ||
+ | |||
+ | You can download patch file as below: | ||
= Modify mfgtool UCL2.xml = | = Modify mfgtool UCL2.xml = | ||
+ | |||
+ | We add a new task for burning u-boot.imx to spi | ||
+ | |||
+ | <LIST name="ADV bypass adv-loader" desc="update u-boot.imx to spi"> | ||
+ | <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot.imx" ifdev="MX6Q">Loading U-boot</CMD> | ||
+ | <CMD state="BootStrap" type="load" file="firmware/uImage" address="0x12000000" | ||
+ | loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading Kernel.</CMD> | ||
+ | <CMD state="BootStrap" type="load" file="firmware/initramfs.cpio.gz.uboot" address="0x12C00000" | ||
+ | loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading Initramfs.</CMD> | ||
+ | <CMD state="BootStrap" type="load" file="firmware/imx6q-%board%.dtb" address="0x18000000" | ||
+ | loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading device tree.</CMD> | ||
+ | <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD> | ||
+ | <!-- burn u-boot.imx to spi --> | ||
+ | <CMD state="Updater" type="push" body="$ flash_erase /dev/mtd0 0 192">Erasing SPI</CMD> | ||
+ | <CMD state="Updater" type="push" body="send" file="files/u-boot.imx" ifdev="MX6Q">Sending u-boot.imx</CMD> | ||
+ | <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=512 seek=2">write u-boot.imx</CMD> | ||
+ | <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD> | ||
+ | </LIST> |
Revision as of 09:24, 22 August 2017
Modify and Build U-boot
Yocto 1.5
You can download patch file as below:
File:bypass_advloader_Yocto_1.5.patch
u-boot-imx/arch/arm/lib/board.c
Index: arch/arm/lib/board.c =================================================================== --- arch/arm/lib/board.c (revision 2241) +++ arch/arm/lib/board.c (working copy) @@ -411,7 +411,6 @@ switch(dev) { case 1: - default: /* booting from SD*/ printf("booting from SD\n"); setenv("mmcdev", "0"); @@ -448,6 +447,11 @@ if(emmc_exist) setenv("mmcdev", "1"); break; #endif + default: + printf("Default boot device\n"); + printf("booting from SD\n"); + setenv("mmcdev", "1"); + break; } /*record ddr bit, 32 or 64 bit*/
build u-boot (we take DDR 1G for example)
make make mx6qrom5420_1G_config make u-boot.imx -j4
Then you can put this file to mfgtool folder
Yocto 2.1
You can download patch file as below:
Modify mfgtool UCL2.xml
We add a new task for burning u-boot.imx to spi
<LIST name="ADV bypass adv-loader" desc="update u-boot.imx to spi"> <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot.imx" ifdev="MX6Q">Loading U-boot</CMD> <CMD state="BootStrap" type="load" file="firmware/uImage" address="0x12000000" loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading Kernel.</CMD> <CMD state="BootStrap" type="load" file="firmware/initramfs.cpio.gz.uboot" address="0x12C00000" loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading Initramfs.</CMD> <CMD state="BootStrap" type="load" file="firmware/imx6q-%board%.dtb" address="0x18000000" loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading device tree.</CMD> <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD> <CMD state="Updater" type="push" body="$ flash_erase /dev/mtd0 0 192">Erasing SPI</CMD> <CMD state="Updater" type="push" body="send" file="files/u-boot.imx" ifdev="MX6Q">Sending u-boot.imx</CMD> <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=512 seek=2">write u-boot.imx</CMD> <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD> </LIST>