@@ -10,27 +10,44 @@ artifacts_structure() {
10
10
cd ${SOURCE_DIRECTORY}
11
11
mkdir ${timestamp}
12
12
13
- echo " git_branch=${BUILD_SOURCEBRANCHNAME} " >> ${timestamp} /rpi_git_properties.txt
14
- echo " git_sha=${GIT_SHA} " >> ${timestamp} /rpi_git_properties.txt
15
- echo " git_sha_date=${GIT_SHA_DATE} " >> ${timestamp} /rpi_git_properties.txt
13
+ typeBCM_32bit=( " bcm2709" " bcm2711" " bcmrpi" )
14
+ typeKERNEL_32bit=( " kernel7" " kernel7l" " kernel" )
15
+ typeBCM_64bit=( " bcm2711" " bcm2712" )
16
+ typeKERNEL_64bit=( " kernel8" " kernel_2712" )
16
17
17
- typeBCM=( " bcm2709" " bcm2711" " bcmrpi" )
18
- typeKERNEL=( " kernel7" " kernel7l" " kernel" )
19
- for index in " ${! typeBCM[@]} " ; do
20
- cd adi_" ${typeBCM[$index]} " _arm_defconfig
18
+ mkdir ${timestamp} /32bit
19
+ for index in " ${! typeBCM_32bit[@]} " ; do
20
+ cd adi_" ${typeBCM_32bit[$index]} " _arm_defconfig
21
21
mkdir modules
22
22
tar -xf rpi_modules.tar.gz -C modules
23
23
rm rpi_modules.tar.gz
24
- mv ./zImage ./" ${typeKERNEL [$index]} " .img
24
+ mv ./zImage ./" ${typeKERNEL_32bit [$index]} " .img
25
25
cd ../
26
- cp -r ./adi_" ${typeBCM [$index]} " _arm_defconfig/* ./${timestamp}
26
+ cp -r ./adi_" ${typeBCM_32bit [$index]} " _arm_defconfig/* ./${timestamp} /32bit
27
27
done
28
- if [ -z " $( ls ${SOURCE_DIRECTORY} /${timestamp} /* .dtb 2> /dev/null) " ] || [ -z " $( ls ${SOURCE_DIRECTORY} /${timestamp} /overlays/* .dtbo 2> /dev/null) " ]; then
29
- echo " Missing one or more required files"
28
+ if [ -z " $( ls ${SOURCE_DIRECTORY} /${timestamp} /32bit/ * .dtb 2> /dev/null) " ] || [ -z " $( ls ${SOURCE_DIRECTORY} /${timestamp} /32bit /overlays/* .dtbo 2> /dev/null) " ]; then
29
+ echo " Missing one or more required files from the 32bit artifacts. "
30
30
exit 1
31
31
fi
32
- tar -C ${SOURCE_DIRECTORY} /${timestamp} /modules -czvf ${SOURCE_DIRECTORY} /${timestamp} /rpi_modules.tar.gz .
33
- rm -r ${SOURCE_DIRECTORY} /${timestamp} /modules
32
+ tar -C ${SOURCE_DIRECTORY} /${timestamp} /32bit/modules -czvf ${SOURCE_DIRECTORY} /${timestamp} /32bit/rpi_modules_32bit.tar.gz .
33
+ rm -r ${SOURCE_DIRECTORY} /${timestamp} /32bit/modules
34
+
35
+ mkdir ${timestamp} /64bit
36
+ for index in " ${! typeBCM_64bit[@]} " ; do
37
+ cd adi_" ${typeBCM_64bit[$index]} " _arm64_defconfig
38
+ mkdir modules
39
+ tar -xf rpi_modules.tar.gz -C modules
40
+ rm rpi_modules.tar.gz
41
+ mv ./Image ./" ${typeKERNEL_64bit[$index]} " .img
42
+ cd ../
43
+ cp -r ./adi_" ${typeBCM_64bit[$index]} " _arm64_defconfig/* ./${timestamp} /64bit
44
+ done
45
+ if [ -z " $( ls ${SOURCE_DIRECTORY} /${timestamp} /64bit/* .dtb 2> /dev/null) " ] || [ -z " $( ls ${SOURCE_DIRECTORY} /${timestamp} /64bit/overlays/* .dtbo 2> /dev/null) " ]; then
46
+ echo " Missing one or more required files from the 64bit artifacts."
47
+ exit 1
48
+ fi
49
+ tar -C ${SOURCE_DIRECTORY} /${timestamp} /64bit/modules -czvf ${SOURCE_DIRECTORY} /${timestamp} /64bit/rpi_modules_64bit.tar.gz .
50
+ rm -r ${SOURCE_DIRECTORY} /${timestamp} /64bit/modules
34
51
}
35
52
36
53
# upload artifacts to Artifactory
@@ -39,34 +56,50 @@ artifacts_artifactory() {
39
56
cd ${SOURCE_DIRECTORY}
40
57
python ../ci/travis/upload_to_artifactory.py --base_path=" ${ARTIFACTORY_PATH} " \
41
58
--server_path=" linux_rpi/${BUILD_SOURCEBRANCHNAME} " --local_path=" ${timestamp} " \
42
- --token=" ${ARTIFACTORY_TOKEN} " --log_file=" upload_to_artifactory.log"
59
+ --token=" ${ARTIFACTORY_TOKEN} " --log_file=" upload_to_artifactory.log" \
60
+ --properties=" git_branch=$BUILD_SOURCEBRANCHNAME ;git_sha=$GIT_SHA ;git_sha_date=$GIT_SHA_DATE ;" \
61
+ --props_level=3
43
62
}
44
63
45
64
# archive artifacts and upload to SWDownloads
46
65
artifacts_swdownloads () {
47
66
artifacts_structure
48
- cd ${SOURCE_DIRECTORY} /${timestamp} || exit 1
49
67
chmod 600 ${KEY_FILE}
68
+
69
+ cd ${SOURCE_DIRECTORY} /${timestamp} /32bit || exit 1
50
70
scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss \
51
- -i ${KEY_FILE} -r * .tar.gz ${DEST_SERVER} /${BUILD_SOURCEBRANCHNAME}
52
- md5_modules=($( md5sum rpi_modules.tar.gz| cut -d ' ' -f 1) )
71
+ -i ${KEY_FILE} -r * .tar.gz ${DEST_SERVER} /../${BUILD_SOURCEBRANCHNAME}
72
+ md5_modules_32bit=($( md5sum rpi_modules_32bit.tar.gz| cut -d ' ' -f 1) )
73
+ rm rpi_modules_32bit.tar.gz
74
+ tar -C ${PWD} -czvf rpi_latest_boot_32bit.tar.gz *
75
+ md5_boot_32bit=($( md5sum rpi_latest_boot_32bit.tar.gz| cut -d ' ' -f 1) )
76
+ scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss \
77
+ -i ${KEY_FILE} -r rpi_latest_boot_32bit.tar.gz ${DEST_SERVER} /../${BUILD_SOURCEBRANCHNAME}
53
78
54
- rm rpi_modules.tar.gz rpi_git_properties.txt
55
- tar -C ${PWD} -czvf rpi_latest_boot.tar.gz *
56
- md5_boot=($( md5sum rpi_latest_boot.tar.gz| cut -d ' ' -f 1) )
79
+ cd ${SOURCE_DIRECTORY} /${timestamp} /64bit || exit 1
80
+ scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss \
81
+ -i ${KEY_FILE} -r * .tar.gz ${DEST_SERVER} /../${BUILD_SOURCEBRANCHNAME}
82
+ md5_modules_64bit=($( md5sum rpi_modules_64bit.tar.gz| cut -d ' ' -f 1) )
83
+ rm rpi_modules_64bit.tar.gz
84
+ tar -C ${PWD} -czvf rpi_latest_boot_64bit.tar.gz *
85
+ md5_boot_64bit=($( md5sum rpi_latest_boot_64bit.tar.gz| cut -d ' ' -f 1) )
57
86
scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss \
58
- -i ${KEY_FILE} -r rpi_latest_boot .tar.gz ${DEST_SERVER} /${BUILD_SOURCEBRANCHNAME}
87
+ -i ${KEY_FILE} -r rpi_latest_boot_64bit .tar.gz ${DEST_SERVER} /.. /${BUILD_SOURCEBRANCHNAME}
59
88
60
89
echo " git_branch=${BUILD_SOURCEBRANCHNAME} " >> rpi_archives_properties.txt
61
- echo " https://swdownloads.analog.com/cse/linux_rpi/${BUILD_SOURCEBRANCHNAME} /rpi_modules.tar.gz" >> rpi_archives_properties.txt
62
- echo " https://swdownloads.analog.com/cse/linux_rpi/${BUILD_SOURCEBRANCHNAME} /rpi_latest_boot.tar.gz" >> rpi_archives_properties.txt
63
- echo " checksum_modules=${md5_modules} " >> rpi_archives_properties.txt
64
- echo " checksum_boot_files=${md5_boot} " >> rpi_archives_properties.txt
90
+ echo " https://swdownloads.analog.com/cse/linux_rpi/${BUILD_SOURCEBRANCHNAME} /rpi_modules_32bit.tar.gz" >> rpi_archives_properties.txt
91
+ echo " https://swdownloads.analog.com/cse/linux_rpi/${BUILD_SOURCEBRANCHNAME} /rpi_latest_boot_32bit.tar.gz" >> rpi_archives_properties.txt
92
+ echo " checksum_modules_32bit=${md5_modules_32bit} " >> rpi_archives_properties.txt
93
+ echo " checksum_boot_files_32bit=${md5_boot_32bit} " >> rpi_archives_properties.txt
94
+ echo " https://swdownloads.analog.com/cse/linux_rpi/${BUILD_SOURCEBRANCHNAME} /rpi_modules_64bit.tar.gz" >> rpi_archives_properties.txt
95
+ echo " https://swdownloads.analog.com/cse/linux_rpi/${BUILD_SOURCEBRANCHNAME} /rpi_latest_boot_64bit.tar.gz" >> rpi_archives_properties.txt
96
+ echo " checksum_modules_64bit=${md5_modules_64bit} " >> rpi_archives_properties.txt
97
+ echo " checksum_boot_files_64bit=${md5_boot_64bit} " >> rpi_archives_properties.txt
65
98
echo " git_sha=${GIT_SHA} " >> rpi_archives_properties.txt
66
99
echo " git_sha_date=${GIT_SHA_DATE} " >> rpi_archives_properties.txt
67
100
68
101
scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss \
69
- -i ${KEY_FILE} -r rpi_archives_properties.txt ${DEST_SERVER} /${BUILD_SOURCEBRANCHNAME}
102
+ -i ${KEY_FILE} -r rpi_archives_properties.txt ${DEST_SERVER} /../ ${BUILD_SOURCEBRANCHNAME}
70
103
}
71
104
72
105
artifacts_${1}
0 commit comments