Re: [beagleboard] How do I actually use Uboot and uEnv.txt?

6,910 views
Skip to first unread message

Robert Nelson

unread,
Apr 5, 2013, 7:16:21 PM4/5/13
to beagl...@googlegroups.com
On Fri, Apr 5, 2013 at 2:51 PM, <josh...@gmail.com> wrote:
> I need to change the resolution of my display , and I have seen a lot of
> topics about modifying a line in the uEnv.txt file. But how do I actually
> do that? By which I mean how do I access the uEnv.txt file in order to
> modify it?

uEnv.txt is just a file located in the boot (fat) small partition..

*normally* there is a variable called dvimode: (it might even be
commented out with a "#")
dvimode=1280x720MR-16@60
=======^^^^^=^^^^
change those numbers to the resolution your monitor supports..)

> If I understand everything right, the uEnv.txt is part of uBoot, which is a
> bootstrap loader that tells my SD card how to boot my OS image on an
> embedded chip. And I was also under the impression that I can press and
> hold the User button after I power on the board in order to access uBoot.
> But when do that, nothing happens.

Just hold down "any" key over the serial terminal via booting.. (if
your using minicom and it doesn't work, you didn't configure it
correctly.. so use "gtkterm" instead. ;) )

> I used a precompiled kernel in order to
> install the OS, which is Ubuntu 12.04. Could that be my problem?
>
> I apologize if this has been asked before, but I have been searching for
> days and have come up empty.

With a forum/irc/google, there is no reason to search for days...

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

Robert Nelson

unread,
Apr 5, 2013, 7:58:31 PM4/5/13
to beagl...@googlegroups.com
On Fri, Apr 5, 2013 at 6:56 PM, <josh...@gmail.com> wrote:
> Thanks for the response. I guess my question now is how do I get to the
> serial terminal? When I boot my board, it just flashes an orange screen for
> a few seconds before Ubuntu starts. I expect you mean I should see
> something like the Grub boostrap when I restart my main computer, but I just
> don't see it on the beagleboard. Does this mean that I don't have Uboot
> configured properly, or am I thinking about this wrong?

Connect a serial (usb/rs232/etc) port up between your board and your pc...

Gerald Coley

unread,
Apr 5, 2013, 7:59:16 PM4/5/13
to beagl...@googlegroups.com
You can connect a serial cable to the board and run a terminal emulation program like TeraTerm on your PC.

Gerald



On Fri, Apr 5, 2013 at 6:56 PM, <josh...@gmail.com> wrote:
Thanks for the response.  I guess my question now is how do I get to the serial terminal?  When I boot my board, it just flashes an orange screen for a few seconds before Ubuntu starts.  I expect you mean I should see something like the Grub boostrap when I restart my main computer, but I just don't see it on the beagleboard.  Does this mean that I don't have Uboot configured properly, or am I thinking about this wrong?

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Gerald
 

Gerald Coley

unread,
Apr 5, 2013, 8:09:37 PM4/5/13
to beagl...@googlegroups.com
Yes. Have you read the System Reference Manual for your board? It tells you how to do this.

Gerald


On Fri, Apr 5, 2013 at 7:07 PM, <josh...@gmail.com> wrote:
When you say "serial cable" do you mean standard USB or something like an RS-232 cable? 

Robert Nelson

unread,
Apr 5, 2013, 9:09:04 PM4/5/13
to beagl...@googlegroups.com
On Fri, Apr 5, 2013 at 8:00 PM, <josh...@gmail.com> wrote:
> If by system reference manual you mean
> http://beagleboard.org/static/BBSRM_latest.pdf then yes. I am looking at
> section 12, which I believe has the information that I need, I am just still
> having a bit of trouble.
>
> I have an RS-232 cable going from my beagleboard to a USB port in my laptop.
> Using putty (what I normally use) I set the baud rate, parity, etc to what
> is specified by the manual.
> 115200 baud rate
> 8 data bits
> 1 stop bits
> No parity
> No flow control (I don't have an option for none, but I am using XON/XOFF
> which has worked as none in the past)
>
> I power on the beagleboard and try to connect, but nothing ever happens. I
> guess I am still missing a setting?

Probally, 115200 8 n 1 is correct, give gtkterm/terraterm a try...

> (This seems like a lot of hassle just to change the resolution of my
> display. Why is this any different from using xrandr in Ubuntu?)

We haven't fully transitioned to "omapdrm" which would allow that.. So
we are stuck with setting the resolution on bootup...

Gerald Coley

unread,
Apr 5, 2013, 9:11:46 PM4/5/13
to beagl...@googlegroups.com, josh...@gmail.com
Can you take a moment and register so I don't keep getting pinged by your posts and have to approve them? Once registered you posts will go right through.

Gerald


On Fri, Apr 5, 2013 at 8:06 PM, <josh...@gmail.com> wrote:
Oh and one more question.  Once I figure out how to access the terminal and edit the uEnv.txt to change my resolution, will I have to recompile the kernel or would a simple reboot do the trick?

Last semester I was learning Minix, it took at least four hours to recompile the system kernel.


On Friday, April 5, 2013 9:00:27 PM UTC-4, josh...@gmail.com wrote:
If by system reference manual you mean http://beagleboard.org/static/BBSRM_latest.pdf then yes.  I am looking at section 12, which I believe has the information that I need, I am just still having a bit of trouble.

I have an RS-232 cable going from my beagleboard to a USB port in my laptop.  Using putty (what I normally use) I set the baud rate, parity, etc to what is specified by the manual.
  115200 baud rate
  8 data bits
  1 stop bits
  No parity
  No flow control (I don't have an option for none, but I am using XON/XOFF which has worked as none in the past)

I power on the beagleboard and try to connect, but nothing ever happens.  I guess I am still missing a setting?

(This seems like a lot of hassle just to change the resolution of my display. Why is this any different from using xrandr in Ubuntu?) 

On Friday, April 5, 2013 8:10:01 PM UTC-4, josh...@gmail.com wrote:
Ah, didn't see the other post.  Thanks for the help


On Friday, April 5, 2013 8:07:46 PM UTC-4, josh...@gmail.com wrote:
When you say "serial cable" do you mean standard USB or something like an RS-232 cable? 

On Friday, April 5, 2013 7:59:16 PM UTC-4, Gerald wrote:

Robert Nelson

unread,
Apr 5, 2013, 9:13:17 PM4/5/13
to beagl...@googlegroups.com
On Fri, Apr 5, 2013 at 8:06 PM, <josh...@gmail.com> wrote:
> Oh and one more question. Once I figure out how to access the terminal and
> edit the uEnv.txt to change my resolution, will I have to recompile the
> kernel or would a simple reboot do the trick?

It's a kernel parameter.. (dvimode is the common
angstrom/ubuntu/u-boot used variable name) So no "rebuilding" is
required..
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/OMAP/DSS#n307

Erik Dahlinghaus

unread,
Apr 5, 2013, 11:37:18 PM4/5/13
to beagl...@googlegroups.com

Instead of catching u-boot, you can just edit the file uEnv.txt (Or create one) on the same partition as u-boot. Traditionally that is on the smaller FAT partition on the SD card. This file is read by u-boot and functions the same (correct me if I'm wrong) as passing arguments to u-boot at boot time.

On Apr 5, 2013 10:28 PM, "Josh Kurland" <josh...@gmail.com> wrote:
Sorry about that, hopefully I am logged in now.

Using GTKTerm I managed to communicate once, though I am not able to do it again.  Not sure what I did the first time; I was under the impression that I should just be able to view uboot on my terminal without having to press anything.  I may just have to reset my com port or something.

Once I am in the terminal, how do I navigate and edit the uEnv file?  

And hopefully for my last question.  When I accessed the terminal, I was sort of button mashing the user button and the beagleboard's keyboard before I saw anything appear on my serial termin

--

Josh Kurland

unread,
Apr 6, 2013, 2:56:27 PM4/6/13
to beagl...@googlegroups.com
Thanks for the suggestion, but my problem is that I am completely unfamiliar with using this file system.  All of the related content I see on the web is about how to set up an SD card or do this or that to uEnv file, but my SD card is set up already and I don't know how to actually edit the uEnv file.  Could you point me to a good tutorial that explains how to actually perform this action?  I'm still a student and I don't have a whole lot of experience with these things.  Is there such a thing as a Beagleboard for dummies guide?  Thanks for the help

Josh Kurland

unread,
Apr 8, 2013, 5:34:08 PM4/8/13
to beagl...@googlegroups.com
I figured out an 'alternate' way of modifying the boot source directly and modifying the line to " omapfb.mode=dvi:640x480MR-16@60".  However my system still starts up in the standard 1280x720 display.

The steps I took to change this line was to mount the SD card file system on my laptop, and then edited the boot.script file in /boot.  Then I used the command mkimage -A arm -T script -C none -n "Boot Image" -d boot.script boot.scr to make the boot source.  

Is there anything else I am missing?  Here is my boot.scr 

fatload mmc 0:1 0x80000000 uImage
fatload mmc 0:1 0x81600000 uInitrd
setenv bootargs ro elevator=noop vram=12M omapfb.mode=dvi:640x480MR-16@60 mpurate=auto root=UUID=6cbe1be9-803f-4c2e-bd58-d3d9d9200ad7 fixrtc quiet splash
bootm 0x80000000 0x81600000

Thanks for the help

Josh Kurland

unread,
Apr 11, 2013, 10:06:59 AM4/11/13
to beagl...@googlegroups.com
I knew I wasn't the only one who was having a hard time with this!  I was planning on writing a tutorial after I finish my project, but here is a quick run down.

I didn't directly modify uEnv.txt.  I found it easier to modify the boot.scr, using Ubuntu on my laptop with an SD card slot to make my life easy.

1.)  Insert SD card into laptop
2.)  My boot sector wasn't mounted immediately, so I have to find and mount it
  a.)  dmesg | grep -i sd to find what device the boot sector is on
3.)  cd /media
4.)  sudo mkdir mybeagleboardBoot
5.)  sudo mount /dev/sdxx mybeagleboardBoot  where xx is your specific device

We can't edit the boot.scr directly, but we can copy and paste from there.  Open it up using nano or whatever text editor you prefer.  You will likely see some unreadable stuff followed by the boot instructions.  You should copy that to a new file and save it somewhere just in case.  I saved it in my home directory and called it boot.script.  At this point you can open the new boot.script file and change whatever you want.    Then we have to use the mkImage command to remake the boot.scr

6.)  mkimage -A arm -T script -C none -n "Boot Image" -d boot.script boot.scr
7.)  mv boot.scr /media/mybeagleboardBoot to move the boot.scr back into the boot sector
8.)  sudo umount /dev/sdxx
9.)  Remove SD card from laptop and insert into beagleboard

I hope that helps.  


On Thu, Apr 11, 2013 at 4:59 AM, <s19...@gmail.com> wrote:
Hi Josh,

Can you specify the 'alternate way' so that others who are trying to do this might learn?
Do you have any links to useful information on how to edit the uEnv.txt file and change the screen resolution?

James

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/Hkpwfoxhiyk/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Josh Kurland
Google Voice # (352) 358-1138

James S

unread,
Apr 11, 2013, 2:07:45 PM4/11/13
to beagl...@googlegroups.com
Great! Thanks, I'll check it out
Reply all
Reply to author
Forward
0 new messages