Search ARMWorks Answers

Loading...

Monday, January 2, 2012

Wingston at WorkshopIndia has been writing a great blog and tutorial on Pengutronix and the Mini2440 and more. Following his tutorial looked like a quick way to get started, and it was. When I began the first steps of the process of getting the ptxdist (Pengutronix Dist) started, I had to apt-get piles of stuff that was not in the Ubuntu install.

Unlike Fedora and some others, Ubuntu does not have an option to install a full development version with tools. The trick is to run

apt-get install build-essentials

and maybe some other things. Wingston has added a line to the tutorial that will install all the needed tools on Ubuntu. Aside from some of the usual frustrations of downloading with a browser and moving files with the terminal command line, everything went quite smoothly. Note: I used all the latest versions of tools and source despite the latest version of gcc not being in the compatibility matrix for Pengutronix Mini2440. I used a "force" option at one point when the ptxdist setup offered it as a way to use a non-specified version of gcc. When cross compiler tool build ran, it chunked away echoing great masses of stuff to the terminal for 80 minutes, and finished with no errors! It would have been faster with a better Internet connection. At least half that time is spent downloading files. I now had the Pengutronic BSP and tool chains for cross compiling to the Mini2440 all built.

I would have continued, but ran into a problem with permissions and left it till Sunday afternoon. In the tutorial, you create a directory for the BSP in /home/BSP and I either missed something or made a mistake during installation. Firefox would not download to the directory and ptxdist gave an error when trying to create directories. If you try to run ptxdist as root, it will give an error. It refuses to run as root, which is a good thing.

I had forgotten that the permissions for my user account did not include /home, only /home/myUser. On the advice of an experience Ubuntu user (thanks Seppoz), I did a quick

~$sudo chown -R myUser /home/BSP

and all was well with the world. After a simple configuration for LCD type and IP addresses and boot method, I was able to command 

~$ptxdist go

and off it went! Biding Wingston's advice in his tutorial, I stayed within range to see if things stopped, and they did, about 4 times. Each stop was because a file to be downloaded could not be found - error 404. It was easy to copy the file name and Google for it. I found most in Fedora repositories, and now that Firefox would download to /BSP, it was easy to drop them directly to the /src directory shown in the stoppages. Another ptxdist go and it starts where it quit. A little over 90 minutes and it was done. Again error free! And in an images directory sat barebox and the kernel and file system. Woohoo! It would have taken maybe half the time with faster Internet and me noticing things had stopped instead of reading tables of ballistic coefficients for another project.

Note that the commands are given from inside /home/BSP/long-name-of-bsp-directory .

So far this is the best Linux experience I have ever had :-) I think I configured correctly to load the bootloader over tftp and everything else will be NSF. Hmm. Now I haver to check on that. Anyway, assuming it runs on the Mini, everything is sweetness and light. If it doesn't, I'll revise my opinion about best -- experience -- ever.

Would I do anything differently? Yes, I would put the BSP in my user directory so there were no confusions over permissions. However, if you change the ownership as above in the beginning, it will be painless as is. It is definitively awesome that you can assemble a new computer, install Ubuntu, build cross development tools and BSP, and generate a new Linux for the Mini2440 in a day. More details as testing continues!

No comments:

Post a Comment