| 1 |
# |
|---|
| 2 |
# This makefile is intended to get you started in the setup of |
|---|
| 3 |
# OpenEmbedded to build the OpenZipit distro. To use this, |
|---|
| 4 |
# create a subdir in your user $HOME dir and put this makefile |
|---|
| 5 |
# in there. Go into that new dir and type "make". |
|---|
| 6 |
# |
|---|
| 7 |
# This will then pull in all the OE sources and Zipit sources |
|---|
| 8 |
# from the internet. I do hope you have a fast internet |
|---|
| 9 |
# connection! OpenEmbedded is not "tiny" by any means, the initial |
|---|
| 10 |
# "pull" of this makefile is about 270Meg. The final "pull" from |
|---|
| 11 |
# the web of the associated source files is about 166Meg. |
|---|
| 12 |
# |
|---|
| 13 |
# Pay attention to the final message from this makefile. It will |
|---|
| 14 |
# be telling you about adding to the PATH variable of your |
|---|
| 15 |
# .bash_profile and a new BBPATH variable that will be needed. |
|---|
| 16 |
# |
|---|
| 17 |
# tom@openhardware.net |
|---|
| 18 |
# |
|---|
| 19 |
ifeq "$(BBPATH)" "" |
|---|
| 20 |
NEEDPATH=setpaths |
|---|
| 21 |
endif |
|---|
| 22 |
|
|---|
| 23 |
MTNVER = "0.38" |
|---|
| 24 |
BBVER = "1.8" |
|---|
| 25 |
|
|---|
| 26 |
TARGET_DIR=$(shell pwd) |
|---|
| 27 |
export PATH:=$(PATH):$(TARGET_DIR)/bitbake/bin/ |
|---|
| 28 |
export BBPATH:=$(TARGET_DIR)/build/:$(TARGET_DIR)/org.openembedded.dev |
|---|
| 29 |
|
|---|
| 30 |
################################################################## |
|---|
| 31 |
|
|---|
| 32 |
all: bitbake monotone oedatabase oelocal paths |
|---|
| 33 |
@echo |
|---|
| 34 |
@echo "OpenZipit has been installed. Edit your .bash_profile to" |
|---|
| 35 |
@echo "add the BBPATH statement and add to your PATH. Then, " |
|---|
| 36 |
@echo "type 'bitbake bootstrap-image' to build a basic command line" |
|---|
| 37 |
@echo "system to boot the zipit Z2 into Linux." |
|---|
| 38 |
@echo |
|---|
| 39 |
|
|---|
| 40 |
# test for a local copy of bitbake. |
|---|
| 41 |
bitbake: bitbake/bin/bitbake |
|---|
| 42 |
|
|---|
| 43 |
bitbake/bin/bitbake: |
|---|
| 44 |
@echo " *** installing a copy of bitbake v${BBVER}" |
|---|
| 45 |
@svn --quiet co http://svn.berlios.de/svnroot/repos/bitbake/branches/bitbake-${BBVER}/ bitbake |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
# test for a local copy of monotone (mtn). |
|---|
| 50 |
monotone: bitbake/bin/mtn-${MTNVER}-linux-x86 |
|---|
| 51 |
|
|---|
| 52 |
bitbake/bin/mtn-${MTNVER}-linux-x86: |
|---|
| 53 |
@echo " *** installing a copy of monotone v${MTNVER}" |
|---|
| 54 |
@(cd bitbake/bin ; \ |
|---|
| 55 |
wget --quiet http://www.venge.net/monotone/downloads/${MTNVER}/mtn-${MTNVER}-linux-x86.bz2 ; \ |
|---|
| 56 |
bunzip2 mtn-${MTNVER}-linux-x86.bz2 ; \ |
|---|
| 57 |
chmod u+x mtn-${MTNVER}-linux-x86 ; \ |
|---|
| 58 |
ln -s mtn-${MTNVER}-linux-x86 mtn ; ) |
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
# test for a local copy of the OE database. |
|---|
| 63 |
oedatabase: OE.mtn |
|---|
| 64 |
|
|---|
| 65 |
OE.mtn: |
|---|
| 66 |
@echo " *** installing a copy of the OE database" |
|---|
| 67 |
@wget http://www.openembedded.org/snapshots/OE.mtn.bz2 |
|---|
| 68 |
@bunzip2 <OE.mtn.bz2 >OE.mtn |
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
# do we yet have a local working copy of OE? |
|---|
| 73 |
oelocal: org.openembedded.dev |
|---|
| 74 |
|
|---|
| 75 |
org.openembedded.dev: |
|---|
| 76 |
@mtn --db=OE.mtn checkout --branch=org.openembedded.dev |
|---|
| 77 |
@mtn --db=OE.mtn pull monotone.openembedded.org org.openembedded.dev |
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
# tell user of path statements needed (if missing). |
|---|
| 81 |
paths: $(NEEDPATH) |
|---|
| 82 |
|
|---|
| 83 |
setpaths: |
|---|
| 84 |
@echo |
|---|
| 85 |
@echo " !!! You must add these statements to your .bash_profile !!!" |
|---|
| 86 |
@echo |
|---|
| 87 |
@echo "export PATH=\$$PATH:${TARGET_DIR}/bitbake/bin/" |
|---|
| 88 |
@echo "export BBPATH=${TARGET_DIR}/build/:${TARGET_DIR}/org.openembedded.dev" |
|---|
| 89 |
@echo "if you want to use local-zipit2.conf you need to add also this:" |
|---|
| 90 |
@echo "export BBUSERROOT=${TARGET_DIR}" |
|---|
| 91 |
@echo |
|---|
| 92 |
|
|---|
| 93 |
allclean: |
|---|
| 94 |
@rm -rf bitbake |
|---|
| 95 |
|
|---|