OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #ifndef __configs_chromeos_tegra2_developer_h__ | 7 #ifndef __configs_chromeos_tegra2_developer_h__ |
8 #define __configs_chromeos_tegra2_developer_h__ | 8 #define __configs_chromeos_tegra2_developer_h__ |
9 | 9 |
10 #include <configs/chromeos/developer.h> | 10 #include <configs/chromeos/developer.h> |
11 #include <configs/chromeos/tegra2/common.h> | 11 #include <configs/chromeos/tegra2/common.h> |
12 | 12 |
13 #include <configs/chromeos/tegra2/parts/usb.h> | 13 #include <configs/chromeos/tegra2/parts/usb.h> |
14 | 14 |
15 #define CONFIG_EXTRA_ENV_SETTINGS_ARCH CONFIG_EXTRA_ENV_SETTINGS_ARCH_COMMON | |
16 | |
17 /* | 15 /* |
18 * We expect all Tegra2 machines to have SPI flash as defined by the | 16 * We expect all Tegra2 machines to have SPI flash as defined by the |
19 * firmware_layout.h config file. The environment will go there. | 17 * firmware_layout.h config file. The environment will go there. |
20 */ | 18 */ |
21 #define CONFIG_ENV_IS_IN_SPI_FLASH 1 | 19 #define CONFIG_ENV_IS_IN_SPI_FLASH 1 |
22 | 20 |
23 #define CONFIG_ENV_SECT_SIZE CONFIG_LENGTH_ENV | 21 #define CONFIG_ENV_SECT_SIZE CONFIG_LENGTH_ENV |
24 #define CONFIG_ENV_OFFSET CONFIG_OFFSET_ENV | 22 #define CONFIG_ENV_OFFSET CONFIG_OFFSET_ENV |
25 | 23 |
26 #define CONFIG_SYS_MEMTEST_START 0x0000 | 24 #define CONFIG_SYS_MEMTEST_START 0x0000 |
27 #define CONFIG_SYS_MEMTEST_END 0x1000 | 25 #define CONFIG_SYS_MEMTEST_END 0x1000 |
28 | 26 |
| 27 |
| 28 /* |
| 29 * Developer-friendly booting options: |
| 30 * |
| 31 * dhcp_boot: get IP address from DHCP, then boot with NFS root. |
| 32 * keynfs_boot: get kernel from USB stick ext2 partition 1, then NFS root. |
| 33 * usb_boot: boot from a USB image made with image_to_usb.sh. |
| 34 * mmc_boot: boot from an image installed in eMMC, |
| 35 * |
| 36 * regen_all sets up the bootargs, so must be run after any change to |
| 37 * environment variables. |
| 38 * |
| 39 * The network adapter must be available before starting an dhcp_boot. You |
| 40 * may need to use 'usb start' first if you are using a USB ethernet adapter. |
| 41 * The same applies for usb_boot. |
| 42 */ |
| 43 |
| 44 #define CONFIG_EXTRA_ENV_SETTINGS_ARCH \ |
| 45 "console=ttyS0,115200n8\0"\ |
| 46 "cros_bootfile=/boot/vmlinux.uimg\0"\ |
| 47 "user=user\0"\ |
| 48 "board=arm\0"\ |
| 49 "serial#=1\0"\ |
| 50 "tftppath=/tftpboot/uImage\0"\ |
| 51 "tftpserverip=10.0.0.1\0"\ |
| 52 "nfsserverip=10.0.0.1\0"\ |
| 53 "mmcdev=0\0"\ |
| 54 "regen_all="\ |
| 55 "setenv common_bootargs console=${console} "\ |
| 56 "${platform_extras} noinitrd; "\ |
| 57 "setenv bootargs ${common_bootargs} ${extra_bootargs} "\ |
| 58 "${bootdev_bootargs}\0"\ |
| 59 "regen_net_bootargs=setenv bootdev_bootargs "\ |
| 60 "dev=/dev/nfs4 rw nfsroot=${nfsserverip}:${rootpath} "\ |
| 61 "ip=dhcp; "\ |
| 62 "run regen_all\0"\ |
| 63 \ |
| 64 "dhcp_setup=setenv tftppath "\ |
| 65 "/tftpboot/uImage-${user}-${board}-${serial#}; "\ |
| 66 "setenv rootpath " CONFIG_ROOTPATH "; "\ |
| 67 "setenv autoload n; "\ |
| 68 "run regen_net_bootargs\0"\ |
| 69 "dhcp_boot=run dhcp_setup; "\ |
| 70 "bootp; tftpboot ${loadaddr} ${tftpserverip}:${tftppath}; "\ |
| 71 "bootm ${loadaddr}\0"\ |
| 72 \ |
| 73 "keynfs_setup="\ |
| 74 "setenv rootpath " CONFIG_ROOTPATH "; "\ |
| 75 "run regen_net_bootargs\0" \ |
| 76 "keynfs_boot=run keynfs_setup; "\ |
| 77 "ext2load usb 0:1 ${loadaddr} uImage; "\ |
| 78 "bootm ${loadaddr}\0" \ |
| 79 \ |
| 80 "usb_setup=setenv bootdev_bootargs "\ |
| 81 "root=/dev/sda3; "\ |
| 82 "run regen_all\0"\ |
| 83 "usb_boot=run usb_setup; "\ |
| 84 "ext2load usb 0:3 ${loadaddr} ${cros_bootfile}; "\ |
| 85 "bootm ${loadaddr}\0" \ |
| 86 \ |
| 87 "mmc_setup=mmc init ${mmcdev}; setenv bootdev_bootargs "\ |
| 88 "root=/dev/mmcblk0p5; "\ |
| 89 "run regen_all\0"\ |
| 90 "mmc_boot=run mmc_setup; "\ |
| 91 "ext2load mmc ${mmcdev}:3 ${loadaddr} ${cros_bootfile}; "\ |
| 92 "bootm ${loadaddr}\0" |
| 93 |
| 94 /* |
| 95 * Our developer-friendly boot process tries a number of things in sequence |
| 96 * until it finds a kernel. Network booting is tried first if we have Ethernet. |
| 97 */ |
| 98 #define CONFIG_BOOTCOMMAND \ |
| 99 "usb start; "\ |
| 100 "if test ${ethact} != \"\"; then "\ |
| 101 "run dhcp_boot ; " \ |
| 102 "fi ; " \ |
| 103 "run keynfs_boot ; " \ |
| 104 "run usb_boot ; " \ |
| 105 "run mmc_boot" |
| 106 |
29 #endif //__configs_chromeos_tegra2_developer_h__ | 107 #endif //__configs_chromeos_tegra2_developer_h__ |
OLD | NEW |