u-boot-starfive.bb 3.4 KB

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