Procházet zdrojové kódy

Merge branch 'CR_1473_tf_booting_515_Andy.Hu' into 'jh7110-devel'

Cr 1473: TF Booting: Fix issues to build and generate the tf booting card

See merge request sdk/freelight-u-sdk!60
andy.hu před 1 rokem
rodič
revize
5124008eaa
6 změnil soubory, kde provedl 410 přidání a 100 odebrání
  1. 38 30
      Makefile
  2. 174 20
      README.md
  3. 87 0
      build_soft_3rdpart.sh
  4. 10 1
      conf/buildroot_initramfs_config
  5. 56 4
      conf/buildroot_rootfs_config
  6. 45 45
      conf/evb-fit-image.its

+ 38 - 30
Makefile

@@ -152,7 +152,6 @@ $(buildroot_rootfs_ext): $(buildroot_srcdir) $(buildroot_rootfs_wrkdir)/.config
 
 .PHONY: buildroot_rootfs
 buildroot_rootfs: $(buildroot_rootfs_ext)
-	cp $< $@
 
 .PHONY: buildroot_rootfs-menuconfig
 buildroot_rootfs-menuconfig: $(buildroot_rootfs_wrkdir)/.config $(buildroot_srcdir)
@@ -220,11 +219,15 @@ linux-menuconfig: $(linux_wrkdir)/.config
 	$(MAKE) -C $(linux_srcdir) O=$(dir $<) ARCH=riscv savedefconfig
 	cp $(dir $<)defconfig $(linux_defconfig)
 
+# Note: opensbi generic platform default FW_TEXT_START is 0x80000000
+#     For JH7110, need to specify the FW_TEXT_START to 0x40000000
+#     Otherwise, the fw_payload.bin downloading via jtag will not run.
+#     not affect the evb_fw_payload.img for its file has FW_TEXT_START
 $(sbi_bin): $(uboot) $(vmlinux)
 	rm -rf $(sbi_wrkdir)
 	mkdir -p $(sbi_wrkdir)
 	cd $(sbi_wrkdir) && O=$(sbi_wrkdir) CFLAGS="-mabi=$(ABI) -march=$(ISA)" ${MAKE} -C $(sbi_srcdir) CROSS_COMPILE=$(CROSS_COMPILE) \
-		PLATFORM=generic FW_PAYLOAD_PATH=$(uboot) FW_FDT_PATH=$(uboot_dtb_file)
+		PLATFORM=generic FW_PAYLOAD_PATH=$(uboot) FW_FDT_PATH=$(uboot_dtb_file) FW_TEXT_START=0x40000000
 
 $(fit): $(sbi_bin) $(vmlinux_bin) $(uboot) $(its_file) ${initramfs}
 	$(uboot_wrkdir)/tools/mkimage -f $(its_file) -A riscv -O linux -T flat_dt $@
@@ -324,24 +327,28 @@ qemu-rootfs: $(qemu) $(sbi_bin) $(vmlinux) $(initramfs) $(rootfs)
 .PHONY: uboot
 uboot: $(uboot)
 
-# Relevant partition type codes
-SPL		= 2E54B353-1271-4842-806F-E436D6AF6985
-VFAT            = EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
-LINUX		= 0FC63DAF-8483-4772-8E79-3D69D8477DE4
-UBOOT		= 5B193300-FC78-40CD-8002-E86C45580B47
-UBOOTENV	= a09354ac-cd63-11e8-9aff-70b3d592f0fa
-UBOOTDTB	= 070dd1a8-cd64-11e8-aa3d-70b3d592f0fa
-UBOOTFIT	= 04ffcafa-cd65-11e8-b974-70b3d592f0fa
-
-SPL_START=2048
-SPL_END=6143
-UBOOT_START=6144
-UBOOT_END=16385
-UBOOT_SIZE=12288
-VFAT_START=16386
-VFAT_END=425985
-VFAT_SIZE=204800
-ROOT_START=425986
+# Relevant partition type codes with GUID
+SPL         = 2E54B353-1271-4842-806F-E436D6AF6985
+VFAT        = EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
+LINUX       = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
+UBOOT       = 5B193300-FC78-40CD-8002-E86C45580B47
+UBOOTENV    = a09354ac-cd63-11e8-9aff-70b3d592f0fa
+UBOOTDTB    = 070dd1a8-cd64-11e8-aa3d-70b3d592f0fa
+UBOOTFIT    = 04ffcafa-cd65-11e8-b974-70b3d592f0fa
+
+# Note: The following are the sector number used to partition
+#   The default sector size is 512 Bytes
+#   The partition start should be align on 2048-sector boundaries
+# expand the vfat size to 300+M for the vpu/jpu or other debug
+SPL_START   = 2048
+SPL_END     = 6143
+UBOOT_START = 6144
+UBOOT_END   = 16383
+UBOOT_SIZE  = $(shell expr $(UBOOT_END) - $(UBOOT_START) + 1)
+VFAT_START  = 16384
+VFAT_END    = 614399
+VFAT_SIZE   = $(shell expr $(VFAT_END) - $(VFAT_START) + 1)
+ROOT_START  = 614400
 
 $(vfat_image): $(fit) $(confdir)/jh7110_uEnv.txt
 	@if [ `du --apparent-size --block-size=512 $(uboot) | cut -f 1` -ge $(UBOOT_SIZE) ]; then \
@@ -355,11 +362,11 @@ $(vfat_image): $(fit) $(confdir)/jh7110_uEnv.txt
 .PHONY: format-boot-loader
 format-boot-loader: $(sbi_bin) $(uboot) $(fit) $(vfat_image)
 	@test -b $(DISK) || (echo "$(DISK): is not a block device"; exit 1)
-	/sbin/sgdisk --clear  \
-		--new=1:$(SPL_START):$(SPL_END)  	--change-name=1:"spl"	--typecode=1:$(SPL)   \
-		--new=2:$(UBOOT_START):$(UBOOT_END)     --change-name=2:uboot	--typecode=2:$(UBOOT) \
-		--new=3:$(VFAT_START):$(VFAT_END)     --change-name=3:image	--typecode=2:$(VFAT) \
-		--new=4:$(ROOT_START):0 		--change-name=4:root	--typecode=4:$(LINUX) \
+	sudo /sbin/sgdisk --clear  \
+		--new=1:$(SPL_START):$(SPL_END)     --change-name=1:"spl"   --typecode=1:$(SPL)   \
+		--new=2:$(UBOOT_START):$(UBOOT_END) --change-name=2:"uboot" --typecode=2:$(UBOOT) \
+		--new=3:$(VFAT_START):$(VFAT_END)   --change-name=3:"image" --typecode=3:$(VFAT)  \
+		--new=4:$(ROOT_START):0             --change-name=4:"root"  --typecode=4:$(LINUX) \
 		$(DISK)
 	-/sbin/partprobe
 	@sleep 1
@@ -382,27 +389,28 @@ else
 	@echo Error: Could not find bootloader partition for $(DISK)
 	@exit 1
 endif
-	#dd if=$(spl_payload)   of=$(PART1) bs=4096
-	dd if=$(uboot_fit) of=$(PART2) bs=4096
-	dd if=$(vfat_image) of=$(PART3) bs=4096
+#	sudo dd if=$(spl_payload)   of=$(PART1) bs=4096
+	sudo dd if=$(uboot_fit)  of=$(PART2) bs=4096
+	sudo dd if=$(vfat_image) of=$(PART3) bs=4096
+	sync; sleep 1;
 
 #starfive image
 format-rootfs-image: format-boot-loader
 	@echo "Done setting up basic initramfs boot. We will now try to install"
 	@echo "a Debian snapshot to the Linux partition, which requires sudo"
 	@echo "you can safely cancel here"
-	/sbin/mke2fs -t ext4 $(PART4)
+	sudo /sbin/mke2fs -t ext4 $(PART4)
 	-mkdir -p tmp-mnt
 	-mkdir -p tmp-rootfs
 	-sudo mount $(PART4) tmp-mnt && \
 		sudo mount -o loop $(buildroot_rootfs_ext) tmp-rootfs&& \
 		sudo cp -fr tmp-rootfs/* tmp-mnt/
+	sync; sleep 1;
 	sudo umount tmp-mnt
 	sudo umount tmp-rootfs
 	rmdir tmp-mnt
 	rmdir tmp-rootfs
 
-
 #usb config
 format-usb-disk: $(sbi_bin) $(uboot) $(fit) $(vfat_image)
 	@test -b $(DISK) || (echo "$(DISK): is not a block device"; exit 1)

+ 174 - 20
README.md

@@ -1,36 +1,190 @@
 # StarFiveTech Freedom Unleashed SDK
 
 This builds a complete RISC-V cross-compile toolchain for the StarFiveTech Freedom
-JH7100 SoC. It also builds U-boot and a flattened image tree (FIT)
+`JH7110` SoC. It also builds U-boot SPL, U-boot and a flattened image tree (FIT)
 image with a Opensbi binary, linux kernel, device tree, ramdisk and rootdisk for the 
-Starlight development board.
+`JH7110 EVB` board.
 
-## Tested Configurations
+## Prerequisites
 
-### Ubuntu 16.04/18.04 x86_64 host
+### Ubuntu 16.04/18.04/20.04 x86_64 host
 
 - Status: Working
-- Build dependencies: `build-essential git autotools texinfo bison flex
-  libgmp-dev libmpfr-dev libmpc-dev gawk libz-dev libssl-dev`
-- Additional build deps for QEMU: `libglib2.0-dev libpixman-1-dev`
-- Additional build deps for Spike: `device-tree-compiler`
-- tools require for 'format-boot-loader' target: mtools
+- Build dependencies: `build-essential git autoconf automake autotools texinfo bison xxd curl flex gawk gdisk gperf libgmp-dev libmpfr-dev libmpc-dev libz-dev libssl-dev libncurses-dev libtool patchutils python screen texinfo unzip zlib1g-dev libyaml-dev`
+- Additional build deps for **QEMU**: `libglib2.0-dev libpixman-1-dev`
+- Additional build deps for **Spike**: `device-tree-compiler`
+- tools require for  **format-boot-loader** target: `mtools`
 
-## Build Instructions
+## Fetch code Instructions ##
+
+Checkout this repository  (branch `jh7110-devel`). Then you will need to checkout all of the linked submodules using:
+
+	$ git checkout --track origin/jh7110-devel
+	$ git submodule update --init --recursive
 
-Checkout this repository and checkout to vic_starlight branch. Then you will need to checkout all of the linked
-submodules using:
+This will take some time and require around 7GB of disk space. Some modules may fail because certain dependencies don't have the best git hosting. The only solution is to wait and try again later (or ask someone for a copy of that source repository).
 
-`git submodule update --recursive --init`
+Once the submodules are initialized, 4 submodules `buildroot`, `u-boot`,
+`linux` and `opensbi` need checkout to corresponding branches manually, seeing `.gitmodule`
 
-This will take some time and require around 7GB of disk space. Some modules may
-fail because certain dependencies don't have the best git hosting. The only
-solution is to wait and try again later (or ask someone for a copy of that
-source repository).
+```
+$ cd buildroot && git checkout jh7110-devel && cd ..
+$ cd u-boot && git checkout jh7110-devel && cd ..
+$ cd linux && git checkout --track origin/jh7110-5.15.y-devel && cd ..
+$ cd opensbi && git checkout master && cd ..
+```
+
+## Build Instructions
 
-Once the submodules are initialized, 4 modules buildroot, u-boot, linux and opensbi will checkout to vic_starlight branch.
 After update submodules, run `make` or `make -jx` and the complete toolchain and
-fw_payload.bin.out & image.fit will be built. The completed build tree will consume about 14G of
-disk space.
+`evb_fw_payload.img` & `image.fit` will be built. The completed build tree will consume about 14G of disk space.
+
+By default, the above generated image does not contain VPU module (wave511, the video hard decode driver and wave420l, the video hard encode driver) , JPU module (codaj12, the jpeg/mjpeg hard decode&encode driver), mailbox test app, e24 test app.  The following instructions will add VPU module, JPU module, mailbox test app and e24 test app according to your requirement:
+
+	$ make -jx
+	$ ./build_soft_3rdpart.sh
+	$ rm -rf work/initramfs.cpio.gz
+	$ make -jx
+
+Then the below target files will be generated, copy files to tftp server workspace path:
+
+```
+work/image.fit
+work/evb_fw_payload.img
+
+work/initramfs.cpio.gz
+work/linux/arch/riscv/boot/Image.gz
+
+$ tree work/linux/arch/riscv/boot/dts/starfive
+├── evb-overlay
+│   ├── jh7110-evb-overlay-can.dtbo
+│   ├── jh7110-evb-overlay-rgb2hdmi.dtbo
+│   ├── jh7110-evb-overlay-sdio.dtbo
+│   ├── jh7110-evb-overlay-spi.dtbo
+│   ├── jh7110-evb-overlay-uart4-emmc.dtbo
+│   └── jh7110-evb-overlay-uart5-pwm.dtbo
+├── jh7110-evb-can-pdm-pwmdac.dtb
+├── jh7110-evb.dtb
+├── jh7110-evb-dvp-rgb2hdmi.dtb
+├── jh7110-evb-pcie-i2s-sd.dtb
+├── jh7110-evb-spi-uart2.dtb
+├── jh7110-evb-uart1-rgb2hdmi.dtb
+├── jh7110-evb-uart4-emmc-spdif.dtb
+└── jh7110-evb-uart5-pwm-i2c-tdm.dtb
+```
+
+Note the make command to config buildroot, uboot, linux, busybox configuration:
+
+```
+$ make buildroot_initramfs-menuconfig   # initramfs menuconfig
+$ make buildroot_rootfs-menuconfig      # rootfs menuconfig
+$ make uboot-menuconfig      # uboot menuconfig
+$ make linux-menuconfig      # Kernel menuconfig
+$ make -C ./work/buildroot_initramfs/ O=./work/buildroot_initramfs busybox-menuconfig  # for initramfs busybox menuconfig
+$ make -C ./work/buildroot_rootfs/ O=./work/buildroot_rootfs busybox-menuconfig  # for rootfs busybox menuconfig
+```
+
+## Running on JH7110 EVB Board via Network
+
+After the JH7110 EVB Board is properly connected to the serial port cable, network cable and power cord, turn on the power from the wall power socket to power and you will see the startup information as follows:
+
+```
+U-Boot 2021.10 (Jul 01 2022 - 21:30:49 +0800)
+
+CPU:   rv64imacu
+Model: StarFive JH7110 EVB
+DRAM:  4 GiB
+FREQ:  1250 MHz
+MMC:   sdio0@16010000: 0
+Loading Environment from nowhere... OK
+In:    serial@10000000
+Out:   serial@10000000
+Err:   serial@10000000
+Model: StarFive JH7110 EVB
+Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
+Hit any key to stop autoboot:  0 
+StarFive # 
+```
+
+Then press any key to stop and enter uboot terminal, there are two way to boot the board
+
+### Running image.fit with the default dtb `jh7110-evb.dtb`
+
+transfer image.fit through TFTP:
+
+Step1: set enviroment parameter:
+
+```
+setenv bootfile vmlinuz; setenv fdt_addr_r 0x48000000; setenv fdt_high 0xffffffffffffffff; setenv fdtcontroladdr 0xffffffffffffffff; setenv initrd_high 0xffffffffffffffff; setenv kernel_addr_r 0x44000000; setenv fileaddr a0000000; setenv ipaddr 192.168.xxx.xxx; setenv serverip 192.168.xxx.xxx;
+```
+
+Step2: upload image file to ddr:
+
+```
+tftpboot ${fileaddr} ${serverip}:image.fit;
+```
+
+Step3: load and excute:
+
+	bootm start ${fileaddr};bootm loados ${fileaddr};booti 0x40200000 0x46100000:${filesize} 0x46000000
+	or:
+	bootm ${fileaddr}#config-1
+	or:
+	bootm ${fileaddr}
+
+When you see the `buildroot login:` message, then congratulations, the launch was successful
+
+```
+buildroot login:root
+Password: starfive
+```
+
+### Running the other dtb with the Image.gz and initramfs.cpio.gz
+
+If we want to loading the other dtb, e.g. `jh7110-evb-pcie-i2s-sd.dtb`, follow the below
+
+Step1: set enviroment parameter:
+
+```
+setenv bootfile vmlinuz; setenv fdt_addr_r 0x48000000; setenv fdt_high 0xffffffffffffffff; setenv fdtcontroladdr 0xffffffffffffffff; setenv initrd_high 0xffffffffffffffff; setenv kernel_addr_r 0x44000000; setenv fileaddr a0000000; setenv ipaddr 192.168.xxx.xxx; setenv serverip 192.168.xxx.xxx;
+setenv kernel_comp_addr_r 0xb0000000;setenv kernel_comp_size 0x10000000;
+```
+
+Step2: upload files to ddr:
+
+```
+tftpboot ${fdt_addr_r} jh7110-evb-pcie-i2s-sd.dtb;
+tftpboot ${kernel_addr_r} Image.gz;
+tftpboot ${ramdisk_addr_r} initramfs.cpio.gz;
+```
+
+Step3: load and excute:
+
+```
+booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
+```
+
+When you see the `buildroot login:` message, then congratulations, the launch was successful
+
+```
+buildroot login:root
+Password: starfive
+```
+
+## Building TF Card Booting Image
+
+If you don't already use a local tftp server, then you probably want to make the TF card target; the default size is 16 GBs. **NOTE THIS WILL DESTROY ALL EXISTING DATA** on the target TF card; The `GPT` Partition Table for the TF card is recommended. 
+
+Please insert the TF card to the host and run command `df -h` to check the device name `/dev/sdXX`, then run command `umount /dev/sdXX`",  then run the following instructions to build TF card image:
+
+```
+$ make -jx
+$ make buildroot_rootfs -jx
+$ make DISK=/dev/sdX format-rootfs-image && sync
+```
+
+## Using DTB Overlay Dynamically
+
+The system support load dtb overlay dynamically when the board is running. The detail process to use the dtbo please reference to the dtbo documents.
 
 

+ 87 - 0
build_soft_3rdpart.sh

@@ -0,0 +1,87 @@
+#!/bin/bash
+TOP_DIR=$(pwd)
+
+# parse the args to install to initramfs or rootfs target path
+if [ $# -eq 0 ]; then
+    Target_DIR="$TOP_DIR/work/buildroot_initramfs_sysroot/root/"
+else
+    if [ "$1" = "initramfs" ]; then
+        Target_DIR="$TOP_DIR/work/buildroot_initramfs_sysroot/root/"
+    elif [ "$1" = "rootfs" ]; then
+        Target_DIR="$TOP_DIR/work/buildroot_rootfs/target/root/"
+    else
+        echo "Usage: $0 [initramfs|rootfs]"
+        echo "If not specify args, the default is initramfs"
+        echo "For example:"
+        echo "    $0";
+        echo "    $0 initramfs";
+        echo "    $0 rootfs";
+    fi
+fi
+echo "$Target_DIR"
+
+if [ ! -d $Target_DIR ]; then
+    echo "Warning: need building the usdk firstly: $1"
+    exit
+fi
+
+################################################################
+# 1. jpu drvier and test script
+JPU_SRC_DIR="./soft_3rdpart/codaj12/"
+if [ -d $Target_DIR/jpu_driver ]; then
+    rm -rf $Target_DIR/jpu_driver
+fi
+cd $JPU_SRC_DIR && ./build_for_riscv.sh && cp -ar jpu_driver/ $Target_DIR/
+cd $TOP_DIR
+echo "install jpu ok"
+
+################################################################
+# 2. vpu dec drvier and test script
+VDEC_SRC_DIR="./soft_3rdpart/wave511/code/"
+if [ -d $Target_DIR/vdec_driver ]; then
+    rm -rf $Target_DIR/vdec_driver
+fi
+cd $VDEC_SRC_DIR && ./build_for_vdec.sh && cp -ar vdec_driver/ $Target_DIR/
+cd $TOP_DIR
+echo "install vdec ok"
+
+################################################################
+# 3. vpu enc drvier and test script
+VENC_SRC_DIR="./soft_3rdpart/wave420l/code/"
+if [ -d $Target_DIR/venc_driver ]; then
+    rm -rf $Target_DIR/venc_driver
+fi
+cd $VENC_SRC_DIR && ./build.sh && cp -ar venc_driver/ $Target_DIR/
+cd $TOP_DIR
+echo "install venc ok"
+
+################################################################
+# 4. mailbox driver and test demo
+# How to test: refer to soft_3rdpart/mailbox/mailbox_test.docx
+if [ -d $Target_DIR/mailbox ]; then
+    rm -rf $Target_DIR/mailbox
+fi
+mkdir -p $Target_DIR/mailbox
+cp work/linux/drivers/mailbox/starfive_mailbox.ko \
+    work/linux/drivers/mailbox/starfive_mailbox-test.ko \
+    soft_3rdpart/mailbox/read_test $Target_DIR/mailbox
+chmod +x $Target_DIR/mailbox/read_test
+echo "install mailbox ok"
+
+################################################################
+# 5. e24 driver and test demo
+# How to test: refer to soft_3rdpart/e24/e24_test.docx
+if [ -d $Target_DIR/e24 ]; then
+    rm -rf $Target_DIR/e24
+fi
+mkdir -p $Target_DIR/e24
+# install e24 firmware
+cp soft_3rdpart/e24/e24_elf $Target_DIR/../lib/firmware/
+# install e24 driver and test demo
+cp work/linux/drivers/e24/e24.ko \
+    soft_3rdpart/e24/e24_share_mem $Target_DIR/e24
+echo "install e24 ok"
+
+################################################################
+# 6. xrp driver
+cp work/linux/drivers/xrp/xrp.ko $Target_DIR/

+ 10 - 1
conf/buildroot_initramfs_config

@@ -9,7 +9,7 @@ BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y
 BR2_GCC_ENABLE_LTO=y
 BR2_GCC_ENABLE_OPENMP=y
 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
-BR2_TARGET_GENERIC_ROOT_PASSWD="sifive"
+BR2_TARGET_GENERIC_ROOT_PASSWD="starfive"
 BR2_SYSTEM_DHCP="eth0"
 BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
 BR2_PACKAGE_ALSA_UTILS=y
@@ -17,14 +17,22 @@ BR2_PACKAGE_ALSA_UTILS_ALSACONF=y
 BR2_PACKAGE_ALSA_UTILS_ALSALOOP=y
 BR2_PACKAGE_ALSA_UTILS_AMIXER=y
 BR2_PACKAGE_ALSA_UTILS_APLAY=y
+BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
+BR2_PACKAGE_CACHE_CALIBRATOR=y
 BR2_PACKAGE_DHRYSTONE=y
 BR2_PACKAGE_GDB=y
 BR2_PACKAGE_IOZONE=y
 BR2_PACKAGE_LMBENCH=y
+BR2_PACKAGE_RAMSMP=y
+BR2_PACKAGE_RAMSPEED=y
 BR2_PACKAGE_STRACE=y
+BR2_PACKAGE_STRESS_NG=y
+BR2_PACKAGE_WHETSTONE=y
+BR2_PACKAGE_FLEX=y
 BR2_PACKAGE_E2FSPROGS=y
 BR2_PACKAGE_EXFAT=y
 BR2_PACKAGE_EXFAT_UTILS=y
+BR2_PACKAGE_EXFATPROGS=y
 BR2_PACKAGE_MTD=y
 # BR2_PACKAGE_MTD_NANDDUMP is not set
 # BR2_PACKAGE_MTD_NANDTEST is not set
@@ -86,6 +94,7 @@ BR2_PACKAGE_IPROUTE2=y
 BR2_PACKAGE_IPTABLES=y
 BR2_PACKAGE_IPTABLES_NFTABLES=y
 BR2_PACKAGE_IW=y
+BR2_PACKAGE_TCPDUMP=y
 BR2_PACKAGE_WPA_SUPPLICANT=y
 BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y
 BR2_PACKAGE_WPA_SUPPLICANT_WPS=y

+ 56 - 4
conf/buildroot_rootfs_config

@@ -12,9 +12,16 @@ BR2_INIT_SYSV=y
 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
 BR2_TARGET_GENERIC_ROOT_PASSWD="starfive"
 BR2_SYSTEM_DHCP="eth0"
-BR2_TARGET_TZ_INFO=y
+BR2_PACKAGE_ALSA_UTILS=y
+BR2_PACKAGE_ALSA_UTILS_ALSACONF=y
+BR2_PACKAGE_ALSA_UTILS_ALSALOOP=y
+BR2_PACKAGE_ALSA_UTILS_AMIXER=y
+BR2_PACKAGE_ALSA_UTILS_APLAY=y
+BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
 BR2_PACKAGE_CACHE_CALIBRATOR=y
 BR2_PACKAGE_DHRYSTONE=y
+BR2_PACKAGE_GDB=y
+BR2_PACKAGE_IOZONE=y
 BR2_PACKAGE_LMBENCH=y
 BR2_PACKAGE_RAMSMP=y
 BR2_PACKAGE_RAMSPEED=y
@@ -22,29 +29,69 @@ BR2_PACKAGE_STRACE=y
 BR2_PACKAGE_STRESS_NG=y
 BR2_PACKAGE_WHETSTONE=y
 BR2_PACKAGE_FLEX=y
+BR2_PACKAGE_E2FSPROGS=y
 BR2_PACKAGE_EXFAT=y
 BR2_PACKAGE_EXFAT_UTILS=y
 BR2_PACKAGE_EXFATPROGS=y
+BR2_PACKAGE_MTD=y
+BR2_PACKAGE_NFS_UTILS=y
 BR2_PACKAGE_NTFS_3G=y
 BR2_PACKAGE_LINUX_FIRMWARE=y
 BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_AX210=y
 BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169=y
+BR2_PACKAGE_GPTFDISK=y
+BR2_PACKAGE_GPTFDISK_GDISK=y
+BR2_PACKAGE_GPTFDISK_SGDISK=y
+BR2_PACKAGE_I2C_TOOLS=y
+BR2_PACKAGE_MEMTESTER=y
 BR2_PACKAGE_PCIUTILS=y
+BR2_PACKAGE_SYSSTAT=y
+BR2_PACKAGE_PYTHON3=y
 BR2_PACKAGE_LIBKCAPI=y
 BR2_PACKAGE_LIBKCAPI_ENCAPP=y
 BR2_PACKAGE_LIBKCAPI_RNGAPP=y
 BR2_PACKAGE_LIBKCAPI_SPEED=y
 BR2_PACKAGE_LIBKCAPI_TEST=y
-BR2_PACKAGE_OPENSSL=y
 BR2_PACKAGE_LIBDRM=y
-BR2_PACKAGE_READLINE=y
+BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y
+BR2_PACKAGE_DTC=y
+BR2_PACKAGE_DTC_PROGRAMS=y
+BR2_PACKAGE_LIBGPIOD=y
+BR2_PACKAGE_LIBGPIOD_TOOLS=y
+BR2_PACKAGE_LIBV4L_UTILS=y
 BR2_PACKAGE_MSMTP=y
+BR2_PACKAGE_BLUEZ5_UTILS=y
+BR2_PACKAGE_BLUEZ5_UTILS_OBEX=y
+BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
+BR2_PACKAGE_BRCM_PATCHRAM_PLUS=y
+BR2_PACKAGE_CAN_UTILS=y
+BR2_PACKAGE_DHCP=y
+BR2_PACKAGE_DHCP_SERVER=y
+BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK=y
 BR2_PACKAGE_DHCPCD=y
 BR2_PACKAGE_DROPBEAR=y
+BR2_PACKAGE_HOSTAPD=y
+BR2_PACKAGE_HOSTAPD_EAP=y
+BR2_PACKAGE_HOSTAPD_WPS=y
+BR2_PACKAGE_HOSTAPD_WPA3=y
+BR2_PACKAGE_IPERF=y
+BR2_PACKAGE_IPERF3=y
+BR2_PACKAGE_IPROUTE2=y
+BR2_PACKAGE_IPTABLES=y
+BR2_PACKAGE_IPTABLES_NFTABLES=y
 BR2_PACKAGE_IPUTILS=y
+BR2_PACKAGE_IW=y
+BR2_PACKAGE_WPA_SUPPLICANT=y
+BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y
+BR2_PACKAGE_WPA_SUPPLICANT_WPS=y
+BR2_PACKAGE_WPA_SUPPLICANT_WPA3=y
+BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
+BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO=y
+BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
+BR2_PACKAGE_BASH=y
+BR2_PACKAGE_SCREEN=y
 BR2_PACKAGE_WHICH=y
 BR2_PACKAGE_HTOP=y
-BR2_PACKAGE_UTIL_LINUX=y
 BR2_PACKAGE_UTIL_LINUX_BINARIES=y
 BR2_PACKAGE_UTIL_LINUX_AGETTY=y
 BR2_PACKAGE_UTIL_LINUX_BFS=y
@@ -88,4 +135,9 @@ BR2_PACKAGE_V4L2_TEST=y
 BR2_PACKAGE_HOST_STFISP_SETFILE=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="500M"
 # BR2_TARGET_ROOTFS_TAR is not set
+BR2_PACKAGE_HOST_GENEXT2FS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_GPTFDISK=y
+BR2_PACKAGE_HOST_MTOOLS=y

+ 45 - 45
conf/evb-fit-image.its

@@ -1,55 +1,55 @@
 /dts-v1/;
 
 / {
-        description = "U-boot FIT image for jh7110-evb";
-        #address-cells = <2>;
+	description = "U-boot FIT image for jh7110-evb";
+	#address-cells = <2>;
 
-        images {
-                vmlinux {
-                        description = "vmlinux";
-                        data = /incbin/("../work/linux/arch/riscv/boot/Image");
-                        type = "kernel";
-                        arch = "riscv";
-                        os = "linux";
-                        load = <0x0 0x40200000>;
-                        entry = <0x0 0x40200000>;
-                        compression = "none";
-                };
+	images {
+		vmlinux {
+			description = "vmlinux";
+			data = /incbin/("../work/linux/arch/riscv/boot/Image");
+			type = "kernel";
+			arch = "riscv";
+			os = "linux";
+			load = <0x0 0x40200000>;
+			entry = <0x0 0x40200000>;
+			compression = "none";
+		};
 
-                ramdisk {
-                        description = "buildroot initramfs";
-                        data = /incbin/("../work/initramfs.cpio.gz");
-                        type = "ramdisk";
-                        arch = "riscv";
-                        os = "linux";
-                        load = <0x0 0x46100000>;
-                        compression = "none";
-                        hash-1 {
-                                algo = "sha256";
-                        };
-                };
+		ramdisk {
+			description = "buildroot initramfs";
+			data = /incbin/("../work/initramfs.cpio.gz");
+			type = "ramdisk";
+			arch = "riscv";
+			os = "linux";
+			load = <0x0 0x46100000>;
+			compression = "none";
+			hash-1 {
+				algo = "sha256";
+			};
+		};
 
-                fdt {
-                        data = /incbin/("../work/linux/arch/riscv/boot/dts/starfive/jh7110-evb.dtb");
-                        type = "flat_dt";
-                        arch = "riscv";
-                        load = <0x0 0x46000000>;
-                        compression = "none";
-                        hash-1 {
-                                algo = "sha256";
-                        };
-                };
-        };
+		fdt {
+			data = /incbin/("../work/linux/arch/riscv/boot/dts/starfive/jh7110-evb.dtb");
+			type = "flat_dt";
+			arch = "riscv";
+			load = <0x0 0x46000000>;
+			compression = "none";
+			hash-1 {
+				algo = "sha256";
+			};
+		};
+	};
 
-        configurations {
-                default = "config-1";
+	configurations {
+		default = "config-1";
 
-                config-1 {
-                        description = "jh7110-evb with opensbi";
-						kernel = "vmlinux";
-                        fdt = "fdt";
-                        loadables = "ramdisk";
-                };
-        };
+		config-1 {
+			description = "jh7110-evb with opensbi";
+			kernel = "vmlinux";
+			fdt = "fdt";
+			loadables = "ramdisk";
+		};
+	};
 };