Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
e1c4a7354d
@ -24,6 +24,9 @@ OLDFAMILY=""
|
||||
# build 5 = next and dev kernels
|
||||
# build 6 = legacy and next and dev kernel
|
||||
|
||||
# Include here to make "display_alert" and "prepare_host" available
|
||||
source $SRC/lib/general.sh # General functions
|
||||
|
||||
distro-list ()
|
||||
{
|
||||
declare -a MYARRAY1=('wheezy' 'Debian 7 Wheezy | oldstable' 'jessie' 'Debian 8 Jessie | stable' 'trusty' 'Ubuntu Trusty Tahr 14.04.x LTS');
|
||||
@ -40,16 +43,16 @@ while [[ $k1 -lt ${#MYARRAY1[@]} ]]
|
||||
else
|
||||
BUILD_DESKTOP="no"
|
||||
fi
|
||||
unset IFS
|
||||
unset IFS LINUXFAMILY LINUXCONFIG LINUXKERNEL LINUXSOURCE KERNELBRANCH BOOTLOADER BOOTSOURCE BOOTBRANCH CPUMIN GOVERNOR
|
||||
source $SRC/lib/configuration.sh
|
||||
if [[ $KERNEL_ONLY == "yes" ]]; then
|
||||
if [[ "$OLDFAMILY" != *"$LINUXFAMILY$BRANCH"* ]]; then
|
||||
echo "$BOARD $RELEASE $BRANCH $BUILD_DESKTOP $LINUXFAMILY"
|
||||
display_alert "$BOARD" "$RELEASE $BRANCH $BUILD_DESKTOP $LINUXFAMILY" "info"
|
||||
[[ $BUILD_ALL != "demo" ]] && source $SRC/lib/main.sh
|
||||
OLDFAMILY=$OLDFAMILY"$LINUXFAMILY$BRANCH"
|
||||
fi
|
||||
else
|
||||
echo "$BOARD $RELEASE $BRANCH $BUILD_DESKTOP $LINUXFAMILY"
|
||||
display_alert "$BOARD" "$RELEASE $BRANCH $BUILD_DESKTOP $LINUXFAMILY" "info"
|
||||
[[ $BUILD_ALL != "demo" ]] && source $SRC/lib/main.sh
|
||||
fi # kernel only
|
||||
IFS=";"
|
||||
|
||||
@ -410,7 +410,7 @@
|
||||
|
||||
# For user override
|
||||
if [[ -f "$SRC/userpatches/lib.config" ]]; then
|
||||
#display_alert "Using user configuration override" "$SRC/userpatches/lib.config" "info"
|
||||
display_alert "Using user configuration override" "$SRC/userpatches/lib.config" "info"
|
||||
source $SRC/userpatches/lib.config
|
||||
fi
|
||||
|
||||
|
||||
@ -1,374 +0,0 @@
|
||||
--- a/arch/arm/kernel/setup.c
|
||||
+++ b/arch/arm/kernel/setup.c
|
||||
@@ -31,7 +31,18 @@
|
||||
#include <linux/bug.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/sort.h>
|
||||
+
|
||||
+#ifdef CONFIG_GMAC_FOR_BANANAPI
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
+#include <linux/mii.h>
|
||||
+#include <linux/phy.h>
|
||||
+#include <linux/clk.h>
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
|
||||
#include <asm/unified.h>
|
||||
#include <asm/cp15.h>
|
||||
@@ -1101,16 +1112,13 @@
|
||||
|
||||
seq_printf(m, "Hardware\t: %s\n", machine_name);
|
||||
seq_printf(m, "Revision\t: %04x\n", system_rev);
|
||||
+#ifdef CONFIG_GMAC_FOR_BANANAPI
|
||||
+ seq_printf(m, "Serial\t\t: %08x%08x%08x%08x\n", readl(SW_VA_SID_IO_BASE+0x0C),
|
||||
+ readl(SW_VA_SID_IO_BASE+0x08), readl(SW_VA_SID_IO_BASE+0x04), readl(SW_VA_SID_IO_BASE));
|
||||
+#else
|
||||
seq_printf(m, "Serial\t\t: %08x%08x\n",
|
||||
system_serial_high, system_serial_low);
|
||||
-
|
||||
- #define SW_VA_SID_IO_BASE 0xf1c23800
|
||||
- seq_printf(m, "Chipid\t\t: %08x-%08x-%08x-%08x\n",
|
||||
- readl(SW_VA_SID_IO_BASE),
|
||||
- readl(SW_VA_SID_IO_BASE + 0x4),
|
||||
- readl(SW_VA_SID_IO_BASE + 0x8),
|
||||
- readl(SW_VA_SID_IO_BASE + 0xc)
|
||||
- );
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
--- a/arch/arm/plat-sunxi/sys_config.c
|
||||
+++ b/arch/arm/plat-sunxi/sys_config.c
|
||||
@@ -145,6 +145,7 @@
|
||||
|
||||
return gpio_count;
|
||||
}
|
||||
+EXPORT_SYMBOL(script_parser_mainkey_get_gpio_count); //Fix the GAMC cannot build as module
|
||||
|
||||
int script_parser_mainkey_get_gpio_cfg(char *main_name, void *gpio_cfg, int gpio_count)
|
||||
{
|
||||
@@ -179,6 +180,7 @@
|
||||
|
||||
return SCRIPT_PARSER_KEY_NOT_FIND;
|
||||
}
|
||||
+EXPORT_SYMBOL(script_parser_mainkey_get_gpio_cfg); //Fix the GAMC cannot build as module
|
||||
|
||||
/*
|
||||
*
|
||||
--- a/drivers/net/ethernet/allwinner/gmac/sunxi_gmac.h
|
||||
+++ b/drivers/net/ethernet/allwinner/gmac/sunxi_gmac.h
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "gmac_base.h"
|
||||
|
||||
#define GMAC_RESOURCE_NAME "sunxi_gmac"
|
||||
+#ifdef CONFIG_GMAC_FOR_BANANAPI
|
||||
+ #define GMAC_PHY_POWER
|
||||
+#endif
|
||||
|
||||
enum rx_frame_status { /* IPC status */
|
||||
good_frame = 0,
|
||||
@@ -132,7 +135,11 @@
|
||||
void __iomem *gpiobase;
|
||||
#else
|
||||
int gpio_cnt;
|
||||
+#ifdef CONFIG_GMAC_FOR_BANANAPI
|
||||
+ user_gpio_set_t *gpio_hd;
|
||||
+#else
|
||||
unsigned int gpio_handle;
|
||||
+#endif
|
||||
|
||||
#endif
|
||||
#ifndef CONFIG_GMAC_CLK_SYS
|
||||
@@ -163,6 +170,9 @@
|
||||
spinlock_t lock;
|
||||
spinlock_t tx_lock;
|
||||
struct gmac_plat_data *plat;
|
||||
+#ifdef GMAC_PHY_POWER
|
||||
+ u32 gpio_power_hd;
|
||||
+#endif
|
||||
//struct dma_features dma_cap;
|
||||
};
|
||||
|
||||
--- a/drivers/net/ethernet/allwinner/gmac/Kconfig
|
||||
+++ b/drivers/net/ethernet/allwinner/gmac/Kconfig
|
||||
@@ -29,6 +29,13 @@
|
||||
If you want to use the system interface, select it. If not, the
|
||||
driver will control the clock by ioremap.
|
||||
|
||||
+config GMAC_FOR_BANANAPI
|
||||
+ bool "modified gmac driver for Bananapi"
|
||||
+ depends on SUNXI_GMAC
|
||||
+ ---help---
|
||||
+ If you want to compile the firmware for Bananapi, you should select it.
|
||||
+ The driver will be modified to be suit for the Bananapi' gmac.
|
||||
+
|
||||
choice
|
||||
prompt "Select the DMA TX/RX descriptor operating modes"
|
||||
depends on SUNXI_GMAC
|
||||
--- a/drivers/net/ethernet/allwinner/gmac/gmac_plat.c
|
||||
+++ b/drivers/net/ethernet/allwinner/gmac/gmac_plat.c
|
||||
@@ -34,6 +34,10 @@
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/clock.h>
|
||||
+#ifdef CONFIG_GMAC_FOR_BANANAPI
|
||||
+#include <mach/includes.h>
|
||||
+#include <plat/sys_config.h> //Fix the GAMC cannot build as module
|
||||
+#endif
|
||||
|
||||
#include "sunxi_gmac.h"
|
||||
|
||||
@@ -43,11 +47,64 @@
|
||||
int ret = 0;
|
||||
|
||||
#ifndef CONFIG_GMAC_SCRIPT_SYS
|
||||
+#ifdef CONFIG_GMAC_FOR_BANANAPI
|
||||
+ int reg_value;
|
||||
+ /* configure system io */
|
||||
+ if(priv->gpiobase){
|
||||
+ writel(0x22222222, priv->gpiobase + PA_CFG0);
|
||||
+
|
||||
+ writel(0x22222222, priv->gpiobase + PA_CFG1);
|
||||
+
|
||||
+ writel(0x00000022, priv->gpiobase + PA_CFG2);
|
||||
+#else
|
||||
if(priv->gpiobase){
|
||||
writel(0x55555555, priv->gpiobase + PA_CFG0);
|
||||
writel(0x50555505, priv->gpiobase + PA_CFG1);
|
||||
writel(0x00000005, priv->gpiobase + PA_CFG2);
|
||||
}
|
||||
+#endif
|
||||
+#else
|
||||
+#ifdef CONFIG_GMAC_FOR_BANANAPI
|
||||
+ int i = 0;
|
||||
+ int gpio_tmp;
|
||||
+
|
||||
+ priv->gpio_cnt = script_parser_mainkey_get_gpio_count("gmac_para");
|
||||
+ priv->gpio_hd = kmalloc(sizeof(user_gpio_set_t)*priv->gpio_cnt, GFP_KERNEL);
|
||||
+ printk("gmac_para gpio count is %d\n", priv->gpio_cnt);
|
||||
+ script_parser_mainkey_get_gpio_cfg("gmac_para", priv->gpio_hd, priv->gpio_cnt);
|
||||
+ for (i = 0; i < priv->gpio_cnt; i++){
|
||||
+ gpio_tmp = gpio_request_ex("gmac_para", priv->gpio_hd[i].gpio_name);
|
||||
+ if (gpio_tmp){
|
||||
+ gpio_set_one_pin_status(gpio_tmp, &priv->gpio_hd[i], priv->gpio_hd[i].gpio_name, 1);
|
||||
+ }else{
|
||||
+ printk("gpio_set_one_pin_status error\n");
|
||||
+ }
|
||||
+ }
|
||||
+#ifdef GMAC_PHY_POWER
|
||||
+ priv->gpio_power_hd= gpio_request_ex("gmac_phy_power", "gmac_phy_power_en");
|
||||
+#endif
|
||||
+gpio_err:
|
||||
+ if(unlikely(ret)){
|
||||
+ gpio_free(priv->gpio_hd);
|
||||
+ priv->gpio_hd = NULL;
|
||||
+ priv->gpio_cnt = 0;
|
||||
+ }
|
||||
+#ifdef SUN7i_GMAC_FPGA
|
||||
+ reg_value = readl(IO_ADDRESS(GPIO_BASE + 0x108));
|
||||
+ reg_value |= 0x1<<20;
|
||||
+ writel(reg_value, IO_ADDRESS(GPIO_BASE + 0x108));
|
||||
+
|
||||
+ reg_value = readl(IO_ADDRESS(GPIO_BASE + 0x10c));
|
||||
+ reg_value &= ~(0x1<<29);
|
||||
+ writel(reg_value, IO_ADDRESS(GPIO_BASE + 0x10c));
|
||||
+
|
||||
+ mdelay(200);
|
||||
+
|
||||
+ reg_value = readl(IO_ADDRESS(GPIO_BASE + 0x10c));
|
||||
+ reg_value |= 0x1<<29;
|
||||
+ writel(reg_value, IO_ADDRESS(GPIO_BASE + 0x10c));
|
||||
+#endif
|
||||
+
|
||||
#else
|
||||
priv->gpio_handle = gpio_request_ex("gmac_para", NULL);
|
||||
if(!priv->gpio_handle) {
|
||||
@@ -55,6 +112,7 @@
|
||||
ret = -1;
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -177,8 +235,17 @@
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
release_mem_region(res->start, resource_size(res));
|
||||
#else
|
||||
+ #ifdef CONFIG_GMAC_FOR_BANANAPI
|
||||
+ int i;
|
||||
+ if (priv->gpio_hd){
|
||||
+ gpio_free(priv->gpio_hd);
|
||||
+ priv->gpio_hd = NULL;
|
||||
+ priv->gpio_cnt = 0;
|
||||
+ }
|
||||
+ #else
|
||||
gpio_release(priv->gpio_handle, 0);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
iounmap(priv->gmac_clk_reg);
|
||||
|
||||
--- a/drivers/net/ethernet/allwinner/gmac/gmac_core.c
|
||||
+++ b/drivers/net/ethernet/allwinner/gmac/gmac_core.c
|
||||
@@ -38,7 +38,6 @@
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <plat/sys_config.h>
|
||||
-#include <plat/platform.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/clock.h>
|
||||
|
||||
@@ -51,6 +50,10 @@
|
||||
#include "gmac_desc.h"
|
||||
#include "gmac_ethtool.h"
|
||||
|
||||
+#ifdef CONFIG_GMAC_FOR_BANANAPI
|
||||
+#include <plat/platform.h>
|
||||
+#endif
|
||||
+
|
||||
#undef GMAC_DEBUG
|
||||
#ifdef GMAC_DEBUG
|
||||
#define DBG(nlevel, klevel, fmt, args...) \
|
||||
@@ -79,7 +82,8 @@
|
||||
#define GMAC_ALIGN(x) L1_CACHE_ALIGN(x)
|
||||
#define JUMBO_LEN 9000
|
||||
|
||||
-static char *mac_str = ":";
|
||||
+#define GMAC_MAC_ADDRESS "00:00:00:00:00:00"
|
||||
+static char *mac_str = GMAC_MAC_ADDRESS;
|
||||
module_param(mac_str, charp, S_IRUGO | S_IWUSR);
|
||||
MODULE_PARM_DESC(mac_str, "MAC Address String.(xx:xx:xx:xx:xx:xx)");
|
||||
|
||||
@@ -217,6 +221,9 @@
|
||||
|| phy_interface == PHY_INTERFACE_MODE_GMII)
|
||||
priv_clk_reg |= 0x00000002;
|
||||
|
||||
+#ifdef CONFIG_GMAC_FOR_BANANAPI
|
||||
+ priv_clk_reg |= (0x00000003<<10);
|
||||
+#endif
|
||||
writel(priv_clk_reg, priv->gmac_clk_reg + GMAC_CLK_REG);
|
||||
}
|
||||
|
||||
@@ -773,21 +780,17 @@
|
||||
|
||||
static void gmac_check_ether_addr(struct gmac_priv *priv)
|
||||
{
|
||||
+ int i;
|
||||
+ char *p = mac_str;
|
||||
/* verify if the MAC address is valid, in case of failures it
|
||||
* generates a random MAC address */
|
||||
if (!is_valid_ether_addr(priv->ndev->dev_addr)) {
|
||||
- if (strlen(mac_str) == 17) {
|
||||
- int i;
|
||||
- char *p = mac_str;
|
||||
-
|
||||
- pr_info("gmac: use mac address from mac_str\n");
|
||||
- for (i=0; i<6; i++,p++)
|
||||
- priv->ndev->dev_addr[i] = simple_strtoul(p, &p, 16);
|
||||
- }
|
||||
-
|
||||
+#ifdef CONFIG_GMAC_FOR_BANANAPI
|
||||
+ gmac_get_umac_addr((void __iomem *)
|
||||
+ priv->ndev->base_addr,
|
||||
+ priv->ndev->dev_addr, 0);
|
||||
if (!is_valid_ether_addr(priv->ndev->dev_addr)) {
|
||||
unsigned int reg_val;
|
||||
-
|
||||
reg_val = readl(SW_VA_SID_IO_BASE);
|
||||
pr_info("gmac: use mac address from chipid\n");
|
||||
priv->ndev->dev_addr[0] = 0x02; /* Non OUI / registered MAC address */
|
||||
@@ -803,12 +806,47 @@
|
||||
pr_info("gmac: use random mac address\n");
|
||||
}
|
||||
}
|
||||
- } else {
|
||||
- pr_info("gmac: use mac address from cmdline\n");
|
||||
+#else
|
||||
+ if (!is_valid_ether_addr(priv->ndev->dev_addr)) {
|
||||
+ for (i=0; i<6; i++,p++)
|
||||
+ priv->ndev->dev_addr[i] = simple_strtoul(p, &p, 16);
|
||||
+ }
|
||||
+
|
||||
+ if (!is_valid_ether_addr(priv->ndev->dev_addr))
|
||||
+ random_ether_addr(priv->ndev->dev_addr);
|
||||
+#endif
|
||||
+ }
|
||||
+ printk(KERN_WARNING "%s: device MAC address %pM\n", priv->ndev->name,
|
||||
+ priv->ndev->dev_addr);
|
||||
+}
|
||||
+
|
||||
+#ifdef GMAC_PHY_POWER
|
||||
+void gmac_phy_power_en(struct gmac_priv *priv)
|
||||
+{
|
||||
+ if(!priv) return;
|
||||
+
|
||||
+ if (priv->gpio_power_hd){
|
||||
+ printk("GMAC gpio_power_hd:gpio_direction_output\n");
|
||||
+ gpio_set_one_pin_io_status(priv->gpio_power_hd, 1, "gmac_phy_power_en");//set the gpio to output
|
||||
+ gpio_write_one_pin_value(priv->gpio_power_hd, 1, "gmac_phy_power_en");
|
||||
+ mdelay(200);
|
||||
+ }
|
||||
+
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+void gmac_phy_power_disable(struct gmac_priv *priv)
|
||||
+{
|
||||
+ if(!priv) return;
|
||||
+
|
||||
+ if (priv->gpio_power_hd){
|
||||
+ gpio_write_one_pin_value(priv->gpio_power_hd, 0, "gmac_phy_power_en");
|
||||
}
|
||||
|
||||
- pr_info("gmac: device MAC address %pM\n", priv->ndev->dev_addr);
|
||||
+ return;
|
||||
+
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* gmac_open - open entry point of the driver
|
||||
@@ -824,9 +862,14 @@
|
||||
struct gmac_priv *priv = netdev_priv(ndev);
|
||||
int ret;
|
||||
|
||||
- gmac_clk_ctl(priv, 1);
|
||||
- //gmac_check_ether_addr(priv);
|
||||
+#ifdef GMAC_PHY_POWER
|
||||
+ gmac_phy_power_en(priv);
|
||||
+#endif
|
||||
|
||||
+ gmac_clk_ctl(priv, 1);
|
||||
+#ifdef GMAC_PHY_POWER
|
||||
+ gmac_check_ether_addr(priv);
|
||||
+#endif
|
||||
/* MDIO bus Registration */
|
||||
ret = gmac_mdio_register(ndev);
|
||||
if (ret < 0) {
|
||||
@@ -964,6 +1007,10 @@
|
||||
gmac_mdio_unregister(ndev);
|
||||
gmac_clk_ctl(priv, 0);
|
||||
|
||||
+#ifdef GMAC_PHY_POWER
|
||||
+ gmac_phy_power_disable(priv);
|
||||
+#endif
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1742,6 +1789,9 @@
|
||||
|
||||
static void __exit gmac_remove(void)
|
||||
{
|
||||
+#ifdef CONFIG_GMAC_SCRIPT_SYS
|
||||
+ script_parser_fetch("gmac_para", "gmac_used", &gmac_used, 1);
|
||||
+#endif
|
||||
if (gmac_used != 1) {
|
||||
pr_info("gmac is disabled\n");
|
||||
return;
|
||||
@ -1,65 +0,0 @@
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -81,10 +81,10 @@ fwdir="$objtree/debian/fwtmp"
|
||||
kernel_headers_dir="$objtree/debian/hdrtmp"
|
||||
libc_headers_dir="$objtree/debian/headertmp"
|
||||
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"
|
||||
+libc_headers_packagename=linux-libc-dev"$LOCALVERSION"
|
||||
dbg_packagename=$packagename-dbg
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
@@ -177,7 +177,7 @@ fi
|
||||
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
$MAKE headers_check KBUILD_SRC=
|
||||
- $MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
|
||||
+ #$MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
|
||||
fi
|
||||
|
||||
# Install the maintainer scripts
|
||||
@@ -213,10 +213,25 @@ done
|
||||
##
|
||||
## Create sym link to kernel image
|
||||
##
|
||||
-kernel_tmp_version="${installed_image_path////\\/}"
|
||||
-sed -e "s/exit 0/ln -sf \/$kernel_tmp_version \/boot\/zImage/g" -i $tmpdir/DEBIAN/postinst
|
||||
-echo "rm -f /boot/.next" >> $tmpdir/DEBIAN/postinst
|
||||
-echo "exit 0" >> $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
|
||||
+rm -f /$installed_image_path /boot/zImage
|
||||
+else
|
||||
+ln -sf /$installed_image_path /boot/zImage > /dev/null 2>&1 || mv /$installed_image_path /boot/zImage
|
||||
+fi
|
||||
+rm -f /boot/.next
|
||||
+exit 0
|
||||
+EOT
|
||||
+##
|
||||
+## FAT install workaround
|
||||
+##
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/preinst
|
||||
+cat >> $tmpdir/DEBIAN/preinst <<EOT
|
||||
+rm -f /boot/System.map* /boot/config* /$installed_image_path /boot/zImage
|
||||
+EOT
|
||||
+echo "exit 0" >> $tmpdir/DEBIAN/preinst
|
||||
|
||||
# Try to determine maintainer and email values
|
||||
if [ -n "$DEBEMAIL" ]; then
|
||||
@@ -359,7 +374,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"
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,20 +0,0 @@
|
||||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
|
||||
index 25db369..34ce064 100644
|
||||
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
|
||||
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
|
||||
@@ -1946,6 +1946,14 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
|
||||
rtl_write_word(rtlpriv, REG_RXFLTMAP2, *(u16 *)val);
|
||||
mac->rx_data_filter = *(u16 *)val;
|
||||
break;
|
||||
+ case HW_VAR_KEEP_ALIVE:{
|
||||
+ u8 array[2];
|
||||
+ array[0] = 0xff;
|
||||
+ array[1] = *((u8 *)val);
|
||||
+ rtl92c_fill_h2c_cmd(hw, H2C_92C_KEEP_ALIVE_CTRL, 2,
|
||||
+ array);
|
||||
+ break;
|
||||
+ }
|
||||
default:
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
|
||||
"switch case not processed\n");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,429 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# builddeb 1.3
|
||||
# Copyright 2003 Wichert Akkerman <wichert@wiggy.net>
|
||||
#
|
||||
# Simple script to generate a deb package for a Linux kernel. All the
|
||||
# complexity of what to do with a kernel after it is installed or removed
|
||||
# is left to other scripts and packages: they can install scripts in the
|
||||
# /etc/kernel/{pre,post}{inst,rm}.d/ directories (or an alternative location
|
||||
# specified in KDEB_HOOKDIR) that will be called on package install and
|
||||
# removal.
|
||||
|
||||
set -e
|
||||
|
||||
create_package() {
|
||||
local pname="$1" pdir="$2"
|
||||
|
||||
cp debian/copyright "$pdir/usr/share/doc/$pname/"
|
||||
cp debian/changelog "$pdir/usr/share/doc/$pname/changelog.Debian"
|
||||
gzip -9 "$pdir/usr/share/doc/$pname/changelog.Debian"
|
||||
sh -c "cd '$pdir'; find . -type f ! -path './DEBIAN/*' -printf '%P\0' \
|
||||
| xargs -r0 md5sum > DEBIAN/md5sums"
|
||||
|
||||
# Fix ownership and permissions
|
||||
chown -R root:root "$pdir"
|
||||
chmod -R go-w "$pdir"
|
||||
|
||||
# Attempt to find the correct Debian architecture
|
||||
local forcearch="" debarch=""
|
||||
case "$UTS_MACHINE" in
|
||||
i386|ia64|alpha)
|
||||
debarch="$UTS_MACHINE" ;;
|
||||
x86_64)
|
||||
debarch=amd64 ;;
|
||||
sparc*)
|
||||
debarch=sparc ;;
|
||||
s390*)
|
||||
debarch=s390$(grep -q CONFIG_64BIT=y $KCONFIG_CONFIG && echo x || true) ;;
|
||||
ppc*)
|
||||
debarch=$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo ppc64el || echo powerpc) ;;
|
||||
parisc*)
|
||||
debarch=hppa ;;
|
||||
mips*)
|
||||
debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
|
||||
arm64)
|
||||
debarch=arm64 ;;
|
||||
arm*)
|
||||
debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;;
|
||||
*)
|
||||
echo "" >&2
|
||||
echo "** ** ** WARNING ** ** **" >&2
|
||||
echo "" >&2
|
||||
echo "Your architecture doesn't have it's equivalent" >&2
|
||||
echo "Debian userspace architecture defined!" >&2
|
||||
echo "Falling back to using your current userspace instead!" >&2
|
||||
echo "Please add support for $UTS_MACHINE to ${0} ..." >&2
|
||||
echo "" >&2
|
||||
esac
|
||||
if [ -n "$KBUILD_DEBARCH" ] ; then
|
||||
debarch="$KBUILD_DEBARCH"
|
||||
fi
|
||||
if [ -n "$debarch" ] ; then
|
||||
forcearch="-DArchitecture=$debarch"
|
||||
fi
|
||||
|
||||
# Create the package
|
||||
dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
|
||||
dpkg --build "$pdir" ..
|
||||
}
|
||||
|
||||
# Some variables and settings used throughout the script
|
||||
version=$KERNELRELEASE
|
||||
revision=$(cat .version)
|
||||
if [ -n "$KDEB_PKGVERSION" ]; then
|
||||
packageversion=$KDEB_PKGVERSION
|
||||
else
|
||||
packageversion=$version-$revision
|
||||
fi
|
||||
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"$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
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
packagename=user-mode-linux-$version
|
||||
fi
|
||||
|
||||
# Not all arches have the same installed path in debian
|
||||
# XXX: have each arch Makefile export a variable of the canonical image install
|
||||
# path instead
|
||||
case $ARCH in
|
||||
um)
|
||||
installed_image_path="usr/bin/linux-$version"
|
||||
;;
|
||||
parisc|mips|powerpc)
|
||||
installed_image_path="boot/vmlinux-$version"
|
||||
;;
|
||||
*)
|
||||
installed_image_path="boot/vmlinuz-$version"
|
||||
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" "$dtb_dir"
|
||||
mkdir -m 755 -p "$tmpdir/DEBIAN"
|
||||
mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
|
||||
mkdir -m 755 -p "$fwdir/DEBIAN"
|
||||
mkdir -p "$fwdir/lib/firmware/$version/" "$fwdir/usr/share/doc/$fwpackagename"
|
||||
mkdir -m 755 -p "$libc_headers_dir/DEBIAN"
|
||||
mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename"
|
||||
|
||||
mkdir -m 755 -p "$dtb_dir/DEBIAN"
|
||||
mkdir -p "$dtb_dir/boot/dtb" "$dtb_dir/usr/share/doc/$dtb_packagename"
|
||||
|
||||
mkdir -m 755 -p "$kernel_headers_dir/DEBIAN"
|
||||
mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename"
|
||||
mkdir -p "$kernel_headers_dir/lib/modules/$version/"
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin"
|
||||
fi
|
||||
if [ -n "$BUILD_DEBUG" ] ; then
|
||||
mkdir -p "$dbg_dir/usr/share/doc/$dbg_packagename"
|
||||
mkdir -m 755 -p "$dbg_dir/DEBIAN"
|
||||
fi
|
||||
|
||||
# Build and install the kernel
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
$MAKE linux
|
||||
cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
|
||||
cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config"
|
||||
gzip "$tmpdir/usr/share/doc/$packagename/config"
|
||||
else
|
||||
cp System.map "$tmpdir/boot/System.map-$version"
|
||||
cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version"
|
||||
fi
|
||||
# Not all arches include the boot path in KBUILD_IMAGE
|
||||
if [ -e $KBUILD_IMAGE ]; then
|
||||
cp $KBUILD_IMAGE "$tmpdir/$installed_image_path"
|
||||
else
|
||||
cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path"
|
||||
fi
|
||||
|
||||
if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
|
||||
INSTALL_MOD_PATH="$tmpdir" $MAKE KBUILD_SRC= modules_install
|
||||
rm -f "$tmpdir/lib/modules/$version/build"
|
||||
rm -f "$tmpdir/lib/modules/$version/source"
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/"
|
||||
rmdir "$tmpdir/lib/modules/$version"
|
||||
fi
|
||||
if [ -n "$BUILD_DEBUG" ] ; then
|
||||
for module in $(find $tmpdir/lib/modules/ -name *.ko -printf '%P\n'); do
|
||||
module=lib/modules/$module
|
||||
mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
|
||||
# only keep debug symbols in the debug file
|
||||
$OBJCOPY --only-keep-debug $tmpdir/$module $dbg_dir/usr/lib/debug/$module
|
||||
# strip original module from debug symbols
|
||||
$OBJCOPY --strip-debug $tmpdir/$module
|
||||
# then add a link to those
|
||||
$OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $tmpdir/$module
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then
|
||||
mkdir -p "$tmpdir/boot/dtb"
|
||||
cp $objtree/arch/arm/boot/dts/*.dtb $dtb_dir/boot/dtb
|
||||
#INSTALL_DTBS_PATH="$dtb_dir/boot/dtb" $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"
|
||||
fi
|
||||
|
||||
# Install the maintainer scripts
|
||||
# Note: hook scripts under /etc/kernel are also executed by official Debian
|
||||
# kernel packages, as well as kernel packages built using make-kpkg.
|
||||
# make-kpkg sets $INITRD to indicate whether an initramfs is wanted, and
|
||||
# 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
|
||||
else
|
||||
want_initrd=No
|
||||
fi
|
||||
for script in postinst postrm preinst prerm ; do
|
||||
mkdir -p "$tmpdir$debhookdir/$script.d"
|
||||
cat <<EOF > "$tmpdir/DEBIAN/$script"
|
||||
#!/bin/sh
|
||||
|
||||
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
|
||||
exit 0
|
||||
EOF
|
||||
chmod 755 "$tmpdir/DEBIAN/$script"
|
||||
done
|
||||
|
||||
##
|
||||
## Create sym link to kernel image
|
||||
##
|
||||
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
|
||||
rm -f /$installed_image_path /boot/zImage
|
||||
else
|
||||
ln -sf /$installed_image_path /boot/zImage > /dev/null 2>&1 || mv /$installed_image_path /boot/zImage
|
||||
fi
|
||||
rm -f /boot/.next
|
||||
exit 0
|
||||
EOT
|
||||
##
|
||||
## FAT install workaround
|
||||
##
|
||||
sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/preinst
|
||||
cat >> $tmpdir/DEBIAN/preinst <<EOT
|
||||
rm -f /boot/System.map* /boot/config* /$installed_image_path /boot/zImage
|
||||
EOT
|
||||
echo "exit 0" >> $tmpdir/DEBIAN/preinst
|
||||
|
||||
|
||||
# Try to determine maintainer and email values
|
||||
if [ -n "$DEBEMAIL" ]; then
|
||||
email=$DEBEMAIL
|
||||
elif [ -n "$EMAIL" ]; then
|
||||
email=$EMAIL
|
||||
else
|
||||
email=$(id -nu)@$(hostname -f)
|
||||
fi
|
||||
if [ -n "$DEBFULLNAME" ]; then
|
||||
name=$DEBFULLNAME
|
||||
elif [ -n "$NAME" ]; then
|
||||
name=$NAME
|
||||
else
|
||||
name="Anonymous"
|
||||
fi
|
||||
maintainer="$name <$email>"
|
||||
|
||||
# Generate a simple changelog template
|
||||
cat <<EOF > debian/changelog
|
||||
linux-upstream ($packageversion) unstable; urgency=low
|
||||
|
||||
* Custom built Linux kernel.
|
||||
|
||||
-- $maintainer $(date -R)
|
||||
EOF
|
||||
|
||||
# Generate copyright file
|
||||
cat <<EOF > debian/copyright
|
||||
This is a packacked upstream version of the Linux kernel.
|
||||
|
||||
The sources may be found at most Linux ftp sites, including:
|
||||
ftp://ftp.kernel.org/pub/linux/kernel
|
||||
|
||||
Copyright: 1991 - 2009 Linus Torvalds and others.
|
||||
|
||||
The git repository for mainline kernel development is at:
|
||||
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 dated June, 1991.
|
||||
|
||||
On Debian GNU/Linux systems, the complete text of the GNU General Public
|
||||
License version 2 can be found in \`/usr/share/common-licenses/GPL-2'.
|
||||
EOF
|
||||
|
||||
# Generate a control file
|
||||
cat <<EOF > debian/control
|
||||
Source: linux-upstream
|
||||
Section: kernel
|
||||
Priority: optional
|
||||
Maintainer: $maintainer
|
||||
Standards-Version: 3.8.4
|
||||
Homepage: http://www.kernel.org/
|
||||
EOF
|
||||
|
||||
if [ "$ARCH" = "um" ]; then
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $packagename
|
||||
Provides: linux-image, linux-image-2.6, linux-modules-$version
|
||||
Architecture: any
|
||||
Description: User Mode Linux kernel, version $version
|
||||
User-mode Linux is a port of the Linux kernel to its own system call
|
||||
interface. It provides a kind of virtual machine, which runs Linux
|
||||
as a user process under another Linux kernel. This is useful for
|
||||
kernel development, sandboxes, jails, experimentation, and
|
||||
many other things.
|
||||
.
|
||||
This package contains the Linux kernel, modules and corresponding other
|
||||
files, version: $version.
|
||||
EOF
|
||||
|
||||
else
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $packagename
|
||||
Provides: linux-image, linux-image-2.6, linux-modules-$version
|
||||
Suggests: $fwpackagename
|
||||
Architecture: any
|
||||
Description: Linux kernel, version $version
|
||||
This package contains the Linux kernel, modules and corresponding other
|
||||
files, version: $version.
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
# Build kernel header package
|
||||
(cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles"
|
||||
(cd $srctree; find arch/$SRCARCH/include include scripts -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
(cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles"
|
||||
(cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
(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"
|
||||
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $kernel_headers_packagename
|
||||
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}
|
||||
.
|
||||
This is useful for people who need to build external modules
|
||||
EOF
|
||||
|
||||
# Do we have firmware? Move it out of the way and build it into a package.
|
||||
if [ -e "$tmpdir/lib/firmware" ]; then
|
||||
mv "$tmpdir/lib/firmware"/* "$fwdir/lib/firmware/$version/"
|
||||
rmdir "$tmpdir/lib/firmware"
|
||||
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $fwpackagename
|
||||
Architecture: all
|
||||
Description: Linux kernel firmware, version $version
|
||||
This package contains firmware from the Linux kernel, version $version.
|
||||
EOF
|
||||
|
||||
create_package "$fwpackagename" "$fwdir"
|
||||
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
|
||||
Architecture: any
|
||||
Description: Linux support headers for userspace development
|
||||
This package provides userspaces headers from the Linux kernel. These headers
|
||||
are used by the installed headers for GNU glibc and other system libraries.
|
||||
EOF
|
||||
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
create_package "$kernel_headers_packagename" "$kernel_headers_dir"
|
||||
# create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
fi
|
||||
|
||||
create_package "$packagename" "$tmpdir"
|
||||
|
||||
if [ -n "$BUILD_DEBUG" ] ; then
|
||||
# Build debug package
|
||||
# Different tools want the image in different locations
|
||||
# perf
|
||||
mkdir -p $dbg_dir/usr/lib/debug/lib/modules/$version/
|
||||
cp vmlinux $dbg_dir/usr/lib/debug/lib/modules/$version/
|
||||
# systemtap
|
||||
mkdir -p $dbg_dir/usr/lib/debug/boot/
|
||||
ln -s ../lib/modules/$version/vmlinux $dbg_dir/usr/lib/debug/boot/vmlinux-$version
|
||||
# kdump-tools
|
||||
ln -s lib/modules/$version/vmlinux $dbg_dir/usr/lib/debug/vmlinux-$version
|
||||
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $dbg_packagename
|
||||
Section: debug
|
||||
Provides: linux-debug, linux-debug-$version
|
||||
Architecture: any
|
||||
Description: Linux kernel debugging symbols for $version
|
||||
This package will come in handy if you need to debug the kernel. It provides
|
||||
all the necessary debug symbols for the kernel and its modules.
|
||||
EOF
|
||||
|
||||
create_package "$dbg_packagename" "$dbg_dir"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@ -1,31 +0,0 @@
|
||||
--- a/arch/arm/kernel/asm-offsets.c
|
||||
+++ b/arch/arm/kernel/asm-offsets.c
|
||||
@@ -10,6 +10,7 @@
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
+#include <linux/compiler.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
@@ -39,10 +40,19 @@
|
||||
* GCC 3.2.x: miscompiles NEW_AUX_ENT in fs/binfmt_elf.c
|
||||
* (http://gcc.gnu.org/PR8896) and incorrect structure
|
||||
* initialisation in fs/jffs2/erase.c
|
||||
+ * GCC 4.8.0-4.8.2: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
|
||||
+ * miscompiles find_get_entry(), and can result in EXT3 and EXT4
|
||||
+ * filesystem corruption (possibly other FS too).
|
||||
*/
|
||||
+#ifdef __GNUC__
|
||||
#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
|
||||
#error Your compiler is too buggy; it is known to miscompile kernels.
|
||||
-#error Known good compilers: 3.3
|
||||
+#error Known good compilers: 3.3, 4.x
|
||||
+#endif
|
||||
+#if GCC_VERSION >= 40800 && GCC_VERSION < 40803
|
||||
+#error Your compiler is too buggy; it is known to miscompile kernels
|
||||
+#error and result in filesystem corruption and oopses.
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,21 +0,0 @@
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -619,17 +619,5 @@
|
||||
sun5i-a13-q8-tablet.dtb \
|
||||
sun5i-a13-utoo-p66.dtb \
|
||||
sun5i-r8-chip.dtb
|
||||
-dtb-$(CONFIG_MACH_SUN6I) += \
|
||||
- sun6i-a31-app4-evb1.dtb \
|
||||
- sun6i-a31-colombus.dtb \
|
||||
- sun6i-a31-hummingbird.dtb \
|
||||
- sun6i-a31-i7.dtb \
|
||||
- sun6i-a31-m9.dtb \
|
||||
- sun6i-a31-mele-a1000g-quad.dtb \
|
||||
- sun6i-a31s-cs908.dtb \
|
||||
- sun6i-a31s-primo81.dtb \
|
||||
- sun6i-a31s-sina31s.dtb \
|
||||
- sun6i-a31s-sinovoip-bpi-m2.dtb \
|
||||
- sun6i-a31s-yones-toptech-bs1078-v2.dtb
|
||||
dtb-$(CONFIG_MACH_SUN7I) += \
|
||||
sun7i-a20-bananapi.dtb \
|
||||
|
||||
@ -1,156 +0,0 @@
|
||||
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
||||
Link: http://lkml.kernel.org/r/1330436245-24875-2-git-send-email-matt@console-pimps.org
|
||||
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
---
|
||||
tools/include/tools/be_byteshift.h | 70 +++++++++++++++++++++++++++++++++++++
|
||||
tools/include/tools/le_byteshift.h | 70 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 140 insertions(+)
|
||||
|
||||
--- /dev/null
|
||||
+++ b/tools/include/tools/be_byteshift.h
|
||||
@@ -0,0 +1,70 @@
|
||||
+#ifndef _TOOLS_BE_BYTESHIFT_H
|
||||
+#define _TOOLS_BE_BYTESHIFT_H
|
||||
+
|
||||
+#include <linux/types.h>
|
||||
+
|
||||
+static inline __u16 __get_unaligned_be16(const __u8 *p)
|
||||
+{
|
||||
+ return p[0] << 8 | p[1];
|
||||
+}
|
||||
+
|
||||
+static inline __u32 __get_unaligned_be32(const __u8 *p)
|
||||
+{
|
||||
+ return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3];
|
||||
+}
|
||||
+
|
||||
+static inline __u64 __get_unaligned_be64(const __u8 *p)
|
||||
+{
|
||||
+ return (__u64)__get_unaligned_be32(p) << 32 |
|
||||
+ __get_unaligned_be32(p + 4);
|
||||
+}
|
||||
+
|
||||
+static inline void __put_unaligned_be16(__u16 val, __u8 *p)
|
||||
+{
|
||||
+ *p++ = val >> 8;
|
||||
+ *p++ = val;
|
||||
+}
|
||||
+
|
||||
+static inline void __put_unaligned_be32(__u32 val, __u8 *p)
|
||||
+{
|
||||
+ __put_unaligned_be16(val >> 16, p);
|
||||
+ __put_unaligned_be16(val, p + 2);
|
||||
+}
|
||||
+
|
||||
+static inline void __put_unaligned_be64(__u64 val, __u8 *p)
|
||||
+{
|
||||
+ __put_unaligned_be32(val >> 32, p);
|
||||
+ __put_unaligned_be32(val, p + 4);
|
||||
+}
|
||||
+
|
||||
+static inline __u16 get_unaligned_be16(const void *p)
|
||||
+{
|
||||
+ return __get_unaligned_be16((const __u8 *)p);
|
||||
+}
|
||||
+
|
||||
+static inline __u32 get_unaligned_be32(const void *p)
|
||||
+{
|
||||
+ return __get_unaligned_be32((const __u8 *)p);
|
||||
+}
|
||||
+
|
||||
+static inline __u64 get_unaligned_be64(const void *p)
|
||||
+{
|
||||
+ return __get_unaligned_be64((const __u8 *)p);
|
||||
+}
|
||||
+
|
||||
+static inline void put_unaligned_be16(__u16 val, void *p)
|
||||
+{
|
||||
+ __put_unaligned_be16(val, p);
|
||||
+}
|
||||
+
|
||||
+static inline void put_unaligned_be32(__u32 val, void *p)
|
||||
+{
|
||||
+ __put_unaligned_be32(val, p);
|
||||
+}
|
||||
+
|
||||
+static inline void put_unaligned_be64(__u64 val, void *p)
|
||||
+{
|
||||
+ __put_unaligned_be64(val, p);
|
||||
+}
|
||||
+
|
||||
+#endif /* _TOOLS_BE_BYTESHIFT_H */
|
||||
--- /dev/null
|
||||
+++ b/tools/include/tools/le_byteshift.h
|
||||
@@ -0,0 +1,70 @@
|
||||
+#ifndef _TOOLS_LE_BYTESHIFT_H
|
||||
+#define _TOOLS_LE_BYTESHIFT_H
|
||||
+
|
||||
+#include <linux/types.h>
|
||||
+
|
||||
+static inline __u16 __get_unaligned_le16(const __u8 *p)
|
||||
+{
|
||||
+ return p[0] | p[1] << 8;
|
||||
+}
|
||||
+
|
||||
+static inline __u32 __get_unaligned_le32(const __u8 *p)
|
||||
+{
|
||||
+ return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
|
||||
+}
|
||||
+
|
||||
+static inline __u64 __get_unaligned_le64(const __u8 *p)
|
||||
+{
|
||||
+ return (__u64)__get_unaligned_le32(p + 4) << 32 |
|
||||
+ __get_unaligned_le32(p);
|
||||
+}
|
||||
+
|
||||
+static inline void __put_unaligned_le16(__u16 val, __u8 *p)
|
||||
+{
|
||||
+ *p++ = val;
|
||||
+ *p++ = val >> 8;
|
||||
+}
|
||||
+
|
||||
+static inline void __put_unaligned_le32(__u32 val, __u8 *p)
|
||||
+{
|
||||
+ __put_unaligned_le16(val >> 16, p + 2);
|
||||
+ __put_unaligned_le16(val, p);
|
||||
+}
|
||||
+
|
||||
+static inline void __put_unaligned_le64(__u64 val, __u8 *p)
|
||||
+{
|
||||
+ __put_unaligned_le32(val >> 32, p + 4);
|
||||
+ __put_unaligned_le32(val, p);
|
||||
+}
|
||||
+
|
||||
+static inline __u16 get_unaligned_le16(const void *p)
|
||||
+{
|
||||
+ return __get_unaligned_le16((const __u8 *)p);
|
||||
+}
|
||||
+
|
||||
+static inline __u32 get_unaligned_le32(const void *p)
|
||||
+{
|
||||
+ return __get_unaligned_le32((const __u8 *)p);
|
||||
+}
|
||||
+
|
||||
+static inline __u64 get_unaligned_le64(const void *p)
|
||||
+{
|
||||
+ return __get_unaligned_le64((const __u8 *)p);
|
||||
+}
|
||||
+
|
||||
+static inline void put_unaligned_le16(__u16 val, void *p)
|
||||
+{
|
||||
+ __put_unaligned_le16(val, p);
|
||||
+}
|
||||
+
|
||||
+static inline void put_unaligned_le32(__u32 val, void *p)
|
||||
+{
|
||||
+ __put_unaligned_le32(val, p);
|
||||
+}
|
||||
+
|
||||
+static inline void put_unaligned_le64(__u64 val, void *p)
|
||||
+{
|
||||
+ __put_unaligned_le64(val, p);
|
||||
+}
|
||||
+
|
||||
+#endif /* _TOOLS_LE_BYTESHIFT_H */
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,104 +0,0 @@
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -82,11 +82,11 @@
|
||||
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
|
||||
-dtb_packagename=linux-dtb-$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
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then
|
||||
mkdir -p "$tmpdir/boot/dtb"
|
||||
- cp $objtree/arch/arm/boot/dts/*.dtb $dtb_dir/boot/dtb
|
||||
+ cp $objtree/arch/arm/boot/dts/*.dtb $dtb_dir/boot/dtb
|
||||
#INSTALL_DTBS_PATH="$dtb_dir/boot/dtb" $MAKE KBUILD_SRC= dtbs_install
|
||||
fi
|
||||
|
||||
@@ -218,7 +218,8 @@
|
||||
## Create sym link to kernel image
|
||||
##
|
||||
kernel_tmp_version="${installed_image_path////\\/}"
|
||||
-sed -e "s/exit 0/ln -sf \/$kernel_tmp_version \/boot\/zImage/g" -i $tmpdir/DEBIAN/postinst
|
||||
+sed -e "s/exit 0/ln -sf \/$kernel_tmp_version \/boot\/zImage || cp \/$kernel_tmp_version \/boot\/zImage/g" -i $tmpdir/DEBIAN/postinst
|
||||
+#echo "touch /boot/.next" >> $tmpdir/DEBIAN/postinst
|
||||
echo "exit 0" >> $tmpdir/DEBIAN/postinst
|
||||
|
||||
|
||||
@@ -239,9 +240,20 @@
|
||||
fi
|
||||
maintainer="$name <$email>"
|
||||
|
||||
+# Try to determine distribution
|
||||
+if [ -n "$KDEB_CHANGELOG_DIST" ]; then
|
||||
+ distribution=$KDEB_CHANGELOG_DIST
|
||||
+elif distribution=$(lsb_release -cs 2>/dev/null) && [ -n "$distribution" ]; then
|
||||
+ : # nothing to do in this case
|
||||
+else
|
||||
+ distribution="unstable"
|
||||
+ echo >&2 "Using default distribution of 'unstable' in the changelog"
|
||||
+ echo >&2 "Install lsb-release or set \$KDEB_CHANGELOG_DIST explicitly"
|
||||
+fi
|
||||
+
|
||||
# Generate a simple changelog template
|
||||
cat <<EOF > debian/changelog
|
||||
-linux-upstream ($packageversion) unstable; urgency=low
|
||||
+linux-upstream ($packageversion) $distribution; urgency=low
|
||||
|
||||
* Custom built Linux kernel.
|
||||
|
||||
@@ -255,10 +267,10 @@
|
||||
The sources may be found at most Linux ftp sites, including:
|
||||
ftp://ftp.kernel.org/pub/linux/kernel
|
||||
|
||||
-Copyright: 1991 - 2009 Linus Torvalds and others.
|
||||
+Copyright: 1991 - 2015 Linus Torvalds and others.
|
||||
|
||||
The git repository for mainline kernel development is at:
|
||||
-git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
|
||||
+git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -317,6 +329,12 @@
|
||||
(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
|
||||
@@ -326,7 +344,7 @@
|
||||
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}
|
||||
@@ -373,7 +391,7 @@
|
||||
|
||||
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"
|
||||
@ -1,21 +0,0 @@
|
||||
--- a/drivers/video/Makefile
|
||||
+++ b/drivers/video/Makefile
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
# Each configuration option enables a list of files.
|
||||
|
||||
+obj-y += fbtft/
|
||||
obj-$(CONFIG_VGASTATE) += vgastate.o
|
||||
obj-y += fb_notify.o
|
||||
obj-$(CONFIG_FB) += fb.o
|
||||
--- a/drivers/video/Kconfig
|
||||
+++ b/drivers/video/Kconfig
|
||||
@@ -17,6 +17,8 @@ config SH_LCD_MIPI_DSI
|
||||
|
||||
source "drivers/char/agp/Kconfig"
|
||||
|
||||
+source "drivers/video/fbtft/Kconfig"
|
||||
+
|
||||
source "drivers/gpu/vga/Kconfig"
|
||||
|
||||
source "drivers/gpu/drm/Kconfig"
|
||||
@ -1,38 +0,0 @@
|
||||
--- a/arch/arm/boot/dts/imx6qdl-udoo.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
|
||||
@@ -125,21 +125,21 @@
|
||||
// status = "disabled";
|
||||
// };
|
||||
|
||||
- v4l2_cap_0 {
|
||||
- compatible = "fsl,imx6q-v4l2-capture";
|
||||
- ipu_id = <0>;
|
||||
- csi_id = <0>;
|
||||
- mclk_source = <0>;
|
||||
- status = "okay";
|
||||
- };
|
||||
+// v4l2_cap_0 {
|
||||
+// compatible = "fsl,imx6q-v4l2-capture";
|
||||
+// ipu_id = <0>;
|
||||
+// csi_id = <0>;
|
||||
+// mclk_source = <0>;
|
||||
+// status = "okay";
|
||||
+// };
|
||||
|
||||
- v4l2_cap_1 {
|
||||
- compatible = "fsl,imx6q-v4l2-capture";
|
||||
- ipu_id = <0>;
|
||||
- csi_id = <1>;
|
||||
- mclk_source = <0>;
|
||||
- status = "okay";
|
||||
- };
|
||||
+// v4l2_cap_1 {
|
||||
+// compatible = "fsl,imx6q-v4l2-capture";
|
||||
+// ipu_id = <0>;
|
||||
+// csi_id = <1>;
|
||||
+// mclk_source = <0>;
|
||||
+// status = "okay";
|
||||
+// };
|
||||
|
||||
v4l2_out {
|
||||
compatible = "fsl,mxc_v4l2_output";
|
||||
Loading…
Reference in New Issue
Block a user