January 20, 2021, 05:19:36 pm

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


3.4.75+ kernel for CB2 and CT

Started by patwood, January 08, 2014, 11:01:13 pm

Previous topic - Next topic

patwood

Quote from: johndoe_71rus on February 08, 2014, 10:48:48 am
Have you read my posts above? I use kernel parameters.
Do you think my mistake
disp.screen0_output_mode=EDID:1024x768p60
i use cb2.


Please do this: remove the EDID: from your kernel parameter.  Try

disp.screen0_output_mode=1024x768p60

and report back.

johndoe_71rus

February 09, 2014, 11:38:34 pm #121 Last Edit: February 10, 2014, 10:01:18 am by johndoe_71rus
This monitor Acer AL1716
boot log http://pastebin.com/9QCLPVHZ

[    0.000000] Kernel command line: console=tty0 root=/dev/mmcblk0p2 rootwait l0


Xorg.0.log http://pastebin.com/mZnRcnws

[    29.045] Kernel command line: console=tty0 root=/dev/mmcblk0p2 rootwait loglevel=7 panic=10 console=ttyS0,115200 mac_addr=46:a1:40:39:3d:f8 hdmi.audio=EDID:0 disp.screen0_output_type=3 disp.screen0_output_mode=1024x768p60 earkyprintk=vga,ttyS0,115200


When I removed the EDID: not determine the correct monitor resolution hdmi-dvi. Apply settings of script.bin
part disp.screen0_output_mode=EDID: applied
part 1024x768p60 ignored
Cubieboard2 / Android 4.2.2 / Cubieez 7.4@3.4.79+patwood

patwood

Quote from: johndoe_71rus on February 09, 2014, 11:38:34 pm
This monitor Acer AL1716
boot log http://pastebin.com/9QCLPVHZ

[    0.000000] Kernel command line: console=tty0 root=/dev/mmcblk0p2 rootwait l0


Xorg.0.log http://pastebin.com/mZnRcnws

[    29.045] Kernel command line: console=tty0 root=/dev/mmcblk0p2 rootwait loglevel=7 panic=10 console=ttyS0,115200 mac_addr=46:a1:40:39:3d:f8 hdmi.audio=EDID:0 disp.screen0_output_type=3 disp.screen0_output_mode=1024x768p60 earkyprintk=vga,ttyS0,115200


When I removed the EDID: not determine the correct monitor resolution hdmi-dvi. Apply settings of script.bin
part disp.screen0_output_mode=EDID: applied
part 1024x768p60 ignored


From your boot log:

<4>[DISP] Unsupported mode: 1024x768p60, ignoring
[    3.623109] [DISP] Unsupported mode: 1024x768p60, ignoring


This is why the display driver falls back on script.bin.  There also appears to be a problem reading your EDID:

<6>ParseEDID
[    6.328705] ParseEDID
<4>i2c i2c-3: unable to read EDID block 0, try 1/3
[    6.342577] i2c i2c-3: unable to read EDID block 0, try 1/3
<4>i2c i2c-3: unable to read EDID block 0, try 2/3
[    6.362580] i2c i2c-3: unable to read EDID block 0, try 2/3
<4>i2c i2c-3: unable to read EDID block 0, try 3/3
[    6.382567] i2c i2c-3: unable to read EDID block 0, try 3/3


If you want to pick a hard-coded resolution, you should pick one that's supported:

Quote from: patwood on February 08, 2014, 12:18:40 am
The disp.screen0_output_mode=EDID:1024x768p60 should work if the EDID is okay; however, I'm not sure if 1024x768 is supported.  For HDMI, the supported settings are here:https://github.com/linux-sunxi/linux-sunxi/blob/stage/sunxi-3.4/drivers/video/sunxi/disp/disp_clk.c#L77 1024x768 is only listed for VGA mode.

bobblestiltskin

Quote from: patwood on February 01, 2014, 03:04:03 pm
Quote from: bobblestiltskin on January 30, 2014, 11:14:27 am
Quote from: patwood on January 30, 2014, 10:05:45 am
There have been problems reported with the 4.7 compiler. Which one are you using?


bob@malta:~$ gcc --version
gcc (Debian 4.8.2-14) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

bob@malta:~$


There's a good possibility your compiler version is causing your problems.  There are some patches that might work for 4.7, but you really should see if you can find the gcc 4.6 arm toolchain.


I used version 4.6 of gcc and now see no core dumping during boot. I still see

[   26.005919] Mali: Mali device driver loaded
[   28.109155]
[   28.109160] failed to power up wifi chip, retry again (4 left) **
[   28.109165]
[   30.139192]
[   30.139197] failed to power up wifi chip, retry again (3 left) **
[   30.139202]
[   32.169144]
[   32.169149] failed to power up wifi chip, retry again (2 left) **
[   32.169154]
[   34.199143]
[   34.199149] failed to power up wifi chip, retry again (1 left) **
[   34.199154]
[   34.234265]
[   34.234272] failed to power up wifi chip, max retry reached, exits **
[   34.234278]
[   35.079192] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)

in my dmesg output. As said before the lack of wifi I can live with for now, since it has a wired connection, but I would prefer that it worked. Any ideas why I may be seeing this.

johndoe_71rus

Think
[   28.109160] failed to power up wifi chip, retry again (4 left) **
this for CT. With my cb2 had the same log. i use usb wifi
Cubieboard2 / Android 4.2.2 / Cubieez 7.4@3.4.79+patwood

patwood

Quote from: johndoe_71rus on February 12, 2014, 04:11:45 am
Think
[   28.109160] failed to power up wifi chip, retry again (4 left) **
this for CT. With my cb2 had the same log. i use usb wifi


You need to remove bt_gpio and bcmdhd from your /etc/modules, which are CT specific drivers.

patwood

Quote from: bobblestiltskin on February 12, 2014, 04:01:57 am
I used version 4.6 of gcc and now see no core dumping during boot. I still see

[   26.005919] Mali: Mali device driver loaded
[   28.109155]
[   28.109160] failed to power up wifi chip, retry again (4 left) **
...
in my dmesg output. As said before the lack of wifi I can live with for now, since it has a wired connection, but I would prefer that it worked. Any ideas why I may be seeing this.


Are you using a CB2 or CT?  If a CT, there are specific script.bin settings you need for wifi to power up:

gpio_used = 1
gpio_num = 2
gpio_pin_1 = port:PH20<1><default><default><1>
gpio_pin_2 = port:PH10<0><default><default><0>

[wifi_para]
wifi_used = 1
wifi_sdc_id = 3
wifi_usbc_id = 2
wifi_usbc_type = 1
wifi_mod_sel = 7
wifi_power = ""
ap6xxx_wl_regon = port:PH09<1><default><default><0>
ap6xxx_wl_host_wake = port:PH10<0><default><default><0>
ap6xxx_bt_regon = port:PH18<1><default><default><0>
ap6xxx_bt_wake = port:PH24<1><default><default><0>
ap6xxx_bt_host_wake = port:PH25<0><default><default><0>
ap6xxx_lpo = port:PI12<4><1><default><1>

In particular, gpio 2,ap6xxx_wl_regon, and ap6xxx_lpo are needed by the CT's wifi driver.

(It turns out a lot of the wifi_para settings are only used by Android, but I haven't actually tested removing the ones I think are not used by the 3.4.75 wifi driver, so I've left them all in.)

bobblestiltskin

Quote from: patwood on February 12, 2014, 10:26:40 am
Are you using a CB2 or CT?  If a CT, there are specific script.bin settings you need for wifi to power up:

gpio_used = 1
gpio_num = 2
gpio_pin_1 = port:PH20<1><default><default><1>
gpio_pin_2 = port:PH10<0><default><default><0>

[wifi_para]
wifi_used = 1
wifi_sdc_id = 3
wifi_usbc_id = 2
wifi_usbc_type = 1
wifi_mod_sel = 7
wifi_power = ""
ap6xxx_wl_regon = port:PH09<1><default><default><0>
ap6xxx_wl_host_wake = port:PH10<0><default><default><0>
ap6xxx_bt_regon = port:PH18<1><default><default><0>
ap6xxx_bt_wake = port:PH24<1><default><default><0>
ap6xxx_bt_host_wake = port:PH25<0><default><default><0>
ap6xxx_lpo = port:PI12<4><1><default><1>

In particular, gpio 2,ap6xxx_wl_regon, and ap6xxx_lpo are needed by the CT's wifi driver.

(It turns out a lot of the wifi_para settings are only used by Android, but I haven't actually tested removing the ones I think are not used by the 3.4.75 wifi driver, so I've left them all in.)


I am using a cubie truck, I was missing the gpio_ from the .fex file (I copied one from sys_config/a20/cubietruck.fex), so I added them and converted to a script.bin file by running fex2bin, but on a reboot I see the same "failed to power up wifi chip, max retry reached, exits" :-( I am fairly sure that the hardware works - the linaro kernel I used a long time ago did *something* with the wifi.

patwood

Just check the name of the script.bin; if you're using a dual-boot u-boot, then the script.bin file's name will be set on a script= line in uEnv.cb2 (the dual-boot u-boot reads uEnv.cb2 for the CB2 and uEnv.ct for the CT so it can load different script.bin files and set different kernel arguments).

patwood

I've uploaded new kernels for the A10 and A20: http://dl.cubieforums.com/patwood/A10-kernel-3.4.79.tar.gz and  http://dl.cubieforums.com/patwood/A20-kernel-3.4.79.tar.gz.  They were built from this repo: https://github.com/patrickhwood/linux-sunxi/tree/pat-3.4.79.  That branch was merged with the linux-sunxi/sunxi-3.4 branch, which was updated from stage/sunxi-3.4 over the weekend.

This kernel is different from the 3.4.75 as follows:

1. Enable CONFIG_SUNXI_PWM.
2. Enable CMA support.  This is the comment from the commit:

Quote
    sunxi: cedar: Allow to use CMA for cedar memory allocation
   
    In the case if the kernel supports CMA and has it enabled, now
    the cedar module tries to allocate the 80MB memory buffer from CMA.
    This memory block is kept in use as long as the cedar module is
    loaded. When the module is unloaded, the allocated memory gets
    released.
   
    It is preferable to allocate cedar memory buffer from the first
    256MB of physical memory to avoid bugs even though in theory
    higher addresses might be supported:
        http://irclog.whitequark.org/linux-sunxi/2013-07-17#4409315;
    In practice, both VLC (using the proprietary libve library) and
    libvdpau-sunxi fail for the buffers allocated from above 256MB
    (or partially crossing this boundary).


What this means in practice is that you no longer need to set sunxi_no_mali_mem_reserve, sunxi_ve_mem_reserve, or sunxi_fb_mem_reserve in the kernel arguments to either reserve the memory or to make it available on a headless system.  The g2d driver still allocates a fixed 16MB buffer unless you set sunxi_g2d_mem_reserve=0, then it allocates the memory dynamically (go figure).

Pat

johndoe_71rus

patwood
in dmesg log

[    0.446975] [usb_manager]: CONFIG_USB_SW_SUNXI_USB0_OTG
[    0.457260] WRN:L287(/home/pwood/arm/mk802/linux-sunxi/drivers/usb/sunxi_usb/manager/usb_manager.c):ERR: det_vbus pin is invaild
[    0.467563] WRN:L426(/home/pwood/arm/mk802/linux-sunxi/drivers/usb/sunxi_usb/manager/usb_manager.c):ERR: check_usb_board_info failed
[    0.478182] WRN:L480(/home/pwood/arm/mk802/linux-sunxi/drivers/usb/sunxi_usb/manager/usb_manager.c):ERR: get_usb_cfg failed
[    0.481347] [sw_hcd0]: usb host driver initialize........

it is also of excess equipment for cb2?
Cubieboard2 / Android 4.2.2 / Cubieez 7.4@3.4.79+patwood

beerstein

Hi patwood: May I jump in here and ask for help on my TinyCore A20 work?
From the TinyCore forum I learned, that if I can boot to a promt then at least the initrd is supported. Which it does. I am able to get to the command line. After that I have a LAN connection but I can not install extensions (application programs) To be able to have that I need sqashfs in the kernel. I am not sure whether I will be able to do this by myself. How much work is it?

patwood

Quote from: beerstein on February 13, 2014, 04:02:42 am
Hi patwood: May I jump in here and ask for help on my TinyCore A20 work?
From the TinyCore forum I learned, that if I can boot to a promt then at least the initrd is supported. Which it does. I am able to get to the command line. After that I have a LAN connection but I can not install extensions (application programs) To be able to have that I need sqashfs in the kernel. I am not sure whether I will be able to do this by myself. How much work is it?


The kernels I've uploaded have squashfs built as a module, not baked into the kernel.  However, if you have an initrd working, you should be able to copy /lib/modules/3.4.75-sun4i+/kernel/fs/squashfs/squashfs.ko into it and install it with modprobe or insmod.


beerstein

OK thanx I will use your latest kernel without the CT in file name.
I also  have to find out how to copy the modules over, because TinyCore does not use a "scattered mode install". The system is loop loaded each time. This is very interesting concept.

patwood

Quote from: johndoe_71rus on February 13, 2014, 03:40:07 am
patwood
in dmesg log

[    0.446975] [usb_manager]: CONFIG_USB_SW_SUNXI_USB0_OTG
[    0.457260] WRN:L287(/home/pwood/arm/mk802/linux-sunxi/drivers/usb/sunxi_usb/manager/usb_manager.c):ERR: det_vbus pin is invaild
[    0.467563] WRN:L426(/home/pwood/arm/mk802/linux-sunxi/drivers/usb/sunxi_usb/manager/usb_manager.c):ERR: check_usb_board_info failed
[    0.478182] WRN:L480(/home/pwood/arm/mk802/linux-sunxi/drivers/usb/sunxi_usb/manager/usb_manager.c):ERR: get_usb_cfg failed
[    0.481347] [sw_hcd0]: usb host driver initialize........

it is also of excess equipment for cb2?


No.  These are from the USB OTG driver.  See http://www.cubieforums.com/index.php/topic,1331.msg10712.html#msg10712.  They are from the code that detects whether you've got a host or client (or no) USB device connected to the OTG port.