Commit cb1565d
committed
fastboot: Add "fastboot device" command for runtime block device selection
Add the ability to change the fastboot flash target device at runtime
without recompiling. This is useful for:
- Platforms with multiple storage options (eMMC + UFS + NVMe)
- Development and testing scenarios
- Recovery situations where the default device is unavailable
New command syntax:
fastboot device <interface> <dev> - set flash interface and device
fastboot device - show current interface and device
Implementation details:
- Add fastboot_block_set_interface() and fastboot_block_set_device()
functions to set runtime values
- Add fastboot_block_get_interface() and fastboot_block_get_device()
getters that return runtime value if set, otherwise fall back to
Kconfig defaults
- Update fb_block.c to use the new getter functions
- Add command handler gated by CONFIG_FASTBOOT_FLASH_BLOCK
Example usage:
=> fastboot device scsi 0
Set fastboot block interface to 'scsi', device to 0
=> fastboot usb 0
(now flashing targets SCSI device 0 instead of default)
Change-Id: 7b54f839-5659-4aaf-b58f-d6107e08a24d
Signed-off-by: Anton Burticica <mouse@ya.ru>1 parent cb2e54d commit cb1565d
3 files changed
+122
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
122 | 157 | | |
123 | 158 | | |
124 | 159 | | |
| |||
154 | 189 | | |
155 | 190 | | |
156 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
157 | 200 | | |
158 | 201 | | |
159 | 202 | | |
| |||
179 | 222 | | |
180 | 223 | | |
181 | 224 | | |
182 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
183 | 237 | | |
184 | 238 | | |
185 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
15 | 52 | | |
16 | 53 | | |
17 | 54 | | |
| |||
125 | 162 | | |
126 | 163 | | |
127 | 164 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 165 | + | |
| 166 | + | |
133 | 167 | | |
134 | 168 | | |
135 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
105 | 133 | | |
0 commit comments