linux-starfive-dev_6.1.20.bb 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. require linux-mainline-common.inc
  2. FILESEXTRAPATHS =. "${FILE_DIRNAME}/linux-starfive:"
  3. SUMMARY = "StarFive Dubhe kernel recipe"
  4. LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
  5. KERNEL_VERSION_SANITY_SKIP = "1"
  6. SRCREV = "${AUTOREV}"
  7. BRANCH = "master"
  8. FORK:starfive-dubhe = "starfive-tech"
  9. BRANCH:starfive-dubhe = "starfive-6.1-dubhe"
  10. SRCREV:starfive-dubhe = "1e3b15b8f416e8d26af7bff467d8debc3f1f5fd9"
  11. FORK:starfive-jh8100 = "starfive-tech"
  12. BRANCH:starfive-jh8100 = "starfive-6.1-dev-jh8100-bmc"
  13. SRCREV:starfive-jh8100 ="602adfee5440add362c13535b9f7d4d2647e2526"
  14. LINUX_VERSION ?= "6.1.20"
  15. LINUX_VERSION:starfive-dubhe = "6.1.20"
  16. LINUX_VERSION:starfive-jh8100 = "6.1.20"
  17. LINUX_VERSION_EXTENSTION:append:starfive-dubhe = "-starlight"
  18. FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
  19. SRC_URI:starfive-dubhe = " \
  20. git://git@192.168.110.45/${FORK}/linux.git;protocol=ssh;branch=${BRANCH} \
  21. file://cpio.cfg \
  22. file://add-dubhe-additional-dtb.patch \
  23. "
  24. SRC_URI:starfive-jh8100 = "git://git@192.168.110.45/${FORK}/linux.git;protocol=ssh;branch=${BRANCH}"
  25. INITRAMFS_IMAGE_BUNDLE:starfive-dubhe = "1"
  26. INITRAMFS_IMAGE:starfive-dubhe = "dubhe-image-initramfs"
  27. KBUILD_DEFCONFIG:starfive-dubhe = "starfive_dubhe_defconfig"
  28. KBUILD_DEFCONFIG:starfive-jh8100 = "jh8100_defconfig"
  29. COMPATIBLE_MACHINE = "(starfive-dubhe|starfive-jh8100)"
  30. FILES:${KERNEL_PACKAGE_NAME}-base += "/usr/*"
  31. BOOTARGS_EXT4 = "console=ttySIF0,115200 earlycon=sbi root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait ip=:::255.255.255.0::eth0:dhcp"
  32. BOOTARGS_UBI = "console=ttySIF0,115200 earlycon=sbi ip=:::255.255.255.0::eth0:dhcp root=ubi0:starfive-dubhe-rootfs ubi.mtd=1 rw rootfstype=ubifs rootwait"
  33. BOOTARGS_NFS = "console=ttySIF0,115200 earlycon=sbi root=/dev/nfs rw nfsroot=192.168.1.1:/filepath,rw,tcp,vers=3 ip=:::255.255.255.0::eth0:dhcp rootfstype=ext4 rootwait"
  34. do_configure:append:starfive-dubhe() {
  35. cp ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga_ext4.dts
  36. cp ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga_ubi.dts
  37. cp ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga_nfs.dts
  38. cp ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga_ext4.dts
  39. cp ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga_ubi.dts
  40. cp ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga_nfs.dts
  41. for dts_file in ${S}/arch/riscv/boot/dts/starfive/dubhe*0_fpga_*.dts; do
  42. if [ "$dts_file" = "${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga_dual.dts" ]; then
  43. continue
  44. fi
  45. echo -e "/ {" >> "$dts_file"
  46. echo -e "\tchosen {" >> "$dts_file"
  47. echo -e "\t\tbootargs" >> "$dts_file"
  48. echo -e "\t};" >> "$dts_file"
  49. echo -e "};" >> "$dts_file"
  50. done
  51. sed -i "s+bootargs+bootargs = \"${BOOTARGS_EXT4}\";+g" ${S}/arch/riscv/boot/dts/starfive/dubhe*0_fpga_ext4.dts
  52. sed -i "s+bootargs+bootargs = \"${BOOTARGS_UBI}\";+g" ${S}/arch/riscv/boot/dts/starfive/dubhe*0_fpga_ubi.dts
  53. sed -i "s+bootargs+bootargs = \"${BOOTARGS_NFS}\";+g" ${S}/arch/riscv/boot/dts/starfive/dubhe*0_fpga_nfs.dts
  54. }