| blkloadfdt=fatload ${device} ${devnum}:${partnum} ${fdt_addr} ${load_fdt_file} |
| blkloadimage=fatload ${device} ${devnum}:${partnum} ${loadaddr} ${load_image} |
| boot_devices=usb mmc ubi |
| bootargs_base=vt.global_cursor_default=0 consoleblank=0 cma=200M fbcon=rotate:1 |
| bootdelay=3 |
| bootdir= |
| console=ttymxc1,115200 |
| ethact=FEC0 |
| fdt_addr=0x18000000 |
| fdt_file_legacy=imx6dl_sielaff.dtb |
| fdt_file=imx6dl-sielaff.dtb |
| fdt_high=0xffffffff |
| image_legacy=zImage |
| image=fitImage |
| initrd_high=0xffffffff |
| ip_dyn=no |
| loadaddr=0x12000000 |
| mmcargs=setenv bootargs ${bootargs_base} console=${console} root=${mmcroot} |
| mmcroot=/dev/mmcblk2p2 rootwait rw |
| ramdisk_addr=0x18C00000 |
| script=boot.scr |
| touch_rst_gpio=2 |
| touch_irq_gpio=146 |
| ubiargs=setenv bootargs ${bootargs_base} console=${console} rootfstype=ubifs ubi.mtd=0 root=ubi0_0 rw |
| ubiloadfdt=ubifsload ${fdt_addr} /boot/${load_fdt_file} |
| ubiloadimage=ubifsload ${loadaddr} /boot/${load_image} |
| usb_pgood_delay=2000 |
| usbargs=setenv bootargs ${bootargs_base} console=${console} root=${usbroot} |
| usbroot=/dev/sda2 rootwait rw |
| |
| bootcmd= |
| for b in ${boot_devices}; do |
| if test ${b} = mmc; then |
| run mmcboot; |
| fi; |
| if test ${b} = net; then |
| run netboot; |
| fi; |
| if test ${b} = ubi; then |
| run ubiboot; |
| fi; |
| if test ${b} = usb; then |
| run usbboot; |
| fi; |
| done; |
| |
| boot= |
| load_image=${image}; |
| run loadimagecmd; |
| if test $? = 0; then |
| imxtract ${loadaddr} fdt-${fdt_file} ${fdt_addr}; |
| run detect_touch; |
| bootm ${loadaddr} - ${fdt_addr}; |
| else |
| load_image=${image_legacy}; |
| load_fdt_file=${fdt_file_legacy}; |
| run loadimagecmd; |
| run loadfdtcmd; |
| if test $? = 0; then |
| run detect_touch; |
| bootz ${loadaddr} - ${fdt_addr}; |
| fi; |
| fi; |
| |
| detect_touch= |
| gpio clear ${touch_irq_gpio}; |
| gpio clear ${touch_rst_gpio}; |
| sleep 0.02; |
| gpio set ${touch_rst_gpio}; |
| sleep 0.1; |
| gpio input ${touch_irq_gpio}; |
| i2c dev 2; |
| fdt addr ${fdt_addr}; |
| if i2c probe 0x55; then |
| echo 'Detected Sitronix Touch'; |
| fdt set /soc/bus@2100000/i2c@21a8000/touchscreen@55 status okay; |
| else |
| if i2c probe 0x5d; then |
| echo 'Detected Goodix Touch'; |
| fdt set /soc/bus@2100000/i2c@21a8000/touchscreen@5d status okay; |
| fi; |
| fi; |
| gpio clear ${touch_rst_gpio}; |
| |
| mmcboot= |
| echo Booting from MMC ...; |
| run mmcargs; |
| device=mmc; |
| devnum=2; |
| partnum=1; |
| setenv loadimagecmd ${blkloadimage}; |
| setenv loadfdtcmd ${blkloadfdt}; |
| run boot; |
| |
| ubiboot= |
| echo Booting from NAND (UBI); |
| run ubiargs; |
| ubi part rootfs; |
| ubifsmount ubi0; |
| setenv loadimagecmd ${ubiloadimage}; |
| setenv loadfdtcmd ${ubiloadfdt}; |
| load_image=${image}; |
| run boot; |
| |
| usbboot= |
| echo Booting from USB Storage ...; |
| run usbargs; |
| usb start; |
| device=usb; |
| devnum=0; |
| partnum=1; |
| setenv loadimagecmd ${blkloadimage}; |
| setenv loadfdtcmd ${blkloadfdt}; |
| run boot; |