u-boot_%.bbappend 1.0 KB

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