Planet Linux Australia

Syndicate content
Planet Linux Australia - http://planet.linux.org.au
Updated: 2 min 20 sec ago

Janet Hawtin: noise

Wed, 2015-05-06 12:12
an eternally urgent offer,

to match your fancy and quench your envy

setting a trap for your immediate attention.



a market to engage you

with the unlikely imagery of a commercial imagination

seeding questions and farming responses,



enhance your success, open your purse,

quench your need with our original, natural, blue pill

clinching a sale, a steal! closing a deal.



trusted partners reach into your address book,

praying for support, preying on conscience

any answer is bound to please.



just sometimes,

a paragraph of detractor text, ragged pieces

from vintage novels, snuppets of wholesome language,

a block of literary noise to confuse the filters

these hold unexpected charm.

Janet Hawtin: pieces

Wed, 2015-05-06 12:11


tissue of soft dust

despite eternal sweeping

chaos replenished



a fragrant creeper

behind the red dahlia

stealing attention



bees searching pinwheels,

eyes with yellow lashes,

flowering gum tree



squeezed by distance

fence posts diminish, shadows

contrast, long and sharp



finely inked tattoos

spill piquant winding stories

illumination



cheap creamy cotton

striped with afternoon sunlight

warming my window



a dream of travel

not quenching my restlessness

just honing its point

Janet Hawtin: hunger

Wed, 2015-05-06 12:09


cracked earth and dry thistles

the swamp is still thirsty



an ibis steps formally

her beak curves, deep

into the crevasses

hungry



the egret too is walking,

soft bluegrey elegance

collecting caterpillars

as they taste their green hosts



in the garden a storm

of butterflies rises,

matching her slate colours,

but no longer hungry

Andrew Pollock: [life] Zoe at 5

Tue, 2015-05-05 07:25

Zoe celebrated her 5th birthday a day early with a lovely party at Sarah's house, with a bunch of her friends from Kindergarten, Prep and beyond. This birthday also means she's been living in two homes for as much of her life as she's lived in one. On that front, mercifully, she seems to be doing as well as one could possibly hope for. This is her normal, as much as it breaks my heart.

She's doing fabulously well on all fronts, really. She's grown into a lovely little girl that I always enjoy spending time with. She's finally figured out how to ride a bike, so I've bought her a bigger bike for her birthday. I believe her swimming is going really well (I haven't seen her in action for a while because she does her swim classes via after-school care, but I'm fortunate to have one of my Thermomix consultant team members be her swim teacher, so I get some feedback from time to time).

We had parent-teacher interviews at the end of last term, and from all reports there, Zoe seemed to be doing well in Prep. Her sight-words are going pretty well. She's got the hang of phonics. She can write her name. She seems to have made friends with lots of the kids in her class. We've had a few of them over for dinner. I feel very connected with the school community.

I'm really grateful that I got about 5 weeks at the start of Prep before I returned to work. I got to be really involved with school for a little bit. I helped out with her school swim classes. I helped out with a literacy group. I did Tuckshop a couple of times. It was lovely. I wish I could be a stay at home parent so I could do that sort of thing all the time, but that's just not possible (at the moment, anyway). The school clearly relies quite heavily on parent helpers.

Five (and the lead up to it) seems to be a pretty fantastic age. I'm loving being her Dad now just as much as any other time.

Janet Hawtin: lucy

Mon, 2015-05-04 19:59
we walk to the river to collect buckets of leaf litter for the garden.

a gradual taming of the red earth for zucchinis and beans.



she keeps close to my side

a honey coloured dark eyed shadow



we share the quiet society of insects, lizards and garden life

until evening when he returns.



Janet Hawtin: catching the sun

Mon, 2015-05-04 19:56
on the edge of the porch they stand

close, like people huddled on a train platform

hailing the morning sun with relief and green vitality

a small distance above the chill

night air still lurks in the shadows

finding the lowest ground with the lowest temperature

not quite frozen this time.

James Purser: On Super Hero Movies and worthiness

Mon, 2015-05-04 14:30

This was originally going to be a comment on this post over at the Guardian

Yeah so here's the thing. Hollywood isn't about worthy (in the academic sense), has never been about worthy as a business model.

Rather it's about bums on seats. From the time before they invented talkies the whole business is about making sure that people spend their hard earned cash watching the studios movie rather than someone elses.

I also think that Wilson is conflating two different phenomena. He blames the lack of "worthiness" for the fact that Directors and "auteurs" are moving away from film and towards the internet as a distribution model. This is what's known as bollocks.  This has nothing to do with Super Hero Films and everything to do with the fact that the market for entertainment itself is breaking up, meaning that people who fill a niche can now better connect with their target market.

Hollywood in twenty years time will be a completely different beast than it is today. And it's not because Super Hero Films with eventually die out (and they will). It's because the world has changed, and honestly, I think you'd be hard pressed to find anyone who will mourne the passing.

As I mentioned earlier, indie film isn't dying because of the rash of Super Hero Films, it's changing its focus. If you're an indie film maker, why would you ignore the worlds biggest market place for entertainment? if you've got a choice between an extremely limited run in an extremely limited number of cinemas with zero marketing budget, and the internet, with services like iTunes, Netflix or Google Play, I think the choice is obvious.

Honestly, there's a level of misguided snobbery around the original post. "Why does Hollywood make films about men in tights?" seems to be tone, when in fact it's not Hollywood that is "threatening" the authors idea of what is good, but the internet.

Blog Catagories: mediafilms

Sridhar Dhanapalan: Twitter posts: 2015-04-27 to 2015-05-03

Mon, 2015-05-04 00:27

David Rowe: SM1000 Part 13 – Shipping!

Sun, 2015-05-03 08:30

The enclosure has arrived from the new manufacturer! Edwin and team at Dragino are now assembling, testing, and shipping the first batch of 100 SM1000s. We plan to ship all Aliexpress pre-orders in week starting 3 May, Australian orders the week starting 10 May.

We have sold almost all of the first batch just in pre-orders! Rick and Edwin have already started work on the next batch of 100, making some small changes to help production.

It is remarkable just how long the “little details” take to work out when putting a product into production. I had the prototype SM1000 working in September, and the first revision of the case was ready before Christmas. Things always take longer than you expect. Oh well, we have made it in the end. We are shipping about 14 months after Rick and I started work on the project, which is not bad for any product I guess. Thanks so much Rick and Edwin!

SM1000 Support

Here is the SM1000 user Guide.

For SM1000 support please post to the Codec 2 mailing list, that way we can all share the information. We’ll publish some SM1000 user guide information over the next few weeks. Maybe a wiki, so you can all join in. I really want this to be a community project.

FreeDV News

In other FreeDV news I’ve been working hard on a new “negative SNR” FreeDV mode that will find it’s way into the SM1000 and other FreeDV platforms later this year. So far I’ve developed a prototype 650 bit/s version of Codec 2 and Octave/C versions of a new coherent PSK HF modem with frequency diversity which greatly helps HF fading channel performance. I am currently being frustrated by HF modem frequency offset estimation (yet again!) but I’ll get there eventually. Other parts of the new coherent PSK HF modem are working really well.

In the VHF space, Brady KC9TPA, has been working hard on a design and PCB layout for a prototype VHF radio that can run FreeDV and demonstrate our advanced new ideas for VHF Digital Voice. Wish I was building radios too but I’m knee deep in DSP code!

Dayton 2015

Rick will be attending the Dayton Hamfest and presenting a talk on the SM1000, and will have a bunch of SM1000s for you to play with. Mel, Bruce and team will have a booth at Dayton with FreeDV and the SM1000 on display – thanks guys for all your efforts and kind support.

Clinton Roy: clintonroy

Sat, 2015-05-02 17:28



Under a week to go – closes Friday 8th May

With just under a week to go until the PyCon Australia 2015 Call for Proposals closes, we thought it would be a good idea to give everyone an update and a reminder. We’re very happy with the proposals we’ve already received, but we’re eager to receive more! We hope our proposal writing working bees in Brisbane have been of help, and hope to roll them out to more cities next year. If you’ve got any questions please get in touch (numerous contact details are up on pycon-au.org). We would like to give a special shout out for the Education MiniConf, which is new this year: if you know people teaching and using computing in the education realm, please forward this CFP on.

The deadline for proposal submission is Friday 8th May, 2015.



Conference

The conference this year will be held on Saturday 1st and Sunday 2nd August 2015 in Brisbane. PyCon Australia attracts professional developers from all walks of life, including industry, government, and science, as well as enthusiast and student developers. We’re looking for proposals for presentations and tutorials on any aspect of Python programming, at all skill levels from novice to advanced.

Presentation subjects may range from reports on open source, academic or commercial projects; or even tutorials and case studies. If a presentation is interesting and useful to the Python community, it will be considered for inclusion in the program.

We’re especially interested in short presentations that will teach conference-goers something new and useful. Can you show attendees how to use a module? Explore a Python language feature? Package an application?



Miniconfs

Four Miniconfs will be held on Friday 31st July, as a prelude to the main conference. Miniconfs are run by community members and are separate to the main conference. If you are a first time speaker, or your talk is targeted to a particular field, the Miniconfs might be a better fit than the main part of the conference. If your proposal is not selected for the main part of the conference, it may be selected for one of our Miniconfs:

DjangoCon AU is the annual conference of Django users in the Southern Hemisphere. It covers all aspects of web software development, from design to deployment – and, of course, the use of the Django framework itself. It provides an excellent opportunity to discuss the state of the art of web software development with other developers and designers.

The Python in Education Miniconf aims to bring together community workshop organisers, professional Python instructors and professional educators across primary, secondary and tertiary levels to share their experiences and requirements, and identify areas of potential collaboration with each other and also with the broader Python community.

The Science and Data Miniconf is a forum for people using Python to tackle problems in science and data analysis. It aims to cover commercial and research interests in applications of science, engineering, mathematics, finance, and data analysis using Python, including AI and ‘big data’ topics.

The OpenStack Miniconf is dedicated to talks related to the OpenStack project and we welcome proposals of all kinds: technical, community, infrastructure or code talks/discussions; academic or commercial applications; or even tutorials and case studies. If a presentation is interesting and useful to the OpenStack community, it will be considered for inclusion. We also welcome talks that have been given previously in different events.



First Time Speakers

We welcome first-time speakers; we are a community conference and we are eager to hear about your experience. If you have friends or colleagues who have something valuable to contribute, twist their arms to tell us about it! Please also forward this Call for Proposals to anyone that you feel may be interested.

The most recent call for proposals information can always be found at: pycon-au.org/cfp

See you in Brisbane in July!



Important Dates

Call for Proposals opens: Friday 27th March, 2015

Proposal submission deadline: Friday 8th May, 2015

Proposal acceptance: Monday 25 May, 2015



Filed under: Uncategorized

Maxim Zakharov: Fitbit and Android Lollipop

Sat, 2015-05-02 10:25

If you use FitBit tracker with a smartphone which has been recently undated to Android 5.0 Lollipop, you might faced the same problem as me - the Fitbit app has stopped synching with the tracker.

Surprisingly there are a lot of people complaining online or even raging in putting one star rating to the app in Google Play. However, the solution which helped me: uninstall and reinstall the app, is mentioned on the FitBit Help web-site, and it takes around a minute to remove and reinstall the app.

Rusty Russell: Some bitcoin mempool data: first look

Thu, 2015-04-30 22:28

Previously I discussed the use of IBLTs (on the pettycoin blog).  Kalle and I got some interesting, but slightly different results; before I revisited them I wanted some real data to play with.

Finally, a few weeks ago I ran 4 nodes for a week, logging incoming transactions and the contents of the mempools when we saw a block.  This gives us some data to chew on when tuning any fast block sync mechanism; here’s my first impressions looking a the data (which is available on github).

These graphs are my first look; in blue is the number of txs in the block, and in purple stacked on top is the number of txs which were left in the mempool after we took those away.

The good news is that all four sites are very similar; there’s small variance across these nodes (three are in Digital Ocean data centres and one is behind two NATs and a wireless network at my local coworking space).

The bad news is that there are spikes of very large mempools around block 352,800; a series of 731kb blocks which I’m guessing is some kind of soft limit for some mining software [EDIT: 750k is the default soft block limit; reported in 1024-byte quantities as blockchain.info does, this is 732k.  Thanks sipa!].  Our ability to handle this case will depend very much on heuristics for guessing which transactions are likely candidates to be in the block at all (I’m hoping it’s as simple as first-seen transactions are most likely, but I haven’t tested yet).

Transactions in Mempool and in Blocks: Australia (poor connection)

Transactions in Mempool and in Blocks: Singapore

Transactions in Mempool and in Blocks: San Francisco

Transactions in Mempool and in Blocks: San Francisco (using Relay Network)

Michael Still: Coding club day one: a simple number guessing game in python

Thu, 2015-04-30 18:29
I've recently become involved in a new computer programming club at my kids' school. The club runs on Friday afternoons after school and is still very new so we're still working through exactly what it will look like long term. These are my thoughts on the content from this first session. The point of this first lesson was to approach a programming problem where every child stood a reasonable chance of finishing in the allotted 90 minutes. Many of the children had never programmed before, so the program had to be kept deliberately small. Additionally, this was a chance to demonstrate how literal computers are about the instructions they're given -- there is no room for intuition on the part of the machine here, it does exactly what you ask of it.



The task: write a python program which picks a random number between zero and ten. Ask the user to guess the number the program has picked, with the program telling the user if they are high, low, or right.



We then brainstormed the things we'd need to know how to do to make this program work. We came up with:
  • How do we get a random number?
  • What is a variable?
  • What are data types?
  • What is an integer? Why does that matter?
  • How do we get user input?
  • How do we do comparisons? What is a conditional?
  • What are the possible states for the game?
  • What is an exception? Why did I get one? How do I read it?




With that done, we were ready to start programming. This was done with a series of steps that we walked through as a group -- let's all print hello work. Now let's generate a random number and print it. Ok, cool, now let's do input from a user. Now how do we compare that with the random number? Finally, how do we do a loop which keeps prompting until the user guesses the random number?



For each of these a code snippet was written on the whiteboard and explained. It was up to the students to put them together into a program which actually works.



Due to limitations in the school's operating environment (no local python installation and repl.it not working due to firewalling) we used codeskulptor.org for this exercise. The code that the kids ended up with looks like this:



    import random # Pick a random number number = random.randint(0, 10) # Now ask for guesses until the correct guess is made done = False while not done: guess = int(raw_input('What is your guess?')) print 'You guessed: %d' % guess if guess < number: print 'Higher!' elif guess > number: print 'Lower!' else: print 'Right!' done = True




The plan for next session (tomorrow, in the first week of term two) is to recap what we did at the end of last term and explore this program to make sure everyone understands how it works.



Tags for this post: coding_club teaching coding

Related posts: More coding club; I'm glad I've turned on comments here; Huffman coding



Comment

Donna Benjamin: Constructive Conflict Resolution

Thu, 2015-04-30 08:26
Thursday, April 30, 2015 - 08:09

I'm speaking at DrupalCon Los Angeles. 5pm, Tuesday 12 May in the 518 - Trellon room.

I first spoke about Constructive Conflict Resolution in Amsterdam at DrupalCon last year. I posted the slides, recording and speakers notes from that talk to the PreviousNext blog. 

I'm reprising that talk in Los Angeles because someone else is now unable to make it, and I was asked if I could fill in. When I originally proposed the talk for LA I had planned to rework the slide and narrative - but unfortunately won't have much time to do that before the conference. However this is a conversation starter, and we'll have an opportunity in the room to discuss how we might embrace conflict as a force for good, as a force for progress. How to harness it, how to minimise it's potential for harm.

I hope to see you there!

Constructive Conflict Resolution will be in the core conversations track at DrupalCon Los Angeles.

Craige McWhirter: Craige McWhirter: Rebuilding An OpenStack Instance and Keeping the Same Fixed IP

Wed, 2015-04-29 16:28

OpenStack and in particular the compute service, Nova, has a useful rebuild function that allows you to rebuild an instance from a fresh image while maintaining the same fixed and floating IP addresses, amongst other metadata.

However if you have a shared storage back end, such as Ceph, you're out of luck as this function is not for you.

Fortunately, there is another way.

Prepare for the Rebuild:

Note the fixed IP address of the instance that you wish to rebuild and the network ID:

$ nova show demoinstance0 | grep network | DemoTutorial network | 192.168.24.14, 216.58.220.133 | $ export FIXED_IP=192.168.24.14 $ neutron floatingip-list | grep 216.58.220.133 | ee7ecd21-bd93-4f89-a220-b00b04ef6753 | | 216.58.220.133 | $ export FLOATIP_ID=ee7ecd21-bd93-4f89-a220-b00b04ef6753 $ neutron net-show DemoTutorial | grep " id " | id | 9068dff2-9f7e-4a72-9607-0e1421a78d0d | $ export OS_NET=9068dff2-9f7e-4a72-9607-0e1421a78d0d

You now need to delete the instance that you wish to rebuild:

$ nova delete demoinstance0 Request to delete server demoinstance0 has been accepted. Manually Prepare the Networking:

Now you need to re-create the port and re-assign the floating IP, if it had one:

$ neutron port-create --name demoinstance0 --fixed-ip ip_address=$FIXED_IP $OS_NET Created a new port: +-----------------------+---------------------------------------------------------------------------------------+ | Field | Value | +-----------------------+---------------------------------------------------------------------------------------+ | admin_state_up | True | | allowed_address_pairs | | | binding:vnic_type | normal | | device_id | | | device_owner | | | fixed_ips | {"subnet_id": "eb5db27f-edad-480e-92cb-1f8fec8848a8", "ip_address": "192.168.24.14"} | | id | c1927578-451b-4682-8888-55c7163898a4 | | mac_address | fa:16:3e:5a:39:67 | | name | demoinstance0 | | network_id | 9068dff2-9f7e-4a72-9607-0e1421a78d0d | | security_groups | 5898c15a-4670-429b-a414-9f59671c4d8b | | status | DOWN | | tenant_id | gsu7j52c50804cf3aad71b92e6ced65e | +-----------------------+---------------------------------------------------------------------------------------+ $ export OS_PORT=c1927578-451b-4682-8888-55c7163898a4 $ neutron floatingip-associate $FLOATIP_ID $OS_PORT Associated floating IP ee7ecd21-bd93-4f89-a220-b00b04ef6753 $ neutron floatingip-list | grep $FIXED_IP | ee7ecd21-bd93-4f89-a220-b00b04ef6753 | 192.168.24.14 | 216.58.220.133 | c1927578-451b-4682-8888-55c7163898a4 | Re-build!

Now you need to boot the instance again and specify port you created:

$ nova boot --flavor=m1.tiny --image=MyImage --nic port-id=$OS_PORT demoinstance0 $ nova show demoinstance0 | grep network | DemoTutorial network | 192.168.24.14, 216.58.220.133 |

Now your rebuild has been completed, you've got your old IPs back and you're done. Enjoy :-)

James Morris: SPARC Processor Documentation Online

Wed, 2015-04-29 12:27

For folks who don’t follow my twitter or plus accounts, there’s a bunch of SPARC processor documentation here:

http://www.oracle.com/technetwork/server-storage/sun-sparc-enterprise/documentation/sparc-processor-2516655.html

This is up to T4 & M5 and also now includes legacy systems back to Ultra-SPARC I.  Thanks to all who worked on getting these published.

Michael Davies: OpenStack Hint of the Day: Wed Apr 29

Wed, 2015-04-29 12:08
When running tox and you get something like this:



mrda@garner:~/src/python-ironicclient (review/michael_davies/file-caching)$ tox -e py34

py34 runtests: PYTHONHASHSEED='3098345924'

py34 runtests: commands[0] | python setup.py testr --slowest --testr-args=

running testr

running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit}  --list 

db type could not be determined

error: testr failed (3)

ERROR: InvocationError: '/home/mrda/src/python-ironicclient/.tox/py34/bin/python setup.py testr --slowest --testr-args='

________________________________________________________________________________________________ summary _________________________________________________________________________________________________

ERROR:   py34: commands failed



The solution is to "rm -rf .testrepository/" and try again.



(Thanks to this little reference hidden away https://wiki.openstack.org/wiki/Python3#tox.2Ftestr_error:_db_type_could_not_be_determined)

Stewart Smith: Going beyond 1.3 MILLION SQL Queries/second

Tue, 2015-04-28 15:26

So, on a large IBM POWER8 system I was recently running the newly coined “yesmark” benchmark, which is best translated as this:

Benchmark (N for concurrency): for i in {1..N}; do yes "DO 0;" | mysql > /dev/null & done Live results: mysqladmin -ri 1 extended-status | grep Questions

Which sounds all fun until you realize that it’s *amazingly* close in results to a sysbench point select benchmark these days (well, with MySQL 5.7.7).

Since yesmark doesn’t use InnoDB though, MariaDB is back in the game.

I don’t think it matters between MariaDB and MySQL at this point for yesbench. With MySQL in a KVM guest on a shared 2 socket POWER8 I could get 754kQPS and on a larger system, I could get 1.3 million / sec.

1.3 Million queries / sec is probably the highest number anybody has ever seen out of MySQL or MariaDB, so that’s fairly impressive in itself.

What’s also impressive is that on this workload, mysqld was still only using 50% of CPU in the system. The mysql command line client was really heavy user.

Other users are: 8% completely idle, another 12% in linux scheduler (alarmingly high really). So out of all execution time, only about 44% spent in mysqld, 29% in mysql client.

It seems that the current issues scaling to two socked POWER8 machines are the same as with scaling to other large systems, when we go beyond about 20 POWER8 cores (SMT8), we start to find new and interesting challenges.

Jan Schmidt: New gst-rpicamsrc features

Tue, 2015-04-28 01:26

I’ve pushed some new changes to my Raspberry Pi camera GStreamer wrapper, at https://github.com/thaytan/gst-rpicamsrc/

These bring the GStreamer element up to date with new features added to raspivid since I first started the project, such as adding text annotations to the video, support for the 2nd camera on the compute module, intra-refresh and others.

Where possible, you can now dynamically update any of the properties – where the firmware supports it. So you can implement digital zoom by adjusting the region-of-interest (roi) properties on the fly, or update the annotation or change video effects and colour balance, for example.

The timestamps produced are now based on the internal STC of the Raspberry Pi, so the audio video sync is tighter. Although it was never terrible, it’s now more correct and slightly less jittery.

The one major feature I haven’t enabled as yet is stereoscopic handling. Stereoscopic capture requires 2 cameras attached to a Raspberry Pi Compute Module, so at the moment I have no way to test it works.

I’m also working on GStreamer stereoscopic handling in general (which is coming along). I look forward to releasing some of that code soon.

 

Andrew McDonnell: Using an i2c RTC with the Carambola2 (or any OpenWRT modified router)

Mon, 2015-04-27 22:27

Using i2c with a modded router is simple enough, if you have two spare GPIO then the module package kmod-i2c-gpio-custom allows selected GPIO pins to be bound to SCL and SDA respectively when the module is loaded.

However for inexplicable reasons the ability to bind an i2c RTC module to the Linux hardware clock is disabled by default by the OpenWRT configuration mechanism for ar71xx and other consumer router architectures, and there is no way to turn it on without patching!

Regardless, here is how to use an i2c RTC with the Carambola2 or any other ar71xx architecture router (e.g. WRTnode, etc.)

  • Patch the file target/linux/ar71xx/generic/target.mk as follows:

    -FEATURES += squashfs +FEATURES += squashfs +rtc
  • Patch the kernel configuration target/linux/ar71xx/config-3.xx where (xx depends on your version of OpenWRT) as follows:

    +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1307=m
  • Note: the kernel configuration can be modified via the kernel build system using the command make kernel_menuconfig
  • Note: add other kernel i2c RTC modules as required
  • Add the module to your image:

    CONFIG_RTC_SUPPORT=y CONFIG_DEFAULT_RTC_SUPPORT=y CONFIG_PACKAGE_kmod-rtc-ds1307=y
  • If you have previously built OpenWRT then remove the tmp/ directory, or the change ‘+rtc’ will be ignored and the DS1307 module will not be included in your image
  • Run make defconfig
  • Build your image: make -j2

If everything worked, then the the file /lib/modules/3.xx…/rtc-ds1307.ko should be in the resulting image

Following is an aggregation of information I was already able to find elsewhere on the net.

  • Ensure that i2c-tools package is installed as well. This may require the ‘oldpackages’ feed.
  • Configure the module as follows by creating a file /etc/modules.d/99gpio-i2c-rtc
  • You can also put this file into files/etc/modules.d/99gpio-i2c-rtc for it to be automatically added to your image
  • Create the following content, where in this example 18 == SDA pin id and 19 == SCL pin id

    i2c-gpio-custom bus0=0,18,19 rtc-ds1307
  • There are additional arguments controlling delays, etc.; refer to package/kernel/i2c-gpio-custom/src/i2c-gpio-custom.c
  • Create a script, /etc/init.d/rtc-driver to load the device driver and set the time.

    #!/bin/sh /etc/rc.common logger "Setup i2c RTC" echo ds1307 0x68 > '/sys/class/i2c-dev/i2c-0/device/new_device' if hwclock | grep 'Jan' | grep -q 2000 ; then logger "RTC appears to have a flat battery..." else logger "RTC set hwclock" hwclock -s fi
  • Create a symlink…

    ln -s /etc/init.d/rtc-driver /etc/rc.d/S11rtc-driver
  • Note, if you are running ntp that will take over anyway, but for system with an intermittent or no network connection, or if the network is down on boot, the RTC will provide a better time than 1 Jan 2012 or whatever…

You can test the above out before scripting it by booting the system and manually stepping through:

modprobe i2c-gpio-custom bus0=0,18,19 i2cdetect -l modprobe rtc-ds1307 echo ds1307 0x68 > '/sys/class/i2c-dev/i2c-0/device/new_device' hwclock

Enjoy!

PS Dont forget pullup presistors, and take care interfacing between 5V and 3.3V systems and peripherals…