summaryrefslogtreecommitdiffstats
path: root/scripts/lib/bsp/kernel.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/bsp/kernel.py')
-rw-r--r--scripts/lib/bsp/kernel.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/scripts/lib/bsp/kernel.py b/scripts/lib/bsp/kernel.py
index 5935e667bc..dabb9cf3f0 100644
--- a/scripts/lib/bsp/kernel.py
+++ b/scripts/lib/bsp/kernel.py
@@ -160,11 +160,11 @@ def open_user_file(scripts_path, machine, userfile, mode):
160def read_config_items(scripts_path, machine): 160def read_config_items(scripts_path, machine):
161 """ 161 """
162 Find and return a list of config items (CONFIG_XXX) in a machine's 162 Find and return a list of config items (CONFIG_XXX) in a machine's
163 user-defined config fragment [user-config.cfg]. 163 user-defined config fragment [${machine}-user-config.cfg].
164 """ 164 """
165 config_items = [] 165 config_items = []
166 166
167 f = open_user_file(scripts_path, machine, "user-config.cfg", "r") 167 f = open_user_file(scripts_path, machine, machine+"-user-config.cfg", "r")
168 lines = f.readlines() 168 lines = f.readlines()
169 for line in lines: 169 for line in lines:
170 s = line.strip() 170 s = line.strip()
@@ -178,9 +178,9 @@ def read_config_items(scripts_path, machine):
178def write_config_items(scripts_path, machine, config_items): 178def write_config_items(scripts_path, machine, config_items):
179 """ 179 """
180 Write (replace) the list of config items (CONFIG_XXX) in a 180 Write (replace) the list of config items (CONFIG_XXX) in a
181 machine's user-defined config fragment [user-config.cfg]. 181 machine's user-defined config fragment [${machine}=user-config.cfg].
182 """ 182 """
183 f = open_user_file(scripts_path, machine, "user-config.cfg", "w") 183 f = open_user_file(scripts_path, machine, machine+"-user-config.cfg", "w")
184 for item in config_items: 184 for item in config_items:
185 f.write(item + "\n") 185 f.write(item + "\n")
186 f.close() 186 f.close()
@@ -191,7 +191,7 @@ def write_config_items(scripts_path, machine, config_items):
191def yocto_kernel_config_list(scripts_path, machine): 191def yocto_kernel_config_list(scripts_path, machine):
192 """ 192 """
193 Display the list of config items (CONFIG_XXX) in a machine's 193 Display the list of config items (CONFIG_XXX) in a machine's
194 user-defined config fragment [user-config.cfg]. 194 user-defined config fragment [${machine}-user-config.cfg].
195 """ 195 """
196 config_items = read_config_items(scripts_path, machine) 196 config_items = read_config_items(scripts_path, machine)
197 197
@@ -202,7 +202,7 @@ def yocto_kernel_config_list(scripts_path, machine):
202def yocto_kernel_config_rm(scripts_path, machine): 202def yocto_kernel_config_rm(scripts_path, machine):
203 """ 203 """
204 Display the list of config items (CONFIG_XXX) in a machine's 204 Display the list of config items (CONFIG_XXX) in a machine's
205 user-defined config fragment [user-config.cfg], prompt the user 205 user-defined config fragment [${machine}-user-config.cfg], prompt the user
206 for one or more to remove, and remove them. 206 for one or more to remove, and remove them.
207 """ 207 """
208 config_items = read_config_items(scripts_path, machine) 208 config_items = read_config_items(scripts_path, machine)
@@ -235,7 +235,7 @@ def yocto_kernel_config_rm(scripts_path, machine):
235def yocto_kernel_config_add(scripts_path, machine, config_items): 235def yocto_kernel_config_add(scripts_path, machine, config_items):
236 """ 236 """
237 Add one or more config items (CONFIG_XXX) to a machine's 237 Add one or more config items (CONFIG_XXX) to a machine's
238 user-defined config fragment [user-config.cfg]. 238 user-defined config fragment [${machine}-user-config.cfg].
239 """ 239 """
240 new_items = [] 240 new_items = []
241 241
@@ -304,11 +304,11 @@ def find_filesdir(scripts_path, machine):
304def read_patch_items(scripts_path, machine): 304def read_patch_items(scripts_path, machine):
305 """ 305 """
306 Find and return a list of patch items in a machine's user-defined 306 Find and return a list of patch items in a machine's user-defined
307 patch list [user-patches.scc]. 307 patch list [${machine}-user-patches.scc].
308 """ 308 """
309 patch_items = [] 309 patch_items = []
310 310
311 f = open_user_file(scripts_path, machine, "user-patches.scc", "r") 311 f = open_user_file(scripts_path, machine, machine+"-user-patches.scc", "r")
312 lines = f.readlines() 312 lines = f.readlines()
313 for line in lines: 313 for line in lines:
314 s = line.strip() 314 s = line.strip()
@@ -325,9 +325,9 @@ def read_patch_items(scripts_path, machine):
325def write_patch_items(scripts_path, machine, patch_items): 325def write_patch_items(scripts_path, machine, patch_items):
326 """ 326 """
327 Write (replace) the list of patches in a machine's user-defined 327 Write (replace) the list of patches in a machine's user-defined
328 patch list [user-patches.scc]. 328 patch list [${machine}-user-patches.scc].
329 """ 329 """
330 f = open_user_file(scripts_path, machine, "user-patches.scc", "w") 330 f = open_user_file(scripts_path, machine, machine+"-user-patches.scc", "w")
331 for item in patch_items: 331 for item in patch_items:
332 f.write("patch " + item + "\n") 332 f.write("patch " + item + "\n")
333 f.close() 333 f.close()
@@ -338,7 +338,7 @@ def write_patch_items(scripts_path, machine, patch_items):
338def yocto_kernel_patch_list(scripts_path, machine): 338def yocto_kernel_patch_list(scripts_path, machine):
339 """ 339 """
340 Display the list of patches in a machine's user-defined patch list 340 Display the list of patches in a machine's user-defined patch list
341 [user-patches.scc]. 341 [${machine}-user-patches.scc].
342 """ 342 """
343 patches = read_patch_items(scripts_path, machine) 343 patches = read_patch_items(scripts_path, machine)
344 344
@@ -349,7 +349,7 @@ def yocto_kernel_patch_list(scripts_path, machine):
349def yocto_kernel_patch_rm(scripts_path, machine): 349def yocto_kernel_patch_rm(scripts_path, machine):
350 """ 350 """
351 Remove one or more patches from a machine's user-defined patch 351 Remove one or more patches from a machine's user-defined patch
352 list [user-patches.scc]. 352 list [${machine}-user-patches.scc].
353 """ 353 """
354 patches = read_patch_items(scripts_path, machine) 354 patches = read_patch_items(scripts_path, machine)
355 355
@@ -390,7 +390,7 @@ def yocto_kernel_patch_rm(scripts_path, machine):
390def yocto_kernel_patch_add(scripts_path, machine, patches): 390def yocto_kernel_patch_add(scripts_path, machine, patches):
391 """ 391 """
392 Add one or more patches to a machine's user-defined patch list 392 Add one or more patches to a machine's user-defined patch list
393 [user-patches.scc]. 393 [${machine}-user-patches.scc].
394 """ 394 """
395 existing_patches = read_patch_items(scripts_path, machine) 395 existing_patches = read_patch_items(scripts_path, machine)
396 396