u-boot-starfive.bb 3.5 KB

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