[ Odroid N2 ] Added Odroid N2 with mods necessary to build from sources. Made a few tests builds ... it works at least as good as stock.
This commit is contained in:
parent
5df7a1ce50
commit
2bd7f8efbd
14
config/boards/odroidn2.conf
Normal file
14
config/boards/odroidn2.conf
Normal file
@ -0,0 +1,14 @@
|
||||
# S922X hexa core 4GB eMMC GBE USB3
|
||||
BOARD_NAME="Odroid N2"
|
||||
BOARDFAMILY="odroidn2"
|
||||
BOOTCONFIG="odroidn2_config"
|
||||
#
|
||||
MODULES=""
|
||||
MODULES_NEXT=""
|
||||
#
|
||||
KERNEL_TARGET="default"
|
||||
CLI_TARGET="stretch,bionic:default"
|
||||
DESKTOP_TARGET="stretch,bionic:default"
|
||||
#
|
||||
CLI_BETA_TARGET=""
|
||||
DESKTOP_BETA_TARGET=""
|
||||
112
config/bootscripts/boot-odroid-n2.ini
Normal file
112
config/bootscripts/boot-odroid-n2.ini
Normal file
@ -0,0 +1,112 @@
|
||||
ODROIDN2-UBOOT-CONFIG
|
||||
|
||||
setenv rootdev "/dev/mmcblk0p1"
|
||||
setenv rootfstype "ext4"
|
||||
|
||||
ODROIDN2-UBOOT-CONFIG
|
||||
|
||||
# Default Console Device Setting
|
||||
setenv condev "console=ttyS0,115200n8 console=tty1 loglevel=1" # on both
|
||||
|
||||
# Auto Detection of Monitor settings based on your Screen information
|
||||
setenv display_autodetect "true"
|
||||
|
||||
# HDMI Mode
|
||||
# Resolution Configuration
|
||||
# Symbol | Resolution
|
||||
# ----------------------+-------------
|
||||
# "480x320p60hz" | 480x320 Progressive 60Hz
|
||||
# "480p60hz" | 720x480 Progressive 60Hz
|
||||
# "576p50hz" | 720x576 Progressive 50Hz
|
||||
# "720p60hz" | 1280x720 Progressive 60Hz
|
||||
# "720p50hz" | 1280x720 Progressive 50Hz
|
||||
# "1080p60hz" | 1920x1080 Progressive 60Hz
|
||||
# "1080p50hz" | 1920x1080 Progressive 50Hz
|
||||
# "1080p30hz" | 1920x1080 Progressive 30Hz
|
||||
# "1080p24hz" | 1920x1080 Progressive 24Hz
|
||||
# "1080i60hz" | 1920x1080 Interlaced 60Hz
|
||||
# "1080i50hz" | 1920x1080 Interlaced 50Hz
|
||||
# "2160p60hz" | 3840x2160 Progressive 60Hz
|
||||
# "2160p50hz" | 3840x2160 Progressive 50Hz
|
||||
# "2160p30hz" | 3840x2160 Progressive 30Hz
|
||||
# "2160p25hz" | 3840x2160 Progressive 25Hz
|
||||
# "2160p24hz" | 3840x2160 Progressive 24Hz
|
||||
# "smpte24hz" | 3840x2160 Progressive 24Hz SMPTE
|
||||
# "2160p60hz420" | 3840x2160 Progressive 60Hz YCbCr 4:2:0
|
||||
# "2160p50hz420" | 3840x2160 Progressive 50Hz YCbCr 4:2:0
|
||||
# "640x480p60hz" | 640x480 Progressive 60Hz
|
||||
# "800x480p60hz" | 800x480 Progressive 60Hz
|
||||
# "800x600p60hz" | 800x600 Progressive 60Hz
|
||||
# "1024x600p60hz" | 1024x600 Progressive 60Hz
|
||||
# "1024x768p60hz" | 1024x768 Progressive 60Hz
|
||||
# "1280x800p60hz" | 1280x800 Progressive 60Hz
|
||||
# "1280x1024p60hz" | 1280x1024 Progressive 60Hz
|
||||
# "1360x768p60hz" | 1360x768 Progressive 60Hz
|
||||
# "1440x900p60hz" | 1440x900 Progressive 60Hz
|
||||
# "1600x900p60hz" | 1600x900 Progressive 60Hz
|
||||
# "1600x1200p60hz" | 1600x1200 Progressive 60Hz
|
||||
# "1680x1050p60hz" | 1680x1050 Progressive 60Hz
|
||||
# "1920x1200p60hz" | 1920x1200 Progressive 60Hz
|
||||
# "2560x1080p60hz" | 2560x1080 Progressive 60Hz
|
||||
# "2560x1440p60hz" | 2560x1440 Progressive 60Hz
|
||||
# "2560x1600p60hz" | 2560x1600 Progressive 60Hz
|
||||
# "3440x1440p60hz" | 3440x1440 Progressive 60Hz
|
||||
setenv hdmimode "1080p60hz"
|
||||
|
||||
# Overscan percentage
|
||||
# This value scales down the actual screen size by the percentage below
|
||||
# valid range is 80 to 100
|
||||
setenv overscan "100"
|
||||
|
||||
### voutmode : hdmi or dvi
|
||||
setenv voutmode "hdmi"
|
||||
# setenv voutmode "dvi"
|
||||
|
||||
# HPD enable/disable option
|
||||
setenv disablehpd "false"
|
||||
|
||||
# max cpu frequency for big core, A73 in MHz unit
|
||||
# setenv max_freq_a73 "2004" # 2.004 GHz
|
||||
# setenv max_freq_a73 "1992" # 1.992 GHz
|
||||
# setenv max_freq_a73 "1908" # 1.908 GHz
|
||||
setenv max_freq_a73 "1800" # 1.8 GHz, default value
|
||||
# setenv max_freq_a73 "1704" # 1.704 GHz
|
||||
|
||||
# max cpu frequency for little core, A53 in MHz unit
|
||||
# setenv max_freq_a53 "1992" # 1.992 GHz
|
||||
setenv max_freq_a53 "1896" # 1.896 GHz, default value
|
||||
# setenv max_freq_a53 "1704" # 1.704 GHz
|
||||
|
||||
|
||||
# max cpu-cores
|
||||
# Note:
|
||||
# CPU's 0 and 1 are the A53 (small cores)
|
||||
# CPU's 2 to 5 are the A73 (big cores)
|
||||
# Lowering this value disables only the bigger cores (the last cores).
|
||||
# setenv maxcpus "4"
|
||||
# setenv maxcpus "5"
|
||||
setenv maxcpus "6"
|
||||
|
||||
### Normal HDMI Monitors
|
||||
if test "${display_autodetect}" = "true"; then hdmitx edid; fi
|
||||
if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi
|
||||
|
||||
# Boot Args
|
||||
setenv bootargs "root=${rootdev} rootwait rootflags=data=writeback rw rootfstype=${rootfstype} ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan}"
|
||||
|
||||
# Set load addresses
|
||||
setenv dtb_loadaddr "0x1000000"
|
||||
setenv k_addr "0x1100000"
|
||||
setenv loadaddr "0x1B00000"
|
||||
setenv initrd_loadaddr "0x3700000"
|
||||
|
||||
# Load kernel, dtb and initrd
|
||||
ext4load mmc ${devno}:1 ${k_addr} boot/zImage
|
||||
ext4load mmc ${devno}:1 ${dtb_loadaddr} boot/dtb/amlogic/meson64_odroidn2.dtb
|
||||
ext4load mmc ${devno}:1 ${initrd_loadaddr} boot/uInitrd
|
||||
fdt addr ${dtb_loadaddr}
|
||||
# unzip the kernel
|
||||
unzip ${k_addr} ${loadaddr}
|
||||
|
||||
# boot
|
||||
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
|
||||
6236
config/kernel/linux-odroidn2-default.config
Normal file
6236
config/kernel/linux-odroidn2-default.config
Normal file
File diff suppressed because it is too large
Load Diff
31
config/sources/odroidn2.conf
Normal file
31
config/sources/odroidn2.conf
Normal file
@ -0,0 +1,31 @@
|
||||
BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
|
||||
BOOTBRANCH='branch:odroidn2-v2015.01'
|
||||
BOOTDIR='u-boot-odroidn2'
|
||||
UBOOT_USE_GCC='< 4.9'
|
||||
BOOTSCRIPT="boot-odroid-n2.ini:boot.ini"
|
||||
UBOOT_TOOLCHAIN2="arm-none-eabi-:< 5.0"
|
||||
UBOOT_COMPILER="aarch64-none-elf-"
|
||||
ARCH=arm64
|
||||
SERIALCON=ttyS0
|
||||
UBOOT_TARGET_MAP=';;sd_fuse/u-boot.bin'
|
||||
|
||||
KERNEL_IMAGE_TYPE=Image
|
||||
|
||||
case $BRANCH in
|
||||
default)
|
||||
KERNELSOURCE='https://github.com/hardkernel/linux'
|
||||
KERNELBRANCH='branch:odroidn2-4.9.y'
|
||||
KERNELDIR='linux-odroidn2'
|
||||
KERNEL_COMPILER='aarch64-linux-gnu-'
|
||||
KERNEL_USE_GCC='< 7.0'
|
||||
;;
|
||||
esac
|
||||
|
||||
CPUMIN=504000
|
||||
CPUMAX=2132000
|
||||
GOVERNOR=interactive
|
||||
|
||||
write_uboot_platform()
|
||||
{
|
||||
dd if=$1/u-boot.bin of=$2 bs=512 seek=1 conv=fsync > /dev/null 2>&1
|
||||
}
|
||||
@ -113,7 +113,16 @@ compile_uboot()
|
||||
local toolchain=$(find_toolchain "$UBOOT_COMPILER" "$UBOOT_USE_GCC")
|
||||
[[ -z $toolchain ]] && exit_with_error "Could not find required toolchain" "${UBOOT_COMPILER}gcc $UBOOT_USE_GCC"
|
||||
|
||||
display_alert "Compiler version" "${UBOOT_COMPILER}gcc $(eval env PATH=$toolchain:$PATH ${UBOOT_COMPILER}gcc -dumpversion)" "info"
|
||||
if [[ -n $UBOOT_TOOLCHAIN2 ]]; then
|
||||
local toolchain2_type=$(cut -d':' -f1 <<< $UBOOT_TOOLCHAIN2)
|
||||
local toolchain2_ver=$(cut -d':' -f2 <<< $UBOOT_TOOLCHAIN2)
|
||||
local toolchain2=$(find_toolchain "$toolchain2_type" "$toolchain2_ver")
|
||||
[[ -z $toolchain2 ]] && exit_with_error "Could not find required toolchain" "${toolchain2_type}gcc $toolchain2_ver"
|
||||
fi
|
||||
|
||||
|
||||
display_alert "Compiler version" "${UBOOT_COMPILER}gcc $(eval env PATH=$toolchain:$toolchain2:$PATH ${UBOOT_COMPILER}gcc -dumpversion)" "info"
|
||||
[[ -n $toolchain2 ]] && display_alert "Additional compiler version" "${toolchain2_type}gcc $(eval env PATH=$toolchain:$toolchain2:$PATH ${toolchain2_type}gcc -dumpversion)" "info"
|
||||
|
||||
# create directory structure for the .deb package
|
||||
local uboot_name=${CHOSEN_UBOOT}_${REVISION}_${ARCH}
|
||||
@ -145,7 +154,7 @@ compile_uboot()
|
||||
fi
|
||||
|
||||
echo -e "\n\t== u-boot ==\n" >>$DEST/debug/compilation.log
|
||||
eval CCACHE_BASEDIR="$(pwd)" env PATH=$toolchain:$PATH \
|
||||
eval CCACHE_BASEDIR="$(pwd)" env PATH=$toolchain:$toolchain2:$PATH \
|
||||
'make $CTHREADS $BOOTCONFIG \
|
||||
CROSS_COMPILE="$CCACHE $UBOOT_COMPILER"' 2>>$DEST/debug/compilation.log \
|
||||
${PROGRESS_LOG_TO_FILE:+' | tee -a $DEST/debug/compilation.log'} \
|
||||
@ -170,9 +179,13 @@ compile_uboot()
|
||||
[[ $BOOTDELAY == 0 ]] && echo -e "CONFIG_ZERO_BOOTDELAY_CHECK=y" >> .config
|
||||
[[ -n $BOOTDELAY ]] && sed -i "s/^CONFIG_BOOTDELAY=.*/CONFIG_BOOTDELAY=${BOOTDELAY}/" .config || [[ -f .config ]] && echo "CONFIG_BOOTDELAY=${BOOTDELAY}" >> .config
|
||||
|
||||
eval CCACHE_BASEDIR="$(pwd)" env PATH=$toolchain:$PATH \
|
||||
# workaround when two compilers are needed
|
||||
cross_compile="CROSS_COMPILE=$CCACHE $UBOOT_COMPILER";
|
||||
[[ -n $UBOOT_TOOLCHAIN2 ]] && cross_compile="ARMBIAN=foe"; # empty parameter is not allowed
|
||||
|
||||
eval CCACHE_BASEDIR="$(pwd)" env PATH=$toolchain:$toolchain2:$PATH \
|
||||
'make $target_make $CTHREADS \
|
||||
CROSS_COMPILE="$CCACHE $UBOOT_COMPILER"' 2>>$DEST/debug/compilation.log \
|
||||
"${cross_compile}"' 2>>$DEST/debug/compilation.log \
|
||||
${PROGRESS_LOG_TO_FILE:+' | tee -a $DEST/debug/compilation.log'} \
|
||||
${OUTPUT_DIALOG:+' | dialog --backtitle "$backtitle" --progressbox "Compiling u-boot..." $TTY_Y $TTY_X'} \
|
||||
${OUTPUT_VERYSILENT:+' >/dev/null 2>/dev/null'}
|
||||
|
||||
@ -662,6 +662,8 @@ prepare_host()
|
||||
ARMBIANSERVER=dl.armbian.com
|
||||
|
||||
local toolchains=(
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz"
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-arm-none-eabi-4.8-2014.04_linux.tar.xz"
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.xz"
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu.tar.xz"
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi.tar.xz"
|
||||
|
||||
35977
patch/kernel/odroidn2-default/0001-aufs4.9.patch.disabled
Normal file
35977
patch/kernel/odroidn2-default/0001-aufs4.9.patch.disabled
Normal file
File diff suppressed because it is too large
Load Diff
400
patch/kernel/odroidn2-default/0002-aufs4.9.patch.disabled
Normal file
400
patch/kernel/odroidn2-default/0002-aufs4.9.patch.disabled
Normal file
@ -0,0 +1,400 @@
|
||||
diff --git a/fs/dcache.c b/fs/dcache.c
|
||||
index fc74297..98de99a 100644
|
||||
--- a/fs/dcache.c
|
||||
+++ b/fs/dcache.c
|
||||
@@ -1272,6 +1272,7 @@ void d_walk(struct dentry *parent, void *data,
|
||||
seq = 1;
|
||||
goto again;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(d_walk);
|
||||
|
||||
/*
|
||||
* Search for at least 1 mount point in the dentry's subdirs.
|
||||
@@ -2858,6 +2859,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
|
||||
|
||||
write_sequnlock(&rename_lock);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(d_exchange);
|
||||
|
||||
/**
|
||||
* d_ancestor - search for an ancestor
|
||||
diff --git a/fs/exec.c b/fs/exec.c
|
||||
index 67e8657..70f15ed 100644
|
||||
--- a/fs/exec.c
|
||||
+++ b/fs/exec.c
|
||||
@@ -104,6 +104,7 @@ bool path_noexec(const struct path *path)
|
||||
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
|
||||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(path_noexec);
|
||||
|
||||
#ifdef CONFIG_USELIB
|
||||
/*
|
||||
diff --git a/fs/fcntl.c b/fs/fcntl.c
|
||||
index 6f42279..04fd33c 100644
|
||||
--- a/fs/fcntl.c
|
||||
+++ b/fs/fcntl.c
|
||||
@@ -82,6 +82,7 @@ int setfl(int fd, struct file * filp, unsigned long arg)
|
||||
out:
|
||||
return error;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(setfl);
|
||||
|
||||
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
|
||||
int force)
|
||||
diff --git a/fs/file_table.c b/fs/file_table.c
|
||||
index ad17e05..ae9f267 100644
|
||||
--- a/fs/file_table.c
|
||||
+++ b/fs/file_table.c
|
||||
@@ -147,6 +147,7 @@ struct file *get_empty_filp(void)
|
||||
}
|
||||
return ERR_PTR(-ENFILE);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(get_empty_filp);
|
||||
|
||||
/**
|
||||
* alloc_file - allocate and initialize a 'struct file'
|
||||
@@ -258,6 +259,7 @@ void flush_delayed_fput(void)
|
||||
{
|
||||
delayed_fput(NULL);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(flush_delayed_fput);
|
||||
|
||||
static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput);
|
||||
|
||||
@@ -300,6 +302,7 @@ void __fput_sync(struct file *file)
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(fput);
|
||||
+EXPORT_SYMBOL_GPL(__fput_sync);
|
||||
|
||||
void put_filp(struct file *file)
|
||||
{
|
||||
@@ -308,6 +311,7 @@ void put_filp(struct file *file)
|
||||
file_free(file);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(put_filp);
|
||||
|
||||
void __init files_init(void)
|
||||
{
|
||||
diff --git a/fs/inode.c b/fs/inode.c
|
||||
index 9a9ba3a..a3a18d8 100644
|
||||
--- a/fs/inode.c
|
||||
+++ b/fs/inode.c
|
||||
@@ -1651,6 +1651,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
|
||||
|
||||
return update_time(inode, time, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(update_time);
|
||||
|
||||
/**
|
||||
* touch_atime - update the access time
|
||||
diff --git a/fs/namespace.c b/fs/namespace.c
|
||||
index 7cea503..acd0e21 100644
|
||||
--- a/fs/namespace.c
|
||||
+++ b/fs/namespace.c
|
||||
@@ -466,6 +466,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
|
||||
mnt_dec_writers(real_mount(mnt));
|
||||
preempt_enable();
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(__mnt_drop_write);
|
||||
|
||||
/**
|
||||
* mnt_drop_write - give up write access to a mount
|
||||
@@ -1847,6 +1848,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(iterate_mounts);
|
||||
|
||||
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
|
||||
{
|
||||
diff --git a/fs/notify/group.c b/fs/notify/group.c
|
||||
index fbe3cbe..bdfc61e 100644
|
||||
--- a/fs/notify/group.c
|
||||
+++ b/fs/notify/group.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/srcu.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/wait.h>
|
||||
+#include <linux/module.h>
|
||||
|
||||
#include <linux/fsnotify_backend.h>
|
||||
#include "fsnotify.h"
|
||||
@@ -100,6 +101,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
|
||||
{
|
||||
atomic_inc(&group->refcnt);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_get_group);
|
||||
|
||||
/*
|
||||
* Drop a reference to a group. Free it if it's through.
|
||||
@@ -109,6 +111,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
|
||||
if (atomic_dec_and_test(&group->refcnt))
|
||||
fsnotify_final_destroy_group(group);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_put_group);
|
||||
|
||||
/*
|
||||
* Create a new fsnotify_group and hold a reference for the group returned.
|
||||
@@ -137,6 +140,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
|
||||
|
||||
return group;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_alloc_group);
|
||||
|
||||
int fsnotify_fasync(int fd, struct file *file, int on)
|
||||
{
|
||||
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
|
||||
index d3fea0b..5fc06ad 100644
|
||||
--- a/fs/notify/mark.c
|
||||
+++ b/fs/notify/mark.c
|
||||
@@ -113,6 +113,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
|
||||
mark->free_mark(mark);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_put_mark);
|
||||
|
||||
/* Calculate mask of events for a list of marks */
|
||||
u32 fsnotify_recalc_mask(struct hlist_head *head)
|
||||
@@ -230,6 +231,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
|
||||
mutex_unlock(&group->mark_mutex);
|
||||
fsnotify_free_mark(mark);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_destroy_mark);
|
||||
|
||||
void fsnotify_destroy_marks(struct hlist_head *head, spinlock_t *lock)
|
||||
{
|
||||
@@ -415,6 +417,7 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark,
|
||||
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_add_mark);
|
||||
|
||||
int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group,
|
||||
struct inode *inode, struct vfsmount *mnt, int allow_dups)
|
||||
@@ -533,6 +536,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
|
||||
atomic_set(&mark->refcnt, 1);
|
||||
mark->free_mark = free_mark;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_init_mark);
|
||||
|
||||
/*
|
||||
* Destroy all marks in destroy_list, waits for SRCU period to finish before
|
||||
diff --git a/fs/open.c b/fs/open.c
|
||||
index d3ed817..20d2494 100644
|
||||
--- a/fs/open.c
|
||||
+++ b/fs/open.c
|
||||
@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
|
||||
inode_unlock(dentry->d_inode);
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(do_truncate);
|
||||
|
||||
long vfs_truncate(const struct path *path, loff_t length)
|
||||
{
|
||||
@@ -695,6 +696,7 @@ int open_check_o_direct(struct file *f)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(open_check_o_direct);
|
||||
|
||||
static int do_dentry_open(struct file *f,
|
||||
struct inode *inode,
|
||||
diff --git a/fs/read_write.c b/fs/read_write.c
|
||||
index 4052813..7dfd732 100644
|
||||
--- a/fs/read_write.c
|
||||
+++ b/fs/read_write.c
|
||||
@@ -525,6 +525,7 @@ vfs_readf_t vfs_readf(struct file *file)
|
||||
return new_sync_read;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(vfs_readf);
|
||||
|
||||
vfs_writef_t vfs_writef(struct file *file)
|
||||
{
|
||||
@@ -536,6 +537,7 @@ vfs_writef_t vfs_writef(struct file *file)
|
||||
return new_sync_write;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(vfs_writef);
|
||||
|
||||
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
|
||||
{
|
||||
diff --git a/fs/splice.c b/fs/splice.c
|
||||
index 608a98b..e50c4ec 100644
|
||||
--- a/fs/splice.c
|
||||
+++ b/fs/splice.c
|
||||
@@ -868,6 +868,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
|
||||
return splice_write(pipe, out, ppos, len, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(do_splice_from);
|
||||
|
||||
/*
|
||||
* Attempt to initiate a splice from a file to a pipe.
|
||||
@@ -897,6 +898,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
|
||||
|
||||
return splice_read(in, ppos, pipe, len, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(do_splice_to);
|
||||
|
||||
/**
|
||||
* splice_direct_to_actor - splices data directly between two non-pipes
|
||||
diff --git a/fs/sync.c b/fs/sync.c
|
||||
index 7a5fa3f..c9b9d46 100644
|
||||
--- a/fs/sync.c
|
||||
+++ b/fs/sync.c
|
||||
@@ -38,6 +38,7 @@ int __sync_filesystem(struct super_block *sb, int wait)
|
||||
sb->s_op->sync_fs(sb, wait);
|
||||
return __sync_blockdev(sb->s_bdev, wait);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(__sync_filesystem);
|
||||
|
||||
/*
|
||||
* Write out and wait upon all dirty data associated with this
|
||||
diff --git a/fs/xattr.c b/fs/xattr.c
|
||||
index 2d13b4e..41c2bcd 100644
|
||||
--- a/fs/xattr.c
|
||||
+++ b/fs/xattr.c
|
||||
@@ -296,6 +296,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
|
||||
*xattr_value = value;
|
||||
return error;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(vfs_getxattr_alloc);
|
||||
|
||||
ssize_t
|
||||
__vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
|
||||
diff --git a/kernel/task_work.c b/kernel/task_work.c
|
||||
index d513051..e056d54 100644
|
||||
--- a/kernel/task_work.c
|
||||
+++ b/kernel/task_work.c
|
||||
@@ -119,3 +119,4 @@ void task_work_run(void)
|
||||
} while (work);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(task_work_run);
|
||||
diff --git a/security/commoncap.c b/security/commoncap.c
|
||||
index 8df676f..6b5cc07 100644
|
||||
--- a/security/commoncap.c
|
||||
+++ b/security/commoncap.c
|
||||
@@ -1061,12 +1061,14 @@ int cap_mmap_addr(unsigned long addr)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(cap_mmap_addr);
|
||||
|
||||
int cap_mmap_file(struct file *file, unsigned long reqprot,
|
||||
unsigned long prot, unsigned long flags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(cap_mmap_file);
|
||||
|
||||
#ifdef CONFIG_SECURITY
|
||||
|
||||
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
|
||||
index 03c1652..f88c84b 100644
|
||||
--- a/security/device_cgroup.c
|
||||
+++ b/security/device_cgroup.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <linux/device_cgroup.h>
|
||||
#include <linux/cgroup.h>
|
||||
#include <linux/ctype.h>
|
||||
+#include <linux/export.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/seq_file.h>
|
||||
@@ -849,6 +850,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
|
||||
return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
|
||||
access);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(__devcgroup_inode_permission);
|
||||
|
||||
int devcgroup_inode_mknod(int mode, dev_t dev)
|
||||
{
|
||||
diff --git a/security/security.c b/security/security.c
|
||||
index f825304..8dd441d 100644
|
||||
--- a/security/security.c
|
||||
+++ b/security/security.c
|
||||
@@ -443,6 +443,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
|
||||
return 0;
|
||||
return call_int_hook(path_rmdir, 0, dir, dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_rmdir);
|
||||
|
||||
int security_path_unlink(const struct path *dir, struct dentry *dentry)
|
||||
{
|
||||
@@ -459,6 +460,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
|
||||
return 0;
|
||||
return call_int_hook(path_symlink, 0, dir, dentry, old_name);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_symlink);
|
||||
|
||||
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
|
||||
struct dentry *new_dentry)
|
||||
@@ -467,6 +469,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
|
||||
return 0;
|
||||
return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_link);
|
||||
|
||||
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
|
||||
const struct path *new_dir, struct dentry *new_dentry,
|
||||
@@ -494,6 +497,7 @@ int security_path_truncate(const struct path *path)
|
||||
return 0;
|
||||
return call_int_hook(path_truncate, 0, path);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_truncate);
|
||||
|
||||
int security_path_chmod(const struct path *path, umode_t mode)
|
||||
{
|
||||
@@ -501,6 +505,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
|
||||
return 0;
|
||||
return call_int_hook(path_chmod, 0, path, mode);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_chmod);
|
||||
|
||||
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
|
||||
{
|
||||
@@ -508,6 +513,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
|
||||
return 0;
|
||||
return call_int_hook(path_chown, 0, path, uid, gid);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_chown);
|
||||
|
||||
int security_path_chroot(const struct path *path)
|
||||
{
|
||||
@@ -593,6 +599,7 @@ int security_inode_readlink(struct dentry *dentry)
|
||||
return 0;
|
||||
return call_int_hook(inode_readlink, 0, dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_inode_readlink);
|
||||
|
||||
int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
|
||||
bool rcu)
|
||||
@@ -608,6 +615,7 @@ int security_inode_permission(struct inode *inode, int mask)
|
||||
return 0;
|
||||
return call_int_hook(inode_permission, 0, inode, mask);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_inode_permission);
|
||||
|
||||
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
@@ -779,6 +787,7 @@ int security_file_permission(struct file *file, int mask)
|
||||
|
||||
return fsnotify_perm(file, mask);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_file_permission);
|
||||
|
||||
int security_file_alloc(struct file *file)
|
||||
{
|
||||
@@ -838,6 +847,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
|
||||
return ret;
|
||||
return ima_file_mmap(file, prot);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_mmap_file);
|
||||
|
||||
int security_mmap_addr(unsigned long addr)
|
||||
{
|
||||
11
patch/kernel/odroidn2-default/bash_to_afterinstall.patch
Normal file
11
patch/kernel/odroidn2-default/bash_to_afterinstall.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -218,7 +218,7 @@
|
||||
for script in postinst postrm preinst prerm ; do
|
||||
mkdir -p "$tmpdir$debhookdir/$script.d"
|
||||
cat <<EOF > "$tmpdir/DEBIAN/$script"
|
||||
-#!/bin/sh
|
||||
+#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
32
patch/kernel/odroidn2-default/fix-broken-bulk-streams.patch
Normal file
32
patch/kernel/odroidn2-default/fix-broken-bulk-streams.patch
Normal file
@ -0,0 +1,32 @@
|
||||
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
|
||||
index 672751e..5108d2d 100644
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -90,6 +90,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
|
||||
+ /* https://github.com/hardkernel/linux/commit/c18781b1ef56a800572e8342488504e4e818013a#commitcomment-21996557 */
|
||||
+ xhci->quirks |= XHCI_BROKEN_STREAMS;
|
||||
+
|
||||
/* Look for vendor-specific quirks */
|
||||
if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC &&
|
||||
(pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK ||
|
||||
diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h
|
||||
index 65b8418..fedc9dc 100755
|
||||
--- a/drivers/usb/storage/unusual_uas.h
|
||||
+++ b/drivers/usb/storage/unusual_uas.h
|
||||
@@ -149,6 +149,13 @@ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999,
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_BROKEN_FUA | US_FL_NO_REPORT_OPCODES),
|
||||
|
||||
+/* https://forum.openmediavault.org/index.php/Thread/17855-Building-OMV-automatically-for-a-bunch-of-different-ARM-dev-boards/?postID=149807#post149807 */
|
||||
+UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x9999,
|
||||
+ "JMicron",
|
||||
+ "JMS578",
|
||||
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
+ US_FL_BROKEN_FUA | US_FL_NO_REPORT_OPCODES),
|
||||
+
|
||||
/* Reported-by: Hans de Goede <hdegoede@redhat.com> */
|
||||
UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
|
||||
"VIA",
|
||||
@ -0,0 +1,203 @@
|
||||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
|
||||
index 6c3b038..cc9b3c0 100755
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -27,6 +27,28 @@ create_package() {
|
||||
chown -R root:root "$pdir"
|
||||
chmod -R go-w "$pdir"
|
||||
|
||||
+ # Create preinstall and post install script to remove dtb
|
||||
+ if [[ "$1" == *dtb* ]]; then
|
||||
+ echo "if [ -d /boot/dtb-$version ]; then mv /boot/dtb-$version /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb.old ]; then rm -rf /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /dtb ]; then mv /dtb /dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb ]; then mv /boot/dtb /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/preinst
|
||||
+ chmod 775 $pdir/DEBIAN/preinst
|
||||
+ #
|
||||
+ echo "if [ -d /boot/dtb-$version.old ]; then rm -rf /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/postinst
|
||||
+ echo "ln -sf dtb-$version /boot/dtb > /dev/null 2>&1 || mv /boot/dtb-$version /boot/dtb" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
+ fi
|
||||
+
|
||||
+ # Create postinstall script for headers
|
||||
+ if [[ "$1" == *headers* ]]; then
|
||||
+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; make -s scripts >/dev/null 2>&1" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
+ fi
|
||||
+
|
||||
# Create the package
|
||||
dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch}" -p$pname -P"$pdir"
|
||||
dpkg --build "$pdir" ..
|
||||
@@ -93,11 +115,13 @@ tmpdir="$objtree/debian/tmp"
|
||||
fwdir="$objtree/debian/fwtmp"
|
||||
kernel_headers_dir="$objtree/debian/hdrtmp"
|
||||
libc_headers_dir="$objtree/debian/headertmp"
|
||||
+dtb_dir="$objtree/debian/dtbtmp"
|
||||
dbg_dir="$objtree/debian/dbgtmp"
|
||||
-packagename=linux-image-$version
|
||||
-fwpackagename=linux-firmware-image-$version
|
||||
-kernel_headers_packagename=linux-headers-$version
|
||||
-libc_headers_packagename=linux-libc-dev
|
||||
+packagename=linux-image"$LOCALVERSION"
|
||||
+fwpackagename=linux-firmware-image"$LOCALVERSION"
|
||||
+kernel_headers_packagename=linux-headers"$LOCALVERSION"
|
||||
+dtb_packagename=linux-dtb"$LOCALVERSION"
|
||||
+libc_headers_packagename=linux-libc-dev"$LOCALVERSION"
|
||||
dbg_packagename=$packagename-dbg
|
||||
debarch=
|
||||
forcearch=
|
||||
@@ -124,7 +148,9 @@ esac
|
||||
BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
|
||||
|
||||
# Setup the directory structure
|
||||
-rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files
|
||||
+rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$dtb_dir" $objtree/debian/files
|
||||
+mkdir -m 755 -p "$dtb_dir/DEBIAN"
|
||||
+mkdir -p "$dtb_dir/boot/dtb-$version" "$dtb_dir/usr/share/doc/$dtb_packagename"
|
||||
mkdir -m 755 -p "$tmpdir/DEBIAN"
|
||||
mkdir -p "$tmpdir/lib" "$tmpdir/boot"
|
||||
mkdir -p "$fwdir/lib/firmware/$version/"
|
||||
@@ -183,6 +209,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
+if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then
|
||||
+ #mkdir -p "$tmpdir/boot/dtb"
|
||||
+ INSTALL_DTBS_PATH="$dtb_dir/boot/dtb-$version" $MAKE KBUILD_SRC= dtbs_install
|
||||
+fi
|
||||
+
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
$MAKE headers_check KBUILD_SRC=
|
||||
$MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
|
||||
@@ -195,7 +226,7 @@ fi
|
||||
# so do we; recent versions of dracut and initramfs-tools will obey this.
|
||||
debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
|
||||
if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then
|
||||
- want_initrd=Yes
|
||||
+ want_initrd=Yes
|
||||
else
|
||||
want_initrd=No
|
||||
fi
|
||||
@@ -207,9 +238,11 @@ for script in postinst postrm preinst prerm ; do
|
||||
set -e
|
||||
|
||||
# Pass maintainer script parameters to hook scripts
|
||||
+
|
||||
export DEB_MAINT_PARAMS="\$*"
|
||||
|
||||
# Tell initramfs builder whether it's wanted
|
||||
+
|
||||
export INITRD=$want_initrd
|
||||
|
||||
test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d
|
||||
@@ -218,6 +251,55 @@ EOF
|
||||
chmod 755 "$tmpdir/DEBIAN/$script"
|
||||
done
|
||||
|
||||
+##
|
||||
+## Create sym link to kernel image
|
||||
+##
|
||||
+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/postinst
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst
|
||||
+cat >> $tmpdir/DEBIAN/postinst <<EOT
|
||||
+if [ "\$(grep nand /proc/partitions)" != "" ] && [ "\$(grep mmc /proc/partitions)" = "" ]; then
|
||||
+mkimage -A arm -O linux -T kernel -C none -a "0x40008000" -e "0x40008000" -n "Linux kernel" -d /$installed_image_path /boot/uImage > /dev/null 2>&1
|
||||
+cp /boot/uImage /tmp/uImage
|
||||
+sync
|
||||
+mountpoint -q /boot || mount /boot
|
||||
+cp /tmp/uImage /boot/uImage
|
||||
+rm -f /$installed_image_path
|
||||
+else
|
||||
+ln -sf $(basename $installed_image_path) /boot/zImage > /dev/null 2>&1 || mv /$installed_image_path /boot/zImage
|
||||
+fi
|
||||
+touch /boot/.next
|
||||
+exit 0
|
||||
+EOT
|
||||
+##
|
||||
+## FAT install workaround
|
||||
+##
|
||||
+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/preinst
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/preinst
|
||||
+cat >> $tmpdir/DEBIAN/preinst <<EOT
|
||||
+# exit if we are running chroot
|
||||
+if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi
|
||||
+
|
||||
+check_and_unmount (){
|
||||
+boot_device=\$(mountpoint -d /boot)
|
||||
+
|
||||
+for file in /dev/* ; do
|
||||
+ CURRENT_DEVICE=\$(printf "%d:%d" \$(stat --printf="0x%t 0x%T" \$file))
|
||||
+ if [[ "\$CURRENT_DEVICE" = "\$boot_device" ]]; then
|
||||
+ boot_partition=\$file
|
||||
+ break;
|
||||
+ fi
|
||||
+done
|
||||
+
|
||||
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
|
||||
+if [ "\$bootfstype" = "vfat" ]; then
|
||||
+umount /boot;
|
||||
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
|
||||
+fi
|
||||
+}
|
||||
+mountpoint -q /boot && check_and_unmount
|
||||
+EOT
|
||||
+echo "exit 0" >> $tmpdir/DEBIAN/preinst
|
||||
+
|
||||
# Try to determine maintainer and email values
|
||||
if [ -n "$DEBEMAIL" ]; then
|
||||
email=$DEBEMAIL
|
||||
@@ -328,16 +414,24 @@ fi
|
||||
(cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles"
|
||||
destdir=$kernel_headers_dir/usr/src/linux-headers-$version
|
||||
mkdir -p "$destdir"
|
||||
+######################## headers patch
|
||||
+ZACNI=$(pwd)
|
||||
+cd $destdir
|
||||
+patch -p1 < /tmp/headers-debian-byteshift.patch
|
||||
+cd $ZACNI
|
||||
+######################## headers patch
|
||||
(cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -)
|
||||
(cd $objtree; tar -c -f - -T -) < "$objtree/debian/hdrobjfiles" | (cd $destdir; tar -xf -)
|
||||
(cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be
|
||||
ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
|
||||
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
|
||||
|
||||
+(cd "$destdir"; make M=scripts clean)
|
||||
+
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $kernel_headers_packagename
|
||||
-Provides: linux-headers, linux-headers-2.6
|
||||
+Provides: linux-headers
|
||||
Architecture: any
|
||||
Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
|
||||
This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
|
||||
@@ -363,6 +457,16 @@ fi
|
||||
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
+Package: $dtb_packagename
|
||||
+Architecture: any
|
||||
+Description: Linux DTB, version $version
|
||||
+ This package contains device blobs from the Linux kernel, version $version.
|
||||
+EOF
|
||||
+
|
||||
+create_package "$dtb_packagename" "$dtb_dir"
|
||||
+
|
||||
+cat <<EOF >> debian/control
|
||||
+
|
||||
Package: $libc_headers_packagename
|
||||
Section: devel
|
||||
Provides: linux-kernel-headers
|
||||
@@ -374,7 +478,7 @@ EOF
|
||||
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
create_package "$kernel_headers_packagename" "$kernel_headers_dir"
|
||||
- create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
+# create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
fi
|
||||
|
||||
create_package "$packagename" "$tmpdir"
|
||||
1956
patch/kernel/odroidn2-default/patch-4.9.170-171.patch
Normal file
1956
patch/kernel/odroidn2-default/patch-4.9.170-171.patch
Normal file
File diff suppressed because it is too large
Load Diff
3013
patch/kernel/odroidn2-default/patch-4.9.171-172.patch
Normal file
3013
patch/kernel/odroidn2-default/patch-4.9.171-172.patch
Normal file
File diff suppressed because it is too large
Load Diff
881
patch/kernel/odroidn2-default/patch-4.9.172-173.patch
Normal file
881
patch/kernel/odroidn2-default/patch-4.9.172-173.patch
Normal file
@ -0,0 +1,881 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 75cba5fbdb46..a4e35453f9e4 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 172
|
||||
+SUBLEVEL = 173
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
index 84df85ea6296..7efde03daadd 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
@@ -26,5 +26,5 @@
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
- hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
|
||||
+ hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
|
||||
index e0280cac2484..fed72a5f3ffa 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
|
||||
@@ -90,6 +90,7 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_enet>;
|
||||
phy-mode = "rgmii";
|
||||
+ phy-reset-duration = <10>; /* in msecs */
|
||||
phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
|
||||
phy-supply = <&vdd_eth_io_reg>;
|
||||
status = "disabled";
|
||||
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
|
||||
index 8d665f1b29f8..f0fe566a9910 100644
|
||||
--- a/arch/s390/include/asm/elf.h
|
||||
+++ b/arch/s390/include/asm/elf.h
|
||||
@@ -215,11 +215,14 @@ do { \
|
||||
|
||||
/*
|
||||
* Cache aliasing on the latest machines calls for a mapping granularity
|
||||
- * of 512KB. For 64-bit processes use a 512KB alignment and a randomization
|
||||
- * of up to 1GB. For 31-bit processes the virtual address space is limited,
|
||||
- * use no alignment and limit the randomization to 8MB.
|
||||
+ * of 512KB for the anonymous mapping base. For 64-bit processes use a
|
||||
+ * 512KB alignment and a randomization of up to 1GB. For 31-bit processes
|
||||
+ * the virtual address space is limited, use no alignment and limit the
|
||||
+ * randomization to 8MB.
|
||||
+ * For the additional randomization of the program break use 32MB for
|
||||
+ * 64-bit and 8MB for 31-bit.
|
||||
*/
|
||||
-#define BRK_RND_MASK (is_compat_task() ? 0x7ffUL : 0x3ffffUL)
|
||||
+#define BRK_RND_MASK (is_compat_task() ? 0x7ffUL : 0x1fffUL)
|
||||
#define MMAP_RND_MASK (is_compat_task() ? 0x7ffUL : 0x3ff80UL)
|
||||
#define MMAP_ALIGN_MASK (is_compat_task() ? 0 : 0x7fUL)
|
||||
#define STACK_RND_MASK MMAP_RND_MASK
|
||||
diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c
|
||||
index 0ad96c647541..7017a81d53cf 100644
|
||||
--- a/drivers/ata/libata-zpodd.c
|
||||
+++ b/drivers/ata/libata-zpodd.c
|
||||
@@ -51,38 +51,52 @@ static int eject_tray(struct ata_device *dev)
|
||||
/* Per the spec, only slot type and drawer type ODD can be supported */
|
||||
static enum odd_mech_type zpodd_get_mech_type(struct ata_device *dev)
|
||||
{
|
||||
- char buf[16];
|
||||
+ char *buf;
|
||||
unsigned int ret;
|
||||
- struct rm_feature_desc *desc = (void *)(buf + 8);
|
||||
+ struct rm_feature_desc *desc;
|
||||
struct ata_taskfile tf;
|
||||
static const char cdb[] = { GPCMD_GET_CONFIGURATION,
|
||||
2, /* only 1 feature descriptor requested */
|
||||
0, 3, /* 3, removable medium feature */
|
||||
0, 0, 0,/* reserved */
|
||||
- 0, sizeof(buf),
|
||||
+ 0, 16,
|
||||
0, 0, 0,
|
||||
};
|
||||
|
||||
+ buf = kzalloc(16, GFP_KERNEL);
|
||||
+ if (!buf)
|
||||
+ return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
+ desc = (void *)(buf + 8);
|
||||
+
|
||||
ata_tf_init(dev, &tf);
|
||||
tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
|
||||
tf.command = ATA_CMD_PACKET;
|
||||
tf.protocol = ATAPI_PROT_PIO;
|
||||
- tf.lbam = sizeof(buf);
|
||||
+ tf.lbam = 16;
|
||||
|
||||
ret = ata_exec_internal(dev, &tf, cdb, DMA_FROM_DEVICE,
|
||||
- buf, sizeof(buf), 0);
|
||||
- if (ret)
|
||||
+ buf, 16, 0);
|
||||
+ if (ret) {
|
||||
+ kfree(buf);
|
||||
return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
+ }
|
||||
|
||||
- if (be16_to_cpu(desc->feature_code) != 3)
|
||||
+ if (be16_to_cpu(desc->feature_code) != 3) {
|
||||
+ kfree(buf);
|
||||
return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
+ }
|
||||
|
||||
- if (desc->mech_type == 0 && desc->load == 0 && desc->eject == 1)
|
||||
+ if (desc->mech_type == 0 && desc->load == 0 && desc->eject == 1) {
|
||||
+ kfree(buf);
|
||||
return ODD_MECH_TYPE_SLOT;
|
||||
- else if (desc->mech_type == 1 && desc->load == 0 && desc->eject == 1)
|
||||
+ } else if (desc->mech_type == 1 && desc->load == 0 &&
|
||||
+ desc->eject == 1) {
|
||||
+ kfree(buf);
|
||||
return ODD_MECH_TYPE_DRAWER;
|
||||
- else
|
||||
+ } else {
|
||||
+ kfree(buf);
|
||||
return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Test if ODD is zero power ready by sense code */
|
||||
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
|
||||
index aac84329c759..b863386be911 100644
|
||||
--- a/drivers/gpio/gpiolib-of.c
|
||||
+++ b/drivers/gpio/gpiolib-of.c
|
||||
@@ -531,7 +531,13 @@ int of_gpiochip_add(struct gpio_chip *chip)
|
||||
|
||||
of_node_get(chip->of_node);
|
||||
|
||||
- return of_gpiochip_scan_gpios(chip);
|
||||
+ status = of_gpiochip_scan_gpios(chip);
|
||||
+ if (status) {
|
||||
+ of_node_put(chip->of_node);
|
||||
+ gpiochip_remove_pin_ranges(chip);
|
||||
+ }
|
||||
+
|
||||
+ return status;
|
||||
}
|
||||
|
||||
void of_gpiochip_remove(struct gpio_chip *chip)
|
||||
diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c
|
||||
index 09a7cffbc46f..896b38f6f9c0 100644
|
||||
--- a/drivers/leds/leds-pca9532.c
|
||||
+++ b/drivers/leds/leds-pca9532.c
|
||||
@@ -488,6 +488,7 @@ static int pca9532_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
int devid;
|
||||
+ const struct of_device_id *of_id;
|
||||
struct pca9532_data *data = i2c_get_clientdata(client);
|
||||
struct pca9532_platform_data *pca9532_pdata =
|
||||
dev_get_platdata(&client->dev);
|
||||
@@ -503,8 +504,11 @@ static int pca9532_probe(struct i2c_client *client,
|
||||
dev_err(&client->dev, "no platform data\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
- devid = (int)(uintptr_t)of_match_device(
|
||||
- of_pca9532_leds_match, &client->dev)->data;
|
||||
+ of_id = of_match_device(of_pca9532_leds_match,
|
||||
+ &client->dev);
|
||||
+ if (unlikely(!of_id))
|
||||
+ return -EINVAL;
|
||||
+ devid = (int)(uintptr_t) of_id->data;
|
||||
} else {
|
||||
devid = id->driver_data;
|
||||
}
|
||||
diff --git a/drivers/media/platform/vivid/vivid-vid-common.c b/drivers/media/platform/vivid/vivid-vid-common.c
|
||||
index f9a810e3f521..5f052189a6c4 100644
|
||||
--- a/drivers/media/platform/vivid/vivid-vid-common.c
|
||||
+++ b/drivers/media/platform/vivid/vivid-vid-common.c
|
||||
@@ -841,6 +841,7 @@ int vidioc_g_edid(struct file *file, void *_fh,
|
||||
if (edid->start_block + edid->blocks > dev->edid_blocks)
|
||||
edid->blocks = dev->edid_blocks - edid->start_block;
|
||||
memcpy(edid->edid, dev->edid, edid->blocks * 128);
|
||||
- cec_set_edid_phys_addr(edid->edid, edid->blocks * 128, adap->phys_addr);
|
||||
+ if (adap)
|
||||
+ cec_set_edid_phys_addr(edid->edid, edid->blocks * 128, adap->phys_addr);
|
||||
return 0;
|
||||
}
|
||||
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
|
||||
index bd719e25dd76..2dd17e01e3a7 100644
|
||||
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
|
||||
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
|
||||
@@ -3184,6 +3184,7 @@ static ssize_t ehea_probe_port(struct device *dev,
|
||||
|
||||
if (ehea_add_adapter_mr(adapter)) {
|
||||
pr_err("creating MR failed\n");
|
||||
+ of_node_put(eth_dn);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
|
||||
index 1edc973df4c4..7377dca6eb57 100644
|
||||
--- a/drivers/net/ethernet/micrel/ks8851.c
|
||||
+++ b/drivers/net/ethernet/micrel/ks8851.c
|
||||
@@ -547,9 +547,8 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)
|
||||
/* set dma read address */
|
||||
ks8851_wrreg16(ks, KS_RXFDPR, RXFDPR_RXFPAI | 0x00);
|
||||
|
||||
- /* start the packet dma process, and set auto-dequeue rx */
|
||||
- ks8851_wrreg16(ks, KS_RXQCR,
|
||||
- ks->rc_rxqcr | RXQCR_SDA | RXQCR_ADRFE);
|
||||
+ /* start DMA access */
|
||||
+ ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr | RXQCR_SDA);
|
||||
|
||||
if (rxlen > 4) {
|
||||
unsigned int rxalign;
|
||||
@@ -580,7 +579,8 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)
|
||||
}
|
||||
}
|
||||
|
||||
- ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr);
|
||||
+ /* end DMA access and dequeue packet */
|
||||
+ ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr | RXQCR_RRXEF);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -797,6 +797,15 @@ static void ks8851_tx_work(struct work_struct *work)
|
||||
static int ks8851_net_open(struct net_device *dev)
|
||||
{
|
||||
struct ks8851_net *ks = netdev_priv(dev);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = request_threaded_irq(dev->irq, NULL, ks8851_irq,
|
||||
+ IRQF_TRIGGER_LOW | IRQF_ONESHOT,
|
||||
+ dev->name, ks);
|
||||
+ if (ret < 0) {
|
||||
+ netdev_err(dev, "failed to get irq\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
/* lock the card, even if we may not actually be doing anything
|
||||
* else at the moment */
|
||||
@@ -861,6 +870,7 @@ static int ks8851_net_open(struct net_device *dev)
|
||||
netif_dbg(ks, ifup, ks->netdev, "network device up\n");
|
||||
|
||||
mutex_unlock(&ks->lock);
|
||||
+ mii_check_link(&ks->mii);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -911,6 +921,8 @@ static int ks8851_net_stop(struct net_device *dev)
|
||||
dev_kfree_skb(txb);
|
||||
}
|
||||
|
||||
+ free_irq(dev->irq, ks);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1516,6 +1528,7 @@ static int ks8851_probe(struct spi_device *spi)
|
||||
|
||||
spi_set_drvdata(spi, ks);
|
||||
|
||||
+ netif_carrier_off(ks->netdev);
|
||||
ndev->if_port = IF_PORT_100BASET;
|
||||
ndev->netdev_ops = &ks8851_netdev_ops;
|
||||
ndev->irq = spi->irq;
|
||||
@@ -1542,14 +1555,6 @@ static int ks8851_probe(struct spi_device *spi)
|
||||
ks8851_read_selftest(ks);
|
||||
ks8851_init_mac(ks);
|
||||
|
||||
- ret = request_threaded_irq(spi->irq, NULL, ks8851_irq,
|
||||
- IRQF_TRIGGER_LOW | IRQF_ONESHOT,
|
||||
- ndev->name, ks);
|
||||
- if (ret < 0) {
|
||||
- dev_err(&spi->dev, "failed to get irq\n");
|
||||
- goto err_irq;
|
||||
- }
|
||||
-
|
||||
ret = register_netdev(ndev);
|
||||
if (ret) {
|
||||
dev_err(&spi->dev, "failed to register network device\n");
|
||||
@@ -1562,14 +1567,10 @@ static int ks8851_probe(struct spi_device *spi)
|
||||
|
||||
return 0;
|
||||
|
||||
-
|
||||
err_netdev:
|
||||
- free_irq(ndev->irq, ks);
|
||||
-
|
||||
-err_irq:
|
||||
+err_id:
|
||||
if (gpio_is_valid(gpio))
|
||||
gpio_set_value(gpio, 0);
|
||||
-err_id:
|
||||
regulator_disable(ks->vdd_reg);
|
||||
err_reg:
|
||||
regulator_disable(ks->vdd_io);
|
||||
@@ -1587,7 +1588,6 @@ static int ks8851_remove(struct spi_device *spi)
|
||||
dev_info(&spi->dev, "remove\n");
|
||||
|
||||
unregister_netdev(priv->netdev);
|
||||
- free_irq(spi->irq, priv);
|
||||
if (gpio_is_valid(priv->gpio))
|
||||
gpio_set_value(priv->gpio, 0);
|
||||
regulator_disable(priv->vdd_reg);
|
||||
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
|
||||
index 0a2318cad34d..63ebc491057b 100644
|
||||
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
|
||||
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
|
||||
@@ -1038,6 +1038,8 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode)
|
||||
|
||||
for (i = 0; i < QLCNIC_NUM_ILB_PKT; i++) {
|
||||
skb = netdev_alloc_skb(adapter->netdev, QLCNIC_ILB_PKT_SIZE);
|
||||
+ if (!skb)
|
||||
+ break;
|
||||
qlcnic_create_loopback_buff(skb->data, adapter->mac_addr);
|
||||
skb_put(skb, QLCNIC_ILB_PKT_SIZE);
|
||||
adapter->ahw->diag_cnt = 0;
|
||||
diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c
|
||||
index d543298d6750..ff24524e7f46 100644
|
||||
--- a/drivers/net/ethernet/ti/netcp_ethss.c
|
||||
+++ b/drivers/net/ethernet/ti/netcp_ethss.c
|
||||
@@ -3122,12 +3122,16 @@ static int gbe_probe(struct netcp_device *netcp_device, struct device *dev,
|
||||
|
||||
ret = netcp_txpipe_init(&gbe_dev->tx_pipe, netcp_device,
|
||||
gbe_dev->dma_chan_name, gbe_dev->tx_queue_id);
|
||||
- if (ret)
|
||||
+ if (ret) {
|
||||
+ of_node_put(interfaces);
|
||||
return ret;
|
||||
+ }
|
||||
|
||||
ret = netcp_txpipe_open(&gbe_dev->tx_pipe);
|
||||
- if (ret)
|
||||
+ if (ret) {
|
||||
+ of_node_put(interfaces);
|
||||
return ret;
|
||||
+ }
|
||||
|
||||
/* Create network interfaces */
|
||||
INIT_LIST_HEAD(&gbe_dev->gbe_intf_head);
|
||||
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
|
||||
index c688d68c39aa..a8afc92cbfca 100644
|
||||
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
|
||||
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
|
||||
@@ -1548,12 +1548,14 @@ static int axienet_probe(struct platform_device *pdev)
|
||||
ret = of_address_to_resource(np, 0, &dmares);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "unable to get DMA resource\n");
|
||||
+ of_node_put(np);
|
||||
goto free_netdev;
|
||||
}
|
||||
lp->dma_regs = devm_ioremap_resource(&pdev->dev, &dmares);
|
||||
if (IS_ERR(lp->dma_regs)) {
|
||||
dev_err(&pdev->dev, "could not map DMA regs\n");
|
||||
ret = PTR_ERR(lp->dma_regs);
|
||||
+ of_node_put(np);
|
||||
goto free_netdev;
|
||||
}
|
||||
lp->rx_irq = irq_of_parse_and_map(np, 1);
|
||||
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
|
||||
index f1f8227e7342..01f95d192d25 100644
|
||||
--- a/drivers/net/usb/ipheth.c
|
||||
+++ b/drivers/net/usb/ipheth.c
|
||||
@@ -148,6 +148,7 @@ struct ipheth_device {
|
||||
u8 bulk_in;
|
||||
u8 bulk_out;
|
||||
struct delayed_work carrier_work;
|
||||
+ bool confirmed_pairing;
|
||||
};
|
||||
|
||||
static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags);
|
||||
@@ -259,7 +260,7 @@ static void ipheth_rcvbulk_callback(struct urb *urb)
|
||||
|
||||
dev->net->stats.rx_packets++;
|
||||
dev->net->stats.rx_bytes += len;
|
||||
-
|
||||
+ dev->confirmed_pairing = true;
|
||||
netif_rx(skb);
|
||||
ipheth_rx_submit(dev, GFP_ATOMIC);
|
||||
}
|
||||
@@ -280,14 +281,24 @@ static void ipheth_sndbulk_callback(struct urb *urb)
|
||||
dev_err(&dev->intf->dev, "%s: urb status: %d\n",
|
||||
__func__, status);
|
||||
|
||||
- netif_wake_queue(dev->net);
|
||||
+ if (status == 0)
|
||||
+ netif_wake_queue(dev->net);
|
||||
+ else
|
||||
+ // on URB error, trigger immediate poll
|
||||
+ schedule_delayed_work(&dev->carrier_work, 0);
|
||||
}
|
||||
|
||||
static int ipheth_carrier_set(struct ipheth_device *dev)
|
||||
{
|
||||
- struct usb_device *udev = dev->udev;
|
||||
+ struct usb_device *udev;
|
||||
int retval;
|
||||
|
||||
+ if (!dev)
|
||||
+ return 0;
|
||||
+ if (!dev->confirmed_pairing)
|
||||
+ return 0;
|
||||
+
|
||||
+ udev = dev->udev;
|
||||
retval = usb_control_msg(udev,
|
||||
usb_rcvctrlpipe(udev, IPHETH_CTRL_ENDP),
|
||||
IPHETH_CMD_CARRIER_CHECK, /* request */
|
||||
@@ -302,11 +313,14 @@ static int ipheth_carrier_set(struct ipheth_device *dev)
|
||||
return retval;
|
||||
}
|
||||
|
||||
- if (dev->ctrl_buf[0] == IPHETH_CARRIER_ON)
|
||||
+ if (dev->ctrl_buf[0] == IPHETH_CARRIER_ON) {
|
||||
netif_carrier_on(dev->net);
|
||||
- else
|
||||
+ if (dev->tx_urb->status != -EINPROGRESS)
|
||||
+ netif_wake_queue(dev->net);
|
||||
+ } else {
|
||||
netif_carrier_off(dev->net);
|
||||
-
|
||||
+ netif_stop_queue(dev->net);
|
||||
+ }
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -386,7 +400,6 @@ static int ipheth_open(struct net_device *net)
|
||||
return retval;
|
||||
|
||||
schedule_delayed_work(&dev->carrier_work, IPHETH_CARRIER_CHECK_TIMEOUT);
|
||||
- netif_start_queue(net);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -489,7 +502,7 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||
dev->udev = udev;
|
||||
dev->net = netdev;
|
||||
dev->intf = intf;
|
||||
-
|
||||
+ dev->confirmed_pairing = false;
|
||||
/* Set up endpoints */
|
||||
hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
|
||||
if (hintf == NULL) {
|
||||
@@ -540,7 +553,9 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||
retval = -EIO;
|
||||
goto err_register_netdev;
|
||||
}
|
||||
-
|
||||
+ // carrier down and transmit queues stopped until packet from device
|
||||
+ netif_carrier_off(netdev);
|
||||
+ netif_tx_stop_all_queues(netdev);
|
||||
dev_info(&intf->dev, "Apple iPhone USB Ethernet device attached\n");
|
||||
return 0;
|
||||
|
||||
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
|
||||
index 237688af179b..f7630cf581cd 100644
|
||||
--- a/drivers/s390/scsi/zfcp_fc.c
|
||||
+++ b/drivers/s390/scsi/zfcp_fc.c
|
||||
@@ -238,10 +238,6 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,
|
||||
list_for_each_entry(port, &adapter->port_list, list) {
|
||||
if ((port->d_id & range) == (ntoh24(page->rscn_fid) & range))
|
||||
zfcp_fc_test_link(port);
|
||||
- if (!port->d_id)
|
||||
- zfcp_erp_port_reopen(port,
|
||||
- ZFCP_STATUS_COMMON_ERP_FAILED,
|
||||
- "fcrscn1");
|
||||
}
|
||||
read_unlock_irqrestore(&adapter->port_list_lock, flags);
|
||||
}
|
||||
@@ -249,6 +245,7 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,
|
||||
static void zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req)
|
||||
{
|
||||
struct fsf_status_read_buffer *status_buffer = (void *)fsf_req->data;
|
||||
+ struct zfcp_adapter *adapter = fsf_req->adapter;
|
||||
struct fc_els_rscn *head;
|
||||
struct fc_els_rscn_page *page;
|
||||
u16 i;
|
||||
@@ -261,6 +258,22 @@ static void zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req)
|
||||
/* see FC-FS */
|
||||
no_entries = head->rscn_plen / sizeof(struct fc_els_rscn_page);
|
||||
|
||||
+ if (no_entries > 1) {
|
||||
+ /* handle failed ports */
|
||||
+ unsigned long flags;
|
||||
+ struct zfcp_port *port;
|
||||
+
|
||||
+ read_lock_irqsave(&adapter->port_list_lock, flags);
|
||||
+ list_for_each_entry(port, &adapter->port_list, list) {
|
||||
+ if (port->d_id)
|
||||
+ continue;
|
||||
+ zfcp_erp_port_reopen(port,
|
||||
+ ZFCP_STATUS_COMMON_ERP_FAILED,
|
||||
+ "fcrscn1");
|
||||
+ }
|
||||
+ read_unlock_irqrestore(&adapter->port_list_lock, flags);
|
||||
+ }
|
||||
+
|
||||
for (i = 1; i < no_entries; i++) {
|
||||
/* skip head and start with 1st element */
|
||||
page++;
|
||||
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
|
||||
index f9f899ec9427..c158967b59d7 100644
|
||||
--- a/drivers/scsi/qla4xxx/ql4_os.c
|
||||
+++ b/drivers/scsi/qla4xxx/ql4_os.c
|
||||
@@ -3207,6 +3207,8 @@ static int qla4xxx_conn_bind(struct iscsi_cls_session *cls_session,
|
||||
if (iscsi_conn_bind(cls_session, cls_conn, is_leading))
|
||||
return -EINVAL;
|
||||
ep = iscsi_lookup_endpoint(transport_fd);
|
||||
+ if (!ep)
|
||||
+ return -EINVAL;
|
||||
conn = cls_conn->dd_data;
|
||||
qla_conn = conn->dd_data;
|
||||
qla_conn->qla_ep = ep->dd_data;
|
||||
diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
|
||||
index 9f61583af150..41b667c8385c 100644
|
||||
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
|
||||
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
|
||||
@@ -158,17 +158,9 @@ static u8 write_macreg_hdl(struct _adapter *padapter, u8 *pbuf)
|
||||
|
||||
static u8 read_bbreg_hdl(struct _adapter *padapter, u8 *pbuf)
|
||||
{
|
||||
- u32 val;
|
||||
- void (*pcmd_callback)(struct _adapter *dev, struct cmd_obj *pcmd);
|
||||
struct cmd_obj *pcmd = (struct cmd_obj *)pbuf;
|
||||
|
||||
- if (pcmd->rsp && pcmd->rspsz > 0)
|
||||
- memcpy(pcmd->rsp, (u8 *)&val, pcmd->rspsz);
|
||||
- pcmd_callback = cmd_callback[pcmd->cmdcode].callback;
|
||||
- if (!pcmd_callback)
|
||||
- r8712_free_cmd_obj(pcmd);
|
||||
- else
|
||||
- pcmd_callback(padapter, pcmd);
|
||||
+ r8712_free_cmd_obj(pcmd);
|
||||
return H2C_SUCCESS;
|
||||
}
|
||||
|
||||
diff --git a/drivers/staging/rtl8712/rtl8712_cmd.h b/drivers/staging/rtl8712/rtl8712_cmd.h
|
||||
index 67e9e910aef9..d10a59d4a550 100644
|
||||
--- a/drivers/staging/rtl8712/rtl8712_cmd.h
|
||||
+++ b/drivers/staging/rtl8712/rtl8712_cmd.h
|
||||
@@ -152,7 +152,7 @@ enum rtl8712_h2c_cmd {
|
||||
static struct _cmd_callback cmd_callback[] = {
|
||||
{GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
|
||||
{GEN_CMD_CODE(_Write_MACREG), NULL},
|
||||
- {GEN_CMD_CODE(_Read_BBREG), &r8712_getbbrfreg_cmdrsp_callback},
|
||||
+ {GEN_CMD_CODE(_Read_BBREG), NULL},
|
||||
{GEN_CMD_CODE(_Write_BBREG), NULL},
|
||||
{GEN_CMD_CODE(_Read_RFREG), &r8712_getbbrfreg_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_Write_RFREG), NULL}, /*5*/
|
||||
diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c
|
||||
index 73137f4aac20..d4462512605b 100644
|
||||
--- a/drivers/tty/serial/ar933x_uart.c
|
||||
+++ b/drivers/tty/serial/ar933x_uart.c
|
||||
@@ -52,11 +52,6 @@ struct ar933x_uart_port {
|
||||
struct clk *clk;
|
||||
};
|
||||
|
||||
-static inline bool ar933x_uart_console_enabled(void)
|
||||
-{
|
||||
- return IS_ENABLED(CONFIG_SERIAL_AR933X_CONSOLE);
|
||||
-}
|
||||
-
|
||||
static inline unsigned int ar933x_uart_read(struct ar933x_uart_port *up,
|
||||
int offset)
|
||||
{
|
||||
@@ -511,6 +506,7 @@ static struct uart_ops ar933x_uart_ops = {
|
||||
.verify_port = ar933x_uart_verify_port,
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_SERIAL_AR933X_CONSOLE
|
||||
static struct ar933x_uart_port *
|
||||
ar933x_console_ports[CONFIG_SERIAL_AR933X_NR_UARTS];
|
||||
|
||||
@@ -607,14 +603,7 @@ static struct console ar933x_uart_console = {
|
||||
.index = -1,
|
||||
.data = &ar933x_uart_driver,
|
||||
};
|
||||
-
|
||||
-static void ar933x_uart_add_console_port(struct ar933x_uart_port *up)
|
||||
-{
|
||||
- if (!ar933x_uart_console_enabled())
|
||||
- return;
|
||||
-
|
||||
- ar933x_console_ports[up->port.line] = up;
|
||||
-}
|
||||
+#endif /* CONFIG_SERIAL_AR933X_CONSOLE */
|
||||
|
||||
static struct uart_driver ar933x_uart_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
@@ -703,7 +692,9 @@ static int ar933x_uart_probe(struct platform_device *pdev)
|
||||
baud = ar933x_uart_get_baud(port->uartclk, 0, AR933X_UART_MAX_STEP);
|
||||
up->max_baud = min_t(unsigned int, baud, AR933X_UART_MAX_BAUD);
|
||||
|
||||
- ar933x_uart_add_console_port(up);
|
||||
+#ifdef CONFIG_SERIAL_AR933X_CONSOLE
|
||||
+ ar933x_console_ports[up->port.line] = up;
|
||||
+#endif
|
||||
|
||||
ret = uart_add_one_port(&ar933x_uart_driver, &up->port);
|
||||
if (ret)
|
||||
@@ -752,8 +743,9 @@ static int __init ar933x_uart_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
- if (ar933x_uart_console_enabled())
|
||||
- ar933x_uart_driver.cons = &ar933x_uart_console;
|
||||
+#ifdef CONFIG_SERIAL_AR933X_CONSOLE
|
||||
+ ar933x_uart_driver.cons = &ar933x_uart_console;
|
||||
+#endif
|
||||
|
||||
ret = uart_register_driver(&ar933x_uart_driver);
|
||||
if (ret)
|
||||
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
|
||||
index ea6b62cece88..82451bb6622b 100644
|
||||
--- a/drivers/tty/serial/sc16is7xx.c
|
||||
+++ b/drivers/tty/serial/sc16is7xx.c
|
||||
@@ -1482,7 +1482,7 @@ static int __init sc16is7xx_init(void)
|
||||
ret = i2c_add_driver(&sc16is7xx_i2c_uart_driver);
|
||||
if (ret < 0) {
|
||||
pr_err("failed to init sc16is7xx i2c --> %d\n", ret);
|
||||
- return ret;
|
||||
+ goto err_i2c;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1490,10 +1490,18 @@ static int __init sc16is7xx_init(void)
|
||||
ret = spi_register_driver(&sc16is7xx_spi_uart_driver);
|
||||
if (ret < 0) {
|
||||
pr_err("failed to init sc16is7xx spi --> %d\n", ret);
|
||||
- return ret;
|
||||
+ goto err_spi;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
+
|
||||
+err_spi:
|
||||
+#ifdef CONFIG_SERIAL_SC16IS7XX_I2C
|
||||
+ i2c_del_driver(&sc16is7xx_i2c_uart_driver);
|
||||
+#endif
|
||||
+err_i2c:
|
||||
+ uart_unregister_driver(&sc16is7xx_uart);
|
||||
+ return ret;
|
||||
}
|
||||
module_init(sc16is7xx_init);
|
||||
|
||||
diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c
|
||||
index 40396a265a3f..f57d293a1791 100644
|
||||
--- a/drivers/usb/gadget/udc/net2272.c
|
||||
+++ b/drivers/usb/gadget/udc/net2272.c
|
||||
@@ -958,6 +958,7 @@ net2272_dequeue(struct usb_ep *_ep, struct usb_request *_req)
|
||||
break;
|
||||
}
|
||||
if (&req->req != _req) {
|
||||
+ ep->stopped = stopped;
|
||||
spin_unlock_irqrestore(&ep->dev->lock, flags);
|
||||
return -EINVAL;
|
||||
}
|
||||
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
|
||||
index 7a8c36642293..dfaed8e8cc52 100644
|
||||
--- a/drivers/usb/gadget/udc/net2280.c
|
||||
+++ b/drivers/usb/gadget/udc/net2280.c
|
||||
@@ -870,9 +870,6 @@ static void start_queue(struct net2280_ep *ep, u32 dmactl, u32 td_dma)
|
||||
(void) readl(&ep->dev->pci->pcimstctl);
|
||||
|
||||
writel(BIT(DMA_START), &dma->dmastat);
|
||||
-
|
||||
- if (!ep->is_in)
|
||||
- stop_out_naking(ep);
|
||||
}
|
||||
|
||||
static void start_dma(struct net2280_ep *ep, struct net2280_request *req)
|
||||
@@ -911,6 +908,7 @@ static void start_dma(struct net2280_ep *ep, struct net2280_request *req)
|
||||
writel(BIT(DMA_START), &dma->dmastat);
|
||||
return;
|
||||
}
|
||||
+ stop_out_naking(ep);
|
||||
}
|
||||
|
||||
tmp = dmactl_default;
|
||||
@@ -1279,9 +1277,9 @@ static int net2280_dequeue(struct usb_ep *_ep, struct usb_request *_req)
|
||||
break;
|
||||
}
|
||||
if (&req->req != _req) {
|
||||
+ ep->stopped = stopped;
|
||||
spin_unlock_irqrestore(&ep->dev->lock, flags);
|
||||
- dev_err(&ep->dev->pdev->dev, "%s: Request mismatch\n",
|
||||
- __func__);
|
||||
+ ep_dbg(ep->dev, "%s: Request mismatch\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
|
||||
index 43618976d68a..3efb7b0e8269 100644
|
||||
--- a/drivers/usb/host/u132-hcd.c
|
||||
+++ b/drivers/usb/host/u132-hcd.c
|
||||
@@ -3208,6 +3208,9 @@ static int __init u132_hcd_init(void)
|
||||
printk(KERN_INFO "driver %s\n", hcd_name);
|
||||
workqueue = create_singlethread_workqueue("u132");
|
||||
retval = platform_driver_register(&u132_platform_driver);
|
||||
+ if (retval)
|
||||
+ destroy_workqueue(workqueue);
|
||||
+
|
||||
return retval;
|
||||
}
|
||||
|
||||
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
|
||||
index 1d48e62f4f52..0d5b667c0e65 100644
|
||||
--- a/drivers/vfio/vfio_iommu_type1.c
|
||||
+++ b/drivers/vfio/vfio_iommu_type1.c
|
||||
@@ -53,10 +53,16 @@ module_param_named(disable_hugepages,
|
||||
MODULE_PARM_DESC(disable_hugepages,
|
||||
"Disable VFIO IOMMU support for IOMMU hugepages.");
|
||||
|
||||
+static unsigned int dma_entry_limit __read_mostly = U16_MAX;
|
||||
+module_param_named(dma_entry_limit, dma_entry_limit, uint, 0644);
|
||||
+MODULE_PARM_DESC(dma_entry_limit,
|
||||
+ "Maximum number of user DMA mappings per container (65535).");
|
||||
+
|
||||
struct vfio_iommu {
|
||||
struct list_head domain_list;
|
||||
struct mutex lock;
|
||||
struct rb_root dma_list;
|
||||
+ unsigned int dma_avail;
|
||||
bool v2;
|
||||
bool nesting;
|
||||
};
|
||||
@@ -384,6 +390,7 @@ static void vfio_remove_dma(struct vfio_iommu *iommu, struct vfio_dma *dma)
|
||||
vfio_unmap_unpin(iommu, dma);
|
||||
vfio_unlink_dma(iommu, dma);
|
||||
kfree(dma);
|
||||
+ iommu->dma_avail++;
|
||||
}
|
||||
|
||||
static unsigned long vfio_pgsize_bitmap(struct vfio_iommu *iommu)
|
||||
@@ -584,12 +591,18 @@ static int vfio_dma_do_map(struct vfio_iommu *iommu,
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
+ if (!iommu->dma_avail) {
|
||||
+ mutex_unlock(&iommu->lock);
|
||||
+ return -ENOSPC;
|
||||
+ }
|
||||
+
|
||||
dma = kzalloc(sizeof(*dma), GFP_KERNEL);
|
||||
if (!dma) {
|
||||
mutex_unlock(&iommu->lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
+ iommu->dma_avail--;
|
||||
dma->iova = iova;
|
||||
dma->vaddr = vaddr;
|
||||
dma->prot = prot;
|
||||
@@ -905,6 +918,7 @@ static void *vfio_iommu_type1_open(unsigned long arg)
|
||||
|
||||
INIT_LIST_HEAD(&iommu->domain_list);
|
||||
iommu->dma_list = RB_ROOT;
|
||||
+ iommu->dma_avail = dma_entry_limit;
|
||||
mutex_init(&iommu->lock);
|
||||
|
||||
return iommu;
|
||||
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
|
||||
index 30d9d9e7057d..7a4052501866 100644
|
||||
--- a/fs/ceph/inode.c
|
||||
+++ b/fs/ceph/inode.c
|
||||
@@ -523,6 +523,7 @@ static void ceph_i_callback(struct rcu_head *head)
|
||||
struct inode *inode = container_of(head, struct inode, i_rcu);
|
||||
struct ceph_inode_info *ci = ceph_inode(inode);
|
||||
|
||||
+ kfree(ci->i_symlink);
|
||||
kmem_cache_free(ceph_inode_cachep, ci);
|
||||
}
|
||||
|
||||
@@ -554,7 +555,6 @@ void ceph_destroy_inode(struct inode *inode)
|
||||
ceph_put_snap_realm(mdsc, realm);
|
||||
}
|
||||
|
||||
- kfree(ci->i_symlink);
|
||||
while ((n = rb_first(&ci->i_fragtree)) != NULL) {
|
||||
frag = rb_entry(n, struct ceph_inode_frag, node);
|
||||
rb_erase(n, &ci->i_fragtree);
|
||||
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
|
||||
index ebecfb8fba06..28d8a57a9908 100644
|
||||
--- a/fs/nfs/client.c
|
||||
+++ b/fs/nfs/client.c
|
||||
@@ -440,7 +440,7 @@ void nfs_init_timeout_values(struct rpc_timeout *to, int proto,
|
||||
case XPRT_TRANSPORT_RDMA:
|
||||
if (retrans == NFS_UNSPEC_RETRANS)
|
||||
to->to_retries = NFS_DEF_TCP_RETRANS;
|
||||
- if (timeo == NFS_UNSPEC_TIMEO || to->to_retries == 0)
|
||||
+ if (timeo == NFS_UNSPEC_TIMEO || to->to_initval == 0)
|
||||
to->to_initval = NFS_DEF_TCP_TIMEO * HZ / 10;
|
||||
if (to->to_initval > NFS_MAX_TCP_TIMEOUT)
|
||||
to->to_initval = NFS_MAX_TCP_TIMEOUT;
|
||||
diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c
|
||||
index 38865deab3ac..0c96773d1829 100644
|
||||
--- a/net/bridge/br_netfilter_hooks.c
|
||||
+++ b/net/bridge/br_netfilter_hooks.c
|
||||
@@ -512,6 +512,7 @@ static unsigned int br_nf_pre_routing(void *priv,
|
||||
nf_bridge->ipv4_daddr = ip_hdr(skb)->daddr;
|
||||
|
||||
skb->protocol = htons(ETH_P_IP);
|
||||
+ skb->transport_header = skb->network_header + ip_hdr(skb)->ihl * 4;
|
||||
|
||||
NF_HOOK(NFPROTO_IPV4, NF_INET_PRE_ROUTING, state->net, state->sk, skb,
|
||||
skb->dev, NULL,
|
||||
diff --git a/net/bridge/br_netfilter_ipv6.c b/net/bridge/br_netfilter_ipv6.c
|
||||
index a1b57cb07f1e..8c08dd07419f 100644
|
||||
--- a/net/bridge/br_netfilter_ipv6.c
|
||||
+++ b/net/bridge/br_netfilter_ipv6.c
|
||||
@@ -235,6 +235,8 @@ unsigned int br_nf_pre_routing_ipv6(void *priv,
|
||||
nf_bridge->ipv6_daddr = ipv6_hdr(skb)->daddr;
|
||||
|
||||
skb->protocol = htons(ETH_P_IPV6);
|
||||
+ skb->transport_header = skb->network_header + sizeof(struct ipv6hdr);
|
||||
+
|
||||
NF_HOOK(NFPROTO_IPV6, NF_INET_PRE_ROUTING, state->net, state->sk, skb,
|
||||
skb->dev, NULL,
|
||||
br_nf_pre_routing_finish_ipv6);
|
||||
diff --git a/net/netfilter/nft_set_rbtree.c b/net/netfilter/nft_set_rbtree.c
|
||||
index 93820e0d8814..4ee8acded0a4 100644
|
||||
--- a/net/netfilter/nft_set_rbtree.c
|
||||
+++ b/net/netfilter/nft_set_rbtree.c
|
||||
@@ -191,10 +191,6 @@ static void *nft_rbtree_deactivate(const struct net *net,
|
||||
else if (d > 0)
|
||||
parent = parent->rb_right;
|
||||
else {
|
||||
- if (!nft_set_elem_active(&rbe->ext, genmask)) {
|
||||
- parent = parent->rb_left;
|
||||
- continue;
|
||||
- }
|
||||
if (nft_rbtree_interval_end(rbe) &&
|
||||
!nft_rbtree_interval_end(this)) {
|
||||
parent = parent->rb_left;
|
||||
@@ -203,6 +199,9 @@ static void *nft_rbtree_deactivate(const struct net *net,
|
||||
nft_rbtree_interval_end(this)) {
|
||||
parent = parent->rb_right;
|
||||
continue;
|
||||
+ } else if (!nft_set_elem_active(&rbe->ext, genmask)) {
|
||||
+ parent = parent->rb_left;
|
||||
+ continue;
|
||||
}
|
||||
nft_set_elem_change_active(net, set, &rbe->ext);
|
||||
return rbe;
|
||||
diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c
|
||||
index d58de1dc5360..510049a7bd1d 100644
|
||||
--- a/scripts/kconfig/lxdialog/inputbox.c
|
||||
+++ b/scripts/kconfig/lxdialog/inputbox.c
|
||||
@@ -126,7 +126,8 @@ do_resize:
|
||||
case KEY_DOWN:
|
||||
break;
|
||||
case KEY_BACKSPACE:
|
||||
- case 127:
|
||||
+ case 8: /* ^H */
|
||||
+ case 127: /* ^? */
|
||||
if (pos) {
|
||||
wattrset(dialog, dlg.inputbox.atr);
|
||||
if (input_x == 0) {
|
||||
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
|
||||
index d42d534a66cd..f7049e288e93 100644
|
||||
--- a/scripts/kconfig/nconf.c
|
||||
+++ b/scripts/kconfig/nconf.c
|
||||
@@ -1046,7 +1046,7 @@ static int do_match(int key, struct match_state *state, int *ans)
|
||||
state->match_direction = FIND_NEXT_MATCH_UP;
|
||||
*ans = get_mext_match(state->pattern,
|
||||
state->match_direction);
|
||||
- } else if (key == KEY_BACKSPACE || key == 127) {
|
||||
+ } else if (key == KEY_BACKSPACE || key == 8 || key == 127) {
|
||||
state->pattern[strlen(state->pattern)-1] = '\0';
|
||||
adj_match_dir(&state->match_direction);
|
||||
} else
|
||||
diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c
|
||||
index 4b2f44c20caf..9a65035cf787 100644
|
||||
--- a/scripts/kconfig/nconf.gui.c
|
||||
+++ b/scripts/kconfig/nconf.gui.c
|
||||
@@ -439,7 +439,8 @@ int dialog_inputbox(WINDOW *main_window,
|
||||
case KEY_F(F_EXIT):
|
||||
case KEY_F(F_BACK):
|
||||
break;
|
||||
- case 127:
|
||||
+ case 8: /* ^H */
|
||||
+ case 127: /* ^? */
|
||||
case KEY_BACKSPACE:
|
||||
if (cursor_position > 0) {
|
||||
memmove(&result[cursor_position-1],
|
||||
2517
patch/kernel/odroidn2-default/patch-4.9.173-174.patch.disabled
Normal file
2517
patch/kernel/odroidn2-default/patch-4.9.173-174.patch.disabled
Normal file
File diff suppressed because it is too large
Load Diff
73
patch/u-boot/u-boot-odroidn2/load-from-ext4.patch
Normal file
73
patch/u-boot/u-boot-odroidn2/load-from-ext4.patch
Normal file
@ -0,0 +1,73 @@
|
||||
diff --git a/common/cmd_cfgload.c b/common/cmd_cfgload.c
|
||||
index 7dd4ec3..c7089a4 100644
|
||||
--- a/common/cmd_cfgload.c
|
||||
+++ b/common/cmd_cfgload.c
|
||||
@@ -23,7 +23,7 @@ static int do_load_cfgload(cmd_tbl_t *cmdtp, int flag, int argc,
|
||||
debug ("* cfgload: cmdline image address = 0x%08lx\n", addr);
|
||||
}
|
||||
|
||||
- snprintf(cmd, sizeof(cmd), "load mmc %d:1 0x%08lx boot.ini; source 0x%08lx",
|
||||
+ snprintf(cmd, sizeof(cmd), "ext4load mmc %d:1 0x%08lx boot/boot.ini; source 0x%08lx",
|
||||
devno, addr, addr);
|
||||
return run_command(cmd, 0);
|
||||
}
|
||||
@@ -32,7 +32,7 @@ U_BOOT_CMD(
|
||||
cfgload, 2, 0, do_load_cfgload,
|
||||
"read 'boot.ini' from FAT partiton",
|
||||
"\n"
|
||||
- " - read boot.ini from the first partiton treated as FAT partiton"
|
||||
+ " - read boot.ini from the first partiton"
|
||||
);
|
||||
|
||||
/* vim: set ts=4 sw=4 tw=80: */
|
||||
diff --git a/common/edid-decode.c b/common/edid-decode.c
|
||||
index a4c1a0c..ae11a02 100644
|
||||
--- a/common/edid-decode.c
|
||||
+++ b/common/edid-decode.c
|
||||
@@ -1735,10 +1735,10 @@ void save_edid_bin(unsigned char *edid, unsigned int blk_len)
|
||||
return;
|
||||
}
|
||||
|
||||
- ret = file_exists("mmc", part, "edid.bin", FS_TYPE_ANY);
|
||||
+ ret = file_exists("mmc", part, "/boot/edid.bin", FS_TYPE_ANY);
|
||||
if (!ret) {
|
||||
printf("NOT EXIST, now build edid.bin\n");
|
||||
- sprintf(str, "fatwrite mmc %s 0x%lx edid.bin 0x%x",
|
||||
+ sprintf(str, "ext4write mmc %s 0x%lx /boot/edid.bin 0x%x",
|
||||
part, (unsigned long)edid, (128 * blk_len));
|
||||
run_command(str, 0);
|
||||
}
|
||||
@@ -1756,18 +1756,18 @@ void save_display_bin(bool config, char *modeline)
|
||||
return;
|
||||
}
|
||||
|
||||
- ret = file_exists("mmc", part, "display.bin", FS_TYPE_ANY);
|
||||
+ ret = file_exists("mmc", part, "/boot/display.bin", FS_TYPE_ANY);
|
||||
if(!ret) {
|
||||
printf("NOT EXIST, now build display.bin\n");
|
||||
|
||||
if (config == true) {
|
||||
sprintf(result, "Auto Detect OK:%s,%s(%s)", bestmode, getenv("voutmode"), modeline);
|
||||
- sprintf(str, "fatwrite mmc %s 0x%lx display.bin 0x78",
|
||||
+ sprintf(str, "ext4write mmc %s 0x%lx /boot/display.bin 0x78",
|
||||
part, (unsigned long)result);
|
||||
run_command(str, 0);
|
||||
} else {
|
||||
sprintf(result, "Auto Detect FAIL:%s,%s", bestmode, getenv("voutmode"));
|
||||
- sprintf(str, "fatwrite mmc %s 0x%lx display.bin 0x78",
|
||||
+ sprintf(str, "ext4write mmc %s 0x%lx /boot/display.bin 0x78",
|
||||
part, (unsigned long)result);
|
||||
run_command(str, 0);
|
||||
}
|
||||
diff --git a/include/configs/odroid-g12-common.h b/include/configs/odroid-g12-common.h
|
||||
index 663b0f0..71e73c2 100644
|
||||
--- a/include/configs/odroid-g12-common.h
|
||||
+++ b/include/configs/odroid-g12-common.h
|
||||
@@ -450,6 +450,7 @@
|
||||
#define CONFIG_CMD_FAT 1
|
||||
#define CONFIG_CMD_EXT2 1
|
||||
#define CONFIG_CMD_EXT4 1
|
||||
+#define CONFIG_CMD_EXT4_WRITE 1
|
||||
#define CONFIG_CMD_GPIO 1
|
||||
#define CONFIG_CMD_RUN 1
|
||||
#define CONFIG_CMD_REBOOT 1
|
||||
Loading…
Reference in New Issue
Block a user