commit aranym for openSUSE:Factory
Hello community, here is the log from the commit of package aranym for openSUSE:Factory checked in at 2014-04-02 17:19:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/aranym (Old) and /work/SRC/openSUSE:Factory/.aranym.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "aranym" Changes: -------- --- /work/SRC/openSUSE:Factory/aranym/aranym.changes 2014-01-07 14:32:59.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.aranym.new/aranym.changes 2014-04-02 17:19:18.000000000 +0200 @@ -1,0 +2,5 @@ +Sun Mar 30 19:27:48 UTC 2014 - schwab@linux-m68k.org + +- lilo-load-to-fastram.patch: implement [LILO] LoadToFastRAM + +------------------------------------------------------------------- New: ---- lilo-load-to-fastram.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aranym.spec ++++++ --- /var/tmp/diff_new_pack.zhXAaM/_old 2014-04-02 17:19:19.000000000 +0200 +++ /var/tmp/diff_new_pack.zhXAaM/_new 2014-04-02 17:19:19.000000000 +0200 @@ -41,6 +41,7 @@ Patch3: fpu-fbccl.patch Patch4: no-map-32bit.patch Patch5: fpu-nan-bits.patch +Patch6: lilo-load-to-fastram.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -78,6 +79,7 @@ %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # Don't remove -g from CFLAGS sed -i -e 's,/-g,/-:,' configure.ac configure ++++++ lilo-load-to-fastram.patch ++++++ Index: aranym-0.9.15/src/bootos_linux.cpp =================================================================== --- aranym-0.9.15.orig/src/bootos_linux.cpp +++ aranym-0.9.15/src/bootos_linux.cpp @@ -409,9 +409,10 @@ int LinuxBootOs::checkKernel(void) Elf32_Ehdr *kexec_elf; /* header of kernel executable */ Elf32_Phdr *kernel_phdrs; unsigned long min_addr=0xffffffff, max_addr=0; - unsigned long kernel_size, mem_ptr; + unsigned long kernel_size, mem_ptr, kernel_offset; int i; const char *kname, *kernel_name="vmlinux"; + bool load_to_fastram = bx_options.lilo.load_to_fastram && FastRAMSize > 0; kexec_elf = (Elf32_Ehdr *) kernel; if (memcmp( &kexec_elf->e_ident[EI_MAG0], ELFMAG, SELFMAG ) == 0) { @@ -475,6 +476,10 @@ int LinuxBootOs::checkKernel(void) kernel_size = max_addr - min_addr; D(bug("lilo: kernel_size=%lu",kernel_size)); + if (load_to_fastram) + kernel_offset = FastRAMBase; + else + kernel_offset = 0; mem_ptr = KERNEL_START; for (i=0; i<SDL_SwapBE16(kexec_elf->e_phnum); i++) { unsigned long segment_length; @@ -490,21 +495,29 @@ int LinuxBootOs::checkKernel(void) } segment_ptr = SDL_SwapBE32(kernel_phdrs[i].p_vaddr)-PAGE_SIZE; - memcpy(((char *)RAMBaseHost) + mem_ptr + segment_ptr, ((char *) kexec_elf) + segment_offset, segment_length); + if (load_to_fastram) + memcpy(FastRAMBaseHost + mem_ptr + segment_ptr, (char *) kexec_elf + segment_offset, segment_length); + else + memcpy(RAMBaseHost + mem_ptr + segment_ptr, (char *) kexec_elf + segment_offset, segment_length); - D(bug("lilo: Copied segment %d: 0x%08x,0x%08x at 0x%08x",i,segment_offset,segment_length,mem_ptr+segment_ptr)); + D(bug("lilo: Copied segment %d: 0x%08x,0x%08x at 0x%08x",i,segment_offset,segment_length,kernel_offset+mem_ptr+segment_ptr)); } /*--- Copy the ramdisk after kernel (and reserved bootinfo) ---*/ if (ramdisk && ramdisk_length) { unsigned long rd_start; unsigned long rd_len; + unsigned long rd_offset; + if (load_to_fastram) + rd_offset = KERNEL_START + kernel_size + MAX_BI_SIZE; + else + rd_offset = 0; rd_len = ramdisk_length - RAMDISK_FS_START; - if (FastRAMSize>rd_len) { + if (FastRAMSize > rd_offset + rd_len) { /* Load in FastRAM */ - rd_start = FastRAMBase; - memcpy(FastRAMBaseHost, ((unsigned char *)ramdisk) + RAMDISK_FS_START, rd_len); + rd_start = FastRAMBase + rd_offset; + memcpy(FastRAMBaseHost + rd_offset, (unsigned char *)ramdisk + RAMDISK_FS_START, rd_len); } else { /* Load in ST-RAM */ rd_start = RAMSize - rd_len; @@ -519,7 +532,7 @@ int LinuxBootOs::checkKernel(void) for (i=0; i<16; i++) { uint32 *tmp; - tmp = (uint32 *)(((unsigned char *)FastRAMBaseHost) /*+ rd_start*/ + 512); + tmp = (uint32 *)((unsigned char *)FastRAMBaseHost + rd_offset + 512); D(bug("lilo: ramdisk[%d]=0x%08x",i, SDL_SwapBE32(tmp[i]))); } #endif @@ -557,10 +570,14 @@ int LinuxBootOs::checkKernel(void) bi.mch_type = SDL_SwapBE32(ATARI_MACH_AB40); bi.num_memory=0; - ADD_CHUNK(0, RAMSize); + /* If loading to FastRAM switch the order of ST and Fast RAM */ + if (!load_to_fastram) + ADD_CHUNK(0, RAMSize); if (FastRAMSize>0) { ADD_CHUNK(FastRAMBase, FastRAMSize); } + if (load_to_fastram) + ADD_CHUNK(0, RAMSize); bi.num_memory=SDL_SwapBE32(bi.num_memory); if (!create_bootinfo()) { @@ -569,24 +586,30 @@ int LinuxBootOs::checkKernel(void) } /*--- Copy boot info in RAM ---*/ - memcpy(RAMBaseHost + KERNEL_START + kernel_size, &bi_union.record, bi_size); - D(bug("lilo: bootinfo at 0x%08x",KERNEL_START + kernel_size)); + if (load_to_fastram) + memcpy(FastRAMBaseHost + KERNEL_START + kernel_size, &bi_union.record, bi_size); + else + memcpy(RAMBaseHost + KERNEL_START + kernel_size, &bi_union.record, bi_size); + D(bug("lilo: bootinfo at 0x%08x", kernel_offset + KERNEL_START + kernel_size)); for (i=0; i<16; i++) { uint32 *tmp; - tmp = (uint32 *)(((unsigned char *)RAMBaseHost) + KERNEL_START + kernel_size); + if (load_to_fastram) + tmp = (uint32 *)((unsigned char *)FastRAMBaseHost + KERNEL_START + kernel_size); + else + tmp = (uint32 *)((unsigned char *)RAMBaseHost + KERNEL_START + kernel_size); D(bug("lilo: bi_union.record[%d]=0x%08x",i, SDL_SwapBE32(tmp[i]))); } /*--- Init SP & PC ---*/ uint32 *tmp = (uint32 *)RAMBaseHost; - tmp[0] = SDL_SwapBE32(KERNEL_START); /* SP */ + tmp[0] = SDL_SwapBE32(kernel_offset + KERNEL_START); /* SP */ tmp[1] = SDL_SwapBE32(0x00e00000); /* PC = ROMBase */ - ROMBaseHost[4] = KERNEL_START >> 24; - ROMBaseHost[5] = KERNEL_START >> 16; - ROMBaseHost[6] = KERNEL_START >> 8; - ROMBaseHost[7] = KERNEL_START & 0xff; + ROMBaseHost[4] = (kernel_offset + KERNEL_START) >> 24; + ROMBaseHost[5] = (kernel_offset + KERNEL_START) >> 16; + ROMBaseHost[6] = (kernel_offset + KERNEL_START) >> 8; + ROMBaseHost[7] = (kernel_offset + KERNEL_START) & 0xff; D(bug("lilo: ok")); Index: aranym-0.9.15/src/include/parameters.h =================================================================== --- aranym-0.9.15.orig/src/include/parameters.h +++ aranym-0.9.15/src/include/parameters.h @@ -155,6 +155,7 @@ typedef struct { char kernel[512]; /* /path/to/vmlinux[.gz] */ char args[512]; /* command line arguments for kernel */ char ramdisk[512]; /* /path/to/ramdisk[.gz] */ + bool load_to_fastram; /* load kernel to Fast RAM */ } bx_lilo_options_t; // Midi options Index: aranym-0.9.15/src/parameters.cpp =================================================================== --- aranym-0.9.15.orig/src/parameters.cpp +++ aranym-0.9.15/src/parameters.cpp @@ -595,6 +595,7 @@ struct Config_Tag lilo_conf[]={ { "Kernel", Path_Tag, &LILO(kernel), sizeof(LILO(kernel)), 0}, { "Args", String_Tag, &LILO(args), sizeof(LILO(args)), 0}, { "Ramdisk", Path_Tag, &LILO(ramdisk), sizeof(LILO(ramdisk)), 0}, + { "LoadToFastRam", Bool_Tag, &LILO(load_to_fastram), 0, 0}, { NULL , Error_Tag, NULL, 0, 0 } }; @@ -603,6 +604,7 @@ void preset_lilo() safe_strncpy(LILO(kernel), "linux.bin", sizeof(LILO(kernel))); safe_strncpy(LILO(args), "root=/dev/ram video=atafb:vga16", sizeof(LILO(args))); safe_strncpy(LILO(ramdisk), "root.bin", sizeof(LILO(ramdisk))); + LILO(load_to_fastram) = false; } void postload_lilo() -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de