Browse Source

Merge tag 'JH7110_MM_v4.0.0-rc1' into vf2-515-devel

version JH7110_MM_v4.0.0-rc1 for JH7110 EVB board merge from tag JH7110_515_SDK_v4.0.0-rc1
Andy Hu 1 year ago
parent
commit
1a12dfd5d3
6 changed files with 45 additions and 4 deletions
  1. 11 1
      Makefile
  2. 28 1
      README.md
  3. 1 0
      conf/buildroot_initramfs_config
  4. 3 0
      conf/buildroot_rootfs_config
  5. 1 1
      opensbi
  6. 1 1
      soft_3rdpart

+ 11 - 1
Makefile

@@ -42,6 +42,7 @@ vmlinux := $(linux_wrkdir)/vmlinux
 vmlinux_stripped := $(linux_wrkdir)/vmlinux-stripped
 vmlinux_bin := $(wrkdir)/vmlinux.bin
 module_install_path:=$(wrkdir)/module_install_path
+perf_tool_path := $(linux_srcdir)/tools/perf
 
 its_file=$(confdir)/$(HWBOARD)-fit-image.its
 uboot_its_file=$(confdir)/$(HWBOARD)-uboot-fit-image.its
@@ -176,6 +177,7 @@ $(buildroot_rootfs_wrkdir)/.config: $(buildroot_srcdir) $(buildroot_initramfs_ta
 $(buildroot_rootfs_ext): $(buildroot_srcdir) $(buildroot_rootfs_wrkdir)/.config $(target_gcc) $(buildroot_rootfs_config) $(version)	
 	mkdir -p $(buildroot_rootfs_wrkdir)/target/lib/
 	cp -r $(module_install_path)/lib/modules $(buildroot_rootfs_wrkdir)/target/lib/
+	cp $(perf_tool_path)/perf $(buildroot_rootfs_wrkdir)/usr/bin/
 	$(MAKE) -C $< RISCV=$(RISCV) PATH=$(RVPATH) O=$(buildroot_rootfs_wrkdir)
 	cp $(version) $(buildroot_rootfs_wrkdir)/target/usr/bin/version
 	rm -rf $(buildroot_rootfs_ext)
@@ -238,14 +240,22 @@ vpudriver-build: $(vmlinux)
 	$(MAKE) -C $(buildroot_initramfs_wrkdir) O=$(buildroot_initramfs_wrkdir) \
 		INSTALL_MOD_PATH=$(module_install_path) codaj12driver
 
+linux-tools-build: $(vmlinux)
+	$(MAKE) -C $(perf_tool_path) \
+		ARCH=riscv \
+		CROSS_COMPILE=$(CROSS_COMPILE) \
+		WERROR=0 NO_GTK2=1 NO_LIBPERL=1 \
+		NO_LIBBIONIC=1
+
 .PHONY: initrd
 initrd: $(initramfs)
 
 $(initramfs).d: $(buildroot_initramfs_sysroot)
 	$(linux_srcdir)/usr/gen_initramfs_list.sh -l $(confdir)/initramfs.txt $(buildroot_initramfs_sysroot) > $@
 
-$(initramfs): $(buildroot_initramfs_sysroot) $(vmlinux) vpudriver-build $(version)
+$(initramfs): $(buildroot_initramfs_sysroot) $(vmlinux) vpudriver-build $(version) linux-tools-build
 	cp -r $(module_install_path)/lib/modules $(buildroot_initramfs_sysroot)/lib/
+	cp $(perf_tool_path)/perf $(buildroot_initramfs_sysroot)/usr/bin/
 	cp $(version) $(buildroot_initramfs_sysroot)/usr/bin/version && \
 	cd $(linux_wrkdir) && \
 		$(linux_srcdir)/usr/gen_initramfs_list.sh \

+ 28 - 1
README.md

@@ -333,8 +333,35 @@ old_desc_blocks = 2, new_desc_blocks = 118
 The filesystem on /dev/mmcblk1p4 is now 30859756 (1k) blocks long.
 ```
 
-## APPENDIX II: Using DTB Overlay Dynamically
+If you need to add a new partition, such as a swap partition (here we do set the rest of disk space to swap partition,
+but normally swap partition size should be the same as DDR size or double of DDR size),
+you can use the following shell script afer the image running on board:
+
+```bash
+#!bin/sh
+sgdisk -e /dev/mmcblk0
+disk=/dev/mmcblk0
+gdisk $disk << EOF
+p
+n
+5
+
+
+8200
+p
+c
+5
+hibernation
+w
+y
+EOF
+
+mkswap /dev/mmcblk0p5
+swapoff -a
+swapon /dev/mmcblk0p5
+```
 
+## APPENDIX II: Using DTB Overlay Dynamically
 The system support loading dtb overlay dynamically when the board is running. Run below on board:
 
 ```

+ 1 - 0
conf/buildroot_initramfs_config

@@ -144,6 +144,7 @@ BR2_PACKAGE_GPTFDISK_SGDISK=y
 BR2_PACKAGE_I2C_TOOLS=y
 BR2_PACKAGE_MEMTESTER=y
 BR2_PACKAGE_PCIUTILS=y
+BR2_PACKAGE_RNG_TOOLS=y
 BR2_PACKAGE_SYSSTAT=y
 BR2_PACKAGE_PYTHON3=y
 BR2_PACKAGE_LIBKCAPI=y

+ 3 - 0
conf/buildroot_rootfs_config

@@ -129,6 +129,7 @@ BR2_PACKAGE_GPTFDISK_SGDISK=y
 BR2_PACKAGE_I2C_TOOLS=y
 BR2_PACKAGE_MEMTESTER=y
 BR2_PACKAGE_PCIUTILS=y
+BR2_PACKAGE_RNG_TOOLS=y
 BR2_PACKAGE_SYSSTAT=y
 BR2_PACKAGE_PYTHON3=y
 BR2_PACKAGE_LIBKCAPI=y
@@ -147,6 +148,8 @@ BR2_PACKAGE_LIBCAMERA=y
 BR2_PACKAGE_LIBCAMERA_V4L2=y
 BR2_PACKAGE_LIBCAMERA_PIPELINE_UVCVIDEO=y
 BR2_PACKAGE_LIBCAMERA_PIPELINE_STARFIVE=y
+BR2_PACKAGE_LIBCAP=y
+BR2_PACKAGE_LIBCAP_TOOLS=y
 BR2_PACKAGE_LIBEVENT=y
 BR2_PACKAGE_MSMTP=y
 BR2_PACKAGE_BLUEZ5_UTILS=y

+ 1 - 1
opensbi

@@ -1 +1 @@
-Subproject commit 6f1fe98c2f565a394f258178b0daa3843672395c
+Subproject commit 88c5d8a9ca1e338beaee1bd6c24189f68a65da98

+ 1 - 1
soft_3rdpart

@@ -1 +1 @@
-Subproject commit 13975a3826bb98bd9a201780131262b6dd373452
+Subproject commit 0cff7b23ca852c49cab830dcf4d73f0126ce3926