tech-embed archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Crosscompiling - Olimex EP9301



On Mon, 27 Nov 2006, Richard Kästner 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 someone on tech-kern@ could help you further.

The general idea is that the files.* files tell what devices exist and can be used by a certain architecture, and that the kernel config file then tells which device drivers really to build into the kernel. For each architecture, there's a std.<whatever> file in the 'conf' directory that pulls in in those files.* files that the architecture supports - see all 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 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=/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_pkg -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@localhost may know.
Does

        cd .../src/etc
        nbmake-evbarm MAKEDEV

work? It seems that file's not there, while it should be created during 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:

        #  Uncomment if a serial console is used.
        #screen 0       -       vt100
        screen  1       -       vt100
        screen  2       -       vt100
        screen  3       -       vt100
        screen  4       -       -

 * your /etc/ttys to have gettys running on the virtual consoles:

        ttyE0  "/usr/libexec/getty Pc"         vt220   on secure
        ttyE1   "/usr/libexec/getty Pc"         vt220   on secure
        ttyE2   "/usr/libexec/getty Pc"         vt220   on secure
        ttyE3   "/usr/libexec/getty Pc"         vt220   on secure

   Paths may be different if that's not on i386.

 * your /etc/rc.conf to have 'wscons=yes'

This assumes that you do use wscons as your console driver (which is the default on most platforms). See also: 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 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 paths compiled into a binary (to config files, data files, etc. etc.) moving files around is ***never*** a smart idea, though.


 - Hubert


Home | Main Index | Thread Index | Old Index