[20160213]
|
Using GPIO on the Raspberry Pi
Marina Brown
asked on port-arm
how to get GPIO ports going with NetBSD on the Raspberry Pi,
has collected the answers and
posted
the link to the document
to the list.
In short, the key is to enable GPIO ports during boot
when the system has not raised the securelevel yet.
[Tags: gpio, raspberrypi]
|
[20100202]
|
Turn your ALIX into KITT (Updated)
Drop the following script into /etc/rc.d/alixkitt,
put "alixkitt=yes" into /etc/rc.conf and enjoy:
#!/bin/sh
# Turn ALIX2c front LEDs into running LED
# http://www.gifninja.com/Workspace/59f3f22e-5f40-4937-936c-1dc0d6fbe690/output.gif
#
# Copyright (c) 2010 Hubert Feyrer <hubertf@NetBSD.org>
# PROVIDE: alixkitt
$_rc_subr_loaded . /etc/rc.subr
name="alixkitt"
start_cmd="alixkitt_start"
stop_cmd="alixkitt_stop"
pidfile="/var/run/${name}.pid"
alixkitt_sleeptime=1.0 # 0.5
alixkitt_setled()
{
gpioctl -q -d /dev/gpio 6 $1
gpioctl -q -d /dev/gpio 25 $2
gpioctl -q -d /dev/gpio 27 $3
sleep $alixkitt_sleeptime
}
alixkitt_start()
{
touch $pidfile
(
alixkitt_setled 0 0 0
while [ -f $pidfile ] ; do
alixkitt_setled 0 1 1
alixkitt_setled 1 0 1
alixkitt_setled 1 1 0
alixkitt_setled 1 0 1
done
) &;
echo $! >$pidfile
echo Started pid $!
}
alixkitt_stop()
{
if [ -f /var/run/alixkitt.pid ]; then
read pid <$pidfile
echo Stopped pid $pid
kill $pid
rm $pidfile
alixkitt_setled 1 1 1
fi
exit 0
}
load_rc_config $name
run_rc_command "$1"
P.S.: There's still a bug left in that stopping immediately
re-starts the process. Got a patch?
Update:
Axel Scheepers suggested doing the while-loop only
as long as the PID-file exists. Changed above.
[Tags: alix, gpio, kitt]
|
[20100131]
|
Toggling Alix2c LEDs
I've found that the three LEDs at the front of a
PC Engines Alix2C board
can be toggled on and off via their attachment to the GPIO bus.
Here are the commands for this:
left: | gpioctl -d /dev/gpio 6 2 |
middle: | gpioctl -d /dev/gpio 25 2 |
right: | gpioctl -d /dev/gpio 27 2 |
[Tags: alix, gpio]
|
[20091210]
|
Catching up on source changes
I've dug through my source-changes archive once more, and
there are entries from February(?!?) to mid-October 2009
in there that I think may be of interest to casual
followers of NetBSD.
Before I go into the details, let me add a hint on the
"source-changes-full" mailing list, which is like source-changes,
but the mails there also contain diffs of the changes (as long
as they are below 1MB in size). The -full list is not archived
on mail-index.netbsd.org,
and I must have missed the announcement. It's definitely useful!
So, what interesting changes have there been to NetBSD-current
recently? Here we go:
- New / updated drivers:
- sdtemp(4) reads the on-DIMM temperature sensors following
the JEDEC Standard No. 21-C Section 4-7.
- gpio(4) got support for Intel ICH southbridges as found on
Intel SS4220-E (ICH7) and Acorp 6A815EPD (ICH2) motherboards
- lom(4) supports the LOMlite "Lights Out Management" boards found
on Sun hardware like the LOMlite found on the Sun Netra t1
and the LOMlite2 found on Sun Netra T1/X1 and Sun Fire V100/V120.
- An initial version of a SD/MMC driver for the Winbond W83L518D (and probably
W83L519D) Integrated Media Reader with PNP bus attachment glue was added.
- acpiwmi(4) was added to added, to further support ACPI
development. See
the specs for more details.
- piixide(4) now supports Intel 3400 SATA
- New kernel interfaces and library functions include:
- getdate(3) and getdate_err(3) were added according
to POSIX.1 and the Open Group
- RAIDframe was sped up massively when checking parity
after a system crash with the help of a parity map.
This work was done during this year's Google Summer-of-Code.
- A "netbsd.inet.icmp.bmcastecho" sysctl was added to
disable replies to the broadcast address.
- Floating point functions f{min,max,dim}{,l,f}(3) were added
- udl(4) adds support for DisplayLink DL-1x0/1x5 based USB LCDs and USB-VGA adaptors
- Random other additions and changes include:
- hdaudioctl(8) can be used to manipulate hdaudio(4) devices
- The NetBSD/playstation2 port was removed due to a lack
of developer support. It's still available in CVS.
- The NetBSD/i386 bootloader now knows a "dev" command
to list available boot devices and their size.
- Newly imported and updated 3rd party software includes:
- pfsync from OpenBSD 4.2, adopted in this year's Google
Summer of Code.
- PF from OpenBSD 4.2 was imported.
- Multicast DNS ("Bonjour") support was added, based on
Apple's mDNSResponder. Enable with "dns: mdns" in
/etc/nsswitch.conf.
- GNU binutils were updated to version 2.19
- Many of the bazillion of X.org components were updated - ways too many to note in detail.
- BIND was updated to 9.7.0b1
- Flex 2.5.35 was imported
- A new m4(1) was imported
[Tags: bonjour, google-soc, gpio, hdaudio, lom, mdns, pfsync, posix, raidframe, sdtemp, source-changes]
|
[20090724]
|
Work in progress: ACLs, Xen Baloon Driver, GPIO, Raidframe detachment
No big announcements in NetBSD land for a bit now, but there's
lots of stuff brewing in moist dark places. I've assembled
a few over the past few weeks, and I think it's time to
mention them so they don't get lost:
- NetBSD implements traditional Unix file access control, which
is based on permissions for reading, writing and executing for
any of a file's owner, its group, and the rest of the world.
Concepts in the form of Access Control Lists (ACLs) exist for
more fine grained control, but they are not available with
NetBSD. Yet.
Elad Efrat is still workin on the kauth(9) framework, and as
a side-product, he has implemented
Access Control Lists on top of kauth(9)..
The code is not fit for production use yet, but we can
stay tuned to see more of this.
- When you have a machine running virtualization, you usually dedicate
a portion of the machine's RAM to each of the VMs. You (usually)
cannot spend more RAM for VMs than you have RAM in the host,
obviously... until you use some sort of virtual memory for the
VMs themseolves. Which is what the Xen "balloon" driver does,
inflating a Xen VM's RAM as needed.
Those interested in a driver can find
a balloon driver for Xen3 dom0 by Cherry G. Mathew
now, who's looking forward to your comments!
- Coming newly to NetBSD, developer Marc Balmer writes:
``NetBSD has had support for General Purpose Input/Output devices since the
4.0 release, when the GPIO framework from OpenBSD 3.6 was imported. Since
the import of the GPIO framework into NetBSD, I have reworked larger parts
of that subsystem in OpenBSD to address some problems and drawbacks''.
More details on his motivation and details can be found on
his homepage,
and Marc has
posted about his recent work on updating NetBSD's GPIO framework.
See
Marc's posting
for details on changes in the API, prominent
changes, security aspects and more.
- When you run a Xen DomU which has its file system on a vnd(4)
disk and which has a number of disk images which are again put
together into a raidframe(4) volume which may in turn contain
further images for vnd(4), raidframe(4), cgd(4) and possibly
others, tearing down the whole stack on system shutdown can
get hairy.
The situation is known, and
David Young has put some work into this area.
For now, he can properly detach raid units. See
his posting for an example session.
So much for the latest projects that are "work in progress"
on the NetBSD front. Stay tuned for them to hit NetBSD-current!
[Tags: acls, gpio, raidframe, xen]
|
[20051017]
|
Using GPIO on the Soekris net4801
After Jared McNeill imported the GPIO framework into -current a few
weeks ago, he has now described the steps to start playing with it,
showing how to access the error LED on a Soekris net4801 box. See
hist posting
as well as the followups to current-users@ in
september
and
october
for further discussion.
[Tags: gpio, soekris]
|
|
Tags: ,
2bsd,
34c3,
3com,
501c3,
64bit,
acl,
acls,
acm,
acorn,
acpi,
acpitz,
adobe,
adsense,
Advocacy,
advocacy,
advogato,
aes,
afs,
aiglx,
aio,
airport,
alereon,
alex,
alix,
alpha,
altq,
am64t,
amazon,
amd64,
anatomy,
ansible,
apache,
apm,
apple,
arkeia,
arla,
arm,
art,
Article,
Articles,
ascii,
asiabsdcon,
aslr,
asterisk,
asus,
atf,
ath,
atheros,
atmel,
audio,
audiocodes,
autoconf,
avocent,
avr32,
aws,
axigen,
azure,
backup,
balloon,
banners,
basename,
bash,
bc,
beaglebone,
benchmark,
bigip,
bind,
blackmouse,
bldgblog,
blog,
blogs,
blosxom,
bluetooth,
board,
bonjour,
books,
boot,
boot-z,
bootprops,
bozohttpd,
bs2000,
bsd,
bsdca,
bsdcan,
bsdcertification,
bsdcg,
bsdforen,
bsdfreak,
bsdmac,
bsdmagazine,
bsdnexus,
bsdnow,
bsdstats,
bsdtalk,
bsdtracker,
bug,
build.sh,
busybox,
buttons,
bzip,
c-jump,
c99,
cafepress,
calendar,
callweaver,
camera,
can,
candy,
capabilities,
card,
carp,
cars,
cauldron,
ccc,
ccd,
cd,
cddl,
cdrom,
cdrtools,
cebit,
centrino,
cephes,
cert,
certification,
cfs,
cgd,
cgf,
checkpointing,
china,
christos,
cisco,
cloud,
clt,
cobalt,
coccinelle,
codian,
colossus,
common-criteria,
community,
compat,
compiz,
compsci,
concept04,
config,
console,
contest,
copyright,
core,
cortina,
coverity,
cpu,
cradlepoint,
cray,
crosscompile,
crunchgen,
cryptography,
csh,
cu,
cuneiform,
curses,
curtain,
cuwin,
cvs,
cvs-digest,
cvsup,
cygwin,
daemon,
daemonforums,
daimer,
danger,
darwin,
data,
date,
dd,
debian,
debugging,
dell,
desktop,
devd,
devfs,
devotionalia,
df,
dfd_keeper,
dhcp,
dhcpcd,
dhcpd,
dhs,
diezeit,
digest,
digests,
dilbert,
dirhash,
disklabel,
distcc,
dmesg,
Docs,
Documentation,
donations,
draco,
dracopkg,
dragonflybsd,
dreamcast,
dri,
driver,
drivers,
drm,
dsl,
dst,
dtrace,
dvb,
ec2,
eclipse,
eeepc,
eeepca,
ehci,
ehsm,
eifel,
elf,
em64t,
Embedded,
embedded,
emips,
emulate,
encoding,
envsys,
eol,
espresso,
etcupdate,
etherip,
euca2ools,
eucalyptus,
eurobsdcon,
eurosys,
Events,
exascale,
ext3,
f5,
facebook,
falken,
fan,
faq,
fatbinary,
features,
fefe,
ffs,
filesystem,
fileysstem,
firefox,
firewire,
fireworks,
flag,
flash,
flashsucks,
flickr,
flyer,
fmslabs,
force10,
fortunes,
fosdem,
fpga,
freebsd,
freedarwin,
freescale,
freex,
freshbsd,
friendlyAam,
friendlyarm,
fritzbox,
froscamp,
fsck,
fss,
fstat,
ftp,
ftpd,
fujitsu,
fun,
fundraising,
funds,
funny,
fuse,
fusion,
g4u,
g5,
galaxy,
games,
gcc,
gdb,
gentoo,
geode,
getty,
gimstix,
git,
gnome,
google,
google-soc,
googlecomputeengine,
gpio,
gpl,
gprs,
gracetech,
gre,
groff,
groupwise,
growfs,
grub,
gumstix,
guug,
gzip,
hackathon,
hackbench,
hal,
hanoi,
happabsd,
Hardware,
hardware,
haze,
hdaudio,
heat,
heimdal,
hf6to4,
hfblog,
hfs,
history,
hosting,
hotplug,
hp,
hp700,
hpcarm,
hpcsh,
hpux,
html,
httpd,
hubertf,
hurd,
i18n,
i386,
i386pkg,
ia64,
ian,
ibm,
ids,
ieee,
ifwatchd,
igd,
iij,
image,
images,
imx233,
imx7,
information,
init,
initrd,
install,
intel,
interix,
internet2,
interview,
interviews,
io,
ioccc,
iostat,
ipbt,
ipfilter,
ipmi,
ipplug,
ipsec,
ipv6,
irbsd,
irc,
irix,
iscsi,
isdn,
iso,
isp,
itojun,
jail,
jails,
japanese,
java,
javascript,
jetson,
jibbed,
jihbed,
jobs,
jokes,
journaling,
kame,
kauth,
kde,
kerberos,
kergis,
kernel,
keyboardcolemak,
kirkwood,
kitt,
kmod,
kolab,
kvm,
kylin,
l10n,
landisk,
laptop,
laptops,
law,
ld.so,
ldap,
lehmanns,
lenovo,
lfs,
libc,
license,
licensing,
linkedin,
links,
linksys,
linux,
linuxtag,
live-cd,
lkm,
localtime,
locate.updatedb,
logfile,
logging,
logo,
logos,
lom,
lte,
lvm,
m68k,
macmini,
macppc,
macromedia,
magicmouse,
mahesha,
mail,
makefs,
malo,
mame,
manpages,
marvell,
matlab,
maus,
max3232,
mbr95,
mbuf,
mca,
mdns,
mediant,
mediapack,
meetbsd,
mercedesbenz,
mercurial,
mesh,
meshcube,
mfs,
mhonarc,
microkernel,
microsoft,
midi,
mini2440,
miniroot,
minix,
mips,
mirbsd,
missile,
mit,
mixer,
mobile-ip,
modula3,
modules,
money,
mouse,
mp3,
mpls,
mprotect,
mtftp,
mult,
multics,
multilib,
multimedia,
music,
mysql,
named,
nas,
nasa,
nat,
ncode,
ncq,
ndis,
nec,
nemo,
neo1973,
netbook,
netboot,
netbsd,
netbsd.se,
nethack,
nethence,
netksb,
netstat,
netwalker,
networking,
neutrino,
nforce,
nfs,
nis,
npf,
npwr,
nroff,
nslu2,
nspluginwrapper,
ntfs-3f,
ntp,
nullfs,
numa,
nvi,
nvidia,
nycbsdcon,
office,
ofppc,
ohloh,
olimex,
olinuxino,
olpc,
onetbsd,
openat,
openbgpd,
openblocks,
openbsd,
opencrypto,
opendarwin,
opengrok,
openmoko,
openoffice,
openpam,
openrisk,
opensolaris,
openssl,
or1k,
oracle,
oreilly,
oscon,
osf1,
osjb,
paas,
packages,
pad,
pae,
pam,
pan,
panasonic,
parallels,
pascal,
patch,
patents,
pax,
paypal,
pc532,
pc98,
pcc,
pci,
pdf,
pegasos,
penguin,
performance,
pexpect,
pf,
pfsync,
pgx32,
php,
pie,
pike,
pinderkent,
pkg_install,
pkg_select,
pkgin,
pkglint,
pkgmanager,
pkgsrc,
pkgsrc.se,
pkgsrcCon,
pkgsrccon,
Platforms,
plathome,
pleiades,
pocketsan,
podcast,
pofacs,
politics,
polls,
polybsd,
portability,
posix,
postinstall,
power3,
powernow,
powerpc,
powerpf,
pppoe,
precedence,
preemption,
prep,
presentations,
prezi,
products,
Products,
proplib,
protectdrive,
proxy,
ps,
ps3,
psp,
psrset,
pthread,
ptp,
ptyfs,
Publications,
puffs,
puredarwin,
pxe,
qemu,
qnx,
qos,
qt,
quality-management,
quine,
quote,
quotes,
r-project,
ra5370,
radio,
radiotap,
raid,
raidframe,
rants,
raptor,
raq,
raspberrypi,
rc.d,
readahead,
realtime,
record,
refuse,
reiserfs,
Release,
Releases,
releases,
releng,
reports,
resize,
restore,
ricoh,
rijndael,
rip,
riscos,
rng,
roadmap,
robopkg,
robot,
robots,
roff,
rootserver,
rotfl,
rox,
rs323,
rs6k,
rss,
ruby,
rump,
rzip,
sa,
safenet,
san,
sata,
savin,
sbsd,
scampi,
scheduler,
scheduling,
schmonz,
sco,
screen,
script,
sdf,
sdtemp,
secmodel,
security,
Security,
sed,
segvguard,
seil,
sendmail,
serial,
serveraptor,
sfu,
sge,
sgi,
sgimips,
sh,
sha2,
shark,
sharp,
shisa,
shutdown,
sidekick,
size,
slackware,
slashdot,
slides,
slit,
smbus,
smp,
sockstat,
soekris,
softdep,
softlayer,
software,
solaris,
sony,
sound,
source,
source-changes,
spanish,
sparc,
sparc64,
spider,
spreadshirt,
spz,
squid,
ssh,
sshfs,
ssp,
statistics,
stereostream,
stickers,
storage,
stty,
studybsd,
subfile,
sudbury,
sudo,
summit,
sun,
sun2,
sun3,
sunfire,
sunpci,
support,
sus,
suse,
sushi,
susv3,
svn,
swcrypto,
symlinks,
sysbench,
sysctl,
sysinst,
sysjail,
syslog,
syspkg,
systat,
systrace,
sysupdate,
t-shirt,
tabs,
talks,
tanenbaum,
tape,
tcp,
tcp/ip,
tcpdrop,
tcpmux,
tcsh,
teamasa,
tegra,
teredo,
termcap,
terminfo,
testdrive,
testing,
tetris,
tex,
TeXlive,
thecus,
theopengroup,
thin-client,
thinkgeek,
thorpej,
threads,
time,
time_t,
timecounters,
tip,
tk1,
tme,
tmp,
tmpfs,
tnf,
toaster,
todo,
toolchain,
top,
torvalds,
toshiba,
touchpanel,
training,
translation,
tso,
tty,
ttyrec,
tulip,
tun,
tuning,
uboot,
ucom,
udf,
ufs,
ukfs,
ums,
unetbootin,
unicos,
unix,
updating,
upnp,
uptime,
usb,
usenix,
useradd,
userconf,
userfriendly,
usermode,
usl,
utc,
utf8,
uucp,
uvc,
uvm,
valgrind,
vax,
vcfe,
vcr,
veriexec,
vesa,
video,
videos,
virtex,
virtualization,
vm,
vmware,
vnd,
vobb,
voip,
voltalinux,
vpn,
vpnc,
vulab,
w-zero3,
wallpaper,
wapbl,
wargames,
wasabi,
webcam,
webfwlog,
wedges,
wgt624v3,
wiki,
willcom,
wimax,
window,
windows,
winmodem,
wireless,
wizd,
wlan,
wordle,
wpa,
wscons,
wstablet,
X,
x.org,
x11,
x2apic,
xbox,
xcast,
xen,
Xen,
xfree,
xfs,
xgalaxy,
xilinx,
xkcd,
xlockmore,
xmms,
xmp,
xorg,
xscale,
youos,
youtube,
zaurus,
zdump,
zfs,
zlib
'nuff.
Grab the RSS-feed,
index,
or go back to my regular NetBSD page
Disclaimer: All opinion expressed here is purely my own.
No responsibility is taken for anything.