pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/emulators/qemu



Module Name:    pkgsrc
Committed By:   skrll
Date:           Mon Nov  5 07:27:59 UTC 2018

Modified Files:
        pkgsrc/emulators/qemu: Makefile distinfo
Added Files:
        pkgsrc/emulators/qemu/patches: patch-hw_arm_boot.c
            patch-hw_core_loader.c patch-hw_core_uboot__image.h

Log Message:
Support the uboot kernel_noload image type as used by NetBSD/evbarm
GENERIC kernel.

Bump PKGREVISION


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 pkgsrc/emulators/qemu/Makefile
cvs rdiff -u -r1.137 -r1.138 pkgsrc/emulators/qemu/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/qemu/patches/patch-hw_arm_boot.c \
    pkgsrc/emulators/qemu/patches/patch-hw_core_loader.c \
    pkgsrc/emulators/qemu/patches/patch-hw_core_uboot__image.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/emulators/qemu/Makefile
diff -u pkgsrc/emulators/qemu/Makefile:1.191 pkgsrc/emulators/qemu/Makefile:1.192
--- pkgsrc/emulators/qemu/Makefile:1.191        Wed Aug 22 09:45:05 2018
+++ pkgsrc/emulators/qemu/Makefile      Mon Nov  5 07:27:59 2018
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.191 2018/08/22 09:45:05 wiz Exp $
+# $NetBSD: Makefile,v 1.192 2018/11/05 07:27:59 skrll Exp $
 
 DISTNAME=      qemu-3.0.0
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    emulators
 MASTER_SITES=  https://download.qemu.org/
 EXTRACT_SUFX=  .tar.xz

Index: pkgsrc/emulators/qemu/distinfo
diff -u pkgsrc/emulators/qemu/distinfo:1.137 pkgsrc/emulators/qemu/distinfo:1.138
--- pkgsrc/emulators/qemu/distinfo:1.137        Thu Aug 16 10:15:09 2018
+++ pkgsrc/emulators/qemu/distinfo      Mon Nov  5 07:27:59 2018
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.137 2018/08/16 10:15:09 adam Exp $
+$NetBSD: distinfo,v 1.138 2018/11/05 07:27:59 skrll Exp $
 
 SHA1 (qemu-3.0.0.tar.xz) = fffb4aa0139c7290295a129e040cec0df4468ea6
 RMD160 (qemu-3.0.0.tar.xz) = ea61cb8b6b144c7017c3a53161f883c3aeb15611
@@ -9,6 +9,9 @@ SHA1 (patch-audio_audio.c) = 98a1de2fd48
 SHA1 (patch-block.c) = 5eb15a87d6646719bf1e9277fbe73a99e4905481
 SHA1 (patch-contrib_ivshmem-client_ivshmem-client.c) = 40c8751607cbf66a37e4c4e08f2664b864e2e984
 SHA1 (patch-contrib_ivshmem-server_ivshmem-server.c) = d8f53432b5752f4263dc4ef96108a976a05147a3
+SHA1 (patch-hw_arm_boot.c) = bd28e4b8e8732a2b01ba1d0e8a727e8e7bc5227a
+SHA1 (patch-hw_core_loader.c) = 06ff8bfa5be720e428668987598d55b6799202e7
+SHA1 (patch-hw_core_uboot__image.h) = 26a656310d991747b7080b9f28042afd536e4c28
 SHA1 (patch-hw_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420
 SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc
 SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7

Added files:

Index: pkgsrc/emulators/qemu/patches/patch-hw_arm_boot.c
diff -u /dev/null pkgsrc/emulators/qemu/patches/patch-hw_arm_boot.c:1.1
--- /dev/null   Mon Nov  5 07:27:59 2018
+++ pkgsrc/emulators/qemu/patches/patch-hw_arm_boot.c   Mon Nov  5 07:27:59 2018
@@ -0,0 +1,26 @@
+$NetBSD: patch-hw_arm_boot.c,v 1.1 2018/11/05 07:27:59 skrll Exp $
+
+--- hw/arm/boot.c.orig 2018-11-04 17:27:47.000000000 +0000
++++ hw/arm/boot.c
+@@ -29,8 +29,9 @@
+  * Documentation/arm/Booting and Documentation/arm64/booting.txt
+  * They have different preferred image load offsets from system RAM base.
+  */
+-#define KERNEL_ARGS_ADDR 0x100
+-#define KERNEL_LOAD_ADDR 0x00010000
++#define KERNEL_ARGS_ADDR   0x100
++#define KERNEL_NOLOAD_ADDR 0x00000000
++#define KERNEL_LOAD_ADDR   0x00010000
+ #define KERNEL64_LOAD_ADDR 0x00080000
+ 
+ #define ARM64_TEXT_OFFSET_OFFSET    8
+@@ -1049,7 +1050,8 @@ void arm_load_kernel(ARMCPU *cpu, struct
+     }
+     entry = elf_entry;
+     if (kernel_size < 0) {
+-        kernel_size = load_uimage_as(info->kernel_filename, &entry, NULL,
++        uint64_t loadaddr = info->loader_start + KERNEL_NOLOAD_ADDR;
++        kernel_size = load_uimage_as(info->kernel_filename, &entry, &loadaddr,
+                                      &is_linux, NULL, NULL, as);
+     }
+     if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64) && kernel_size < 0) {
Index: pkgsrc/emulators/qemu/patches/patch-hw_core_loader.c
diff -u /dev/null pkgsrc/emulators/qemu/patches/patch-hw_core_loader.c:1.1
--- /dev/null   Mon Nov  5 07:27:59 2018
+++ pkgsrc/emulators/qemu/patches/patch-hw_core_loader.c        Mon Nov  5 07:27:59 2018
@@ -0,0 +1,27 @@
+$NetBSD: patch-hw_core_loader.c,v 1.1 2018/11/05 07:27:59 skrll Exp $
+
+--- hw/core/loader.c.orig      2018-08-14 19:10:34.000000000 +0000
++++ hw/core/loader.c
+@@ -637,13 +637,19 @@ static int load_uboot_image(const char *
+         goto out;
+ 
+     if (hdr->ih_type != image_type) {
+-        fprintf(stderr, "Wrong image type %d, expected %d\n", hdr->ih_type,
+-                image_type);
+-        goto out;
++        if (image_type != IH_TYPE_KERNEL && hdr->ih_type != IH_TYPE_KERNEL_NOLOAD) {
++            fprintf(stderr, "Wrong image type %d, expected %d\n", hdr->ih_type,
++                    image_type);
++            goto out;
++        }
+     }
+ 
+     /* TODO: Implement other image types.  */
+     switch (hdr->ih_type) {
++    case IH_TYPE_KERNEL_NOLOAD:
++        hdr->ih_load = *loadaddr + sizeof(*hdr);
++        hdr->ih_ep += hdr->ih_load;
++
+     case IH_TYPE_KERNEL:
+         address = hdr->ih_load;
+         if (translate_fn) {
Index: pkgsrc/emulators/qemu/patches/patch-hw_core_uboot__image.h
diff -u /dev/null pkgsrc/emulators/qemu/patches/patch-hw_core_uboot__image.h:1.1
--- /dev/null   Mon Nov  5 07:27:59 2018
+++ pkgsrc/emulators/qemu/patches/patch-hw_core_uboot__image.h  Mon Nov  5 07:27:59 2018
@@ -0,0 +1,20 @@
+$NetBSD: patch-hw_core_uboot__image.h,v 1.1 2018/11/05 07:27:59 skrll Exp $
+
+--- hw/core/uboot_image.h.orig 2018-08-14 19:10:34.000000000 +0000
++++ hw/core/uboot_image.h
+@@ -75,6 +75,7 @@
+ #define IH_CPU_NIOS2          15      /* Nios-II      */
+ #define IH_CPU_BLACKFIN               16      /* Blackfin     */
+ #define IH_CPU_AVR32          17      /* AVR32        */
++#define IH_CPU_ARM64          22      /* ARM64        */
+ 
+ /*
+  * Image Types
+@@ -124,6 +125,7 @@
+ #define IH_TYPE_SCRIPT                6       /* Script file                  */
+ #define IH_TYPE_FILESYSTEM    7       /* Filesystem Image (any type)  */
+ #define IH_TYPE_FLATDT                8       /* Binary Flat Device Tree Blob */
++#define IH_TYPE_KERNEL_NOLOAD  14     /* OS Kernel Image (noload)     */
+ 
+ /*
+  * Compression Types



Home | Main Index | Thread Index | Old Index