uEnv.txt configuration done right.

Discuss Ubuntu related items.

uEnv.txt configuration done right.

Postby p0rc0_r0ss0 » Fri Mar 02, 2018 5:32 pm

Hi,

It is pretty annoying, but since I purchased my WB DU (which cost me 200$ by the way) I was unable to get 1 cent value out of it. This is really sad.
There is a list of common problems that could be "no problem" if had been normally documented. So, by the numbers:
1. Serial port which refuses to work normally, and throws ton of garbage at me. Well, maybe my UART->USB is bad, nevertheless. The only such problem I had with this board, none of others.

2. There is no normal WORKING uEnv.txt. How hard could it to make working bootloader config if all your product line has 3 boards?!

3. Previous problem brings us to following: Unable to normally debug present uEnv.txt beacue: there is no logging, there is no working console, there is no working uEnv.txt example.

Here's config I came up with so far
Code: Select all
# [ VAR ] Setting up variables
autoload=no
ip_dyn=no
ethaddr=<MAC my Bitch up> - is this line mandatory at all?
ipaddr=192.168.10.99
netmask=255.255.255.0
serverip=192.168.10.250
nc=setenv stdin nc; setenv stdout nc; setenv sterr nc
stdin=nc
stdout=nc
stderr=nc
bootdelay=1

# [ CONSOLE] This is switchable console section.
#First one is local Serial console (which seems to work anywa, except if you handcompile UBoot)
#Second is network console which should potentially solve issues with Serial console, but it doesn't so far.
consLocal=console=ttymxc0,57600
netconsole=on
consNet=netconsole=7777@192.168.10.99/,7777@192.168.10.250/

# [ DISPLAY ]
displayinfo=video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24 fbmem=28M

# [ ASSEMBLY LINE ] Concatenate all this stuff
# FYI
# fatload - loads bin image from DOS partition
# bootz - takes 1-3 arguments: image address, initrd, fdt. If you don't pass initrd you should state "-" sign. (no quotes)
# Not quite sure if "mmc rescan" is mandatory in this case, but let's be on a safe side.
p0rc0img=mmc rescan; fatload mmc 0:0 0x12000000 zImage
p0rc0fdt=fatload mmc 0:0 0x18000000 imx6dl-wandboard-revd1.dtb
p0rc0args=setenv bootargs ${consNet} root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw ${displayinfo}
#p0rc0boot=bootm 0x12000000
p0rc0boot=bootz 0x12000000 - 0x18000000

# [ TAKEOFF ]
uenvcmd=run p0rc0img; run p0rc0fdt; run p0rc0args; run p0rc0boot;


Trying to boot: WB All (rev D1): Ubuntu 16.04 armhf (see downloads)
No luck booting, any helpful ideas?
User avatar
p0rc0_r0ss0
 
Posts: 16
Joined: Fri Jun 05, 2015 5:06 am
Location: unknown

Re: uEnv.txt configuration done right.

Postby p0rc0_r0ss0 » Sat Mar 03, 2018 12:36 pm

User avatar
p0rc0_r0ss0
 
Posts: 16
Joined: Fri Jun 05, 2015 5:06 am
Location: unknown

Re: uEnv.txt configuration done right.

Postby p0rc0_r0ss0 » Sat Mar 03, 2018 1:55 pm

Config got upgraded, got better, but still not working :(

Code: Select all
# [ CONSOLE] This is switchable console section.
#First one is local Serial console (which seems to work anywa, except if you handcompile UBoot)
#Second is network console which should potentially solve issues with Serial console, but it doesn't so far.
consLocal=console=ttymxc0,115200

# Netconsole
# netconsole=[src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr]
preConsNet=setenv ncip 192.168.10.47; setenv stdout nc; setenv stdin nc; setenv stderr nc; setenv bootdelay 2;
consNet=netconsole=@/,@192.168.10.47/

# [ DISPLAY ]
displayinfo=video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24 fbmem=28M

# [ ASSEMBLY LINE ] Concatenate all this stuff
# FYI
# fatload - loads bin image from DOS partition
# bootz - takes 1-3 arguments: image address, initrd, fdt. If you don't pass initrd you should state "-" sign. (no quotes)
# Not quite sure if "mmc rescan" is mandatory in this case, but let's be on a safe side.
p0rc0img=mmc rescan; fatload mmc 0:1 0x12000000 boot/zImage
p0rc0fdt=fatload mmc 0:1 0x18000000 boot/imx6dl-wandboard.dtb
p0rc0args=setenv bootargs ${consNet} root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw ${displayinfo}
#p0rc0boot=bootm 0x12000000
p0rc0boot=bootz 0x12000000 - 0x18000000

# [ TAKEOFF ]
uenvcmd=run preConsNet; run p0rc0img; run p0rc0fdt; run p0rc0args; run p0rc0boot;
User avatar
p0rc0_r0ss0
 
Posts: 16
Joined: Fri Jun 05, 2015 5:06 am
Location: unknown

Re: uEnv.txt configuration done right.

Postby p0rc0_r0ss0 » Sat Mar 03, 2018 3:42 pm

Debian fired up and booted so far.

/!\ FAIR WARNING! I DO RECOMMEND TO USE HEAT SINK ON CHIP.
I use old PIII heat sink, without cooler. It works fine.

UPD1: After apt-get update system loads significantly faster.
TODO: Wifi, GPU test, else.

UPD2: To get additional screen resolutions:
1.
Code: Select all
cvt 1366 768 60  (guess what is which)


2.
Code: Select all
$ sudo vim /usr/share/X11/xorg.conf.d/40-monitor.conf

Section "Monitor"
    Identifier "HDMI1"
    Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
    Option "PreferredMode" "1368x768_60.00"
EndSection

Thanks to this post.
You end up additional resolutions being added.

3.
Code: Select all
apt-get install mesa-utils

glxgears gave me pretty splendid 45fps.

4.
No point installing lm-sensors, it just doesn't detect anything.

5. To get sound running select ALSA mixer as an output device "imx6-wandboard-sgtl5000".
Connect to jack closest to Serial port.
640x480 video clip decodes somewhat slow so far. Although there is no sound lag. SMPlayer + x11 codec.
best results so far with plain mplayer:
Code: Select all
mplayer -ao alsa:device=hw=1 video.mp4

Handles FullHD, but very slowly and doesn't scale. As is.
User avatar
p0rc0_r0ss0
 
Posts: 16
Joined: Fri Jun 05, 2015 5:06 am
Location: unknown

Re: uEnv.txt configuration done right.

Postby p0rc0_r0ss0 » Sun Mar 04, 2018 6:52 am

Ok, not it's GPIO turn:

First of all GPIO is located in "/sys/class/gpio" and there are only gpio chips.
To enable any particular pin we must do the following:
Code: Select all
echo "70" > export

This will result in gpio70, inside this folder we can find "direction" and "value" files that we need to drive GPIO.

UPD1:
rfkill should be installed and it's mandatory.

p.s. System handles desktop pretty well, I write this message directly on WB:DL board.
In addition, I made some LAN performance tests.
Built in LAN can give ~2-3MBytes/s, and if I use external USB->LAN (KY-RD9700 chip) it's only 500kBytes/s tops.
User avatar
p0rc0_r0ss0
 
Posts: 16
Joined: Fri Jun 05, 2015 5:06 am
Location: unknown


Return to Software - Ubuntu

Who is online

Users browsing this forum: Bing [Bot] and 16 guests

cron