source: trunk/debian/buildenv/emdebian.mk @ 919

Last change on this file since 919 was 902, checked in by amain, 2 years ago

native: erlite native kernel compile support

File size: 4.1 KB
Line 
1# DebWrt - Debian on Embedded devices
2#
3# Copyright (C) 2010-2015 Johan van Zoomeren <amain@debwrt.net>
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18#
19# -- Emdebian sources.list entries
20#
21# deb http://www.emdebian.org/debian/ unstable main
22# deb http://www.emdebian.org/debian/ testing main
23# deb http://www.emdebian.org/debian/ lenny main
24#
25# Once you have that then install whichever version of the tools you want. e.g:
26# apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi gcc-4.3-arm-linux-gnueabi g++-4.3-arm-linux-gnueabi
27# will install the gcc-4.3 C and C++ toolchain for armel cross-compiling.
28#
29# Use emdebian stable/lenny cross compiler. Unstable seems to be broken now for a long time
30#
31# Emdebian suggests to use squeeze, even if on wheezey or higher:
32# Currently, toolchains for Squeeze are preferred. If using Wheezy or unstable, add
33# a Squeeze source for your own architecture using your normal Debian mirror for
34# dependencies which are no longer in wheezy or unstable.
35#
36#EMDEBIAN_RELEASE:=$(DEBIAN_BUILD_VERSION)
37EMDEBIAN_RELEASE:=squeeze
38
39# Automatic installing of build dependencies
40#
41# <= Lenny = apt-cross
42# >  Lenny = xapt
43#
44# Squeeze needs some backorts to get xapt working, so from now on
45# DebWrt will only support wheezy and up.
46#
47# Link: https://wiki.debian.org/EmdebianToolchain
48
49# note: to speed up setting up: do not install devscripts
50# note: a mailservers seems to be installed and started: bad - needs removal
51
52debian/buildenv/emdebian-prepare: debian/buildenv/prepare
53        @echo "I: Adding squeeze source incase Emdebiand squeeze is missing packages in wheezy or higher..."
54        sudo bash -c "echo \"deb $(call qstrip,$(CONFIG_EMDEBIAN_BUILDENV_REPOSITORY)) $(EMDEBIAN_RELEASE) main\" >> $(DEBIAN_BUILD_DIR)/etc/apt/sources.list"
55        sudo bash -c "echo \"deb $(call qstrip,$(CONFIG_DEBIAN_BUILDENV_REPOSITORY)) squeeze main\" >> $(DEBIAN_BUILD_DIR)/etc/apt/sources.list"
56        sudo bash -c "echo \"deb-src $(call qstrip,$(CONFIG_DEBIAN_BUILDENV_REPOSITORY)) squeeze main\" >> $(DEBIAN_BUILD_DIR)/etc/apt/sources.list"
57        # Add lenny repo, just for apt-cross
58        #sudo bash -c "echo \"deb  http://archive.debian.org/debian lenny main\" >> $(DEBIAN_BUILD_DIR)/etc/apt/sources.list"
59        #sudo bash -c "echo -e \"Package: *\nPin: release a=lenny\nPin-Priority: 200\" > $(DEBIAN_BUILD_DIR)/etc/apt/preferences"
60        sudo chroot $(DEBIAN_BUILD_DIR) apt-get update
61        #sudo chroot $(DEBIAN_BUILD_DIR) apt-get -y install apt-cross
62        #sudo chroot $(DEBIAN_BUILD_DIR) apt-get -y install libmpfr1ldbl
63        sudo chroot $(DEBIAN_BUILD_DIR) apt-get -y install emdebian-archive-keyring #xapt dpkg-cross
64        sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install build-essential dh-make debootstrap fakeroot zlib1g-dev openssh-client vim pkg-config dpatch libncurses5-dev devscripts subversion automake gcc-multilib g++-multilib quilt devscripts"
65ifeq ($(TARGET_ARCH),arm)
66        sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi gcc-4.3-arm-linux-gnu g++-4.4-arm-linux-gnueabi linux-kernel-headers-armel-cross dh-autoreconf"
67else
68        sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install libc6-$(TARGET_ARCH)-cross libc6-dev-$(TARGET_ARCH)-cross binutils-$(TARGET_ARCH)-linux-gnu gcc-4.3-$(TARGET_ARCH)-linux-gnu g++-4.3-$(TARGET_ARCH)-linux-gnu linux-kernel-headers-$(TARGET_ARCH)-cross"
69endif
70        touch $@
71
72debian/buildenv/emdebian-clean:
73        :
74
75.PHONY: debian/buildenv/emdebian-clean
76
Note: See TracBrowser for help on using the repository browser.