Apalis i.MX6 u-boot falcon mode

Hi.
I enabled falcon mode.
However, there is a problem with that and I ask a question.
The error message is shown below.

MMC: block number 0x1001 exceeds max(0x1000)
mmc_load_image_raw_sector: mmc block read error

I modified u-boot and updated the target after the build.

Apalis iMX6 # setenv serverip 192.168.0.30
Apalis iMX6 # setenv ipaddr 192.168.0.111
Apalis iMX6 # run setethupdate
Using FEC device
TFTP from server 192.168.0.30; our IP address is 192.168.0.111
Filename 'flash_eth.img'.
Load address: 0x12000000
Loading: ##################################################  3.9 KiB
         559.6 KiB/s
done
Bytes transferred = 4017 (fb1 hex)
## Executing script at 12000000
enter "run update" to update the entire module
Apalis iMX6 # run update_spl
Using FEC device
TFTP from server 192.168.0.30; our IP address is 192.168.0.111
Filename 'apalis_imx6/SPL'.
Load address: 0x12000000
Loading: ##################################################  59 KiB
         4.8 MiB/s
done
Bytes transferred = 60416 (ec00 hex)
switch to partitions #1, OK
mmc0(part 1) is current device

MMC write: dev # 0, block # 2, count 118 ... 118 blocks written: OK
Apalis iMX6 #
Apalis iMX6 # run update_uboot
Using FEC device
TFTP from server 192.168.0.30; our IP address is 192.168.0.111
Filename 'apalis_imx6/u-boot.img'.
Load address: 0x12000000
Loading: ##################################################  404.9 KiB
         6.1 MiB/s
done
Bytes transferred = 414580 (65374 hex)
switch to partitions #1, OK
mmc0(part 1) is current device

MMC write: dev # 0, block # 138, count 810 ... 810 blocks written: OK
Fuse 0, 5:     5072
Fast boot mode already fused, no need to fuse

And then I ran “reset” and “spl export” command.

Apalis iMX6 # setenv serverip 192.168.0.30
Apalis iMX6 # dhcp ${kernel_addr_r} uImage
BOOTP broadcast 1
DHCP client bound to address 192.168.0.156 (24 ms)
Using FEC device
TFTP from server 192.168.0.30; our IP address is 192.168.0.156
Filename 'uImage'.
Load address: 0x11000000
Loading: ##################################################  5 MiB
         6.3 MiB/s
done
Bytes transferred = 5207280 (4f74f0 hex)
Apalis iMX6 # dhcp ${fdt_addr_r} imx6q-apalis-eval.dtb
BOOTP broadcast 1
DHCP client bound to address 192.168.0.156 (23 ms)
Using FEC device
TFTP from server 192.168.0.30; our IP address is 192.168.0.156
Filename 'imx6q-apalis-eval.dtb'.
Load address: 0x12000000
Loading: ##################################################  49.2 KiB
         4 MiB/s
done
Bytes transferred = 50345 (c4a9 hex)
Apalis iMX6 # mmc dev 0
switch to partitions #0, OK
mmc0(part 0) is current device
Apalis iMX6 # mmc write ${kernel_addr_r} 0x1000 0x4000

MMC write: dev # 0, block # 4096, count 16384 ... 16384 blocks written: OK
Apalis iMX6 # setenv bootargs "console=enable_wait_mode=off vmalloc=400M ip=off root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait fec_mac=00:14:2d:4f:52:d5 consoleblank=0 no_console_suspend=1 console=tty1 console=ttymxc0,115200n8 mxc_hdmi.only_cea=1 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M"
Apalis iMX6 # spl export fdt ${kernel_addr_r} - ${fdt_addr_r}
## Booting kernel from Legacy Image at 11000000 ...
   Image Name:   Linux-4.1.44-2.7.4+gb1555bf
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5207216 Bytes = 5 MiB
   Load Address: 10008000
   Entry Point:  10008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 12000000
   Booting using the fdt blob at 0x12000000
   Loading Kernel Image ... OK
   Using Device Tree in place at 12000000, end 1200f4a8
subcommand not supported
subcommand not supported
   Using Device Tree in place at 12000000, end 120124a8
Argument image is now in RAM: 0x12000000
Apalis iMX6 # mmc write 12000000 0x800 0x800

MMC write: dev # 0, block # 2048, count 2048 ... 2048 blocks written: OK
Apalis iMX6 #

Please let me know if I made a mistake.
Or please let me know how to apply falcon mode.

Please let me know if there is any other applicable way to fast boot.

Thanks

Dear @LEEBAK,

Glad to see that you made quite some progress with Falcon Mode. However, I’m afraid we don’t have any experience in implementing this so we cannot further help you on the development and implementation of it…

There are quite some methods on achieving a faster boot without Falcon Mode, that involve stripping out kernel, device tree and the rest of the root file system of unneeded functions, as well as

Not sure what changes you exactly did but this is the info we can tell you so far that can help you in the development of this:

Our 2.8 reference image I believe uses this Uboot configuration (with an Uboot that uses SPL):
https://git.toradex.com/cgit/u-boot-toradex.git/tree/configs/apalis_imx6_defconfig?h=Apalis-iMX6_LXDE-Image_2.8b6.184-20190401

Also, this is the board file for the Apalis iMX6 in our latest stable commit, with no development to support Falcon Mode, as far as I know:

https://git.toradex.com/cgit/u-boot-toradex.git/tree/board/toradex/apalis_imx6/apalis_imx6.c?h=Apalis-iMX6_LXDE-Image_2.8b6.184-20190401

We could find some documentation about it that we hope it can help you to get this but I think you would have to implement the Falcon Mode for the used U-boot.

https://git.toradex.com/cgit/u-boot-toradex.git/tree/doc/README.falcon?h=2016.11-toradex
http://schedule2012.rmll.info/IMG/pdf/LSM2012_UbootFalconMode_Babic.pdf

And this is the patch file that implemented Falcon Mode in i.MX6Q Sabre:

https://gitlab.denx.de/u-boot/custodians/u-boot-imx/commit/d96796ca23b2ebcb7ce58c250e5a44152a652a45

Here is a video in how to add Falcon Mode to a given board:
https://www.youtube.com/watch?v=gTzkskAkd8w

I also found this:
https://www.youtube.com/watch?v=Zl-Ypk9S-dc with the following documentation for mx6qsabresd:
https://imxdev.gitlab.io/video/tutorial/Booting-iMX6-under-one-second/
https://imxdev.gitlab.io/tutorial/How_to_decrease_boot_time_on_iMX6

Looking forward to your progress!

Kind regards,
Alvaro.

Hi @LEEBAK

Is this possible to make this thread public?

Thanks and best regards,
Jaski