Handle multiple Kernel configurations with the same name
At the moment in the build_kernel.sh script we search for a specified Kernel configuration in the cip-kernel-config repository using find. The search takes place in the appropriate version sub-directory (e.g. 4.4, 4.19).
The way this is implemented causes an issue if there are more than one Kernel config with the same filename. For example, there is a toshiba_defconfig for both the x86 and powerpc architectures.
This issue has also revealed a bug in the way the result of this 'find' is used, as we're not expecting more than one result:
+++ '[' '!' /opt/cip-kernel-config/4.4/powerpc/toshiba_defconfig /opt/cip-kernel-config/4.4/x86/toshiba_defconfig ']'
/opt/build_kernel.sh: line 123: [: /opt/cip-kernel-config/4.4/powerpc/toshiba_defconfig: unary operator expected
Reported-by: Zoran Stojsavljevic
Edited by Chris Paterson