u-boot_%.bbappend 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
  2. SRC_URI_append_light = " \
  3. file://tftp-mmc-boot.txt \
  4. "
  5. SRC_URI_append_light = " \
  6. file://ice_evb_c910_defconfig.patch \
  7. "
  8. SRC_URI_append_freedom-u540_sota = " file://uEnv.txt"
  9. DEPENDS_append_freedom-u540 = " u-boot-tools-native"
  10. # Overwrite this for your server
  11. TFTP_SERVER_IP ?= "127.0.0.1"
  12. do_configure_prepend_freedom-u540() {
  13. sed -i -e 's,@SERVERIP@,${TFTP_SERVER_IP},g' ${WORKDIR}/tftp-mmc-boot.txt
  14. if [ -f "${WORKDIR}/${UBOOT_ENV}.txt" ]; then
  15. mkimage -O linux -T script -C none -n "U-Boot boot script" \
  16. -d ${WORKDIR}/${UBOOT_ENV}.txt ${WORKDIR}/boot.scr.uimg
  17. fi
  18. }
  19. do_deploy_append_freedom-u540() {
  20. if [ -f "${WORKDIR}/boot.scr.uimg" ]; then
  21. install -d ${DEPLOY_DIR_IMAGE}
  22. install -m 755 ${WORKDIR}/boot.scr.uimg ${DEPLOY_DIR_IMAGE}
  23. fi
  24. if [ -f "${WORKDIR}/uEnv.txt" ]; then
  25. install -d ${DEPLOY_DIR_IMAGE}
  26. install -m 755 ${WORKDIR}/uEnv.txt ${DEPLOY_DIR_IMAGE}
  27. fi
  28. }
  29. FILES_${PN}_append_freedom-u540 = " /boot/boot.scr.uimg"