VirtualBox

Changeset 96416 in vbox for trunk/tools


Ignore:
Timestamp:
Aug 22, 2022 8:36:29 PM (2 years ago)
Author:
vboxsync
Message:

scm: more settings fixes, making it actually find the relevant files

Location:
trunk/tools
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/.scm-settings

    r96407 r96416  
    2828--filter-out-dirs /common/.
    2929--filter-out-dirs /freebsd.*/.
    30 --filter-out-dirs /linux.*/.
     30--filter-out-dirs /linux.amd64/.
    3131--filter-out-dirs /os2.*/.
    3232--filter-out-dirs /solaris.*/.
  • trunk/tools/darwin.amd64/.scm-settings

    r69491 r96416  
    55
    66#
    7 # Copyright (C) 2010-2017 Oracle Corporation
     7# Copyright (C) 2010-2022 Oracle and/or its affiliates.
    88#
    9 # This file is part of VirtualBox Open Source Edition (OSE), as
    10 # available from http://www.virtualbox.org. This file is free software;
    11 # you can redistribute it and/or modify it under the terms of the GNU
    12 # General Public License (GPL) as published by the Free Software
    13 # Foundation, in version 2 as it comes in the "COPYING" file of the
    14 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    15 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     9# This file is part of VirtualBox base platform packages, as
     10# available from https://www.virtualbox.org.
     11#
     12# This program is free software; you can redistribute it and/or
     13# modify it under the terms of the GNU General Public License
     14# as published by the Free Software Foundation, in version 3 of the
     15# License.
     16#
     17# This program is distributed in the hope that it will be useful, but
     18# WITHOUT ANY WARRANTY; without even the implied warranty of
     19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20# General Public License for more details.
     21#
     22# You should have received a copy of the GNU General Public License
     23# along with this program; if not, see <https://www.gnu.org/licenses>.
     24#
     25# SPDX-License-Identifier: GPL-3.0-only
    1626#
    1727
    18 --filter-files /bin/*.sh
     28--filter-files .scm-settings|*.sh
    1929
    2030--filter-out-dirs /qt/.
  • trunk/tools/darwin.amd64/bin/sdk-extractor.sh

    r85060 r96416  
    66
    77#
    8 # Copyright (C) 2014-2020 Oracle Corporation
    9 #
    10 # This file is part of VirtualBox Open Source Edition (OSE), as
    11 # available from http://www.virtualbox.org. This file is free software;
    12 # you can redistribute it and/or modify it under the terms of the GNU
    13 # General Public License (GPL) as published by the Free Software
    14 # Foundation, in version 2 as it comes in the "COPYING" file of the
    15 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    16 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     8# Copyright (C) 2014-2022 Oracle and/or its affiliates.
     9#
     10# This file is part of VirtualBox base platform packages, as
     11# available from https://www.virtualbox.org.
     12#
     13# This program is free software; you can redistribute it and/or
     14# modify it under the terms of the GNU General Public License
     15# as published by the Free Software Foundation, in version 3 of the
     16# License.
     17#
     18# This program is distributed in the hope that it will be useful, but
     19# WITHOUT ANY WARRANTY; without even the implied warranty of
     20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     21# General Public License for more details.
     22#
     23# You should have received a copy of the GNU General Public License
     24# along with this program; if not, see <https://www.gnu.org/licenses>.
     25#
     26# SPDX-License-Identifier: GPL-3.0-only
    1727#
    1828
  • trunk/tools/darwin.amd64/bin/xcode-6.2-extractor.sh

    r69210 r96416  
    1212
    1313#
    14 # Copyright (C) 2014-2016 Oracle Corporation
     14# Copyright (C) 2014-2022 Oracle and/or its affiliates.
    1515#
    16 # This file is part of VirtualBox Open Source Edition (OSE), as
    17 # available from http://www.virtualbox.org. This file is free software;
    18 # you can redistribute it and/or modify it under the terms of the GNU
    19 # General Public License (GPL) as published by the Free Software
    20 # Foundation, in version 2 as it comes in the "COPYING" file of the
    21 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    22 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     16# This file is part of VirtualBox base platform packages, as
     17# available from https://www.virtualbox.org.
     18#
     19# This program is free software; you can redistribute it and/or
     20# modify it under the terms of the GNU General Public License
     21# as published by the Free Software Foundation, in version 3 of the
     22# License.
     23#
     24# This program is distributed in the hope that it will be useful, but
     25# WITHOUT ANY WARRANTY; without even the implied warranty of
     26# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     27# General Public License for more details.
     28#
     29# You should have received a copy of the GNU General Public License
     30# along with this program; if not, see <https://www.gnu.org/licenses>.
     31#
     32# SPDX-License-Identifier: GPL-3.0-only
    2333#
    2434
  • trunk/tools/darwin.x86/.scm-settings

    r69491 r96416  
    55
    66#
    7 # Copyright (C) 2010-2017 Oracle Corporation
     7# Copyright (C) 2010-2022 Oracle and/or its affiliates.
    88#
    9 # This file is part of VirtualBox Open Source Edition (OSE), as
    10 # available from http://www.virtualbox.org. This file is free software;
    11 # you can redistribute it and/or modify it under the terms of the GNU
    12 # General Public License (GPL) as published by the Free Software
    13 # Foundation, in version 2 as it comes in the "COPYING" file of the
    14 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    15 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     9# This file is part of VirtualBox base platform packages, as
     10# available from https://www.virtualbox.org.
     11#
     12# This program is free software; you can redistribute it and/or
     13# modify it under the terms of the GNU General Public License
     14# as published by the Free Software Foundation, in version 3 of the
     15# License.
     16#
     17# This program is distributed in the hope that it will be useful, but
     18# WITHOUT ANY WARRANTY; without even the implied warranty of
     19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20# General Public License for more details.
     21#
     22# You should have received a copy of the GNU General Public License
     23# along with this program; if not, see <https://www.gnu.org/licenses>.
     24#
     25# SPDX-License-Identifier: GPL-3.0-only
    1626#
    1727
    18 --filter-files /bin/*.sh
     28--filter-files .scm-settings|*.sh
    1929
    2030--filter-out-dirs /qt/.
  • trunk/tools/darwin.x86/bin/xcode-4.1-extrator.sh

    r69210 r96416  
    55
    66#
    7 # Copyright (C) 2014 Oracle Corporation
     7# Copyright (C) 2014-2022 Oracle and/or its affiliates.
    88#
    9 # This file is part of VirtualBox Open Source Edition (OSE), as
    10 # available from http://www.virtualbox.org. This file is free software;
    11 # you can redistribute it and/or modify it under the terms of the GNU
    12 # General Public License (GPL) as published by the Free Software
    13 # Foundation, in version 2 as it comes in the "COPYING" file of the
    14 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    15 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     9# This file is part of VirtualBox base platform packages, as
     10# available from https://www.virtualbox.org.
     11#
     12# This program is free software; you can redistribute it and/or
     13# modify it under the terms of the GNU General Public License
     14# as published by the Free Software Foundation, in version 3 of the
     15# License.
     16#
     17# This program is distributed in the hope that it will be useful, but
     18# WITHOUT ANY WARRANTY; without even the implied warranty of
     19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20# General Public License for more details.
     21#
     22# You should have received a copy of the GNU General Public License
     23# along with this program; if not, see <https://www.gnu.org/licenses>.
     24#
     25# SPDX-License-Identifier: GPL-3.0-only
    1626#
    1727
  • trunk/tools/kBuildTools/VBoxXGccAmd64LinuxGnu.kmk

    r62534 r96416  
    55
    66#
    7 # Copyright (C) 2013-2016 Oracle Corporation
     7# Copyright (C) 2013-2022 Oracle and/or its affiliates.
    88#
    9 # This file is part of VirtualBox Open Source Edition (OSE), as
    10 # available from http://www.virtualbox.org. This file is free software;
    11 # you can redistribute it and/or modify it under the terms of the GNU
    12 # General Public License (GPL) as published by the Free Software
    13 # Foundation, in version 2 as it comes in the "COPYING" file of the
    14 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    15 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     9# This file is part of VirtualBox base platform packages, as
     10# available from https://www.virtualbox.org.
     11#
     12# This program is free software; you can redistribute it and/or
     13# modify it under the terms of the GNU General Public License
     14# as published by the Free Software Foundation, in version 3 of the
     15# License.
     16#
     17# This program is distributed in the hope that it will be useful, but
     18# WITHOUT ANY WARRANTY; without even the implied warranty of
     19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20# General Public License for more details.
     21#
     22# You should have received a copy of the GNU General Public License
     23# along with this program; if not, see <https://www.gnu.org/licenses>.
     24#
     25# SPDX-License-Identifier: GPL-3.0-only
    1626#
    1727
  • trunk/tools/kBuildTools/VBoxXGccX86RedHatLinux.kmk

    r62534 r96416  
    55
    66#
    7 # Copyright (C) 2013-2016 Oracle Corporation
     7# Copyright (C) 2013-2022 Oracle and/or its affiliates.
    88#
    9 # This file is part of VirtualBox Open Source Edition (OSE), as
    10 # available from http://www.virtualbox.org. This file is free software;
    11 # you can redistribute it and/or modify it under the terms of the GNU
    12 # General Public License (GPL) as published by the Free Software
    13 # Foundation, in version 2 as it comes in the "COPYING" file of the
    14 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    15 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     9# This file is part of VirtualBox base platform packages, as
     10# available from https://www.virtualbox.org.
     11#
     12# This program is free software; you can redistribute it and/or
     13# modify it under the terms of the GNU General Public License
     14# as published by the Free Software Foundation, in version 3 of the
     15# License.
     16#
     17# This program is distributed in the hope that it will be useful, but
     18# WITHOUT ANY WARRANTY; without even the implied warranty of
     19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20# General Public License for more details.
     21#
     22# You should have received a copy of the GNU General Public License
     23# along with this program; if not, see <https://www.gnu.org/licenses>.
     24#
     25# SPDX-License-Identifier: GPL-3.0-only
    1626#
    1727
  • trunk/tools/kBuildTools/VBoxXcode62.kmk

    r85050 r96416  
    55
    66#
    7 # Copyright (C) 2016 Oracle Corporation
    8 #
    9 # This file is part of VirtualBox Open Source Edition (OSE), as
    10 # available from http://www.virtualbox.org. This file is free software;
    11 # you can redistribute it and/or modify it under the terms of the GNU
    12 # General Public License (GPL) as published by the Free Software
    13 # Foundation, in version 2 as it comes in the "COPYING" file of the
    14 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    15 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     7# Copyright (C) 2016-2022 Oracle and/or its affiliates.
     8#
     9# This file is part of VirtualBox base platform packages, as
     10# available from https://www.virtualbox.org.
     11#
     12# This program is free software; you can redistribute it and/or
     13# modify it under the terms of the GNU General Public License
     14# as published by the Free Software Foundation, in version 3 of the
     15# License.
     16#
     17# This program is distributed in the hope that it will be useful, but
     18# WITHOUT ANY WARRANTY; without even the implied warranty of
     19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20# General Public License for more details.
     21#
     22# You should have received a copy of the GNU General Public License
     23# along with this program; if not, see <https://www.gnu.org/licenses>.
     24#
     25# SPDX-License-Identifier: GPL-3.0-only
    1626#
    1727
     
    483493endef
    484494
    485 
  • trunk/tools/kBuildUnits/vboximportchecker.kmk

    r93322 r96416  
    55
    66#
    7 # Copyright (C) 2017 Oracle Corporation
     7# Copyright (C) 2017-2022 Oracle and/or its affiliates.
    88#
    9 # This file is part of VirtualBox Open Source Edition (OSE), as
    10 # available from http://www.virtualbox.org. This file is free software;
    11 # you can redistribute it and/or modify it under the terms of the GNU
    12 # General Public License (GPL) as published by the Free Software
    13 # Foundation, in version 2 as it comes in the "COPYING" file of the
    14 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    15 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     9# This file is part of VirtualBox base platform packages, as
     10# available from https://www.virtualbox.org.
     11#
     12# This program is free software; you can redistribute it and/or
     13# modify it under the terms of the GNU General Public License
     14# as published by the Free Software Foundation, in version 3 of the
     15# License.
     16#
     17# This program is distributed in the hope that it will be useful, but
     18# WITHOUT ANY WARRANTY; without even the implied warranty of
     19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20# General Public License for more details.
     21#
     22# You should have received a copy of the GNU General Public License
     23# along with this program; if not, see <https://www.gnu.org/licenses>.
     24#
     25# SPDX-License-Identifier: GPL-3.0-only
    1626#
    1727
  • trunk/tools/linux.x86/kmodbuild/build-kernel.sh

    r78141 r96416  
    1717
    1818#
    19 # Copyright (C) 2019 Oracle Corporation
    20 #
    21 # This file is part of VirtualBox Open Source Edition (OSE), as
    22 # available from http://www.virtualbox.org. This file is free software;
    23 # you can redistribute it and/or modify it under the terms of the GNU
    24 # General Public License (GPL) as published by the Free Software
    25 # Foundation, in version 2 as it comes in the "COPYING" file of the
    26 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    27 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     19# Copyright (C) 2019-2022 Oracle and/or its affiliates.
     20#
     21# This file is part of VirtualBox base platform packages, as
     22# available from https://www.virtualbox.org.
     23#
     24# This program is free software; you can redistribute it and/or
     25# modify it under the terms of the GNU General Public License
     26# as published by the Free Software Foundation, in version 3 of the
     27# License.
     28#
     29# This program is distributed in the hope that it will be useful, but
     30# WITHOUT ANY WARRANTY; without even the implied warranty of
     31# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     32# General Public License for more details.
     33#
     34# You should have received a copy of the GNU General Public License
     35# along with this program; if not, see <https://www.gnu.org/licenses>.
     36#
     37# SPDX-License-Identifier: GPL-3.0-only
    2838#
    2939
     
    129139if [ -f kernel/timeconst.pl ]; then
    130140    if patch --output /tmp/build.$$ -Np1 <<EOF
    131 --- a/kernel/timeconst.pl       2019-04-15 13:44:55.434946090 +0200
    132 +++ b/kernel/timeconst.pl       2019-04-15 13:57:29.330140587 +0200
     141--- a/kernel/timeconst.pl       2019-04-15 13:44:55.434946090 +0200
     142+++ b/kernel/timeconst.pl       2019-04-15 13:57:29.330140587 +0200
    133143@@ -372,5 +372,5 @@
    134         @val = @{\$canned_values{\$hz}};
    135 -       if (!defined(@val)) {
    136 +       if (!@val) {
    137                 @val = compute_values(\$hz);
    138         }
    139         output(\$hz, @val);
     144        @val = @{\$canned_values{\$hz}};
     145-       if (!defined(@val)) {
     146+       if (!@val) {
     147                @val = compute_values(\$hz);
     148        }
     149        output(\$hz, @val);
    140150EOF
    141151    then
     
    153163+++ b/arch/x86/kernel/machine_kexec_64.c
    154164@@ -542,6 +542,7 @@ int arch_kexec_apply_relocations_add(const Elf64_Ehdr *ehdr,
    155                                 goto overflow;
    156                         break;
    157                 case R_X86_64_PC32:
    158 +               case R_X86_64_PLT32:
    159                         value -= (u64)address;
    160                         *(u32 *)location = value;
    161                         break;
     165                                goto overflow;
     166                        break;
     167                case R_X86_64_PC32:
     168+               case R_X86_64_PLT32:
     169                        value -= (u64)address;
     170                        *(u32 *)location = value;
     171                        break;
    162172EOF
    163173then
     
    172182+++ b/arch/x86/kernel/module.c
    173183@@ -191,6 +191,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
    174                                 goto overflow;
    175                         break;
    176                 case R_X86_64_PC32:
    177 +               case R_X86_64_PLT32:
    178                         val -= (u64)loc;
    179                         *(u32 *)loc = val;
     184                                goto overflow;
     185                        break;
     186                case R_X86_64_PC32:
     187+               case R_X86_64_PLT32:
     188                        val -= (u64)loc;
     189                        *(u32 *)loc = val;
    180190 #if 0
    181191EOF
     
    190200+++ b/arch/x86/kernel/module.c
    191201@@ -191,6 +191,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
    192                                 goto overflow;
    193                         break;
    194                 case R_X86_64_PC32:
    195 +               case R_X86_64_PLT32:
    196                         if (*(u32 *)loc != 0)
    197                                 goto invalid_relocation;
    198                         val -= (u64)loc;
     202                                goto overflow;
     203                        break;
     204                case R_X86_64_PC32:
     205+               case R_X86_64_PLT32:
     206                        if (*(u32 *)loc != 0)
     207                                goto invalid_relocation;
     208                        val -= (u64)loc;
    199209EOF
    200210                then
     
    208218+++ b/arch/x86/tools/relocs.c
    209219@@ -770,9 +770,12 @@ static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
    210                 break;
    211 
    212         case R_X86_64_PC32:
    213 +       case R_X86_64_PLT32:
    214                 /*
    215                  * PC relative relocations don't need to be adjusted unless
    216                  * referencing a percpu symbol.
    217 +                *
    218 +                * NB: R_X86_64_PLT32 can be treated as R_X86_64_PC32.
    219                  */
    220                 if (is_percpu_sym(sym, symname))
    221                         add_reloc(&relocs32neg, offset);
     220                break;
     221
     222        case R_X86_64_PC32:
     223+       case R_X86_64_PLT32:
     224                /*
     225                 * PC relative relocations don't need to be adjusted unless
     226                 * referencing a percpu symbol.
     227+                *
     228+                * NB: R_X86_64_PLT32 can be treated as R_X86_64_PC32.
     229                 */
     230                if (is_percpu_sym(sym, symname))
     231                        add_reloc(&relocs32neg, offset);
    222232EOF
    223233        then
     
    225235        fi
    226236        if patch --output /tmp/build.$$ -Np1 <<EOF
    227 --- linux-4.15/tools/lib/subcmd/pager.c 2017-11-12 19:46:13.000000000 +0100
    228 +++ linux-4.17/tools/lib/subcmd/pager.c 2018-06-03 23:15:21.000000000 +0200
     237--- linux-4.15/tools/lib/subcmd/pager.c 2017-11-12 19:46:13.000000000 +0100
     238+++ linux-4.17/tools/lib/subcmd/pager.c 2018-06-03 23:15:21.000000000 +0200
    229239@@ -30,10 +30,13 @@
    230          * have real input
    231          */
    232         fd_set in;
    233 +       fd_set exception;
    234 
    235         FD_ZERO(&in);
    236 +       FD_ZERO(&exception);
    237         FD_SET(0, &in);
    238 -       select(1, &in, NULL, &in, NULL);
    239 +       FD_SET(0, &exception);
    240 +       select(1, &in, NULL, &exception, NULL);
    241 
    242         setenv("LESS", "FRSX", 0);
     240         * have real input
     241         */
     242        fd_set in;
     243+       fd_set exception;
     244
     245        FD_ZERO(&in);
     246+       FD_ZERO(&exception);
     247        FD_SET(0, &in);
     248-       select(1, &in, NULL, &in, NULL);
     249+       FD_SET(0, &exception);
     250+       select(1, &in, NULL, &exception, NULL);
     251
     252        setenv("LESS", "FRSX", 0);
    243253 }
    244254EOF
     
    247257        fi
    248258        if patch --output /tmp/build.$$ -Np1 <<EOF
    249 --- linux-4.16/tools/lib/str_error_r.c  2019-04-15 06:04:50.978464217 +0200
    250 +++ linux-4.17/tools/lib/str_error_r.c  2018-06-03 23:15:21.000000000 +0200
     259--- linux-4.16/tools/lib/str_error_r.c  2019-04-15 06:04:50.978464217 +0200
     260+++ linux-4.17/tools/lib/str_error_r.c  2018-06-03 23:15:21.000000000 +0200
    251261@@ -22,6 +22,6 @@
    252262 {
    253         int err = strerror_r(errnum, buf, buflen);
    254         if (err)
    255 -               snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum, buf, buflen, err);
    256 +               snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, [buf], %zd)=%d", errnum, buflen, err);
    257         return buf;
     263        int err = strerror_r(errnum, buf, buflen);
     264        if (err)
     265-               snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum, buf, buflen, err);
     266+               snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, [buf], %zd)=%d", errnum, buflen, err);
     267        return buf;
    258268 }
    259269EOF
     
    269279        4.10.*|4.[9].*)
    270280        if patch --output /tmp/build.$$ -Np1 <<EOF
    271 --- linux-4.10/include/linux/log2.h     2017-02-19 23:34:00.000000000 +0100
    272 +++ linux-4.11/include/linux/log2.h     2017-11-12 19:46:13.000000000 +0100
     281--- linux-4.10/include/linux/log2.h     2017-02-19 23:34:00.000000000 +0100
     282+++ linux-4.11/include/linux/log2.h     2017-11-12 19:46:13.000000000 +0100
    273283@@ -15,14 +15,8 @@
    274284 #include <linux/types.h>
     
    288298@@ -84,9 +78,9 @@
    289299  */
    290  #define ilog2(n)                               \\
    291  (                                              \\
    292         __builtin_constant_p(n) ? (             \\
    293 -               (n) < 1 ? ____ilog2_NaN() :     \\
    294 +               (n) < 2 ? 0 :                   \\
    295                 (n) & (1ULL << 63) ? 63 :       \\
    296                 (n) & (1ULL << 62) ? 62 :       \\
    297                 (n) & (1ULL << 61) ? 61 :       \\
    298                 (n) & (1ULL << 60) ? 60 :       \\
     300 #define ilog2(n)                               \\
     301 (                                              \\
     302        __builtin_constant_p(n) ? (             \\
     303-               (n) < 1 ? ____ilog2_NaN() :     \\
     304+               (n) < 2 ? 0 :                   \\
     305                (n) & (1ULL << 63) ? 63 :       \\
     306                (n) & (1ULL << 62) ? 62 :       \\
     307                (n) & (1ULL << 61) ? 61 :       \\
     308                (n) & (1ULL << 60) ? 60 :       \\
    299309@@ -147,12 +141,9 @@
    300                 (n) & (1ULL <<  5) ?  5 :       \\
    301                 (n) & (1ULL <<  4) ?  4 :       \\
    302                 (n) & (1ULL <<  3) ?  3 :       \\
    303                 (n) & (1ULL <<  2) ?  2 :       \\
    304 -               (n) & (1ULL <<  1) ?  1 :       \\
    305 -               (n) & (1ULL <<  0) ?  0 :       \\
    306 -               ____ilog2_NaN()                 \\
    307 -                                  ) :          \\
    308 +               1 ) :                           \\
    309         (sizeof(n) <= 4) ?                      \\
    310         __ilog2_u32(n) :                        \\
    311         __ilog2_u64(n)                          \\
     310                (n) & (1ULL <<  5) ?  5 :       \\
     311                (n) & (1ULL <<  4) ?  4 :       \\
     312                (n) & (1ULL <<  3) ?  3 :       \\
     313                (n) & (1ULL <<  2) ?  2 :       \\
     314-               (n) & (1ULL <<  1) ?  1 :       \\
     315-               (n) & (1ULL <<  0) ?  0 :       \\
     316-               ____ilog2_NaN()                 \\
     317-                                  ) :          \\
     318+               1 ) :                           \\
     319        (sizeof(n) <= 4) ?                      \\
     320        __ilog2_u32(n) :                        \\
     321        __ilog2_u64(n)                          \\
    312322  )
    313323EOF
     
    326336        2.5.*|2.6.[012345678])
    327337            if patch --output /tmp/build.$$ -Np1 <<EOF
    328 --- linux-2.6.8/scripts/kconfig/mconf.c 2004-08-14 07:36:32.000000000 +0200
    329 +++ linux-2.6.8/scripts/kconfig/mconf.c 2019-04-15 15:52:42.143587966 +0200
     338--- linux-2.6.8/scripts/kconfig/mconf.c 2004-08-14 07:36:32.000000000 +0200
     339+++ linux-2.6.8/scripts/kconfig/mconf.c 2019-04-15 15:52:42.143587966 +0200
    330340@@ -88,5 +88,5 @@
    331341 static struct termios ios_org;
     
    347357    2.6.2[456]*)
    348358        if patch --output /tmp/build.$$ -Np1 <<EOF
    349 --- linux-2.6.26/arch/x86/lib/copy_user_64.S    2019-04-15 16:21:49.475846822 +0200
    350 +++ linux-2.6.26/arch/x86/lib/copy_user_64.S    2019-04-15 16:21:50.883863141 +0200
     359--- linux-2.6.26/arch/x86/lib/copy_user_64.S    2019-04-15 16:21:49.475846822 +0200
     360+++ linux-2.6.26/arch/x86/lib/copy_user_64.S    2019-04-15 16:21:50.883863141 +0200
    351361@@ -341,7 +341,7 @@
    352  11:    pop %rax
    353  7:     ret
    354         CFI_ENDPROC
     362 11:    pop %rax
     363 7:     ret
     364        CFI_ENDPROC
    355365-END(copy_user_generic_c)
    356366+END(copy_user_generic_string)
    357367
    358         .section __ex_table,"a"
    359         .quad 1b,3b
     368        .section __ex_table,"a"
     369        .quad 1b,3b
    360370EOF
    361371        then
     
    365375    2.6.2[0123]*|2.6.19*)
    366376        if patch --output /tmp/build.$$ -Np1 <<EOF
    367 --- linux-2.6.23/arch/x86_64/lib/copy_user.S    2019-04-15 16:42:16.898006203 +0200
    368 +++ linux-2.6.23/arch/x86_64/lib/copy_user.S    2019-04-15 16:42:25.906109885 +0200
     377--- linux-2.6.23/arch/x86_64/lib/copy_user.S    2019-04-15 16:42:16.898006203 +0200
     378+++ linux-2.6.23/arch/x86_64/lib/copy_user.S    2019-04-15 16:42:25.906109885 +0200
    369379@@ -344,7 +344,7 @@
    370  11:    pop %rax
    371  7:     ret
    372         CFI_ENDPROC
     380 11:    pop %rax
     381 7:     ret
     382        CFI_ENDPROC
    373383-END(copy_user_generic_c)
    374384+END(copy_user_generic_string)
    375385
    376         .section __ex_table,"a"
    377         .quad 1b,3b
     386        .section __ex_table,"a"
     387        .quad 1b,3b
    378388EOF
    379389        then
     
    386396if [ -f arch/x86_64/vdso/vdso.lds.S ]; then
    387397    if patch --output /tmp/build.$$ -Np1 <<EOF
    388 --- linux-2.6.23/arch/x86_64/vdso/vdso.lds.S    2019-04-15 17:20:27.567440594 +0200
    389 +++ linux-2.6.23/arch/x86_64/vdso/vdso.lds.S    2019-04-15 17:20:29.635463886 +0200
     398--- linux-2.6.23/arch/x86_64/vdso/vdso.lds.S    2019-04-15 17:20:27.567440594 +0200
     399+++ linux-2.6.23/arch/x86_64/vdso/vdso.lds.S    2019-04-15 17:20:29.635463886 +0200
    390400@@ -28,5 +28,5 @@
    391    .text           : { *(.text) }               :text
    392    .text.ptr       : { *(.text.ptr) }           :text
     401   .text           : { *(.text) }               :text
     402   .text.ptr       : { *(.text.ptr) }           :text
    393403-  . = VDSO_PRELINK + 0x900;
    394404+  . = VDSO_PRELINK + 0xa00;
    395    .data           : { *(.data) }               :text
    396    .bss            : { *(.bss) }                        :text
     405   .data           : { *(.data) }               :text
     406   .bss            : { *(.bss) }                        :text
    397407EOF
    398408    then
     
    406416        2.6.[0-9]!([0-9])*|2.6.1[0-9]*|2.6.2[01]*)
    407417            if patch --output /tmp/build.$$ -Np1 <<EOF
    408 --- linux-2.6.21/scripts/mod/sumversion.c       2007-02-04 19:44:54.000000000 +0100
    409 +++ linux-2.6.21/scripts/mod/sumversion.c       2019-02-15 16:10:12.956678862 +0100
     418--- linux-2.6.21/scripts/mod/sumversion.c       2007-02-04 19:44:54.000000000 +0100
     419+++ linux-2.6.21/scripts/mod/sumversion.c       2019-02-15 16:10:12.956678862 +0100
    410420@@ -7,4 +7,5 @@
    411421 #include <ctype.h>
     
    426436        2.6.[0-9]!([0-9])*|2.6.1[0-7]*)
    427437            if patch --output /tmp/build.$$ -Np1 <<EOF
    428 --- linux-2.6.17/arch/x86_64/boot/tools/build.c 2006-01-03 04:21:10.000000000 +0100
    429 +++ linux-2.6.18/arch/x86_64/boot/tools/build.c 2007-02-04 19:44:54.000000000 +0100
     438--- linux-2.6.17/arch/x86_64/boot/tools/build.c 2006-01-03 04:21:10.000000000 +0100
     439+++ linux-2.6.18/arch/x86_64/boot/tools/build.c 2007-02-04 19:44:54.000000000 +0100
    430440@@ -149,9 +149,7 @@
    431         sz = sb.st_size;
    432         fprintf (stderr, "System is %d kB\n", sz/1024);
    433         sys_size = (sz + 15) / 16;
    434 -       /* 0x40000*16 = 4.0 MB, reasonable estimate for the current maximum */
    435 -       if (sys_size > (is_big_kernel ? 0x40000 : DEF_SYSSIZE))
    436 -               die("System is too big. Try using %smodules.",
    437 -                       is_big_kernel ? "" : "bzImage or ");
    438 +       if (!is_big_kernel && sys_size > DEF_SYSSIZE)
    439 +               die("System is too big. Try using bzImage or modules.");
    440         while (sz > 0) {
    441                 int l, n;
     441        sz = sb.st_size;
     442        fprintf (stderr, "System is %d kB\n", sz/1024);
     443        sys_size = (sz + 15) / 16;
     444-       /* 0x40000*16 = 4.0 MB, reasonable estimate for the current maximum */
     445-       if (sys_size > (is_big_kernel ? 0x40000 : DEF_SYSSIZE))
     446-               die("System is too big. Try using %smodules.",
     447-                       is_big_kernel ? "" : "bzImage or ");
     448+       if (!is_big_kernel && sys_size > DEF_SYSSIZE)
     449+               die("System is too big. Try using bzImage or modules.");
     450        while (sz > 0) {
     451                int l, n;
    442452EOF
    443453        then
     
    452462        2.6.[0-9]!([0-9])*|2.6.1[01]*)
    453463            if patch --output /tmp/build.$$ -lNp1 <<EOF
    454 --- linux-2.6.11/arch/x86_64/kernel/process.c   2005-03-02 08:38:10.000000000 +0100
    455 +++ linux-2.6.11/arch/x86_64/kernel/process.c   2019-02-15 16:57:47.653585327 +0100
     464--- linux-2.6.11/arch/x86_64/kernel/process.c   2005-03-02 08:38:10.000000000 +0100
     465+++ linux-2.6.11/arch/x86_64/kernel/process.c   2019-02-15 16:57:47.653585327 +0100
    456466@@ -390,10 +390,10 @@
    457         p->thread.fs = me->thread.fs;
    458         p->thread.gs = me->thread.gs;
    459 
    460 -       asm("movl %%gs,%0" : "=m" (p->thread.gsindex));
    461 -       asm("movl %%fs,%0" : "=m" (p->thread.fsindex));
    462 -       asm("movl %%es,%0" : "=m" (p->thread.es));
    463 -       asm("movl %%ds,%0" : "=m" (p->thread.ds));
    464 +       asm("movw %%gs,%0" : "=m" (p->thread.gsindex));
    465 +       asm("movw %%fs,%0" : "=m" (p->thread.fsindex));
    466 +       asm("movw %%es,%0" : "=m" (p->thread.es));
    467 +       asm("movw %%ds,%0" : "=m" (p->thread.ds));
    468 
    469         if (unlikely(me->thread.io_bitmap_ptr != NULL)) {
    470                 p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
     467        p->thread.fs = me->thread.fs;
     468        p->thread.gs = me->thread.gs;
     469
     470-       asm("movl %%gs,%0" : "=m" (p->thread.gsindex));
     471-       asm("movl %%fs,%0" : "=m" (p->thread.fsindex));
     472-       asm("movl %%es,%0" : "=m" (p->thread.es));
     473-       asm("movl %%ds,%0" : "=m" (p->thread.ds));
     474+       asm("movw %%gs,%0" : "=m" (p->thread.gsindex));
     475+       asm("movw %%fs,%0" : "=m" (p->thread.fsindex));
     476+       asm("movw %%es,%0" : "=m" (p->thread.es));
     477+       asm("movw %%ds,%0" : "=m" (p->thread.ds));
     478
     479        if (unlikely(me->thread.io_bitmap_ptr != NULL)) {
     480                p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
    471481@@ -456,11 +456,11 @@
    472          * Switch DS and ES.
    473          * This won't pick up thread selector changes, but I guess that is ok.
    474          */
    475 -       asm volatile("movl %%es,%0" : "=m" (prev->es));
    476 +       asm volatile("movw %%es,%0" : "=m" (prev->es));
    477         if (unlikely(next->es | prev->es))
    478                 loadsegment(es, next->es);
    479 
    480 -       asm volatile ("movl %%ds,%0" : "=m" (prev->ds));
    481 +       asm volatile ("movw %%ds,%0" : "=m" (prev->ds));
    482         if (unlikely(next->ds | prev->ds))
    483                 loadsegment(ds, next->ds);
     482         * Switch DS and ES.
     483         * This won't pick up thread selector changes, but I guess that is ok.
     484         */
     485-       asm volatile("movl %%es,%0" : "=m" (prev->es));
     486+       asm volatile("movw %%es,%0" : "=m" (prev->es));
     487        if (unlikely(next->es | prev->es))
     488                loadsegment(es, next->es);
     489
     490-       asm volatile ("movl %%ds,%0" : "=m" (prev->ds));
     491+       asm volatile ("movw %%ds,%0" : "=m" (prev->ds));
     492        if (unlikely(next->ds | prev->ds))
     493                loadsegment(ds, next->ds);
    484494EOF
    485495        then
  • trunk/tools/linux.x86/kmodbuild/build-modules.sh

    r78140 r96416  
    1010
    1111#
    12 # Copyright (C) 2019 Oracle Corporation
     12# Copyright (C) 2019-2022 Oracle and/or its affiliates.
    1313#
    14 # This file is part of VirtualBox Open Source Edition (OSE), as
    15 # available from http://www.virtualbox.org. This file is free software;
    16 # you can redistribute it and/or modify it under the terms of the GNU
    17 # General Public License (GPL) as published by the Free Software
    18 # Foundation, in version 2 as it comes in the "COPYING" file of the
    19 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    20 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     14# This file is part of VirtualBox base platform packages, as
     15# available from https://www.virtualbox.org.
     16#
     17# This program is free software; you can redistribute it and/or
     18# modify it under the terms of the GNU General Public License
     19# as published by the Free Software Foundation, in version 3 of the
     20# License.
     21#
     22# This program is distributed in the hope that it will be useful, but
     23# WITHOUT ANY WARRANTY; without even the implied warranty of
     24# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     25# General Public License for more details.
     26#
     27# You should have received a copy of the GNU General Public License
     28# along with this program; if not, see <https://www.gnu.org/licenses>.
     29#
     30# SPDX-License-Identifier: GPL-3.0-only
    2131#
    2232
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette