Hi.
I tried downloading and compiling the CBoot sources, but the code has errors:
compiling platform/t186/../../../../common/drivers/display/sor/tegrabl_sor.c
In file included from platform/t186/../../../../common/drivers/display/sor/tegrabl_sor.c:20:0:
platform/t186/../../../../common/drivers/display/sor/tegrabl_sor.c: In function ‘sor_config_pwm’:
../../common/include/tegrabl_drf.h:77:27: error: result of ‘31 << 31’ requires 37 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=]
((d##_##r##_0_##f##_##c) << NV_FIELD_SHIFT(d##_##r##_0_##f##_RANGE))
^
platform/t186/../../../../common/drivers/display/sor/tegrabl_sor.c:401:4: note: in expansion of macro ‘NV_DRF_DEF’
NV_DRF_DEF(SOR_NV_PDISP, SOR_PWM_CTL, SETTING_NEW, SHIFT),
^~~~~~~~~~
platform/t186/../../../../common/drivers/display/sor/tegrabl_sor.c: In function ‘sor_power_lanes’:
platform/t186/../../../../common/drivers/display/sor/tegrabl_sor.c:192:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
val = NV_FLD_SET_DRF_DEF(SOR_NV_PDISP, SOR_DP_PADCTL0, PD_TXD_1, NO,
platform/t186/../../../../common/drivers/display/sor/tegrabl_sor.c:194:3: note: here
case 1:
^~~~
cc1: all warnings being treated as errors
The first error is because of the expression
NV_DRF_DEF(SOR_NV_PDISP, SOR_PWM_CTL, SETTING_NEW, SHIFT)
on line 401. “SHIFT” (31) is not a valid value for the SETTING_NEW field (which is 1 bit in size), I’m pretty sure this is supposed to say “PENDING” (1), or possibly “TRIGGER” (also 1)…
The second one is just a missing “/* fall through */” comment on line 194.
After fixing this file, the next one with errors is:
compiling platform/t186/../../../../common/lib/tegrabl_bootloader_update/tegrabl_bootloader_update.c
platform/t186/../../../../common/lib/tegrabl_bootloader_update/tegrabl_bootloader_update.c: In function ‘tegrabl_check_and_update_bl_payload’:
platform/t186/../../../../common/lib/tegrabl_bootloader_update/tegrabl_bootloader_update.c:460:27: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
tegrabl_blob_handle bh = NULL;
^~~~
cc1: all warnings being treated as errors
tegrabl_blob_handle is a numeric type (uintptr_t), not a pointer type, so it should be intialized with 0, not NULL.
Hope this helps.