aesop2440 linux-2.6.13 suspend2 howto 0. bootloader We use u-boot-1.1.2 for aesop2440-board. 1. kernel boot command line argument 1> if u-boot use. setenv bootargs root=/dev/nfs rw nfsroot=172.16.1.200:/scratchbox/users/aesop/targets/AESOP mem=63M ip=172.16.1.101:172.16.1.200:172.16.1.1:255.255.255.0::eth0:off console=ttySAC0,115200n81 resume2=swap:/dev/mtdblock0 ethaddr=08:00:3e:26:0a:5b You must insert "resume2=swap:/dev/mtdblock0" text in boot arguments. 2> no u-boot use. # make menuconfig in kernel argument's section Insert "root=/dev/nfs rw nfsroot=172.16.1.200:/scratchbox/users/aesop/targets/AESOP mem=63M ip=172.16.1.101:172.16.1.200:172.16.1.1:255.255.255.0::eth0:off console=ttySAC0,115200n81 resume2=swap:/dev/mtdblock0 ethaddr=08:00:3e:26:0a:5b". and save/exit 3. kernel compile # tar xzf 060706_aesop2440_2.6.13_suspend2_dist.tar.gz # cd linux-2.6.13-aesop244-suspend2-dist # cp 060328_suspend2.conf .config # make aesopk ==> making u-boot image for aesop2440 4. board booting Must check boot command line argument. 4. Making space to save suspend2 image. We use suspend2 image to swap partition. Since aesop2440 board has not harddisk. # mkswap /dev/mtdblock0 # swapon /dev/mtdblock0 Confirm swap area. # more /proc/swaps ¡Ø Notice: You must have non-bad NAND Flash, or NOR flash. aesop2440 has 64Mbytes nand flash. If bad block exists, suspend2 ok & resume fail. why? nand flash is swap block.....--; 5. suspend2 running # echo > /proc/software_suspend/do_suspend You see log like this. ====================================================== root@godori:~# echo > /proc/software_suspend/do_suspend suspend2_main:1 try_to_parse_resume_device: 1 /dev/mtdblock0 try_to_parse_resume_device: 2 try_to_parse_resume_device: 3 try_to_parse_resume_device: 4 try_to_parse_resume_device: 5 suspend2_main:2 suspend2_main:3 try_to_parse_resume_device: 1 /dev/mtdblock0 try_to_parse_resume_device: 2 try_to_parse_resume_device: 3 try_to_parse_resume_device: 4 try_to_parse_resume_device: 5 suspend2_recalculate_stats, 0, 0 1 suspend2_recalculate_stats, 1432, 908 2 suspend2_recalculate_stats, 1432, 908 1 suspend2_recalculate_stats, 1432, 908 2 suspend2_allocate_extra_pagedir_memory, 1432, 908 1 suspend2_allocate_extra_pagedir_memory, 1432, 908 2 suspend2_recalculate_stats, 1432, 908 1 suspend2_recalculate_stats, 1432, 908 2 suspend2_main:4 suspend2_main:5 - Final values: pgd1 1432 and pgd2 908. ghcstop: flush MTD Power down. ======================================================== 6. reboot You see log below this ========================================= U-Boot 1.1.2 (Sep 25 2005 - 03:23:23) U-Boot code: 33C00000 -> 33C3FC58 BSS: -> 33C794F8 RAM Configuration: Bank #0: 30000000 64 MB Get flash bank 0 size @ 0x0 Total Flash bank's sizes: 0x200000 protect monitor 3fc58 bytes @ address 0 Flash: 2 MB NAND:64 MB In: serial Out: serial Err: serial SD Initialize fail.. Hit any key to stop autoboot: 0 TFTP from server 172.16.1.200; our IP address is 172.16.1.101 Filename 'aesopk'. Load address: 0x32000000 Loading: T ################################################################# ################################################################# ################################################################# ################################################################# ########################## done Bytes transferred = 1462608 (165150 hex) ## Booting image at 32000000 ... Image Name: Linux-2.6.13-h1940-aesop2440 Created: 2006-03-28 4:39:13 UTC Image Type: ARM Linux Kernel Image (gzip compressed) Data Size: 1462544 Bytes = 1.4 MB Load Address: 30008000 Entry Point: 30008000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK Starting kernel ... Linux version 2.6.13-h1940-aesop2440 (root@localhost.localdomain) (gcc version 3.3.4) #10 Tue Mar 28 13:39:09 KST 2006 CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T) Machine: aESOP-2440 Memory policy: ECC disabled, Data cache writeback CPU S3C2440A (id 0x32440001) S3C2440: core 399.651 MHz, memory 133.217 MHz, peripheral 66.608 MHz S3C2410 Clocks, (c) 2004 Simtec Electronics CPU0: D VIVT write-back cache CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets Built 1 zonelists Kernel command line: root=/dev/nfs rw nfsroot=172.16.1.200:/scratchbox/users/aesop/targets/AESOP mem=63M ip=172.16.1.101:172.16.1.200:172.16.1.1:255.255.255.0::eth0:off console=ttySAC0,115200n81 resume2=swap:/dev/mtdblock0 ethaddr=08:00:3e:26:0a:5b resume_setup(): resume2_file = swap:/dev/mtdblock0 irq: clearing subpending status 00000002 PID hash table entries: 256 (order: 8, 4096 bytes) timer tcon=00500000, tcnt d8d2, tcfg 00000200,00000000, usec 0000170f Console: colour dummy device 80x30 Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 63MB = 63MB total Memory: 60672KB available (2474K code, 621K data, 116K init) Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok NET: Registered protocol family 16 S3C2440: Initialising architecture S3C2440: IRQ Support S3C2440: Clock Support, UPLL 47.980 MHz SCSI subsystem initialized usbcore: registered new driver usbfs usbcore: registered new driver hub S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics DMA channel 0 at c4000000, irq 33 DMA channel 1 at c4000040, irq 34 DMA channel 2 at c4000080, irq 35 DMA channel 3 at c40000c0, irq 36 NetWinder Floating Point Emulator V0.97 (double precision) yaffs Mar 28 2006 12:06:09 Installing. Initializing Cryptographic API s3c2410 Backlight Driver Initialized. Console: switching to colour frame buffer device 96x34 S3C24X0 fb0: s3c2410fb frame buffer device initialize done S3C2410/2440 Framebuffer Change driver, (c) 2005 aESOP-embedded GPIO L3 bus interface for S3C2440, installed S3C2410 RTC, (c) 2004 Simtec Electronics s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440 s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440 s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440 io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize loop: loaded (max 8 devices) nbd: registered device at major 43 bcon3 = 0000 0000 0000 0000 0001 1111 0100 1100 cs89x0:cs89x0_probe(0x0) PP_addr=0x3000 cs89x0.c: v2.4.3-pre1 Russell Nelson , Andrew Morton eth0: cs8900 rev K found at 0xf8000300 cs89x0: Extended EEPROM checksum bad and no Cirrus EEPROM, relying on command line cs89x0 media RJ-45, IRQ 53, programmed I/O, MAC 00:00:c0:ff:ee:08 cs89x0_probe1() successful bcon3 = 0000 0000 0000 0000 0001 1111 0100 1100 cs89x0:cs89x0_probe(0x0) cs89x0: request_region(0xf8000300, 0x10) failed cs89x0: no cs8900 or cs8920 detected. Be sure to disable PnP with SETUP S3C24XX NAND Driver, (c) 2004 Simtec Electronics s3c2410-nand: mapped registers at c4080000 s3c2410-nand: timing: Tacls 13ns, Twrph0 66ns, Twrph1 39ns NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit) Scanning device for bad blocks Creating 1 MTD partitions on "NAND 64MiB 3,3V 8-bit": 0x00000000-0x04000000 : "Total nand" usbmon: debugfs is not available s3c2410-ohci s3c2410-ohci: S3C24XX OHCI s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1 s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000 usb usb1: Product: S3C24XX OHCI usb usb1: Manufacturer: Linux 2.6.13-h1940-aesop2440 ohci_hcd usb usb1: SerialNumber: s3c24xx hub 1-0:1.0: USB hub found hub 1-0:1.0: 2 ports detected usbcore: registered new driver cdc_acm drivers/usb/class/cdc-acm.c: v0.23:USB Abstract Control Model driver for USB modems and ISDN adapters Initializing USB Mass Storage driver... usbcore: registered new driver usb-storage USB Mass Storage support registered. usbcore: registered new driver usbhid drivers/usb/input/hid-core.c: v2.01:USB HID core driver s3c2410_udc: version 28 Aug 2005 mice: PS/2 mouse device common for all mice s3c2410-buttons successfully loaded s3c2410-gd successfully loaded s3c2410 TouchScreen successfully loaded i2c /dev entries driver s3c2440-i2c s3c2440-i2c: slave address 0x10 s3c2440-i2c s3c2440-i2c: bus frequency set to 378 KHz s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter mmci-s3c2410: probe: mapped sdi_base=c4680000 irq=37 irq_cd=62 dma=0. mmci-s3c2410: initialisation done. godori: AESOP2440 SOUND driver register godori: AESOP2440 SOUND driver.........probe AESOP2440 UDA1341 audio driver initialized NET: Registered protocol family 2 IP route cache hash table entries: 512 (order: -1, 2048 bytes) TCP established hash table entries: 2048 (order: 2, 16384 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes) TCP: Hash tables configured (established 2048 bind 2048) TCP reno registered TCP bic registered NET: Registered protocol family 1 NET: Registered protocol family 17 Suspend2 Core. Suspend2 Compression Driver loading. Suspend2 Encryption Driver loading. Suspend2 Swap Writer loading. Suspend2 FileWriter loading. eth0: using half-duplex 10Base-T (RJ-45) MMC: sd_app_op_cond timed out. Probably no SD-Card here. IP-Config: Complete: device=eth0, addr=172.16.1.101, mask=255.255.255.0, gw=172.16.1.1, host=172.16.1.101, domain=, nis-domain=(none), bootserver=172.16.1.200, rootserver=172.16.1.200, rootpath= try_to_parse_resume_device: 1 /dev/mtdblock0 try_to_parse_resume_device: 2 try_to_parse_resume_device: 3 try_to_parse_resume_device: 4 try_to_parse_resume_device: 5 Suspend2 2.2-rc7: Swapwriter: Signature found. Suspend2 2.2-rc7: Suspending enabled. suspend_userui: userui_program not configured. suspend_userui disabled. Reading kernel & process data... 20%...40%...60%...80%...100%...done. Starting a copyback thread c35aa000 Copying original kernel back suspend2_main:6 root@godori:~# root@godori:~# root@godori:~# root@godori:~# root@godori:~# ===========================================================