有人可以向我解释以下几行中发生的事情吗?
dd if=/dev/urandom bs=4096 seek=7 count=2 of=file_with_holes
Run Code Online (Sandbox Code Playgroud)
特别是搜索部分不清楚
手册页说:
seek=BLOCKS
skip BLOCKS obs-sized blocks at start of output
Run Code Online (Sandbox Code Playgroud)
什么是 obs 大小的块?
我想使用 git从master-next 分支下载源代码,如Xilinx wiki 中所述。
我试过这个:
#git clone git://github.com/Xilinx/u-boot-xlnx/tree/master-next.git
Initialized empty Git repository in /home/Hannan/master-next/.git/
fatal: remote error:
Xilinx/u-boot-xlnx/tree/master-next is not a valid repository name
Email support@github.com for help
Run Code Online (Sandbox Code Playgroud)
即使这失败了:
# git clone git://github.com/Xilinx/tree/master-next/u-boot-xlnx.git
Initialized empty Git repository in /home/Hannan/u-boot-xlnx/.git/
fatal: remote error:
Xilinx/tree/master-next/u-boot-xlnx is not a valid repository name
Email support@github.com for help
Run Code Online (Sandbox Code Playgroud)
有效的命令是:
git clone git://github.com/Xilinx/u-boot-xlnx.git
Run Code Online (Sandbox Code Playgroud)
但是我怎么知道这确实会获取master-next 分支而不是master 分支?如何使用 git 正确获取特定分支?
我正在使用 RHEL 6,通过 PuTTY 访问。
按照本教程编写我的第一个驱动程序。
生成文件是:
# Makefile – makefile of our first driver
# if KERNELRELEASE is defined, we've been invoked from the
# kernel build system and can use its language.
ifneq (${KERNELRELEASE},)
obj-m := ofd.o
# Otherwise we were called directly from the command line.
# Invoke the kernel build system.
else
KERNEL_SOURCE := /usr/src/linux 3.8
PWD := $(shell pwd)
default:
${MAKE} -C ${KERNEL_SOURCE} SUBDIRS=${PWD} modules
clean:
${MAKE} -C ${KERNEL_SOURCE} SUBDIRS=${PWD} clean
endif
Run Code Online (Sandbox Code Playgroud)
驱动程序代码是:
* ofd.c – Our First …
Run Code Online (Sandbox Code Playgroud) 我需要检查客户端 DHCP 设置,我希望它在文件中 /etc/dhcp/dhclient.conf
,但那里没有这样的文件。
此文件在 64 位 RHEL 6 中的位置是什么?
我正在尝试在 FPGA 板上安装 Linux。linux 风格是赛灵思 FPGA 芯片的petalinux。
当前的 Xilinx SoC 具有 Cortex A9 处理器和可编程硬件逻辑,即 FPGA。我在终端上捕获了启动消息:
.....................U-boot time.......................partition.......................................................
[Fri Dec 27 15:18:53.108 2013] Copying Linux from SD to RAM...
[Fri Dec 27 15:18:53.129 2013] Device: SDHCI
[Fri Dec 27 15:18:53.129 2013] Manufacturer ID: 2
[Fri Dec 27 15:18:53.129 2013] OEM: 544d
[Fri Dec 27 15:18:53.129 2013] Name: SA04G
[Fri Dec 27 15:18:53.129 2013] Tran Speed: 25000000
[Fri Dec 27 15:18:53.129 2013] Rd Block Len: 512
[Fri Dec 27 15:18:53.129 …
Run Code Online (Sandbox Code Playgroud) 我在这里问了一个问题是否必须拥有文件系统
评论之一是:
没有文件系统的系统如何在 linux 上工作,因为即使打印机或以太网卡也被视为文件?你在这里的目标是什么?...新西兰 2 月 24 日 14:18
现在这是在没有文件系统的情况下启动 linux 时的日志消息(挂在最后):
[Tue Apr 08 20:07:18.298 2014]
[Tue Apr 08 20:07:18.298 2014]
[Tue Apr 08 20:07:18.298 2014] U-Boot 2013.07 (Apr 08 2014 - 14:27:03)
[Tue Apr 08 20:07:18.298 2014]
[Tue Apr 08 20:07:18.298 2014] Memory: ECC disabled
[Tue Apr 08 20:07:18.298 2014] DRAM: 1 GiB
[Tue Apr 08 20:07:18.308 2014] SF: Detected N25Q128A with page size 64 KiB, total 16 MiB
[Tue Apr 08 20:07:18.341 2014] *** …
Run Code Online (Sandbox Code Playgroud) 我在lsmod
一个板子的模拟器上运行命令,输出是Not tainted
. 这意味着什么 ?
系统信息
[root@xilinx busybox-1.22.1]# uname -r
2.6.32-71.el6.x86_64
Run Code Online (Sandbox Code Playgroud)
当我在rhel 6上制作busybox时出现以下错误:
/usr/bin/ld: cannot find -lcrypt
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1
Run Code Online (Sandbox Code Playgroud)
我也可以看到库在 lib 中:
[root@xilinx busybox-1.22.1]# ls -ld /lib/libcry*
-rwxr-xr-x. 1 root root 38380 Sep 7 2010 /lib/libcrypt-2.12.so
lrwxrwxrwx. 1 root root 16 Jan 25 16:48 /lib/libcrypt.so.1 -> libcrypt-2.12.so
[root@xilinx busybox-1.22.1]# ls -ld /usr/bin/ld*
-rwxr-xr-x. 1 root root 595192 May 5 2010 /usr/bin/ld
-rwxr-xr-x. 1 root root 1685416 Aug 24 2010 /usr/bin/ldb3add
-rwxr-xr-x. 1 root root 1685416 Aug …
Run Code Online (Sandbox Code Playgroud) 假设我不需要文件系统并且我只有可能不需要重新加载数据的应用程序 - 所以 MMU 可能是多余的。我可以从 Linux 中删除这两个项目,并成功启动操作系统吗?
我正在尝试开发小型 Linux 内核,我发现文件系统和 MMU 占用了相当大的空间。所以我想把它们去掉。
对此有何建议?
我找到了两种打印引导消息的方法,一种使用 dmesg,另一种使用文件 /var/log/boot.log 的内容:
/var/log/boot.log 文件的内容是:
fsck from util-linux 2.20.1
/dev/loop0: clean, 263563/2271232 files, 7843644/18169856 blocks
* Starting configure network device security^[[74G[ OK ]
* Starting configure network device security^[[74G[ OK ]
* Starting configure network device^[[74G[ OK ]
* Starting Mount network filesystems^[[74G[ OK ]
* Starting Failsafe Boot Delay^[[74G[ OK ]
* Stopping Mount network filesystems^[[74G[ OK ]
* Starting Bridge socket events into upstart^[[74G[ OK ]
* Starting mDNS/DNS-SD daemon^[[74G[ OK ]
* Starting Userspace bootsplash^[[74G[ OK …
Run Code Online (Sandbox Code Playgroud)