5 https://raw.githubusercontent.com/automotive-grade-linux/docs-sources/master/docs/security-blueprint/part-2/3-Consoles.md
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/architecture/master/security_blueprint-security-blueprint-book.yml -->
12 ## Disable serial console
14 Serial console output shall be disabled. To disable console output in U-Boot,
15 set the following macros:
17 <!-- section-config -->
19 Domain | `Config` name | `Value`
20 ---------------------- | --------------------------------------- | ---------
21 Boot-Consoles-Serial-1 | `CONFIG_SILENT_CONSOLE` | `Disable`
22 Boot-Consoles-Serial-2 | `CONFIG_SYS_DEVICE_NULLDEV` | `Disable`
23 Boot-Consoles-Serial-3 | `CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC` | `Disable`
25 <!-- end-section-config --> <!-- section-todo -->
28 --------------- | ------------------------------------
29 Boot-Consoles-1 | Secure loader: No reference earlier?
31 <!-- end-section-todo -->
33 And set "**silent**" environment variable. For the Secure loader,
34 disable the traces by not defining the below macro:
36 <!-- section-config -->
38 Domain | `Environment variable` name | _State_
39 ---------------------- | --------------------------- | -------------
40 Boot-Consoles-Serial-1 | `INC_DEBUG_PRINT` | _Not defined_
42 <!-- end-section-config -->
44 For sboot proper configuration needs to be done to disable the serial console.
46 --------------------------------------------------------------------------------
50 ## Immutable environment variables
52 In U-Boot, ensure Kernel command line, boot commands, boot delay and other
53 environment variables are immutable. This will prevent side-loading of alternate
54 images, by restricting the boot selection to only the image in FLASH.
56 The environment variables shall be part of the text region in U-Boot as default
57 environment variable and not in non-volatile memory.
59 Remove configuration options related to non-volatile memory, such as:
61 <!-- section-config -->
63 Domain | `Config` name | _State_
64 -------------------------- | ---------------------------- | ---------
65 Boot-Consoles-Variables-1 | `CONFIG_ENV_IS_IN_MMC` | `#undef`
66 Boot-Consoles-Variables-2 | `CONFIG_ENV_IS_IN_EEPROM` | `#undef`
67 Boot-Consoles-Variables-3 | `CONFIG_ENV_IS_IN_FLASH` | `#undef`
68 Boot-Consoles-Variables-4 | `CONFIG_ENV_IS_IN_DATAFLASH` | `#undef`
69 Boot-Consoles-Variables-5 | `CONFIG_ENV_IS_IN_FAT` | `#undef`
70 Boot-Consoles-Variables-6 | `CONFIG_ENV_IS_IN_NAND` | `#undef`
71 Boot-Consoles-Variables-7 | `CONFIG_ENV_IS_IN_NVRAM` | `#undef`
72 Boot-Consoles-Variables-8 | `CONFIG_ENV_IS_IN_ONENAND` | `#undef`
73 Boot-Consoles-Variables-9 | `CONFIG_ENV_IS_IN_SPI_FLASH` | `#undef`
74 Boot-Consoles-Variables-10 | `CONFIG_ENV_IS_IN_REMOTE` | `#undef`
75 Boot-Consoles-Variables-11 | `CONFIG_ENV_IS_IN_UBI` | `#undef`
76 Boot-Consoles-Variables-12 | `CONFIG_ENV_IS_NOWHERE` | `#define`
78 <!-- end-section-config -->
80 --------------------------------------------------------------------------------
84 ## (Recommendation) Removal of memory dump commands
86 In U-Boot, following commands shall be disabled to avoid memory dumps:
89 md : Memory Display command.
90 mm : Memory modify command - auto incrementing address.
91 nm : Memory modify command - constant address.
94 mwc : Memory write cyclic.
95 mdc : Memory display cyclic.
96 mtest : Simple ram read/write test.
97 loopw : Infinite write loop on address range.
100 <!-- section-config -->
102 Domain | `Command` name | _State_
103 ----------------------- | -------------- | ----------
104 Boot-Consoles-MemDump-1 | `md` | _Disabled_
105 Boot-Consoles-MemDump-2 | `mm` | _Disabled_
106 Boot-Consoles-MemDump-3 | `nm` | _Disabled_
107 Boot-Consoles-MemDump-4 | `mw` | _Disabled_
108 Boot-Consoles-MemDump-5 | `cp` | _Disabled_
109 Boot-Consoles-MemDump-6 | `mwc` | _Disabled_
110 Boot-Consoles-MemDump-7 | `mdc` | _Disabled_
111 Boot-Consoles-MemDump-8 | `mtest` | _Disabled_
112 Boot-Consoles-MemDump-9 | `loopw` | _Disabled_
114 <!-- end-section-config -->
116 Similarly, memory dump support shall be disabled from sboot.