Difference between revisions of "Internal Used/By-pass advloader"

From ESS-WIKI
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
= Modify and Build U-boot =
 
= Modify and Build U-boot =
  
== Yocto 1.5 ==
+
== Yocto 2.1 ==
  
 
You can download patch file as below:
 
You can download patch file as below:
  
[[:File:bypass_advloader_Yocto_1.5.patch]]
+
[[:File:Bypass_advloader_Yocto_2.1.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)
 
build u-boot (we take DDR 1G for example)
  
  make make mx6qrom5420_1G_config
+
  make mx6qrom5420b1_1G_defconfig
 
  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 ==
 
 
You can download patch file as below:
 
  
 
= Modify mfgtool =
 
= Modify mfgtool =
Line 75: Line 42:
 
   name = ADV bypass adv-loader
 
   name = ADV bypass adv-loader
  
At last , we can refer to [[Mfgtool]] to update spi.
+
At last , we can refer to [[Mfgtool|Mfgtool]] to update spi.

Latest revision as of 09:01, 31 August 2017

Modify and Build U-boot

Yocto 2.1

You can download patch file as below:

File:Bypass_advloader_Yocto_2.1.patch

build u-boot (we take DDR 1G for example)

make mx6qrom5420b1_1G_defconfig
make u-boot.imx -j4

Then you can put this file to mfgtool folder

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>

  • cfg.ini
 [LIST]
  name = ADV bypass adv-loader

At last , we can refer to Mfgtool to update spi.