From 07738bc0f8858c14b018178d7881f4e07b3a59b5 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Mon, 29 Jul 2019 13:39:27 +0800
Subject: [PATCH] update linux-bsp build shell script and linux kernel patch, don't use initramfs but ubifs now

---
 ok335xD/linux-bsp/patches/gen_patch.sh             |    4 +-
 ok335xD/linux-bsp/patches/linux-3.2.0-ok335x.patch |   45 ++++++++++------------
 ok335xD/linux-bsp/build.sh                         |   12 ++++--
 3 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/ok335xD/linux-bsp/build.sh b/ok335xD/linux-bsp/build.sh
index fb9b394..911916c 100755
--- a/ok335xD/linux-bsp/build.sh
+++ b/ok335xD/linux-bsp/build.sh
@@ -82,6 +82,7 @@
 
 
 	show_banner "|          start uboot build task...          |"
+    chmod a+x build.sh
     bash build.sh
 	show_banner "|           uboot build task over!            |"
 
@@ -92,7 +93,7 @@
 function build_kernel()
 {
     if [ ! -d ${ROOTFS_SRC} ] ; then 
-        echo "WARNNING: Maybe need input sudo passwd here: "
+        echo "WARNNING: decompress rootfs need input sudo passwd here: "
         sudo tar -xJf ${PACK_PATH}/${ROOTFS_SRC}.tar.xz
     fi
 
@@ -105,8 +106,8 @@
     fi
 
 	show_banner "|           start kernel build task...        |"
-    echo "WARNNING: Maybe need input sudo passwd here: "
-    sudo bash build.sh
+    chmod a+x build.sh
+    bash build.sh
 	show_banner "|            kernel build task over!          |"
 
 	cd -
@@ -135,7 +136,7 @@
 function build_rootfs()
 {
     if [ ! -d ${ROOTFS_SRC} ] ; then 
-        echo "WARNNING: Maybe need input sudo passwd here: "
+        echo "WARNNING: decompress rootfs need input sudo passwd here: "
         sudo tar -xJf ${PACK_PATH}/${ROOTFS_SRC}.tar.xz
     fi
 
@@ -150,6 +151,9 @@
     if [ -d ${TFTP_PATH} ] ; then
         cp -f ${ROOTFS_IMG} ${TFTP_PATH}
     fi
+
+    rm -f ${ROOTFS_IMG}
+    ls ${IMGS_PATH}
 }
 
 
diff --git a/ok335xD/linux-bsp/patches/gen_patch.sh b/ok335xD/linux-bsp/patches/gen_patch.sh
index 164bd19..4aebbe5 100755
--- a/ok335xD/linux-bsp/patches/gen_patch.sh
+++ b/ok335xD/linux-bsp/patches/gen_patch.sh
@@ -17,8 +17,8 @@
         cp .config .cfg-${BOARD}
     fi
 
-    echo "WARNNING: Maybe need input sudo passwd here: "
-    sudo bash build.sh clean
+    #echo "WARNNING: Maybe need input sudo passwd here: "
+    bash build.sh clean
 }
 
 if [ $# != 1 ] ; then
diff --git a/ok335xD/linux-bsp/patches/linux-3.2.0-ok335x.patch b/ok335xD/linux-bsp/patches/linux-3.2.0-ok335x.patch
index 7938ec2..c9c12df 100644
--- a/ok335xD/linux-bsp/patches/linux-3.2.0-ok335x.patch
+++ b/ok335xD/linux-bsp/patches/linux-3.2.0-ok335x.patch
@@ -1,6 +1,20 @@
+diff -Nuar linux-3.2.0/arch/arm/mach-omap2/board-am335xevm.c linux-3.2.0-ok335x/arch/arm/mach-omap2/board-am335xevm.c
+--- linux-3.2.0/arch/arm/mach-omap2/board-am335xevm.c	2014-01-22 18:20:21.000000000 +0800
++++ linux-3.2.0-ok335x/arch/arm/mach-omap2/board-am335xevm.c	2019-07-29 13:35:32.026115491 +0800
+@@ -2160,8 +2160,8 @@
+ 		&am335x_nand_timings);
+ 	if (!pdata)
+ 		return;
+-//	pdata->ecc_opt =OMAP_ECC_BCH8_CODE_HW;
+-        pdata->ecc_opt =OMAP_ECC_HAMMING_CODE_DEFAULT;
++	pdata->ecc_opt =OMAP_ECC_BCH8_CODE_HW;
++    //pdata->ecc_opt =OMAP_ECC_HAMMING_CODE_DEFAULT;
+ 
+ 	pdata->elm_used = true;
+ 	gpmc_device[0].pdata = pdata;
 diff -Nuar linux-3.2.0/build.sh linux-3.2.0-ok335x/build.sh
 --- linux-3.2.0/build.sh	1970-01-01 08:00:00.000000000 +0800
-+++ linux-3.2.0-ok335x/build.sh	2019-07-28 19:50:53.620890149 +0800
++++ linux-3.2.0-ok335x/build.sh	2019-07-29 13:34:57.430114827 +0800
 @@ -0,0 +1,74 @@
 +#!/bin/bash
 +
@@ -8,7 +22,7 @@
 +IMGS_PATH=../images
 +IMG_NAME=uImage
 +
-+INITRAMFS=YES
++#INITRAMFS=YES
 +
 +CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
 +JOBS=`cat /proc/cpuinfo |grep "processor"|wc -l`
@@ -78,8 +92,8 @@
 +
 diff -Nuar linux-3.2.0/.cfg-ok335x linux-3.2.0-ok335x/.cfg-ok335x
 --- linux-3.2.0/.cfg-ok335x	1970-01-01 08:00:00.000000000 +0800
-+++ linux-3.2.0-ok335x/.cfg-ok335x	2019-07-28 19:30:47.652867015 +0800
-@@ -0,0 +1,2955 @@
++++ linux-3.2.0-ok335x/.cfg-ok335x	2019-07-29 13:30:10.022109314 +0800
+@@ -0,0 +1,2936 @@
 +#
 +# Automatically generated file; DO NOT EDIT.
 +# Linux/arm 3.2.0 Kernel Configuration
@@ -169,21 +183,7 @@
 +# CONFIG_SCHED_AUTOGROUP is not set
 +# CONFIG_SYSFS_DEPRECATED is not set
 +# CONFIG_RELAY is not set
-+CONFIG_BLK_DEV_INITRD=y
-+CONFIG_INITRAMFS_SOURCE="../rootfs"
-+CONFIG_INITRAMFS_ROOT_UID=0
-+CONFIG_INITRAMFS_ROOT_GID=0
-+CONFIG_RD_GZIP=y
-+CONFIG_RD_BZIP2=y
-+CONFIG_RD_LZMA=y
-+CONFIG_RD_XZ=y
-+CONFIG_RD_LZO=y
-+CONFIG_INITRAMFS_COMPRESSION_NONE=y
-+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
-+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
-+# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set
-+# CONFIG_INITRAMFS_COMPRESSION_XZ is not set
-+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
++# CONFIG_BLK_DEV_INITRD is not set
 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 +CONFIG_SYSCTL=y
 +CONFIG_ANON_INODES=y
@@ -3023,11 +3023,6 @@
 +CONFIG_XZ_DEC_SPARC=y
 +CONFIG_XZ_DEC_BCJ=y
 +# CONFIG_XZ_DEC_TEST is not set
-+CONFIG_DECOMPRESS_GZIP=y
-+CONFIG_DECOMPRESS_BZIP2=y
-+CONFIG_DECOMPRESS_LZMA=y
-+CONFIG_DECOMPRESS_XZ=y
-+CONFIG_DECOMPRESS_LZO=y
 +CONFIG_GENERIC_ALLOCATOR=y
 +CONFIG_HAS_IOMEM=y
 +CONFIG_HAS_IOPORT=y
@@ -3037,7 +3032,7 @@
 +# CONFIG_CORDIC is not set
 diff -Nuar linux-3.2.0/Makefile linux-3.2.0-ok335x/Makefile
 --- linux-3.2.0/Makefile	2019-07-28 20:25:29.000000000 +0800
-+++ linux-3.2.0-ok335x/Makefile	2019-07-28 19:48:39.992887585 +0800
++++ linux-3.2.0-ok335x/Makefile	2019-07-29 13:07:08.678082816 +0800
 @@ -192,8 +192,8 @@
  # Default value for CROSS_COMPILE is not to prefix executables
  # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile

--
Gitblit v1.9.1