Thjap_dev

6.1.1.B.0.253_6.1.1.B.1.10_diff

Nov 14th, 2012
280
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -ruN a/kernel/arch/arm/configs/riogrande_kumquat_defconfig b/kernel/arch/arm/configs/riogrande_kumquat_defconfig
  2. --- a/kernel/arch/arm/configs/riogrande_kumquat_defconfig   2012-11-07 19:01:47.000000000 +0900
  3. +++ b/kernel/arch/arm/configs/riogrande_kumquat_defconfig   2012-10-23 21:38:03.000000000 +0900
  4. @@ -1,5 +1,6 @@
  5.  CONFIG_EXPERIMENTAL=y
  6.  # CONFIG_LOCALVERSION_AUTO is not set
  7. +CONFIG_SWAP=y
  8.  CONFIG_SYSVIPC=y
  9.  CONFIG_BSD_PROCESS_ACCT=y
  10.  CONFIG_TASKSTATS=y
  11. @@ -350,7 +351,6 @@
  12.  CONFIG_ANDROID_RAM_CONSOLE=y
  13.  CONFIG_ANDROID_TIMED_GPIO=y
  14.  CONFIG_ANDROID_LOW_MEMORY_KILLER=y
  15. -CONFIG_ZRAM=y
  16.  CONFIG_CG2900=y
  17.  CONFIG_CG2900_CHIP=y
  18.  CONFIG_STLC2690_CHIP=y
  19. @@ -401,3 +401,4 @@
  20.  CONFIG_CRYPTO_DEV_UX500_HASH=y
  21.  CONFIG_CRC7=y
  22.  CONFIG_AVERAGE=y
  23. +CONFIG_ZRAM=y
  24. diff -ruN a/kernel/arch/arm/configs/riogrande_lotus_defconfig b/kernel/arch/arm/configs/riogrande_lotus_defconfig
  25. --- a/kernel/arch/arm/configs/riogrande_lotus_defconfig 2012-11-07 19:01:47.000000000 +0900
  26. +++ b/kernel/arch/arm/configs/riogrande_lotus_defconfig 2012-10-23 21:38:03.000000000 +0900
  27. @@ -1,5 +1,6 @@
  28.  CONFIG_EXPERIMENTAL=y
  29.  # CONFIG_LOCALVERSION_AUTO is not set
  30. +CONFIG_SWAP=y
  31.  CONFIG_SYSVIPC=y
  32.  CONFIG_BSD_PROCESS_ACCT=y
  33.  CONFIG_TASKSTATS=y
  34. @@ -352,7 +353,6 @@
  35.  CONFIG_ANDROID_RAM_CONSOLE=y
  36.  CONFIG_ANDROID_TIMED_GPIO=y
  37.  CONFIG_ANDROID_LOW_MEMORY_KILLER=y
  38. -CONFIG_ZRAM=y
  39.  CONFIG_CG2900=y
  40.  CONFIG_CG2900_CHIP=y
  41.  CONFIG_STLC2690_CHIP=y
  42. @@ -403,3 +403,4 @@
  43.  CONFIG_CRYPTO_DEV_UX500_HASH=y
  44.  CONFIG_CRC7=y
  45.  CONFIG_AVERAGE=y
  46. +CONFIG_ZRAM=y
  47. diff -ruN a/kernel/arch/arm/configs/riogrande_pepper_defconfig b/kernel/arch/arm/configs/riogrande_pepper_defconfig
  48. --- a/kernel/arch/arm/configs/riogrande_pepper_defconfig    2012-11-07 19:01:47.000000000 +0900
  49. +++ b/kernel/arch/arm/configs/riogrande_pepper_defconfig    2012-10-23 21:38:03.000000000 +0900
  50. @@ -1,5 +1,6 @@
  51.  CONFIG_EXPERIMENTAL=y
  52.  # CONFIG_LOCALVERSION_AUTO is not set
  53. +CONFIG_SWAP=y
  54.  CONFIG_SYSVIPC=y
  55.  CONFIG_BSD_PROCESS_ACCT=y
  56.  CONFIG_TASKSTATS=y
  57. @@ -352,7 +353,6 @@
  58.  CONFIG_ANDROID_RAM_CONSOLE=y
  59.  CONFIG_ANDROID_TIMED_GPIO=y
  60.  CONFIG_ANDROID_LOW_MEMORY_KILLER=y
  61. -CONFIG_ZRAM=y
  62.  CONFIG_CG2900=y
  63.  CONFIG_CG2900_CHIP=y
  64.  CONFIG_STLC2690_CHIP=y
  65. @@ -403,3 +403,4 @@
  66.  CONFIG_CRYPTO_DEV_UX500_HASH=y
  67.  CONFIG_CRC7=y
  68.  CONFIG_AVERAGE=y
  69. +CONFIG_ZRAM=y
  70. diff -ruN a/kernel/drivers/misc/clonedev/clonedev.c b/kernel/drivers/misc/clonedev/clonedev.c
  71. --- a/kernel/drivers/misc/clonedev/clonedev.c   2012-10-24 23:38:12.000000000 +0900
  72. +++ b/kernel/drivers/misc/clonedev/clonedev.c   2012-10-23 21:38:05.000000000 +0900
  73. @@ -48,7 +48,6 @@
  74.     struct compdev *src_compdev;
  75.     struct compdev *dst_compdev;
  76.     bool overlay_case;
  77. -   struct compdev_size src_size;
  78.     struct compdev_size dst_size;
  79.     struct compdev_rect crop_rect;
  80.     struct compdev_scene_info s_info;
  81. @@ -141,7 +140,8 @@
  82.     return req_id;
  83.  }
  84.  
  85. -static void clonedev_best_fit(struct compdev_rect *crop_rect,
  86. +static void clonedev_best_fit(struct compdev_rect *src_rect,
  87. +       struct compdev_rect *crop_rect,
  88.         struct compdev_rect *dst_rect,
  89.         enum   compdev_transform  transform)
  90.  {
  91. @@ -201,45 +201,6 @@
  92.         dst_rect->y += (crop_rect->height - dst_h) >> 1;
  93.  }
  94.  
  95. -static void clonedev_rescale_destrect(struct compdev_rect *boundary,
  96. -       struct compdev_size *src_size,
  97. -       struct compdev_rect *dst_rect,
  98. -       enum compdev_transform transform)
  99. -{
  100. -   uint32_t q, r, src_width;
  101. -   uint32_t x, y, height, width;
  102. -
  103. -   if (transform == COMPDEV_TRANSFORM_ROT_0) {
  104. -       x = dst_rect->x;
  105. -       y = dst_rect->y;
  106. -       width = dst_rect->width;
  107. -       height = dst_rect->height;
  108. -       src_width = src_size->width;
  109. -   } else if (transform == COMPDEV_TRANSFORM_ROT_90_CW) {
  110. -       x = src_size->height - dst_rect->y - dst_rect->height;
  111. -       y = dst_rect->x;
  112. -       width = dst_rect->height;
  113. -       height = dst_rect->width;
  114. -       src_width = src_size->height;
  115. -   } else if (transform == COMPDEV_TRANSFORM_ROT_90_CCW) {
  116. -       x = dst_rect->y;
  117. -       y = src_size->width - dst_rect->x - dst_rect->width;
  118. -       width = dst_rect->height;
  119. -       height = dst_rect->width;
  120. -       src_width = src_size->height;
  121. -   }
  122. -
  123. -   q = (boundary->width << 6) / src_width;
  124. -   r = (boundary->width << 6) % src_width;
  125. -
  126. -   dst_rect->x      = (((boundary->x << 6) + ((q * x + r * x / src_width) +
  127. -               (0x1 << 5))) >> 6) & ~0x1;
  128. -   dst_rect->y      = ((q * y + r * y / src_width) >> 6) + boundary->y;
  129. -   dst_rect->width  = (((q * width + r * width / src_width) +
  130. -               (0x1 << 5)) >> 6) & ~0x1;
  131. -   dst_rect->height = (q * height + r * height / src_width) >> 6;
  132. -}
  133. -
  134.  static int clonedev_set_mode_locked(struct clonedev *cd,
  135.         enum clonedev_mode mode)
  136.  {
  137. @@ -286,18 +247,9 @@
  138.  static void set_transform_and_dest_rect(struct clonedev *cd,
  139.         struct compdev_img *img)
  140.  {
  141. -   struct compdev_rect temp_rect = {0};
  142. -   temp_rect.width = cd->src_size.width;
  143. -   temp_rect.height = cd->src_size.height;
  144. -
  145. -   /* First adjust src rect to crop_rect */
  146. -   clonedev_best_fit(&cd->crop_rect,
  147. -           &temp_rect,
  148. -           img->transform);
  149. -
  150. -   /* Now use temp_rect as the boundary */
  151. -   clonedev_rescale_destrect(&temp_rect,
  152. -           &cd->src_size,
  153. +   /* Adjust destination rect */
  154. +   clonedev_best_fit(&img->src_rect,
  155. +           &cd->crop_rect,
  156.             &img->dst_rect,
  157.             img->transform);
  158.  
  159. @@ -505,12 +457,8 @@
  160.                 b2r2_req_id = ret;
  161.         }
  162.  
  163. -       dst_img->img.dst_rect = cd->crop_rect;
  164. -       dst_img->img.src_rect.x = 0;
  165. -       dst_img->img.src_rect.y = 0;
  166. -       dst_img->img.src_rect.width = cd->crop_rect.width;
  167. -       dst_img->img.src_rect.height = cd->crop_rect.height;
  168. -
  169. +       dst_img->img.dst_rect.x += cd->crop_rect.x;
  170. +       dst_img->img.dst_rect.y += cd->crop_rect.y;
  171.         compdev_post_single_buffer_asynch(cd->dst_compdev,
  172.                 &dst_img->img, cd->blt_handle, b2r2_req_id);
  173.  
  174. @@ -770,10 +718,6 @@
  175.     if (ret < 0)
  176.         goto fail_register_misc;
  177.  
  178. -   ret = compdev_get_size(cd->src_compdev, &cd->src_size);
  179. -   if (ret < 0)
  180. -       goto fail_register_misc;
  181. -
  182.     ret = compdev_get_size(cd->dst_compdev, &cd->dst_size);
  183.     if (ret < 0)
  184.         goto fail_register_misc;
  185. diff -ruN a/kernel/drivers/misc/hwmem/scatt_alloc.c b/kernel/drivers/misc/hwmem/scatt_alloc.c
  186. --- a/kernel/drivers/misc/hwmem/scatt_alloc.c   2012-10-24 23:38:12.000000000 +0900
  187. +++ b/kernel/drivers/misc/hwmem/scatt_alloc.c   2012-10-23 21:38:05.000000000 +0900
  188. @@ -87,9 +87,6 @@
  189.  
  190.     struct alloc *alloc_l = (struct alloc *)alloc;
  191.  
  192. -   if (alloc == NULL)
  193. -       return;
  194. -
  195.     mutex_lock(&lock);
  196.  
  197.     /* Free all pages in the sglist */
  198. diff -ruN a/kernel/drivers/usb/musb/ux500.c b/kernel/drivers/usb/musb/ux500.c
  199. --- a/kernel/drivers/usb/musb/ux500.c   2012-10-24 23:38:23.000000000 +0900
  200. +++ b/kernel/drivers/usb/musb/ux500.c   2012-10-23 21:38:06.000000000 +0900
  201. @@ -449,10 +449,18 @@
  202.     u8      devctl;
  203.     unsigned long timeout = jiffies + msecs_to_jiffies(1000);
  204.     int ret = 1;
  205. +#ifdef CONFIG_USB_OTG_20
  206. +   int val = 0;
  207. +#endif
  208.     /* HDRC controls CPEN, but beware current surges during device
  209.      * connect.  They can trigger transient overcurrent conditions
  210.      * that must be ignored.
  211.      */
  212. +#ifdef CONFIG_USB_OTG_20
  213. +   val = musb_readb(musb->mregs, MUSB_MISC);
  214. +   val |= 0x1C;
  215. +   musb_writeb(musb->mregs, MUSB_MISC, val);
  216. +#endif
  217.     devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
  218.  
  219.     if (is_on) {
  220. diff -ruN a/kernel/kernel-build-sin.sh b/kernel/kernel-build-sin.sh
  221. --- a/kernel/kernel-build-sin.sh    1970-01-01 09:00:00.000000000 +0900
  222. +++ b/kernel/kernel-build-sin.sh    2012-10-23 21:38:06.000000000 +0900
  223. @@ -0,0 +1,102 @@
  224. +#!/bin/bash
  225. +
  226. +die () {
  227. +    echo >&2 "$@"
  228. +    exit 1
  229. +}
  230. +
  231. +PRODUCT_DEFCNFG=$1
  232. +FSCONFIG=$2
  233. +
  234. +[ "$1" = "" ] && die "product{cdb/hayabusa/..} has to be specified as first argument"
  235. +[ "$2" = "" ] && die "fsconfig.xml has to be specified as second argument"
  236. +
  237. +if [ ! -f "arch/arm/configs/${PRODUCT_DEFCNFG}" ]; then
  238. +    # instead of specifying blue_cdb_defconfig, it could be 'cdb'
  239. +    PRODUCT_DEFCNFG=riogrande_${PRODUCT_DEFCNFG}_defconfig
  240. +fi
  241. +
  242. +if [ ! -f "arch/arm/configs/${PRODUCT_DEFCNFG}" ]; then
  243. +    echo "Please use any of the following products:"
  244. +    for line in $(ls arch/arm/configs/riogrande_*_defconfig);
  245. +    do
  246. +        NAME=$(basename $line)
  247. +        echo " - $NAME"
  248. +    done
  249. +    exit 1
  250. +fi
  251. +
  252. +if [ ! -f "$OUT/ramdisk.img" ]; then
  253. +    echo "Missing ramdisk.img in $OUT"
  254. +    exit 1
  255. +fi
  256. +
  257. +echo "Using defconfig ${PRODUCT_DEFCNFG}"
  258. +
  259. +#---------------------------------------------------------------------
  260. +# Check the actual number of CPUs on the machine and adjust the number
  261. +#---------------------------------------------------------------------
  262. +CPU_COUNT=`grep "^processor" /proc/cpuinfo | wc -l`
  263. +if [ $? -eq 0 -a -n "$CPU_COUNT" ] ; then
  264. +    JOBS=`expr $CPU_COUNT + 1`
  265. +    echo Found $CPU_COUNT CPUs, building with $JOBS parallel jobs.
  266. +else
  267. +    JOBS=5
  268. +    echo Unable to determine number of CPUs, defaulting to $JOBS parallel jobs.
  269. +fi
  270. +
  271. +#------------------------------------------------------------
  272. +# Need this to be able to build. Taken from kernel/Android.mk
  273. +#------------------------------------------------------------
  274. +export STERICSSON_WLAN_BUILT_IN=y
  275. +
  276. +if [ "$3" == "clean" ] ; then
  277. +    echo 'Cleaning build...'
  278. +    #-------------------
  279. +    # Clean up the build
  280. +    #-------------------
  281. +    ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- make mrproper
  282. +fi
  283. +
  284. +if [ ! -e ".config" ] ; then
  285. +    echo 'No .config file, generating...'
  286. +    #---------------------------
  287. +    # kernel configuration setup
  288. +    #---------------------------
  289. +    ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- make $PRODUCT_DEFCNFG
  290. +fi
  291. +
  292. +#------
  293. +# Build
  294. +#------
  295. +ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- make -j$JOBS
  296. +
  297. +if [ $? -ne 0 ] ; then
  298. +    echo "Build error - skip signing"
  299. +    exit 1
  300. +fi
  301. +
  302. +#------
  303. +# Sign
  304. +#------
  305. +
  306. +SIN_PATH=../vendor/semc/build/sin
  307. +
  308. +MKELFPY=$SIN_PATH/mkelf.py
  309. +SEMCSC=$SIN_PATH/semcsc.py
  310. +CSH=$SIN_PATH/create_sin_header
  311. +
  312. +# kernel.elf
  313. +$MKELFPY -o kernel-unsigned.elf arch/arm/boot/zImage@0x00008000 \
  314. +    $OUT/ramdisk.img@0x1000000,ramdisk $OUT/cmdline.txt@cmdline
  315. +
  316. +$SEMCSC -c $FSCONFIG -p Kernel -t internal -i kernel-unsigned.elf -o kernel.elf
  317. +
  318. +# kernel.si_
  319. +$CSH Kernel $FSCONFIG kernel.si_
  320. +cat kernel.elf >> kernel.si_
  321. +
  322. +# kernel.sin
  323. +$SEMCSC -c $FSCONFIG -p Kernel -t external -i kernel.si_ -o kernel.sin
  324. +
  325. +echo "All done."
RAW Paste Data