msm: camera: common: Add camera banner

camera_banner contains compilation timestamp, which can be used
to find mismatch between ramdump and symbols.

CRs-Fixed: 3261129
Change-Id: I021f6f9417b227d07a4424f7522e27c8535b0363
Signed-off-by: Trishansh Bhardwaj <quic_tbhardwa@quicinc.com>
This commit is contained in:
Trishansh Bhardwaj 2022-01-21 22:09:13 +05:30 committed by Camera Software Integration
parent 28ef245c26
commit 58fab0efe0
3 changed files with 22 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
clangd*
.cache
compile_commands.json
cscope*
cam_generated_h

View File

@ -6,6 +6,17 @@ KBUILD_OPTIONS += MODNAME=camera
all: modules
CAMERA_COMPILE_TIME = $(shell date)
CAMERA_COMPILE_BY = $(shell whoami | sed 's/\\/\\\\/')
CAMERA_COMPILE_HOST = $(shell uname -n)
cam_generated_h: $(shell find . -iname "*.c") $(shell find . -iname "*.h") $(shell find . -iname "*.mk")
echo '#define CAMERA_COMPILE_TIME "$(CAMERA_COMPILE_TIME)"' > cam_generated_h
echo '#define CAMERA_COMPILE_BY "$(CAMERA_COMPILE_BY)"' >> cam_generated_h
echo '#define CAMERA_COMPILE_HOST "$(CAMERA_COMPILE_HOST)"' >> cam_generated_h
modules: cam_generated_h
modules dtbs:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)

View File

@ -60,6 +60,11 @@
#include "cam_csid_ppi100.h"
#include "camera_main.h"
#include "cam_generated_h"
char camera_banner[] = "Camera-Banner: (" CAMERA_COMPILE_BY "@"
CAMERA_COMPILE_HOST ") (" CAMERA_COMPILE_TIME ")";
#ifdef CONFIG_CAM_PRESIL
extern int cam_presil_framework_dev_init_from_main(void);
extern void cam_presil_framework_dev_exit_from_main(void);
@ -285,6 +290,7 @@ static int camera_init(void)
int rc;
uint i, j, num_inits;
CAM_INFO(CAM_UTIL, "%s", camera_banner);
rc = camera_verify_submodules();
if (rc)
goto end_init;