File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,11 +33,16 @@ FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; e
3333
3434# Check Image if include flexspi header
3535FB: ucmd if qspihdr dump ${fastboot_buffer}; then setenv qspihdr_exist yes; else setenv qspihdr_exist no; fi;
36+ # Check Image size if larger than 16M, then use uboot command to write image
37+ FB: ucmd if itest ${fastboot_buffer} -gt 1000000; then setenv qspihdr_large yes; else setenv qspihdr_large no; fi;
3638
37- FB[-t 60000]: ucmd if test ${qspihdr_exist} = yes; then qspihdr init ${fastboot_buffer} ${fastboot_bytes} safe; else true; fi;
39+ FB[-t 60000]: ucmd if test ${qspihdr_exist} = yes -a ${qspihdr_large} = no ; then qspihdr init ${fastboot_buffer} ${fastboot_bytes} safe; else true; fi;
3840
3941#if uboot can't support qspihdr command, use uboot image to write qspi image, which require image include qspi flash header
4042FB: ucmd if test ${qspihdr_exist} = no; then sf probe; else true; fi;
4143FB[-t 40000]: ucmd if test ${qspihdr_exist} = no; then sf erase 0 +${fastboot_bytes}; else true; fi;
4244FB[-t 20000]: ucmd if test ${qspihdr_exist} = no; then sf write ${fastboot_buffer} 0 ${fastboot_bytes}; else true; fi;
45+ # if Image is larger than 16M, use uboot command to write image
46+ FB: ucmd if test ${qspihdr_large} = yes; then sf probe; else true; fi;
47+ FB: write -f _image -format "sf erase @off +@size; sf write ${fastboot_buffer} @off @size" -blksz 1 -each 0x100000
4348FB: done
You can’t perform that action at this time.
0 commit comments