Skip to content

Conversation

@the-snowwhite
Copy link
Contributor

Sorry for being late on this one, parly due to 6 weeks sick leave plus extensive testing.
On the bright side updating to u-boot 2018.01 utilizing the (new) socfpga 4.9-rt-ltsi branch, makes
machinekit run very stable on armhf Stretch .. :-)

I intend to post an updated SD image soon. elsewhere...

I will keep an eye out this time for the package build to pass...
best whishes

…n make scrub_clean

Signed-off-by: Michael Brown (the-snowwhite) <producer@holotronic.dk>
Updated DE10_Nano config:
removed surplus reset lines and registerers
Fixes: compile errors, data errors due to timing latency.

Signed-off-by: Michael Brown (the-snowwhite) <producer@holotronic.dk>
Signed-off-by: Michael Brown (the-snowwhite) <producer@holotronic.dk>
@the-snowwhite
Copy link
Contributor Author

@cdsteinkuehler this time I have made certain that all the .rbf bitfiles build in the docker image.

@cdsteinkuehler cdsteinkuehler merged commit 7ec2eff into machinekit:master Mar 16, 2018
@the-snowwhite the-snowwhite deleted the DE10_Nano_upd branch March 16, 2018 14:21
@the-snowwhite
Copy link
Contributor Author

OK now Its complaining about a qsys compile error in the DE10 Nano project I'm looking into it now

@the-snowwhite the-snowwhite restored the DE10_Nano_upd branch March 16, 2018 15:33
@the-snowwhite the-snowwhite deleted the DE10_Nano_upd branch March 16, 2018 15:50
@the-snowwhite
Copy link
Contributor Author

@cdsteinkuehler
@ArcEye
I am unable to reproduce the travis build errors on my system.
docker run -itv $(pwd):/work cdsteinkuehler/jessie-quartus-15.1.2 /work/build.quartus.sh
works perfect and creates all the .rbf files
Manually building the DE10_Nano_FB project (with an updated firmware_id.mif file) also works flawlessly
and changes none of the git files.
I suspect that the online Travis build system is having some issues....
(the Vivado project is also having an issue with the docker pull command)

@ArcEye
Copy link
Contributor

ArcEye commented Mar 16, 2018

They use Jenkins jobs, but I had no part in setting them up.

@the-snowwhite (the Vivado project is also having an issue with the docker pull command)

Vivado fails with

$ docker inspect mhaberler/jessie-vivado-2015.4
04:55:37 Error: No such image, container or task: mhaberler/jessie-vivado-2015.4

I interrogated docker running on the server and it is not listed amongst the images

arceye@mah2:~$ docker images   
REPOSITORY                             TAG                 IMAGE ID            CREATED             SIZE
dovetailautomata/mk-cross-builder      amd64_9_custom      d303c39391cf        4 months ago        1.518 GB
dovetailautomata/mk-cross-builder      i386_9_custom       d678420df574        4 months ago        1.995 GB
dovetailautomata/mk-cross-builder      armhf_9_custom      7ec3e75ffb7c        4 months ago        1.857 GB
dovetailautomata/mk-cross-builder      amd64_8_custom      04eb2c3dabc7        4 months ago        1.25 GB
dovetailautomata/mk-cross-builder      i386_8_custom       64d80e42e6c7        4 months ago        1.584 GB
dovetailautomata/mk-cross-builder      armhf_8_custom      3aba5a72ef8f        4 months ago        1.482 GB
arceye/jekyll-asciidoctor              jenkins_1030_1032   2254a85b944e        4 months ago        4.277 GB
dovetailautomata/mk-cross-builder      armhf_9             c47f8f0054e3        5 months ago        1.857 GB
dovetailautomata/mk-cross-builder      i386_8              1255cfc6a11c        5 months ago        1.584 GB
dovetailautomata/mk-cross-builder      amd64_9             4cea1c0a94ca        5 months ago        1.518 GB
dovetailautomata/mk-cross-builder      armhf_8             84e890dcf98d        5 months ago        1.482 GB
dovetailautomata/mk-cross-builder      i386_9              19a3481968c5        5 months ago        1.995 GB
dovetailautomata/mk-cross-builder      amd64_8             eeddd4a08f04        5 months ago        1.25 GB
arceye/mk-cross-builder                raspbian            8b8a32e93727        5 months ago        1.618 GB
arceye/mk-cross-builder                armhf               43d0e8427ab1        5 months ago        1.572 GB
arceye/mk-cross-builder                i386                5cf617cd517d        5 months ago        1.704 GB
arceye/mk-cross-builder                amd64               225adce6bfbd        5 months ago        1.322 GB
arceye/mk-builder                      jessie-64           a1154665406c        5 months ago        1.348 GB
alpine                                 3.2                 f797d6d09a3d        6 months ago        5.269 MB
cdsteinkuehler/jessie-quartus-15.1.2   latest              47c93e2548ef        9 months ago        9.202 GB
haberlerm/docker-jekyll-asciidoctor    latest              b8ef32687ac0        20 months ago       4.248 GB

I am having problems finding anything to match in the mhaberler or haberlerm accounts in Docker.com

The only thing I can find is @dkhughes github repo to build the docker for vivado

Looks like it needs a new entry under <maintainer> as per the https://github.com/mhaberler/mksocfpga docs (and an image to go with it 😄 )

@ArcEye
Copy link
Contributor

ArcEye commented Mar 16, 2018

I am in the process of setting up a Xilinux account and downloading the pre-requisites for creating the docker jessie-vivado-2015.4

Know nothing about the code being compiled, but fairly familiar with docker creation, so see if @dkhughes instructions get me through

@the-snowwhite
Copy link
Contributor Author

OK .. Yes the builder says jenkins :-) , whats confusing me is the references to travis here:
https://github.com/machinekit/mksocfpga/tree/master/Scripts
and the https://github.com/machinekit/mksocfpga/blob/master/.travis.yml file

Do these files still serve any purpose or are they outdated ?

I'm thinking that the quartus qsys build error (in the DE10 Nano folder) may be some leftovers from former build attempts in a cache ?

@ArcEye
Copy link
Contributor

ArcEye commented Mar 16, 2018

Do these files still serve any purpose or are they outdated ?

No point removing them, in case it is desired to do it through Travis at some point later.

I'm thinking that the quartus qsys build error (in the DE10 Nano folder) may be some leftovers from former build attempts in a cache ?

Well we can test that. I will wipe the workspace and manually restart the build.
The Vivado build would fail definitely, but see what happens to the other one.

@ArcEye
Copy link
Contributor

ArcEye commented Mar 16, 2018

OK I have saved the previous output to a zip locally and wiped the workspace.

The build is at https://jenkins.machinekit.io/job/mksocfpga-quartus/25/ , we will see what happens

@the-snowwhite
Copy link
Contributor Author

the-snowwhite commented Mar 16, 2018

OK however I can narrow the Qsys issue down to these messages:

04:56:37 2018.03.16.03:56:37 Error: soc_system.altera_pll: Could not create a temporary work directory
04:56:37 2018.03.16.03:56:37 Error: soc_system.altera_pll: Please make sure that one of TMP, TEMP or HOME environment variables is set and that the directory is writable

2018.03.16.03:59:01 Error: qsys-generate failed with exit code 1: 2 Errors, 7 Warnings

The DE10 project is the only project that uses a pll addition, so if the reset does not work the remedy is here (fix missing temporary work directory):

Please make sure that one of TMP, TEMP or HOME environment variables is set and that the directory is writable

@the-snowwhite
Copy link
Contributor Author

Ups
I can see:

04:56:37 2018.03.16.03:56:37 Error: soc_system.altera_pll: Could not create a temporary work directory
04:56:37 2018.03.16.03:56:37 Error: soc_system.altera_pll: Please make sure that one of TMP, TEMP or HOME environment variables is set and that the directory is writable

2018.03.16.03:59:01 Error: qsys-generate failed with exit code 1: 2 Errors, 7 Warnings

and:

19:23:44 2018.03.16.18:23:44 Error: qsys-generate failed with exit code 1: 2 Errors, 7 Warnings
19:23:44 2018.03.16.18:23:44 Info: Finished: <b>Create HDL design files for synthesis</b>
19:23:44 Makefile:163: recipe for target 'stamp/qsys.stamp' failed
19:23:44 make[1]: *** [stamp/qsys.stamp] Error 3
19:23:44 make[1]: Leaving directory '/work/HW/QuartusProjects/DE10_Nano_FB_Cramps'
19:23:44 Makefile.Quartus:10: recipe for target 'HW/QuartusProjects/DE10_Nano_FB_Cramps/build.sh' failed
19:23:44 make: *** [HW/QuartusProjects/DE10_Nano_FB_Cramps/build.sh] Error 2

I suspect the issue is in:

TMP, TEMP or HOME environment variables ?

@the-snowwhite
Copy link
Contributor Author

All I can suggest is adding --user= to the docker build string which should add a HOME like this:

the image is set up with /home/builder so:

docker run --user=builder -itv $(pwd):/work cdsteinkuehler/jessie-quartus-15.1.2 /work/build.quartus.sh

I am now running a local build with that...

@ArcEye
Copy link
Contributor

ArcEye commented Mar 16, 2018

I will have to review it tomorrow, 'beer o'clock' here.

Will check your outcome and that of the rebuild then.

@the-snowwhite
Copy link
Contributor Author

the-snowwhite commented Mar 16, 2018

OK
BTW I'm getting ready to put a new Image online:
Mksoc Stretch with the latest socfpga 4.9.7x rt-ltsi kernel and uboot 2018.01.
This works much more stable with machinekit / uio / adc driver than the "flaky" last image I put out..

On a side note the socfpga-xxx debs need a stretch distribution... ?

@ArcEye
Copy link
Contributor

ArcEye commented Mar 16, 2018

I have made a stretch image for DE0-NANO, but only by the 'upgrade and capture to image' method
http://deb.machinekit.io/uploads/de0-nano/debian-9.2-console-armhf-2017-10-29
Think the kernel was the same as the Jessie one.

So a proper update would be good.

I don't know re the debs, have only used pre-built images and worked from there, but Stretch is
the mainstream Debian version now - so probably.

@the-snowwhite
Copy link
Contributor Author

the-snowwhite commented Mar 17, 2018

my local build (with --user=builder) completed without errors
Zzzz..

@ArcEye
Copy link
Contributor

ArcEye commented Mar 17, 2018

@the-snowwhite
HOME=/home/builder is set in the env vars.

I see you have access to Jenkins, you will need to look at the output and the produced .rbf files (which look to be the full set) and see if you can see what is going wrong.

The builder does not launch the docker externally as you were doing, but appears to be running
the scripts from an interactive session within the docker.

I would have thought it far simpler to script it as you are doing, albeit the references to /work are puzzling me, since the dir has not been created so I am not sure where all this is supposed to be running.

I don't have Quartus installed and cannot test locally

@ArcEye
Copy link
Contributor

ArcEye commented Mar 17, 2018

I am in the process of setting up a Xilinux account and downloading the pre-requisites for creating the docker jessie-vivado-2015.4
Know nothing about the code being compiled, but fairly familiar with docker creation, so see if @dkhughes instructions get me through

That didn't work.
I have downloaded the installer etc, but when it comes to getting a licence, that only works on the installed machine, so the installation would have to be on the server.

Leads me to think the vivado docker image was local only.

@the-snowwhite
Copy link
Contributor Author

the-snowwhite commented Mar 17, 2018

The work folder is a reference to the folder you are in when you run the docker image ie:
cd mksocfpga
docker run ....-itv $(pwd):/work ...
in the docker image /work then references to mksocfpga (external )dir.

I have not worked with the Vivado stuff yet so I have no clues there.

@the-snowwhite
Copy link
Contributor Author

Yes I do have access and came to trigger a build.. have to wait for it to finish.

I have now made a copy of the jenkins project to play with.
How does the output(the .deb ) get passed on
Is there stuff I have to disable before I trigger a build in the new copy.?

@ArcEye
Copy link
Contributor

ArcEye commented Mar 17, 2018

So long as you work on a copy under a different name, it will not trigger anything.

The mksocfpga-packaging-quartus build is linked to the successful finish of the mksocfpga-quartus build like so

selection_042

@ArcEye
Copy link
Contributor

ArcEye commented Mar 17, 2018

Probably best to remove the post-build actions from your copy too, so as not to muddy the waters by trying to set a commit status in github.

@the-snowwhite
Copy link
Contributor Author

OK I removed the post build actions.

However the main culprit is missing write permissions to a TMP directory or the HOME dir, for the ruin job.
How to enable this write permission from the jenkins control panel ?
or where to create / mount a TMP folder on the server ?
(I would think its about folder permissions)

@ArcEye
Copy link
Contributor

ArcEye commented Mar 17, 2018

The env vars for the job are

QSYS_ROOTDIR=/home/builder/altera_lite/15.1/quartus/sopc_builder/bin
ALTERAOCLSDKROOT=/home/builder/altera_lite/15.1/hld
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/builder/altera_lite/15.1/quartus/bin:/home/builder/altera_lite/15.1/quartus/sopc_builder/bin
HOME=/home/builder

However if you look on the server, there is no user dir /home/builder and that is not in the workspace, so I don't know how it runs at all ☹️

You could create a TMP folder in the script before the build line, pass it as an env var with open permissions.
Trouble is the error is coming from Altera not Jenkins, so I don't even know if it runs in the same environment. esp. as it complains of no HOME setting, when it has been set.

@the-snowwhite
Copy link
Contributor Author

Yes
It seems like adding this to the build works:

mkdir -p /work/tempfiles

export TMP=/work/tempfiles
export TEMP=/work/tempfiles

I have now triggered a new build

@the-snowwhite
Copy link
Contributor Author

Docker Build now compiles successfully.
Next this packaging issue:

$ docker pull mhaberler/ubker
Failed to pull Docker image mhaberler/ubker
FATAL: Failed to pull Docker image mhaberler/ubker
java.io.IOException: Failed to pull Docker image mhaberler/ubker

There is an updated version here:
https://github.com/dkhughes/ubker-docker

How to proceed
I have a docker hub account ... try to build it and hang it up there ?

@ArcEye
Copy link
Contributor

ArcEye commented Mar 18, 2018

Well done.
It is downright peculiar that it should require this now though.

I will try building the dockerfile in a while and can host it if successful.
My concern is whether the toolchains are still available, we shall see.

@ArcEye
Copy link
Contributor

ArcEye commented Mar 18, 2018

Just checked and the toolchain is still available on the same URL

Will let you know how it goes.

@ArcEye
Copy link
Contributor

ArcEye commented Mar 18, 2018

I have built an image and used that in the mksocfpga-packaging-quartus builder.

That succeeds in building the deb, but falls over on the upload.
If worst comes to worst I can manually add to the deb repo.

Needs user with uid 1030: gid 1032 from what I recall, if it is done inside a docker.
Now building another image with those set, to see if this can be fixed.

Jenkins is playing up in other ways, every time you save the configuration there is a huge java error trace message, but it seems to do the save operation OK.

@ArcEye
Copy link
Contributor

ArcEye commented Mar 18, 2018

Hurrah,
At 4th attempt managed to get UID/GID/USR sorted inside the docker, so it could use the upload script.

The deb is now in the repo
http://deb.machinekit.io/debian/pool/main/s/socfpga-rbf/ at socfpga-rbf_3.192_all.deb

@dkhughes is going to make a new docker image for the mksocfpga-vivado build in a couple of weeks.
There is apparantly a new non-licence version of Xilinx available, which will greatly simplify the dockers use, but will require other changes.

@the-snowwhite
Copy link
Contributor Author

@ArcEye
Thank you very much for your help.
Since it doesnt appear in the stretch repo..
I just fetched the package with wget and then sudo dpkg -i after purging my old socfpga-rbf packet and removing the /lib/firmware/socfpga folder.
No biggie.
Works flawlessly on my new ox openbuilds router .. albet are making some adjustments to my capsense based mill-bit probe.
Right now it's acting like an proximity sensor triggering about 5mm ABOVE the plate .. :-) cheers

@ArcEye
Copy link
Contributor

ArcEye commented Mar 20, 2018

It does not appear in the Stretch repo, because the Jenkins builder was only set up for Jessie.
I have added an upload for Stretch.

However this has uncovered a problem in debrepro, whereby it is convinced that a previous non-identical instance of the same package exists and refuses to update because the checksums do not match.
This despite the fact that the package is not physically present or in the package lists.

I think it may be time to back-up the whole repo and then wipe it all and add the packages back.
I had this problem before with reprepro, it seems to cache things somewhere and get its knickers in a twist as to what exists and what does not.
May be a problem with it being on a server which is always up, so cached info does not get destroyed by reboot? Who knows.

Update:
Just found the Packages.db file is corrupted, contains references to the package which in not in the repo, so rebuild it is.

@ArcEye
Copy link
Contributor

ArcEye commented Mar 20, 2018

The repo is now fixed.

socfpga-bit and socfpga-rbf packages are now available for both Jessie and Stretch.

Just need to do an apt update first, as all the Packages files etc have changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants