Skip to content

Commit af88853

Browse files
committed
Use nodeos-linux package instead of download own copy of Linux kernel
1 parent 285c562 commit af88853

File tree

4 files changed

+4
-37
lines changed

4 files changed

+4
-37
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"ci-publish": "^1.3.0",
6363
"download-manager": "^0.1.3",
6464
"fs-extra": "^3.0.1",
65+
"nodeos-linux": "^4.15.10",
6566
"prebuild": "^6.0.0"
6667
},
6768
"main": "index.js",

patches/linux-darwin.diff

Lines changed: 0 additions & 14 deletions
This file was deleted.

scripts/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ OBJ_GCC_FINAL=$OBJECTS/gcc_final
4141
# Linux kernel headers
4242
#
4343

44-
SRC_DIR=$DEPS/linux
44+
SRC_DIR=${LINUX:-`node -p "require('nodeos-linux')"`/linux}
4545
STEP_DIR=$KERNEL_HEADERS
4646

4747
if [[ ! -d $STEP_DIR ]]; then

scripts/prebuild

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,20 @@ const options = {path: DEPS}
1717

1818
const BINUTILS_VERSION = "2.27"
1919
const GCC_VERSION = "5.3.0"
20-
const LINUX_VERSION = "4.9.2"
2120
const MUSL_VERSION = "1.1.16"
2221

2322

2423
// Source URLs
2524

2625
const BINUTILS_URL = "http://ftpmirror.gnu.org/binutils/binutils-"+BINUTILS_VERSION+".tar.gz"
2726
const GCC_URL = "http://ftpmirror.gnu.org/gcc/gcc-"+GCC_VERSION+"/gcc-"+GCC_VERSION+".tar.gz"
28-
const LINUX_URL = "https://www.kernel.org/pub/linux/kernel/v4.x/linux-"+LINUX_VERSION+".tar.gz"
2927
const MUSL_URL = "http://www.musl-libc.org/releases/musl-"+MUSL_VERSION+".tar.gz"
3028

3129

32-
// Checksums
33-
34-
const LINUX_SHA256 = '569fd6ec3d490f4bf12c48c6b1365002f279595b49080bbfb13c148fba6b3492'
35-
36-
3730
// Patch GCC to work with musl
3831
const GCC_PATCH_URL = 'https://raw.githubusercontent.com/GregorR/musl-cross/master/patches/gcc-'+GCC_VERSION+'-musl.diff'
3932

4033

41-
// Patch Linux to use musl headers on OS X
42-
const LINUX_DARWIN_PATCH_PATH = PATCHES+'/linux-darwin.diff'
43-
44-
4534
//
4635
// gcc prerequisites
4736
//
@@ -99,7 +88,7 @@ function copy_headers(callback)
9988
}
10089

10190
//
102-
// binutils, gcc, Linux & musl
91+
// binutils, gcc & musl
10392
//
10493

10594
var downloads =
@@ -115,22 +104,13 @@ var downloads =
115104
strip: 1,
116105
action: download_prerequisites
117106
},
118-
{
119-
name: 'linux',
120-
url: LINUX_URL,
121-
sha256: LINUX_SHA256
122-
},
123107
{
124108
name: 'musl',
125109
url: MUSL_URL
126110
}
127111
]
128112

129-
if(process.platform === 'darwin')
130-
{
131-
downloads[2].patch = LINUX_DARWIN_PATCH_PATH
132-
downloads[3].action = copy_headers
133-
}
113+
if(process.platform === 'darwin') downloads[2].action = copy_headers
134114

135115
manager(downloads, options, function(error)
136116
{

0 commit comments

Comments
 (0)