From: Svyatoslav Ryhel Date: Mon, 24 Jun 2024 17:13:47 +0000 (+0300) Subject: board: tegra: convert boards to text env X-Git-Url: http://git.dujemihanovic.xyz/html/static/git-favicon.png?a=commitdiff_plain;h=5e13730fc6f562873dc5b8262ffdc0fc43c89cec;p=u-boot.git board: tegra: convert boards to text env Convert boards to use text based env. This is the first stage of conversion, common inclusions should be converted next. Acked-by: Francesco Dolcini # Toradex Apalis TK1 Reviewed-by: Simon Glass Signed-off-by: Svyatoslav Ryhel --- diff --git a/board/asus/grouper/grouper.env b/board/asus/grouper/grouper.env new file mode 100644 index 0000000000..b1f4aeb555 --- /dev/null +++ b/board/asus/grouper/grouper.env @@ -0,0 +1,15 @@ +#include + +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 diff --git a/board/asus/transformer-t20/transformer-t20.env b/board/asus/transformer-t20/transformer-t20.env new file mode 100644 index 0000000000..2f7e8206c2 --- /dev/null +++ b/board/asus/transformer-t20/transformer-t20.env @@ -0,0 +1,17 @@ +#include + +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 diff --git a/board/asus/transformer-t30/configs/tf600t.config b/board/asus/transformer-t30/configs/tf600t.config index b3734869f5..a452a19fe4 100644 --- a/board/asus/transformer-t30/configs/tf600t.config +++ b/board/asus/transformer-t30/configs/tf600t.config @@ -1,3 +1,4 @@ +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 diff --git a/board/asus/transformer-t30/tf600t.env b/board/asus/transformer-t30/tf600t.env new file mode 100644 index 0000000000..7bc2b80c48 --- /dev/null +++ b/board/asus/transformer-t30/tf600t.env @@ -0,0 +1,16 @@ +#include + +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 diff --git a/board/asus/transformer-t30/transformer-t30.env b/board/asus/transformer-t30/transformer-t30.env new file mode 100644 index 0000000000..2f7e8206c2 --- /dev/null +++ b/board/asus/transformer-t30/transformer-t30.env @@ -0,0 +1,17 @@ +#include + +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 diff --git a/board/htc/endeavoru/endeavoru.env b/board/htc/endeavoru/endeavoru.env new file mode 100644 index 0000000000..53e9b56845 --- /dev/null +++ b/board/htc/endeavoru/endeavoru.env @@ -0,0 +1,13 @@ +#include + +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 diff --git a/board/lenovo/ideapad-yoga-11/ideapad-yoga-11.env b/board/lenovo/ideapad-yoga-11/ideapad-yoga-11.env new file mode 100644 index 0000000000..7bc2b80c48 --- /dev/null +++ b/board/lenovo/ideapad-yoga-11/ideapad-yoga-11.env @@ -0,0 +1,16 @@ +#include + +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 diff --git a/board/lg/x3-t30/configs/p880.config b/board/lg/x3-t30/configs/p880.config index 57c2885779..44e0fa7ef7 100644 --- a/board/lg/x3-t30/configs/p880.config +++ b/board/lg/x3-t30/configs/p880.config @@ -1,3 +1,4 @@ +CONFIG_ENV_SOURCE_FILE="p880" CONFIG_DEFAULT_DEVICE_TREE="tegra30-lg-p880" CONFIG_SYS_PROMPT="Tegra30 (P880) # " CONFIG_VIDEO_LCD_RENESAS_R69328=y diff --git a/board/lg/x3-t30/configs/p895.config b/board/lg/x3-t30/configs/p895.config index 2eba92594b..267ae3a80d 100644 --- a/board/lg/x3-t30/configs/p895.config +++ b/board/lg/x3-t30/configs/p895.config @@ -1,3 +1,4 @@ +CONFIG_ENV_SOURCE_FILE="p895" CONFIG_DEFAULT_DEVICE_TREE="tegra30-lg-p895" CONFIG_SYS_PROMPT="Tegra30 (P895) # " CONFIG_VIDEO_LCD_RENESAS_R61307=y diff --git a/board/lg/x3-t30/p880.env b/board/lg/x3-t30/p880.env new file mode 100644 index 0000000000..f2bf298a99 --- /dev/null +++ b/board/lg/x3-t30/p880.env @@ -0,0 +1,15 @@ +#include + +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 diff --git a/board/lg/x3-t30/p895.env b/board/lg/x3-t30/p895.env new file mode 100644 index 0000000000..53e9b56845 --- /dev/null +++ b/board/lg/x3-t30/p895.env @@ -0,0 +1,13 @@ +#include + +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 diff --git a/board/microsoft/surface-rt/surface-rt.env b/board/microsoft/surface-rt/surface-rt.env new file mode 100644 index 0000000000..682929096a --- /dev/null +++ b/board/microsoft/surface-rt/surface-rt.env @@ -0,0 +1,14 @@ +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 diff --git a/board/nvidia/cardhu/cardhu.env b/board/nvidia/cardhu/cardhu.env new file mode 100644 index 0000000000..9d1e3e1da2 --- /dev/null +++ b/board/nvidia/cardhu/cardhu.env @@ -0,0 +1,2 @@ +board_name=cardhu-a04 +fdtfile=tegra30-cardhu-a04.dtb diff --git a/board/nvidia/p2771-0000/p2771-0000.env b/board/nvidia/p2771-0000/p2771-0000.env new file mode 100644 index 0000000000..6789cc1cc6 --- /dev/null +++ b/board/nvidia/p2771-0000/p2771-0000.env @@ -0,0 +1,22 @@ +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 diff --git a/board/nvidia/p3450-0000/p3450-0000.env b/board/nvidia/p3450-0000/p3450-0000.env new file mode 100644 index 0000000000..a7d7ab3c43 --- /dev/null +++ b/board/nvidia/p3450-0000/p3450-0000.env @@ -0,0 +1,7 @@ +/* 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 diff --git a/board/toradex/apalis-tk1/apalis_tk1.env b/board/toradex/apalis-tk1/apalis_tk1.env new file mode 100644 index 0000000000..ff883d6042 --- /dev/null +++ b/board/toradex/apalis-tk1/apalis_tk1.env @@ -0,0 +1,45 @@ +/* + * 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 diff --git a/board/toradex/apalis_t30/apalis_t30.env b/board/toradex/apalis_t30/apalis_t30.env new file mode 100644 index 0000000000..2e5161e3b8 --- /dev/null +++ b/board/toradex/apalis_t30/apalis_t30.env @@ -0,0 +1,9 @@ +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 diff --git a/board/toradex/colibri_t20/colibri_t20.env b/board/toradex/colibri_t20/colibri_t20.env new file mode 100644 index 0000000000..5e9f0630b2 --- /dev/null +++ b/board/toradex/colibri_t20/colibri_t20.env @@ -0,0 +1,3 @@ +/* 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} diff --git a/board/toradex/colibri_t30/colibri_t30.env b/board/toradex/colibri_t30/colibri_t30.env new file mode 100644 index 0000000000..2e5161e3b8 --- /dev/null +++ b/board/toradex/colibri_t30/colibri_t30.env @@ -0,0 +1,9 @@ +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 diff --git a/board/wexler/qc750/qc750.env b/board/wexler/qc750/qc750.env new file mode 100644 index 0000000000..f2bf298a99 --- /dev/null +++ b/board/wexler/qc750/qc750.env @@ -0,0 +1,15 @@ +#include + +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 diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig index 7fa6161f22..baab3bf804 100644 --- a/configs/apalis-tk1_defconfig +++ b/configs/apalis-tk1_defconfig @@ -4,6 +4,7 @@ CONFIG_ARCH_TEGRA=y 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" @@ -19,7 +20,7 @@ CONFIG_FIT=y 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 diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig index d7da23ed75..963b280a67 100644 --- a/configs/apalis_t30_defconfig +++ b/configs/apalis_t30_defconfig @@ -4,6 +4,7 @@ CONFIG_ARCH_TEGRA=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" diff --git a/configs/cardhu_defconfig b/configs/cardhu_defconfig index 7d88a25eb7..3fca1ae345 100644 --- a/configs/cardhu_defconfig +++ b/configs/cardhu_defconfig @@ -4,6 +4,7 @@ CONFIG_SYS_L2CACHE_OFF=y 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 diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig index 67456c89e7..a1a12e2b51 100644 --- a/configs/colibri_t20_defconfig +++ b/configs/colibri_t20_defconfig @@ -4,6 +4,7 @@ CONFIG_ARCH_TEGRA=y 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" diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig index 5044febb20..3be175b46b 100644 --- a/configs/colibri_t30_defconfig +++ b/configs/colibri_t30_defconfig @@ -4,6 +4,7 @@ CONFIG_ARCH_TEGRA=y 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" diff --git a/configs/endeavoru_defconfig b/configs/endeavoru_defconfig index fddc3d87ed..f0c8ce1614 100644 --- a/configs/endeavoru_defconfig +++ b/configs/endeavoru_defconfig @@ -5,6 +5,7 @@ CONFIG_CMDLINE_TAG=y 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" diff --git a/configs/grouper_common_defconfig b/configs/grouper_common_defconfig index 7d8cb6110f..a7b7209c6a 100644 --- a/configs/grouper_common_defconfig +++ b/configs/grouper_common_defconfig @@ -5,6 +5,7 @@ CONFIG_CMDLINE_TAG=y 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" diff --git a/configs/ideapad-yoga-11_defconfig b/configs/ideapad-yoga-11_defconfig index 4618c5253b..a9dd5216cc 100644 --- a/configs/ideapad-yoga-11_defconfig +++ b/configs/ideapad-yoga-11_defconfig @@ -5,6 +5,7 @@ CONFIG_CMDLINE_TAG=y 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" diff --git a/configs/p2771-0000-000_defconfig b/configs/p2771-0000-000_defconfig index 3554ba6a72..a12586523e 100644 --- a/configs/p2771-0000-000_defconfig +++ b/configs/p2771-0000-000_defconfig @@ -5,6 +5,7 @@ CONFIG_SYS_L2CACHE_OFF=y 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" diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig index ac7ed8e10f..a002178b7f 100644 --- a/configs/p3450-0000_defconfig +++ b/configs/p3450-0000_defconfig @@ -6,6 +6,7 @@ CONFIG_ARCH_TEGRA=y 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 diff --git a/configs/qc750_defconfig b/configs/qc750_defconfig index d0b07ee07c..58a3c83ade 100644 --- a/configs/qc750_defconfig +++ b/configs/qc750_defconfig @@ -5,6 +5,7 @@ CONFIG_CMDLINE_TAG=y 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" diff --git a/configs/surface-rt_defconfig b/configs/surface-rt_defconfig index dbb08abbb1..c1fd4a56a8 100644 --- a/configs/surface-rt_defconfig +++ b/configs/surface-rt_defconfig @@ -5,6 +5,7 @@ CONFIG_CMDLINE_TAG=y 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" diff --git a/configs/transformer_t20_defconfig b/configs/transformer_t20_defconfig index f424ce8c27..df993c31c7 100644 --- a/configs/transformer_t20_defconfig +++ b/configs/transformer_t20_defconfig @@ -5,6 +5,7 @@ CONFIG_CMDLINE_TAG=y 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" diff --git a/configs/transformer_t30_defconfig b/configs/transformer_t30_defconfig index 10784033e7..11ea7176d8 100644 --- a/configs/transformer_t30_defconfig +++ b/configs/transformer_t30_defconfig @@ -5,6 +5,7 @@ CONFIG_CMDLINE_TAG=y 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" diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h index 71d4727ca9..4c690a1785 100644 --- a/include/configs/apalis-tk1.h +++ b/include/configs/apalis-tk1.h @@ -18,64 +18,6 @@ #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 */ diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index 80204d706d..87a679efde 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -22,18 +22,6 @@ */ #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 */ diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h index 82729eb95c..3412b883cb 100644 --- a/include/configs/cardhu.h +++ b/include/configs/cardhu.h @@ -13,10 +13,6 @@ /* 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 diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h index ea7d648eb6..bc616d1436 100644 --- a/include/configs/colibri_t20.h +++ b/include/configs/colibri_t20.h @@ -13,17 +13,6 @@ /* 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 */ diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h index 7edb2c0b26..1f474669a7 100644 --- a/include/configs/colibri_t30.h +++ b/include/configs/colibri_t30.h @@ -23,18 +23,6 @@ */ #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 */ diff --git a/include/configs/endeavoru.h b/include/configs/endeavoru.h index 348078f977..33d0021ec1 100644 --- a/include/configs/endeavoru.h +++ b/include/configs/endeavoru.h @@ -10,54 +10,11 @@ #ifndef __CONFIG_H #define __CONFIG_H -#include - #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 diff --git a/include/configs/grouper.h b/include/configs/grouper.h index 8064b88902..b6ef6ff2ec 100644 --- a/include/configs/grouper.h +++ b/include/configs/grouper.h @@ -6,56 +6,11 @@ #ifndef __CONFIG_H #define __CONFIG_H -#include - #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 diff --git a/include/configs/ideapad-yoga-11.h b/include/configs/ideapad-yoga-11.h index 12c7649f78..c4e6b2a647 100644 --- a/include/configs/ideapad-yoga-11.h +++ b/include/configs/ideapad-yoga-11.h @@ -11,64 +11,6 @@ /* 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 diff --git a/include/configs/p2771-0000.h b/include/configs/p2771-0000.h index e409cc3896..fc1b7c0302 100644 --- a/include/configs/p2771-0000.h +++ b/include/configs/p2771-0000.h @@ -15,26 +15,6 @@ /* 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 diff --git a/include/configs/p3450-0000.h b/include/configs/p3450-0000.h index e60f42eaa7..1138c1d306 100644 --- a/include/configs/p3450-0000.h +++ b/include/configs/p3450-0000.h @@ -15,19 +15,6 @@ /* 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" diff --git a/include/configs/qc750.h b/include/configs/qc750.h index ce6665d0f3..ad9f9146bb 100644 --- a/include/configs/qc750.h +++ b/include/configs/qc750.h @@ -15,48 +15,6 @@ /* 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 diff --git a/include/configs/surface-rt.h b/include/configs/surface-rt.h index 30f6450cf3..1f0837e179 100644 --- a/include/configs/surface-rt.h +++ b/include/configs/surface-rt.h @@ -13,24 +13,6 @@ /* 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 diff --git a/include/configs/transformer-common.h b/include/configs/transformer-common.h deleted file mode 100644 index bb6817c8d2..0000000000 --- a/include/configs/transformer-common.h +++ /dev/null @@ -1,91 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Copyright (c) 2022, Svyatoslav Ryhel . - */ - -#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 */ diff --git a/include/configs/transformer-t20.h b/include/configs/transformer-t20.h index ca1e70caa7..6a3d9b2403 100644 --- a/include/configs/transformer-t20.h +++ b/include/configs/transformer-t20.h @@ -11,7 +11,9 @@ #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 diff --git a/include/configs/transformer-t30.h b/include/configs/transformer-t30.h index d2a16f12c1..792b958a30 100644 --- a/include/configs/transformer-t30.h +++ b/include/configs/transformer-t30.h @@ -10,10 +10,10 @@ #ifndef __CONFIG_H #define __CONFIG_H -#include - #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 diff --git a/include/configs/x3-t30.h b/include/configs/x3-t30.h index 78a2012861..c152af9b7e 100644 --- a/include/configs/x3-t30.h +++ b/include/configs/x3-t30.h @@ -10,55 +10,11 @@ #ifndef __CONFIG_H #define __CONFIG_H -#include - #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 diff --git a/include/env/nvidia/prod_upd.env b/include/env/nvidia/prod_upd.env new file mode 100644 index 0000000000..f4e381994b --- /dev/null +++ b/include/env/nvidia/prod_upd.env @@ -0,0 +1,60 @@ +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