From 3dfc0750029f4515b6974d24082163c1f65e9e4d Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Sun, 25 Oct 2015 17:09:07 +0000 Subject: [PATCH 1/5] [RBP] Drop mkknlimg, use version shipped with kernel --- scripts/image | 2 +- scripts/mkknlimg | 295 ----------------------------------------------- 2 files changed, 1 insertion(+), 296 deletions(-) delete mode 100755 scripts/mkknlimg diff --git a/scripts/image b/scripts/image index 3175e3be6b..60344355a0 100755 --- a/scripts/image +++ b/scripts/image @@ -210,7 +210,7 @@ fi if [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then echo "injecting DeviceTreeBlobs to kernel..." - perl scripts/mkknlimg $BUILD/linux-*/arch/$KERNEL_ARCH/boot/$KERNEL_IMAGE $TARGET_IMG/$IMAGE_NAME.kernel + perl $BUILD/linux-*/scripts/mkknlimg $BUILD/linux-*/arch/$KERNEL_ARCH/boot/$KERNEL_IMAGE $TARGET_IMG/$IMAGE_NAME.kernel echo "...done" else cp -PR $BUILD/linux-*/arch/$KERNEL_ARCH/boot/$KERNEL_IMAGE $TARGET_IMG/$IMAGE_NAME.kernel diff --git a/scripts/mkknlimg b/scripts/mkknlimg deleted file mode 100755 index b2bf5f9b67..0000000000 --- a/scripts/mkknlimg +++ /dev/null @@ -1,295 +0,0 @@ -#!/usr/bin/env perl -# ---------------------------------------------------------------------- -# mkknlimg by Phil Elwell for Raspberry Pi -# based on extract-ikconfig by Dick Streefland -# -# (c) 2009,2010 Dick Streefland -# (c) 2014,2015 Raspberry Pi (Trading) Limited -# -# Licensed under the terms of the GNU General Public License. -# ---------------------------------------------------------------------- - -use strict; -use warnings; -use integer; - -use constant FLAG_PI => 1; -use constant FLAG_DTOK => 2; -use constant FLAG_DDTK => 4; -use constant FLAG_283X => 8; - -my $trailer_magic = 'RPTL'; - -my $tmpfile1 = "/tmp/mkknlimg_$$.1"; -my $tmpfile2 = "/tmp/mkknlimg_$$.2"; - -my $dtok = 0; -my $ddtk = 0; -my $is_283x = 0; - -while (@ARGV && ($ARGV[0] =~ /^-/)) -{ - my $arg = shift(@ARGV); - if ($arg eq '--dtok') - { - $dtok = 1; - } - elsif ($arg eq '--ddtk') - { - $ddtk = 1; - } - elsif ($arg eq '--283x') - { - $is_283x = 1; - } - else - { - print ("* Unknown option '$arg'\n"); - usage(); - } -} - -usage() if (@ARGV != 2); - -my $kernel_file = $ARGV[0]; -my $out_file = $ARGV[1]; - -if (! -r $kernel_file) -{ - print ("* File '$kernel_file' not found\n"); - usage(); -} - -my $wanted_configs = -{ - 'CONFIG_BCM2708_DT' => FLAG_PI | FLAG_DTOK, - 'CONFIG_ARCH_BCM2835' => FLAG_PI | FLAG_DTOK | FLAG_283X, -}; - -my $wanted_strings = -{ - 'bcm2708_fb' => FLAG_PI, - 'brcm,bcm2835-mmc' => FLAG_PI, - 'brcm,bcm2835-sdhost' => FLAG_PI, - 'brcm,bcm2708-pinctrl' => FLAG_PI | FLAG_DTOK, - 'brcm,bcm2835-gpio' => FLAG_PI | FLAG_DTOK, - 'brcm,bcm2835-pm-wdt' => FLAG_PI | FLAG_DTOK | FLAG_283X, - 'of_overlay_apply' => FLAG_DTOK | FLAG_DDTK, -}; - -my $res = try_extract($kernel_file, $tmpfile1); -$res ||= try_decompress('\037\213\010', 'xy', 'gunzip', 0, - $kernel_file, $tmpfile1, $tmpfile2); -$res ||= try_decompress('\3757zXZ\000', 'abcde', 'unxz --single-stream', -1, - $kernel_file, $tmpfile1, $tmpfile2); -$res ||= try_decompress('BZh', 'xy', 'bunzip2', 0, - $kernel_file, $tmpfile1, $tmpfile2); -$res ||= try_decompress('\135\0\0\0', 'xxx', 'unlzma', 0, - $kernel_file, $tmpfile1, $tmpfile2); -$res ||= try_decompress('\211\114\132', 'xy', 'lzop -d', 0, - $kernel_file, $tmpfile1, $tmpfile2); -$res ||= try_decompress('\002\041\114\030', 'xy', 'lz4 -d', 1, - $kernel_file, $tmpfile1, $tmpfile2); - -my $append_trailer; -my $trailer; -my $kver = '?'; - -$append_trailer = $dtok; - -if ($res) -{ - $kver = $res->{'kver'} || '?'; - my $flags = $res->{'flags'}; - print("Version: $kver\n"); - - if ($flags & FLAG_PI) - { - $append_trailer = 1; - $dtok ||= ($flags & FLAG_DTOK) != 0; - $is_283x ||= ($flags & FLAG_283X) != 0; - $ddtk ||= ($flags & FLAG_DDTK) != 0; - } - else - { - print ("* This doesn't look like a Raspberry Pi kernel. In pass-through mode.\n"); - } -} -elsif (!$dtok) -{ - print ("* Is this a valid kernel? In pass-through mode.\n"); -} - -if ($append_trailer) -{ - printf("DT: %s\n", $dtok ? "y" : "n"); - printf("DDT: %s\n", $ddtk ? "y" : "n"); - printf("283x: %s\n", $is_283x ? "y" : "n"); - - my @atoms; - - push @atoms, [ $trailer_magic, pack('V', 0) ]; - push @atoms, [ 'KVer', $kver ]; - push @atoms, [ 'DTOK', pack('V', $dtok) ]; - push @atoms, [ 'DDTK', pack('V', $ddtk) ]; - push @atoms, [ '283x', pack('V', $is_283x) ]; - - $trailer = pack_trailer(\@atoms); - $atoms[0]->[1] = pack('V', length($trailer)); - - $trailer = pack_trailer(\@atoms); -} - -my $ofh; -my $total_len = 0; - -if ($out_file eq $kernel_file) -{ - die "* Failed to open '$out_file' for append\n" - if (!open($ofh, '>>', $out_file)); - $total_len = tell($ofh); -} -else -{ - die "* Failed to open '$kernel_file'\n" - if (!open(my $ifh, '<', $kernel_file)); - die "* Failed to create '$out_file'\n" - if (!open($ofh, '>', $out_file)); - - my $copybuf; - while (1) - { - my $bytes = sysread($ifh, $copybuf, 64*1024); - last if (!$bytes); - syswrite($ofh, $copybuf, $bytes); - $total_len += $bytes; - } - close($ifh); -} - -if ($trailer) -{ - # Pad to word-alignment - syswrite($ofh, "\x000\x000\x000", (-$total_len & 0x3)); - syswrite($ofh, $trailer); -} - -close($ofh); - -exit($trailer ? 0 : 1); - -END { - unlink($tmpfile1) if ($tmpfile1); - unlink($tmpfile2) if ($tmpfile2); -} - - -sub usage -{ - print ("Usage: mkknlimg [--dtok] [--283x] \n"); - exit(1); -} - -sub try_extract -{ - my ($knl, $tmp) = @_; - - my $ver = `strings "$knl" | grep -a -E "^Linux version [1-9]"`; - - return undef if (!$ver); - - chomp($ver); - - my $res = { 'kver'=>$ver }; - $res->{'flags'} = strings_to_flags($knl, $wanted_strings) | - configs_to_flags($knl, $tmp, $wanted_configs); - - return $res; -} - - -sub try_decompress -{ - my ($magic, $subst, $zcat, $idx, $knl, $tmp1, $tmp2) = @_; - - my $pos = `tr "$magic\n$subst" "\n$subst=" < "$knl" | grep -abo "^$subst"`; - if ($pos) - { - chomp($pos); - $pos = (split(/[\r\n]+/, $pos))[$idx]; - return undef if (!defined($pos)); - $pos =~ s/:.*[\r\n]*$//s; - my $cmd = "tail -c+$pos \"$knl\" | $zcat > $tmp2 2> /dev/null"; - my $err = (system($cmd) >> 8); - return undef if (($err != 0) && ($err != 2)); - - return try_extract($tmp2, $tmp1); - } - - return undef; -} - - -sub strings_to_flags -{ - my ($knl, $strings) = @_; - my $string_pattern = '^('.join('|', keys(%$strings)).')$'; - my $flags = 0; - - my @matches = `strings \"$knl\" | grep -E \"$string_pattern\"`; - foreach my $match (@matches) - { - chomp($match); - $flags |= $strings->{$match}; - } - - return $flags; -} - -sub configs_to_flags -{ - my ($knl, $tmp, $configs) = @_; - my $config_pattern = '^('.join('|', keys(%$configs)).')=(.*)$'; - my $cf1 = 'IKCFG_ST\037\213\010'; - my $cf2 = '0123456789'; - my $flags = 0; - - my $pos = `tr "$cf1\n$cf2" "\n$cf2=" < "$knl" | grep -abo "^$cf2"`; - if ($pos) - { - $pos =~ s/:.*[\r\n]*$//s; - $pos += 8; - my $err = (system("tail -c+$pos \"$knl\" | zcat > $tmp 2> /dev/null") >> 8); - if (($err == 0) || ($err == 2)) - { - if (open(my $fh, '<', $tmp)) - { - while (my $line = <$fh>) - { - chomp($line); - if (($line =~ /$config_pattern/) && - (($2 eq 'y') || ($2 eq 'm'))) - { - $flags |= $configs->{$1}; - } - } - - close($fh); - } - } - } - - return $flags; -} - -sub pack_trailer -{ - my ($atoms) = @_; - my $trailer = pack('VV', 0, 0); - for (my $i = $#$atoms; $i>=0; $i--) - { - my $atom = $atoms->[$i]; - $trailer .= pack('a*x!4Va4', $atom->[1], length($atom->[1]), $atom->[0]); - } - return $trailer; -} From 0f415ed2f3b9f5e76e3565ada25b069fd8e2dfc1 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Sun, 25 Oct 2015 21:34:08 +0000 Subject: [PATCH 2/5] [RBP] Use actual kernel_version in place of wildcard --- scripts/image | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/image b/scripts/image index 60344355a0..4917dae84c 100755 --- a/scripts/image +++ b/scripts/image @@ -210,10 +210,10 @@ fi if [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then echo "injecting DeviceTreeBlobs to kernel..." - perl $BUILD/linux-*/scripts/mkknlimg $BUILD/linux-*/arch/$KERNEL_ARCH/boot/$KERNEL_IMAGE $TARGET_IMG/$IMAGE_NAME.kernel + perl $BUILD/linux-$(kernel_version)/scripts/mkknlimg $BUILD/linux-$(kernel_version)/arch/$KERNEL_ARCH/boot/$KERNEL_IMAGE $TARGET_IMG/$IMAGE_NAME.kernel echo "...done" else - cp -PR $BUILD/linux-*/arch/$KERNEL_ARCH/boot/$KERNEL_IMAGE $TARGET_IMG/$IMAGE_NAME.kernel + cp -PR $BUILD/linux-$(kernel_version)/arch/$KERNEL_ARCH/boot/$KERNEL_IMAGE $TARGET_IMG/$IMAGE_NAME.kernel fi chmod 0644 $TARGET_IMG/$IMAGE_NAME.kernel From 3c411691922d6c68c163ee263667a9587f0f8747 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 27 Oct 2015 09:57:20 +0100 Subject: [PATCH 3/5] kodi: add PR8254 Signed-off-by: Stephan Raue --- .../kodi/patches/kodi-999.22-PR8254.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 packages/mediacenter/kodi/patches/kodi-999.22-PR8254.patch diff --git a/packages/mediacenter/kodi/patches/kodi-999.22-PR8254.patch b/packages/mediacenter/kodi/patches/kodi-999.22-PR8254.patch new file mode 100644 index 0000000000..ef26dc153d --- /dev/null +++ b/packages/mediacenter/kodi/patches/kodi-999.22-PR8254.patch @@ -0,0 +1,35 @@ +From ee014b442eac3e85178c89d04691f4fc73cf89e4 Mon Sep 17 00:00:00 2001 +From: "Chris \"Koying\" Browet" +Date: Sun, 18 Oct 2015 11:24:00 +0200 +Subject: [PATCH] FIX: Only handle 3D bitmap subs in TAB + +3D bitmap subs cannot be detected in SBS, and there is always the option +to play with Kodi 3D disabled +--- + xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp +index dca4bdf..c9a0008 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp +@@ -257,18 +257,13 @@ CDVDOverlay* CDVDOverlayCodecFFmpeg::GetOverlay() + } + + RENDER_STEREO_MODE render_stereo_mode = g_graphicsContext.GetStereoMode(); +- if (render_stereo_mode != RENDER_STEREO_MODE_OFF) ++ if (render_stereo_mode == RENDER_STEREO_MODE_SPLIT_HORIZONTAL) + { + if (rect.h > m_height / 2) + { + m_height /= 2; + rect.h /= 2; + } +- else if (rect.w > m_width / 2) +- { +- m_width /= 2; +- rect.w /= 2; +- } + } + + CDVDOverlayImage* overlay = new CDVDOverlayImage(); From 24fc5b391cc1c4d0f85ff27c28ba088e9f21d89e Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 27 Oct 2015 09:57:34 +0100 Subject: [PATCH 4/5] kodi: add upstream patch Signed-off-by: Stephan Raue --- ..._screensaver_to_animate_when_closing.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 packages/mediacenter/kodi/patches/kodi-999.99-Allow_Dim_screensaver_to_animate_when_closing.patch diff --git a/packages/mediacenter/kodi/patches/kodi-999.99-Allow_Dim_screensaver_to_animate_when_closing.patch b/packages/mediacenter/kodi/patches/kodi-999.99-Allow_Dim_screensaver_to_animate_when_closing.patch new file mode 100644 index 0000000000..6a5220807e --- /dev/null +++ b/packages/mediacenter/kodi/patches/kodi-999.99-Allow_Dim_screensaver_to_animate_when_closing.patch @@ -0,0 +1,40 @@ +diff -Naur kodi-15.2-02e7013/xbmc/windows/GUIWindowScreensaverDim.cpp kodi-15.2-02e7013.patch/xbmc/windows/GUIWindowScreensaverDim.cpp +--- kodi-15.2-02e7013/xbmc/windows/GUIWindowScreensaverDim.cpp 2015-10-20 23:51:49.000000000 +0200 ++++ kodi-15.2-02e7013.patch/xbmc/windows/GUIWindowScreensaverDim.cpp 2015-10-26 08:33:22.899595510 +0100 +@@ -29,6 +29,7 @@ + { + m_needsScaling = false; + m_dimLevel = 100.0f; ++ m_newDimLevel = 100.0f; + m_animations.push_back(CAnimation::CreateFader(0, 100, 0, 1000, ANIM_TYPE_WINDOW_OPEN)); + m_animations.push_back(CAnimation::CreateFader(100, 0, 0, 1000, ANIM_TYPE_WINDOW_CLOSE)); + m_renderOrder = INT_MAX; +@@ -40,8 +41,8 @@ + + void CGUIWindowScreensaverDim::UpdateVisibility() + { +- m_dimLevel = g_application.GetDimScreenSaverLevel(); +- if (m_dimLevel) ++ m_newDimLevel = g_application.GetDimScreenSaverLevel(); ++ if (m_newDimLevel) + Show(); + else + Close(); +@@ -49,6 +50,8 @@ + + void CGUIWindowScreensaverDim::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) + { ++ if (m_newDimLevel != m_dimLevel && !IsAnimating(ANIM_TYPE_WINDOW_CLOSE)) ++ m_dimLevel = m_newDimLevel; + CGUIDialog::Process(currentTime, dirtyregions); + m_renderRegion.SetRect(0, 0, (float)g_graphicsContext.GetWidth(), (float)g_graphicsContext.GetHeight()); + } +diff -Naur kodi-15.2-02e7013/xbmc/windows/GUIWindowScreensaverDim.h kodi-15.2-02e7013.patch/xbmc/windows/GUIWindowScreensaverDim.h +--- kodi-15.2-02e7013/xbmc/windows/GUIWindowScreensaverDim.h 2015-10-20 23:51:49.000000000 +0200 ++++ kodi-15.2-02e7013.patch/xbmc/windows/GUIWindowScreensaverDim.h 2015-10-26 08:29:37.079092044 +0100 +@@ -34,4 +34,5 @@ + virtual void UpdateVisibility(); + private: + float m_dimLevel; ++ float m_newDimLevel; + }; From 0847aaecad3fc71bfe199daff8be22e824b11928 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 27 Oct 2015 09:58:31 +0100 Subject: [PATCH 5/5] projects/imx6/linux: build CONFIG_I2C_MUX as module Signed-off-by: Stephan Raue --- projects/imx6/linux/linux.arm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/imx6/linux/linux.arm.conf b/projects/imx6/linux/linux.arm.conf index f0ce2234f7..e15a479365 100644 --- a/projects/imx6/linux/linux.arm.conf +++ b/projects/imx6/linux/linux.arm.conf @@ -1961,7 +1961,7 @@ CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y # CONFIG_I2C_COMPAT is not set CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y +CONFIG_I2C_MUX=m # # Multiplexer I2C Chip support