AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-32896

malat's questions

Martin Hope
malat
Asked: 2024-03-01 16:18:11 +0800 CST

如何将全角字符转换为半角字符(反之亦然)?

  • 8

这是我的简单问题,如何从命令行将半角转换为全角。我认为这将内置在我的iconv命令行中,但我在这里没有找到任何内容:

$ iconv  -l | grep -i full
-> nothing
$ iconv  -l | grep -i half
-> nothing

典型的输入是:

$ echo -n "Ab9876543210" | iconv -f utf8 -t utf16be | hexdump -C
00000000  ff 21 00 62 ff 19 ff 18  ff 17 ff 16 ff 15 ff 14  |.!.b............|
00000010  ff 13 ff 12 ff 11 ff 10                           |........|
00000018
character-encoding
  • 1 个回答
  • 217 Views
Martin Hope
malat
Asked: 2023-11-07 14:57:33 +0800 CST

从 ISO-IR-87 转换为 UTF-8 编码

  • 10

我正在研究 Debian 及其衍生系统。我想将原始输入 ISO-IR-87 转换为 UTF-8。有简单的方法吗?

以供参考:

% iconv -l | grep "IR-8"
ISO-IR-8-1//
ISO-IR-84//
ISO-IR-85//
ISO-IR-86//
ISO-IR-88//
ISO-IR-89//

% dpkg -S /usr/bin/iconv
libc-bin: /usr/bin/iconv

% apt-cache policy libc-bin
libc-bin:
  Installed: 2.36-9+deb12u3
  Candidate: 2.36-9+deb12u3
  Version table:
 *** 2.36-9+deb12u3 500
        500 http://security.debian.org/debian-security bookworm-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.36-9+deb12u2 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages

重新编码似乎可以在我的系统上运行(感谢@frostschutz):

% echo -n 'ABC' > t.txt
% recode -v UTF-8..JIS_X0208 t.txt
Request: UTF-8..:libiconv:..JIS_X0208
Shrunk to: UTF-8..JIS_X0208
Recoding t.txt... done
% recode -v JIS_X0208..UTF-8 t.txt
Request: JIS_X0208..:libiconv:..UTF-8
Shrunk to: JIS_X0208..UTF-8
Recoding t.txt... done
debian
  • 1 个回答
  • 282 Views
Martin Hope
malat
Asked: 2023-06-28 19:54:08 +0800 CST

如何将包含特殊字符的长命令拆分为多行命令?

  • 5

我一直在阅读 gitlab 的文档:

  • https://docs.gitlab.com/ee/ci/yaml/script.html#split-long-commands

就我而言,我有一个特殊字符(冒号“:”),所以我也阅读了:

  • https://docs.gitlab.com/ee/ci/yaml/script.html#use-special-characters-with-script

现在我的问题是:如何将两者结合起来?

一方面我有(参考):

job name:
  script:
    - |
      for file in *; do
        echo "$file";
        echo "${REPO}/${file}";
      done

另一方面,我有(参考):

  script:
    - 'for file in *; do curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file "${file}" "${REPO}/${file}"; done'

我如何将两者结合起来?长期解决方案是将for循环中的错误处理为(ref):

    - 'http_code=$(curl -o /dev/null -s -w "%{http_code}" --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "$file" "${REPO}/${file}")'
    - if [ $http_code -ne 201 ]; then echo "Upload failed: terminating" && false; fi;
yaml
  • 1 个回答
  • 46 Views
Martin Hope
malat
Asked: 2022-07-08 06:34:54 +0800 CST

Debian:令人困惑的 ld.so 联机帮助页文档

  • 0

我ld.so在我的 Debian 稳定系统上的手册页上担任主角。它目前指出:

$ man ld.so
[...]
NOTES
   Hardware capabilities
       Some shared objects are compiled using hardware-specific instructions which do not exist on every CPU.  Such objects should be installed in directories whose names define the required hardware ca‐
       pabilities, such as /usr/lib/sse2/.  The dynamic linker checks these directories against the hardware of the machine and selects the most suitable version of a given shared object.  Hardware capa‐
       bility directories can be cascaded to combine CPU features.  The list of supported hardware capability names depends on the CPU.  The following names are currently recognized:

让我吃惊的是最后一句话:

目前可识别以下名称

目前这不是真的(或者至少现在不是了),因为我能找到的是:

% cat /etc/ld.so.conf.d/*
/usr/lib/x86_64-linux-gnu/libfakeroot
# Multiarch support
/usr/local/lib/i386-linux-gnu
/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu
/usr/local/lib/i686-linux-gnu
/lib/i686-linux-gnu
/usr/lib/i686-linux-gnu
# libc default configuration
/usr/local/lib
# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
# Legacy biarch compatibility support
/lib32
/usr/lib32
# Legacy biarch compatibility support
/libx32
/usr/libx32

真的会在我的机器上ld.so神奇地找到一个库吗?/usr/lib/sse2/

参考:

% apt-cache policy manpages
manpages:
  Installed: 5.10-1
  Candidate: 5.10-1
  Version table:
 *** 5.10-1 500
        500 http://deb.debian.org/debian bullseye/main amd64 Packages
        500 http://deb.debian.org/debian bullseye/main i386 Packages
        100 /var/lib/dpkg/status

为了完整起见,这里是靶心 32 位 chroot 的相同输出:

% cat /etc/ld.so.conf.d/*
/usr/lib/i386-linux-gnu/libfakeroot
# Multiarch support
/usr/local/lib/i386-linux-gnu
/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu
/usr/local/lib/i686-linux-gnu
/lib/i686-linux-gnu
/usr/lib/i686-linux-gnu
# libc default configuration
/usr/local/lib
debian ld.so.conf
  • 2 个回答
  • 42 Views
Martin Hope
malat
Asked: 2022-04-06 04:25:46 +0800 CST

GNU/Linux 3.2.0 有什么特别之处?

  • 11

我盯着输出:

% file -b /lib/x86_64-linux-gnu/*.so | grep ", for"  | colrm 1 130 | sort -u
=5018237bbf012b4094027fd0b96fc22a24496ea4, for GNU/Linux 3.2.0, not stripped
9f21d, for GNU/Linux 3.2.0, stripped
bee51, for GNU/Linux 3.2.0, stripped
, for GNU/Linux 3.2.0, stripped
sha1]=2e5abcee94f3bcbed7bba094f341070a2585a2ba, for GNU/Linux 3.2.0, stripped

GNU/Linux 3.2.0 有什么特别之处?这是在 Debian/bullseye 系统 (amd64) 上。


换句话说:在 GNU/Linux 3.2.0(线程模型、安全功能......)中引入了哪些如此重要的 API/功能?所需版本的显式设置将阻止用户使用某些LD_ASSUME_KERNEL值,所以我猜有充分的理由拒绝旧值,例如LD_ASSUME_KERNEL=2.4.19(例如)。

debian linux-kernel
  • 1 个回答
  • 2502 Views
Martin Hope
malat
Asked: 2022-03-31 04:18:51 +0800 CST

了解 LD_ASSUME_KERNEL 用法

  • 0

我试图理解LD_ASSUME_KERNEL我系统上的 env 变量(Debian/bullseye+bpo)。

根据:

$ man pthreads

我应该能够运行这样的东西,但是在我的系统上这是我得到的:

% LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory

这对我来说有点太低了,无法理解发生了什么。我无法理解LD_ASSUME_KERNEL我的系统上的实现是否有些损坏,或者我是否未能正确阅读文档。

其他一些失败的尝试:

% LD_TRACE_LOADED_OBJECTS=1 LD_ASSUME_KERNEL=2.2.5 ldd
        linux-vdso.so.1 (0x00007ffe3f7e0000)
        libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f5399001000)
        libdl.so.2 => not found
        libc.so.6 => not found
        libc.so.6 => not found

和

% LD_TRACE_LOADED_OBJECTS=1 LD_ASSUME_KERNEL=2.4.19 ldd
        linux-vdso.so.1 (0x00007ffeaacb9000)
        libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f861cb18000)
        libdl.so.2 => not found
        libc.so.6 => not found
        libc.so.6 => not found

尽管:

% LD_TRACE_LOADED_OBJECTS=1 ldd
        linux-vdso.so.1 (0x00007ffc929a9000)
        libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007fa319a29000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa319a23000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa31985e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fa319aaa000)

参考:

$ man pthreads
[...]
   Selecting the threading implementation: LD_ASSUME_KERNEL
       On systems with a glibc that supports both LinuxThreads and NPTL (i.e., glibc 2.3.x), the LD_ASSUME_KERNEL environment variable can be used to override  the  dynamic  linker's  default  choice  of threading implementation.  This variable tells the dynamic linker to assume that it is running on top of a particular kernel version.  By specifying a kernel version that does not provide the support required by NPTL, we can force the use of LinuxThreads.  (The most likely reason for doing this is to run a (broken) application that depends on some nonconformant behavior in  LinuxThreads.)
       For example:

           bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \
                           awk '{print $3}' ) | egrep -i 'threads|nptl'
                   linuxthreads-0.10 by Xavier Leroy

同样适用于:

$ man ld.so
[...]
       LD_ASSUME_KERNEL (since glibc 2.2.3)
              Each  shared object can inform the dynamic linker of the minimum kernel ABI version that it requires.  (This requirement is encoded in an ELF note section that is viewable via readelf -n as
              a section labeled NT_GNU_ABI_TAG.)  At run time, the dynamic linker determines the ABI version of the running kernel and will reject loading shared objects that specify minimum ABI versions
              that exceed that ABI version.

              LD_ASSUME_KERNEL  can  be  used to cause the dynamic linker to assume that it is running on a system with a different kernel ABI version.  For example, the following command line causes the
              dynamic linker to assume it is running on Linux 2.2.5 when loading the shared objects required by myprog:

                  $ LD_ASSUME_KERNEL=2.2.5 ./myprog

              On systems that provide multiple versions of a shared object (in different directories in the search path) that have different minimum kernel ABI version requirements, LD_ASSUME_KERNEL  can
              be used to select the version of the object that is used (dependent on the directory search order).

              Historically,  the  most common use of the LD_ASSUME_KERNEL feature was to manually select the older LinuxThreads POSIX threads implementation on systems that provided both LinuxThreads and
              NPTL (which latter was typically the default on such systems); see pthreads(7).
% apt-cache policy manpages
manpages:
  Installed: 5.10-1
  Candidate: 5.10-1
  Version table:
 *** 5.10-1 500
        500 http://deb.debian.org/debian bullseye/main amd64 Packages
        500 http://deb.debian.org/debian bullseye/main i386 Packages
        100 /var/lib/dpkg/status

作为旁注,输出总是相同的:

/lib/x86_64-linux-gnu/libc.so.6
LD_ASSUME_KERNEL=2.2.5 /lib/x86_64-linux-gnu/libc.so.6
LD_ASSUME_KERNEL=2.4.19 /lib/x86_64-linux-gnu/libc.so.6

我得到:

GNU C Library (Debian GLIBC 2.31-13+deb11u3) stable release version 2.31.
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 10.2.1 20210110.
libc ABIs: UNIQUE IFUNC ABSOLUTE
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
linux debian
  • 1 个回答
  • 110 Views
Martin Hope
malat
Asked: 2020-02-28 01:07:04 +0800 CST

schroot下自动挂载/dev/sda1

  • -1

我可以访问这样的 Ubuntu 系统:

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
[...]
sda           8:0    0   1.8T  0 disk 
└─sda1        8:1    0   1.8T  0 part /mnt/dbc64c37-340a-49e5-8184-a69e01e5e231
nvme0n1     259:0    0   477G  0 disk 
├─nvme0n1p1 259:1    0   650M  0 part /boot/efi
└─nvme0n1p2 259:2    0 372.5G  0 part /

我已经像这样设置了一个 Debian/sid schroot:

$ cat /etc/schroot/chroot.d/sid64 
[sid64]
description=Contains the SPICE program
aliases=sid
type=directory
directory=/home/malat/schroots/sid-root
users=malat
root-groups=root
profile=desktop
personality=linux
preserve-environment=true

我没有改变任何东西/etc/schroot/default/fstab,当我进入我的 schroot 时,sid64我看到的是:

$ schroot -c sid
(sid64)$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
[...]
sda           8:0    0   1.8T  0 disk 
└─sda1        8:1    0   1.8T  0 part
nvme0n1     259:0    0   477G  0 disk 
├─nvme0n1p1 259:1    0   650M  0 part 
└─nvme0n1p2 259:2    0 372.5G  0 part /var/lib/dbus

如果我手动执行:

$ sudo mount /dev/sda1 /mnt/dbc64c37-340a-49e5-8184-a69e01e5e231
$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0   1.8T  0 disk 
└─sda1        8:1    0   1.8T  0 part /mnt/bdc64c37-340a-49e5-8184-a69e01e5e231
nvme0n1     259:0    0   477G  0 disk 
├─nvme0n1p1 259:1    0   650M  0 part 
└─nvme0n1p2 259:2    0 372.5G  0 part /var/lib/dbus

如何/mnt/dbc64c37-340a-49e5-8184-a69e01e5e231在我的 schroot 下自动挂载(这是我的数据所在的主磁盘)?


到目前为止,我尝试了一个天真的:

$ sudo mkdir /home/malat/schroots/sid-root/mnt/dbc64c37-340a-49e5-8184-a69e01e5e231
$ tail -1 /etc/schroot/default/fstab 
/dev/disk/by-uuid/dbc64c37-340a-49e5-8184-a69e01e5e231 /mnt/dbc64c37-340a-49e5-8184-a69e01e5e231 none rw,bind 0 0
$ schroot -c sid
(sid64)$ ls -al /dev/disk/by-uuid/dbc64c37-340a-49e5-8184-a69e01e5e231
lrwxrwxrwx 1 root root 10 Jan  8 01:00 /dev/disk/by-uuid/dbc64c37-340a-49e5-8184-a69e01e5e231 -> ../../sda1

也:

$ tail -1 /etc/schroot/default/fstab
/mnt/dbc64c37-340a-49e5-8184-a69e01e5e231 /mnt/dbc64c37-340a-49e5-8184-a69e01e5e231 none    rw,bind 0 0

两者都不适合我。


我也尝试了一个幼稚的:

$ sudo mount --rbind /mnt/dbc64c37-340a-49e5-8184-a69e01e5e231 /home/malat/schroots/sid-root/mnt/dbc64c37-340a-49e5-8184-a69e01e5e231
$ mount | grep dbc64c37
/dev/sda1 on /mnt/dbc64c37-340a-49e5-8184-a69e01e5e231 type ext4 (rw,nosuid,nodev,relatime,x-gvfs-show)
/dev/sda1 on /home/malat/schroots/sid-root/mnt/dbc64c37-340a-49e5-8184-a69e01e5e231 type ext4 (rw,nosuid,nodev,relatime)
$ schroot -c sid
(sid64)$ ls -al /mnt/dbc64c37-340a-49e5-8184-a69e01e5e231
-> empty !
mount udev
  • 2 个回答
  • 791 Views
Martin Hope
malat
Asked: 2020-01-31 00:50:41 +0800 CST

在 Linux / 对象中正确安装 Windows DFS 命名空间是远程的

  • 1

我正在努力在工作中的 Ubuntu 系统上挂载远程 CIFS 目录。远程文件夹在我的 Windows 8.1 会话中似乎工作得很好(也在工作中)。

我无法正常安装工作:

$ sudo mount -v -t cifs //1.2.3.4/network ~/z -o username=malat,domain=MY,uid=$(id -u),gid=$(id -g),iocharset=utf8
Password for malat@//1.2.3.4/network:  *********
mount.cifs kernel mount options: ip=1.2.3.4,unc=\\1.2.3.4\network,iocharset=utf8,uid=1002,gid=1002,user=mmalaterre,domain=MY,pass=********
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

但我最终偶然发现了这个参考:

$ sudo mount -v -t cifs //1.2.3.4/network ~/z -o username=malat,domain=MY,uid=$(id -u),gid=$(id -g),iocharset=utf8,nodfs
Password for malat@//1.2.3.4/network:  *********
mount.cifs kernel mount options: ip=1.2.3.4,unc=\\1.2.3.4\network,iocharset=utf8,nodfs,uid=1002,gid=1002,user=malat,domain=MY,pass=********

至少我现在有一些工作:

$ mount | grep network
//1.2.3.4/network on /home/malat/z type cifs (rw,relatime,vers=2.1,cache=strict,username=malat,domain=MY,uid=1002,forceuid,gid=1002,forcegid,addr=1.2.3.4,file_mode=0755,dir_mode=0755,soft,nounix,nodfs,mapposix,rsize=1048576,wsize=1048576,bsize=1048576,echo_interval=60,actimeo=1)

但是似乎有些东西不起作用(我猜与 DFS 选项有关)。以下是症状:

$ cd ~/z
$ ls
folder1 folder2
$ ls folder1
subfolder1
$ ls folder2
ls: cannot access 'folder2': Invalid argument

我可以folder2从我的 Windows 8.1 会话中很好地访问该文件夹,所以这不是权限问题。如何folder2从我的 Linux 会话中访问?

这是 的尾巴dmesg:

[1927958.534353] CIFS: Attempting to mount //1.2.3.4/network
[1927958.534403] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
[1927960.069018] CIFS VFS: DFS capability contradicts DFS flag
[1927960.375111] CIFS VFS: Autodisabling the use of server inode numbers on new server.
[1927960.375115] CIFS VFS: The server doesn't seem to support them properly or the files might be on different servers (DFS).
[1927960.375117] CIFS VFS: Hardlinks will not be recognized on this mount. Consider mounting with the "noserverino" option to silence this message.

更新:如果我添加vers=1.0到 mount 命令,症状会略有不同:

$ cd ~/z
$ cd folder2
$ ls
subfolder2
$ cd subfolder2/
bash: cd: subfolder2/: Object is remote

以供参考:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:        19.04
Codename:       disco

内核版本:

$ uname -rvo
5.0.0-38-generic #41-Ubuntu SMP Tue Dec 3 00:27:35 UTC 2019 GNU/Linux

和

$ cat /etc/request-key.d/cifs.spnego.conf
create  cifs.spnego    * * /usr/sbin/cifs.upcall %k

更新:

  • 在 Linux / 对象中正确安装 Windows DFS 命名空间是远程的
ubuntu mount
  • 2 个回答
  • 15184 Views
Martin Hope
malat
Asked: 2018-12-14 06:25:48 +0800 CST

cifs:无法 cd 进入目录

  • 6

由于某种原因,我无法 cd 进入我有权访问的特定远程目录,它失败了:

$ cd Data\ Services/
-bash: cd: Data Services/: Invalid argument

这就是我安装它的方式:

$ sudo mount -t cifs //big.acme.corp/network/ ~/z -o username=myuser,domain=mydomain,uid=$(id -u),gid=$(id -g),vers=1.0
Password for myuser@//big.acme.corp/network/:  *********

我可以从我的 Windows 8 笔记本电脑(相同的用户名/密码)上很好地访问它。

以供参考:

$ ls -ald "Data Services"
drwx--x--x 2 myuser myuser 0 Dec 13 09:21 Data Services

至少在我这边,这个快捷方式似乎被视为一个目录:

$ find Data\ Services -type d
Data Services
find: ‘Data Services’: Invalid argument

因此,我无能为力:

$ cat Data\ Services
cat: Data Services: Invalid argument

甚至

$ hexdump Data\ Services
hexdump: Data Services: Invalid argument
hexdump: all input file arguments failed

如下所示,我再次尝试使用noperm:

$ sudo mount -t cifs //big.acme.corp/network/ ~/z -o username=myuser,domain=mydomain,uid=$(id -u),gid=$(id -g),noperm

这给了我:

$ mount
...
//big.acme.corp/network/ on /home/myuser/z type cifs (rw,relatime,vers=1.0,cache=strict,username=big.acme.corp,domain=mydomain,uid=1002,forceuid,gid=1003,forcegid,addr=10.1.2.3,file_mode=0755,dir_mode=0755,nounix,mapposix,noperm,rsize=61440,wsize=65536,echo_interval=60,actimeo=1)

这并没有改变任何东西:

$ strings Data\ Services
strings: Data Services: Invalid argument
fedora cd-command
  • 2 个回答
  • 2861 Views
Martin Hope
malat
Asked: 2018-10-01 23:33:06 +0800 CST

从命令行显示`/proc/acpi/battery/BAT0/info`

  • 0

在 MacBookPro10,1 上全新安装 Debian/stable 9.5 时,我试图从命令行显示 acpi 信息。

这是我看到的:

$ find /proc/acpi/
/proc/acpi/
/proc/acpi/button
/proc/acpi/button/lid
/proc/acpi/button/lid/LID0
/proc/acpi/button/lid/LID0/state
/proc/acpi/wakeup

但acpi似乎还是看到了电池:

$ acpi -V
Battery 0: Discharging, 46%, 01:17:56 remaining
Battery 0: design capacity 8460 mAh, last full capacity 7415 mAh = 87%
Adapter 0: off-line
Cooling 0: Processor 0 of 17
Cooling 1: Processor 0 of 17
Cooling 2: Processor 0 of 17
Cooling 3: BAT0 no state information available
Cooling 4: Processor 0 of 17
Cooling 5: intel_powerclamp no state information available
Cooling 6: Processor 0 of 17
Cooling 7: Processor 0 of 17
Cooling 8: Processor 0 of 17
Cooling 9: x86_pkg_temp no state information available
Cooling 10: Processor 0 of 17

/proc/acpi为了从界面获取正确的电池信息,我在安装过程中遗漏了什么?

linux debian
  • 1 个回答
  • 1007 Views
Martin Hope
malat
Asked: 2018-06-08 23:24:48 +0800 CST

Linux:在 MLC NAND 上替代 UBIFS

  • 8

在MLC NAND之上的 Linux UBIFS的地位从来都不是完美的。虽然现在此条目已从常见问题解答中删除,但在 MLC NAND 之上对 UBIFS 的支持现已正式报告为不受支持:

  • ubi: 拒绝 MLC NAND

patchwork.kernel.org 上的完整线程:

  • https://patchwork.kernel.org/patch/10256063/

因此,我现在正在寻找MIPS Creator CI20上的 MLC NAND 的长期文件系统替代品:

  • CI20_硬件:ROM/NAND

这是三星 K9GBG08UOA NAND 闪存,似乎没有办法将此设备置于 SLC 模式。

看来 jffs2 也不是替代品:

  • jffs2:不支持MLC nand

是否有任何其他替代文件系统(可能具有相当的性能)?

linux filesystems
  • 3 个回答
  • 1420 Views
Martin Hope
malat
Asked: 2018-02-03 09:03:31 +0800 CST

`make savedefconfig` 会丢失配置选项吗?

  • 1

我试图了解我在这里做错了什么。我的印象是make savedefconfig将一个配置减少到(等效的)最低限度。

所以这是我的步骤,直接从 Debian 包中获取一个配置文件:

$ dpkg -S /boot/config-4.14.0-3-powerpc
linux-image-4.14.0-3-powerpc: /boot/config-4.14.0-3-powerpc
$ apt-cache policy linux-image-4.14.0-3-powerpc
linux-image-4.14.0-3-powerpc:
  Installed: 4.14.13-1
  Candidate: 4.14.13-1
  Version table:
 *** 4.14.13-1 500
        500 http://ftp.fr.debian.org/debian sid/main powerpc Packages
        100 /var/lib/dpkg/status

将其复制到我的主机:

$ scp macminig4:/boot/config-4.14.0-3-powerpc ./arch/powerpc/configs/my_defconfig

验证我想玩的选项是否仍然存在:

$ grep CONFIG_SSB_B43_PCI_BRIDGE ./arch/powerpc/configs/my_defconfig
CONFIG_SSB_B43_PCI_BRIDGE=y

现在让我们更新它,因为它与 git v4.14 不完全同步:

$ git checkout v4.14
$ make ARCH=powerpc my_defconfig
$ diff -u .config ./arch/powerpc/configs/my_defconfig | diffstat
 my_defconfig |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

所以发生了一些小的变化,但没有什么不好,至少我仍然可以看到我的选择:

$ grep CONFIG_SSB_B43_PCI_BRIDGE .config
CONFIG_SSB_B43_PCI_BRIDGE=y

现在让我们试试 savedefconfig:

$ make ARCH=powerpc savedefconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/bin2c
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --savedefconfig=defconfig Kconfig

如果我现在检查我的选项现在永远丢失:

$ grep CONFIG_SSB_B43_PCI_BRIDGE defconfig 
-> nothing !

为什么有些选项会消失?有没有办法控制savedefconfig保留一些选项?

linux-kernel configuration
  • 1 个回答
  • 1523 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve