Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | #ifndef __CONFIG_H |
| 7 | #define __CONFIG_H |
| 8 | |
| 9 | #include <linux/sizes.h> |
| 10 | |
| 11 | #include "tegra30-common.h" |
| 12 | |
| 13 | /* High-level configuration options */ |
| 14 | #define CFG_TEGRA_BOARD_STRING "ASUS Google Nexus 7 (2012)" |
| 15 | |
| 16 | #define GROUPER_FLASH_UBOOT \ |
| 17 | "flash_uboot=echo Preparing RAM;" \ |
| 18 | "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \ |
| 19 | "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \ |
| 20 | "echo Reading BCT;" \ |
| 21 | "mmc dev 0 1;" \ |
| 22 | "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \ |
| 23 | "echo Reading bootloader;" \ |
| 24 | "if load mmc 0:1 ${ramdisk_addr_r} ${bootloader_file};" \ |
| 25 | "then echo Calculating bootloader size;" \ |
| 26 | "size mmc 0:1 ${bootloader_file};" \ |
| 27 | "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \ |
| 28 | "echo Writing bootloader to eMMC;" \ |
| 29 | "mmc dev 0 1;" \ |
| 30 | "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \ |
| 31 | "mmc dev 0 2;" \ |
| 32 | "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \ |
| 33 | "echo Bootloader written successfully;" \ |
| 34 | "pause 'Press ANY key to reboot device...'; reset;" \ |
| 35 | "else echo Reading bootloader failed;" \ |
| 36 | "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0" |
| 37 | |
| 38 | #define GROUPER_BOOTMENU \ |
| 39 | GROUPER_FLASH_UBOOT \ |
| 40 | "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \ |
| 41 | "bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \ |
| 42 | "bootmenu_2=update bootloader=run flash_uboot\0" \ |
| 43 | "bootmenu_3=reboot RCM=enterrcm\0" \ |
| 44 | "bootmenu_4=reboot=reset\0" \ |
| 45 | "bootmenu_5=power off=poweroff\0" \ |
| 46 | "bootmenu_delay=-1\0" |
| 47 | |
| 48 | #define BOARD_EXTRA_ENV_SETTINGS \ |
| 49 | "boot_block_size_r=0x200000\0" \ |
| 50 | "boot_block_size=0x1000\0" \ |
| 51 | "bootloader_file=u-boot-dtb-tegra.bin\0" \ |
Svyatoslav Ryhel | 8e30f39 | 2024-01-07 11:17:47 +0200 | [diff] [blame] | 52 | "button_cmd_0_name=Volume Down\0" \ |
| 53 | "button_cmd_0=bootmenu\0" \ |
| 54 | "button_cmd_1_name=Lid\0" \ |
| 55 | "button_cmd_1=poweroff\0" \ |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 56 | "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \ |
| 57 | GROUPER_BOOTMENU |
| 58 | |
| 59 | /* Board-specific serial config */ |
| 60 | #define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE |
| 61 | |
| 62 | #include "tegra-common-post.h" |
| 63 | |
| 64 | #endif /* __CONFIG_H */ |