scripts/build/kernel/mingw32.sh
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Oct 16 20:57:44 2012 +0200 (2012-10-16)
changeset 3079 37831a33e07e
parent 2084 2bcd716ca877
permissions -rw-r--r--
kernel/linux: fix using custom location

Currently, extract and patch are skipped as thus:
- using a custom directory of pre-installed headers
- a correctly named directory already exists

Otherwise, extract and patch are done.

The current second condition is wrong, because it allows the following
sequence to happen:
- a non-custom kernel is used
- a previous build only partially extracted the non-custom sources
- that p[revious build broke during extraction (eg. incomplete tarball...)
- a subsequent build will find a properly named directory, and will
thus skip extract and patch, which is wrong

Fix that by following the conditions in this table:

Type | Extract | Patch
----------------------+---------+-------
Pre-installed headers | N | N
custom directory | N | N
custom tarball | Y | N
mainstream tarball | Y | Y

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: David Holsgrove <david.holsgrove@xilinx.com>
bartvdrmeulen@2017
     1
# This file declares functions to install the kernel headers for mingw
bartvdrmeulen@2017
     2
# Copyright 2009 Bart vdr. Meulen
bartvdrmeulen@2017
     3
# Licensed under the GPL v2. See COPYING in the root of this package
bartvdrmeulen@2017
     4
bartvdrmeulen@2017
     5
CT_DoKernelTupleValues() {
bartvdrmeulen@2017
     6
    CT_TARGET_KERNEL="mingw32"
bartvdrmeulen@2017
     7
    CT_TARGET_SYS=
bartvdrmeulen@2017
     8
}
bartvdrmeulen@2017
     9
bartvdrmeulen@2017
    10
do_kernel_get() {
bartvdrmeulen@2017
    11
    CT_GetFile "w32api-${CT_W32API_VERSION}-mingw32-src" \
bartvdrmeulen@2017
    12
        http://downloads.sourceforge.net/sourceforge/mingw
bartvdrmeulen@2017
    13
}
bartvdrmeulen@2017
    14
bartvdrmeulen@2017
    15
do_kernel_extract() {
bartvdrmeulen@2017
    16
    CT_Extract "w32api-${CT_W32API_VERSION}-mingw32-src"
bartvdrmeulen@2017
    17
}
bartvdrmeulen@2017
    18
bartvdrmeulen@2017
    19
do_kernel_headers() {
bartvdrmeulen@2017
    20
    CT_DoStep INFO "Installing kernel headers"
bartvdrmeulen@2017
    21
eha@2084
    22
    mkdir -p "${CT_HEADERS_DIR}"
yann@2580
    23
    cp -r ${CT_SRC_DIR}/w32api-${CT_W32API_VERSION}-mingw32-src/include/*   \
eha@2084
    24
          ${CT_HEADERS_DIR}
bartvdrmeulen@2017
    25
bartvdrmeulen@2017
    26
    CT_EndStep
bartvdrmeulen@2017
    27
}