On Wednesday 11 October 2017 06:26:52 Erik Christiansen wrote:
> On 09.10.17 14:53, Gene Heskett wrote:
> > Now, right now, I need the command line option to make "make" about
> > 100x as verbose so I can trace an attempted build of a rock64
> > version of hm2_rpspi to see where its failing.
> >
> > This is not a heck of a lot to go on:
> >
> > rock64@rock64:~/linuxcnc-dev/src$ make
> > Reading 190/190 dependency files
> > Done reading dependencies
> > Reading 197/198 realtime dependency files
> > Done reading realtime dependencies
> > Linking ../rtlib/hm2_rkspi.so
> > ld: no input files
> > Makefile:997: recipe for target '../rtlib/hm2_rkspi.so' failed
> > make: *** [../rtlib/hm2_rkspi.so] Error 1
>
> In the past, I've found "make -d" to be useful, but you might be
> better off refining that.
>
> > I need to see whats up that leads to the link error.
>
> In the above context, "make --debug=j" might be a more focussed way to
> go, as you need to know why ld's invocation is lacking any files to
> link.
>
And that does seem to be the ticket, thanks. See below.
> If you have time to post progress info, we might be able to offer
> further help to bend the length of fencewire to better catch the
> wayward chook.
>
> Erik
>
Heres the drivers/mesa-hostmot2 directory as built:
rock64@rock64:/media/slash/home/rock64/linuxcnc-dev/src/hal/drivers/mesa-hostmot2$
ls
abs_encoder.c ChangeLog firmware hm2_7i90.h hm2_pci.h hm2_test.h
ioport.c pktuart.c README sserial.c tp_pwmgen.c
bitfile.c doc hm2_7i43.c hm2_eth.c hm2_rpspi.c hostmot2.c
lbp16.h pktuart_errno.h resolver.c sserial.h tram.c
bitfile.h dpll.c hm2_7i43.h hm2_eth.h hm2_spi.c hostmot2.h
led.c pwmgen.c setsserial.c stepgen.c uart.c
bspi.c encoder.c hm2_7i90.c hm2_pci.c hm2_test.c
hostmot2-lowlevel.h pins.c raw.c spi_common_rpspi.h TODO
watchdog.c
spi_common_rpspi.h and hm2_rpspi.c are the two files that need copied to
spi_common_rkspi.h and hm2_rkspi.c, with the code mods that would adapt
them to the rk3368 SoC.
I have some modded files in another tree on sd media that I'll copy into
this tree now. But make --debug=j does not see them, hence no error
reported. So edit the top level Makefile to include the hm2_rkspi-objs.
make --debug=j now shows:
Reading 190/190 dependency files
Done reading dependencies
Reading 197/197 realtime dependency files
Done reading realtime dependencies
Putting child 0x55931ba6b0 (../bin/tooledit) PID 13636 on the chain.
Live child 0x55931ba6b0 (../bin/tooledit) PID 13636
Reaping winning child 0x55931ba6b0 PID 13636
Live child 0x55931ba6b0 (../bin/tooledit) PID 13637
Reaping winning child 0x55931ba6b0 PID 13637
Live child 0x55931ba6b0 (../bin/tooledit) PID 13639
Reaping winning child 0x55931ba6b0 PID 13639
Live child 0x55931ba6b0 (../bin/tooledit) PID 13641
Reaping winning child 0x55931ba6b0 PID 13641
Live child 0x55931ba6b0 (../bin/tooledit) PID 13643
Reaping winning child 0x55931ba6b0 PID 13643
Removing child 0x55931ba6b0 PID 13643 from chain.
Putting child 0x5592af9c30 (../bin/ngcgui) PID 13644 on the chain.
Live child 0x5592af9c30 (../bin/ngcgui) PID 13644
Reaping winning child 0x5592af9c30 PID 13644
Live child 0x5592af9c30 (../bin/ngcgui) PID 13645
Reaping winning child 0x5592af9c30 PID 13645
Live child 0x5592af9c30 (../bin/ngcgui) PID 13647
Reaping winning child 0x5592af9c30 PID 13647
Live child 0x5592af9c30 (../bin/ngcgui) PID 13649
Reaping winning child 0x5592af9c30 PID 13649
Live child 0x5592af9c30 (../bin/ngcgui) PID 13651
Reaping winning child 0x5592af9c30 PID 13651
Removing child 0x5592af9c30 PID 13651 from chain.
Putting child 0x55931db8a0 (../bin/pyngcgui) PID 13652 on the chain.
Live child 0x55931db8a0 (../bin/pyngcgui) PID 13652
Reaping winning child 0x55931db8a0 PID 13652
Live child 0x55931db8a0 (../bin/pyngcgui) PID 13654
Reaping winning child 0x55931db8a0 PID 13654
Live child 0x55931db8a0 (../bin/pyngcgui) PID 13656
Reaping winning child 0x55931db8a0 PID 13656
Live child 0x55931db8a0 (../bin/pyngcgui) PID 13658
Reaping winning child 0x55931db8a0 PID 13658
Live child 0x55931db8a0 (../bin/pyngcgui) PID 13660
Reaping winning child 0x55931db8a0 PID 13660
Removing child 0x55931db8a0 PID 13660 from chain.
Putting child 0x55931db560 (../bin/gremlin_view) PID 13661 on the chain.
Live child 0x55931db560 (../bin/gremlin_view) PID 13661
Reaping winning child 0x55931db560 PID 13661
Live child 0x55931db560 (../bin/gremlin_view) PID 13662
Reaping winning child 0x55931db560 PID 13662
Live child 0x55931db560 (../bin/gremlin_view) PID 13664
Reaping winning child 0x55931db560 PID 13664
Live child 0x55931db560 (../bin/gremlin_view) PID 13666
Reaping winning child 0x55931db560 PID 13666
Live child 0x55931db560 (../bin/gremlin_view) PID 13668
Reaping winning child 0x55931db560 PID 13668
Removing child 0x55931db560 PID 13668 from chain.
Putting child 0x55931da750 (../bin/halshow) PID 13669 on the chain.
Live child 0x55931da750 (../bin/halshow) PID 13669
Reaping winning child 0x55931da750 PID 13669
Live child 0x55931da750 (../bin/halshow) PID 13670
Reaping winning child 0x55931da750 PID 13670
Live child 0x55931da750 (../bin/halshow) PID 13672
Reaping winning child 0x55931da750 PID 13672
Live child 0x55931da750 (../bin/halshow) PID 13674
Reaping winning child 0x55931da750 PID 13674
Removing child 0x55931da750 PID 13674 from chain.
Putting child 0x5593200d10 (default) PID 13675 on the chain.
Live child 0x5593200d10 (default) PID 13675
You now need to run 'sudo make setuid' in order to run in place with
access to hardware.
Reaping winning child 0x5593200d10 PID 13675
Removing child 0x5593200d10 PID 13675 from chain.
rock64@rock64:/media/slash/home/rock64/linuxcnc-dev/src$
which is nothing but noise...
Found another place in the Makefile I needed to add it did, now get all
the above +:
make: *** No rule to make
target 'objects/rthal/drivers/mesa-hostmot2/hm2_rkspi.o', needed
by '../rtlib/hm2_rpspi.so'. Stop.
That looks like a typu. Was, one more place in the Makefile I had to fix
a typu.
Now that actually gets me all the errors encountered while trying to
build it.
:
hal/drivers/mesa-hostmot2/hm2_rkspi.c:72:20: error: expected declaration
specifiers or ‘...’ before string constant
MODULE_MODS_AUTHOR("GHeskett")
^~~~~~~~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:107:2: error: expected ‘,’ or ‘}’
before ‘RK_64’
RK_64 // For a Rock64
^~~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:523:36: error: unknown type
name ‘hm2_RKSPI_t’
static inline void spi0_xfer_setup(hm2_RKSPI_t *hm2, bool rd)
^~~~~~~~~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c: In
function ‘hm2_rkspi_write_spi0’:
hal/drivers/mesa-hostmot2/hm2_rkspi.c:553:2: warning: implicit
declaration of function ‘spi0_xfer_setup’
[-Wimplicit-function-declaration]
spi0_xfer_setup(hm2, false);
^~~~~~~~~~~~~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c: In function ‘peripheral_map’:
hal/drivers/mesa-hostmot2/hm2_rkspi.c:914:7: error: ‘RK_64’ undeclared
(first use in this function)
case RK_64
^~~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:914:7: note: each undeclared
identifier is reported only once for each function it appears in
hal/drivers/mesa-hostmot2/hm2_rkspi.c:915:3: error: expected ‘:’ or ‘...’
before ‘membase’
membase += RK3328_OFFSET
^~~~~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:915:14: error: ‘RK3328_OFFSET’
undeclared (first use in this function)
membase += RK3328_OFFSET
^~~~~~~~~~~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:916:2: error: expected ‘;’
before ‘default’
default:
^~~~~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:909:2: warning: case value ‘1’ not
in enumerated type ‘platform_t {aka enum <anonymous>}’ [-Wswitch]
case RPI_1:
^~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:911:2: warning: case value ‘2’ not
in enumerated type ‘platform_t {aka enum <anonymous>}’ [-Wswitch]
case RPI_2: // for RPI 3 too
^~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c: In function ‘check_platform’:
hal/drivers/mesa-hostmot2/hm2_rkspi.c:1102:18: error: ‘RK_64’ undeclared
(first use in this function)
platform_t rv = RK_64;
^~~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:1155:30: error: ‘nv’ undeclared
(first use in this function)
rtapi_print_msg(RKSPI_ERR, nv"\n");
^~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:1155:32: error: expected ‘)’ before
string constant
rtapi_print_msg(RKSPI_ERR, nv"\n");
^~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:1153:1: warning: label ‘check_exit’
defined but not used [-Wunused-label]
check_exit:
^~~~~~~~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:1100:9: warning: unused
variable ‘fsize’ [-Wunused-variable]
size_t fsize;
^~~~~
hal/drivers/mesa-hostmot2/hm2_rkspi.c:1098:8: warning: unused
variable ‘fp’ [-Wunused-variable]
FILE *fp;
^~
embarrassing, way too long since I've carved any C. I did get rid of the
2nd error, missing , in an enum statement, but many of the errors are
only going to be squashed by a proper include file for the rockchip.
Something I have not been able to extract with forum postings yet.
Any light you can shed will be appreciated, a lot.
Now, I've got to go feed the missus & reload the dishwasher.
Thanks Erik.
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users