--- /dev/null
+#include <env/nvidia/prod_upd.env>
+
+button_cmd_0_name=Volume Down
+button_cmd_0=bootmenu
+button_cmd_1_name=Lid
+button_cmd_1=poweroff
+partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}
+
+bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu
+bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu
+bootmenu_2=update bootloader=run flash_uboot
+bootmenu_3=reboot RCM=enterrcm
+bootmenu_4=reboot=reset
+bootmenu_5=power off=poweroff
+bootmenu_delay=-1
--- /dev/null
+#include <env/nvidia/prod_upd.env>
+
+button_cmd_0_name=Volume Down
+button_cmd_0=bootmenu
+button_cmd_1_name=Lid sensor
+button_cmd_1=poweroff
+partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}
+boot_dev=1
+
+bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu
+bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu
+bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu
+bootmenu_3=update bootloader=run flash_uboot
+bootmenu_4=reboot RCM=enterrcm
+bootmenu_5=reboot=reset
+bootmenu_6=power off=poweroff
+bootmenu_delay=-1
+CONFIG_ENV_SOURCE_FILE="tf600t"
CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-tf600t"
CONFIG_BOOTCOMMAND="setenv gpio_button 222; if run check_button; then poweroff; fi; setenv gpio_button 132; if run check_button; then echo Starting SPI flash update ...; run update_spi; fi; run bootcmd_usb0; run bootcmd_mmc1; run bootcmd_mmc0; poweroff;"
# CONFIG_I2C_MUX is not set
--- /dev/null
+#include <env/nvidia/prod_upd.env>
+
+button_cmd_0_name=Volume Down
+button_cmd_0=bootmenu
+button_cmd_1_name=Lid sensor
+button_cmd_1=poweroff
+partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}
+
+bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu
+bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu
+bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu
+bootmenu_3=update bootloader=run update_spi
+bootmenu_4=reboot RCM=enterrcm
+bootmenu_5=reboot=reset
+bootmenu_6=power off=poweroff
+bootmenu_delay=-1
--- /dev/null
+#include <env/nvidia/prod_upd.env>
+
+button_cmd_0_name=Volume Down
+button_cmd_0=bootmenu
+button_cmd_1_name=Lid sensor
+button_cmd_1=poweroff
+partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}
+boot_dev=1
+
+bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu
+bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu
+bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu
+bootmenu_3=update bootloader=run flash_uboot
+bootmenu_4=reboot RCM=enterrcm
+bootmenu_5=reboot=reset
+bootmenu_6=power off=poweroff
+bootmenu_delay=-1
--- /dev/null
+#include <env/nvidia/prod_upd.env>
+
+button_cmd_0_name=Volume Down
+button_cmd_0=bootmenu
+partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}
+
+bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu
+bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu
+bootmenu_2=update bootloader=run flash_uboot
+bootmenu_3=reboot RCM=enterrcm
+bootmenu_4=reboot=reset
+bootmenu_5=power off=poweroff
+bootmenu_delay=-1
--- /dev/null
+#include <env/nvidia/prod_upd.env>
+
+button_cmd_0_name=Volume Down
+button_cmd_0=bootmenu
+button_cmd_1_name=Lid sensor
+button_cmd_1=poweroff
+partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}
+
+bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu
+bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu
+bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu
+bootmenu_3=update bootloader=run update_spi
+bootmenu_4=reboot RCM=enterrcm
+bootmenu_5=reboot=reset
+bootmenu_6=power off=poweroff
+bootmenu_delay=-1
+CONFIG_ENV_SOURCE_FILE="p880"
CONFIG_DEFAULT_DEVICE_TREE="tegra30-lg-p880"
CONFIG_SYS_PROMPT="Tegra30 (P880) # "
CONFIG_VIDEO_LCD_RENESAS_R69328=y
+CONFIG_ENV_SOURCE_FILE="p895"
CONFIG_DEFAULT_DEVICE_TREE="tegra30-lg-p895"
CONFIG_SYS_PROMPT="Tegra30 (P895) # "
CONFIG_VIDEO_LCD_RENESAS_R61307=y
--- /dev/null
+#include <env/nvidia/prod_upd.env>
+
+button_cmd_0_name=Volume Down
+button_cmd_0=bootmenu
+partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}
+boot_dev=1
+
+bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu
+bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu
+bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu
+bootmenu_3=update bootloader=run flash_uboot
+bootmenu_4=reboot RCM=enterrcm
+bootmenu_5=reboot=reset
+bootmenu_6=power off=poweroff
+bootmenu_delay=-1
--- /dev/null
+#include <env/nvidia/prod_upd.env>
+
+button_cmd_0_name=Volume Down
+button_cmd_0=bootmenu
+partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}
+
+bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu
+bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu
+bootmenu_2=update bootloader=run flash_uboot
+bootmenu_3=reboot RCM=enterrcm
+bootmenu_4=reboot=reset
+bootmenu_5=power off=poweroff
+bootmenu_delay=-1
--- /dev/null
+button_cmd_0_name=Volume Down
+button_cmd_0=bootmenu
+button_cmd_1_name=Hall Sensor
+button_cmd_1=poweroff
+partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}
+
+bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu
+bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu
+bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu
+bootmenu_3=boot from USB=usb reset; usb start; bootflow scan
+bootmenu_4=reboot RCM=enterrcm
+bootmenu_5=reboot=reset
+bootmenu_6=power off=poweroff
+bootmenu_delay=-1
--- /dev/null
+board_name=cardhu-a04
+fdtfile=tegra30-cardhu-a04.dtb
--- /dev/null
+calculated_vars=kernel_addr_r fdt_addr_r scriptaddr pxefile_addr_r ramdisk_addr_r
+
+kernel_addr_r_align=00200000
+kernel_addr_r_offset=00080000
+kernel_addr_r_size=02000000
+kernel_addr_r_aliases=loadaddr
+
+fdt_addr_r_align=00200000
+fdt_addr_r_offset=00000000
+fdt_addr_r_size=00200000
+
+scriptaddr_align=00200000
+scriptaddr_offset=00000000
+scriptaddr_size=00200000
+
+pxefile_addr_r_align=00200000
+pxefile_addr_r_offset=00000000
+pxefile_addr_r_size=00200000
+
+ramdisk_addr_r_align=00200000
+ramdisk_addr_r_offset=00000000
+ramdisk_addr_r_size=02000000
--- /dev/null
+/* Only MMC/PXE/DHCP for now, add USB back in later when supported */
+boot_targets=mmc1 mmc0 pxe dhcp
+
+preboot=if test -e mmc 1:1 /u-boot-preboot.scr; then
+ load mmc 1:1 ${scriptaddr} /u-boot-preboot.scr;
+ source ${scriptaddr};
+ fi
--- /dev/null
+/*
+ * Custom Boot configuration:
+ * 1. 8bit SD port (MMC1)
+ * 2. 4bit SD port (MMC2)
+ * 3. eMMC (MMC0)
+ */
+boot_targets=mmc1 mmc2 mmc0 usb pxe dhcp
+
+boot_file=zImage
+boot_script_dhcp=boot.scr
+console=ttyS0
+defargs=lp0_vec=2064@0xf46ff000 core_edp_mv=1150 core_edp_ma=4000
+ usb_port_owner_info=2 lane_owner_info=6 emc_max_dvfs=0
+ user_debug=30 pcie_aspm=off
+dfu_alt_info=apalis-tk1.img raw 0x0 0x500 mmcpart 1;
+ boot part 0 1 mmcpart 0;
+ rootfs part 0 2 mmcpart 0;
+ zImage fat 0 1 mmcpart 0;
+ tegra124-apalis-eval.dtb fat 0 1 mmcpart 0
+fdt_board=eval
+fdt_fixup=;
+fdt_module=apalis-v1.2
+uboot_hwpart=1
+uboot_blk=0
+set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff &&
+ setexpr blkcnt ${blkcnt} / 0x200
+update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} &&
+ mmc write ${loadaddr} ${uboot_blk} ${blkcnt}
+setethupdate=if env exists ethaddr; then; else setenv ethaddr
+ 00:14:2d:00:00:00; fi; pci enum && tftpboot ${loadaddr}
+ flash_eth.img && source ${loadaddr}
+setsdupdate=setenv interface mmc; setenv drive 1; mmc rescan;
+ load ${interface} ${drive}:1 ${loadaddr} flash_blk.img
+ || setenv drive 2; mmc rescan; load ${interface} ${drive}:1
+ ${loadaddr} flash_blk.img &&
+ source ${loadaddr}
+setup=setenv setupargs igb_mac=${ethaddr}
+ consoleblank=0 no_console_suspend=1 console=tty1
+ console=${console},${baudrate}n8 debug_uartport=lsport,0
+ ${memargs}
+setupdate=run setsdupdate || run setusbupdate || run setethupdate
+setusbupdate=usb start && setenv interface usb; setenv drive 0;
+ load ${interface} ${drive}:1 ${loadaddr} flash_blk.img &&
+ source ${loadaddr}
+vidargs=fbcon=map:1
--- /dev/null
+uboot_hwpart=1
+uboot_blk=0
+
+set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff &&
+ setexpr blkcnt ${blkcnt} / 0x200
+update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} &&
+ mmc write ${loadaddr} ${uboot_blk} ${blkcnt}
+
+boot_script_dhcp=boot.scr
--- /dev/null
+/* Environment in NAND, 64K is a bit excessive but erase block is 512K anyway */
+boot_script_dhcp=boot.scr
+update_uboot=nand erase.part u-boot && nand write ${loadaddr} u-boot ${filesize}
--- /dev/null
+uboot_hwpart=1
+uboot_blk=0
+
+set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff &&
+ setexpr blkcnt ${blkcnt} / 0x200
+update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} &&
+ mmc write ${loadaddr} ${uboot_blk} ${blkcnt}
+
+boot_script_dhcp=boot.scr
--- /dev/null
+#include <env/nvidia/prod_upd.env>
+
+button_cmd_0_name=Volume Down
+button_cmd_0=bootmenu
+partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}
+boot_dev=1
+
+bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu
+bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu
+bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu
+bootmenu_3=update bootloader=run flash_uboot
+bootmenu_4=reboot RCM=enterrcm
+bootmenu_5=reboot=reset
+bootmenu_6=power off=poweroff
+bootmenu_delay=-1
CONFIG_TEXT_BASE=0x80110000
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="apalis-tk1"
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFDE00
CONFIG_DEFAULT_DEVICE_TREE="tegra124-apalis"
CONFIG_FIT_VERBOSE=y
CONFIG_BOOTDELAY=1
CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="setenv fdtfile ${soc}-${fdt_module}-${fdt_board}.dtb && run distro_bootcmd"
+CONFIG_BOOTCOMMAND="setenv fdtfile ${soc}-${fdt_module}-${fdt_board}.dtb && bootflow scan"
CONFIG_SYS_CBSIZE=1024
CONFIG_SYS_PBSIZE=1054
CONFIG_CONSOLE_MUX=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="apalis_t30"
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFDE00
CONFIG_DEFAULT_DEVICE_TREE="tegra30-apalis"
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="cardhu"
CONFIG_SF_DEFAULT_SPEED=24000000
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFE000
CONFIG_TEXT_BASE=0x00110000
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="colibri_t20"
CONFIG_ENV_SIZE=0x10000
CONFIG_ENV_OFFSET=0x200000
CONFIG_DEFAULT_DEVICE_TREE="tegra20-colibri"
CONFIG_TEXT_BASE=0x80110000
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="colibri_t30"
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFDE00
CONFIG_DEFAULT_DEVICE_TREE="tegra30-colibri"
CONFIG_INITRD_TAG=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="endeavoru"
CONFIG_ENV_SIZE=0x3000
CONFIG_ENV_OFFSET=0xFFFFD000
CONFIG_DEFAULT_DEVICE_TREE="tegra30-htc-endeavoru"
CONFIG_INITRD_TAG=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="grouper"
CONFIG_ENV_SIZE=0x3000
CONFIG_ENV_OFFSET=0xFFFFD000
CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-nexus7-grouper-E1565"
CONFIG_INITRD_TAG=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="ideapad-yoga-11"
CONFIG_ENV_SIZE=0x3000
CONFIG_ENV_OFFSET=0xFFFFD000
CONFIG_DEFAULT_DEVICE_TREE="tegra30-lenovo-ideapad-yoga-11"
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80080000
CONFIG_NR_DRAM_BANKS=1026
+CONFIG_ENV_SOURCE_FILE="p2771-0000"
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFE000
CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000-000"
CONFIG_TEXT_BASE=0x80080000
CONFIG_SYS_MALLOC_LEN=0x2500000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="p3450-0000"
CONFIG_SF_DEFAULT_SPEED=24000000
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFE000
CONFIG_INITRD_TAG=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="qc750"
CONFIG_ENV_SIZE=0x3000
CONFIG_ENV_OFFSET=0xFFFFD000
CONFIG_DEFAULT_DEVICE_TREE="tegra30-wexler-qc750"
CONFIG_INITRD_TAG=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="surface-rt"
CONFIG_ENV_SIZE=0x3000
CONFIG_ENV_OFFSET=0xFFFFD000
CONFIG_DEFAULT_DEVICE_TREE="tegra30-microsoft-surface-rt"
CONFIG_INITRD_TAG=y
CONFIG_TEXT_BASE=0x00110000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="transformer-t20"
CONFIG_ENV_SIZE=0x3000
CONFIG_ENV_OFFSET=0xFFFFD000
CONFIG_DEFAULT_DEVICE_TREE="tegra20-asus-tf101"
CONFIG_INITRD_TAG=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="transformer-t30"
CONFIG_ENV_SIZE=0x3000
CONFIG_ENV_OFFSET=0xFFFFD000
CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-tf201"
#define FDT_MODULE "apalis-v1.2"
#define FDT_MODULE_V1_0 "apalis"
-/*
- * Custom Distro Boot configuration:
- * 1. 8bit SD port (MMC1)
- * 2. 4bit SD port (MMC2)
- * 3. eMMC (MMC0)
- */
-#define BOOT_TARGET_DEVICES(func) \
- func(MMC, mmc, 1) \
- func(MMC, mmc, 2) \
- func(MMC, mmc, 0) \
- func(USB, usb, 0) \
- func(PXE, pxe, na) \
- func(DHCP, dhcp, na)
-
-#define DFU_ALT_EMMC_INFO "apalis-tk1.img raw 0x0 0x500 mmcpart 1; " \
- "boot part 0 1 mmcpart 0; " \
- "rootfs part 0 2 mmcpart 0; " \
- "zImage fat 0 1 mmcpart 0; " \
- "tegra124-apalis-eval.dtb fat 0 1 mmcpart 0"
-
-#define UBOOT_UPDATE \
- "uboot_hwpart=1\0" \
- "uboot_blk=0\0" \
- "set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && " \
- "setexpr blkcnt ${blkcnt} / 0x200\0" \
- "update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && " \
- "mmc write ${loadaddr} ${uboot_blk} ${blkcnt}\0" \
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_file=zImage\0" \
- "boot_script_dhcp=boot.scr\0" \
- "console=ttyS0\0" \
- "defargs=lp0_vec=2064@0xf46ff000 core_edp_mv=1150 core_edp_ma=4000 " \
- "usb_port_owner_info=2 lane_owner_info=6 emc_max_dvfs=0 " \
- "user_debug=30 pcie_aspm=off\0" \
- "dfu_alt_info=" DFU_ALT_EMMC_INFO "\0" \
- "fdt_board=eval\0" \
- "fdt_fixup=;\0" \
- "fdt_module=" FDT_MODULE "\0" \
- UBOOT_UPDATE \
- "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \
- "00:14:2d:00:00:00; fi; pci enum && tftpboot ${loadaddr} " \
- "flash_eth.img && source ${loadaddr}\0" \
- "setsdupdate=setenv interface mmc; setenv drive 1; mmc rescan; " \
- "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img " \
- "|| setenv drive 2; mmc rescan; load ${interface} ${drive}:1 " \
- "${loadaddr} flash_blk.img && " \
- "source ${loadaddr}\0" \
- "setup=setenv setupargs igb_mac=${ethaddr} " \
- "consoleblank=0 no_console_suspend=1 console=tty1 " \
- "console=${console},${baudrate}n8 debug_uartport=lsport,0 " \
- "${memargs}\0" \
- "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \
- "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \
- "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \
- "source ${loadaddr}\0" \
- "vidargs=fbcon=map:1\0"
-
#include "tegra-common-post.h"
#endif /* __CONFIG_H */
*/
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
-#define UBOOT_UPDATE \
- "uboot_hwpart=1\0" \
- "uboot_blk=0\0" \
- "set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && " \
- "setexpr blkcnt ${blkcnt} / 0x200\0" \
- "update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && " \
- "mmc write ${loadaddr} ${uboot_blk} ${blkcnt}\0" \
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- UBOOT_UPDATE \
- "boot_script_dhcp=boot.scr\0"
-
#include "tegra-common-post.h"
#endif /* __CONFIG_H */
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "NVIDIA Cardhu"
-#define BOARD_EXTRA_ENV_SETTINGS \
- "board_name=cardhu-a04\0" \
- "fdtfile=tegra30-cardhu-a04.dtb\0"
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
-/* NAND support */
-
-#define UBOOT_UPDATE \
- "update_uboot=nand erase.part u-boot && " \
- "nand write ${loadaddr} u-boot ${filesize}\0" \
-
-/* Environment in NAND, 64K is a bit excessive but erase block is 512K anyway */
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_script_dhcp=boot.scr\0" \
- UBOOT_UPDATE
-
#include "tegra-common-post.h"
#endif /* __CONFIG_H */
*/
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
-#define UBOOT_UPDATE \
- "uboot_hwpart=1\0" \
- "uboot_blk=0\0" \
- "set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && " \
- "setexpr blkcnt ${blkcnt} / 0x200\0" \
- "update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && " \
- "mmc write ${loadaddr} ${uboot_blk} ${blkcnt}\0" \
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- UBOOT_UPDATE \
- "boot_script_dhcp=boot.scr\0"
-
#include "tegra-common-post.h"
#endif /* __CONFIG_H */
#ifndef __CONFIG_H
#define __CONFIG_H
-#include <linux/sizes.h>
-
#include "tegra30-common.h"
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "HTC One X"
-#define ENDEAVORU_FLASH_UBOOT \
- "flash_uboot=echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "mmc dev 0 1;" \
- "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
- "echo Reading bootloader;" \
- "if load mmc 0:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 0:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader to eMMC;" \
- "mmc dev 0 1;" \
- "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
- "mmc dev 0 2;" \
- "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
- "echo Bootloader written successfully;" \
- "pause 'Press ANY key to reboot device...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
-
-#define ENDEAVORU_BOOTMENU \
- ENDEAVORU_FLASH_UBOOT \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_2=update bootloader=run flash_uboot\0" \
- "bootmenu_3=reboot RCM=enterrcm\0" \
- "bootmenu_4=reboot=reset\0" \
- "bootmenu_5=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- ENDEAVORU_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
#ifndef __CONFIG_H
#define __CONFIG_H
-#include <linux/sizes.h>
-
#include "tegra30-common.h"
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "ASUS Google Nexus 7 (2012)"
-#define GROUPER_FLASH_UBOOT \
- "flash_uboot=echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "mmc dev 0 1;" \
- "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
- "echo Reading bootloader;" \
- "if load mmc 0:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 0:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader to eMMC;" \
- "mmc dev 0 1;" \
- "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
- "mmc dev 0 2;" \
- "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
- "echo Bootloader written successfully;" \
- "pause 'Press ANY key to reboot device...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
-
-#define GROUPER_BOOTMENU \
- GROUPER_FLASH_UBOOT \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_2=update bootloader=run flash_uboot\0" \
- "bootmenu_3=reboot RCM=enterrcm\0" \
- "bootmenu_4=reboot=reset\0" \
- "bootmenu_5=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "button_cmd_1_name=Lid\0" \
- "button_cmd_1=poweroff\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- GROUPER_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "Lenovo Ideapad Yoga 11"
-#define IDEAPAD_FLASH_UBOOT \
- "flash_uboot=sf probe 0:1;" \
- "echo Dumping current SPI flash content ...;" \
- "sf read ${kernel_addr_r} 0x0 ${spi_size};" \
- "if fatwrite mmc 1:1 ${kernel_addr_r} spi-flash-backup.bin ${spi_size};" \
- "then echo SPI flash content was successfully written into spi-flash-backup.bin;" \
- "echo Reading SPI flash binary;" \
- "if load mmc 1:1 ${kernel_addr_r} repart-block.bin;" \
- "then echo Writing bootloader into SPI flash;" \
- "sf probe 0:1;" \
- "sf update ${kernel_addr_r} 0x0 ${spi_size};" \
- "echo Bootloader SUCCESSFULLY written into SPI flash;" \
- "pause 'Press ANY key to reboot...'; reset;" \
- "else echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "sf read ${kernel_addr_r} 0x0 ${boot_block_size_r};" \
- "echo Reading bootloader;" \
- "if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 1:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader into SPI flash;" \
- "sf probe 0:1;" \
- "sf update ${kernel_addr_r} 0x0 ${boot_block_size_r};" \
- "sf update ${ramdisk_addr_r} ${boot_block_size_r} ${boot_block_size_r};" \
- "echo Bootloader written SUCCESSFULLY;" \
- "pause 'Press ANY key to reboot...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to reboot...'; reset; fi;" \
- "fi;" \
- "else echo SPI flash backup FAILED! Aborting ...;" \
- "pause 'Press ANY key to reboot...'; reset; fi\0"
-
-#define IDEAPAD_BOOTMENU \
- IDEAPAD_FLASH_UBOOT \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
- "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_3=update bootloader=run flash_uboot\0" \
- "bootmenu_4=reboot RCM=enterrcm\0" \
- "bootmenu_5=reboot=reset\0" \
- "bootmenu_6=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "spi_size=0x400000\0" \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "button_cmd_1_name=Lid sensor\0" \
- "button_cmd_1=poweroff\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- IDEAPAD_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define BOARD_EXTRA_ENV_SETTINGS \
- "calculated_vars=kernel_addr_r fdt_addr_r scriptaddr pxefile_addr_r " \
- "ramdisk_addr_r\0" \
- "kernel_addr_r_align=00200000\0" \
- "kernel_addr_r_offset=00080000\0" \
- "kernel_addr_r_size=02000000\0" \
- "kernel_addr_r_aliases=loadaddr\0" \
- "fdt_addr_r_align=00200000\0" \
- "fdt_addr_r_offset=00000000\0" \
- "fdt_addr_r_size=00200000\0" \
- "scriptaddr_align=00200000\0" \
- "scriptaddr_offset=00000000\0" \
- "scriptaddr_size=00200000\0" \
- "pxefile_addr_r_align=00200000\0" \
- "pxefile_addr_r_offset=00000000\0" \
- "pxefile_addr_r_size=00200000\0" \
- "ramdisk_addr_r_align=00200000\0" \
- "ramdisk_addr_r_offset=00000000\0" \
- "ramdisk_addr_r_size=02000000\0"
-
#include "tegra-common-post.h"
#endif
/* Board-specific serial config */
-/* Only MMC/PXE/DHCP for now, add USB back in later when supported */
-#define BOOT_TARGET_DEVICES(func) \
- func(MMC, mmc, 1) \
- func(MMC, mmc, 0) \
- func(PXE, pxe, na) \
- func(DHCP, dhcp, na)
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "preboot=if test -e mmc 1:1 /u-boot-preboot.scr; then " \
- "load mmc 1:1 ${scriptaddr} /u-boot-preboot.scr; " \
- "source ${scriptaddr}; " \
- "fi\0"
-
/* General networking support */
#include "tegra-common-post.h"
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "Wexler QC750"
-#define QC750_FLASH_UBOOT \
- "flash_uboot=echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "mmc dev 0 1;" \
- "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
- "echo Reading bootloader;" \
- "if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 1:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader to eMMC;" \
- "mmc dev 0 1;" \
- "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
- "mmc dev 0 2;" \
- "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
- "echo Bootloader written successfully;" \
- "pause 'Press ANY key to reboot device...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
-
-#define QC750_BOOTMENU \
- QC750_FLASH_UBOOT \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
- "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_3=update bootloader=run flash_uboot\0" \
- "bootmenu_4=reboot RCM=enterrcm\0" \
- "bootmenu_5=reboot=reset\0" \
- "bootmenu_6=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- QC750_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "Microsoft Surface RT"
-#define SURFACE_RT_BOOTMENU \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
- "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_3=boot from USB=usb reset; usb start; bootflow scan\0" \
- "bootmenu_4=reboot RCM=enterrcm\0" \
- "bootmenu_5=reboot=reset\0" \
- "bootmenu_6=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "button_cmd_1_name=Hall Sensor\0" \
- "button_cmd_1=poweroff\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- SURFACE_RT_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (c) 2022, Svyatoslav Ryhel <clamor95@gmail.com>.
- */
-
-#ifndef __TRANSFORMER_COMMON_H
-#define __TRANSFORMER_COMMON_H
-
-/* High-level configuration options */
-#define CFG_TEGRA_BOARD_STRING "ASUS Transformer"
-
-#define TRANSFORMER_FLASH_UBOOT \
- "flash_uboot=echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "mmc dev 0 1;" \
- "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
- "echo Reading bootloader;" \
- "if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 1:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader to eMMC;" \
- "mmc dev 0 1;" \
- "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
- "mmc dev 0 2;" \
- "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
- "echo Bootloader written successfully;" \
- "pause 'Press ANY key to reboot device...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
-
-#define TRANSFORMER_FLASH_SPI \
- "update_spi=sf probe 0:1;" \
- "echo Dumping current SPI flash content ...;" \
- "sf read ${kernel_addr_r} 0x0 ${spi_size};" \
- "if fatwrite mmc 1:1 ${kernel_addr_r} spi-flash-backup.bin ${spi_size};" \
- "then echo SPI flash content was successfully written into spi-flash-backup.bin;" \
- "echo Reading SPI flash binary;" \
- "if load mmc 1:1 ${kernel_addr_r} repart-block.bin;" \
- "then echo Writing bootloader into SPI flash;" \
- "sf probe 0:1;" \
- "sf update ${kernel_addr_r} 0x0 ${spi_size};" \
- "poweroff;" \
- "else echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "sf read ${kernel_addr_r} 0x0 ${boot_block_size_r};" \
- "echo Reading bootloader;" \
- "if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 1:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader into SPI flash;" \
- "sf probe 0:1;" \
- "sf update ${kernel_addr_r} 0x0 ${boot_block_size_r};" \
- "sf update ${ramdisk_addr_r} ${boot_block_size_r} ${boot_block_size_r};" \
- "echo Bootloader written successfully; poweroff;" \
- "else echo Reading bootloader failed;" \
- "poweroff; fi;" \
- "fi;" \
- "else echo SPI flash backup FAILED! Aborting ...;" \
- "poweroff; fi\0"
-
-#define TRANSFORMER_BOOTMENU \
- TRANSFORMER_FLASH_UBOOT \
- TRANSFORMER_FLASH_SPI \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
- "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_3=update bootloader=run flash_uboot\0" \
- "bootmenu_4=reboot RCM=enterrcm\0" \
- "bootmenu_5=reboot=reset\0" \
- "bootmenu_6=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "spi_size=0x400000\0" \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "button_cmd_1_name=Lid sensor\0" \
- "button_cmd_1=poweroff\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- TRANSFORMER_BOOTMENU
-
-#endif /* __CONFIG_H */
#define __CONFIG_H
#include "tegra20-common.h"
-#include "transformer-common.h"
+
+/* High-level configuration options */
+#define CFG_TEGRA_BOARD_STRING "ASUS Transformer"
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
#ifndef __CONFIG_H
#define __CONFIG_H
-#include <linux/sizes.h>
-
#include "tegra30-common.h"
-#include "transformer-common.h"
+
+/* High-level configuration options */
+#define CFG_TEGRA_BOARD_STRING "ASUS Transformer"
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
#ifndef __CONFIG_H
#define __CONFIG_H
-#include <linux/sizes.h>
-
#include "tegra30-common.h"
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "LG X3 Board"
-#define X3_FLASH_UBOOT \
- "flash_uboot=echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "mmc dev 0 1;" \
- "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
- "echo Reading bootloader;" \
- "if load mmc 0:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 0:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader to eMMC;" \
- "mmc dev 0 1;" \
- "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
- "mmc dev 0 2;" \
- "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
- "echo Bootloader written successfully;" \
- "pause 'Press ANY key to reboot device...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
-
-#define X3_BOOTMENU \
- X3_FLASH_UBOOT \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
- "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_3=update bootloader=run flash_uboot\0" \
- "bootmenu_4=reboot RCM=enterrcm\0" \
- "bootmenu_5=reboot=reset\0" \
- "bootmenu_6=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- X3_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
--- /dev/null
+boot_block_size_r=0x200000
+boot_block_size=0x1000
+bootloader_file=u-boot-dtb-tegra.bin
+spi_size=0x400000
+boot_dev=0
+
+flash_uboot=echo Preparing RAM;
+ mw ${kernel_addr_r} 0 ${boot_block_size_r};
+ mw ${ramdisk_addr_r} 0 ${boot_block_size_r};
+ echo Reading BCT;
+ mmc dev 0 1;
+ mmc read ${kernel_addr_r} 0 ${boot_block_size};
+ echo Reading bootloader;
+ if load mmc ${boot_dev}:1 ${ramdisk_addr_r} ${bootloader_file};
+ then echo Calculating bootloader size;
+ size mmc ${boot_dev}:1 ${bootloader_file};
+ ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};
+ echo Writing bootloader to eMMC;
+ mmc dev 0 1;
+ mmc write ${kernel_addr_r} 0 ${boot_block_size};
+ mmc dev 0 2;
+ mmc write ${ramdisk_addr_r} 0 ${boot_block_size};
+ echo Bootloader written successfully;
+ pause 'Press ANY key to reboot device...'; reset;
+ else echo Reading bootloader failed;
+ pause 'Press ANY key to return to bootmenu...'; bootmenu; fi
+
+update_spi=sf probe 0:1;
+ echo Dumping current SPI flash content ...;
+ sf read ${kernel_addr_r} 0x0 ${spi_size};
+ if fatwrite mmc 1:1 ${kernel_addr_r} spi-flash-backup.bin ${spi_size};
+ then echo SPI flash content was successfully written into spi-flash-backup.bin;
+ echo Reading SPI flash binary;
+ if load mmc 1:1 ${kernel_addr_r} repart-block.bin;
+ then echo Writing bootloader into SPI flash;
+ sf probe 0:1;
+ sf update ${kernel_addr_r} 0x0 ${spi_size};
+ echo Bootloader SUCCESSFULLY written into SPI flash;
+ pause 'Press ANY key to reboot...'; reset;
+ else echo Preparing RAM;
+ mw ${kernel_addr_r} 0 ${boot_block_size_r};
+ mw ${ramdisk_addr_r} 0 ${boot_block_size_r};
+ echo Reading BCT;
+ sf read ${kernel_addr_r} 0x0 ${boot_block_size_r};
+ echo Reading bootloader;
+ if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};
+ then echo Calculating bootloader size;
+ size mmc 1:1 ${bootloader_file};
+ ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};
+ echo Writing bootloader into SPI flash;
+ sf probe 0:1;
+ sf update ${kernel_addr_r} 0x0 ${boot_block_size_r};
+ sf update ${ramdisk_addr_r} ${boot_block_size_r} ${boot_block_size_r};
+ echo Bootloader written SUCCESSFULLY;
+ pause 'Press ANY key to reboot...'; reset;
+ else echo Reading bootloader failed;
+ pause 'Press ANY key to reboot...'; reset; fi;
+ fi;
+ else echo SPI flash backup FAILED! Aborting ...;
+ pause 'Press ANY key to reboot...'; reset; fi