github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

mc2avr / tcl-avr

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Switch Branches (1)
    • master ✓
  • Switch Tags (0)
  • Branch List
Sending Request…

build scripts for tinycorelinux — Read more

  Cancel

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

add dep file 
mc2avr (author)
Tue Jul 20 16:38:49 -0700 2010
commit  f15f1f5decf40c5d56ec
tree    ce7d9be904fc82a7ae91
parent  c4d51ec048d438d7acd9
tcl-avr / i2c-tools / make_i2c-tools.sh i2c-tools/make_i2c-tools.sh
Txt 100644 47 lines (45 sloc) 1.299 kb
  • edit
  • raw
  • blame
  • history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash

oldpwd=`pwd`
target=i2c-tools
# download archive
url_base="http://dl.lm-sensors.org/i2c-tools/releases"
url_file=`wget $url_base 2>/dev/null -O - \
| tr '><' '\n\n' | grep ^i2c.*\.tar\.bz2$ | tail -n1`
wget -c $url_base/$url_file
# extract archive
i2c_tools=`echo $url_file|sed -e 's|\.tar\.bz2||'`
tar -xvjf $url_file
cd $i2c_tools
# patch makefile to accept CFLAGS
cp Makefile Makefile-tc
cat Makefile-tc | sed -e 's|CFLAGS[\t]:=|CFLAGS[\t]+=|' > Makefile
rm Makefile-tc
# make
export CFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe"
# -fno-exceptions -fno-rtti
export LDFLAGS="-Wl,-O1"
make
# install
rm -rf /tmp/package
make DESTDIR=/tmp/package install
# strip
cd /tmp/package
find . | xargs file | grep "executable" | grep ELF | grep "not stripped" \
| cut -f 1 -d : | xargs strip --strip-unneeded 2>/dev/null
find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" \
| cut -f 1 -d : | xargs strip -g 2>/dev/null
# make tcz
cd /tmp
mksquashfs package $target.tcz
md5sum $target.tcz > $target.tcz.md5.txt
cd package
find usr -not -type d > ../$target.tcz.list
# mv to oldpwd
cd /tmp
mv $target.tcz $oldpwd
mv $target.tcz.md5.txt $oldpwd
mv $target.tcz.list $oldpwd
# clean
cd $oldpwd
rm -rf $i2c_tools

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server
  • English
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Српски
  • Svenska
  • 中文