Skip to contentSkip to conversation

Suspend2-2.2.2 for 2.6.16.

DISCUSSION Nigel Cunningham 6 participants 21 messages Mar 28, 2006 – Mar 31, 2006

lore
Share & tools
lore
#0 lore raw

Hi everyone.

Suspend2, version 2.2.2 is now available from

http://stage.suspend2.net/downloads/all/suspend2-2.2.2-for-2.6.16.tar.bz2

This is the first stable release since switching to sharing the lowlevel code with swsusp. It means that I'm now more dependent on Rafael and Pavel not changing things in an incompatible way, but it is a gain in that it reduces the amount of code that needs to be maintained by approximately 1000 lines.

Since I announced my new job a few weeks ago, the impetus to seek to merge Suspend2 has been renewed. I'm currently building a git tree to this end. It's not yet publicly available because I'm using stgit and am sometimes modifying earlier patches in the series and rebasing it against later versions of Linus' tree, but once it's done, I'll let people know where to find it.

Regards,

Nigel

#1 lore raw
Quoted 10 lines · Nigel Cunningham

Hi everyone.

Suspend2, version 2.2.2 is now available from

http://stage.suspend2.net/downloads/all/suspend2-2.2.2-for-2.6.16.tar.bz2

This is the first stable release since switching to sharing the lowlevel code with swsusp. It means that I'm now more dependent on Rafael and Pavel not changing things in an incompatible way, but it is a gain in that it reduces the amount of code that needs to be maintained by approximately 1000 lines.

Nice, thanks.
Pavel

Signature · 1 line
Picture of sleeping (Linux) penguin wanted...
#3 lore raw
Quoted 9 lines · Mark Lord
Quoted 5 lines · Nigel Cunningham

Hi everyone.

Suspend2, version 2.2.2 is now available from

http://stage.suspend2.net/downloads/all/suspend2-2.2.2-for-2.6.16.tar.bz2

Wow! Is this ever freaking fast!
Try it folks. Once you do, you'll never go back to the slow way!

Please do try code at suspend.sf.net. It should be as fast and not needing big kernel patch.
Pavel

Signature · 1 line
Picture of sleeping (Linux) penguin wanted...
#4 lore raw

Hi.

Quoted 6 lines · Pavel Machek
Quoted 5 lines · Mark Lord
Quoted 4 lines · Nigel Cunningham

Hi everyone.

Suspend2, version 2.2.2 is now available from

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

http://stage.suspend2.net/downloads/all/suspend2-2.2.2-for-2.6.16.tar.bz
2

Wow! Is this ever freaking fast!
Try it folks. Once you do, you'll never go back to the slow way!

Please do try code at suspend.sf.net. It should be as fast and not needing big kernel patch.

Don't bother suggesting that to x86_64 owners: compilation is currently broken in vbetool/lrmi.c (at least).

Regards,

Nigel

#5 lore raw
Quoted 12 lines · Nigel Cunningham

Hi.

Quoted 9 lines · Pavel Machek
Quoted 8 lines · Mark Lord
Quoted 6 lines · Nigel Cunningham

Hi everyone.

Suspend2, version 2.2.2 is now available from

http://stage.suspend2.net/downloads/all/suspend2-2.2.2-for-2.6.16.tar.bz
2

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Wow! Is this ever freaking fast!
Try it folks. Once you do, you'll never go back to the slow way!

Please do try code at suspend.sf.net. It should be as fast and not needing big kernel patch.

Don't bother suggesting that to x86_64 owners: compilation is currently broken in vbetool/lrmi.c (at least).

It seems to work at least for some users. I do not have x86-64 machine easily available, so someone else will have to fix that one.

(Also it should be possible to compile suspend without s2ram support, avoiding the problem).
Pavel

Signature · 1 line
Picture of sleeping (Linux) penguin wanted...
#15 lore raw
In reply to Nigel Cunningham

Hi,

Quoted 10 lines · Nigel Cunningham
Quoted 9 lines · Pavel Machek
Quoted 8 lines · Mark Lord
Quoted 6 lines · Nigel Cunningham

Hi everyone.

Suspend2, version 2.2.2 is now available from

http://stage.suspend2.net/downloads/all/suspend2-2.2.2-for-2.6.16.tar.bz
2

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Wow! Is this ever freaking fast!
Try it folks. Once you do, you'll never go back to the slow way!

Please do try code at suspend.sf.net. It should be as fast and not needing big kernel patch.

Don't bother suggesting that to x86_64 owners: compilation is currently broken in vbetool/lrmi.c (at least).

You need to specify ARCH=x86_64 in the Makefile.

Unfortunately this has not been documented (yet).

Greetings,
Rafael

#6 lore raw
In reply to Pavel Machek
Quoted 11 lines · Pavel Machek
Quoted 7 lines · Nigel Cunningham

Hi.

Quoted 2 lines

Please do try code at suspend.sf.net. It should be as fast and not needing big kernel patch.

Don't bother suggesting that to x86_64 owners: compilation is currently broken in vbetool/lrmi.c (at least).

It seems to work at least for some users. I do not have x86-64 machine easily available, so someone else will have to fix that one.

It builds fine here on x86_64 with gcc 4.1.

Quoted 1 line

Pavel

Signature · 2 lines
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
#16 lore raw
In reply to Rafael J. Wysocki
Quoted 5 lines · Rafael J. Wysocki

Hi,

Quoted 2 lines · Nigel Cunningham

Don't bother suggesting that to x86_64 owners: compilation is currently broken in vbetool/lrmi.c (at least).

I get:

nigel@nigel_c_laptop:/usr/src/uswsusp/suspend$ make suspend
cc -Wall -O2 -c vbetool/lrmi.c -o vbetool/lrmi.o
vbetool/lrmi.c:83: error: field ‘vm’ has incomplete type
vbetool/lrmi.c: In function ‘get_int_seg’:
vbetool/lrmi.c:111: warning: cast to pointer from integer of different size
vbetool/lrmi.c: In function ‘get_int_off’:
vbetool/lrmi.c:118: warning: cast to pointer from integer of different size
vbetool/lrmi.c: In function ‘LRMI_init’:
vbetool/lrmi.c:147: warning: cast from pointer to integer of different size
vbetool/lrmi.c:155: warning: cast from pointer to integer of different size
vbetool/lrmi.c:156: warning: cast from pointer to integer of different size
vbetool/lrmi.c: In function ‘set_regs’:
vbetool/lrmi.c:191: error: ‘IF_MASK’ undeclared (first use in this function)
vbetool/lrmi.c:191: error: (Each undeclared identifier is reported only once
vbetool/lrmi.c:191: error: for each function it appears in.)
vbetool/lrmi.c:191: error: ‘IOPL_MASK’ undeclared (first use in this function)
vbetool/lrmi.c: In function ‘em_inbl’:
vbetool/lrmi.c:337: error: invalid lvalue in asm output 0
vbetool/lrmi.c: In function ‘em_inb’:
vbetool/lrmi.c:345: error: invalid lvalue in asm output 0
vbetool/lrmi.c: In function ‘em_inw’:
vbetool/lrmi.c:353: error: invalid lvalue in asm output 0
vbetool/lrmi.c: In function ‘em_inl’:
vbetool/lrmi.c:361: error: invalid lvalue in asm output 0
vbetool/lrmi.c: In function ‘run_vm86’:
vbetool/lrmi.c:594: warning: implicit declaration of function ‘VM86_TYPE’
vbetool/lrmi.c:594: error: ‘VM86_INTx’ undeclared (first use in this function)
vbetool/lrmi.c:595: warning: implicit declaration of function ‘VM86_ARG’
vbetool/lrmi.c:613: error: ‘VIF_MASK’ undeclared (first use in this function)
vbetool/lrmi.c:613: error: ‘TF_MASK’ undeclared (first use in this function)
vbetool/lrmi.c:618: error: ‘VM86_UNKNOWN’ undeclared (first use in this 
function)
vbetool/lrmi.c: In function ‘LRMI_int’:
vbetool/lrmi.c:840: error: ‘IF_MASK’ undeclared (first use in this function)
vbetool/lrmi.c:840: error: ‘IOPL_MASK’ undeclared (first use in this function)
make: *** [vbetool/lrmi.o] Error 1
nigel@nigel_c_laptop:/usr/src/uswsusp/suspend$ 

Regards,

Nigel

#7 lore raw
In reply to Pavel Machek
Quoted 22 lines · Pavel Machek
Quoted 12 lines · Nigel Cunningham

Hi.

Quoted 9 lines · Pavel Machek
Quoted 8 lines · Mark Lord
Quoted 6 lines · Nigel Cunningham

Hi everyone.

Suspend2, version 2.2.2 is now available from

http://stage.suspend2.net/downloads/all/suspend2-2.2.2-for-2.6.16.ta
r.bz 2

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Wow! Is this ever freaking fast!
Try it folks. Once you do, you'll never go back to the slow way!

Please do try code at suspend.sf.net. It should be as fast and not needing big kernel patch.

Don't bother suggesting that to x86_64 owners: compilation is currently broken in vbetool/lrmi.c (at least).

Quoted 6 lines

It seems to work at least for some users. I do not have x86-64 machine easily available, so someone else will have to fix that one.

(Also it should be possible to compile suspend without s2ram support, avoiding the problem).
Pavel

I just found the line saying pciutils-devel is needed. Maybe that will make the difference.

Regards,

Nigel

#8 lore raw

Hi!

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

Please do try code at suspend.sf.net. It should be as fast and not needing big kernel patch.

Don't bother suggesting that to x86_64 owners: compilation is currently broken in vbetool/lrmi.c (at least).

Quoted 8 lines
Quoted 5 lines

It seems to work at least for some users. I do not have x86-64 machine easily available, so someone else will have to fix that one.

(Also it should be possible to compile suspend without s2ram support, avoiding the problem).

I just found the line saying pciutils-devel is needed. Maybe that will make the difference.

I do not see missing includes, so I'm not sure it will help. Can you try adding

ARCH=x86_64

to Makefile?
Pavel

Signature · 1 line
Picture of sleeping (Linux) penguin wanted...
#9 lore raw
In reply to Pavel Machek

Hi.

Quoted 17 lines · Pavel Machek

Hi!

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

Please do try code at suspend.sf.net. It should be as fast and not needing big kernel patch.

Don't bother suggesting that to x86_64 owners: compilation is currently broken in vbetool/lrmi.c (at least).

Quoted 8 lines
Quoted 5 lines

It seems to work at least for some users. I do not have x86-64 machine easily available, so someone else will have to fix that one.

(Also it should be possible to compile suspend without s2ram support, avoiding the problem).

I just found the line saying pciutils-devel is needed. Maybe that will make the difference.

Quoted 6 lines

I do not see missing includes, so I'm not sure it will help. Can you try adding

ARCH=x86_64

to Makefile?

Heh. It worked. Maybe you should have something to figure out what arch the user is using :) It seems a bit strange to tell the compiler that I'm using the arch it ought to know I'm using.

Regards,

Nigel

#10 lore raw

Hi!

Quoted 10 lines
Quoted 6 lines

I do not see missing includes, so I'm not sure it will help. Can you try adding

ARCH=x86_64

to Makefile?

Heh. It worked. Maybe you should have something to figure out what arch the user is using :) It seems a bit strange to tell the compiler that I'm using the arch it ought to know I'm using.

Good. Does

ARCH=uname -m

work, too? If so, I'll commit it... when sf.net gets up.
Pavel

Signature · 1 line
Picture of sleeping (Linux) penguin wanted...
#18 lore raw
In reply to Nigel Cunningham

Hi,

Quoted 8 lines · Nigel Cunningham
Quoted 5 lines · Rafael J. Wysocki

Hi,

Quoted 2 lines · Nigel Cunningham

Don't bother suggesting that to x86_64 owners: compilation is currently broken in vbetool/lrmi.c (at least).

I get:

Please try the Makefile that I use on x86_64 (attached).

Greetings,
Rafael

CONFIG_COMPRESS=yes
CONFIG_ENCRYPT=yes
ARCH=x86_64

CC_FLAGS=-I/usr/local/include
LD_FLAGS=-L/usr/local/lib

ifdef CONFIG_COMPRESS
CC_FLAGS += -DCONFIG_COMPRESS
LD_FLAGS += -llzf
endif
ifdef CONFIG_ENCRYPT
CC_FLAGS += -DCONFIG_ENCRYPT
LD_FLAGS += -lcrypto
endif

SUSPEND_DIR=/usr/local/sbin
CONFIG_DIR=/etc
RESUME_DEVICE=<path_to_resume_device_file>
BOOT_DIR=/boot

ifdef CONFIG_ENCRYPT
all: suspend suspend-keygen resume s2ram
else
all: suspend resume s2ram
endif

S2RAMOBJ=vt.o vbetool/lrmi.o vbetool/x86-common.o vbetool/vbetool.o radeontool.o dmidecode.o

ifeq ($(ARCH), x86_64)
S2RAMOBJ=vt.o vbetool/thunk.o vbetool/x86-common.o vbetool/vbetool.o vbetool/x86emu/libx86emu.a radeontool.o dmidecode.o endif

clean:
rm -f suspend suspend-keygen suspend.keys resume s2ram *.o vbetool/*.o vbetool/x86emu/*.o vbetool/x86emu/*.a

s2ram: s2ram.c dmidecode.c whitelist.c radeontool.c $(S2RAMOBJ)

	$(CC) -g -Wall -O2 s2ram.c $(S2RAMOBJ) -lpci -o s2ram

vbetool/vbetool.o: vbetool/vbetool.c

	$(CC) -Wall -O2 -DS2RAM -c vbetool/vbetool.c -o vbetool/vbetool.o

vbetool/lrmi.o: vbetool/lrmi.c

	$(CC) -Wall -O2 -c vbetool/lrmi.c -o vbetool/lrmi.o

vbetool/x86-common.o: vbetool/x86-common.c

	$(CC) -Wall -O2 -c vbetool/x86-common.c -o vbetool/x86-common.o

vbetool/x86emu/libx86emu.a:
make -C vbetool/x86emu -f makefile.linux

vbetool/thunk.o: vbetool/thunk.c

	$(CC) -Wall -O2 -c vbetool/thunk.c -o vbetool/thunk.o

dmidecode.o: dmidecode.c

	$(CC) -Wall -O2 -DS2RAM -c dmidecode.c -o dmidecode.o

radeontool.o: radeontool.c

	$(CC) -Wall -O2 -DS2RAM -c radeontool.c -o radeontool.o

md5.o: md5.c md5.h

	$(CC) -Wall -o md5.o -DHAVE_INTTYPES_H -DHAVE_STDINT_H -c md5.c

encrypt.o: encrypt.c encrypt.h md5.h

	$(CC) -Wall -DHAVE_INTTYPES_H -DHAVE_STDINT_H $(CC_FLAGS) -c encrypt.c

config.o: config.c config.h

	$(CC) -Wall $(CC_FLAGS) -c config.c

vt.o: vt.c vt.h

	$(CC) -Wall -c vt.c

suspend: md5.o encrypt.o config.o suspend.c swsusp.h config.h encrypt.h md5.h s2ram.c dmidecode.c whitelist.c radeontool.c $(S2RAMOBJ)

	$(CC) -g -O2 -DCONFIG_BOTH -Wall $(CC_FLAGS) md5.o encrypt.o config.o suspend.c s2ram.c -o suspend $(S2RAMOBJ) $(LD_FLAGS) -lpci

resume: md5.o encrypt.o config.o resume.c swsusp.h config.h encrypt.h md5.h

	$(CC) -Wall $(CC_FLAGS) md5.o encrypt.o config.o resume.c -static -o resume $(LD_FLAGS)

ifdef CONFIG_ENCRYPT
suspend-keygen: md5.o encrypt.o keygen.c encrypt.h md5.h

	$(CC) -Wall -DHAVE_INTTYPES_H -DHAVE_STDINT_H -DCONFIG_ENCRYPT md5.o keygen.c -o suspend-keygen -lcrypto

install-suspend: suspend suspend-keygen conf/suspend.conf

	if [ ! -c /dev/snapshot ]; then mknod /dev/snapshot c 10 231; fi
	install --mode=755 suspend-keygen $(SUSPEND_DIR)
	install --mode=755 suspend $(SUSPEND_DIR)
	install --mode=644 conf/suspend.conf $(CONFIG_DIR)
else
install-suspend:	suspend conf/suspend.conf
	if [ ! -c /dev/snapshot ]; then mknod /dev/snapshot c 10 231; fi
	install --mode=755 suspend $(SUSPEND_DIR)
	install --mode=644 conf/suspend.conf $(CONFIG_DIR)

endif

install-resume-initrd: resume conf/suspend.conf

	BOOT_DIR=$(BOOT_DIR) ./scripts/create-resume-initrd.sh $(RESUME_DEVICE)

install-resume: resume
./scripts/install-resume.sh

#11 lore raw
In reply to Pavel Machek

Hi,

Quoted 11 lines · Pavel Machek
Quoted 10 lines
Quoted 6 lines

I do not see missing includes, so I'm not sure it will help. Can you try adding

ARCH=x86_64

to Makefile?

Heh. It worked. Maybe you should have something to figure out what arch the user is using :) It seems a bit strange to tell the compiler that I'm using the arch it ought to know I'm using.

Quoted 5 lines

Good. Does

ARCH=uname -m

work, too?

No, it doesn't.

Rafael

#12 lore raw
Quoted 12 lines · Rafael J. Wysocki
Quoted 11 lines · Pavel Machek
Quoted 10 lines
Quoted 6 lines

I do not see missing includes, so I'm not sure it will help. Can you try adding

ARCH=x86_64

to Makefile?

Heh. It worked. Maybe you should have something to figure out what arch the user is using :) It seems a bit strange to tell the compiler that I'm using the arch it ought to know I'm using.

Quoted 7 lines
Quoted 5 lines

Good. Does

ARCH=uname -m

work, too?

No, it doesn't.

Something like this works, though:

ARCH:=$(shell uname -m)

Rafael

#13 lore raw
Quoted 17 lines · Rafael J. Wysocki
Quoted 16 lines · Rafael J. Wysocki
Quoted 15 lines · Pavel Machek
Quoted 10 lines
Quoted 6 lines

I do not see missing includes, so I'm not sure it will help. Can you try adding

ARCH=x86_64

to Makefile?

Heh. It worked. Maybe you should have something to figure out what arch the user is using :) It seems a bit strange to tell the compiler that I'm using the arch it ought to know I'm using.

Good. Does

ARCH=uname -m

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

work, too?

No, it doesn't.

Something like this works, though:

ARCH:=$(shell uname -m)

looks good, can you commit it (when sf works again :-).
Pavel

Signature · 1 line
Picture of sleeping (Linux) penguin wanted...
#14 lore raw
Quoted 20 lines · Pavel Machek
Quoted 19 lines · Rafael J. Wysocki
Quoted 18 lines · Rafael J. Wysocki
Quoted 16 lines · Pavel Machek
Quoted 10 lines
Quoted 6 lines

I do not see missing includes, so I'm not sure it will help. Can you try adding

ARCH=x86_64

to Makefile?

Heh. It worked. Maybe you should have something to figure out what arch the user is using :) It seems a bit strange to tell the compiler that I'm using the arch it ought to know I'm using.

Good. Does

ARCH=uname -m

work, too?

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

No, it doesn't.

Something like this works, though:

ARCH:=$(shell uname -m)

looks good, can you commit it (when sf works again :-).

Yup, I will.

Rafael

#19 lore raw
In reply to Rafael J. Wysocki

Hi.

Quoted 6 lines · Rafael J. Wysocki

Hi,

Quoted 3 lines · Nigel Cunningham
Quoted 2 lines · Rafael J. Wysocki

Hi,

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines · Nigel Cunningham
Quoted 2 lines

Don't bother suggesting that to x86_64 owners: compilation is currently broken in vbetool/lrmi.c (at least).

I get:

Please try the Makefile that I use on x86_64 (attached).

Am I right in guessing that I don't need to anymore, given the other emails on this thread?

Regards,

Nigel

#20 lore raw
Quoted 7 lines · Nigel Cunningham
Quoted 6 lines · Rafael J. Wysocki
Quoted 5 lines · Nigel Cunningham
Quoted 3 lines · Rafael J. Wysocki
Quoted 2 lines · Nigel Cunningham

Don't bother suggesting that to x86_64 owners: compilation is currently broken in vbetool/lrmi.c (at least).

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

I get:

Please try the Makefile that I use on x86_64 (attached).

Am I right in guessing that I don't need to anymore, given the other emails on this thread?

Yes, you are. :-)

Greetings,
Rafael