boot environment in flash

I have a Beagleboard xM version B. When I boot up the board I get the error “*** Warning – readenv() failed, using default environment”, and I end up with a framebuffer configured as 640x480x16bits by default. I need to expand that to a larger size. I can change it, but when I try to save the boot environment, again I get an error, “Attempt to erase non page aligned data”. Is this an indication of damage to the board, or is it a bug in the flash driver? And is there another mechanism to change the framebuffer size? I’ve seen mention of editing a file called boot.src, but I can’t find it anywhere. Has anyone else had to fix this problem?

There is no flash on the BeagleBoard-xM.

There is a .txt file that is used to set the environment on boot up. You will find it on the uSD card. You need to edit that file.

Gerald

Thanks for your rapid response, Gerald.

On the mmcblk0p1 partition I have MLO, u-boot.bin and uImage.

On the mmcblk0p2 partition I have the whole Linux file system. I assume it belongs in the former.

Have I lost it? Could you send me a copy or is there is a repository I can get it from?

It should be in partition 1. The filename we use now is uenv.txt. It had a different name under the Rev B SW and was called boot.scr which is a script file that has to be compiled before you can use it. You will find it on the SD card that shipped with the board. You could switch to the Rev C version of the image which uses the uenv.txt file. I wish I could give you the link to the image, but at the moment the CircuitCo support site is down and has been all day. I have no idea when it will come back up.

You could still update boot.scr and compile it. You can do a search on the mailing list and find out how to create that file under Linux…

Gerald

Matt,

The CCO WIKI just came up. It may be a little slow, but it is up. http://www.circuitco.com/support/index.php?title=Main_Page

Use the 4_25 version as it is the latest.

Gerald

Matt,

Your beagleboard doesn’t have flash and boot.scr will hold the environment variables for booting. You can make a custom boot.scr if your environment is different.

Just for your reference, here is how to make boot.scr.

In your host Linux system, make a text file with your environment details. A sample is below.

mmc init

setenv console tty0 console=ttyS2,115200n8

setenv ramroot /dev/ram0 rw ramdisk_size=131072 initrd=0x88000000,128M

setenv bootargs console=${console} root=${ramroot} rootfstype=ext2

fatload mmc 0 0x82000000 uImage

fatload mmc 0 0x88000000 rootfs.ext2

bootm 0x82000000

Save this text in file with name, “bootscript”. Now run the following command.

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n ‘Boot script’ -d bootscript boot.scr

If mkimage is not installed in the host, please install it. Your boot.scr will be created in the same directory as you run the command. Now copy this to boot partition of SD card and boot the board.

Thank you,

Johnson

Matt,

Your beagleboard doesn’t have flash and boot.scr will hold the environment variables for booting. You can make a custom boot.scr if your environment is different.

Just for your reference, here is how to make boot.scr.

In your host Linux system, make a text file with your environment details. A sample is below.

mmc init

setenv console tty0 console=ttyS2,115200n8

setenv ramroot /dev/ram0 rw ramdisk_size=131072 initrd=0x88000000,128M

setenv bootargs console=${console} root=${ramroot} rootfstype=ext2

fatload mmc 0 0x82000000 uImage

fatload mmc 0 0x88000000 rootfs.ext2

bootm 0x82000000

Save this text in file with name, “bootscript”. Now run the following command.

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n ‘Boot script’ -d bootscript boot.scr

If mkimage is not installed in the host, please install it. Your boot.scr will be created in the same directory as you run the command. Now copy this to boot partition of SD card and boot the board.

Thank you,

Johnson

Are you saying that the -xM and non-xM behave differently in that regard when running the same kernel!?!?!?!

Matt,

Your beagleboard doesn’t have flash and boot.scr will hold the environment variables for booting. You can make a custom boot.scr if your environment is different.

Just for your reference, here is how to make boot.scr.

In your host Linux system, make a text file with your environment details. A sample is below.

mmc init

setenv console tty0 console=ttyS2,115200n8

setenv ramroot /dev/ram0 rw ramdisk_size=131072 initrd=0x88000000,128M

setenv bootargs console=${console} root=${ramroot} rootfstype=ext2

fatload mmc 0 0x82000000 uImage

fatload mmc 0 0x88000000 rootfs.ext2

bootm 0x82000000

Save this text in file with name, “bootscript”. Now run the following command.

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n ‘Boot script’ -d bootscript boot.scr

If mkimage is not installed in the host, please install it. Your boot.scr will be created in the same directory as you run the command. Now copy this to boot partition of SD card and boot the board.

Thank you,

Johnson

Begging your pardon. My confusion as I forgot it was a kernel change that introduced it.
Regards
Sid.

Matt,

Your beagleboard doesn’t have flash and boot.scr will hold the environment variables for booting. You can make a custom boot.scr if your environment is different.

Just for your reference, here is how to make boot.scr.

In your host Linux system, make a text file with your environment details. A sample is below.

mmc init

setenv console tty0 console=ttyS2,115200n8

setenv ramroot /dev/ram0 rw ramdisk_size=131072 initrd=0x88000000,128M

setenv bootargs console=${console} root=${ramroot} rootfstype=ext2

fatload mmc 0 0x82000000 uImage

fatload mmc 0 0x88000000 rootfs.ext2

bootm 0x82000000

Save this text in file with name, “bootscript”. Now run the following command.

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n ‘Boot script’ -d bootscript boot.scr

If mkimage is not installed in the host, please install it. Your boot.scr will be created in the same directory as you run the command. Now copy this to boot partition of SD card and boot the board.

Thank you,

Johnson

Excellent. I fetched mkimage and the translation worked fine. Where can I find described how to change options? I tried to add the string “dvimode=1280x720MR-16@60” to the end of setenv bootargs, but that didn’t change the display pixels from 640x480 (as seen on the console and from an open of the /dev/fb and review of variable_info, gotten from ioctl(fd, FBIOGET_VSCREENINFO, variable_info).

I also tried omapfb.mode=dvi:1280x720MR-16@60, which I saw described somewhere on this board.

Matt, I have not tried this as I don’t have any DVI monitor to test at the moment.

But it looks like there are many options other than bootargs. See the link below.

http://processors.wiki.ti.com/index.php/Adding_new_DVI_resolutions

Hope this helps!

Thank you,

Johnson

I created file uEnv.txt with only this line in /media/mmcblk0p1:

dvimode=1280x720-16@60

Rebooted to correct screen pixels.

I deleted the boot.scr I had created and rebooted, again to the correct screen pixels.

Thanks everyone.

Strange that the same didn't worked with boot.scr. Referring to the
below post (link) from Jason, "For backwards compatibility the use of
boot.scr is still supported."

https://groups.google.com/forum/#!topic/beagleboard/u2A51YpBJcs/discussion

Thank you,
Johnson

I am running 2.6.32 from May 1.

:: -----Original Message-----
:: From: beagleboard@googlegroups.com
:: [mailto:beagleboard@googlegroups.com] On Behalf Of Johnson Mathew
:: Easow
:: Sent: Thursday, June 23, 2011 10:42 AM
:: To: beagleboard@googlegroups.com
:: Subject: Re: [beagleboard] boot environment in flash
::
:: Strange that the same didn't worked with boot.scr. Referring to the
:: below post (link) from Jason, "For backwards compatibility the use of
:: boot.scr is still supported."
::
:: https://groups.google.com/forum/#!topic/beagleboard/u2A51YpBJcs/discus
:: sion
::
:: Thank you,
:: Johnson
::
:: On Thu, Jun 23, 2011 at 7:30 PM, Matt Schreiner