2015-01-05, 12:58
It appears that since build #0102, the mkknlimg script no longer works with OpenELEC kernels.
When building #0101, the output from mkknlimg (3 Dec 2014 version) is:
but from #0102 onwards (same 3 Dec 2014 version), it changes to:
With kernels after 1 Jan, the script (again, using 3 Dec 2014 version) will create a modified kernel, but it's not DT enabled:
Since there is a new version of mkknlimg released on 1 Jan 2015, I tried that but this also doesn't work, and now fails in a different way - it simply outputs absolutely nothing when called the first time on a current OpenELEC kernel, but now exits with a status of 1 which causes the build to fail (the previous version exited with a status of 0 even when it failed to DT enable the kernel, which is what allowed the builds to succeed, so at least that's an improvement!)
With the 1 Jan 2015 version of mkknlimg and a current OpenELEC kernel:
So it looks like we need a new mkknlimg.
Setting the exit code to 1 when it fails to enable DT is (IMHO) a *good* thing - please make this behaviour optional if it isn't intentional, outputting Y or N is nice but not terribly useful to a build script which is testing the exit code (OpenELEC build scripts enable the -e shell option and will terminate when any command exits with a non-zero exit code).
Since the kernel in builds from #0102 onwards are apparently garbage from a DT perspective, there's a clean OpenELEC kernel here: dropbox.
When building #0101, the output from mkknlimg (3 Dec 2014 version) is:
Code:
Version: Linux version 3.18.1 ([email protected]) (gcc version 4.9.2 (GCC) ) #1 PREEMPT Thu Jan 1 22:08:58 GMT 2015
Linux version
DT: y
Code:
Version: Linux version 3.18.1 ([email protected]) (gcc version 4.9.2 (GCC) ) #1 PREEMPT Fri Jan 2 21:01:49 GMT 2015
Linux version
DT: n
With kernels after 1 Jan, the script (again, using 3 Dec 2014 version) will create a modified kernel, but it's not DT enabled:
Code:
$ perl dtree/knlinfo kernel.img
* no trailer
$ perl OpenELEC.tv/scripts/mkknlimg kernel.img kernel.img.dt
Version: Linux version 3.18.1 ([email protected]) (gcc version 4.9.2 (GCC) ) #1 PREEMPT Mon Jan 5 10:12:38 GMT 2015
Linux version
DT: n
$ echo $?
0
$ perl dtree/knlinfo kernel.img.dt
Kernel trailer found at 6348816/0x60e010:
KVer: "Linux version 3.18.1 ([email protected]) (gcc version 4.9.2 (GCC) ) #1 PREEMPT Mon Jan 5 10:12:38 GMT 2015
Linux version "
DTOK: false
$ ls -lart kernel*
-rwxrwxr-x 1 neil neil 6348816 Jan 5 10:25 kernel.img
-rw-rw-r-- 1 neil neil 6348984 Jan 5 10:26 kernel.img.dt
Since there is a new version of mkknlimg released on 1 Jan 2015, I tried that but this also doesn't work, and now fails in a different way - it simply outputs absolutely nothing when called the first time on a current OpenELEC kernel, but now exits with a status of 1 which causes the build to fail (the previous version exited with a status of 0 even when it failed to DT enable the kernel, which is what allowed the builds to succeed, so at least that's an improvement!)
With the 1 Jan 2015 version of mkknlimg and a current OpenELEC kernel:
Code:
$ rm kernel.img.dt
$ wget -q https://raw.githubusercontent.com/raspberrypi/tools/master/mkimage/mkknlimg -O /tmp/mkknlimg.new
$ perl /tmp/mkknlimg.new kernel.img kernel.img.dt
$ echo $?
1
$ ls -la kernel*
-rwxrwxr-x 1 neil neil 6348816 Jan 5 10:25 kernel.img
So it looks like we need a new mkknlimg.
Setting the exit code to 1 when it fails to enable DT is (IMHO) a *good* thing - please make this behaviour optional if it isn't intentional, outputting Y or N is nice but not terribly useful to a build script which is testing the exit code (OpenELEC build scripts enable the -e shell option and will terminate when any command exits with a non-zero exit code).
Since the kernel in builds from #0102 onwards are apparently garbage from a DT perspective, there's a clean OpenELEC kernel here: dropbox.