[PATCH flasher 3/4] build: restrict cmd_build_configs() to enabled objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Stephen Warren <swarren@xxxxxxxxxx>

Only install enabled SoC/board/config files in _out/configs. This may
be useful if you want to create a _out directory containing a limited
set of binaries; this way, only the relevant limited set of config
files are installed too.

Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx>
---
 build | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/build b/build
index 924ac88..8f86d32 100755
--- a/build
+++ b/build
@@ -183,7 +183,26 @@ def cmd_build_bcts_imgs():
         build_bct_img_one_board(boardname)
 
 def cmd_build_configs():
-    run(scripts_dir, 'cp -rp configs ' + out_dir)
+    mkdir(os.path.join(out_dir, 'configs'))
+    boardnames = {}
+    for configname in all_enabled_confignames():
+        fn = configname + '.config'
+        src = os.path.join(scripts_dir, 'configs', fn)
+        dst = os.path.join(out_dir, 'configs', fn)
+        cp(src, dst)
+        boardnames[configs[configname]['board']] = True
+    socnames = {}
+    for boardname in boardnames:
+        fn = boardname + '.board'
+        src = os.path.join(scripts_dir, 'configs', fn)
+        dst = os.path.join(out_dir, 'configs', fn)
+        cp(src, dst)
+        socnames[boards[boardname]['soc']] = True
+    for socname in socnames:
+        fn = socname + '.soc'
+        src = os.path.join(scripts_dir, 'configs', fn)
+        dst = os.path.join(out_dir, 'configs', fn)
+        cp(src, dst)
 
 def cmd_build():
     cmd_build_uboots()
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux