Altera_Forum
Honored Contributor
13 years agoHow to make initramfs smaller
This is what I get after compilation of kernel
nios2-linux/uClinux-dist/images: -rwxrwxr-x. 1 lukasz lukasz 6592577 Jan 29 17:19 linux.initramfs.gz -rw-rw-r--. 1 lukasz lukasz 8903168 Jan 29 17:18 rootfs.initramfs -rw-rw-r--. 1 lukasz lukasz 26566 Jan 29 17:18 rootfs.initramfs.contents -rw-rw-r--. 1 lukasz lukasz 3505996 Jan 29 17:18 rootfs.initramfs.gz -rw-r--r--. 1 lukasz lukasz 549708 Jan 29 17:19 System.map.initramfs.gz -rw-r--r--. 1 lukasz lukasz 1112191 Jan 29 17:18 vmImage -rwxrwxr-x. 1 lukasz lukasz 3090497 Jan 29 17:18 vmlinux lrwxrwxrwx. 1 lukasz lukasz 19 Jan 29 17:19 zImage -> zImage.initramfs.gz -rwxrwxr-x. 1 lukasz lukasz 4620775 Jan 29 17:19 zImage.initramfs.gz Does anyone know what I need to remove to make initramfs smaller? I can not boot this kernel on 8MB SDRAM. Or maybe this is not reason of my problem? Booting stops on: Linux version 2.6.35-00743-ge3b9b64-dirty (lukasz@centos) (gcc version 4.1.2)# 129 Tue Jan 29 17:12:52 CET 2013 bootconsole [early0] enabled early_console initialized at 0xe18014a0 Linux/Nios II-MMU init_bootmem_node(?,0xdbd, 0x800, 0x1000) free_bootmem(0xdbd000, 0x243000) reserve_bootmem(0xdbd000, 0x100) Built 1 zonelists in Zone order, mobility grouping off. Total pages: 2032 Kernel command line: PID hash table entries: 32 (order: -5, 128 bytes) Dentry cache hash table entries: 1024 (order: 0, 4096 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) We have 4096 pages of RAM Memory available: 2232k/5873k RAM, 0k/0k ROM (1862k kernel code, 4011k data) Hierarchical RCU implementation. RCU-based detection of stalled CPUs is disabled. Verbose stalled-CPUs detection is disabled. NR_IRQS:32 Calibrating delay loop... 24.21 BogoMIPS (lpj=121088) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 NET: Registered protocol family 16 init_BSP(): registering device resources bio: create slab <bio-0> at 0 Switching to clocksource timer NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 512 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) TCP reno registered 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 udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. When I use images/vmlinux I get this: Linux version 2.6.35-00743-ge3b9b64-dirty (lukasz@centos) (gcc version 4.1.2)# 130 Tue Jan 29 17:18:35 CET 2013 bootconsole [early0] enabled early_console initialized at 0xe18014a0 Linux/Nios II-MMU init_bootmem_node(?,0xa69, 0x800, 0x1000) free_bootmem(0xa69000, 0x597000) reserve_bootmem(0xa69000, 0x100) Built 1 zonelists in Zone order, mobility grouping off. Total pages: 2032 Kernel command line: PID hash table entries: 32 (order: -5, 128 bytes) Dentry cache hash table entries: 1024 (order: 0, 4096 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) We have 4096 pages of RAM Memory available: 5640k/2465k RAM, 0k/0k ROM (1872k kernel code, 592k data) Hierarchical RCU implementation. RCU-based detection of stalled CPUs is disabled. Verbose stalled-CPUs detection is disabled. NR_IRQS:32 Calibrating delay loop... 24.21 BogoMIPS (lpj=121088) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 NET: Registered protocol family 16 init_BSP(): registering device resources bio: create slab <bio-0> at 0 Switching to clocksource timer NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 512 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) TCP reno registered 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 udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. msgmni has been set to 16 Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254) io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) ttyJ0 at MMIO 0x18014a0 (irq = 1) is a Altera JTAG UART console [ttyJ0] enabled, bootconsole disabled console [ttyJ0] enabled, bootconsole disabled ttyS0 at MMIO 0x1801420 (irq = 2) is a Altera UART dm9000 Ethernet Driver, V1.31 dm9000 dm9000.0: eth%d: Invalid ethernet MAC address. Please set using ifconfig eth0: dm9000a at e18014a8,e18014ac IRQ 4 MAC: 00:00:00:00:00:00 (chip) mice: PS/2 mouse device common for all mice TCP cubic registered NET: Registered protocol family 17 List of all partitions: No filesystem could mount root, tried: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)