如果未在内核defconfig中设置CONFIG_CGROUP = y,则无法安装根文件系统。
这是我的启动日志
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyS1,115200 root=/dev/nfs rw ip=dhcp nfsroot=10.30.98.239:/home/sd/sira_server_rootfs
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 511968K/524288K available (5956K kernel code, 268K rwdata, 1188K rodata, 192K init, 128K bss, 12320K reserved, 0K cma-reserved)
Kernel virtual memory layout:
* 0xfffdf000..0xfffff000 : fixmap
* 0xfdffe000..0xfe000000 : early ioremap
* 0xe1000000..0xfdffe000 : vmalloc & ioremap
NR_IRQS:512 nr_irqs:512 16
IPIC (128 IRQ sources) at e1000700
clocksource: timebase: mask: 0xffffffffffffffff max_cycles: 0x12049cd416, max_idle_ns: 440795202745 ns
clocksource: timebase mult[ccccccd] shift[24] registered
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
NET: Registered protocol family 16
PCI: Probing PCI hardware
Freescale Elo series DMA driver
vgaarb: loaded
SCSI subsystem initialized
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
clocksource: Switched to clocksource timebase
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
fsl-elo-dma e00082a8.dma: #0 (fsl,elo-dma-channel), irq 71
fsl-elo-dma e00082a8.dma: #1 (fsl,elo-dma-channel), irq 71
fsl-elo-dma e00082a8.dma: #2 (fsl,elo-dma-channel), irq 71
fsl-elo-dma e00082a8.dma: #3 (fsl,elo-dma-channel), irq 71
workingset: timestamp_bits=30 max_order=17 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
SGI XFS with security attributes, no debug enabled
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
Oops: Exception in kernel mode, sig: 4 [#1]
sira
Modules linked in:
CPU: 0 PID: 8 Comm: kdevtmpfs Not tainted 4.12.28-sira-standard #1
task: df41b580 task.stack: df438000
NIP: c0100000 LR: c00fb614 CTR: c00feb0c
REGS: df439c50 TRAP: 0700 Not tainted (4.12.28-sira-standard)
MSR: 00089032 <EE,ME,IR,DR,RI>
CR: 280ad832 XER: 20000000
GPR00: c00fb614 df439d00 df41b580 df69c170 df69c1b8 df69c170 00000002 00000001
GPR08: c00feb0c df69c1f0 df69c1f0 0e8b2530 280ad832 00000000 c0040494 df41d180
GPR16: 00000000 014000c0 00000007 00000000 00000000 0000002f 00000000 c0786840
GPR24: fffff000 00000000 00000000 df69c1cc df69c170 df41ed18 00000000 00002000
NIP [c0100000] iput+0x118/0x1c8
LR [c00fb614] d_delete+0xb8/0xfc
Call Trace:
[df439d00] [c00faf0c] dentry_unlink_inode+0xf0/0x164 (unreliable)
[df439d20] [c00fb614] d_delete+0xb8/0xfc
[df439d40] [c00eebd0] vfs_unlink+0x1b8/0x210
[df439d70] [c03c4ba4] handle_remove+0x1b0/0x324
[df439e50] [c03c4e78] devtmpfsd+0x160/0x34c
[df439f00] [c00405d0] kthread+0x13c/0x140
[df439f40] [c0010350] ret_from_kernel_thread+0x5c/0x64
Instruction dump:
913f0058 852a0080 7f8a4800 419e000c 7fe3fb78 4bfffe35 80010024 7fe3fb78
83a10014 83c10018 7c0803a6 83e1001c <27051956> 72e5d8b1 5d31073d 0039998e
---[ end trace a2e2975e4ffcf7f5 ]---
如果将内核中的CONFIG_CGROUP设置为y,则在执行/ sbin / init时会崩溃。我可以看到它已经挂载了根文件系统。
=> boot
ERROR: There is a global environment variable with the same name.
Unknown command 'rw' - try 'help'
## Booting kernel from Legacy Image at f8100000 ...
Image Name: Linux-4.12.28-sira-standard
Created: 2019-07-18 8:56:46 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 3793240 Bytes = 3.6 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at f8000000
Booting using the fdt blob at 0xf8000000
Uncompressing Kernel Image ... OK
Loading Device Tree to 007fb000, end 007ff8e8 ... OK
Linux version 4.12.28-sira-standard (oe-user@oe-host) (gcc version 7.3.0 (GCC) ) #1 Thu Jul 18 08:54:56 UTC 2019
Using sira machine description
bootconsole [udbg0] enabled
-----------------------------------------------------
Hash_size = 0x0
phys_mem_size = 0x20000000
dcache_bsize = 0x20
icache_bsize = 0x20
cpu_features = 0x0000000000020460
possible = 0x0000000005a6fd77
always = 0x0000000000020000
cpu_user_features = 0x8c000000 0x00000000
mmu_features = 0x00210000
-----------------------------------------------------
sira_setup_arch()
Zone ranges:
DMA [mem 0x0000000000000000-0x000000001fffffff]
Normal empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x000000001fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyS1,115200 root=/dev/nfs rw ip=dhcp nfsroot=10.30.98.239:/home/sd/sira_server_rootfs
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 511924K/524288K available (5984K kernel code, 276K rwdata, 1192K rodata, 192K init, 133K bss, 12364K reserved, 0K cma-reserved)
Kernel virtual memory layout:
* 0xfffdf000..0xfffff000 : fixmap
* 0xfdffe000..0xfe000000 : early ioremap
* 0xe1000000..0xfdffe000 : vmalloc & ioremap
NR_IRQS:512 nr_irqs:512 16
IPIC (128 IRQ sources) at e1000700
clocksource: timebase: mask: 0xffffffffffffffff max_cycles: 0x12049cd416, max_idle_ns: 440795202745 ns
clocksource: timebase mult[ccccccd] shift[24] registered
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
NET: Registered protocol family 16
PCI: Probing PCI hardware
Freescale Elo series DMA driver
vgaarb: loaded
SCSI subsystem initialized
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
clocksource: Switched to clocksource timebase
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
fsl-elo-dma e00082a8.dma: #0 (fsl,elo-dma-channel), irq 71
fsl-elo-dma e00082a8.dma: #1 (fsl,elo-dma-channel), irq 71
fsl-elo-dma e00082a8.dma: #2 (fsl,elo-dma-channel), irq 71
fsl-elo-dma e00082a8.dma: #3 (fsl,elo-dma-channel), irq 71
workingset: timestamp_bits=30 max_order=17 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
SGI XFS with security attributes, no debug enabled
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 16, base_baud = 19531250) is a 16550A
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 17, base_baud = 19531250) is a 16550A
console [ttyS1] enabled
console [ttyS1] enabled
bootconsole [udbg0] disabled
bootconsole [udbg0] disabled
brd: module loaded
loop: module loaded
f8000000.flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x008966
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
Searching for RedBoot partition table in f8000000.flash at offset 0x7fe0000
No RedBoot partition table detected in f8000000.flash
nand: device found, Manufacturer ID: 0x20, Chip ID: 0xd3
nand: ST Micro NAND08GW3B2CN6
nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
nand_read_bbt: bad block at 0x0000023a0000
nand_read_bbt: bad block at 0x0000369c0000
Searching for RedBoot partition table in c0000000.flash at offset 0x3ff60000
No RedBoot partition table detected in c0000000.flash
1 ofpart partitions found on MTD device c0000000.flash
Creating 1 MTD partitions on "c0000000.flash":
0x000000000000-0x000040000000 : "NAND Filesystem"
eLBC NAND device at 0xc0000000, bank 4
sira nand: no system info node found, assuming legacy device tree blob.
libphy: Fixed MDIO Bus: probed
libphy: Freescale PowerQUICC MII Bus: probed
libphy: Freescale PowerQUICC MII Bus: probed
fsl-gianfar e0025000.ethernet: enabled errata workarounds, flags: 0x4
fsl-gianfar e0025000.ethernet eth0: mac: 00:90:5e:12:32:05
fsl-gianfar e0025000.ethernet eth0: Running with NAPI enabled
fsl-gianfar e0025000.ethernet eth0: RX BD ring size for Q[0]: 256
fsl-gianfar e0025000.ethernet eth0: TX BD ring size for Q[0]: 256
fsl-gianfar e0024000.ethernet: enabled errata workarounds, flags: 0x4
fsl-gianfar e0024000.ethernet eth1: mac: 00:90:5e:12:32:06
fsl-gianfar e0024000.ethernet eth1: Running with NAPI enabled
fsl-gianfar e0024000.ethernet eth1: RX BD ring size for Q[0]: 256
fsl-gianfar e0024000.ethernet eth1: TX BD ring size for Q[0]: 256
i2c /dev entries driver
mpc-i2c e0003000.i2c: timeout 1000000 us
rtc-ds1307: probe of 0-0068 failed with error -5
mpc-i2c e0003100.i2c: timeout 1000000 us
oprofile: using timer interrupt.
NET: Registered protocol family 17
NET: Registered protocol family 15
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
hctosys: unable to open rtc device (rtc0)
fsl-gianfar e0024000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
fsl-gianfar e0025000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 10.30.90.1, my address is 10.30.99.107
IP-Config: Complete:
device=eth0, hwaddr=00:90:5e:12:32:05, ipaddr=10.30.99.107, mask=255.255.0.0, gw=255.255.255.255
host=10.30.99.107, domain=sira.com, nis-domain=(none)
bootserver=0.0.0.0, rootserver=10.30.98.239, rootpath= nameserver0=10.30.90.1
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
VFS: Mounted root (nfs filesystem) on device 0:12.
devtmpfs: mounted
Freeing unused kernel memory: 192K
This architecture does not have kernel memory protection.
random: fast init done
Oops: Exception in kernel mode, sig: 4 [#1]
sira
Modules linked in:
CPU: 0 PID: 1 Comm: init Not tainted 4.12.28-sira-standard #1
task: df416a60 task.stack: df42a000
NIP: c0100d18 LR: c0101168 CTR: 00000000
REGS: df42be40 TRAP: 0700 Not tainted (4.12.28-sira-standard)
MSR: 00089032 <EE,ME,IR,DR,RI>
CR: 22002442 XER: 00000000
GPR00: c0101118 df42bef0 df416a60 df42bef8 bfc3cd64 00000000 00000000 00000000
GPR08: 00000000 00000000 00000000 00000000 00000000 10028254 00000000 00000000
GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001
GPR24: bfc3dfda 00000000 00000000 00000000 bfc3ccd8 0000000c bfc3cd60 df42bef8
NIP [c0100d18] poll_select_set_timeout+0x0/0x110
LR [c0101168] SyS_select+0x9c/0x114
Call Trace:
[df42bef0] [c0101118] SyS_select+0x4c/0x114 (unreliable)
[df42bf40] [c0010228] ret_from_syscall+0x0/0x38
--- interrupt: c01 at 0xfef65b4
LR = 0xfef657c
Instruction dump:
359868c0 c6b804b0 54247962 5e95430b 08e488a1 212a987b 1409fe41 578c4986
e9800110 9012836a 0992c821 41823883 <10e51116> 6aaf50e5 21251760 3320a098
---[ end trace 8a03846eb2e956e8 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
我想了解CGROUP,我怀疑如果在内核中启用了CGROUP,是否还需要做一些额外的事情。它是什么?我已经在内核文档中阅读了有关CGROUP的文档,但是在这里我无法指出其意义。