RE: Grub fast resume
Matthew: I have do some research on getting the symbol offset from save snap-shot image through KALLSYMS_ALL. I can not fid a way to get the symbol offset, because, in order to get the resume needed symbols offset, we must know the some other symbols offset, such as kallsyms_addresses and kallsyms_names. So we have to come back to our original discussion. In order to make our discussion more clearly and efficient, I want to clarify our opinions. 1. (Your)Matthew's suggestion to remove the fast-symbol file I(martin) agree with Matthew's suggestion. 2. Matthew's suggestion to get symbol offset from system.map file Martin agree with the suggestion 3. How to sync the system.map with the S4 image snap-shot (How to select the proper system.map for S4 image-shot) 1) martin's suggestion on it. Suggestion 1> if we can assume that the system.map has persistent naming style, Get kernel version from snap-shot and use it to choose the proper system.map file Suggestion 2> If we can not make the assumption to system.map, We can try all the available system.map, and find suitable one, if can not find, just normal boot Suggestion 3>Just show all the available system.map file to user and let user to select one. 2) Matthew's suggestion Let user designate a kernel image and get the kernel version from the image, and select on system.map file. Martin's comments on Matthew's suggestion: 1, still can not understand your suggestion clearly. 2. do not think it is right to get kernel version from kernel image. Mathhew: Could you please think about my suggestions, and give me more clear information on your suggestion? Thanks. -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile
Re: Grub fast resume
On Wed, Mar 05, 2008 at 10:56:02AM +0800, Xu, Martin wrote: > If we can not make sure that there is not a consistent on-disk naming > format. We must designate the system.map file. So in order to support > the multi-boot system, user must select which system.map will be used > each time before system begins to resume. > In fact, we have already make assumption that the system.map file must > be there. If we take general case into account, it is also possible that > the file may do not exist on some system especially some embedded > system. Above all, the file is not necessary for system booting. That's fine. We can do that when update-grub is run. -- Matthew Garrett | [EMAIL PROTECTED] -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile
RE: Grub fast resume
>That's not entirely ideal, since it assumes a consistent on-disk naming >format. That works fine for us, but wouldn't work so well in the general >case. It'd be nice not to make these assumptions, especially since the >version numbers are contained within the kernel header. I think we should get the release and version number from snap-shot image but the kernel image. If we can not make sure that there is not a consistent on-disk naming format. We must designate the system.map file. So in order to support the multi-boot system, user must select which system.map will be used each time before system begins to resume. In fact, we have already make assumption that the system.map file must be there. If we take general case into account, it is also possible that the file may do not exist on some system especially some embedded system. Above all, the file is not necessary for system booting. -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile
Re: Grub fast resume
On Tue, Mar 04, 2008 at 01:40:42PM +0800, Xu, Martin wrote: > Matthew: > I find two issues at your update. > 1. SUPPORT_MOBILE is not defined so the fast-resume related command can not > be compliled. It'll only be defined for lpia builds by default. Pass --enable-mobile to configure to define it for other builds. > 2. The symbol_version and symbol_release can not be gotten from function > grub_kernel_version() in stage2/builtins.c, So fast-resume can not work. I > used the moblin kernel vmlinuZ-2.6.24-4-menlow-default Hm. Can you work out why this doesn't work? The header format for the kernel is supposed to be fixed. > I can accept your thoughts to use sysem.map instead of fast-resume-symbol. > However I think we should implement it through below way: > 1. get the version and release number from image snap-shot. See > reswsusp_info() at stage2/builtins.c > 2. use the version and release number to decide which system.map file will be > used > 3. open the right system.map to get all the symbols address That's not entirely ideal, since it assumes a consistent on-disk naming format. That works fine for us, but wouldn't work so well in the general case. It'd be nice not to make these assumptions, especially since the version numbers are contained within the kernel header. -- Matthew Garrett | [EMAIL PROTECTED] -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile
RE: Grub fast resume
Matthew: I find two issues at your update. 1. SUPPORT_MOBILE is not defined so the fast-resume related command can not be compliled. 2. The symbol_version and symbol_release can not be gotten from function grub_kernel_version() in stage2/builtins.c, So fast-resume can not work. I used the moblin kernel vmlinuZ-2.6.24-4-menlow-default I can accept your thoughts to use sysem.map instead of fast-resume-symbol. However I think we should implement it through below way: 1. get the version and release number from image snap-shot. See reswsusp_info() at stage2/builtins.c 2. use the version and release number to decide which system.map file will be used 3. open the right system.map to get all the symbols address So using above method we can only use below commands to implement fast-resume Resume_symbol (hd0,0) tell grub the location of the system.map file Resume_partition (hd0,2) Resume We need not to designate kernel and system map, and multi-kernel can be supported well. -Original Message- From: Matthew Garrett [mailto:[EMAIL PROTECTED] Sent: 2008年3月3日 19:06 To: Xu, Martin Cc: ubuntu-mobile@lists.ubuntu.com; [EMAIL PROTECTED] Subject: Re: Grub fast resume On Mon, Mar 03, 2008 at 07:03:18PM +0800, Xu, Martin wrote: > Garrett: > I like the optimization, and in fact it is my original design. > The reason I abandon the design later is that make fast-resume depends on > system.map file. If the file does not exist, or be damaged, fast-resume can > not work. The alternative is for it to depend on the symbols file, which could also be lost or damaged. Since the symbols file is generated from the system.map file, I don't think this is an issue. > I have tried it at my machine and find that it can not work; I will look into > it clearly tomorrow. Ok - if you could let me know how it fails, that would be great. Thanks, -- Matthew Garrett | [EMAIL PROTECTED] -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile
Re: [Moblin Dev] RE: Grub fast resume
On Tue, Mar 04, 2008 at 09:34:46AM +0800, Li, Frank wrote: > When system reboot(resume), grub will don't know use > System.map-whatever1 or System.map-whatever. > If we use universal system.map created from suspend kernel, the > situation will become simple. grub needs to know which kernel we're resuming in any case. If it knows that, it's trivial to ensure that it also reads the correct System.map file. -- Matthew Garrett | [EMAIL PROTECTED] -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile
RE: [Moblin Dev] RE: Grub fast resume
Matthew: We need consider multi-kernel entry case. root (hd0,0) kernel /boot/vmlinuz-whatever1 resume_partition (hd0,2) resume_symbols /boot/System.map-whatever1 resume root (hd0,0) kernel /boot/vmlinuz-whatever2 resume_partition (hd0,2) resume_symbols /boot/System.map-whatever2 resume When system reboot(resume), grub will don't know use System.map-whatever1 or System.map-whatever. If we use universal system.map created from suspend kernel, the situation will become simple. Best regards Frank Li -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Xu, Martin Sent: Monday, March 03, 2008 7:03 PM To: Matthew Garrett; ubuntu-mobile@lists.ubuntu.com; [EMAIL PROTECTED] Subject: [Moblin Dev] RE: Grub fast resume Garrett: I like the optimization, and in fact it is my original design. The reason I abandon the design later is that make fast-resume depends on system.map file. If the file does not exist, or be damaged, fast-resume can not work. I have tried it at my machine and find that it can not work; I will look into it clearly tomorrow. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Garrett Sent: 2008年3月2日 23:00 To: ubuntu-mobile@lists.ubuntu.com; [EMAIL PROTECTED] Subject: Grub fast resume Hi there, I've made a few changes to the grub fast resume patch and would appreciate some testing. The first major change is to remove the need for the symbols file - instead, the kernel version is obtained directly from the kernel header and the symbols are read from System.map. This means we don't need the app for generating the symbols file. Secondly, I've removed the dependency on a splash file - if one isn't specified, then it won't attempt to open a default. The order for resuming is now: root (hd0,0) kernel /boot/vmlinuz-whatever resume_partition (hd0,2) resume_symbols /boot/System.map-whatever resume The source is at http://www.codon.org.uk/~mjg59/tmp/grub/ - if someone could test this and make sure it works for them, I'll get it uploaded. Note that the fast resume code is only enabled on lpia builds in order to avoid risking fragility on x86. -- Matthew Garrett | [EMAIL PROTECTED] -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile ___ dev mailing list [EMAIL PROTECTED] https://www.moblin.org/mailman/listinfo/dev -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile
Re: Grub fast resume
On Mon, Mar 03, 2008 at 07:03:18PM +0800, Xu, Martin wrote: > Garrett: > I like the optimization, and in fact it is my original design. > The reason I abandon the design later is that make fast-resume depends on > system.map file. If the file does not exist, or be damaged, fast-resume can > not work. The alternative is for it to depend on the symbols file, which could also be lost or damaged. Since the symbols file is generated from the system.map file, I don't think this is an issue. > I have tried it at my machine and find that it can not work; I will look into > it clearly tomorrow. Ok - if you could let me know how it fails, that would be great. Thanks, -- Matthew Garrett | [EMAIL PROTECTED] -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile
RE: Grub fast resume
Garrett: I like the optimization, and in fact it is my original design. The reason I abandon the design later is that make fast-resume depends on system.map file. If the file does not exist, or be damaged, fast-resume can not work. I have tried it at my machine and find that it can not work; I will look into it clearly tomorrow. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Garrett Sent: 2008年3月2日 23:00 To: ubuntu-mobile@lists.ubuntu.com; [EMAIL PROTECTED] Subject: Grub fast resume Hi there, I've made a few changes to the grub fast resume patch and would appreciate some testing. The first major change is to remove the need for the symbols file - instead, the kernel version is obtained directly from the kernel header and the symbols are read from System.map. This means we don't need the app for generating the symbols file. Secondly, I've removed the dependency on a splash file - if one isn't specified, then it won't attempt to open a default. The order for resuming is now: root (hd0,0) kernel /boot/vmlinuz-whatever resume_partition (hd0,2) resume_symbols /boot/System.map-whatever resume The source is at http://www.codon.org.uk/~mjg59/tmp/grub/ - if someone could test this and make sure it works for them, I'll get it uploaded. Note that the fast resume code is only enabled on lpia builds in order to avoid risking fragility on x86. -- Matthew Garrett | [EMAIL PROTECTED] -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile
Grub fast resume
Hi there, I've made a few changes to the grub fast resume patch and would appreciate some testing. The first major change is to remove the need for the symbols file - instead, the kernel version is obtained directly from the kernel header and the symbols are read from System.map. This means we don't need the app for generating the symbols file. Secondly, I've removed the dependency on a splash file - if one isn't specified, then it won't attempt to open a default. The order for resuming is now: root (hd0,0) kernel /boot/vmlinuz-whatever resume_partition (hd0,2) resume_symbols /boot/System.map-whatever resume The source is at http://www.codon.org.uk/~mjg59/tmp/grub/ - if someone could test this and make sure it works for them, I'll get it uploaded. Note that the fast resume code is only enabled on lpia builds in order to avoid risking fragility on x86. -- Matthew Garrett | [EMAIL PROTECTED] -- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile