From 36ae17dd596da2f70698a90c64e16f7120f388b1 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Tue, 31 Jan 2017 19:21:09 +0300 Subject: [PATCH] Apply sunxi FB switching patch only to default branch --- common.sh | 13 +++++++---- .../u-boot-fix-screen-switch.patch | 22 +++++++++++++++++++ .../h3-add-disp2-video-driver-jernej.patch | 4 ++-- 3 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 patch/u-boot/u-boot-sunxi/branch_default/u-boot-fix-screen-switch.patch diff --git a/common.sh b/common.sh index 5ae86279cd..aae147024d 100644 --- a/common.sh +++ b/common.sh @@ -75,7 +75,7 @@ compile_uboot() (cd $SOURCES/$BOOTSOURCEDIR; make clean > /dev/null 2>&1) fi - [[ $FORCE_CHECKOUT == yes ]] && advanced_patch "u-boot" "$BOOTPATCHDIR" "$BOARD" "$target_patchdir" "${LINUXFAMILY}-${BOARD}-${BRANCH}" + [[ $FORCE_CHECKOUT == yes ]] && advanced_patch "u-boot" "$BOOTPATCHDIR" "$BOARD" "$target_patchdir" "$BRANCH" "${LINUXFAMILY}-${BOARD}-${BRANCH}" # create patch for manual source changes [[ $CREATE_PATCHES == yes ]] && userpatch_create "u-boot" @@ -190,7 +190,7 @@ compile_kernel() [[ $FORCE_CHECKOUT == yes ]] && patch --batch --silent -t -p1 < $SRC/lib/patch/kernel/compiler.patch >> $DEST/debug/output.log 2>&1 fi - [[ $FORCE_CHECKOUT == yes ]] && advanced_patch "kernel" "$LINUXFAMILY-$BRANCH" "$BOARD" "" "$LINUXFAMILY-$BRANCH" + [[ $FORCE_CHECKOUT == yes ]] && advanced_patch "kernel" "$LINUXFAMILY-$BRANCH" "$BOARD" "" "$BRANCH" "$LINUXFAMILY-$BRANCH" # create patch for manual source changes in debug mode [[ $CREATE_PATCHES == yes ]] && userpatch_create "kernel" @@ -331,7 +331,7 @@ find_toolchain() echo "$toolchain" } -# advanced_patch +# advanced_patch # # parameters: # : u-boot, kernel @@ -343,9 +343,11 @@ find_toolchain() # priority: # $SRC/userpatches///target_ # $SRC/userpatches///board_ +# $SRC/userpatches///branch_ # $SRC/userpatches// # $SRC/lib/patch///target_ # $SRC/lib/patch///board_ +# $SRC/lib/patch///branch_ # $SRC/lib/patch// # advanced_patch() @@ -354,7 +356,8 @@ advanced_patch() local family=$2 local board=$3 local target=$4 - local description=$5 + local branch=$5 + local description=$6 display_alert "Started patching process for" "$dest $description" "info" display_alert "Looking for user patches in" "userpatches/$dest/$family" "info" @@ -363,9 +366,11 @@ advanced_patch() local dirs=( "$SRC/userpatches/$dest/$family/target_${target}:[\e[33mu\e[0m][\e[34mt\e[0m]" "$SRC/userpatches/$dest/$family/board_${board}:[\e[33mu\e[0m][\e[35mb\e[0m]" + "$SRC/userpatches/$dest/$family/branch_${branch}:[\e[33mu\e[0m][\e[33mb\e[0m]" "$SRC/userpatches/$dest/$family:[\e[33mu\e[0m][\e[32mc\e[0m]" "$SRC/lib/patch/$dest/$family/target_${target}:[\e[32ml\e[0m][\e[34mt\e[0m]" "$SRC/lib/patch/$dest/$family/board_${board}:[\e[32ml\e[0m][\e[35mb\e[0m]" + "$SRC/lib/patch/$dest/$family/branch_${branch}:[\e[32ml\e[0m][\e[33mb\e[0m]" "$SRC/lib/patch/$dest/$family:[\e[32ml\e[0m][\e[32mc\e[0m]" ) diff --git a/patch/u-boot/u-boot-sunxi/branch_default/u-boot-fix-screen-switch.patch b/patch/u-boot/u-boot-sunxi/branch_default/u-boot-fix-screen-switch.patch new file mode 100644 index 0000000000..bae4ab8c6b --- /dev/null +++ b/patch/u-boot/u-boot-sunxi/branch_default/u-boot-fix-screen-switch.patch @@ -0,0 +1,22 @@ +diff --git a/drivers/video/sunxi_display2.c b/drivers/video/sunxi_display2.c +index db376d993..b64bd3648 100644 +--- a/drivers/video/sunxi_display2.c ++++ b/drivers/video/sunxi_display2.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + #include "videomodes.h" +@@ -948,8 +949,7 @@ void *video_hw_init(void) + sunxi_get_mon_desc(sunxi_display.monitor), + overscan_x, overscan_y); + +- gd->fb_base = gd->bd->bi_dram[0].start + +- gd->bd->bi_dram[0].size - sunxi_display.fb_size; ++ gd->fb_base = (unsigned long)memalign(0x1000, sunxi_display.fb_size); + sunxi_engines_init(); + + fb_dma_addr = gd->fb_base; diff --git a/patch/u-boot/u-boot-sunxi/h3-add-disp2-video-driver-jernej.patch b/patch/u-boot/u-boot-sunxi/h3-add-disp2-video-driver-jernej.patch index 09add1b94e..7682670718 100644 --- a/patch/u-boot/u-boot-sunxi/h3-add-disp2-video-driver-jernej.patch +++ b/patch/u-boot/u-boot-sunxi/h3-add-disp2-video-driver-jernej.patch @@ -703,7 +703,6 @@ index 0000000..db376d9 +#include +#include +#include -+#include +#include +#include "videomodes.h" + @@ -1626,7 +1625,8 @@ index 0000000..db376d9 + sunxi_get_mon_desc(sunxi_display.monitor), + overscan_x, overscan_y); + -+ gd->fb_base = (unsigned long)memalign(0x1000, sunxi_display.fb_size); ++ gd->fb_base = gd->bd->bi_dram[0].start + ++ gd->bd->bi_dram[0].size - sunxi_display.fb_size; + sunxi_engines_init(); + + fb_dma_addr = gd->fb_base;