From 615fad3ace4a9a13312cbb8245832d233d8675c3 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Fri, 29 Sep 2023 16:31:59 +0800 Subject: [PATCH 01/15] assembly: remove ifdef out of riscv64-hello.s The '#ifdef' only work in preprocessing stage (riscv64-hello.S), the reboot part will be always compiled into binary currently. To avoid so, remove '#ifdef' out of the old riscv64-hello.s and add a new riscv64-hello-reboot.s file for nolibc reboot support. Signed-off-by: Zhangjin Wu --- .../assembly/riscv64/riscv64-hello-reboot.s | 34 +++++++++++++++++++ src/examples/assembly/riscv64/riscv64-hello.s | 10 ------ 2 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 src/examples/assembly/riscv64/riscv64-hello-reboot.s diff --git a/src/examples/assembly/riscv64/riscv64-hello-reboot.s b/src/examples/assembly/riscv64/riscv64-hello-reboot.s new file mode 100644 index 0000000..c298715 --- /dev/null +++ b/src/examples/assembly/riscv64/riscv64-hello-reboot.s @@ -0,0 +1,34 @@ +# +# Ref: https://github.com/riscv/riscv-asm-manual/blob/master/riscv-asm.md +# __NR_write, __NR_exit defined include/uapi/asm-generic/unistd.h, /usr/include/asm-generic/unistd.h +# + + .text + .globl _start +_start: + # write(1, msg, len) + li a0, 1 # write to stdout + la a1, msg # load msg + lw a2, len # length of the msg + + li a7, 64 # __NR_write + ecall + + # reboot, based on tools/include/nolibc/sys.h + li a0, 0xfffffffffee1dead + li a1, 0x28121969 + li a2, 0x4321fedc + li a3, 0 + li a7, 142 + ecall + + li a0, 0 # return 0 + li a7, 93 # __NR_exit + ecall + + .section .rodata +msg: + .string "Hello, RISC-V 64 and Poweroff!\n" + +len: + .word . - msg diff --git a/src/examples/assembly/riscv64/riscv64-hello.s b/src/examples/assembly/riscv64/riscv64-hello.s index 312e405..1a336f7 100644 --- a/src/examples/assembly/riscv64/riscv64-hello.s +++ b/src/examples/assembly/riscv64/riscv64-hello.s @@ -14,16 +14,6 @@ _start: li a7, 64 # __NR_write ecall -#ifdef __NOLIBC__ - # reboot, based on tools/include/nolibc/sys.h - li a0, 0xfffffffffee1dead - li a1, 0x28121969 - li a2, 0x4321fedc - li a3, 0 - li a7, 142 - ecall -#endif - li a0, 0 # return 0 li a7, 93 # __NR_exit ecall -- Gitee From 56a88d8532060caafc8f974befa6d6a159ee63b4 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Fri, 29 Sep 2023 22:48:56 +0800 Subject: [PATCH 02/15] kernel: feature: fix up patch support Without this moving, the kernel patch extraaction will be empty during the gengoals target. Reported-by: Yuan Tan Signed-off-by: Zhangjin Wu --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8ee581e..cbfee14 100644 --- a/Makefile +++ b/Makefile @@ -2888,6 +2888,10 @@ KERNEL_CONFIG_DIR := $(KERNEL_ABS_SRC)/arch/$(ARCH)/configs KERNEL_CONFIG_EXTRAFLAG := M= KERNEL_CONFIG_EXTRACMDS := yes N | $(empty) KERNEL_CLEAN_DEPS := kernel-modules-clean +# Must be assigned before gengoals +ifneq ($(FEATURE),) +KERNEL_PATCH_EXTRAACTION := [ -n "$$(FEATURE)" ] && $$(KERNEL_FEATURE_PATCH_TOOL) $$(ARCH) $$(XARCH) $$(BOARD) $$(LINUX) $$(KERNEL_ABS_SRC) $$(KERNEL_BUILD) "$$(FEATURE)" || true; +endif kernel-oldnoconfig: kernel-olddefconfig @@ -2955,8 +2959,6 @@ endif kernel-feature: $(Q)[ $(FCS) -eq 1 ] && tools/board/config.sh FEATURE=$(FEATURE) $(BOARD_LABCONFIG) $(LINUX) || true -KERNEL_PATCH_EXTRAACTION := [ -n "$$(FEATURE)" ] && $$(KERNEL_FEATURE_PATCH_TOOL) $$(ARCH) $$(XARCH) $$(BOARD) $$(LINUX) $$(KERNEL_ABS_SRC) $$(KERNEL_BUILD) "$$(FEATURE)" || true; - ifneq ($(firstword $(MAKECMDGOALS)),list) feature: kernel-feature features: feature -- Gitee From a32a7981e3cd022cf3f01e2f2be8ea5ffa07c47d Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Thu, 26 Oct 2023 21:00:55 +0800 Subject: [PATCH 03/15] loongarch64/virt: add v6.5.4 support nolibc is not supported by old kernel, upgrade to v6.5.4. Signed-off-by: Zhangjin Wu --- boards/loongarch64/virt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/loongarch64/virt/Makefile b/boards/loongarch64/virt/Makefile index 0c508fe..08992db 100644 --- a/boards/loongarch64/virt/Makefile +++ b/boards/loongarch64/virt/Makefile @@ -11,7 +11,7 @@ QEMU ?= v8.0.2 NETDEV_LIST ?= e1000 NETDEV ?= e1000 -LINUX ?= v6.3.6 +LINUX ?= v6.5.4 HOST_GCC := 9 -- Gitee From 8653e964ee3c2323437c6064d9dd95e5185473ea Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Sun, 5 Nov 2023 20:35:48 +0800 Subject: [PATCH 04/15] board: fix up board-show target Signed-off-by: Zhangjin Wu --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cbfee14..2ba245b 100644 --- a/Makefile +++ b/Makefile @@ -1407,7 +1407,7 @@ FILTER ?= .* VAR_FILTER ?= ^[ [\./_a-z0-9-]* \]|^ *[\_a-zA-Z0-9]* * define getboardvars -cat $(BOARD_MAKEFILE) | grep -E -v "^ *\#|ifeq|ifneq|else|endif|include |call |eval |_BASE|_PLUGIN|^$$" | tr -d '?: ' | cut -d '=' -f1 | uniq +cat $(BOARD_MAKEFILE) | grep -E -v "^ *\#|ifeq|ifneq|else|endif|include |call |eval |_BASE|_PLUGIN|override |^$$" | tr -d '?: ' | cut -d '=' -f1 | uniq endef define showboardvars -- Gitee From 3d22ae9651840e05d3743f7b7a6b55d2516f4096 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Mon, 6 Nov 2023 02:59:22 +0800 Subject: [PATCH 05/15] loongarch64/virt: add rootfs support Signed-off-by: Zhangjin Wu --- boards/loongarch64/virt/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/boards/loongarch64/virt/Makefile b/boards/loongarch64/virt/Makefile index 08992db..42cedc0 100644 --- a/boards/loongarch64/virt/Makefile +++ b/boards/loongarch64/virt/Makefile @@ -8,7 +8,7 @@ SERIAL ?= ttyS0,115200 QEMU ?= v8.0.2 -NETDEV_LIST ?= e1000 +NETDEV_LIST ?= e1000 e1000e ne2k_pci rtl8139 NETDEV ?= e1000 LINUX ?= v6.5.4 @@ -16,11 +16,16 @@ LINUX ?= v6.5.4 HOST_GCC := 9 # no buildroot support for loongarch currently, use nolibc initrd by default -NOLIBC := $(or $(NOLIBC),1) +NOLIBC := $(or $(NOLIBC),0) ROOTDEV_LIST := /dev/ram0 /dev/nfs ROOTDEV ?= /dev/ram0 +BUILDROOT ?= 2023.08.2 +ROOTFS ?= $(BSP_ROOT)/$(BUILDROOT)/rootfs.cpio.gz +FSTYPE ?= ext2 +HROOTFS ?= $(BSP_ROOT)/$(BUILDROOT)/rootfs.$(FSTYPE) + # download from https://github.com/loongson/Firmware/tree/main/LoongArchVirtMachine BIOS ?= $(BSP_BIOS)/edk2/edk2-loongarch64-code.fd -- Gitee From f54af9903a7f7e47036ea0463811f91459221550 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Mon, 6 Nov 2023 03:08:04 +0800 Subject: [PATCH 06/15] loongarch64/virt: support NFS boot Signed-off-by: Zhangjin Wu --- boards/loongarch64/virt/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boards/loongarch64/virt/README.md b/boards/loongarch64/virt/README.md index 03d988c..8a30926 100644 --- a/boards/loongarch64/virt/README.md +++ b/boards/loongarch64/virt/README.md @@ -9,6 +9,10 @@ $ make boot +## Boot me with NFS rootfs + + $ make boot ROOTDEV=nfs + ## Debug with qemu Debug interactively: -- Gitee From 7d8ed2e61251ea1134bf53c41866095c5a0bd532 Mon Sep 17 00:00:00 2001 From: Wu Zhangjin Date: Tue, 7 Nov 2023 17:10:39 +0800 Subject: [PATCH 07/15] loongarch64/virt: upgrade kernel version to v6.6 Signed-off-by: Wu Zhangjin --- boards/loongarch64/virt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/loongarch64/virt/Makefile b/boards/loongarch64/virt/Makefile index 42cedc0..0e09086 100644 --- a/boards/loongarch64/virt/Makefile +++ b/boards/loongarch64/virt/Makefile @@ -11,7 +11,7 @@ QEMU ?= v8.0.2 NETDEV_LIST ?= e1000 e1000e ne2k_pci rtl8139 NETDEV ?= e1000 -LINUX ?= v6.5.4 +LINUX ?= v6.6 HOST_GCC := 9 -- Gitee From b229d022d546034aca470e94ab9d3e0ca1ba7d62 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Wed, 8 Nov 2023 15:16:26 +0800 Subject: [PATCH 08/15] install: add more overlay directories support Signed-off-by: Zhangjin Wu --- Makefile | 7 ++++--- tools/root/install.sh | 25 +++++++++++++++---------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 2ba245b..e30c34d 100644 --- a/Makefile +++ b/Makefile @@ -2801,8 +2801,9 @@ root-dir-rebuild rootdir-rebuild: root-dir-clean $(ROOTDIR) FORCE PHONY += root-dir rootdir $(addsuffix -rebuild,root-dir rootdir) -# Install src/system +# Install src/system, src/overlay $(BSP_ROOT)/system and $(BSP_ROOT)/$(BUILDROOT)/system +ROOT_SYSTEM_OVERLAY := src/system $(wildcard src/overlay) $(wildcard $(BSP_ROOT)/overlay) $(wildcard $(BSP_ROOT)/$(BUILDROOT)/overlay) ROOT_INSTALL_TOOL := $(TOOL_DIR)/root/install.sh ifneq ($(wildcard $(KERNEL_BUILD)),) @@ -2811,8 +2812,8 @@ endif root-dir-install: root-dir-install-system $(ROOT_DIR_INSTALL_MODULES) -root-dir-install-system: src/system - $(Q)echo "LOG: Install system" && ROOTDIR=$(ROOTDIR) $(ROOT_INSTALL_TOOL) +root-dir-install-system: $(ROOT_SYSTEM_OVERLAY) + $(Q)echo "LOG: Install system" && ROOTDIR=$(ROOTDIR) SYSTEM="$(ROOT_SYSTEM_OVERLAY)" $(ROOT_INSTALL_TOOL) root-dir-install-modules: $(KERNEL_BUILD) $(Q)echo "LOG: Install modules" && make $(S) module-install || true diff --git a/tools/root/install.sh b/tools/root/install.sh index df7dea2..4ae24ca 100755 --- a/tools/root/install.sh +++ b/tools/root/install.sh @@ -9,16 +9,21 @@ TOP_DIR=$(cd $(dirname $0)/../../ && pwd) TOP_SRC=${TOP_DIR}/src [ -z "$SYSTEM" ] && SYSTEM=$TOP_SRC/system -echo "LOG: SYSTEM: $SYSTEM" -# The rootdir -#ROOTDIR=$1 -[ -z "$ROOTDIR" ] && echo "LOG: target ROOTDIR can not be empty" && exit 1 -echo "LOG: ROOTDIR: $ROOTDIR" - -for f in `find $SYSTEM -type f | sed -e "s%$SYSTEM%%g"` +# Override in this order: src/system src/overlay $(BSP_ROOT)/overlay $(BSP_ROOT)/$(BUILDROOT)/overlay +for sys in $SYSTEM do - dest=`dirname $f` - [ ! -d $ROOTDIR/$dest ] && mkdir -p $ROOTDIR/$dest - cp --remove-destination $SYSTEM/$f $ROOTDIR/$f + echo "LOG: SYSTEM: $sys" + + # The rootdir + #ROOTDIR=$1 + [ -z "$ROOTDIR" ] && echo "LOG: target ROOTDIR can not be empty" && exit 1 + echo "LOG: ROOTDIR: $ROOTDIR" + + for f in `find $sys -type f | sed -e "s%$sys%%g"` + do + dest=`dirname $f` + [ ! -d $ROOTDIR/$dest ] && mkdir -p $ROOTDIR/$dest + cp --remove-destination $sys/$f $ROOTDIR/$f + done done -- Gitee From e8b56754f9252e3101fba7c9ba2c7cb53a6608d6 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Wed, 8 Nov 2023 15:26:31 +0800 Subject: [PATCH 09/15] tools: add missing binary patch support Signed-off-by: Zhangjin Wu --- tools/qemu/patch.sh | 4 ++++ tools/root/patch.sh | 4 ++++ tools/uboot/patch.sh | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/tools/qemu/patch.sh b/tools/qemu/patch.sh index 7ab23a1..d30e002 100755 --- a/tools/qemu/patch.sh +++ b/tools/qemu/patch.sh @@ -40,6 +40,10 @@ do if [ -f "$p" ]; then patch -r- -N -l -d ${QEMU_SRC} -p1 < "$p" + if [ $? -ne 0 ]; then + grep -iq "GIT binary patch" $p + [ $? -eq 0 ] && pushd ${QEMU_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + fi fi done diff --git a/tools/root/patch.sh b/tools/root/patch.sh index ccb424b..61e5df0 100755 --- a/tools/root/patch.sh +++ b/tools/root/patch.sh @@ -35,6 +35,10 @@ do if [ -f "$p" ]; then patch -r- -N -l -d ${ROOT_SRC} -p1 < "$p" + if [ $? -ne 0 ]; then + grep -iq "GIT binary patch" $p + [ $? -eq 0 ] && pushd ${ROOT_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + fi fi done diff --git a/tools/uboot/patch.sh b/tools/uboot/patch.sh index 010030b..0f2edb6 100755 --- a/tools/uboot/patch.sh +++ b/tools/uboot/patch.sh @@ -40,6 +40,10 @@ do if [ -f "$p" ]; then patch -r- -N -l -d ${UBOOT_SRC} -p1 < "$p" + if [ $? -ne 0 ]; then + grep -iq "GIT binary patch" $p + [ $? -eq 0 ] && pushd ${UBOOT_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + fi fi done -- Gitee From 7b6f0ba213901169afc2921c8730ea5a0dbed235 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Wed, 8 Nov 2023 16:43:27 +0800 Subject: [PATCH 10/15] tools: fix up binary patch support Directly detect and use the right patch method is better. Signed-off-by: Zhangjin Wu --- tools/kernel/feature-patch.sh | 9 +++++---- tools/kernel/patch.sh | 9 +++++---- tools/qemu/patch.sh | 9 +++++---- tools/root/patch.sh | 9 +++++---- tools/uboot/patch.sh | 9 +++++---- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/tools/kernel/feature-patch.sh b/tools/kernel/feature-patch.sh index 0c889c8..d173759 100755 --- a/tools/kernel/feature-patch.sh +++ b/tools/kernel/feature-patch.sh @@ -112,10 +112,11 @@ do [ $? -eq 0 ] && continue if [ -f "$p" ]; then - patch -r- -N -l -d ${KERNEL_SRC} -p1 < "$p" - if [ $? -ne 0 ]; then - grep -iq "GIT binary patch" $p - [ $? -eq 0 ] && pushd ${KERNEL_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + grep -iq "GIT binary patch" $p + if [ $? -eq 0 ]; then + pushd ${KERNEL_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + else + patch -r- -N -l -d ${KERNEL_SRC} -p1 < "$p" fi fi done #p diff --git a/tools/kernel/patch.sh b/tools/kernel/patch.sh index eade464..26aa7be 100755 --- a/tools/kernel/patch.sh +++ b/tools/kernel/patch.sh @@ -44,10 +44,11 @@ do [ $? -eq 0 ] && continue if [ -f "$p" ]; then - patch -r- -N -l -d ${KERNEL_SRC} -p1 < "$p" - if [ $? -ne 0 ]; then - grep -iq "GIT binary patch" $p - [ $? -eq 0 ] && pushd ${KERNEL_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + grep -iq "GIT binary patch" "$p" + if [ $? -eq 0 ]; then + pushd ${KERNEL_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + else + patch -r- -N -l -d ${KERNEL_SRC} -p1 < "$p" fi fi done diff --git a/tools/qemu/patch.sh b/tools/qemu/patch.sh index d30e002..aeaf91a 100755 --- a/tools/qemu/patch.sh +++ b/tools/qemu/patch.sh @@ -39,10 +39,11 @@ do [ $? -eq 0 ] && continue if [ -f "$p" ]; then - patch -r- -N -l -d ${QEMU_SRC} -p1 < "$p" - if [ $? -ne 0 ]; then - grep -iq "GIT binary patch" $p - [ $? -eq 0 ] && pushd ${QEMU_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + grep -iq "GIT binary patch" $p + if [ $? -eq 0 ]; then + pushd ${QEMU_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + else + patch -r- -N -l -d ${QEMU_SRC} -p1 < "$p" fi fi done diff --git a/tools/root/patch.sh b/tools/root/patch.sh index 61e5df0..b423570 100755 --- a/tools/root/patch.sh +++ b/tools/root/patch.sh @@ -34,10 +34,11 @@ do [ $? -eq 0 ] && continue if [ -f "$p" ]; then - patch -r- -N -l -d ${ROOT_SRC} -p1 < "$p" - if [ $? -ne 0 ]; then - grep -iq "GIT binary patch" $p - [ $? -eq 0 ] && pushd ${ROOT_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + grep -iq "GIT binary patch" $p + if [ $? -eq 0 ]; then + pushd ${ROOT_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + else + patch -r- -N -l -d ${ROOT_SRC} -p1 < "$p" fi fi done diff --git a/tools/uboot/patch.sh b/tools/uboot/patch.sh index 0f2edb6..89bd508 100755 --- a/tools/uboot/patch.sh +++ b/tools/uboot/patch.sh @@ -39,10 +39,11 @@ do [ $? -eq 0 ] && continue if [ -f "$p" ]; then - patch -r- -N -l -d ${UBOOT_SRC} -p1 < "$p" - if [ $? -ne 0 ]; then - grep -iq "GIT binary patch" $p - [ $? -eq 0 ] && pushd ${UBOOT_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + grep -iq "GIT binary patch" $p + if [ $? -eq 0 ]; then + pushd ${UBOOT_SRC} >/dev/null && git apply -p1 < "$p" && popd >/dev/null + else + patch -r- -N -l -d ${UBOOT_SRC} -p1 < "$p" fi fi done -- Gitee From 0e7f3767423e4769a7f6843e0759e4756297ef69 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Sat, 18 Nov 2023 10:08:16 +0800 Subject: [PATCH 11/15] README: update linux-lab-disk info Signed-off-by: Zhangjin Wu --- README.md | 15 +++++++++------ README_zh.md | 23 ++++++++++++++--------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 5dd6c9e..4a3c365 100644 --- a/README.md +++ b/README.md @@ -202,11 +202,11 @@ Related Projects: * * RISC-V Lab - * Learning embedded RISC-V software development,merged in [Linux Lab Disk][029] + * Learning embedded RISC-V software development,merged in [Linux Lab Disk][029] for RISC-V * * ARM Lab - * Learning embedded ARM software development,merged in [Linux Lab Disk][029] + * Learning embedded ARM software development,merged in [Linux Lab Disk][029] for ARM * ## 1.3 Demonstration @@ -287,13 +287,15 @@ If really a Linux newbie or simply don't want to spend time on boring installati It supports: * Capacity - * From 32G to 512G and even 1T, 2T + * From 32G to 512G and even 1T, 2T, 4T +* Products + * High Speed U Disk, Solid U Disk, Portable disk, Solid disk (NVME / SATA) * Systems * Top6 Linux Distributions and even more based on your requirement - * Include Ubuntu 18.04-22.04, Deepin 20.5+, Fedora 34+, Mint 20.2+, Kali, Manjaro + * Include Ubuntu 18.04-22.04, Deepin 20.8+, Fedora 37+, Mint 21.1+, Kali, Manjaro * Features * Boot from any powered-off 64bit X86 Machine, include PC, Laptop and MacBook - * Boot from any running Windows, Linux and macOS and run in parallel with them + * Boot from any running Windows, Linux and run in parallel with them * Switch from or to any running Windows, Linux without poweroff * Multiple Linux Lab Disks can boot or switch from/to each other * Support timezone setting of different systems transparently, without manual setting @@ -304,6 +306,7 @@ It supports: * Merged in many labs, such as Linux Lab, Linux 0.11 Lab, be able to learn Linux kernel, embedded Linux, Uboot, Assembly, C, Python, Database, Network and so forth * Where to buy * [Taobao shop of TinyLab.org Community][023] + * [Bilibili Shop][025] * Product details * * Introduce and demonstrate the features, functions and usage of Linux Lab Disk @@ -729,7 +732,7 @@ Check the board specific configuration: ### 3.1.2.3 Buy one -All supported real hardware boards, virtual hardware boards support and the related Linux Lab Disk will be put in [TinyLab.org's Taobao Shop][024], after bought them, please contact with wechat: `tinylab` and join in the development group. +All supported real hardware boards, virtual hardware boards support and the related Linux Lab Disk will be put in [TinyLab.org's Taobao Shop][024] or [Bilibili Shop][025], after bought them, please contact with wechat: `tinylab` and join in the development group. ### 3.1.3 Using as plugins diff --git a/README_zh.md b/README_zh.md index 8001ecd..5dc6123 100644 --- a/README_zh.md +++ b/README_zh.md @@ -215,11 +215,11 @@ Linux Lab 是一个开源软件,不提供任何保证,请自行承担使用 * * RISC-V Lab - * 用于学习嵌入式 RISC-V 软件开发,已集成到 [Linux Lab Disk][028],即泰晓 Linux 实验盘 + * 用于学习嵌入式 RISC-V 软件开发,已集成到 [Linux Lab Disk][028],即泰晓 RISC-V 实验盘 * * ARM Lab - * 用于学习嵌入式 ARM 软件开发,已集成到 [Linux Lab Disk][028],即泰晓 Linux 实验盘 + * 用于学习嵌入式 ARM 软件开发,已集成到 [Linux Lab Disk][028],即泰晓 ARM 实验盘 * ## 1.3 演示视频 @@ -523,23 +523,26 @@ Linux Lab 基于 Docker,对于已经安装 Docker 并配置了国内加速镜 『Linux Lab Disk - 泰晓 Linux 实验盘』已经支持如下功能: * 可选容量 - * 覆盖 32G, 64G, 128G, 256G, 512G, 1T, 2T 等,可按需定制任意容量 + * 覆盖 32G, 64G, 128G, 256G, 512G, 1T, 2T, 4T 等,可按需定制任意容量 +* 可选形态 + * 高速或固态 U 盘、Mini 移动硬盘、固态硬盘(含 NVME / SATA) * 可选系统 * 覆盖全球 Top6 发行版,可按需定制更多 Linux 发行版 - * Ubuntu 18.04-22.04, Deepin 20.05+, Fedora 34+, Mint 20.2+, Kali, Manjaro + * Ubuntu 18.04-22.04, Deepin 20.08+, Fedora 37+, Mint 21.1+, Kali, Manjaro * 主要特性 * 随身携带:支持在 64 位 X86 台式机、笔记本和 macBook 上即插即跑 - * 智能启动:在 Windows, Linux 和 macOS 系统下自动检测后并行启动 - * 智能切换:在 Windows, Linux 和 macOS 系统下自动检测并免关机切换系统 + * 智能启动:在 Windows, Linux 系统下自动检测后并行启动 + * 智能切换:在 Windows, Linux 系统下自动检测并免关机切换系统 * 相互套娃:多支盘可相互启动或来回切换,可同时使用多个不同的 Linux 系统发行版 * 时区兼容:自动兼容 Windows, MacOS 和 Linux 的时区设定,跟主系统来回任意切换后时间保持一致 * 自动共享:在 Windows 或 Linux 主系统下并行运行时,自动提供多种与主系统的文件与粘贴板共享方式 * 透明倍容:可用容量翻倍,128G 可以当 ~256G 左右使用 * 零损编译:扩大可用容量,提升编译速度,节省擦写寿命 - * 出厂恢复:在主系统出现某些故障的情况下,允许恢复出厂系统 + * 出厂恢复:在主系统出现某些故障的情况下,允许恢复出厂系统,也支持按需配置备份和还原功能 * 即时实验,集成多套自研实验环境,可在 1 分钟内开展 Linux 内核、嵌入式 Linux、U-Boot、汇编、C、Python、数据库、网络等实验 * 购买地址 - * [泰晓开源小店][022],该地址为目前唯一官方在线销售地址 + * [泰晓开源小店][022],该地址为目前泰晓社区官方唯一淘宝销售地址 + * 泰晓科技 B 站工房,关注 B 站的 [泰晓科技](https://space.bilibili.com/687228362) 账号,即可进工房选购 * 产品详情 * * 详细介绍了特性、功能与用法,配套了大量的演示视频 @@ -967,10 +970,12 @@ Linux Lab 是一套完备的嵌入式 Linux 开发环境,需要预留足够的 #### 3.1.2.3 如何选购 -所有适配过的开发板,包括真实开发板与虚拟开发板(即 Linux Lab BSP),都会统一放置在 [泰晓开源小店][023] 供大家选购,选购完毕后可以加微信号 `tinylab` 申请进入相应的技术群组。 +所有适配过的开发板,包括真实开发板与虚拟开发板(即 Linux Lab BSP),都会统一放置在 [泰晓开源小店][023] 或 [泰晓 B 站工房](https://space.bilibili.com/687228362) 供大家选购,选购完毕后可以加微信号 `tinylab` 申请进入相应的技术群组。 也可以直接在淘宝手机 App 内搜索 “泰晓 Linux” 后购买,可搭配店内的 “Linux Lab Disk” 一起使用,用上 “Linux Lab Disk” 后就完全不需要安装独立的 Linux 开发环境。 +为了便利大家开展不同架构处理器 Linux 内核与嵌入式 Linux 系统的学习,泰晓社区于近日推出了泰晓 RISC-V 实验盘、泰晓 ARM 实验盘、泰晓 X86 实验盘、泰晓 LoongArch 实验盘等特定架构实验盘,分别内置了特定架构的虚拟开发板。 + ### 3.1.3 以插件方式使用 Linux Lab 支持“插件”功能,允许在独立的 git 仓库中添加和维护开发板。采用独立的仓库维护可以确保 Linux Lab 在支持愈来愈多的开发板的同时,自身的代码体积不会变得太大。 -- Gitee From 5176509b286a0794088cb315d079651a2ca91f90 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Sun, 19 Nov 2023 02:57:33 +0800 Subject: [PATCH 12/15] tools: root: fix up installing of symlinks and devices Signed-off-by: Zhangjin Wu --- tools/root/install.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tools/root/install.sh b/tools/root/install.sh index 4ae24ca..04e1906 100755 --- a/tools/root/install.sh +++ b/tools/root/install.sh @@ -16,14 +16,11 @@ do echo "LOG: SYSTEM: $sys" # The rootdir - #ROOTDIR=$1 [ -z "$ROOTDIR" ] && echo "LOG: target ROOTDIR can not be empty" && exit 1 echo "LOG: ROOTDIR: $ROOTDIR" - for f in `find $sys -type f | sed -e "s%$sys%%g"` - do - dest=`dirname $f` - [ ! -d $ROOTDIR/$dest ] && mkdir -p $ROOTDIR/$dest - cp --remove-destination $sys/$f $ROOTDIR/$f - done + # Copy everything, including devices (recreate) + if [ -d "$sys" ]; then + sudo rsync -au --devices $sys/* $ROOTDIR/ + fi done -- Gitee From a75880f77a34f121afe36e3d912476b5269da459 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Sun, 19 Nov 2023 03:22:35 +0800 Subject: [PATCH 13/15] tools: root: remove devices installing support buildroot requires to create device files from devices table file and it fails to 'chown' on this device files due to permission issue, so, remove the --devices option here. Signed-off-by: Zhangjin Wu --- tools/root/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/root/install.sh b/tools/root/install.sh index 04e1906..aa0f9c7 100755 --- a/tools/root/install.sh +++ b/tools/root/install.sh @@ -21,6 +21,6 @@ do # Copy everything, including devices (recreate) if [ -d "$sys" ]; then - sudo rsync -au --devices $sys/* $ROOTDIR/ + sudo rsync -au $sys/* $ROOTDIR/ fi done -- Gitee From 94b67d616835c973e4fb2a90b2bc05bda32d3140 Mon Sep 17 00:00:00 2001 From: Zhangjin Wu Date: Wed, 22 Nov 2023 23:27:24 +0800 Subject: [PATCH 14/15] modules: ldt: align with the other modules Signed-off-by: Zhangjin Wu --- src/modules/ldt/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/ldt/Makefile b/src/modules/ldt/Makefile index dc6023d..48d6624 100644 --- a/src/modules/ldt/Makefile +++ b/src/modules/ldt/Makefile @@ -13,15 +13,15 @@ obj-m+= ldt.o #obj-m+= ldt_configfs_basic.o obj-m+= kthread_sample.o -KERNELDIR ?= /lib/modules/$(shell uname -r)/build +KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build all: modules dio modules: - $(MAKE) -C $(KERNELDIR) M=$$PWD modules + $(MAKE) -C $(KERNEL_SRC) M=$$PWD modules modules_install: - $(MAKE) -C $(KERNELDIR) M=$$PWD modules_install + $(MAKE) -C $(KERNEL_SRC) M=$$PWD modules_install clean: rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions modules.order Module.symvers dio *.tmp *.log -- Gitee From 7799b8cc2a26189a0f784e731aacd22be07390f7 Mon Sep 17 00:00:00 2001 From: Yuan Tan Date: Thu, 23 Nov 2023 19:20:44 +0800 Subject: [PATCH 15/15] riscv64/tiny-riscv-box: bump to 50f29c4df56a667f28 --- boards/riscv64/tiny-riscv-box/bsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/riscv64/tiny-riscv-box/bsp b/boards/riscv64/tiny-riscv-box/bsp index 3ada334..50f29c4 160000 --- a/boards/riscv64/tiny-riscv-box/bsp +++ b/boards/riscv64/tiny-riscv-box/bsp @@ -1 +1 @@ -Subproject commit 3ada334bc770d70527d6b940e57e88021b5d4922 +Subproject commit 50f29c4df56a667f28df12606aebd2b4d98d38df -- Gitee