Code review comment for ~robertliu/+git/kernel-snap:uc22-add-custom-firmware

Revision history for this message
Ondrej Kubik (ondrak) wrote :

I think this can be done in in simpler way.
I assume you are remove firmware trimming, in order to preserve things from "firmware-custom" part.
In this case, simply build firmware-custom part after kernel part, then trimming is done before firmware-custom is primed.

Diff would be then:
+ firmware-custom:
+ after:
+ - kernel
+ plugin: nil
+ override-pull: |
+ # allow custom source definition
+ if [ -n "${SNAPDRAGON_KERNEL_SNAP_FIRMWARE:-}" ]; then
+ if [ -d ${SNAPDRAGON_KERNEL_SNAP_FIRMWARE} ]; then
+ cp -r ${SNAPDRAGON_KERNEL_SNAP_FIRMWARE}/* ${SNAPCRAFT_PART_SRC}
+ else
+ git clone --depth 1 ${SNAPDRAGON_KERNEL_SNAP_FIRMWARE} ${SNAPCRAFT_PART_SRC}
+ fi
+ else
+ echo "Missing env SNAPDRAGON_KERNEL_SNAP_FIRMWARE no custom firmware will be included"
+ touch no-snapdragon-kernel-snap-firmware
+ fi
+ override-build: |
+ mkdir -p ${SNAPCRAFT_PART_INSTALL}/firmware/qcom/sa8155p
+ cp -r * ${SNAPCRAFT_PART_INSTALL}/firmware/qcom/sa8155p

« Back to merge proposal