From 88396211d94c7808a7541f984acbd1e80a497a06 Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Sat, 20 Dec 2014 00:16:12 +0900 Subject: [PATCH 01/14] mk_hwpack.sh:Add header generate function --- scripts/mk_hwpack.sh | 129 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) diff --git a/scripts/mk_hwpack.sh b/scripts/mk_hwpack.sh index 56e6efd..c3f3bec 100755 --- a/scripts/mk_hwpack.sh +++ b/scripts/mk_hwpack.sh @@ -11,6 +11,7 @@ set -e . ./chosen_board.mk +K_PATH="linux-sunxi" U_O_PATH="build/$UBOOT_CONFIG-u-boot" K_O_PATH="build/$KERNEL_CONFIG-linux" HWPACK_DIR="build/${BOARD}_hwpack" @@ -39,6 +40,132 @@ cp_debian_files() { #chmod 755 ${OUTPUT_DIR}/${BOARD}_hwpack/rootfs/usr/bin/a1x-initramfs.sh } +cp_header_files() { + local headers="$1" + + echo "Debian/Ubuntu hwpack (headers)" + + rm -rf $headers + mkdir -p $headers + + install -D -m644 $K_PATH/Makefile "$headers/Makefile" + install -D -m644 $K_PATH/kernel/Makefile "$headers/kernel/Makefile" + install -D -m644 $K_O_PATH/.config "$headers/.config" + + mkdir -p $headers/include + for i in acpi asm-generic crypto drm linux math-emu media net pcmcia scsi sound trace video xen; do + cp -a $K_PATH/include/${i} "$headers/include/" + done + for i in config generated; do + cp -a $K_O_PATH/include/${i} "$headers/include/" + done + + # copy arch includes for external modules + mkdir -p $headers/arch/arm + #cp -a $K_O_PATH/arch/arm/include $headers/arch/arm/ + cp -a $K_PATH/arch/arm/include $headers/arch/arm/ + mkdir -p $headers/arch/arm/mach-sun7i + cp -a $K_PATH/arch/arm/mach-sun7i/include $headers/arch/arm/mach-sun7i/ + mkdir -p $headers/arch/arm/plat-sunxi + cp -a $K_PATH/arch/arm/plat-sunxi/include $headers/arch/arm/plat-sunxi/ + + # copy files necessary for later builds, like nvidia and vmware + cp $K_O_PATH/Module.symvers "$headers/" + #cp -a $K_O_PATH/scripts "$headers/" + cp -a $K_PATH/scripts "$headers/" + + # fix permissions on scripts dir + chmod og-w -R "$headers/scripts" + mkdir -p "$headers/.tmp_versions" + mkdir -p "$headers/arch/arm/kernel" + cp $K_PATH/arch/arm/Makefile "$headers/arch/arm/" + cp $K_O_PATH/arch/arm/kernel/asm-offsets.s "$headers/arch/arm/kernel/" + + # add headers for lirc package + mkdir -p "$headers/drivers/media/video" + #cp $K_O_PATH/drivers/media/video/*.h "$headers/drivers/media/video/" + cp $K_PATH/drivers/media/video/*.h "$headers/drivers/media/video/" + + for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102; do + mkdir -p "$headers/drivers/media/video/${i}" + #cp -a $K_O_PATH/drivers/media/video/${i}/*.h "$headers/drivers/media/video/${i}" + cp -a $K_PATH/drivers/media/video/${i}/*.h "$headers/drivers/media/video/${i}" + done + + # add docbook makefile + install -D -m644 $K_PATH/Documentation/DocBook/Makefile "$headers/Documentation/DocBook/Makefile" + + # add dm headers + mkdir -p "$headers/drivers/md" + cp $K_PATH/drivers/md/*.h "$headers/drivers/md" + + # add inotify.h + mkdir -p "$headers/include/linux" + cp $K_PATH/include/linux/inotify.h "$headers/include/linux/" + + # add wireless headers + mkdir -p "$headers/net/mac80211/" + cp $K_PATH/net/mac80211/*.h "$headers/net/mac80211/" + + # add dvb headers for external modules + # in reference to: + # http://bugs.archlinux.org/task/9912 + mkdir -p "$headers/drivers/media/dvb/dvb-core" + cp $K_PATH/drivers/media/dvb/dvb-core/*.h "$headers/drivers/media/dvb/dvb-core/" + # and... + # http://bugs.archlinux.org/task/11194 + mkdir -p "$headers/include/config/dvb/" + cp $K_O_PATH/include/config/dvb/*.h "$headers/include/config/dvb/" + + # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new + # in reference to: + # http://bugs.archlinux.org/task/13146 + mkdir -p "$headers/drivers/media/dvb/frontends/" + cp $K_PATH/drivers/media/dvb/frontends/lgdt330x.h "$headers/drivers/media/dvb/frontends/" + cp $K_PATH/drivers/media/video/msp3400-driver.h "$headers/drivers/media/dvb/frontends/" + + # add dvb headers + # in reference to: + # http://bugs.archlinux.org/task/20402 + mkdir -p "$headers/drivers/media/dvb/dvb-usb" + cp $K_PATH/drivers/media/dvb/dvb-usb/*.h "$headers/drivers/media/dvb/dvb-usb/" + mkdir -p "$headers/drivers/media/dvb/frontends" + cp $K_PATH/drivers/media/dvb/frontends/*.h "$headers/drivers/media/dvb/frontends/" + mkdir -p "$headers/drivers/media/common/tuners" + cp $K_PATH/drivers/media/common/tuners/*.h "$headers/drivers/media/common/tuners/" + + # add xfs and shmem for aufs building + mkdir -p "$headers/fs/xfs" + mkdir -p "$headers/mm" + cp $K_PATH/fs/xfs/xfs_sb.h "$headers/fs/xfs/xfs_sb.h" + + # copy in Kconfig files + local prevdir=`pwd` + cd $K_PATH + for i in `find . -name "Kconfig*"`; do + mkdir -p "$prevdir/$headers/`echo ${i} | sed 's|/Kconfig.*||'`" + cp ${i} "$prevdir/$headers/${i}" + done + cd $prevdir + + find "$headers" -type d -exec chmod 755 {} \; + + # strip scripts directory + find "$headers/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do + case "$(file -bi "${binary}")" in + *application/x-sharedlib*) # Libraries (.so) + /usr/bin/strip --strip-unneeded "${binary}";; + *application/x-archive*) # Libraries (.a) + /usr/bin/strip --strip-debug "${binary}";; + *application/x-executable*) # Binaries + /usr/bin/strip --strip-all "${binary}";; + esac + done + + # remove unneeded architectures + rm -rf "$headers"/arch/{alpha,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,x86,xtensa} +} + cp_android_files() { local rootfs="$1" f= @@ -64,6 +191,7 @@ cp_android_files() { create_hwpack() { local hwpack="$1" local rootfs="$HWPACK_DIR/rootfs" + local headers="$HWPACK_DIR/headers" local kerneldir="$HWPACK_DIR/kernel" local bootloader="$HWPACK_DIR/bootloader" local f= @@ -74,6 +202,7 @@ create_hwpack() { if [ -z "$ANDROID" ]; then cp_debian_files "$rootfs" + cp_header_files "$headers" else cp_android_files "$rootfs" fi From ade64d485f0711a37b2492e8806ebb45814cce3d Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Sat, 20 Dec 2014 01:47:53 +0900 Subject: [PATCH 02/14] Update submodules to the latest commits. --- linux-sunxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-sunxi b/linux-sunxi index 090b169..4ace486 160000 --- a/linux-sunxi +++ b/linux-sunxi @@ -1 +1 @@ -Subproject commit 090b16927f028ce73a2cde2c05df4a78d7294c1a +Subproject commit 4ace486882c1437711aa3a3f4f1c270790030984 From ef37a08b139f6b607203e43777889537d18d03a9 Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Sat, 20 Dec 2014 04:26:08 +0900 Subject: [PATCH 03/14] Update submodules to the latest commits. --- linux-sunxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-sunxi b/linux-sunxi index 4ace486..c70968d 160000 --- a/linux-sunxi +++ b/linux-sunxi @@ -1 +1 @@ -Subproject commit 4ace486882c1437711aa3a3f4f1c270790030984 +Subproject commit c70968d00c254b80514c49c08a22a20d62241303 From 230a48b99301f19eacefb6fbf2a3e4feb91e36db Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Sat, 20 Dec 2014 22:44:37 +0900 Subject: [PATCH 04/14] Update submodules to the latest commits. --- linux-sunxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-sunxi b/linux-sunxi index c70968d..1051327 160000 --- a/linux-sunxi +++ b/linux-sunxi @@ -1 +1 @@ -Subproject commit c70968d00c254b80514c49c08a22a20d62241303 +Subproject commit 10513272fdce5c65c3229c10aab1906fc652dacf From b4eda5c412375917635fe133ab2e9d990fa7017f Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Tue, 23 Dec 2014 15:17:16 +0900 Subject: [PATCH 05/14] Update submodules to the latest commits. --- linux-sunxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-sunxi b/linux-sunxi index 1051327..3362154 160000 --- a/linux-sunxi +++ b/linux-sunxi @@ -1 +1 @@ -Subproject commit 10513272fdce5c65c3229c10aab1906fc652dacf +Subproject commit 336215488558c2a6840102894059a72faedf1bd3 From 5b6248863dc8b896d37e1df3a80cf9da16377745 Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Tue, 23 Dec 2014 17:02:29 +0900 Subject: [PATCH 06/14] Update submodules to the latest commits. --- sunxi-boards | 2 +- u-boot-sunxi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sunxi-boards b/sunxi-boards index 0881c3c..8d40e61 160000 --- a/sunxi-boards +++ b/sunxi-boards @@ -1 +1 @@ -Subproject commit 0881c3cee7001685cb3880abc21ee18196d5cd79 +Subproject commit 8d40e61f24eb104137e75c289847e9c9b785d4dd diff --git a/u-boot-sunxi b/u-boot-sunxi index bb5691c..54b562d 160000 --- a/u-boot-sunxi +++ b/u-boot-sunxi @@ -1 +1 @@ -Subproject commit bb5691c9ce9880949c8d7871c4a37548e95d773e +Subproject commit 54b562d48ee73c6d04b00e5d8b52991568e87b33 From f78b8d32d5a9441872b127a09fea88b7655a3dda Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Tue, 23 Dec 2014 17:14:44 +0900 Subject: [PATCH 07/14] Add compile script --- compile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 compile diff --git a/compile b/compile new file mode 100755 index 0000000..64f70f1 --- /dev/null +++ b/compile @@ -0,0 +1,12 @@ +#!/bin/sh + +CROSS_COMPILE=arm-linux-gnueabihf- +CC=arm-linux-gnueabihf-gcc +ccache -V &> /dev/null +if [ $? -eq 0 ]; then + CC="ccache ${CC}" +fi + +make clean +./configure BananaPi +make CROSS_COMPILE="${CROSS_COMPILE}" CC="${CC}" From cf6027f80469f5eb6177af6dd8bfe4304d1d50f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B2=B8?= Date: Mon, 29 Dec 2014 15:54:33 +0900 Subject: [PATCH 08/14] Support OS X 10.10 Yosemite --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a50d3f5..19b5635 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,13 @@ BUILD_PATH=$(CURDIR)/build ROOTFS?=norootfs ROOTFS_BASENAME=$(basename $(basename $(ROOTFS))) Q= -J=$(shell expr `grep ^processor /proc/cpuinfo | wc -l` \* 2) +J=1 +OS := $(shell uname -s) +ifeq ($(OS), Darwin) + J=$(shell sysctl -a | grep machdep.cpu.thread_count: | sed 's/machdep.cpu.thread_count: //g') +else + J=$(shell expr `grep ^processor /proc/cpuinfo | wc -l` \* 2) +endif include chosen_board.mk From 5473f0f8bd73be7cc03be958a07f2efe150ebbea Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Tue, 6 Jan 2015 00:53:26 +0900 Subject: [PATCH 09/14] Update submodules to the latest commits. --- compile | 13 ++++++++----- linux-sunxi | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/compile b/compile index 64f70f1..92aad16 100755 --- a/compile +++ b/compile @@ -1,12 +1,15 @@ #!/bin/sh -CROSS_COMPILE=arm-linux-gnueabihf- -CC=arm-linux-gnueabihf-gcc +PATH=`pwd`/../arm-bpi-linux-gnueabihf/bin:$PATH +CROSS_COMPILE=arm-bpi-linux-gnueabihf- +CC=${CROSS_COMPILE}gcc ccache -V &> /dev/null if [ $? -eq 0 ]; then CC="ccache ${CC}" fi -make clean -./configure BananaPi -make CROSS_COMPILE="${CROSS_COMPILE}" CC="${CC}" +if [ ! -e chosen_board.mk ]; then + make clean + ./configure BananaPi +fi +make CROSS_COMPILE="${CROSS_COMPILE}" CC="${CC}" linux-config diff --git a/linux-sunxi b/linux-sunxi index 3362154..5e664cf 160000 --- a/linux-sunxi +++ b/linux-sunxi @@ -1 +1 @@ -Subproject commit 336215488558c2a6840102894059a72faedf1bd3 +Subproject commit 5e664cf896fec45bed5ec6de7ecf2c0522fde73a From d908fd38a966b944d0015da44466bec47a6fab43 Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Wed, 7 Jan 2015 23:53:05 +0900 Subject: [PATCH 10/14] Update submodules to the latest commits. Modify compile --- compile | 4 +++- linux-sunxi | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/compile b/compile index 92aad16..53ba60e 100755 --- a/compile +++ b/compile @@ -3,13 +3,15 @@ PATH=`pwd`/../arm-bpi-linux-gnueabihf/bin:$PATH CROSS_COMPILE=arm-bpi-linux-gnueabihf- CC=${CROSS_COMPILE}gcc +CXX=${CROSS_COMPILE}g++ ccache -V &> /dev/null if [ $? -eq 0 ]; then CC="ccache ${CC}" + CXX="ccache ${CXX}" fi if [ ! -e chosen_board.mk ]; then make clean ./configure BananaPi fi -make CROSS_COMPILE="${CROSS_COMPILE}" CC="${CC}" linux-config +make CROSS_COMPILE="${CROSS_COMPILE}" CC="${CC}" CXX="${CXX}" $* diff --git a/linux-sunxi b/linux-sunxi index 5e664cf..9ef267e 160000 --- a/linux-sunxi +++ b/linux-sunxi @@ -1 +1 @@ -Subproject commit 5e664cf896fec45bed5ec6de7ecf2c0522fde73a +Subproject commit 9ef267e062e977724965cac889df1cfa72e3c89f From c9706d0b39253e4a1be29f60a104b86eb6594670 Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Wed, 7 Jan 2015 23:58:34 +0900 Subject: [PATCH 11/14] Update submodules to the latest commits. --- linux-sunxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-sunxi b/linux-sunxi index 9ef267e..54c0490 160000 --- a/linux-sunxi +++ b/linux-sunxi @@ -1 +1 @@ -Subproject commit 9ef267e062e977724965cac889df1cfa72e3c89f +Subproject commit 54c04905f5e1df627c7b433b1eb36268617533d0 From 54436b4626795f8c288689ae204854048a499449 Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Thu, 8 Jan 2015 00:02:42 +0900 Subject: [PATCH 12/14] Update submodules to the latest commits. --- linux-sunxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-sunxi b/linux-sunxi index 54c0490..0ef6a39 160000 --- a/linux-sunxi +++ b/linux-sunxi @@ -1 +1 @@ -Subproject commit 54c04905f5e1df627c7b433b1eb36268617533d0 +Subproject commit 0ef6a397a634ac6203e78e4bf64e47c43ac31d38 From 3b612fedcb4862910b66f7788b8f85971ab9a482 Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Sat, 10 Jan 2015 00:42:14 +0900 Subject: [PATCH 13/14] Update submodules to the latest commits. --- linux-sunxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-sunxi b/linux-sunxi index 0ef6a39..357e4c3 160000 --- a/linux-sunxi +++ b/linux-sunxi @@ -1 +1 @@ -Subproject commit 0ef6a397a634ac6203e78e4bf64e47c43ac31d38 +Subproject commit 357e4c3f4708092ab1667a8220f8ac921c85ab65 From ab086f54e38354a0a3e3407a78fc6d221eff8cd8 Mon Sep 17 00:00:00 2001 From: forumi0721 Date: Sun, 18 Jan 2015 21:58:45 +0900 Subject: [PATCH 14/14] Update submodules to the latest commits. --- .gitmodules | 6 +++--- linux-sunxi | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 81204bd..207a4a8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,12 +7,12 @@ [submodule "sunxi-boards"] path = sunxi-boards url = ../sunxi-boards.git -[submodule "linux-sunxi"] - path = linux-sunxi - url = ../linux-sunxi.git [submodule "allwinner-tools"] path = allwinner-tools url = ../allwinner-tools.git [submodule "cedarx-libs"] path = cedarx-libs url = ../cedarx-libs.git +[submodule "linux-sunxi"] + path = linux-sunxi + url = git@github.com:forumi0721/linux-sunxi.git diff --git a/linux-sunxi b/linux-sunxi index 357e4c3..d65bdb5 160000 --- a/linux-sunxi +++ b/linux-sunxi @@ -1 +1 @@ -Subproject commit 357e4c3f4708092ab1667a8220f8ac921c85ab65 +Subproject commit d65bdb59ad8b30698d515493b143f4af8e56eff3