From b9471f4b7c1a0981da24db958f4b29d4353f5dca Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Mon, 5 Feb 2024 16:24:00 +0900 Subject: [PATCH 01/16] RISCV: config: enable wave511 video codec driver as module Enable wave511 video codec driver as module and also enable all depending configs. Change-Id: I0aeb0dfc0a844a3cc17c5054df61454c3f88e5fb Signed-off-by: Seung-Woo Kim --- arch/riscv/configs/tizen_visionfive2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/configs/tizen_visionfive2_defconfig b/arch/riscv/configs/tizen_visionfive2_defconfig index 62219f0..e5ff49a 100644 --- a/arch/riscv/configs/tizen_visionfive2_defconfig +++ b/arch/riscv/configs/tizen_visionfive2_defconfig @@ -291,6 +291,7 @@ CONFIG_USB_GSPCA_ZC3XX=m CONFIG_USB_VIDEO_CLASS=y CONFIG_V4L_PLATFORM_DRIVERS=y CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_WAVE_VPU=m CONFIG_DRM_VERISILICON=y CONFIG_DRM_VERISILICON_STARFIVE_HDMI=y CONFIG_DRM_IMG_ROGUE=y -- 2.7.4 From 99ff9f776cbffd8c0cb15c524c086d7bf5c78315 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Thu, 8 Feb 2024 13:36:53 +0100 Subject: [PATCH 02/16] RISCV: config: tizen_visionfive2: Disable JH7110 crypto driver JH7110 crypto driver seems to be causing memory trashing, so temporarily disable it until the issue is really fixed. This fixes the 'i2c controller timed out' and some other random issues. Signed-off-by: Marek Szyprowski Change-Id: I3c1030a0eaf41d7cf97b0fdc6d228bc61681ef5e --- arch/riscv/configs/tizen_visionfive2_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/riscv/configs/tizen_visionfive2_defconfig b/arch/riscv/configs/tizen_visionfive2_defconfig index e5ff49a..83211ed 100644 --- a/arch/riscv/configs/tizen_visionfive2_defconfig +++ b/arch/riscv/configs/tizen_visionfive2_defconfig @@ -406,7 +406,6 @@ CONFIG_CRYPTO_LZ4=y CONFIG_CRYPTO_ZSTD=y CONFIG_CRYPTO_USER_API_HASH=y CONFIG_CRYPTO_DEV_VIRTIO=y -CONFIG_CRYPTO_DEV_JH7110=y CONFIG_PRINTK_TIME=y CONFIG_DEBUG_PAGEALLOC=y CONFIG_SCHED_STACK_END_CHECK=y -- 2.7.4 From 145b72894b4aa791653885cc2b76185aac64a3a8 Mon Sep 17 00:00:00 2001 From: Tymoteusz Wenerski Date: Wed, 21 Feb 2024 11:28:23 +0100 Subject: [PATCH 03/16] RISCV: config: tizen_visionfive2: Enable NVME driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Enable NVME driver to mount rootfs directly from NVME drive during boot. Change-Id: I60e02507f394c1001c32c802151c0152c24b1397 Signed-off-by: Tymoteusz Wenerski Signed-off-by: Łukasz Stelmach --- arch/riscv/configs/tizen_visionfive2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/configs/tizen_visionfive2_defconfig b/arch/riscv/configs/tizen_visionfive2_defconfig index 83211ed..462160e 100644 --- a/arch/riscv/configs/tizen_visionfive2_defconfig +++ b/arch/riscv/configs/tizen_visionfive2_defconfig @@ -205,6 +205,7 @@ CONFIG_VIRTIO_BLK=y CONFIG_TIZEN_INFORM_REBOOT=y CONFIG_TIZEN_INFORM_PATH="/mnt/inform/reboot-param.bin" CONFIG_EEPROM_AT24=y +CONFIG_BLK_DEV_NVME=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=y CONFIG_SCSI_VIRTIO=y -- 2.7.4 From 0a38c9c92037b62fb4032aaa0b053c901e5d9c1f Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Thu, 7 Mar 2024 17:08:03 +0900 Subject: [PATCH 04/16] RISCV: config: tizen_*: Sync with make savedefconfig Store minimized defconfig with "make savedefconfig" for each tizen defconfig files. Change-Id: I484e3b5bde342ee36a4e02010b703c1c48190d16 Signed-off-by: Seung-Woo Kim --- arch/riscv/configs/tizen_qemu_defconfig | 6 ------ arch/riscv/configs/tizen_visionfive2_defconfig | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/riscv/configs/tizen_qemu_defconfig b/arch/riscv/configs/tizen_qemu_defconfig index d24489b..7617fe4 100644 --- a/arch/riscv/configs/tizen_qemu_defconfig +++ b/arch/riscv/configs/tizen_qemu_defconfig @@ -25,8 +25,6 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_NET=y CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y CONFIG_IP_MULTICAST=y CONFIG_IP_ADVANCED_ROUTER=y CONFIG_IP_PNP=y @@ -68,8 +66,6 @@ CONFIG_INPUT_MOUSEDEV=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_SERIAL_EARLYCON_RISCV_SBI=y -CONFIG_HVC_RISCV_SBI=y CONFIG_SERIAL_DEV_BUS=y CONFIG_TTY_PRINTK=y CONFIG_VIRTIO_CONSOLE=y @@ -83,7 +79,6 @@ CONFIG_GPIO_SIFIVE=y CONFIG_DRM=y CONFIG_DRM_VIRTIO_GPU=y CONFIG_FB=y -CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_VIRTIO=y @@ -113,7 +108,6 @@ CONFIG_BTRFS_FS_POSIX_ACL=y CONFIG_F2FS_FS=y CONFIG_F2FS_FS_SECURITY=y CONFIG_FANOTIFY=y -CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y diff --git a/arch/riscv/configs/tizen_visionfive2_defconfig b/arch/riscv/configs/tizen_visionfive2_defconfig index 462160e..74629c9 100644 --- a/arch/riscv/configs/tizen_visionfive2_defconfig +++ b/arch/riscv/configs/tizen_visionfive2_defconfig @@ -202,10 +202,10 @@ CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=32768 CONFIG_VIRTIO_BLK=y +CONFIG_BLK_DEV_NVME=y CONFIG_TIZEN_INFORM_REBOOT=y CONFIG_TIZEN_INFORM_PATH="/mnt/inform/reboot-param.bin" CONFIG_EEPROM_AT24=y -CONFIG_BLK_DEV_NVME=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=y CONFIG_SCSI_VIRTIO=y -- 2.7.4 From 1b517291bff1ced5c85fb73deff1e369806aff26 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Thu, 7 Mar 2024 17:23:14 +0900 Subject: [PATCH 05/16] RISCV: config: tizen_visionfive2: Enable HID_MULTITOUCH To support usb touchscreen, enable CONFIG_HID_MULTITOUCH. Change-Id: I341e1a7951e704b0d16a98caea881305137c56cd Signed-off-by: Seung-Woo Kim --- arch/riscv/configs/tizen_visionfive2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/configs/tizen_visionfive2_defconfig b/arch/riscv/configs/tizen_visionfive2_defconfig index 74629c9..f72e89b 100644 --- a/arch/riscv/configs/tizen_visionfive2_defconfig +++ b/arch/riscv/configs/tizen_visionfive2_defconfig @@ -310,6 +310,7 @@ CONFIG_SND_SOC_WM8960=y CONFIG_SND_SIMPLE_CARD=y CONFIG_HIDRAW=y CONFIG_UHID=y +CONFIG_HID_MULTITOUCH=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y -- 2.7.4 From cf5bccd3476119ba0c2bf9001f20d7b5840f4ef8 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Thu, 7 Mar 2024 18:05:39 +0900 Subject: [PATCH 06/16] RISCV: config: tizen_visionfive2: enable DRM_LOAD_EDID_FIRMWARE Enable CONFIG_DRM_LOAD_EDID_FIRMWARE from tizen defconfigs to support drm.edid_firmware paremeter. Adding "drm.edid_firmware=edid/1920x1080.bin" to cmdline makes all connected display connector has the 1920x1080 mode. Kernel has prebuilt edids, 800x600.bin, 1024x768.bin, 1280x1024.bin, 1600x1200.bin, 1680x1050.bin and 1920x1080.bin and to use other mode edids, put custom edid files into path /lib/firmware/edid/. Note: to build custom edid binary, please refer tools/edid/. Change-Id: Ia87be1d9f7a5e6af38201dc432fc046478e80dae Signed-off-by: Seung-Woo Kim --- arch/riscv/configs/tizen_visionfive2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/configs/tizen_visionfive2_defconfig b/arch/riscv/configs/tizen_visionfive2_defconfig index f72e89b..ec813e2 100644 --- a/arch/riscv/configs/tizen_visionfive2_defconfig +++ b/arch/riscv/configs/tizen_visionfive2_defconfig @@ -293,6 +293,7 @@ CONFIG_USB_VIDEO_CLASS=y CONFIG_V4L_PLATFORM_DRIVERS=y CONFIG_V4L_MEM2MEM_DRIVERS=y CONFIG_VIDEO_WAVE_VPU=m +CONFIG_DRM_LOAD_EDID_FIRMWARE=y CONFIG_DRM_VERISILICON=y CONFIG_DRM_VERISILICON_STARFIVE_HDMI=y CONFIG_DRM_IMG_ROGUE=y -- 2.7.4 From d6492bf94d9a6b0384129b0a5d16eba574c31366 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Fri, 8 Mar 2024 14:45:26 +0900 Subject: [PATCH 07/16] drm/edid/firmware: Add built-in edid/1280x720.bin firmware Add built-in edid/1280x720.bin firmware to drm_edid_loader. The mode is generated from tools/edid/ with below edid data: /* 1280x720: Modeline "1280x720" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync */ #define HSYNC_POL 1 #define VSYNC_POL 1 #define YPULSE (63+5) #define XPULSE 128 #define YPIX 720 #define XPIX 1280 #define VFREQ 60 #define DPI 96 #define CLOCK 74500 #define VERSION 1 #define REVISION 3 #define XOFFSET 64 #define YOFFSET (63+3) #define XY_RATIO XY_RATIO_16_9 #define YBLANK 28 #define XBLANK 384 #define TIMING_NAME "1280x720" #include "edid.S" Change-Id: Idfc610102a35494ee54aca06af411cfd9d737b0f Signed-off-by: Seung-Woo Kim --- drivers/gpu/drm/drm_edid_load.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_edid_load.c b/drivers/gpu/drm/drm_edid_load.c index 5d9ef26..654c01b 100644 --- a/drivers/gpu/drm/drm_edid_load.c +++ b/drivers/gpu/drm/drm_edid_load.c @@ -39,10 +39,11 @@ int __drm_get_edid_firmware_path(char *buf, size_t bufsize) } EXPORT_SYMBOL(__drm_get_edid_firmware_path); -#define GENERIC_EDIDS 6 +#define GENERIC_EDIDS 7 static const char * const generic_edid_name[GENERIC_EDIDS] = { "edid/800x600.bin", "edid/1024x768.bin", + "edid/1280x720.bin", "edid/1280x1024.bin", "edid/1600x1200.bin", "edid/1680x1050.bin", @@ -89,6 +90,24 @@ static const u8 generic_edid[GENERIC_EDIDS][128] = { { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x31, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x16, 0x01, 0x03, 0x6d, 0x21, 0x12, 0x78, + 0xea, 0x5e, 0xc0, 0xa4, 0x59, 0x4a, 0x98, 0x25, + 0x20, 0x50, 0x54, 0x00, 0x00, 0x00, 0x81, 0xc0, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1a, 0x1d, + 0x00, 0x80, 0x51, 0xd0, 0x1c, 0x20, 0x40, 0x80, + 0x24, 0x00, 0x4d, 0xbb, 0x10, 0x00, 0x00, 0x1e, + 0x00, 0x00, 0x00, 0xff, 0x00, 0x4c, 0x69, 0x6e, + 0x75, 0x78, 0x20, 0x23, 0x30, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x3b, + 0x3d, 0x2b, 0x2d, 0x08, 0x00, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0x31, 0x32, 0x38, 0x30, 0x78, 0x37, 0x32, + 0x30, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x00, 0x6c, + }, + { + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x31, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x16, 0x01, 0x03, 0x6d, 0x2c, 0x23, 0x78, 0xea, 0x5e, 0xc0, 0xa4, 0x59, 0x4a, 0x98, 0x25, 0x20, 0x50, 0x54, 0x00, 0x00, 0x00, 0x81, 0x80, -- 2.7.4 From 163de2e4bc2cd939bb937d3ff12ff685b0cb32f7 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Tue, 12 Mar 2024 19:33:31 +0900 Subject: [PATCH 08/16] RISCV: configs: tizen_visoinfive2: Disable RISCV_ISA_V config Visionfive2 doesn't support V extenstion. It needs to disable its configuration. Change-Id: I6b6ddc5b7027cdd6bd411f53df787e22e48993af Signed-off-by: Jaehoon Chung --- arch/riscv/configs/tizen_visionfive2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/configs/tizen_visionfive2_defconfig b/arch/riscv/configs/tizen_visionfive2_defconfig index ec813e2..26460dd 100644 --- a/arch/riscv/configs/tizen_visionfive2_defconfig +++ b/arch/riscv/configs/tizen_visionfive2_defconfig @@ -29,6 +29,7 @@ CONFIG_PROFILING=y CONFIG_SOC_SIFIVE=y CONFIG_SOC_STARFIVE=y CONFIG_SMP=y +# CONFIG_RISCV_ISA_V is not set CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y -- 2.7.4 From 46cea3ea9d804a8644b544e9e5f0326bd4a706da Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Tue, 12 Mar 2024 19:57:28 +0900 Subject: [PATCH 09/16] perf: riscv_pmu_sbi: Set SYSCTL_LEGACY by default This patch is workaround for VisionFive2. During running ubrowser, SIGILL is occurred. To prevent the SIGILL, sysctl_perf_user_acces is set SYSCTL_LEGACY by default. Change-Id: Idbfcbfd27a9286c8e23529fd793b99c4023a449f Signed-off-by: Jaehoon Chung --- drivers/perf/riscv_pmu_sbi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c index cd8a2b9..5e29226 100644 --- a/drivers/perf/riscv_pmu_sbi.c +++ b/drivers/perf/riscv_pmu_sbi.c @@ -51,8 +51,9 @@ static const struct attribute_group *riscv_pmu_attr_groups[] = { NULL, }; -/* Allow user mode access by default */ -static int sysctl_perf_user_access __read_mostly = SYSCTL_USER_ACCESS; +/* WORKAROUND: Allow legacy mode by default when SOC is starfive */ +static int sysctl_perf_user_access __read_mostly = SYSCTL_LEGACY; + /* * RISC-V doesn't have heterogeneous harts yet. This need to be part of -- 2.7.4 From 05cfa30b86e3bdfbecb332a56bb06b60537f8142 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Thu, 14 Mar 2024 10:13:39 +0900 Subject: [PATCH 10/16] RISCV: dts: starfive: Change the pinmux value about mclk_ext_pins mclk_ext_pins is using by i2stx0. Vendor kernel is set to GPOUT_HIGH / GOPEN_ENABLE. Change-Id: I65e1ffb79ec3b6c7b875074348b92e7cb399251a Signed-off-by: Jaehoon Chung --- arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi index 732d74a..436b885 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -648,8 +648,8 @@ mclk_ext_pins: mclk-ext-0 { mclk-ext-pins { - pinmux = ; input-enable; }; -- 2.7.4 From 39ca97b085263283cdf2cbecf5bd568d4b6bb117 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Thu, 14 Mar 2024 15:25:39 +0900 Subject: [PATCH 11/16] RISCV: configs: tizen_visionfive2: Change a module about PWMDAC Change a module about PWMDAC. Its devices is always registered to card0. So, HDMI-audio is always registered to card1. It's played from card0 by default during playing audio. As loading pwmdac as module, it will be registered to card1. Change-Id: I3f97cd4584061732cfa88cf90792c0534967a3b7 Signed-off-by: Jaehoon Chung --- arch/riscv/configs/tizen_visionfive2_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/riscv/configs/tizen_visionfive2_defconfig b/arch/riscv/configs/tizen_visionfive2_defconfig index 26460dd..5b9b59f 100644 --- a/arch/riscv/configs/tizen_visionfive2_defconfig +++ b/arch/riscv/configs/tizen_visionfive2_defconfig @@ -306,8 +306,9 @@ CONFIG_SND_USB_AUDIO=y CONFIG_SND_SOC=y CONFIG_SND_DESIGNWARE_I2S=y CONFIG_SND_SOC_STARFIVE=y -CONFIG_SND_SOC_JH7110_PWMDAC=y +CONFIG_SND_SOC_JH7110_PWMDAC=m CONFIG_SND_SOC_JH7110_TDM=y +CONFIG_SND_SOC_SPDIF=y CONFIG_SND_SOC_WM8960=y CONFIG_SND_SIMPLE_CARD=y CONFIG_HIDRAW=y -- 2.7.4 From 0ec2e167023a41d23bdf1740404933611d03e2d5 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Fri, 22 Mar 2024 18:27:33 +0900 Subject: [PATCH 12/16] script: build: Add to build linux-tizen-modules Add to build and install linux-tizen-modules in local build script. To build linux-tizne-modules, it is required to clone tizen git platform/kernel/linux-tizen-modules-source and platform/kernel/linux-tizen-modules in parent path. Change-Id: I1e8b799d53a4d8e5f614b20250fa718f5cc48aa4 Signed-off-by: Seung-Woo Kim --- build.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/build.sh b/build.sh index 3239bec..db9d5829 100755 --- a/build.sh +++ b/build.sh @@ -4,6 +4,8 @@ MOD_IMG="usr/modules.img" MOD_SIZE=20 NCPUS=`grep ^processor /proc/cpuinfo | wc -l` NCPUS=$(($NCPUS * 2)) +BUILD_ROOT=$PWD +KERNEL_PATH=`basename ${BUILD_ROOT}` # Check this system has ccache check_ccache() @@ -14,6 +16,43 @@ check_ccache() fi } +function mk_tizen_modules() +{ + if [ -e ${BUILD_ROOT}/../linux-tizen-modules-source ]; then + pushd ${BUILD_ROOT}/../linux-tizen-modules-source + + ln -s ${PWD}/include kernel + + export BUILD_logger=m + export LOGGER_MAIN_BUFFER_SIZE=256 + export LOGGER_EVENTS_BUFFER_SIZE=256 + export LOGGER_RADIO_BUFFER_SIZE=256 + export LOGGER_SYSTEM_BUFFER_SIZE=256 + + export BUILD_proc_tsm=n + export BUILD_kdbus=n + export BUILD_zlogger=m + + ARCH="${ARCH}" CROSS_COMPILE="${CROSS_COMPILER}" make -C kernel KERNELDIR=${BUILD_ROOT} + + rm -f kernel/include + + ARCH="${ARCH}" CROSS_COMPILE="${CROSS_COMPILER}" make -C kernel modules_install KERNELDIR=${BUILD_ROOT} INSTALL_MOD_PATH=../${KERNEL_PATH}/${MOD_DIR} INSTALL_MOD_STRIP=1 INSTALL_MOD_DIR=extra + + popd + + if [ -e ${BUILD_ROOT}/../linux-tizen-modules ]; then + mkdir -p ${MOD_DIR}/lib/modules/modules-load.d + cp ${BUILD_ROOT}/../linux-tizen-modules/conf/tizen-modules-visionfive2.conf ${MOD_DIR}/lib/modules/modules-load.d + fi + else + echo "linux-tizen-modules-source/linux-tizen-modules are not cloned in parent path, so skip building linux-tizen-modules." + echo "To build linux-tizen-modules, please use below command:" + echo " git clone git://git.tizen.org/platform/kernel/linux-tizen-modules-source -b tizen ../linux-tizen-modules-source" + echo " git clone git://git.tizen.org/platform/kernel/linux-tizen-modules -b tizen ../linux-tizen-modules" + fi +} + function mk_modules() { [ -e /usr/bin/make_ext4fs ] && USE_MAKE_EXT4FS=1 if [ "$USE_MAKE_EXT4FS" != "1" ]; then @@ -32,6 +71,9 @@ function mk_modules() { make ARCH=${ARCH} CROSS_COMPILE="$CROSS_COMPILER" modules_install INSTALL_MOD_PATH=${MOD_DIR} INSTALL_MOD_STRIP=1 + # build and install linux-tizen-modules if cloned in parent path + mk_tizen_modules + if [ "$USE_MAKE_EXT4FS" == "1" ]; then /usr/bin/make_ext4fs -b 4096 -L modules -l ${MOD_SIZE}M $MOD_IMG ${MOD_DIR}/lib/modules/ else -- 2.7.4 From 61350fcb7a25041945ca6a2ae126b9ab7258ab25 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Tue, 26 Mar 2024 11:23:49 +0900 Subject: [PATCH 13/16] script: build: Use twice the number of CPUs for cuncurrent compile It is safe to run twice the number of CPUs for concurrent compile and it already calculates for it. So, Use twice the number of CPUs. Change-Id: I5eb5bb80730ffb8c381244c9bf09e5dc77d2c634 Signed-off-by: Seung-Woo Kim --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index db9d5829..fa2332d 100755 --- a/build.sh +++ b/build.sh @@ -104,7 +104,7 @@ ARCH=riscv if ! [ -e .config ] ; then make ARCH=${ARCH} CROSS_COMPILE="$CROSS_COMPILER" tizen_visionfive2_defconfig fi -make ARCH=${ARCH} CROSS_COMPILE="$CROSS_COMPILER" -j8 +make ARCH=${ARCH} CROSS_COMPILE="$CROSS_COMPILER" -j ${NCPUS} if [ ! -f "./arch/riscv/boot/Image" ]; then echo "Build fail" exit 1 -- 2.7.4 From c5166b4e528a4c6863cbebd52589a0f9a9ea1497 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Tue, 30 Apr 2024 14:16:46 +0900 Subject: [PATCH 14/16] RISCV: configs: tizen_visionfive2: Enable RT2800USB config Enable RT2800USB configuration to use RALINK WiFi dongle. Change-Id: I14156a1e8171db659dbdeae547c93332dbe32660 Signed-off-by: Jaehoon Chung --- arch/riscv/configs/tizen_visionfive2_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/configs/tizen_visionfive2_defconfig b/arch/riscv/configs/tizen_visionfive2_defconfig index 5b9b59f..d17f728 100644 --- a/arch/riscv/configs/tizen_visionfive2_defconfig +++ b/arch/riscv/configs/tizen_visionfive2_defconfig @@ -237,6 +237,10 @@ CONFIG_USB_RTL8152=y CONFIG_USB_LAN78XX=y CONFIG_USB_USBNET=y CONFIG_MT7601U=m +CONFIG_RT2X00=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT3573=y +CONFIG_RT2800USB_RT53XX=y CONFIG_RTL_CARDS=m CONFIG_RTL8192CU=m # CONFIG_RTLWIFI_DEBUG is not set -- 2.7.4 From ad23e439ffa101339bd3f02902241882f30708c7 Mon Sep 17 00:00:00 2001 From: Anuj Jain Date: Fri, 10 May 2024 15:21:46 +0530 Subject: [PATCH 15/16] Revert "Bluetooth: Store advertising handle so it can be re-enabled" This reverts commit 7087c4f69487f017722df7d299ef9b7709996b79. Patch revert is needed as it is the cause for GATT Server TCT fail. Change-Id: I60d69db88b4573bcf493239fe81910e2ac1d5b87 Signed-off-by: Anuj Jain Signed-off-by: Jaehoon Chung --- include/net/bluetooth/hci_core.h | 1 - net/bluetooth/hci_event.c | 39 ++++++++++++++------------------------- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 24de664..d46f1ab 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -716,7 +716,6 @@ struct hci_conn { __u8 init_addr_type; bdaddr_t resp_addr; __u8 resp_addr_type; - __u8 adv_instance; __u16 handle; __u16 sync_handle; __u16 state; diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 452d322..0fdf91a 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -2982,13 +2982,12 @@ static void hci_cs_disconnect(struct hci_dev *hdev, u8 status) goto unlock; if (status) { + u8 type = conn->type; mgmt_disconnect_failed(hdev, &conn->dst, conn->type, conn->dst_type, status); - if (conn->type == LE_LINK && conn->role == HCI_ROLE_SLAVE) { - hdev->cur_adv_instance = conn->adv_instance; + if (type == LE_LINK) hci_enable_advertising(hdev); - } /* Inform sockets conn is gone before we delete it */ hci_disconn_cfm(conn, HCI_ERROR_UNSPECIFIED); @@ -3614,6 +3613,7 @@ static void hci_disconn_complete_evt(struct hci_dev *hdev, void *data, struct hci_conn_params *params; struct hci_conn *conn; bool mgmt_connected; + u8 type; bt_dev_dbg(hdev, "status 0x%2.2x", ev->status); @@ -3667,8 +3667,10 @@ static void hci_disconn_complete_evt(struct hci_dev *hdev, void *data, break; } } + type = conn->type; hci_disconn_cfm(conn, ev->reason); + hci_conn_del(conn); /* Re-enable advertising if necessary, since it might * have been disabled by the connection. From the @@ -3680,12 +3682,10 @@ static void hci_disconn_complete_evt(struct hci_dev *hdev, void *data, * or until a connection is created or until the Advertising * is timed out due to Directed Advertising." */ - if (conn->type == LE_LINK && conn->role == HCI_ROLE_SLAVE) { - hdev->cur_adv_instance = conn->adv_instance; + + if (type == LE_LINK) hci_enable_advertising(hdev); - } - hci_conn_del(conn); #ifdef TIZEN_BT if (conn->type == ACL_LINK && !hci_conn_num(hdev, ACL_LINK)) { @@ -6256,13 +6256,6 @@ static void le_conn_complete_evt(struct hci_dev *hdev, u8 status, conn->sec_level = BT_SECURITY_LOW; conn->state = BT_CONFIG; - /* Store current advertising instance as connection advertising instance - * when sotfware rotation is in use so it can be re-enabled when - * disconnected. - */ - if (!ext_adv_capable(hdev)) - conn->adv_instance = hdev->cur_adv_instance; - conn->le_conn_interval = interval; conn->le_conn_latency = latency; conn->le_supv_timeout = supervision_timeout; @@ -6343,7 +6336,7 @@ static void hci_le_ext_adv_term_evt(struct hci_dev *hdev, void *data, { struct hci_evt_le_ext_adv_set_term *ev = data; struct hci_conn *conn; - struct adv_info *adv, *n; + struct adv_info *n; bt_dev_dbg(hdev, "status 0x%2.2x", ev->status); @@ -6361,9 +6354,10 @@ static void hci_le_ext_adv_term_evt(struct hci_dev *hdev, void *data, hci_dev_lock(hdev); - adv = hci_find_adv_instance(hdev, ev->handle); if (ev->status) { + struct adv_info *adv; + adv = hci_find_adv_instance(hdev, ev->handle); if (!adv) goto unlock; @@ -6381,15 +6375,9 @@ static void hci_le_ext_adv_term_evt(struct hci_dev *hdev, void *data, goto unlock; } - if (adv) - adv->enabled = false; - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->conn_handle)); if (conn) { - /* Store handle in the connection so the correct advertising - * instance can be re-enabled when disconnected. - */ - conn->adv_instance = ev->handle; + struct adv_info *adv_instance; if (hdev->adv_addr_type != ADDR_LE_DEV_RANDOM || bacmp(&conn->resp_addr, BDADDR_ANY)) @@ -6400,8 +6388,9 @@ static void hci_le_ext_adv_term_evt(struct hci_dev *hdev, void *data, goto unlock; } - if (adv) - bacpy(&conn->resp_addr, &adv->random_addr); + adv_instance = hci_find_adv_instance(hdev, ev->handle); + if (adv_instance) + bacpy(&conn->resp_addr, &adv_instance->random_addr); } unlock: -- 2.7.4 From bc3a15920ec11b01be4894cfb6a86d94fd067602 Mon Sep 17 00:00:00 2001 From: Mateusz Bieganski Date: Mon, 13 May 2024 16:39:09 +0200 Subject: [PATCH 16/16] RISCV: configs: tizen_visionfive2: Enable FTRACE_SYSCALLS switch Enable FTRACE_SYSCALLS switch, for debug and profiling purposes. Change-Id: Iccfb832ca569ffe2621f5a9aa5ebb02418ec3007 Signed-off-by: Mateusz Bieganski --- arch/riscv/configs/tizen_visionfive2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/configs/tizen_visionfive2_defconfig b/arch/riscv/configs/tizen_visionfive2_defconfig index d17f728..af21370 100644 --- a/arch/riscv/configs/tizen_visionfive2_defconfig +++ b/arch/riscv/configs/tizen_visionfive2_defconfig @@ -435,6 +435,7 @@ CONFIG_DEBUG_PLIST=y CONFIG_DEBUG_SG=y # CONFIG_RCU_TRACE is not set CONFIG_RCU_EQS_DEBUG=y +CONFIG_FTRACE_SYSCALLS=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_RUNTIME_TESTING_MENU is not set CONFIG_MEMTEST=y -- 2.7.4