Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | inherit kernel-uboot |
| 2 | |
| 3 | python __anonymous () { |
He Zhe | fe76b1e | 2016-05-25 04:47:16 -0400 | [diff] [blame] | 4 | kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or "" |
| 5 | if 'fitImage' in kerneltypes.split(): |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | depends = d.getVar("DEPENDS", True) |
| 7 | depends = "%s u-boot-mkimage-native dtc-native" % depends |
| 8 | d.setVar("DEPENDS", depends) |
| 9 | |
| 10 | # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal |
| 11 | # to kernel.bbclass . We have to override it, since we pack zImage |
| 12 | # (at least for now) into the fitImage . |
He Zhe | fe76b1e | 2016-05-25 04:47:16 -0400 | [diff] [blame] | 13 | typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or "" |
| 14 | if 'fitImage' in typeformake.split(): |
| 15 | d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', 'zImage')) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | |
| 17 | image = d.getVar('INITRAMFS_IMAGE', True) |
| 18 | if image: |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 19 | d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') |
| 20 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | } |
| 22 | |
Yannick Gicquel | d5813b4 | 2016-04-27 16:20:55 +0200 | [diff] [blame] | 23 | # Options for the device tree compiler passed to mkimage '-D' feature: |
| 24 | UBOOT_MKIMAGE_DTCOPTS ??= "" |
| 25 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | # |
| 27 | # Emit the fitImage ITS header |
| 28 | # |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 29 | # $1 ... .its filename |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | fitimage_emit_fit_header() { |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 31 | cat << EOF >> ${1} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | /dts-v1/; |
| 33 | |
| 34 | / { |
| 35 | description = "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"; |
| 36 | #address-cells = <1>; |
| 37 | EOF |
| 38 | } |
| 39 | |
| 40 | # |
| 41 | # Emit the fitImage section bits |
| 42 | # |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 43 | # $1 ... .its filename |
| 44 | # $2 ... Section bit type: imagestart - image section start |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 45 | # confstart - configuration section start |
| 46 | # sectend - section end |
| 47 | # fitend - fitimage end |
| 48 | # |
| 49 | fitimage_emit_section_maint() { |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 50 | case $2 in |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | imagestart) |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 52 | cat << EOF >> ${1} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 53 | |
| 54 | images { |
| 55 | EOF |
| 56 | ;; |
| 57 | confstart) |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 58 | cat << EOF >> ${1} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 59 | |
| 60 | configurations { |
| 61 | EOF |
| 62 | ;; |
| 63 | sectend) |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 64 | cat << EOF >> ${1} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 65 | }; |
| 66 | EOF |
| 67 | ;; |
| 68 | fitend) |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 69 | cat << EOF >> ${1} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 70 | }; |
| 71 | EOF |
| 72 | ;; |
| 73 | esac |
| 74 | } |
| 75 | |
| 76 | # |
| 77 | # Emit the fitImage ITS kernel section |
| 78 | # |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 79 | # $1 ... .its filename |
| 80 | # $2 ... Image counter |
| 81 | # $3 ... Path to kernel image |
| 82 | # $4 ... Compression type |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 83 | fitimage_emit_section_kernel() { |
| 84 | |
| 85 | kernel_csum="sha1" |
| 86 | |
| 87 | ENTRYPOINT=${UBOOT_ENTRYPOINT} |
| 88 | if test -n "${UBOOT_ENTRYSYMBOL}"; then |
| 89 | ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \ |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 90 | awk '$4=="${UBOOT_ENTRYSYMBOL}" {print $2}'` |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 91 | fi |
| 92 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 93 | cat << EOF >> ${1} |
| 94 | kernel@${2} { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 95 | description = "Linux kernel"; |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 96 | data = /incbin/("${3}"); |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 97 | type = "kernel"; |
| 98 | arch = "${UBOOT_ARCH}"; |
| 99 | os = "linux"; |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 100 | compression = "${4}"; |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 101 | load = <${UBOOT_LOADADDRESS}>; |
| 102 | entry = <${ENTRYPOINT}>; |
| 103 | hash@1 { |
| 104 | algo = "${kernel_csum}"; |
| 105 | }; |
| 106 | }; |
| 107 | EOF |
| 108 | } |
| 109 | |
| 110 | # |
| 111 | # Emit the fitImage ITS DTB section |
| 112 | # |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 113 | # $1 ... .its filename |
| 114 | # $2 ... Image counter |
| 115 | # $3 ... Path to DTB image |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 116 | fitimage_emit_section_dtb() { |
| 117 | |
| 118 | dtb_csum="sha1" |
| 119 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 120 | cat << EOF >> ${1} |
| 121 | fdt@${2} { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 122 | description = "Flattened Device Tree blob"; |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 123 | data = /incbin/("${3}"); |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 124 | type = "flat_dt"; |
| 125 | arch = "${UBOOT_ARCH}"; |
| 126 | compression = "none"; |
| 127 | hash@1 { |
| 128 | algo = "${dtb_csum}"; |
| 129 | }; |
| 130 | }; |
| 131 | EOF |
| 132 | } |
| 133 | |
| 134 | # |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 135 | # Emit the fitImage ITS ramdisk section |
| 136 | # |
| 137 | # $1 ... .its filename |
| 138 | # $2 ... Image counter |
| 139 | # $3 ... Path to ramdisk image |
| 140 | fitimage_emit_section_ramdisk() { |
| 141 | |
| 142 | ramdisk_csum="sha1" |
Rick Altherr | bc1b880 | 2017-01-20 11:28:53 -0800 | [diff] [blame] | 143 | ramdisk_ctype="none" |
Nathan Rossi | b4a4dc0 | 2016-10-21 22:07:27 +1000 | [diff] [blame] | 144 | ramdisk_loadline="" |
| 145 | ramdisk_entryline="" |
| 146 | |
| 147 | if [ -n "${UBOOT_RD_LOADADDRESS}" ]; then |
| 148 | ramdisk_loadline="load = <${UBOOT_RD_LOADADDRESS}>;" |
| 149 | fi |
| 150 | if [ -n "${UBOOT_RD_ENTRYPOINT}" ]; then |
| 151 | ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;" |
| 152 | fi |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 153 | |
Rick Altherr | bc1b880 | 2017-01-20 11:28:53 -0800 | [diff] [blame] | 154 | case $3 in |
| 155 | *.gz) |
| 156 | ramdisk_ctype="gzip" |
| 157 | ;; |
| 158 | *.bz2) |
| 159 | ramdisk_ctype="bzip2" |
| 160 | ;; |
| 161 | *.lzma) |
| 162 | ramdisk_ctype="lzma" |
| 163 | ;; |
| 164 | *.lzo) |
| 165 | ramdisk_ctype="lzo" |
| 166 | ;; |
| 167 | *.lz4) |
| 168 | ramdisk_ctype="lz4" |
| 169 | ;; |
| 170 | esac |
| 171 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 172 | cat << EOF >> ${1} |
| 173 | ramdisk@${2} { |
Rick Altherr | bc1b880 | 2017-01-20 11:28:53 -0800 | [diff] [blame] | 174 | description = "${INITRAMFS_IMAGE}"; |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 175 | data = /incbin/("${3}"); |
| 176 | type = "ramdisk"; |
| 177 | arch = "${UBOOT_ARCH}"; |
| 178 | os = "linux"; |
Rick Altherr | bc1b880 | 2017-01-20 11:28:53 -0800 | [diff] [blame] | 179 | compression = "${ramdisk_ctype}"; |
Nathan Rossi | b4a4dc0 | 2016-10-21 22:07:27 +1000 | [diff] [blame] | 180 | ${ramdisk_loadline} |
| 181 | ${ramdisk_entryline} |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 182 | hash@1 { |
| 183 | algo = "${ramdisk_csum}"; |
| 184 | }; |
| 185 | }; |
| 186 | EOF |
| 187 | } |
| 188 | |
| 189 | # |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 190 | # Emit the fitImage ITS configuration section |
| 191 | # |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 192 | # $1 ... .its filename |
| 193 | # $2 ... Linux kernel ID |
| 194 | # $3 ... DTB image ID |
| 195 | # $4 ... ramdisk ID |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 196 | fitimage_emit_section_config() { |
| 197 | |
| 198 | conf_csum="sha1" |
| 199 | |
| 200 | # Test if we have any DTBs at all |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 201 | if [ -z "${3}" -a -z "${4}" ] ; then |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 202 | conf_desc="Boot Linux kernel" |
| 203 | fdt_line="" |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 204 | ramdisk_line="" |
| 205 | elif [ -z "${4}" ]; then |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 206 | conf_desc="Boot Linux kernel with FDT blob" |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 207 | fdt_line="fdt = \"fdt@${3}\";" |
| 208 | ramdisk_line="" |
| 209 | elif [ -z "${3}" ]; then |
| 210 | conf_desc="Boot Linux kernel with ramdisk" |
| 211 | fdt_line="" |
| 212 | ramdisk_line="ramdisk = \"ramdisk@${4}\";" |
| 213 | else |
| 214 | conf_desc="Boot Linux kernel with FDT blob, ramdisk" |
| 215 | fdt_line="fdt = \"fdt@${3}\";" |
| 216 | ramdisk_line="ramdisk = \"ramdisk@${4}\";" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 217 | fi |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 218 | kernel_line="kernel = \"kernel@${2}\";" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 219 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 220 | cat << EOF >> ${1} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 221 | default = "conf@1"; |
| 222 | conf@1 { |
| 223 | description = "${conf_desc}"; |
| 224 | ${kernel_line} |
| 225 | ${fdt_line} |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 226 | ${ramdisk_line} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 227 | hash@1 { |
| 228 | algo = "${conf_csum}"; |
| 229 | }; |
| 230 | }; |
| 231 | EOF |
| 232 | } |
| 233 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 234 | # |
| 235 | # Assemble fitImage |
| 236 | # |
| 237 | # $1 ... .its filename |
| 238 | # $2 ... fitImage name |
| 239 | # $3 ... include ramdisk |
| 240 | fitimage_assemble() { |
| 241 | kernelcount=1 |
| 242 | dtbcount="" |
| 243 | ramdiskcount=${3} |
| 244 | rm -f ${1} arch/${ARCH}/boot/${2} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 245 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 246 | fitimage_emit_fit_header ${1} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 247 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 248 | # |
| 249 | # Step 1: Prepare a kernel image section. |
| 250 | # |
| 251 | fitimage_emit_section_maint ${1} imagestart |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 252 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 253 | uboot_prep_kimage |
| 254 | fitimage_emit_section_kernel ${1} "${kernelcount}" linux.bin "${linux_comp}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 255 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 256 | # |
| 257 | # Step 2: Prepare a DTB image section |
| 258 | # |
| 259 | if test -n "${KERNEL_DEVICETREE}"; then |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 260 | dtbcount=1 |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 261 | for DTB in ${KERNEL_DEVICETREE}; do |
| 262 | if echo ${DTB} | grep -q '/dts/'; then |
| 263 | bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." |
| 264 | DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` |
| 265 | fi |
| 266 | DTB_PATH="arch/${ARCH}/boot/dts/${DTB}" |
| 267 | if [ ! -e "${DTB_PATH}" ]; then |
| 268 | DTB_PATH="arch/${ARCH}/boot/${DTB}" |
| 269 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 270 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 271 | fitimage_emit_section_dtb ${1} ${dtbcount} ${DTB_PATH} |
| 272 | dtbcount=`expr ${dtbcount} + 1` |
| 273 | done |
| 274 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 275 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 276 | # |
| 277 | # Step 3: Prepare a ramdisk section. |
| 278 | # |
| 279 | if [ "x${ramdiskcount}" = "x1" ] ; then |
Rick Altherr | bc1b880 | 2017-01-20 11:28:53 -0800 | [diff] [blame] | 280 | # Find and use the first initramfs image archive type we find |
| 281 | for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do |
| 282 | initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${img}" |
| 283 | echo "Using $initramfs_path" |
| 284 | if [ -e "${initramfs_path}" ]; then |
| 285 | fitimage_emit_section_ramdisk ${1} "${ramdiskcount}" "${initramfs_path}" |
| 286 | break |
| 287 | fi |
| 288 | done |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 289 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 290 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 291 | fitimage_emit_section_maint ${1} sectend |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 292 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 293 | # Force the first Kernel and DTB in the default config |
| 294 | kernelcount=1 |
| 295 | dtbcount=1 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 296 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 297 | # |
| 298 | # Step 4: Prepare a configurations section |
| 299 | # |
| 300 | fitimage_emit_section_maint ${1} confstart |
| 301 | |
| 302 | fitimage_emit_section_config ${1} ${kernelcount} ${dtbcount} ${ramdiskcount} |
| 303 | |
| 304 | fitimage_emit_section_maint ${1} sectend |
| 305 | |
| 306 | fitimage_emit_section_maint ${1} fitend |
| 307 | |
| 308 | # |
| 309 | # Step 5: Assemble the image |
| 310 | # |
| 311 | uboot-mkimage \ |
| 312 | ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ |
| 313 | -f ${1} \ |
| 314 | arch/${ARCH}/boot/${2} |
| 315 | } |
| 316 | |
| 317 | do_assemble_fitimage() { |
| 318 | if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then |
| 319 | cd ${B} |
| 320 | fitimage_assemble fit-image.its fitImage |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 321 | fi |
| 322 | } |
| 323 | |
| 324 | addtask assemble_fitimage before do_install after do_compile |
| 325 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 326 | do_assemble_fitimage_initramfs() { |
| 327 | if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" && \ |
| 328 | test -n "${INITRAMFS_IMAGE}" ; then |
| 329 | cd ${B} |
| 330 | fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage-${INITRAMFS_IMAGE} 1 |
| 331 | fi |
| 332 | } |
| 333 | |
| 334 | addtask assemble_fitimage_initramfs before do_deploy after do_install |
| 335 | |
| 336 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 337 | kernel_do_deploy[vardepsexclude] = "DATETIME" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 338 | kernel_do_deploy_append() { |
| 339 | # Update deploy directory |
He Zhe | fe76b1e | 2016-05-25 04:47:16 -0400 | [diff] [blame] | 340 | if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 341 | cd ${B} |
| 342 | echo "Copying fit-image.its source file..." |
He Zhe | fe76b1e | 2016-05-25 04:47:16 -0400 | [diff] [blame] | 343 | its_base_name="fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}" |
| 344 | its_symlink_name=fitImage-its-${MACHINE} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 345 | install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its |
He Zhe | fe76b1e | 2016-05-25 04:47:16 -0400 | [diff] [blame] | 346 | linux_bin_base_name="fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}" |
| 347 | linux_bin_symlink_name=fitImage-linux.bin-${MACHINE} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 348 | install -m 0644 linux.bin ${DEPLOYDIR}/${linux_bin_base_name}.bin |
| 349 | |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 350 | if [ -n "${INITRAMFS_IMAGE}" ]; then |
| 351 | echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." |
Nathan Rossi | 578589a | 2016-10-21 22:07:28 +1000 | [diff] [blame] | 352 | its_initramfs_base_name="fitImage-its-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}" |
| 353 | its_initramfs_symlink_name=fitImage-its-${INITRAMFS_IMAGE}-${MACHINE} |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 354 | install -m 0644 fit-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/${its_initramfs_base_name}.its |
Nathan Rossi | 578589a | 2016-10-21 22:07:28 +1000 | [diff] [blame] | 355 | fit_initramfs_base_name="fitImage-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}" |
| 356 | fit_initramfs_symlink_name=fitImage-${INITRAMFS_IMAGE}-${MACHINE} |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 357 | install -m 0644 arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/${fit_initramfs_base_name}.bin |
| 358 | fi |
| 359 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 360 | cd ${DEPLOYDIR} |
| 361 | ln -sf ${its_base_name}.its ${its_symlink_name}.its |
| 362 | ln -sf ${linux_bin_base_name}.bin ${linux_bin_symlink_name}.bin |
George McCollister | 185c8ae | 2016-05-26 08:55:16 -0500 | [diff] [blame] | 363 | |
| 364 | if [ -n "${INITRAMFS_IMAGE}" ]; then |
| 365 | ln -sf ${its_initramfs_base_name}.its ${its_initramfs_symlink_name}.its |
| 366 | ln -sf ${fit_initramfs_base_name}.bin ${fit_initramfs_symlink_name}.bin |
| 367 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 368 | fi |
| 369 | } |