Subject: Re: Crosscompiling - Olimex EP9301
To: Richard =?iso-8859-1?q?K=E4stner?= <richard.kaestner@kabsi.at>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-embed
Date: 11/27/2006 23:24:53
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
---1756158181-803022878-1164666293=:32351
Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE
On Mon, 27 Nov 2006, Richard K=E4stner wrote:
> 1. how do I get the 'files.XY' into a configuration?
> (Which - I think - get the GPIO-Drivers in)
>
> files.aramdillo9, files.tsarm:
> include "arch/arm/ep93xx/files.ep93xx"
> which should allow accessing GPIO drivers - but no devices in EP9301
>
> 2. will it be enough to include files for GPIO in a configuration?
> ( I would copy TS7200, remove all 'pld' references and call it OLI9301)
I'm not sure what you mean here - in general, the question seems like=20
someone on tech-kern@ could help you further.
The general idea is that the files.* files tell what devices exist and can=
=20
be used by a certain architecture, and that the kernel config file then=20
tells which device drivers really to build into the kernel. For each=20
architecture, there's a std.<whatever> file in the 'conf' directory that=20
pulls in in those files.* files that the architecture supports - see all=20
the various std.* files in src/sys/arch/evbarm/conf as some examples.
Often, this is a bit of a maze to fine through, e.g. for gpio on=20
armadillo9, the way is: std.armadillo9 -> files.armadillo9 -> files.ep93xx
I'm not sure about the details behind this...
> 3. when I cross compile (running NetBSD Current)
> epia1(root) ~> uname -a
> NetBSD epia1 4.99.4 NetBSD 4.99.4 (RFK) #0: Sat Nov 25 20:27:08 CET 2006
> root@epia1:/usr/obj/sys/arch/i386/compile/RFK i386
>
> I have problem doing :
> cd /usr/src
> ./build.sh -m evbarm release
>
> # install /usr/src/obj/destdir.evbarm/dev/MAKEDEV
> cd /usr/src/etc/obj &&
> STRIP=3D/usr/src/obj/tooldir.NetBSD-4.99.4-i386/bin/arm--netbsdelf-strip =
/usr/src/obj/t
> ooldir.NetBSD-4.99.4-i386/bin/nbinstall -N /usr/src/etc -c -r -T etc_pk=
g -o
> root -g wheel -m 555 MAKEDEV
> /usr/src/obj/destdir.evbarm/dev
> nbinstall: MAKEDEV: stat: No such file or directory
No idea - someone port-arm@NetBSD.org may know.
Does
=09cd .../src/etc
=09nbmake-evbarm MAKEDEV
work? It seems that file's not there, while it should be created during=20
the build...
> BTW: I must have done something stupid: after reboot to new version,
> I can't switch consoles (<ctrl><alt><F[1-4]>)
Check
* your /etc/wscons.conf to have 'screen 1' to 'screen 4' enabled:
=09# Uncomment if a serial console is used.
=09#screen 0 - vt100
=09screen 1 - vt100
=09screen 2 - vt100
=09screen 3 - vt100
=09screen 4 - -
* your /etc/ttys to have gettys running on the virtual consoles:
=09ttyE0 "/usr/libexec/getty Pc" vt220 on secure
=09ttyE1 "/usr/libexec/getty Pc" vt220 on secure
=09ttyE2 "/usr/libexec/getty Pc" vt220 on secure
=09ttyE3 "/usr/libexec/getty Pc" vt220 on secure
Paths may be different if that's not on i386.
* your /etc/rc.conf to have 'wscons=3Dyes'
This assumes that you do use wscons as your console driver (which is the=20
default on most platforms). See also:=20
http://www.netbsd.org/guide/en/chap-cons.html
> 4. How do I cross compile packages? (maybe a stupid question, but could =
not
> find a hint for that in the handbook ...)
You can't. You'll have to build them natively.
Yes, this sucks - if you find a way to tell configure scripts to work with=
=20
cross compiling, let us know!
> 5. preferred way to put an application into a flash image:
> - compile from pkgsrc, leave files in /usr/pkg/...
> - or put into /bin, /usr/bin/ ...
That depends a bit on how you prepare the flash image. As you usually have=
=20
paths compiled into a binary (to config files, data files, etc. etc.)=20
moving files around is ***never*** a smart idea, though.
- Hubert
---1756158181-803022878-1164666293=:32351--