u-boot-starfive.bb 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 = "88c4bf23b45f807c9c4173ef24dc84c3e75b67bc"
  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. file://0001-include-configs-starfive-dubhe-fpga.h-Mask-ttyS0-and.patch \
  21. "
  22. SRC_URI:starfive-visionfive2 = "\
  23. git://github.com/${FORK}/u-boot.git;protocol=ssh;branch=${BRANCH} \
  24. file://vf2_uEnv.txt \
  25. file://vf2_nvme_uEnv.txt \
  26. file://tftp-mmc-boot.txt \
  27. file://visionfive2-fit-image.its \
  28. file://uboot_disable_logo.patch \
  29. "
  30. SRC_URI:starfive-jh8100 = "\
  31. git://git@192.168.110.45/${FORK}/u-boot.git;protocol=ssh;branch=${BRANCH} \
  32. file://tftp-mmc-boot.txt \
  33. file://run_qemu_virt.dtb \
  34. "
  35. DEPENDS:append:starfive-dubhe = " u-boot-tools-native bmap-tools-native opensbi"
  36. DEPENDS:append:starfive-visionfive2 = " u-boot-tools-native starfive-tool-native"
  37. DEPENDS:append:starfive-jh8100 = " u-boot-tools-native bmap-tools-native opensbi"
  38. # Overwrite this for your server
  39. TFTP_SERVER_IP ?= "127.0.0.1"
  40. do_configure:prepend:starfive-visionfive2() {
  41. sed -i -e 's,@SERVERIP@,${TFTP_SERVER_IP},g' ${WORKDIR}/tftp-mmc-boot.txt
  42. mkimage -O linux -T script -C none -n "U-Boot boot script" \
  43. -d ${WORKDIR}/tftp-mmc-boot.txt ${WORKDIR}/${UBOOT_ENV_BINARY}
  44. }
  45. do_configure:prepend:starfive-jh8100() {
  46. sed -i -e 's,@SERVERIP@,${TFTP_SERVER_IP},g' ${WORKDIR}/tftp-mmc-boot.txt
  47. mkimage -O linux -T script -C none -n "U-Boot boot script" \
  48. -d ${WORKDIR}/tftp-mmc-boot.txt ${WORKDIR}/${UBOOT_ENV_BINARY}
  49. }
  50. do_configure:prepend:starfive-dubhe() {
  51. cp ${DEPLOY_DIR_IMAGE}/fw_dynamic.bin ${WORKDIR}/build/fw_dynamic.bin
  52. export OPENSBI=${WORKDIR}/build/fw_dynamic.bin
  53. }
  54. do_configure:prepend:starfive-jh8100() {
  55. cp ${DEPLOY_DIR_IMAGE}/fw_dynamic.bin ${WORKDIR}/build/fw_dynamic.bin
  56. export OPENSBI=${WORKDIR}/build/fw_dynamic.bin
  57. }
  58. do_deploy:append:starfive-visionfive2() {
  59. install -m 644 ${WORKDIR}/vf2_nvme_uEnv.txt ${DEPLOYDIR}/vf2_nvme_uEnv.txt
  60. install -m 644 ${WORKDIR}/vf2_uEnv.txt ${DEPLOYDIR}/vf2_uEnv.txt
  61. install -m 644 ${WORKDIR}/visionfive2-fit-image.its ${DEPLOYDIR}/visionfive2-fit-image.its
  62. spl_tool -c -f ${DEPLOYDIR}/${SPL_IMAGE}
  63. ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_BINARYNAME}.normal.out
  64. ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_SYMLINK}.normal.out
  65. }
  66. do_deploy:append:starfive-dubhe() {
  67. install -m 644 ${WORKDIR}/build/u-boot.itb ${DEPLOYDIR}/u-boot.itb
  68. rm ${WORKDIR}/build/fw_dynamic.bin
  69. install -m 644 ${WORKDIR}/run_qemu_virt.dtb ${DEPLOYDIR}/run_qemu_virt.dtb
  70. }
  71. do_deploy:append:starfive-jh8100() {
  72. install -m 644 ${WORKDIR}/build/u-boot.itb ${DEPLOYDIR}/u-boot.itb
  73. rm ${WORKDIR}/build/fw_dynamic.bin
  74. install -m 644 ${WORKDIR}/run_qemu_virt.dtb ${DEPLOYDIR}/run_qemu_virt.dtb
  75. }
  76. TOOLCHAIN = "gcc"
  77. COMPATIBLE_MACHINE = "(starfive-dubhe|starfive-visionfive2|starfive-jh8100)"