Internal Used/Enable Falcon Mode

From ESS-WIKI
Jump to: navigation, search
  • We need to replace SPL and u-boot
git clone https://github.com/ADVANTECH-Corp/uboot-imx6.git
cd uboot-imx6
git checkout QuickBoot

PS: Because we take fsl-image-qt5-imx6qrsb4411a1-20171121191640.rootfs.sdcard(2.92GB) as an example, so we need to modify u-boot to store kernel image and args .

./include/configs/mx6advantech_common.h

-#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR  0x400000   /* 2G */
+#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR  0x5D7FFF   /* 2.9G */
 #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS (CONFIG_CMD_SPL_WRITE_SIZE / 512)
 #if 0
 #define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR        0x1000  /* 2MB */
 #endif
-#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR        0x400800  /* 2G+1M */
+#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR        0x5D87FF  /* 2.9G+1M */


  • Then compile u-boot and SPL and replace both of them.
  • Use uImage intead of zImage, we need to re-compile kernel
make uImage LOADADDR=0x10008000 -j4
  • If we never setup falcon mode
    • Boot device to u-boot command line, and perform command as below:
setenv image uImage        
fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} ${bootargs}
mmc write ${loadaddr} 0x5D87FF 0x4000
spl export fdt ${loadaddr} - ${fdt_addr}
mmc write 18000000 0x5D7FFF 0x800
setenv boot_os 1 && saveenv && reset
  • If our image is already set, we only perform command as below:
setenv boot_os 1 && saveenv && reset 
  • Then we can skip u-boot to load kernel and args on mmc.
  • If we want to back to u-boot command line, we need to erase spi
 flash_erase /dev/mtd0 0xC0000 16