uEnv.txt contents being over ridden by "ghost" code in beaglebone

I got a problem.

I have a beaglebone Rev A4. running on Angstrom v2012.03-core - Kernel 3.1.0+

My uEnv.txt has the “only” content:

optargs=console=ttyS2,115200n8 mpurate=100 vram=2M,vram=4M omapfb.mode=dvi:640x480@60 omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait

I want to have a Pico projector connected to Beagle bone.

But internally I see that a few arbitrated entries are being written.

The o/p of vi /proc/cmdline is :

console=ttyO0,115200n8 console=ttyS2,115200n8 mpurate=100 vram=2M,vram=4M omapfb.mode=dvi:640x480@60 omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait ip=none

I would like to know the mole that is doing it. I haven’t yet got an o/p on my projector.

Worried.

Please help.

Regards,
Aravind.

I got a problem.

I have a beaglebone Rev A4. running on Angstrom v2012.03-core - Kernel 3.1.0+

First, upgrade that to something recent, like 3.2.14. Try the april demo image.

My uEnv.txt has the "only" content:

optargs=console=ttyS2,115200n8 mpurate=100 vram=2M,vram=4M omapfb.mode=dvi:640x480@60 omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait

Why are you passing DSS2 arguments to the kernel? The beaglebone only has da8xx-fb. Secondly: you'll need to patch the kernel to change the resolution.

Dear Koen

I tried images in april and almost all of them thre " End of input" error and excited while writing to the SD card.
That was the reason to go back in time. ( all of them in April have this problem )

If you could give be some leads about kernel patching , I could try. Which are the files I should be looking at ?.

Please advice.

Thanks,
Aravind.

P.S : The image that I had atleast had beaglebone blue screen ( scrambled though ). I could see the leds in cape blinking
upgraded to a newer version and the o/p is just noise and I don;t see the leds in the cape blinking either !!

Go to the angstrom website, look at the news articles, especially the ones with 'kernel' and 'workflow'.

Hi Martin,

Post your custom uEnv.txt along with the complete output of "printenv"
when run from u-boot. Then we will be more able to help you...

Regards,

Hi Robert,

Thank you for your quick reply. I have tried some different arguments to see how the output of cat /proc/cmdline would change. printenv doesn’t work for me, I’m not sure why(?).

If uEnv.txt is empty:
root@beagleboard:/~# cat /proc/cmdline
console=ttyS2,115200n8 mpurate=auto buddy=none camera=lbcm3m1 vram=12M omapfb.mode=dvi:640x480MR-16@60 omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait

if uEnv.txt has the following:
console=“tty0 console=ttyO2,115200n8”
buddy=bbtoys-ulcd
camera=none
defaultdisplay=lcd
optargs=“mem=99M@0x80000000 mem=384M@0x88000000”
lcd1=i2c mw 40 00 00; i2c mw 40 04 80; i2c mw 40 0d 05; i2c mw 40 0d 15
lcd2=i2c mw 40 0c 25; mw 49056090 10000000
lcd3=i2c mw 40 04 30; i2c mw 40 0c 21; i2c mw 40 04 80; i2c mw 40 04 70; i2c mw 40 04 60
lcd4=i2c mw 40 04 50; i2c mw 40 04 40; i2c me 40 04 30; i2c mw 40 04 20
dvimode=“800x480MR-24@60 omapfb.vram=0:8M,1:4M,2:4M omapfb.debug=y
omapfb.test=y omapdss.debug=y consoleblank=0
omap_vout.vid1_static_vrfb_alloc=y”
vram=16M
uenvcmd=i2c dev1; run lcd1; i2c dev 0

root@beagleboard:/~# cat /proc/cmdline

root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwaitM,1:4M,2:4M omapfb.debug=y

At the moment I am just trying to make sense of how the cat /proc/cmdline output changes when I change uEnv.txt. In the end what I really want it to just pass the optargs=“mem=99M@0x80000000 mem=384M@0x88000000” so I can run the C6Run examples…

Regards,
Martin

Hi Robert,

Thank you for your quick reply. I have tried some different arguments to see
how the output of cat /proc/cmdline would change. printenv doesn't work for
me, I'm not sure why(?).

Did you run it from the u-boot prompt? (connect up a serial cable and
interrupt the boot process..)

If uEnv.txt is empty:
root@beagleboard:/~# cat /proc/cmdline
console=ttyS2,115200n8 mpurate=auto buddy=none camera=lbcm3m1 vram=12M
omapfb.mode=dvi:640x480MR-16@60 omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw
rootfstype=ext3 rootwait

if uEnv.txt has the following:
console="tty0 console=ttyO2,115200n8"
buddy=bbtoys-ulcd
camera=none
defaultdisplay=lcd
optargs="mem=99M@0x80000000 mem=384M@0x88000000"
lcd1=i2c mw 40 00 00; i2c mw 40 04 80; i2c mw 40 0d 05; i2c mw 40 0d 15
lcd2=i2c mw 40 0c 25; mw 49056090 10000000
lcd3=i2c mw 40 04 30; i2c mw 40 0c 21; i2c mw 40 04 80; i2c mw 40 04 70; i2c
mw 40 04 60
lcd4=i2c mw 40 04 50; i2c mw 40 04 40; i2c me 40 04 30; i2c mw 40 04 20
dvimode="800x480MR-24@60 omapfb.vram=0:8M,1:4M,2:4M omapfb.debug=y
omapfb.test=y omapdss.debug=y consoleblank=0
omap_vout.vid1_static_vrfb_alloc=y"
vram=16M
uenvcmd=i2c dev1; run lcd1; i2c dev 0

root@beagleboard:/~# cat /proc/cmdline
root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwaitM,1:4M,2:4M omapfb.debug=y

At the moment I am just trying to make sense of how the cat /proc/cmdline
output changes when I change uEnv.txt. In the end what I really want it to
just pass the optargs="mem=99M@0x80000000 mem=384M@0x88000000" so I can run
the C6Run examples...

Regards,

Did you run it from the u-boot prompt? (connect up a serial cable and
interrupt the boot process…)

Actually I didn’t do that. Here’s the output of printenv:

OMAP3 beagleboard.org # printenv
baudrate=115200
beaglerev=xMC
bootcmd=if mmc rescan ${mmcdev}; then if userbutton; then setenv bootenv user.txt;fi;echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd …;run uenvcmd;fi;if run loaduimage; then run mmcboot;fi;fi;run nandboot;
bootdelay=3
bootenv=uEnv.txt
buddy=none
camera=lbcm3m1
console=ttyS2,115200n8
defaultdisplay=dvi
dieid#=6a5e00229ff80000016830c31802901a
dvimode=640x480MR-16@60
importbootenv=echo Importing environment from mmc …; env import -t $loadaddr $filesize
loadaddr=0x80200000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}
loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz
loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage
loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage
mmcargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=${buddy} camera=${camera} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_disp=${defaultdisplay} root=${mmcroot} rootfstype=${mmcrootfstype}
mmcboot=echo Booting from mmc …; run mmcargs; bootm ${loadaddr}
mmcdev=0
mmcroot=/dev/mmcblk0p2 rw
mmcrootfstype=ext3 rootwait
mpurate=auto
nandargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=${buddy} camera=${camera} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_disp=${defaultdisplay} root=${nandroot} rootfstype=${nandrootfstype}
nandboot=echo Booting from nand …; run nandargs; nand read ${loadaddr} 280000 400000; bootm ${loadaddr}
nandroot=/dev/mtdblock4 rw
nandrootfstype=jffs2
ramargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=${buddy} camera=${camera} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_disp=${defaultdisplay} root=${ramroot} rootfstype=${ramrootfstype}
ramboot=echo Booting from ramdisk …; run ramargs; bootm ${loadaddr}
ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=0x81000000,64M
ramrootfstype=ext2
rdaddr=0x81000000
usbtty=cdc_acm
vram=12M

Environment size: 2092/131068 bytes

uEnv.txt contains:

root@beagleboard:~# more /media/mmcblk0p1/uEnv.txt
mpurate=1000
dvimode=“hd720 omapfb.vram=0:8M,1:4M,2:4M”
vram=16M
optargs=“consoleblank=0”
console=“tty0 console=ttyO2,115200n8”
boot

So it’s being called with console=ttyS2 even though I specified ttyO2 (that’s a big o, not a zero) in uEnv.txt.

Did you run it from the u-boot prompt? (connect up a serial cable and
interrupt the boot process…)

Actually I didn’t do that. Here’s the output of printenv:

OMAP3 beagleboard.org # printenv
baudrate=115200
beaglerev=xMC
bootcmd=if mmc rescan ${mmcdev}; then if userbutton; then setenv bootenv user.txt;fi;echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd …;run uenvcmd;fi;if run loaduimage; then run mmcboot;fi;fi;run nandboot;
bootdelay=3
bootenv=uEnv.txt
buddy=none
camera=lbcm3m1
console=ttyS2,115200n8
defaultdisplay=dvi
dieid#=6a5e00229ff80000016830c31802901a
dvimode=640x480MR-16@60
importbootenv=echo Importing environment from mmc …; env import -t $loadaddr $filesize
loadaddr=0x80200000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}
loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz
loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage
loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage
mmcargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=${buddy} camera=${camera} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_disp=${defaultdisplay} root=${mmcroot} rootfstype=${mmcrootfstype}
mmcboot=echo Booting from mmc …; run mmcargs; bootm ${loadaddr}
mmcdev=0
mmcroot=/dev/mmcblk0p2 rw
mmcrootfstype=ext3 rootwait
mpurate=auto
nandargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=${buddy} camera=${camera} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_disp=${defaultdisplay} root=${nandroot} rootfstype=${nandrootfstype}
nandboot=echo Booting from nand …; run nandargs; nand read ${loadaddr} 280000 400000; bootm ${loadaddr}
nandroot=/dev/mtdblock4 rw
nandrootfstype=jffs2
ramargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=${buddy} camera=${camera} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_disp=${defaultdisplay} root=${ramroot} rootfstype=${ramrootfstype}
ramboot=echo Booting from ramdisk …; run ramargs; bootm ${loadaddr}
ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=0x81000000,64M
ramrootfstype=ext2
rdaddr=0x81000000
usbtty=cdc_acm
vram=12M

Environment size: 2092/131068 bytes

uEnv.txt contains:

root@beagleboard:~# more /media/mmcblk0p1/uEnv.txt
mpurate=1000
dvimode=“hd720 omapfb.vram=0:8M,1:4M,2:4M”
vram=16M
optargs=“consoleblank=0”
console=“tty0 console=ttyO2,115200n8”
boot

Hi Martin,

Here is how this works:

This line is run first

bootcmd=if mmc rescan ${mmcdev}; then if userbutton; then setenv bootenv user.txt;fi;echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd …;run uenvcmd;fi;if run loaduimage; then run mmcboot;fi;fi;run nandboot;

You can run these commands manually to see how they work:

mmc rescan
run loadbootenv
run importbootenv

Now if you do a printenv, you will see that your uEvn.txt file has been imported. One thing you can see that makes no sense is the last line of your uEnv.txt file, because this file is not executed, but it is just imported into your printenv.

Regards,

John

So it’s being called with console=ttyS2 even though I specified ttyO2 (that’s a big o, not a zero) in uEnv.txt.

– To join: http://beagleboard.org/discuss
To unsubscribe from this group, send email to:
beagleboard+unsubscribe@googlegroups.com
Frequently asked questions: http://beagleboard.org/faq