Cross compile and README update

This commit is contained in:
David Högborg
2015-07-17 22:23:30 +02:00
parent bfcc7c72ac
commit 933483aa0f
3 changed files with 52 additions and 4 deletions

1
.gitignore vendored
View File

@@ -24,4 +24,5 @@ _testmain.go
*.prof *.prof
/gopow /gopow
/build
resources.go resources.go

View File

@@ -4,7 +4,7 @@
VERSION = $(shell git describe --always --dirty) VERSION = $(shell git describe --always --dirty)
TIMESTAMP = $(shell git show -s --format=%ct) TIMESTAMP = $(shell git show -s --format=%ct)
default: build default: build_darwin
setup: setup:
go get -u github.com/jteeuwen/go-bindata/... go get -u github.com/jteeuwen/go-bindata/...
@@ -12,13 +12,34 @@ setup:
resources: resources:
go-bindata -pkg resources -o internal/resources/resources.go resources/... go-bindata -pkg resources -o internal/resources/resources.go resources/...
build: resources build_darwin: resources
go build -o ./gopow *.go GOOS=darwin GOARCH=amd64 go build -a -o ./build/gopow *.go
zip ./build/gopow_darwin64.zip ./build/gopow
build_linux: resources
GOOS=linux GOARCH=amd64 go build -a -o ./build/gopow *.go
zip ./build/gopow_linux64.zip ./build/gopow
build_arm5: resources
GOOS=linux GOARM=5 GOARCH=arm go build -a -o ./build/gopow *.go
zip ./build/gopow_linux_arm5.zip ./build/gopow
build_arm7: resources
GOOS=linux GOARM=7 GOARCH=arm go build -a -o ./build/gopow *.go
zip ./build/gopow_linux_arm7.zip ./build/gopow
build_win: resources
GOOS=windows GOARCH=amd64 go build -a -o ./build/gopow.exe *.go
zip ./build/gopow_win64.zip ./build/gopow.exe
all: build_darwin build_linux build_arm5 build_arm7 build_win
rm ./build/gopow
rm ./build/gopow.exe
lint: lint:
golint . golint .
clean: clean:
rm -f gopow rm -f build
rm -rf internal/resources rm -rf internal/resources

View File

@@ -1,2 +1,28 @@
# rtl-gopow # rtl-gopow
Render tables from rtl_power to a nice heat map Render tables from rtl_power to a nice heat map
Here is an render of rtl_power tool scanning 80-90 MHz during 2.5 hours moving in a car. ![80-90 MHz](http://i.imgur.com/knkzLXO.jpg).
# Availability
Since Go is easy to cross compile, this tool can be easily distributed as a binary without any dependencies. You'll find it under Releases here on github. The following platforms are avalible as a ready to run binary file:
* OS X (x64)
* Linux (x64)
* Linux (arm5)
* Linux (arm7)
* Windows (x64)
## Performance
A render of a 600 MB csv file takes about 2 minutes on a 2,4 GHz Intel Core i5. There is still lots of room for improvement on that though. Memory usage is quite horrid.
## Options
```
GLOBAL OPTIONS:
--input, -i CSV input file generated by rtl_power [required]
--output, -o Output file, default same as input file with new extension
--format, -f 'png' Output file format, default png [png,jpeg]
--verbose Enable more verbose output
--no-annotations Disabled annotations such as time and frequency scales
--help, -h show help
--version, -v print the version
```