package-initrd 530 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. set -e
  3. cd $(dirname $0)/..
  4. source scripts/version
  5. BUILD=$(pwd)/build
  6. INITRD_DIR=${BUILD}/initrd
  7. ARTIFACTS=$(pwd)/dist/artifacts
  8. mkdir -p ${ARTIFACTS}
  9. if [ ! -f ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ]; then
  10. echo "skipping package-initrd due to ARM build? (no kernel artifact)"
  11. exit 0
  12. fi
  13. if [ "$COMPRESS" == "" ]; then
  14. COMPRESS="gzip -1"
  15. fi
  16. cd ${INITRD_DIR}
  17. echo Creating ${ARTIFACTS}/${INITRD}
  18. find | cpio -H newc -o | ${COMPRESS} > ${ARTIFACTS}/${INITRD}
  19. echo Done creating ${ARTIFACTS}/${INITRD}