Created
July 10, 2015 09:00
-
-
Save x2c3z4/b47409ac9748690cc4ab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #sudo apt-get install kernel-package | |
| confirm () { | |
| # call with a prompt string or use a default | |
| read -r -p "${1:-Are you want to continue? [y/N]} " response | |
| case $response in | |
| [yY][eE][sS]|[yY]) | |
| true | |
| ;; | |
| *) | |
| false | |
| ;; | |
| esac | |
| } | |
| export ARCH=arm | |
| export DEB_HOST_ARCH=armel | |
| export CONCURRENCY_LEVEL=`grep -m1 cpu\ cores /proc/cpuinfo | cut -d : -f 2` | |
| day="`date +%Y%m%d`" | |
| compile_oldstyle() { | |
| ARCH=arm SUBARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make olddefconfig | |
| ARCH=arm SUBARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make | |
| } | |
| compile_deb() { | |
| base="fakeroot make-kpkg --arch arm --cross-compile arm-none-linux-gnueabi- --initrd --append-to-version -fengli --revision ${day}" | |
| `$base kernel_image kernel_headers` | |
| } | |
| start_menuconfig() { | |
| ARCH=arm SUBARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make menuconfig #olddefconfig | |
| } | |
| start_menuconfig | |
| confirm && compile_deb | |
| #make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- EXTRAVERSION=-custom1 uImage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment