UART1 on Rev C2 BeagleBoard

Has anyone set the pin mux to activate UART1 on the J5 LCD connector of the rev C2 BeagleBoard?

If so, can you please share your experience. Was it done in u-boot or the kernel?

OK, so I identified the changes I need to make (see here.) Now I just
need to understand how/where to apply theses changes and rebuild the
kernel with bitbake.

Is there a link somewhere that explains how to make local
modifications to the kernel and to figure out exactly what's being
built?

I've got 2.6.28 and 2.6.29 variants and I have no idea what's
determining what gets build.

Bob

Sorry about that, editor striped out the link--link to required changes:

http://wh1t3s.com/2009/05/06/enabling-uart1-on-rev-c2-beagleboard/

Wed, 6 May 2009, Bob White wrote:

OK, so I identified the changes I need to make (see here.) Now I just
need to understand how/where to apply theses changes and rebuild the
kernel with bitbake.

http://wh1t3s.com/2009/05/06/enabling-uart1-on-rev-c2-beagleboard/

Sorry, I didn't have time to check those modification but remember to enable CONFIG_OMAP_MUX if you plan to do mux config in kernel. Otherwise omap_cfg_reg() won't do a thing.

You could do these configs also within U-Boot. To change muxing, all you need to do is edit file board/omap3/beagle/beagle.c (single line for each ball) and leave CONFIG_OMAP_MUX disabled.

Thanks, Antii, for the CONFIG_OMAP_MUX info–that would’ve got me.

I am still trying to figure out exactly how to apply my changes and rebuild the kernel, or u-boot, in the OE environment. Any words of advice?

I’ve already built a custom image with my own app added, I just don’t understand OE enough to know where or how to make local changes that aren’t overwritten when bitbake is run again.

Bob

Any assistance would be appreciated.

Thu, 7 May 2009, Bob White wrote:

Thanks, Antii, for the CONFIG_OMAP_MUX info--that would've got me.

After enabling that one I had problems mounting rootfs from SD card on Beagle rev C. Check pin muxing also for SD card write protect signal if you encounter any troubles with SD/MMC. GPIO for MMC WP was changed to another between rev B and C.

I am still trying to figure out exactly how to apply my changes and rebuild the kernel, or u-boot, in the
OE environment. Any words of advice?

Check these:
  http://groups.google.com/group/beagleboard/browse_thread/thread/b8d0e0a10d4d5a11/51bd45358eb9d7d7
  http://groups.google.com/group/beagleboard/browse_thread/thread/f9edc50ba03c94a6/e71e0f6b82017e4c

I have been building my kernels manually for now but I guess I'll be moving to OE/bitbake soon. I've been saving those URLs for that day :slight_smile:

Thanks, again. I’ve looked at those, but the paths are all different and I still don’t understand how to rebuild the kernel. The only place I find the source code is:

${OETREE}/angstrom-dev/staging/beagleboard-angstrom-linux-gnueabi/kernel/

And when I rerun bitbake it overwrites the mods I made to the source files in the staging folders.

But the u-boot mods looks much simpler–I’ve updated http://wh1t3s.com/2009/05/06/enabling-uart1-on-rev-c2-beagleboard/ to reflect u-boot pin mux changes needed to setup UART1 on J4/J5–see the end of the post.

I find the u-boot sources here:

${OETREE}/tmp/work/beagleboard-angstrom-linux-gnueabi/u-boot-2009.03+r22+gitr2dea1db2a3b7c12ed70bbf8ee50755089c5e5170-r22/git/

How do I then rebuild u-boot without overwriting the mods I just made?

Bob

Rerun it how? When I rerun the compile step it doesn't overwrite anything.

regards,

Koen

Hi Koen,

I think the main problem is that people don’t know all the different options of running bitbake

I.e. in order to: Only compile – Only update source – Only build a root file system, etc.

The main part of people just do “bitbake console-image” or similar and hope for the best… J

We miss some kind of general overview of how to get started/do actual daily development in OE.

Does any great/short/easy document/wiki/blog on this exist?

Søren

And when I rerun bitbake it overwrites the mods I made to the source files in the staging folders.

Rerun it how? When I rerun the compile step it doesn’t overwrite anything.

I ran ‘bitbake virtual/kernel’

Bob

The default ‘local.conf’ includes the line ‘INHERIT += " rm_work "’ which removes the source after everything has been compiled and deployed–this leads to a lot of confusion when reading posts that say the source can be found in ‘tmp/work…’ or ‘angstrom-dev/work…’.

Other confusion came from all the various images I had left over in deploy folder based on the preparatory work I’d done before my beagleboard arrived, orienting myself to OE and angstrom.

So, for those who are interested, problem solved, here’s how:

Start with a fresh OE/Angstrom install following these directions. (http://www.angstrom-distribution.org/building-%C3%A5ngstr%C3%B6m)

I did port over my local overlay as described here (http://wh1t3s.com/2009/05/04/adding-a-local-recipe-to-angstrombeagleboard), adding ‘${OETREE}/local/recipes//.bb’ to the BBFILES assigment in the ‘local.conf’ file. I did this to include my app, not to update u-boot. I did this before invoking any bitbake commands in the links mentioned above.

I then performed a bitbake of my own image, from my local overlay (which builds on console-image) with:

$ bitbake cmma-ptrp-image

This ran for a few hours and completed successfully. Since I was then unable to find the u-boot source code under ‘${OTREE}/angstrom-dev/work…’ (I suspect due to the default use of the rm_work task) I ran the following:

$ bitbake -f -c compile -b recipes/u-boot/u-boot_git.bb

I then found the u-boot source in:

${OETREE}/angstrom-dev/work/beagleboard-angstrom-linux-gnueabi/u-boot-2008.10+r22+gitrb7038cff739684bb95853eb5bee924c2574a222e-r22/git

After making the pin mux modifications in board/omap3/beagle/beagle.c I ran the following:

$ bitbake -f -c compile -b recipes/u-boot/u-boot_git.bb
$ bitbake -f -c deploy -b recipes/u-boot/u-boot_git.bb

I was then able to copy ‘u-boot-beagleboard.bin’ in ‘${OETREE}//angstrom-dev/deploy/glibc/images/beagleboard’ to my SD card.

After rebooting the beagleboard and logging in, the command:

$ cat /etc/services > /dev/ttyS0

resulted in a wiggly line on the scope connected to pin 15 of J5 on the beagleboard, the UART1_TX line.

Thanks for all the help.

Bob