如何更新系统2. 系统1 全系统更新: # Debian系: apt update && apt upgrade Redhat系: yum update Arch系: -pacman -Syu 2. 单独更新内核 # 2.1 更新自己编译的内核 # 将内核放置/boot下即可(通常/boot是grub.cfg默认指定的根目录) +pacman -Syu 安同 OS (AOSC OS): +oma upgrade 2. 单独更新内核 # 2.1 更新自己编译的内核 # 将内核放置/boot下即可(通常/boot是grub.cfg默认指定的根目录) 更新完记得更新grub.cfg, 见第四节. 2.2 更新软件源上的内核 # 以Debian系为例, 其余不做演示: -root@loongson-pc:/home/loongson# apt-cache search linux-header aufs-dkms - DKMS files to build and install aufs linux-headers-4.19.0-17-common - Common header files for Linux 4.19 linux-headers-4.19.0-17-loongson-3 - Linux kernel headers for 4.19 on loongson-3 linux-headers-4.19.0-18-common - Common header files for Linux 4.19 linux-headers-4.19.0-18-loongson-3 - Linux kernel headers for 4. +root@loongson-pc:/home/loongson# apt-cache search linux-header aufs-dkms - DKMS files to build and install aufs linux-headers-4.19.0-17-common - Common header files for Linux 4.19 linux-headers-4.19.0-17-loongson-3 - Linux kernel headers for 4.19 on loongson-3 linux-headers-4.19.0-18-common - Common header files for Linux 4. ...
生成系统下的一些文件2. 系统1. Initrd # 通常, lib/modules/下的文件夹名称和内核的版本名是一致的, 所以可以通过下列命令生成Initrd: 1.1 dracut命令 # ls lib/modules/* | xargs -I N dracut --kver N --force 1.2 mkinitramfs命令 # ls lib/modules/* | xargs -I N mkinitramfs /lib/modules/N -o /boot/initrd.img-N 2. GRUB # 2.1 Grub # 通常, Grub安装在当前启动系统所在的磁盘上, 如下命令可以找到当前磁盘. (希望将Grub安装在其他盘的同学, 看明白自己想要的效果) [root@mxd ~]# lsblk -P | grep "$(lsblk -P | grep -w 'MOUNTPOINTS="/"' | sed 's/.*MAJ:MIN="\([^:]*\).*/\1/g'):0" | awk -F '"' '{print "/dev/" $2}' /dev/nvme0n1 再通过grub-install或者grub2-install命令安装进磁盘: diff --git "a/categories/2.-\347\263\273\347\273\237/index.xml" "b/categories/2.-\347\263\273\347\273\237/index.xml" index 59a35c2..f4e650a 100644 --- "a/categories/2.-\347\263\273\347\273\237/index.xml" +++ "b/categories/2.-\347\263\273\347\273\237/index.xml" @@ -1,10 +1,11 @@ -2. 系统 on 龙芯玩机指南https://loonguser.github.io/categories/2.-%E7%B3%BB%E7%BB%9F/Recent content in 2. 系统 on 龙芯玩机指南Hugo -- gohugo.iozh如何更新系统https://loonguser.github.io/system/update_system/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/system/update_system/1 全系统更新: # Debian系: +2. 系统 on 龙芯玩机指南https://loonguser.github.io/categories/2.-%E7%B3%BB%E7%BB%9F/Recent content in 2. 系统 on 龙芯玩机指南Hugozh如何更新系统https://loonguser.github.io/system/update_system/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/system/update_system/1 全系统更新: # Debian系: apt update && apt upgrade Redhat系: yum update Arch系: -pacman -Syu 2. 单独更新内核 # 2.1 更新自己编译的内核 # 将内核放置/boot下即可(通常/boot是grub.cfg默认指定的根目录) +pacman -Syu 安同 OS (AOSC OS): +oma upgrade 2. 单独更新内核 # 2.1 更新自己编译的内核 # 将内核放置/boot下即可(通常/boot是grub.cfg默认指定的根目录) 更新完记得更新grub.cfg, 见第四节. 2.2 更新软件源上的内核 # 以Debian系为例, 其余不做演示: -root@loongson-pc:/home/loongson# apt-cache search linux-header aufs-dkms - DKMS files to build and install aufs linux-headers-4.19.0-17-common - Common header files for Linux 4.19 linux-headers-4.19.0-17-loongson-3 - Linux kernel headers for 4.19 on loongson-3 linux-headers-4.19.0-18-common - Common header files for Linux 4.19 linux-headers-4.19.0-18-loongson-3 - Linux kernel headers for 4.生成系统下的一些文件https://loonguser.github.io/system/gen_sys_file/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/system/gen_sys_file/1. Initrd # 通常, lib/modules/下的文件夹名称和内核的版本名是一致的, 所以可以通过下列命令生成Initrd: +root@loongson-pc:/home/loongson# apt-cache search linux-header aufs-dkms - DKMS files to build and install aufs linux-headers-4.19.0-17-common - Common header files for Linux 4.19 linux-headers-4.19.0-17-loongson-3 - Linux kernel headers for 4.19 on loongson-3 linux-headers-4.19.0-18-common - Common header files for Linux 4.生成系统下的一些文件https://loonguser.github.io/system/gen_sys_file/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/system/gen_sys_file/1. Initrd # 通常, lib/modules/下的文件夹名称和内核的版本名是一致的, 所以可以通过下列命令生成Initrd: 1.1 dracut命令 # ls lib/modules/* | xargs -I N dracut --kver N --force 1.2 mkinitramfs命令 # ls lib/modules/* | xargs -I N mkinitramfs /lib/modules/N -o /boot/initrd.img-N 2. GRUB # 2.1 Grub # 通常, Grub安装在当前启动系统所在的磁盘上, 如下命令可以找到当前磁盘. (希望将Grub安装在其他盘的同学, 看明白自己想要的效果) [root@mxd ~]# lsblk -P | grep "$(lsblk -P | grep -w 'MOUNTPOINTS="/"' | sed 's/.*MAJ:MIN="\([^:]*\).*/\1/g'):0" | awk -F '"' '{print "/dev/" $2}' /dev/nvme0n1 再通过grub-install或者grub2-install命令安装进磁盘: grub-install /dev/nvme0n1 2.系统下查看一些信息https://loonguser.github.io/system/systeminfo/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/system/systeminfo/1. 查看系统版本 # [root@mxd mxd]# cat /etc/os-release NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://bugs.archlinux.org/" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo 2. 查看内核版本 # [root@mxd mxd]# uname -a Linux mxd 6.5.0-4 #1 SMP PREEMPT Thu, 31 Aug 2023 09:38:08 +0000 loongarch64 GNU/Linux 3. 查看固件版本 # [root@mxd mxd]# cat /sys/firmware/loongson/boardinfo BIOS Information Vendor : Loongson Version : Loongson-UDK2018-V4.0.05494-stable202305 ROM Size : 4096 KB Release Date : 07/10/23 18:05:47 Board Information Manufacturer : Loongson Board Name : Loongson-LS3A6000-7A2000-1w-EVB-V1.新世界Archlinux系统安装https://loonguser.github.io/system/install_archlinux/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/system/install_archlinux/转载文章来源: https://bbs.loongarch.org/d/88-archlinux/28 diff --git "a/categories/3.-\345\272\224\347\224\250/index.html" "b/categories/3.-\345\272\224\347\224\250/index.html" index 497464f..a21688e 100644 --- "a/categories/3.-\345\272\224\347\224\250/index.html" +++ "b/categories/3.-\345\272\224\347\224\250/index.html" @@ -1,5 +1,5 @@ -3. 应用 | 龙芯玩机指南 - +3. 应用 | 龙芯玩机指南 + diff --git "a/categories/3.-\345\272\224\347\224\250/index.xml" "b/categories/3.-\345\272\224\347\224\250/index.xml" index fd383df..a6d3ebf 100644 --- "a/categories/3.-\345\272\224\347\224\250/index.xml" +++ "b/categories/3.-\345\272\224\347\224\250/index.xml" @@ -1,4 +1,4 @@ -3. 应用 on 龙芯玩机指南https://loonguser.github.io/categories/3.-%E5%BA%94%E7%94%A8/Recent content in 3. 应用 on 龙芯玩机指南Hugo -- gohugo.iozh3A6000上搭建gogshttps://loonguser.github.io/applications/gogs/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/applications/gogs/pacman -S mariadb mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql systemctl start mysql mariadb --initialize-insecure --user=mysql --datadir='./data' mysql -u root [root@mxd gitrepo]# mysql -u root mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 8 Server version: 11.0.2-MariaDB Arch Linux Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help.3A6000上搭建hexo博客https://loonguser.github.io/applications/blog/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/applications/blog/pacman -S nodejs npm git npm config set proxy="http://127.0.0.1:7890" npm install -g hexo-cli mkdir loongsonwiki cd loongsonwiki hexo init git clone https://github.com/hdxw/hexo-theme-prowiki.git themes/hexo-theme-prowiki git submodule add https://github.com/hdxw/hexo-theme-prowiki.git themes/hexo-theme-prowiki vim _config.yml diff --git a/_config.yml b/_config.yml index 02b67a4..2391977 100644 --- a/_config.yml +++ b/_config.yml @@ -97,7 +97,7 @@ ignore: # Extensions ## Plugins: https://hexo.io/plugins/ ## Themes: https://hexo.io/themes/ -theme: landscape +theme: hexo-theme-prowiki # Deployment ## Docs: https://hexo.io/docs/one-command-deploymentQemu使用https://loonguser.github.io/applications/qemu/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/applications/qemu/部分环境准备: # qemu: https://gitlab.com/qemu-project/qemu.git +3. 应用 on 龙芯玩机指南https://loonguser.github.io/categories/3.-%E5%BA%94%E7%94%A8/Recent content in 3. 应用 on 龙芯玩机指南Hugozh3A6000上搭建gogshttps://loonguser.github.io/applications/gogs/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/applications/gogs/pacman -S mariadb mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql systemctl start mysql mariadb --initialize-insecure --user=mysql --datadir='./data' mysql -u root [root@mxd gitrepo]# mysql -u root mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 8 Server version: 11.0.2-MariaDB Arch Linux Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help.3A6000上搭建hexo博客https://loonguser.github.io/applications/blog/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/applications/blog/pacman -S nodejs npm git npm config set proxy="http://127.0.0.1:7890" npm install -g hexo-cli mkdir loongsonwiki cd loongsonwiki hexo init git clone https://github.com/hdxw/hexo-theme-prowiki.git themes/hexo-theme-prowiki git submodule add https://github.com/hdxw/hexo-theme-prowiki.git themes/hexo-theme-prowiki vim _config.yml diff --git a/_config.yml b/_config.yml index 02b67a4..2391977 100644 --- a/_config.yml +++ b/_config.yml @@ -97,7 +97,7 @@ ignore: # Extensions ## Plugins: https://hexo.io/plugins/ ## Themes: https://hexo.io/themes/ -theme: landscape +theme: hexo-theme-prowiki # Deployment ## Docs: https://hexo.io/docs/one-command-deploymentQemu使用https://loonguser.github.io/applications/qemu/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/applications/qemu/部分环境准备: # qemu: https://gitlab.com/qemu-project/qemu.git 固件: https://github.com/loongson/Firmware/raw/main/LoongArchVirtMachine/edk2-loongarch64-code.fd 系统: http://pkg.loongnix.cn/loongnix/isos/Loongnix-20.5/ qemu安装 # # Arch系 pacman -S qemu-system-loongarch64 # Debian系 apt install qemu-system-loongarch64 # Fedora系 yum install qemu-system-loongarch64 自己编译安装: diff --git a/categories/index.html b/categories/index.html index 537e6dc..d05f439 100644 --- a/categories/index.html +++ b/categories/index.html @@ -1,5 +1,5 @@ -Categories | 龙芯玩机指南 - +Categories | 龙芯玩机指南 + diff --git a/categories/index.xml b/categories/index.xml index 9e2ad59..11d208e 100644 --- a/categories/index.xml +++ b/categories/index.xml @@ -1 +1 @@ -Categories on 龙芯玩机指南https://loonguser.github.io/categories/Recent content in Categories on 龙芯玩机指南Hugo -- gohugo.iozh1. 固件https://loonguser.github.io/categories/1.-%E5%9B%BA%E4%BB%B6/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/categories/1.-%E5%9B%BA%E4%BB%B6/2. 系统https://loonguser.github.io/categories/2.-%E7%B3%BB%E7%BB%9F/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/categories/2.-%E7%B3%BB%E7%BB%9F/3. 应用https://loonguser.github.io/categories/3.-%E5%BA%94%E7%94%A8/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/categories/3.-%E5%BA%94%E7%94%A8/内核https://loonguser.github.io/categories/%E5%86%85%E6%A0%B8/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/categories/%E5%86%85%E6%A0%B8/ \ No newline at end of file +Categories on 龙芯玩机指南https://loonguser.github.io/categories/Recent content in Categories on 龙芯玩机指南Hugozh1. 固件https://loonguser.github.io/categories/1.-%E5%9B%BA%E4%BB%B6/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/categories/1.-%E5%9B%BA%E4%BB%B6/2. 系统https://loonguser.github.io/categories/2.-%E7%B3%BB%E7%BB%9F/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/categories/2.-%E7%B3%BB%E7%BB%9F/3. 应用https://loonguser.github.io/categories/3.-%E5%BA%94%E7%94%A8/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/categories/3.-%E5%BA%94%E7%94%A8/内核https://loonguser.github.io/categories/%E5%86%85%E6%A0%B8/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/categories/%E5%86%85%E6%A0%B8/ \ No newline at end of file diff --git "a/categories/\345\206\205\346\240\270/index.html" "b/categories/\345\206\205\346\240\270/index.html" index 5d9f29b..44dae01 100644 --- "a/categories/\345\206\205\346\240\270/index.html" +++ "b/categories/\345\206\205\346\240\270/index.html" @@ -1,5 +1,5 @@ -内核 | 龙芯玩机指南 - +内核 | 龙芯玩机指南 + diff --git "a/categories/\345\206\205\346\240\270/index.xml" "b/categories/\345\206\205\346\240\270/index.xml" index 993c799..9b93402 100644 --- "a/categories/\345\206\205\346\240\270/index.xml" +++ "b/categories/\345\206\205\346\240\270/index.xml" @@ -1,4 +1,4 @@ -内核 on 龙芯玩机指南https://loonguser.github.io/categories/%E5%86%85%E6%A0%B8/Recent content in 内核 on 龙芯玩机指南Hugo -- gohugo.iozh内核编译https://loonguser.github.io/system/kernel/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/system/kernel/龙芯内核编译 # 目前龙芯已经由MIPS架构转战LoongArch架构. +内核 on 龙芯玩机指南https://loonguser.github.io/categories/%E5%86%85%E6%A0%B8/Recent content in 内核 on 龙芯玩机指南Hugozh内核编译https://loonguser.github.io/system/kernel/Mon, 01 Jan 0001 00:00:00 +0000https://loonguser.github.io/system/kernel/龙芯内核编译 # 目前龙芯已经由MIPS架构转战LoongArch架构. vmlinux+vmlinuz libmodules RamDisk_initrd 准备阶段 # 下面以LoongArch架构的编译为例. 编译器采用Gcc交叉编译LoongArch版本 编译器版本 : loongarch64-linux-gnu-gcc-8.3.0 配置文件 采用龙芯默认配置: cp arch/loongarch/configs/loongson3_defconfig .config 开始编译 # vmlinux/vmlinuz 执行 make ARCH=loongarch CROSS_COMPILE=/opt/LoongArch_Toolchains/loongarch64-linux-gnu-2020-11-06/bin/loongarch64-linux-gnu-(此为编译器路径 which gcc) menuconfig 进入图形化配置界面,开关相关功能,我们直接Esc退出. diff --git a/en/404.html b/en/404.html index 5b146bb..3a09e44 100644 --- a/en/404.html +++ b/en/404.html @@ -1,2 +1,2 @@ -404 Page not found | 龙芯玩机指南 +404 Page not found | 龙芯玩机指南 404Page Not Found龙芯玩机指南 \ No newline at end of file diff --git a/en/categories/index.html b/en/categories/index.html index e665710..c3ada81 100644 --- a/en/categories/index.html +++ b/en/categories/index.html @@ -1,4 +1,4 @@ -Categories | 龙芯玩机指南 +Categories | 龙芯玩机指南