mirror of
				https://git.proxmox.com/git/grub2
				synced 2025-10-31 08:43:24 +00:00 
			
		
		
		
	 1f5ab4280a
			
		
	
	
		1f5ab4280a
		
	
	
	
	
		
			
			* kern/i386/pc/lzo1x.S: New file. * util/i386/pc/pupa-mkimage.c: Include lzo1x.h. (compress_kernel): New variable. (generate_image): Heavily modified to support compressing a large part of the core image. * util/misc.c (pupa_util_read_image): Fix a file descriptor leak. (pupa_util_load_image): New function. * kern/i386/pc/startup.S: Include pupa/machine/kernel.h. (pupa_compressed_size): New variable. (codestart): Enable Gate A20 here. Decompress the compressed part of the core image. Rearrange the code to put functions and variables which are required for initialization in the non-compressed part. Include lzo1x.S. * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20 here. * include/pupa/util/misc.h (pupa_util_write_image): Declared. * include/pupa/i386/pc/kernel.h (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro. (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4. (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise. (PUPA_KERNEL_MACHINE_PREFIX): Likewise. (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro. * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable. * genmk.rb (Image#rule): Put LDFLAGS at the end of a line. (Utility#rule): Likewise. * configure.ac: Check if LZO is available.
		
			
				
	
	
		
			43 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  *  PUPA  --  Preliminary Universal Programming Architecture for GRUB
 | |
|  *  Copyright (C) 2002,2003  Yoshinori K. Okuji <okuji@enbug.org>
 | |
|  *
 | |
|  *  PUPA is free software; you can redistribute it and/or modify
 | |
|  *  it under the terms of the GNU General Public License as published by
 | |
|  *  the Free Software Foundation; either version 2 of the License, or
 | |
|  *  (at your option) any later version.
 | |
|  *
 | |
|  *  This program is distributed in the hope that it will be useful,
 | |
|  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 | |
|  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | |
|  *  GNU General Public License for more details.
 | |
|  *
 | |
|  *  You should have received a copy of the GNU General Public License
 | |
|  *  along with PUPA; if not, write to the Free Software
 | |
|  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 | |
|  */
 | |
| 
 | |
| #ifndef PUPA_UTIL_MISC_HEADER
 | |
| #define PUPA_UTIL_MISC_HEADER	1
 | |
| 
 | |
| #include <stdlib.h>
 | |
| #include <stdio.h>
 | |
| 
 | |
| extern char *progname;
 | |
| extern int verbosity;
 | |
| 
 | |
| void pupa_util_info (const char *fmt, ...);
 | |
| void pupa_util_error (const char *fmt, ...) __attribute__ ((noreturn));
 | |
| 
 | |
| void *xmalloc (size_t size);
 | |
| void *xrealloc (void *ptr, size_t size);
 | |
| char *xstrdup (const char *str);
 | |
| 
 | |
| char *pupa_util_get_path (const char *dir, const char *file);
 | |
| size_t pupa_util_get_image_size (const char *path);
 | |
| char *pupa_util_read_image (const char *path);
 | |
| void pupa_util_load_image (const char *path, char *buf);
 | |
| void pupa_util_write_image (const char *img, size_t size, FILE *out);
 | |
| 
 | |
| #endif /* ! PUPA_UTIL_MISC_HEADER */
 |