summaryrefslogtreecommitdiff
path: root/support/scripts/extract_info.sh
diff options
context:
space:
mode:
Diffstat (limited to 'support/scripts/extract_info.sh')
-rwxr-xr-xsupport/scripts/extract_info.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/support/scripts/extract_info.sh b/support/scripts/extract_info.sh
new file mode 100755
index 0000000..9ad5255
--- /dev/null
+++ b/support/scripts/extract_info.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+if [ ! -e $TBB_CONFIG ]
+then
+ echo "There is no config file"
+ return 1
+fi
+
+if [ ! -e $INFO_DIR ]
+then
+ mkdir -p $INFO_DIR
+fi
+
+grep TBB_ENABLE_ $TBB_CONFIG | grep -v "^#" > $INFO_DIR/.enable_list.txt
+grep TBB_SET_ $TBB_CONFIG | grep -v "^#" > $INFO_DIR/.set_list.txt
+
+grep TBB_INFO_ $TBB_CONFIG | grep -v "^#" > $INFO_DIR/.info_list.txt
+sed -i "s|\(^.\+\)_\([0-9].[0-9]\)=y|\1=\2|" $INFO_DIR/.info_list.txt
+
+grep building-blocks- $TBB_CONFIG | grep -v "^#" > $INFO_DIR/.bb_list.txt
+grep -v "^#" $TBB_CONFIG | grep -v "^$" | grep -v TBB_ | grep -v building-blocks- > $INFO_DIR/.pack_list.txt
+
+sed -i "s|=y||g" $INFO_DIR/.bb_list.txt
+sed -i "s|=y||g" $INFO_DIR/.pack_list.txt
+
+grep partition $TBB_CONFIG | grep -v "^#" > $INFO_DIR/.part_info.txt
+sed -i "s|=y||g" $INFO_DIR/.part_info.txt
+sed -i "s|building-blocks-sub1-Preset_partition-||g" $INFO_DIR/.part_info.txt
+
+cat $INFO_DIR/.bb_list.txt $INFO_DIR/.pack_list.txt > $INFO_DIR/.image_list.txt
+
+return 0
+