From 625363b7ef674d3d878058a9b8ada91c451d9d2a Mon Sep 17 00:00:00 2001 From: Sivaraj R Date: Thu, 28 May 2020 16:34:49 +0530 Subject: [PATCH 1/1] PDK-6626: Unable to rebuild board LLD since top level makefile is not packaged - This is because we use "jacinto" as the directory name when we package PDK now - Due to this the PDK_SOC variable is set to jacinto when the steenv script is called - Instead set a default SOC so that the compilation goes through by default - User can always override the PDK_SOC variable if need to build for another SOC in the same family Signed-off-by: Sivaraj R --- packages/pdksetupenv.bat | 8 ++++++++ packages/pdksetupenv.sh | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/packages/pdksetupenv.bat b/packages/pdksetupenv.bat index 43ad1953f..19bb1490f 100644 --- a/packages/pdksetupenv.bat +++ b/packages/pdksetupenv.bat @@ -46,6 +46,14 @@ for %%a in (%s%) do ( for /f "tokens=1,2,3,4,5 delims=/_" %%a in ("%pdkdir%") do set pdksoc=%%b&set v1=%%c&set v2=%%d&set v3=%%e set pdkdir_ver=%v1%_%v2%_%v3% +@REM When pdk folder represents a device family, set a default SOC for that family +if %pdksoc% == jacinto ( + set pdksoc=am65xx +) +if %pdksoc% == sitara ( + set pdksoc=am64x +) + @REM Go to the SDK install directory cd %PDK_INSTALL_PATH%\..\.. diff --git a/packages/pdksetupenv.sh b/packages/pdksetupenv.sh index 2912f2d34..a3b831f13 100755 --- a/packages/pdksetupenv.sh +++ b/packages/pdksetupenv.sh @@ -51,6 +51,13 @@ cd .. CURDIR_LAST=${PWD##*/} IFS='_' read -ra ADDR <<< "$CURDIR_LAST" +# When pdk folder represents a device family, set a default SOC for that family +if [ ${ADDR[1]} == "jacinto" ]; then + ADDR[1]="am65xx" +fi +if [ ${ADDR[1]} == "sitara" ]; then + ADDR[1]="am64x" +fi if [ -z $PDK_SOC ]; then export PDK_SOC=${ADDR[1]} -- 2.26.2