From fb6b7648626cfb7502e9478461a3e757673bb70e Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Fri, 02 Aug 2019 01:02:25 +0800
Subject: [PATCH] update linux kernel patch, fix touchscreen not work bug; update u-boot patch, add tb support
---
ok335xD/linux-bsp/patches/u-boot-2011.09-ok335x.patch | 101 ++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 88 insertions(+), 13 deletions(-)
diff --git a/ok335xD/linux-bsp/patches/u-boot-2011.09-ok335x.patch b/ok335xD/linux-bsp/patches/u-boot-2011.09-ok335x.patch
index d8c0388..49aabe8 100644
--- a/ok335xD/linux-bsp/patches/u-boot-2011.09-ok335x.patch
+++ b/ok335xD/linux-bsp/patches/u-boot-2011.09-ok335x.patch
@@ -1,7 +1,7 @@
diff -Nuar u-boot-2011.09/build.sh u-boot-2011.09-ok335x/build.sh
--- u-boot-2011.09/build.sh 1970-01-01 08:00:00.000000000 +0800
-+++ u-boot-2011.09-ok335x/build.sh 2019-08-01 16:36:13.003295528 +0800
-@@ -0,0 +1,67 @@
++++ u-boot-2011.09-ok335x/build.sh 2019-08-01 23:06:07.067744283 +0800
+@@ -0,0 +1,66 @@
+#!/bin/bash
+
+TFTP_PATH=/tftp
@@ -9,8 +9,7 @@
+IMG_NAME="u-boot.img MLO"
+
+CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
-+#JOBS=`cat /proc/cpuinfo |grep "processor"|wc -l`
-+JOBS=1
++JOBS=`cat /proc/cpuinfo |grep "processor"|wc -l`
+
+
+function do_clean()
@@ -69,9 +68,83 @@
+do_install
+
+
+diff -Nuar u-boot-2011.09/common/cmd_led_flash.c u-boot-2011.09-ok335x/common/cmd_led_flash.c
+--- u-boot-2011.09/common/cmd_led_flash.c 2014-01-18 11:05:20.000000000 +0800
++++ u-boot-2011.09-ok335x/common/cmd_led_flash.c 2019-08-01 23:06:07.067744283 +0800
+@@ -13,6 +13,11 @@
+
+ extern int g_on;
+
++void lcd_backlight_on(void)
++{
++ __raw_writel(1<<7, 0x44E07194);
++}
++
+ void update_led()
+ {
+ static u32 n = 0;
+diff -Nuar u-boot-2011.09/drivers/video/cfb_console.c u-boot-2011.09-ok335x/drivers/video/cfb_console.c
+--- u-boot-2011.09/drivers/video/cfb_console.c 2013-12-04 14:05:19.000000000 +0800
++++ u-boot-2011.09-ok335x/drivers/video/cfb_console.c 2019-08-01 23:06:07.067744283 +0800
+@@ -1820,7 +1820,7 @@
+
+ return 0;
+ }
+-int g_on = 0;
++int g_on = 1;
+ void show_process(unsigned long a,unsigned long b)
+ {
+ static int last_percent = 100,type = 0;
+@@ -1833,6 +1833,7 @@
+ if(percent != last_percent)
+ {
+ update_led();
++ lcd_backlight_on();
+
+ /*update uart console*/
+ printf("\r%02d%% complete",percent);
+@@ -1849,34 +1850,19 @@
+ switch(type)
+ {
+ case 0:
+- title = "Erasing nand chip............";
++ title = "Burning Env to nand...";
+ break;
+ case 1:
+- title = "Reading MLO from MMC.........";
++ title = "Burning bootloader to nand...";
+ break;
+ case 2:
+- title = "Burning MLO to nand..........";
+- break;
+- case 3:
+- title = "Reading u-boot.img from MMC..";
+- break;
+- case 4:
+- title = "Burning u-boot.img to nand...";
+- break;
+- case 5:
+- title = "Reading uImage from MMC......";
+- break;
+- case 6:
+ title = "Burning uImage to nand.......";
+ break;
+- case 7:
+- title = "Reading ubi.img from MMC.....";
+- break;
+- case 8:
++ case 3:
+ title = "Burning ubi.img to nand......";
+ break;
+ default:
+- title = "env is null..................";
++ title = "env TYPE is null..................";
+ break;
+ }
+
diff -Nuar u-boot-2011.09/include/configs/ok335x.h u-boot-2011.09-ok335x/include/configs/ok335x.h
--- u-boot-2011.09/include/configs/ok335x.h 2014-01-23 09:45:03.000000000 +0800
-+++ u-boot-2011.09-ok335x/include/configs/ok335x.h 2019-08-01 18:04:47.259397469 +0800
++++ u-boot-2011.09-ok335x/include/configs/ok335x.h 2019-08-02 00:26:56.203837301 +0800
@@ -61,17 +61,11 @@
"nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0" \
"nandrootfstype=ubifs rootwait=1\0"
@@ -92,7 +165,7 @@
#define CONFIG_MMC
#define CONFIG_NAND
-@@ -81,141 +75,30 @@
+@@ -81,141 +75,32 @@
#define CONFIG_CFB_CONSOLE
#define CONFIG_VGA_AS_SINGLE_DEVICE
@@ -242,20 +315,22 @@
+ "set kernaddr 0x100000; set kernsize 0x500000; set rootaddr 0x600000; set rootsize 0x9600000 \0" \
+ "confimgs=set spl 'MLO'; set uboot 'u-boot.img'; set kernel 'uImage'; set rootfs 'ubifs.img' \0" \
+ "conf=run confaddr; run confimgs; set filesize 0x20000; \0" \
-+ "bbl=run conf; nand erase 0 100000; tftp ${loadaddr} ${spl}; nandecc hw 2; nand write.i ${loadaddr} ${spladdr} ${filesize}; " \
++ "benv=run confaddr; set TYPE 0; nandecc hw 0; nand erase ${envaddr} ${envsize}; save\0" \
++ "bbl=run conf; set TYPE 1; nand erase 0 100000; tftp ${loadaddr} ${spl}; " \
++ "nandecc hw 2; nand write.i ${loadaddr} ${spladdr} ${filesize}; " \
+ "tftp ${uboot}; nandecc hw 2;nand write.i ${loadaddr} ${ubootaddr} ${filesize}\0" \
-+ "benv=run confaddr; nandecc hw 0; nand erase ${envaddr} ${envsize}; save\0" \
-+ "bkr=run conf; tftp ${loadaddr} ${kernel}; nand erase ${kernaddr} ${kernsize}; "\
++ "bkr=run conf; set TYPE 2; tftp ${loadaddr} ${kernel}; nand erase ${kernaddr} ${kernsize}; "\
+ "nandecc hw 2; nand write.i ${loadaddr} ${kernaddr} ${filesize}\0" \
-+ "bfs=run conf; tftp ${loadaddr} ${rootfs}; nand erase ${rootaddr} ${rootsize}; "\
++ "bfs=run conf; set TYPE 3; tftp ${loadaddr} ${rootfs}; nand erase ${rootaddr} ${rootsize}; "\
+ "nandecc hw 2; nand write.i ${loadaddr} ${rootaddr} ${filesize}\0" \
-+ "bsys=nand scrub.chip; run conf; run bbl; run bkr; run bfs; reset\0"
++ "bsys=nand scrub.chip; run conf; run bbl; run bkr; run bfs; reset\0" \
++ "tb=run conf; tftp ${loadaddr} ${kernel}; bootm ${loadaddr} \0"
+
#define CONFIG_MISC_INIT_R
#define CONFIG_SYS_AUTOLOAD "yes"
#define CONFIG_CMD_CACHE
-@@ -412,7 +295,7 @@
+@@ -412,7 +297,7 @@
#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
#define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
@@ -266,7 +341,7 @@
#define CONFIG_ENV_ADDR MNAND_ENV_OFFSET
diff -Nuar u-boot-2011.09/Makefile u-boot-2011.09-ok335x/Makefile
--- u-boot-2011.09/Makefile 2013-11-20 14:14:16.000000000 +0800
-+++ u-boot-2011.09-ok335x/Makefile 2019-08-01 15:09:30.547195733 +0800
++++ u-boot-2011.09-ok335x/Makefile 2019-08-01 23:06:07.071744283 +0800
@@ -155,6 +155,8 @@
# load ARCH, BOARD, and CPU configuration
include $(obj)include/config.mk
--
Gitblit v1.9.1