u-boot-starfive.bb 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. require recipes-bsp/u-boot/u-boot-common.inc
  2. require recipes-bsp/u-boot/u-boot.inc
  3. inherit uboot-extlinux-config
  4. LIC_FILES_CHKSUM:starfive-dubhe = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1"
  5. LIC_FILES_CHKSUM:starfive-visionfive2 = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025"
  6. LIC_FILES_CHKSUM:starfive-jh8100 = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1"
  7. FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
  8. FORK:starfive-dubhe = "starfive-tech"
  9. BRANCH:starfive-dubhe = "dubhe_fpga_dev_v2023.10"
  10. SRCREV:starfive-dubhe = "85c7554283547d5ab9dca94427a74a691132cebf"
  11. FORK:starfive-visionfive2 = "starfive-tech"
  12. BRANCH:starfive-visionfive2 = "JH7110_VisionFive2_devel"
  13. SRCREV:starfive-visionfive2 = "b6e2b0e85c774a18ae668223a6e5f7d335895243"
  14. FORK:starfive-jh8100 = "starfive-tech"
  15. BRANCH:starfive-jh8100 = "jh8100_fpga_dev_v2023.01_bmc"
  16. SRCREV:starfive-jh8100 = "94b4b620567e8b87fe9002b5b623043830aff8a8"
  17. SRC_URI:starfive-dubhe = "\
  18. git://github.com/${FORK}/u-boot.git;protocol=https;branch=${BRANCH} \
  19. file://run_qemu_virt.dtb \
  20. "
  21. SRC_URI:starfive-visionfive2 = "\
  22. git://github.com/${FORK}/u-boot.git;protocol=ssh;branch=${BRANCH} \
  23. file://vf2_uEnv.txt \
  24. file://vf2_nvme_uEnv.txt \
  25. file://tftp-mmc-boot.txt \
  26. file://visionfive2-fit-image.its \
  27. file://uboot_disable_logo.patch \
  28. "
  29. SRC_URI:starfive-jh8100 = "\
  30. git://git@192.168.110.45/${FORK}/u-boot.git;protocol=ssh;branch=${BRANCH} \
  31. file://tftp-mmc-boot.txt \
  32. file://run_qemu_virt.dtb \
  33. "
  34. DEPENDS:append:starfive-dubhe = " u-boot-tools-native bmap-tools-native opensbi"
  35. DEPENDS:append:starfive-visionfive2 = " u-boot-tools-native starfive-tool-native"
  36. DEPENDS:append:starfive-jh8100 = " u-boot-tools-native bmap-tools-native opensbi"
  37. # Overwrite this for your server
  38. TFTP_SERVER_IP ?= "127.0.0.1"
  39. do_configure:prepend:starfive-visionfive2() {
  40. sed -i -e 's,@SERVERIP@,${TFTP_SERVER_IP},g' ${WORKDIR}/tftp-mmc-boot.txt
  41. mkimage -O linux -T script -C none -n "U-Boot boot script" \
  42. -d ${WORKDIR}/tftp-mmc-boot.txt ${WORKDIR}/${UBOOT_ENV_BINARY}
  43. }
  44. do_configure:prepend:starfive-jh8100() {
  45. sed -i -e 's,@SERVERIP@,${TFTP_SERVER_IP},g' ${WORKDIR}/tftp-mmc-boot.txt
  46. mkimage -O linux -T script -C none -n "U-Boot boot script" \
  47. -d ${WORKDIR}/tftp-mmc-boot.txt ${WORKDIR}/${UBOOT_ENV_BINARY}
  48. }
  49. do_configure:prepend:starfive-dubhe() {
  50. cp ${DEPLOY_DIR_IMAGE}/fw_dynamic.bin ${WORKDIR}/build/fw_dynamic.bin
  51. export OPENSBI=${WORKDIR}/build/fw_dynamic.bin
  52. }
  53. do_configure:prepend:starfive-jh8100() {
  54. cp ${DEPLOY_DIR_IMAGE}/fw_dynamic.bin ${WORKDIR}/build/fw_dynamic.bin
  55. export OPENSBI=${WORKDIR}/build/fw_dynamic.bin
  56. }
  57. do_deploy:append:starfive-visionfive2() {
  58. install -m 644 ${WORKDIR}/vf2_nvme_uEnv.txt ${DEPLOYDIR}/vf2_nvme_uEnv.txt
  59. install -m 644 ${WORKDIR}/vf2_uEnv.txt ${DEPLOYDIR}/vf2_uEnv.txt
  60. install -m 644 ${WORKDIR}/visionfive2-fit-image.its ${DEPLOYDIR}/visionfive2-fit-image.its
  61. spl_tool -c -f ${DEPLOYDIR}/${SPL_IMAGE}
  62. ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_BINARYNAME}.normal.out
  63. ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_SYMLINK}.normal.out
  64. }
  65. do_deploy:append:starfive-dubhe() {
  66. install -m 644 ${WORKDIR}/build/u-boot.itb ${DEPLOYDIR}/u-boot.itb
  67. rm ${WORKDIR}/build/fw_dynamic.bin
  68. install -m 644 ${WORKDIR}/run_qemu_virt.dtb ${DEPLOYDIR}/run_qemu_virt.dtb
  69. }
  70. do_deploy:append:starfive-jh8100() {
  71. install -m 644 ${WORKDIR}/build/u-boot.itb ${DEPLOYDIR}/u-boot.itb
  72. rm ${WORKDIR}/build/fw_dynamic.bin
  73. install -m 644 ${WORKDIR}/run_qemu_virt.dtb ${DEPLOYDIR}/run_qemu_virt.dtb
  74. }
  75. TOOLCHAIN = "gcc"
  76. COMPATIBLE_MACHINE = "(starfive-dubhe|starfive-visionfive2|starfive-jh8100)"