Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
83
.ci/Jenkinsfile
vendored
83
.ci/Jenkinsfile
vendored
@@ -81,24 +81,29 @@ def presetFlags = [
|
||||
def anyFailure = false
|
||||
|
||||
def gitClone(repository, branch) {
|
||||
/* Read git tag from environment or set the default one. */
|
||||
if (env.GIT_COMMIT == null)
|
||||
env.GIT_COMMIT = "*/$branch"
|
||||
println "[-] Using git tag [${env.GIT_COMMIT}]"
|
||||
|
||||
/* Clean workspace. */
|
||||
cleanWs()
|
||||
|
||||
/* Use stashes to avoid performing multiple clones. */
|
||||
if (env.GIT_STASHED != 'true') {
|
||||
/* Perform clone/checkout. */
|
||||
def scmVars = checkout poll: false,
|
||||
def scmVars = checkout poll: true,
|
||||
changelog: true,
|
||||
scm: [$class: 'GitSCM',
|
||||
branches: [[name: env.GIT_COMMIT]],
|
||||
extensions: [[$class: 'LocalBranch', localBranch: branch]],
|
||||
branches: [[name: branch]],
|
||||
userRemoteConfigs: [[url: repository]]]
|
||||
env.GIT_COMMIT = scmVars.GIT_COMMIT
|
||||
|
||||
if (env.GIT_COMMIT == null) {
|
||||
/* Save the current HEAD commit. */
|
||||
env.GIT_COMMIT = scmVars.GIT_COMMIT
|
||||
} else if (env.GIT_COMMIT != scmVars.GIT_COMMIT) {
|
||||
/* Checkout the commit read from the polling log. */
|
||||
if (isUnix())
|
||||
sh "git checkout ${env.GIT_COMMIT} || exit 0"
|
||||
else
|
||||
bat "git checkout ${env.GIT_COMMIT} || exit /b 0"
|
||||
}
|
||||
println "[-] Using git commit [${env.GIT_COMMIT}]"
|
||||
|
||||
/* Stash data and mark it as stashed. */
|
||||
stash name: 'git'
|
||||
@@ -147,46 +152,32 @@ pipeline {
|
||||
|
||||
steps {
|
||||
script {
|
||||
/* Hack to extract the current HEAD commit from this build's git polling
|
||||
log. This avoids a race condition where HEAD changes in the time period
|
||||
between Jenkins polling the git repository and the first build node
|
||||
performing the first git clone once ready. (See issue JENKINS-20518) */
|
||||
if (env.GIT_COMMIT == null) {
|
||||
/* This must run on the master node to read the polling log. */
|
||||
node('master') {
|
||||
/* Ignore exceptions as this is not really critical. */
|
||||
try {
|
||||
/* Switch to this build's directory. */
|
||||
dir("${env.JENKINS_HOME}/jobs/${env.JOB_NAME}/builds/${env.BUILD_NUMBER}") {
|
||||
/* Parse polling log. */
|
||||
def pollingLog = readFile file: 'polling.log'
|
||||
def match = pollingLog =~ /Latest remote head revision on [^ ]+ is: ([a-zA-Z0-9]+)/
|
||||
if (match && match[0]) {
|
||||
env.GIT_COMMIT = match[0][1]
|
||||
println "[-] Read git tag [${env.GIT_COMMIT}] from polling log"
|
||||
}
|
||||
/* Extract the polled commit from the polling log, so that git checkout can be used
|
||||
to avoid JENKINS-20518 race conditions caused by two pushes too close together. */
|
||||
node('master') { /* must run on master node to read polling log */
|
||||
/* Ignore exceptions as this is not really critical. */
|
||||
try {
|
||||
/* Switch to this build's directory. */
|
||||
dir("${env.JENKINS_HOME}/jobs/${env.JOB_NAME}/builds/${env.BUILD_NUMBER}") {
|
||||
/* Parse polling log. */
|
||||
def pollingLog = readFile file: 'polling.log'
|
||||
def match = pollingLog =~ /Latest remote head revision on [^ ]+ is: ([a-zA-Z0-9]+)/
|
||||
if (match && match[0]) {
|
||||
env.GIT_COMMIT = match[0][1]
|
||||
println "[-] Read git commit [${env.GIT_COMMIT}] from polling log"
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
/* Perform a git clone on any node to save polling data and,
|
||||
if polling log parsing failed, get the current HEAD commit. */
|
||||
node {
|
||||
/* Clean workspace. */
|
||||
cleanWs()
|
||||
/* Adding to the above, run a git clone as soon as possible on any node
|
||||
to further avoid race conditions caused by busy node executor delays. */
|
||||
node {
|
||||
/* Run git clone. */
|
||||
gitClone(repository, branch)
|
||||
|
||||
/* Perform clone/checkout. */
|
||||
def scmVars = checkout poll: true,
|
||||
changelog: false,
|
||||
scm: [$class: 'GitSCM',
|
||||
branches: [[name: branch]],
|
||||
userRemoteConfigs: [[url: repository]]]
|
||||
if (env.GIT_COMMIT == null)
|
||||
env.GIT_COMMIT = scmVars.GIT_COMMIT
|
||||
|
||||
/* Clean workspace again. */
|
||||
cleanWs()
|
||||
}
|
||||
/* Clean workspace, in case this is running in a non-build node. */
|
||||
cleanWs()
|
||||
}
|
||||
|
||||
/* Create source tarball. */
|
||||
|
@@ -297,6 +297,7 @@ esac
|
||||
|
||||
# Add git hash and copyright year.
|
||||
git_hash=$(git rev-parse --short HEAD 2> /dev/null)
|
||||
[ -z "$git_hash" ] && git_hash=$(echo $GIT_COMMIT | cut -c 1-8)
|
||||
[ ! -z "$git_hash" ] && cmake_flags_extra="$cmake_flags_extra -D \"EMU_GIT_HASH=$git_hash\""
|
||||
cmake_flags_extra="$cmake_flags_extra -D \"EMU_COPYRIGHT_YEAR=$(date +%Y)\""
|
||||
|
||||
|
@@ -113,6 +113,7 @@ enum {
|
||||
MACHINE_TYPE_SOCKET8,
|
||||
MACHINE_TYPE_SLOT1,
|
||||
MACHINE_TYPE_SLOT1_2,
|
||||
MACHINE_TYPE_SLOT1_370,
|
||||
MACHINE_TYPE_SLOT2,
|
||||
MACHINE_TYPE_SOCKET370,
|
||||
MACHINE_TYPE_MISC,
|
||||
|
@@ -101,7 +101,8 @@ enum {
|
||||
AC97_CODEC_CS4297A,
|
||||
AC97_CODEC_WM9701A,
|
||||
AC97_CODEC_STAC9708,
|
||||
AC97_CODEC_STAC9721
|
||||
AC97_CODEC_STAC9721,
|
||||
AC97_CODEC_AK4540
|
||||
};
|
||||
|
||||
|
||||
@@ -141,6 +142,7 @@ extern int ac97_codec_count, ac97_modem_codec_count,
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t ad1881_device;
|
||||
extern const device_t ak4540_device;
|
||||
extern const device_t alc100_device;
|
||||
extern const device_t cs4297_device;
|
||||
extern const device_t cs4297a_device;
|
||||
|
@@ -54,6 +54,7 @@ const machine_type_t machine_types[] = {
|
||||
{ "Socket 8", MACHINE_TYPE_SOCKET8 },
|
||||
{ "Slot 1", MACHINE_TYPE_SLOT1 },
|
||||
{ "Slot 1/2", MACHINE_TYPE_SLOT1_2 },
|
||||
{ "Slot 1/Socket 370", MACHINE_TYPE_SLOT1_370 },
|
||||
{ "Slot 2", MACHINE_TYPE_SLOT2 },
|
||||
{ "Socket 370", MACHINE_TYPE_SOCKET370 },
|
||||
{ "Miscellaneous", MACHINE_TYPE_MISC }
|
||||
@@ -858,6 +859,12 @@ const machine_t machines[] = {
|
||||
with most likely AMIKey-2 KBC firmware. */
|
||||
{ "[i440GX] Freeway FW-6400GX", "fw6400gx", MACHINE_TYPE_SLOT1_2, CPU_PKG_SLOT1 | CPU_PKG_SLOT2, 0, 100000000, 150000000, 1800, 3500, 3.0, 8.0, (MACHINE_AGP & ~MACHINE_AT) | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 16384,2080768,16384, 511, machine_at_fw6400gx_init, NULL },
|
||||
|
||||
/* Slot 1/Socket 370 machines */
|
||||
/* 440BX */
|
||||
/* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC
|
||||
firmware. */
|
||||
{ "[i440BX] Tyan Trinity 371", "s1857", MACHINE_TYPE_SLOT1_370, CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, 0, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_s1857_init, at_s1857_get_device },
|
||||
|
||||
/* Slot 2 machines */
|
||||
/* 440GX */
|
||||
/* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC
|
||||
@@ -883,9 +890,6 @@ const machine_t machines[] = {
|
||||
/* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC
|
||||
firmware. */
|
||||
{ "[i440BX] AmazePC AM-BX133", "ambx133", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 133333333, 1300, 3500, 1.5, 8.0, /* limits assumed */ MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_ambx133_init, NULL },
|
||||
/* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC
|
||||
firmware. */
|
||||
{ "[i440BX] Tyan Trinity 371", "s1857", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_s1857_init, at_s1857_get_device },
|
||||
|
||||
/* 440ZX */
|
||||
/* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC
|
||||
|
@@ -44,6 +44,12 @@ static const struct {
|
||||
.vendor_regs = (const ac97_vendor_reg_t[]) {{0x74, 0x0000, 0xff07}, {0x76, 0x0404, 0xdde5}, {0x78, 48000, 0x0000}, {0x7a, 48000, 0x0000}, {0}},
|
||||
.device = &ad1881_device
|
||||
},
|
||||
[AC97_CODEC_AK4540] = {
|
||||
.vendor_id = AC97_VENDOR_ID('A', 'K', 'M', 0x00),
|
||||
.misc_flags = AC97_MONOOUT | AC97_PCBEEP | AC97_PHONE | AC97_VIDEO | AC97_AUXIN | AC97_MS | AC97_LPBK,
|
||||
.powerdown_mask = 0x01f,
|
||||
.device = &ak4540_device
|
||||
},
|
||||
[AC97_CODEC_ALC100] = {
|
||||
.vendor_id = AC97_VENDOR_ID('A', 'L', 'C', 0x20),
|
||||
.misc_flags = AC97_AUXOUT | AC97_MONOOUT | AC97_PCBEEP | AC97_PHONE | AC97_VIDEO | AC97_AUXIN | AC97_POP | AC97_MS | AC97_LPBK,
|
||||
@@ -649,6 +655,18 @@ const device_t ad1881_device =
|
||||
NULL
|
||||
};
|
||||
|
||||
const device_t ak4540_device =
|
||||
{
|
||||
"Asahi Kasei AK4540",
|
||||
DEVICE_AC97,
|
||||
AC97_CODEC_AK4540,
|
||||
ac97_codec_init, ac97_codec_close, ac97_codec_reset,
|
||||
{ NULL },
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
const device_t alc100_device =
|
||||
{
|
||||
"Avance Logic ALC100",
|
||||
|
@@ -1896,6 +1896,9 @@ static const device_config_t es1371_config[] =
|
||||
.type = CONFIG_SELECTION,
|
||||
.selection = {
|
||||
{
|
||||
.description = "Asahi Kasei AK4540",
|
||||
.value = AC97_CODEC_AK4540
|
||||
}, {
|
||||
.description = "Crystal CS4297",
|
||||
.value = AC97_CODEC_CS4297
|
||||
}, {
|
||||
|
Reference in New Issue
Block a user