hi.
I'd like to inquire about booting from ramdisk.
I need reference about this.
Best Regards.
Hello, Hokyun Yu
Here you can see how to create "ramdisk.gz":
http://processors.wiki.ti.com/index.php/Creating_a_RAMDISK
And perhaps after that you have to modify your u-boot environment to something like this as you would have assumed:
<U-BOOT># setenv bootargs 'mem=256M console=ttyO0,115200n8 root=/dev/ram0 rw initrd=0x82000000,11M'
<U-BOOT># setenv bootcmd 'mmc rescan 0;fatload mmc 0 81000000 uImage; fatload mmc 0 82000000 ramdisk.gz; bootm 0x81000000'
It is likely that you will need adjust this a bit. That's the case of SD card boot.
BR
P.S. If this response helps answering your question please mark this post as verified - Thanks!
Hi,
It will be created </home/user/targetfs> folder when I install c6a816x ezsdk.,
I tried it on nfs and jffs2.
And I want to try to boot using ramdisk, I created ramdisk.gz file refer to the above wiki page.
$> sudo cp -r /home/user/targetfs targetfs
$> sudo chmod 777 -R targetfs
$> dd if=/dev/zero of=ramdisk bs=1M count=320
320+0 records in320+0 records out335544320 bytes (336 MB) copied, 1.98387 s, 169 MB/s
$> mkfs ramdisk
mke2fs 1.41.11 (14-Mar-2010)ramdisk is not a block special device.Proceed anyway? (y,n) yFilesystem label=OS type: LinuxBlock size=1024 (log=0)Fragment size=1024 (log=0)Stride=0 blocks, Stripe width=0 blocks81920 inodes, 327680 blocks16384 blocks (5.00%) reserved for the super userFirst data block=1Maximum filesystem blocks=6763315240 block groups8192 blocks per group, 8192 fragments per group2048 inodes per groupSuperblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185
Writing inode tables: done Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 21 mounts or180 days, whichever comes first. Use tune2fs -c or -i to override.
$> sudo mkdir mnt
$> sudo mount -o loop ramdisk mnt
$> sudo cp -r /home/user/targetfs/* mnt
$> sudo umount mnt
$> gzip ramdisk
And,
Now u-boot and Kernel is flashed on nand.
TI8168_EVM#printenvbootdelay=3baudrate=115200verify=yesramdisk_file=ramdisk.gzloadaddr=0x81000000script_addr=0x80900000loadbootscript=fatload mmc 1 ${script_addr} boot.scrbootscript= echo Running bootscript from MMC/SD to set the ENV...; source ${script_addr}ethact=DaVinci EMACautoload=nobootfile=uImageethaddr=00:08:65:23:22:19nfsserver=192.168.1.230filesize=88A451Dfileaddr=81000000netmask=255.255.255.0ipaddr=192.168.1.241serverip=192.168.1.230bootcmd=nand read 0x81000000 0x280000 0x1f0000;nand read 0x82000000 0x6c0000 0x8900000;bootmbootargs=console=ttyS2,115200n8 mem=320M earlyprintk root=/dev/ram rw initrd=0x82000000,320Mstdin=serialstdout=serialstderr=serialver=U-Boot 2010.06 (Nov 18 2010 - 22:36:59)
Environment size: 718/8188 bytes
Besides, I've tried to several ways.
I don't know how to set bootcmd and bootargs.
Or, how to set it when create ramdisk.gz?
BR!
Please, try:
setenv bootargs 'console=ttyS2,115200n8 mem=256M earlyprintk root=/dev/ram rw initrd=0x82000000,11M'setenv bootcmd 'nand read 0x81000000 0x280000 0x1f0000;nand read 0x82000000 0x6c0000 0x8900000;bootm 0x81000000'
11M is the size of ramdisk.gz; change that value if your case is different. Also, verify that "partition size" parameter values of the "nand read" command are correct.
If it is still not working, please describe the behaviour of the system.
Vlаdimir_KаfаliеvXID setenv bootargs 'console=ttyS2,115200n8 mem=256M earlyprintk root=/dev/ram rw initrd=0x82000000,11M' setenv bootcmd 'nand read 0x81000000 0x280000 0x1f0000;nand read 0x82000000 0x6c0000 0x8900000;bootm 0x81000000' 11M is the size of ramdisk.gz; change that value if your case is different. Also, verify that "partition size" parameter values of the "nand read" command are correct.
setenv bootargs 'console=ttyS2,115200n8 mem=256M earlyprintk root=/dev/ram rw initrd=0x82000000,11M'
setenv bootcmd 'nand read 0x81000000 0x280000 0x1f0000;nand read 0x82000000 0x6c0000 0x8900000;bootm 0x81000000'
I tried that, kernel message is :
U-Boot 2010.06 (Nov 18 2010 - 22:36:59)
TI8168-GP rev 1.0
ARM clk: 987MHzDDR clk: 398MHz
I2C: readyDRAM: 2 GiBNAND: 256 MiB:,;;:;:;;;;;;;;r;;:,;;:;:;;;;;;;;:,;;:;:;;;;;;;;:,;;:;:;;;;;;;;:;;;;;;;;:,;;:;:;,;:::;;;;r;;;rssiSiS552X5252525259GX2X9hX9X9XX2325S55252i5:,;;:;:;;;;;;;;:,;;:;:;;;;;;;rrssSsS52S22h52299GGAAMHMM#BBH#B#HMM#HMBA&&XX2255S2S5Si:,;;:;:;;;;;;;;;:;;r;;rsrrriiXS5S329&A&MH#BMB#A&9XXA252GXiSXX39AAMMMBB&G22S5i2SSiiiisi:,;;:;:;;;;;;r;rr2iisiih393HB#B#AA99i22irrrX3X52AGsisss2Xii2299HBMA&X2S5S5iSiisSsi:,;;:r:r;rrsrsihXSi2&##MHB&Ahh3AGHGA9G9h&#H##@@@##MAMMXXX9SSS29&&HGGX2i5iisiiisisi:,;;rrrrsSiiiA&ABH&A9GAGhAhBAMHA9HM@@@@@@@@@@@@@@@@@@@HHhAh2S2SX9&Gh22SSiisiiisiir:rrssisiS2XM##&h3AGAX&3GG3Ssr5H@M#HM2; ;2X&&&MHMB###GBB#B&XXSSs529XX55iSsisisir;rsrisSi2XHAhX99A3XXG&&XS;:,rH#HGhAS @@@@3rs2XBM@@A552&&AHA2XiisSS252SSsisSsr;issi5S22&&3iSSX292&hXsr;;:;h@&G339&S9@@@@2@MA&9&HB##Xris29ABMAAX2ir;rsSi5iss5rrsSi2XhG&9GXh399&X99i;;;;;;r#H&293H9X#@@@@@@@B&9GhAH@XrrsrsiXABHB&HG2rr;rrSiSi;:rsisS599&AA9XG&3A35r;:::;,;BMh&&2iX5A@@@@@@@&392X5GB2;;;r;iSX393A##A&Xi:::rsi;:rss552222X553&XHMhir;;::,:,h#HhGSXhG3#@@@@#AXXS2XAHA;::;;;;ss55XShBA3239r:,;;r;ii2S5SSi2i53hirsh2srr::,,,,;MMXX359&Ah3h&Si59SX99A#i:,::::;;sri2,.2r;:SGAr;,:;:;rrrrssiriXGSi::shs;;;,,,:,,rBBA9h5s5h5iS5isi2SAHB5:,,,:::;rrs5&SrisSX5Srrr:,;,r;;;;rsriSSrrrr;;5Xrr;;,:,,.,;9AA2SsisS5323XXXG9&i:.,,::;;r;;;srrrrrr;;:;:::::,;r;r;rrissrrr;:;::;s;;;;,:,,..,r293h222hXXAAGGGX;:,,,:,:,::;:;::,:,,,,...,,,,;,;;;;rrrrrrrrirr;,.,,:::::::,,,,.,;SX&ABAB2hhXir:,,.,,.,,:,,,,..,,,..,..,,,..::.:;:;;;:;;;;r;rrs;:.. ,,:::::,:,:,,.::rrsrr;;,,.......,..,....,,,,,,,...,.,,:,:.:::,::::::;;r;rrr;:.......,.,.,,:::,,...............,,::.,,,,:,::,,:,:,,,:,;:,.::,:,,,,,;;;;;;;;r;;::,..............................;;;:;::::,:::::::,:,:,,,: ,,:,,,,,,,,,,,,,:;rrr;;:;,,,,,,,::,.,.:.,.,;s,:;;;;:;:;;;;;::::,:::,:::,:,:,:,.,,,,,,,...,,.,,....................................:,............:,,,:,:,,,,,
Net: Ethernet PHY: GENERIC @ 0x01DaVinci EMACHit any key to stop autoboot: 0 TI8168_EVM#printenv bootdelay=3baudrate=115200verify=yesramdisk_file=ramdisk.gzloadaddr=0x81000000script_addr=0x80900000loadbootscript=fatload mmc 1 ${script_addr} boot.scrbootscript= echo Running bootscript from MMC/SD to set the ENV...; source ${script_addr}ethact=DaVinci EMACautoload=nobootfile=uImageethaddr=00:08:65:23:22:19nfsserver=192.168.1.230filesize=CE5F7Bfileaddr=81000000netmask=255.255.255.0ipaddr=192.168.1.241serverip=192.168.1.230bootargs=console=ttyS2,115200n8 mem=256M earlyprintk root=/dev/ram rw initrd=0x82000000,11Mbootcmd=nand read 0x81000000 0x280000 0x1f0000;nand read 0x82000000 0x6c0000 0x8900000;bootm 0x81000000stdin=serialstdout=serialstderr=serialver=U-Boot 2010.06 (Nov 18 2010 - 22:36:59)
Environment size: 727/8188 bytesTI8168_EVM#boot
NAND read: device 0 offset 0x280000, size 0x1f0000 2031616 bytes read: OK
NAND read: device 0 offset 0x6c0000, size 0x8900000 143654912 bytes read: OK## Booting kernel from Legacy Image at 81000000 ... Image Name: Arago/2.6.34-psp04.00.00.07/c6a8 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1993832 Bytes = 1.9 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK Loading Kernel Image ... OKOK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.Linux version 2.6.34 (x0029463@swubn01) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 Thu Nov 18 22:18:53 IST 2010CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7fCPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cacheMachine: ti8168evmbootconsole [earlycon0] enabledreserved size = 0 at 0Memory policy: ECC disabled, Data cache writebackOMAP chip is TI8168Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024Kernel command line: console=ttyS2,115200n8 mem=256M earlyprintk root=/dev/ram rw initrd=0x82000000,11MPID hash table entries: 1024 (order: 0, 4096 bytes)Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)Memory: 256MB = 256MB totalMemory: 244384k/244384k available, 17760k reserved, 0K highmemVirtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) DMA : 0xffc00000 - 0xffe00000 ( 2 MB) vmalloc : 0xd0800000 - 0xf8000000 ( 632 MB) lowmem : 0xc0000000 - 0xd0000000 ( 256 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .init : 0xc0008000 - 0xc0031000 ( 164 kB) .text : 0xc0031000 - 0xc03c9000 (3680 kB) .data : 0xc03ca000 - 0xc03f0280 ( 153 kB)SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1Hierarchical RCU implementation.NR_IRQS:160GPMC revision 6.0IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interruptsTotal of 128 interrupts on 1 active controllerOMAP clockevent source: GPTIMER2 at 27000000 HzConsole: colour dummy device 80x30Calibrating delay loop... 986.31 BogoMIPS (lpj=4931584)Security Framework initializedMount-cache hash table entries: 512CPU: Testing write buffer coherency: okdevtmpfs: initializedNET: Registered protocol family 16Found NAND on CS0Registering NAND on CS0registered ti816x_vpss device Registered ti81xx_fb deviceti816x_pcie: Invoking PCI BIOS...ti816x_pcie: Setting up Host Controller...ti816x_pcie: Register base mapped @0xd0808000ti816x_pcie: Starting PCI scan...PCI: bus0: Fast back to back transfers enabledbio: create slab <bio-0> at 0vgaarb: loadedSCSI subsystem initializedusbcore: registered new interface driver usbfsusbcore: registered new interface driver hubusbcore: registered new device driver usbi2c_omap i2c_omap.1: bus 1 rev4.0 at 100 kHzi2c_omap i2c_omap.2: bus 2 rev4.0 at 100 kHzAdvanced Linux Sound Architecture Driver Version 1.0.22.1.Switching to clocksource gp timermusb_hdrc: version 6.0, cppi4.1-dma, host, debug=0cppi41_queue_mgr_init doneregisterd cppi-dma Intr @ IRQ 17musb_hdrc: kernel must blacklist external hubsmusb_hdrc: USB Host mode controller at d080e000 using DMA, IRQ 18musb_hdrc musb_hdrc.0: MUSB HDRC host drivermusb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1hub 1-0:1.0: USB hub foundhub 1-0:1.0: 1 port detectedmusb_hdrc: kernel must blacklist external hubsmusb_hdrc: USB Host mode controller at d081e800 using DMA, IRQ 19musb_hdrc musb_hdrc.1: MUSB HDRC host drivermusb_hdrc musb_hdrc.1: new USB bus registered, assigned bus number 2hub 2-0:1.0: USB hub foundhub 2-0:1.0: 1 port detectedNET: Registered protocol family 2IP route cache hash table entries: 2048 (order: 1, 8192 bytes)TCP established hash table entries: 8192 (order: 4, 65536 bytes)TCP bind hash table entries: 8192 (order: 3, 32768 bytes)TCP: Hash tables configured (established 8192 bind 8192)TCP reno registeredUDP hash table entries: 256 (order: 0, 4096 bytes)UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)NET: Registered protocol family 1RPC: Registered udp transport module.RPC: Registered tcp transport module.RPC: Registered tcp NFSv4.1 backchannel transport module.Trying to unpack rootfs image as initramfs...rootfs image is not initramfs (no cpio magic); looks like an initrdFreeing initrd memory: 11264KNetWinder Floating Point Emulator V0.97 (double precision)JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.msgmni has been set to 499io scheduler noop registeredio scheduler deadline registeredio scheduler cfq registered (default)Serial: 8250/16550 driver, 4 ports, IRQ sharing enabledserial8250.0: ttyS0 at MMIO 0x48020000 (irq = 72) is a ST16654serial8250.1: ttyS1 at MMIO 0x48022000 (irq = 73) is a ST16654serial8250.2: ttyS2 at MMIO 0x48024000 (irq = 74) is a ST16654console [ttyS2] enabled, bootconsole disabledconsole [ttyS2] enabled, bootconsole disabledbrd: module loadedloop: module loadedahci ahci: forcing port_map 0x0 -> 0x3ahci ahci: AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl platform modeahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc scsi0 : ahciscsi1 : ahciata1: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a150fff] port 0x100 irq 16ata2: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a150fff] port 0x180 irq 16omap2-nand driver initializingNAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-bit)Creating 5 MTD partitions on "omap2-nand":0x000000000000-0x000000260000 : "U-Boot"0x000000260000-0x000000280000 : "U-Boot Env"0x000000280000-0x0000006c0000 : "Kernel"0x0000006c0000-0x00000cee0000 : "File System"0x00000cee0000-0x000010000000 : "Reserved"usbmon: debugfs is not availableInitializing USB Mass Storage driver...usbcore: registered new interface driver usb-storageUSB Mass Storage support registered.mice: PS/2 mouse device common for all micei2c /dev entries driverPSTATE 1f20000usbcore: registered new interface driver usbhidusbhid: USB HID core driverNo device for DAI tlv320aic3xasoc: tlv320aic3x <-> davinci-i2s mapping okALSA device list: #0: TI816x EVM (tlv320aic3x)TCP cubic registeredNET: Registered protocol family 17VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3emac-mii: probedmdio_bus 1:01: DaVinci EMAC: mii bus found 31net eth1: DaVinci EMAC eth1 PHY not founddavinci_emac: probe of davinci_emac.1 failed with error -1ata1: SATA link down (SStatus 0 SControl 300)ata2: SATA link down (SStatus 0 SControl 300)RAMDISK: gzip image found at block 0RAMDISK: incomplete write (16417 != 16453)write errorVFS: Mounted root (ext2 filesystem) on device 1:0.attempt to access beyond end of deviceram0: rw=0, want=115214, limit=32768EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=14337, block=57606devtmpfs: error mounting -5Freeing init memory: 164Kattempt to access beyond end of deviceram0: rw=0, want=589832, limit=32768EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=73729, block=294915attempt to access beyond end of deviceram0: rw=0, want=32776, limit=32768EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=4097, block=16387attempt to access beyond end of deviceram0: rw=0, want=98312, limit=32768EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=12289, block=49155attempt to access beyond end of deviceram0: rw=0, want=98312, limit=32768EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=12289, block=49155Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.Backtrace: [<c0035390>] (dump_backtrace+0x0/0x110) from [<c02d8fe4>] (dump_stack+0x18/0x1c) r7:00000000 r6:00000000 r5:00000000 r4:c03f0b10[<c02d8fcc>] (dump_stack+0x0/0x1c) from [<c02d9034>] (panic+0x4c/0xc8)[<c02d8fe8>] (panic+0x0/0xc8) from [<c003157c>] (init_post+0xa4/0xc4) r3:cfcafe00 r2:00000000 r1:c06205e0 r0:c036cca6[<c00314d8>] (init_post+0x0/0xc4) from [<c0008670>] (kernel_init+0x114/0x14c) r5:00000000 r4:c03f0280[<c000855c>] (kernel_init+0x0/0x14c) from [<c0055fec>] (do_exit+0x0/0x5bc) r5:00000000 r4:000000
Also, file system size is :
I'll try to change other parameters.
setenv bootargs 'console=ttyS2,115200n8 mem=256M earlyprintk root=/dev/ram0 rw initrd=0x82000000,137M'
Tell me, is it working now. Thank you.
Already tried.
Kernel message is :
Uncompressing Linux... done, booting the kernel.Linux version 2.6.34 (x0029463@swubn01) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 Thu Nov 18 22:18:53 IST 2010CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7fCPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cacheMachine: ti8168evmbootconsole [earlycon0] enabledreserved size = 0 at 0Memory policy: ECC disabled, Data cache writebackOMAP chip is TI8168Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024Kernel command line: console=ttyS2,115200n8 mem=256M earlyprintk root=/dev/ram0 rw initrd=0x82000000,137MPID hash table entries: 1024 (order: 0, 4096 bytes)Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)Memory: 256MB = 256MB totalMemory: 115360k/115360k available, 146784k reserved, 0K highmemVirtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) DMA : 0xffc00000 - 0xffe00000 ( 2 MB) vmalloc : 0xd0800000 - 0xf8000000 ( 632 MB) lowmem : 0xc0000000 - 0xd0000000 ( 256 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .init : 0xc0008000 - 0xc0031000 ( 164 kB) .text : 0xc0031000 - 0xc03c9000 (3680 kB) .data : 0xc03ca000 - 0xc03f0280 ( 153 kB)SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1Hierarchical RCU implementation.NR_IRQS:160GPMC revision 6.0IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interruptsTotal of 128 interrupts on 1 active controllerOMAP clockevent source: GPTIMER2 at 27000000 HzConsole: colour dummy device 80x30Calibrating delay loop... 986.31 BogoMIPS (lpj=4931584)Security Framework initializedMount-cache hash table entries: 512CPU: Testing write buffer coherency: okdevtmpfs: initializedNET: Registered protocol family 16Found NAND on CS0Registering NAND on CS0registered ti816x_vpss device Registered ti81xx_fb deviceti816x_pcie: Invoking PCI BIOS...ti816x_pcie: Setting up Host Controller...ti816x_pcie: Register base mapped @0xd0808000ti816x_pcie: Starting PCI scan...PCI: bus0: Fast back to back transfers enabledbio: create slab <bio-0> at 0vgaarb: loadedSCSI subsystem initializedusbcore: registered new interface driver usbfsusbcore: registered new interface driver hubusbcore: registered new device driver usbi2c_omap i2c_omap.1: bus 1 rev4.0 at 100 kHzi2c_omap i2c_omap.2: bus 2 rev4.0 at 100 kHzAdvanced Linux Sound Architecture Driver Version 1.0.22.1.Switching to clocksource gp timermusb_hdrc: version 6.0, cppi4.1-dma, host, debug=0cppi41_queue_mgr_init doneregisterd cppi-dma Intr @ IRQ 17musb_hdrc: kernel must blacklist external hubsmusb_hdrc: USB Host mode controller at d080e000 using DMA, IRQ 18musb_hdrc musb_hdrc.0: MUSB HDRC host drivermusb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1hub 1-0:1.0: USB hub foundhub 1-0:1.0: 1 port detectedmusb_hdrc: kernel must blacklist external hubsmusb_hdrc: USB Host mode controller at d081e800 using DMA, IRQ 19musb_hdrc musb_hdrc.1: MUSB HDRC host drivermusb_hdrc musb_hdrc.1: new USB bus registered, assigned bus number 2hub 2-0:1.0: USB hub foundhub 2-0:1.0: 1 port detectedNET: Registered protocol family 2IP route cache hash table entries: 2048 (order: 1, 8192 bytes)TCP established hash table entries: 8192 (order: 4, 65536 bytes)TCP bind hash table entries: 8192 (order: 3, 32768 bytes)TCP: Hash tables configured (established 8192 bind 8192)TCP reno registeredUDP hash table entries: 256 (order: 0, 4096 bytes)UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)NET: Registered protocol family 1RPC: Registered udp transport module.RPC: Registered tcp transport module.RPC: Registered tcp NFSv4.1 backchannel transport module.Trying to unpack rootfs image as initramfs...rootfs image is not initramfs (no cpio magic); looks like an initrdswapper invoked oom-killer: gfp_mask=0x200d2, order=0, oom_adj=0Backtrace: [<c0035390>] (dump_backtrace+0x0/0x110) from [<c02d8fe4>] (dump_stack+0x18/0x1c) r7:cfc28000 r6:00000000 r5:00000000 r4:c03cd750[<c02d8fcc>] (dump_stack+0x0/0x1c) from [<c0081828>] (dump_header+0x44/0x110)[<c00817e4>] (dump_header+0x0/0x110) from [<c0081df8>] (__out_of_memory+0x144/0x194) r5:00000000 r4:c03cd750[<c0081cb4>] (__out_of_memory+0x0/0x194) from [<c0081edc>] (out_of_memory+0x94/0xcc)[<c0081e48>] (out_of_memory+0x0/0xcc) from [<c0084b94>] (__alloc_pages_nodemask+0x418/0x50c) r5:cfc26000 r4:00000000[<c008477c>] (__alloc_pages_nodemask+0x0/0x50c) from [<c007f85c>] (grab_cache_page_write_begin+0x58/0x98)[<c007f804>] (grab_cache_page_write_begin+0x0/0x98) from [<c00bd38c>] (simple_write_begin+0x28/0xe4)[<c00bd364>] (simple_write_begin+0x0/0xe4) from [<c007eac4>] (generic_file_buffered_write+0xe4/0x21c) r7:00000000 r6:06f8a000 r5:06f8a000 r4:00001000[<c007e9e0>] (generic_file_buffered_write+0x0/0x21c) from [<c0080770>] (__generic_file_aio_write+0x428/0x478)[<c0080348>] (__generic_file_aio_write+0x0/0x478) from [<c0080834>] (generic_file_aio_write+0x74/0xd8)[<c00807c0>] (generic_file_aio_write+0x0/0xd8) from [<c00a3348>] (do_sync_write+0xa0/0xec)[<c00a32a8>] (do_sync_write+0x0/0xec) from [<c00a3d24>] (vfs_write+0xb0/0xd8) r8:c2000000 r7:08900000 r6:cfc29f08 r5:c2000000 r4:cfc73800[<c00a3c74>] (vfs_write+0x0/0xd8) from [<c00a3e10>] (sys_write+0x44/0x70) r7:08900000 r6:cfc73800 r5:00000000 r4:00000000[<c00a3dcc>] (sys_write+0x0/0x70) from [<c000aebc>] (populate_rootfs+0x1b4/0x1f8) r8:00000000 r7:cfcf4000 r6:cfcf4048 r5:00000000 r4:00000000[<c000ad08>] (populate_rootfs+0x0/0x1f8) from [<c003135c>] (do_one_initcall+0x64/0x1bc)[<c00312f8>] (do_one_initcall+0x0/0x1bc) from [<c00085f4>] (kernel_init+0x98/0x14c) r7:00000000 r6:00000000 r5:00000000 r4:c0028700[<c000855c>] (kernel_init+0x0/0x14c) from [<c0055fec>] (do_exit+0x0/0x5bc) r5:00000000 r4:00000000Mem-info:Normal per-cpu:CPU 0: hi: 90, btch: 15 usd: 6active_anon:0 inactive_anon:0 isolated_anon:0 active_file:0 inactive_file:0 isolated_file:0 unevictable:28554 dirty:0 writeback:0 unstable:0 free:0 slab_reclaimable:43 slab_unreclaimable:121 mapped:0 shmem:0 pagetables:0 bounce:0Normal free:0kB min:0kB low:0kB high:0kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:114216kB iolowmem_reserve[]: 0 0Normal: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 0kB28554 total pagecache pages65536 pages of RAM25 free pages36696 reserved pages122 slab pages0 pages shared0 pages swap cachedKernel panic - not syncing: Out of memory and no killable processes...
Backtrace: [<c0035390>] (dump_backtrace+0x0/0x110) from [<c02d8fe4>] (dump_stack+0x18/0x1c) r7:cfc28000 r6:00000000 r5:00000000 r4:c03f0b10[<c02d8fcc>] (dump_stack+0x0/0x1c) from [<c02d9034>] (panic+0x4c/0xc8)[<c02d8fe8>] (panic+0x0/0xc8) from [<c0081e00>] (__out_of_memory+0x14c/0x194) r3:00000000 r2:c03d3e00 r1:00003320 r0:c0376bfd[<c0081cb4>] (__out_of_memory+0x0/0x194) from [<c0081edc>] (out_of_memory+0x94/0xcc)[<c0081e48>] (out_of_memory+0x0/0xcc) from [<c0084b94>] (__alloc_pages_nodemask+0x418/0x50c) r5:cfc26000 r4:00000000[<c008477c>] (__alloc_pages_nodemask+0x0/0x50c) from [<c007f85c>] (grab_cache_page_write_begin+0x58/0x98)[<c007f804>] (grab_cache_page_write_begin+0x0/0x98) from [<c00bd38c>] (simple_write_begin+0x28/0xe4)[<c00bd364>] (simple_write_begin+0x0/0xe4) from [<c007eac4>] (generic_file_buffered_write+0xe4/0x21c) r7:00000000 r6:06f8a000 r5:06f8a000 r4:00001000[<c007e9e0>] (generic_file_buffered_write+0x0/0x21c) from [<c0080770>] (__generic_file_aio_write+0x428/0x478)[<c0080348>] (__generic_file_aio_write+0x0/0x478) from [<c0080834>] (generic_file_aio_write+0x74/0xd8)[<c00807c0>] (generic_file_aio_write+0x0/0xd8) from [<c00a3348>] (do_sync_write+0xa0/0xec)[<c00a32a8>] (do_sync_write+0x0/0xec) from [<c00a3d24>] (vfs_write+0xb0/0xd8) r8:c2000000 r7:08900000 r6:cfc29f08 r5:c2000000 r4:cfc73800[<c00a3c74>] (vfs_write+0x0/0xd8) from [<c00a3e10>] (sys_write+0x44/0x70) r7:08900000 r6:cfc73800 r5:00000000 r4:00000000[<c00a3dcc>] (sys_write+0x0/0x70) from [<c000aebc>] (populate_rootfs+0x1b4/0x1f8) r8:00000000 r7:cfcf4000 r6:cfcf4048 r5:00000000 r4:00000000[<c000ad08>] (populate_rootfs+0x0/0x1f8) from [<c003135c>] (do_one_initcall+0x64/0x1bc)[<c00312f8>] (do_one_initcall+0x0/0x1bc) from [<c00085f4>] (kernel_init+0x98/0x14c) r7:00000000 r6:00000000 r5:00000000 r4:c0028700[<c000855c>] (kernel_init+0x0/0x14c) from [<c0055fec>] (do_exit+0x0/0x5bc) r5:00000000 r4:00000000
I guess that...
The problem is creating ramdisk.gz.
Here you can see block size of NAND :
http://processors.wiki.ti.com/index.php/DM816x_AM389x_PSP_U-Boot#U-Boot_NAND_Support
Micron Nand parts (page size 2KB, block size 128KB) are supported on DM816xEVM platforms.
So,
In this wiki page, http://processors.wiki.ti.com/index.php/Creating_a_RAMDISK,
[root@localhost jjd]# dd if=/dev/zero of=ramdisk bs=1M count=32 32+0 records in 32+0 records out 33554432 bytes (34 MB) copied, 0.243921 s, 138 MB/s
is right?
I tried the following :
$> dd if=/dev/zero of=ramdisk bs=128K count=26602660+0 records in2660+0 records out348651520 bytes (349 MB) copied, 2.48309 s, 140 MB/s
But failed.
See also :
Did you try with:
dd if=/dev/zero of=ramdisk bs=1M count=349
Hokyun Yu,Your log says:Trying to unpack rootfs image as initramfs...rootfs image is not initramfs (no cpio magic); looks like an initrdIt seems that your kernel is configured for initramfs, but you pass what is for the initrd configuration.Please try to follow also the instructions here:http://processors.wiki.ti.com/index.php/InitrdYour case is initrd, but alternatively you can try initramfs. The file system and kernel in initramfs configuration are in one image.BR
1st. initrd
$> cd ti-ezsdk_c6a816x-evm_5_00_00_56
$> make linux_clean
$> source linux-devkit/environment –setup
$> cd psp/linux-2.6.34-psp04.00.00.07
$> make –C ./ ARCH=arm CROSS_COMPILE=/home/user/CodeSourcery/Sourcery_G++_Lite/bin/arm-non-linux-gnuebi- clean
$> make –C ./ ARCH=arm CROSS_COMPILE=/home/user/CodeSourcery/Sourcery_G++_Lite/bin/arm-non-linux-gnuebi- ti8168_evm_defconfig
$> gedit .config
$> make –C ./ ARCH=arm CROSS_COMPILE=/home/user/CodeSourcery/Sourcery_G++_Lite/bin/arm-non-linux-gnuebi- uImage
make ramdisk.gz
$> dd if=dev/zero of=ramdisk bs=1M count=320M
$> sudo cp -r /home/user/targetfs_fs/* mnt
set u-boot env
bootcmd=nand read 0x81000000 0x280000 0x1f0000;nand read 0x82000000 0x6c0000 0x7500000; bootm 0x81000000bootargs=console=ttyS2,115200n8 mem=512M earlyprintk root=/dev/ram0 rw initrd=0x82000000,320M
boot
but, same message :
Trying to unpack rootfs image as initramfs...rootfs image is not initramfs (junk in compressed archive); looks like an initrd
2nd. initramfs
$> mkdir target_fs
$> sudo cp –r /home/user/targetfs/* /target_fs
$> sudo chmod 777 –R target_fs
$> cd target_fs
$> ln –s ./bin/busybox ./init
$> find . | cpio -H newc -o > ../target_fs.cpio
$> cd ..
$> cd ti-ezsdk_c6a816x-evm_5_00_00_56/psp/linux-2.6.34-psp04.00.00.07
CONFIG_INITRAMFS_SOURCE="/home/user/target_fs"
CONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_RAM_COUNT=320CONFIG_BLK_DEV_RAM_SIZE=335544320CONFIG_BLK_dEV_RAM_BLOCKSIZE=1048576
TI8168_EVM#printenv
bootdelay=3baudrate=115200verify=yesramdisk_file=ramdisk.gzloadaddr=0x81000000script_addr=0x80900000loadbootscript=fatload mmc 1 ${script_addr} boot.scrbootscript= echo Running bootscript from MMC/SD to set the ENV...; source ${script_addr}ethact=DaVinci EMACautoload=nobootfile=uImageethaddr=00:08:65:23:22:19nfsserver=192.168.1.230filesize=7491670fileaddr=81000000netmask=255.255.255.0ipaddr=192.168.1.241serverip=192.168.1.230bootcmd=nand read 0x81000000 0x280000 0x7500000;bootm 0x81000000stdin=serialstdout=serialstderr=serialver=U-Boot 2010.06 (Nov 18 2010 - 22:36:59)
Environment size: 597/8188 bytes
TI8168_EVM#boot
NAND read: device 0 offset 0x280000, size 0x7500000 122683392 bytes read: OK## Booting kernel from Legacy Image at 81000000 ... Image Name: Linux-2.6.34 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 122230320 Bytes = 116.6 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK Loading Kernel Image ...
... just stopped.
gg........Please explain easily.... T.T
About initrd:
Please, try to create ramdisk.gz exactly how it is described here:
http://processors.wiki.ti.com/index.php/Initrd#Creation
http://processors.wiki.ti.com/index.php/Initrd#Filling
=================================
About initramfs:
You don't have bootargs variable in your u-boot environment.
Besides, this line:
sudo cp –r /home/user/targetfs/* /target_fs
should be:
sudo cp –r /home/user/targetfs/* target_fs
or
sudo cp –r /home/user/targetfs/* /home/user/target_fs
Please, also be sure to check this:
"Then, if you compile the kernel, e.g. by make uImage, the cpio archive is generated and embedded into the kernel:
... CHK include/linux/compile.h GEN usr/initramfs_data.cpio.gz AS usr/initramfs_data.o LD usr/built-in.o ..."
Thank you.
About initramfs :
http://processors.wiki.ti.com/index.php/Initrd - initramfs - installation,
"If you start the kernel, the initramfs is already there. Therefore, there is no root=/dev/ram0 rw initrd=0x87000000,8M bootargs option necessary. Remove this if you still have it!"
So I deleted the bootargs.
And set 'bootargs=console=ttyS2,115200n8 mem=512M earlyprintk' also.
In addition, kernel size is 116MB. Is it right?
Vlаdimir_KаfаliеvXID Please, also be sure to check this: "Then, if you compile the kernel, e.g. by make uImage, the cpio archive is generated and embedded into the kernel: ... CHK include/linux/compile.h GEN usr/initramfs_data.cpio.gz AS usr/initramfs_data.o LD usr/built-in.o ..."
I have checked that.
Could you explain about 'initramfs - creation'?
Especially init.
I'll try to above initrd.
I'm so sorry but please help.
initrd
Please, try to follow the instructions on how to create ramdisk.gz under sections "Creation" and "Filling". And use that ramdisk.gz, not one that is created previously with another procedure.
========================
initramfs
You didn't have such line
bootargs=console=ttyS2,115200n8 mem=512M earlyprintk
when you posted your "printenv" output. That way your console isn't set up and that is why you see nothing after:
//stops here
So please, make sure that the bootargs are added and tell me is initramfs working now, and if it is not - what is the error now.
Vlаdimir_KаfаliеvXID initramfs You didn't have such line bootargs=console=ttyS2,115200n8 mem=512M earlyprintk when you posted your "printenv" output. That way your console isn't set up and that is why you see nothing after: TI8168_EVM#boot NAND read: device 0 offset 0x280000, size 0x7500000 122683392 bytes read: OK## Booting kernel from Legacy Image at 81000000 ... Image Name: Linux-2.6.34 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 122230320 Bytes = 116.6 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK Loading Kernel Image ... //stops here So please, make sure that the bootargs are added and tell me is initramfs working now, and if it is not - what is the error now. BR
Set the bootargs, same error.
Just stopped.
How about the Initrd? Is it working now? That is the more standard method. I tried it myself before some time and it was OK.
Not yet.
Please inform me if you already had tried initrd.
I don't know what is the right method;
http://processors.wiki.ti.com/index.php/Creating_a_RAMDISK or http://processors.wiki.ti.com/index.php/Initrd#initramfs.
target_fs size is 72.9MB4130.target_fs.tar.gz