Informatik und Elektronik Hacklab Verein Schweiz

REGISTER LOGIN

How to Compile SUNXI-LINUX Kernel on Ubuntu Xenial Xerus

Download the Sources from the Git Repositories

git clone https://github.com/linux-sunxi/linux-sunxi.git

Patch the Kernel to compile with the GCC5 Compiler

cd linux-sunxi

wget https://raw.githubusercontent.com/siemens/u-boot/master/include/linux/compiler-gcc5.h include/linux/

diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index f89515a..2bb8cac 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -45,7 +45,7 @@ void *return_address(unsigned int);
 
 #else
 
-extern inline void *return_address(unsigned int level)
+static inline void *return_address(unsigned int level)
 {
        return NULL;
 }
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
index 8085417..97a9e5d 100644
--- a/arch/arm/kernel/return_address.c
+++ b/arch/arm/kernel/return_address.c
@@ -61,12 +61,12 @@ void *return_address(unsigned int level)
 #if defined(CONFIG_ARM_UNWIND)
 #warning "TODO: return_address should use unwind tables"
 #endif
-
+/*
 void *return_address(unsigned int level)
 {
        return NULL;
 }
-
+*/
 #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
 
 EXPORT_SYMBOL_GPL(return_address);
diff --git a/drivers/net/wireless/rtl8192cu/include/ieee80211.h b/drivers/net/wireless/rtl8192cu/include/ieee80211.h
index 86e9726..950691d 100644
--- a/drivers/net/wireless/rtl8192cu/include/ieee80211.h
+++ b/drivers/net/wireless/rtl8192cu/include/ieee80211.h
@@ -1149,12 +1149,12 @@ enum ieee80211_state {
 #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
 #define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
 
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static __inline int is_multicast_mac_addr(const u8 *addr)
 {
         return ((addr[0] != 0xff) && (0x01 & addr[0]));
 }
 
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static __inline int is_broadcast_mac_addr(const u8 *addr)
 {
        return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) &&   \
                (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
@@ -1177,7 +1177,7 @@ typedef struct tx_pending_t{
 #define IEEE_G            (1<<2)
 #define IEEE_MODE_MASK    (IEEE_A|IEEE_B|IEEE_G)
 
-extern __inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
+static __inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
 {
        /* Single white space is for Linksys APs */
        if (essid_len == 1 && essid[0] == ' ')
@@ -1193,7 +1193,7 @@ extern __inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
        return 1;
 }
 
-extern __inline int ieee80211_get_hdrlen(u16 fc)
+static __inline int ieee80211_get_hdrlen(u16 fc)
 {
        int hdrlen = 24;
 

Compile and Build the SUNXI-LINUX Kernel

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun7i_defconfig

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install

Copy the builded Files for Installment

cp -a arch/arm/boot/uImage ../

cp -R -a output/lib/modules/3.4.104-00136-gd47d367-dirty ../


Powered by LionWiki. Know How Recent changes Last changed: 2015/12/31 12:11 History