⇤ ← Versione 1 del 2017-02-08 17:46:21
Dimensione: 1736
Commento:
|
Dimensione: 2059
Commento:
|
Le cancellazioni sono segnalate in questo modo. | Le aggiunte sono segnalate in questo modo. |
Linea 1: | Linea 1: |
My conf: Debian 8 (Jessie) with Backports. Target: OrangePi One, H3 (AllWinner) armhf, .deb only for a specific board |
'''My conf:''' Debian 8 (Jessie) with Backports, 4core, 4Gb RAM. '''Target:''' OrangePi One, H3 (AllWinner) armhf, .deb only for a specific board |
Linea 5: | Linea 7: |
{{{ | |
Linea 8: | Linea 11: |
apt-get install cross-gcc-dev gcc-arm-none-aebi binutils-arm-linux-gnueabihf | apt-get install cross-gcc-dev gcc-arm-none-aebi binutils-arm-linux-gnueabihf }}} |
Linea 11: | Linea 15: |
{{{ | |
Linea 12: | Linea 17: |
}}} | |
Linea 14: | Linea 19: |
{{{ | |
Linea 16: | Linea 22: |
}}} === Expand kernel sources === {{{ tar xavf linux-source-X.X.tar.xz }}} === Move to sources dir === {{{ cd linux-source-X.X }}} |
|
Linea 17: | Linea 32: |
=== Expand kernel sources === tar xavf linux-source-X.X.tar.xz === Move to sources dir === cd linux-source-X.X |
If you have patches to apply then copy them into linux-source-X.X folder and then for each patch do: {{{ patch -p1 < MYPATCH }}} |
Linea 26: | Linea 39: |
{{{ | |
Linea 27: | Linea 41: |
}}} | |
Linea 29: | Linea 44: |
{{{ | |
Linea 30: | Linea 46: |
Choose your modules |
}}} Choose your modules. |
Linea 36: | Linea 52: |
ARCH=arm CROSS_COMPILE=/usr/bin/arm-none-eabi- DEB_BUILD_OPTIONS=nocheck make deb-pkg LOCALVERSION=YOUR_TARGET_ARCH KDEB_PKGVERSION=$(make kernelversion) -j#num_of_cores Don't forget to set the target LOCAL_VERSION=-arch there, otherwise dpkg will not install the kernel. For my orangePi: ARCH=arm CROSS_COMPILE=/usr/bin/arm-none-eabi- DEB_BUILD_OPTIONS=nocheck make deb-pkg LOCALVERSION=-armmp-lpae KDEB_PKGVERSION=$(make kernelversion) -j4 Wait until build process completes; ready to use .debs are in the upper folder. |
{{{ ARCH=arm CROSS_COMPILE=/usr/bin/arm-none-eabi- DEB_BUILD_OPTIONS=nocheck make deb-pkg LOCALVERSION=-YOUR_TARGET_ARCH KDEB_PKGVERSION=$(make kernelversion) -j#num_of_cores }}} '''Don't forget to set the target LOCAL_VERSION=-YOUR_TARGET_ARCH''' (ie: -arm-antani-lpae ), otherwise dpkg '''will not install the kernel'''. This is what i did for my OrangePi One: {{{ ARCH=arm CROSS_COMPILE=/usr/bin/arm-none-eabi- DEB_BUILD_OPTIONS=nocheck make deb-pkg LOCALVERSION=-armmp-lpae KDEB_PKGVERSION=$(make kernelversion) -j4 }}} Wait until build process completes; ''ready to use .debs are in the upper folder''. |
My conf: Debian 8 (Jessie) with Backports, 4core, 4Gb RAM.
Target: OrangePi One, H3 (AllWinner) armhf, .deb only for a specific board
Install crossbuild packages for the target architecture.
dpkg --add-architecture armhf apt-get update apt-get install crossbuild-essential-armhf apt-get install cross-gcc-dev gcc-arm-none-aebi binutils-arm-linux-gnueabihf
Install kernel sources
apt-get install linux-source-X.X
Move to your woring dir & copy kernel sources.
cd ~ cp /usr/src/linux.source-X.X.tar.xz .
Expand kernel sources
tar xavf linux-source-X.X.tar.xz
Move to sources dir
cd linux-source-X.X
If you have patches to apply then copy them into linux-source-X.X folder and then for each patch do:
patch -p1 < MYPATCH
Into arch/arm/ there are all supported boards, choose your board (mine is OrangePi One and it's a sunxi board)
Prepare for configuration, start with a minimum configurations
ARCH=arm CROSS_COMPILE=/usr/bin/arm-none-eabi- make sunxi_defconfig
Now, we probably need more modules because that defconfig is a very minimal configuration
ARCH=arm CROSS_COMPILE=/usr/bin/arm-none-eabi- make menuconfig
Choose your modules.
* In General Setup -> Stack Protector buffer overflow detection set it to None (or build will fail).
Build!
ARCH=arm CROSS_COMPILE=/usr/bin/arm-none-eabi- DEB_BUILD_OPTIONS=nocheck make deb-pkg LOCALVERSION=-YOUR_TARGET_ARCH KDEB_PKGVERSION=$(make kernelversion) -j#num_of_cores
Don't forget to set the target LOCAL_VERSION=-YOUR_TARGET_ARCH (ie: -arm-antani-lpae ), otherwise dpkg will not install the kernel. This is what i did for my OrangePi One:
ARCH=arm CROSS_COMPILE=/usr/bin/arm-none-eabi- DEB_BUILD_OPTIONS=nocheck make deb-pkg LOCALVERSION=-armmp-lpae KDEB_PKGVERSION=$(make kernelversion) -j4
Wait until build process completes; ready to use .debs are in the upper folder.