November 19, 2019, 04:44:08 am

News:

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


Buster, Xenial and Bionic - updated 6.7.2019

Started by slovenia, December 24, 2013, 03:23:11 pm

Previous topic - Next topic

slovenia

QuoteThis addresses version A vs B issue?


Not sure. CT boards rev. B just started to appear and I haven't found/read what is the main difference ... yet. The dirty workaround was successful in few cases and it's worth trying until we found a better way.
Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4
http://www.armbian.com

lauri

February 08, 2014, 08:01:59 am #211 Last Edit: February 08, 2014, 09:17:44 am by lauri
Quote from: slovenia on February 08, 2014, 06:46:23 am
Not sure. CT boards rev. B just started to appear and I haven't found/read what is the main difference ... yet. The dirty workaround was successful in few cases and it's worth trying until we found a better way.


Thanks man, it works. Please make others' life easier by putting a big red notice on your main download page ;)

Let me know how I can help porting your image to ver B boards :)

Btw, dd-ing the whole /dev/nand of a working machine to another machine didn't work. Does Cubietruck employ also some sort of (configurable/overwritable) bootloader outside NAND?

Brakelmann

Hi,

any idea how to get rid of these messages which logged almost every 30 seconds to syslog?

Feb  8 16:58:33 cubie kernel: [ 4649.494984] EDID version: 1.3
Feb  8 16:58:33 cubie kernel: [ 4649.509877] PCLK=119000000 X 1680 1728 1760 1840 Y 1050 1053 1059 1080 fr 59 PN
Feb  8 16:58:33 cubie kernel: [ 4649.529007] disp_clk: Could not find a matching pll-freq for 146850000 pclk
Feb  8 16:58:33 cubie kernel: [ 4649.534869] disp_clk: Could not find a matching pll-freq for 78800000 pclk
Feb  8 16:58:33 cubie kernel: [ 4649.540708] disp_clk: Could not find a matching pll-freq for 26150000 pclk
Feb  8 16:59:07 cubie kernel: [ 4683.568683] ParseEDID
Feb  8 16:59:07 cubie kernel: [ 4683.604979] EDID version: 1.3
Feb  8 16:59:07 cubie kernel: [ 4683.619908] PCLK=119000000 X 1680 1728 1760 1840 Y 1050 1053 1059 1080 fr 59 PN
Feb  8 16:59:07 cubie kernel: [ 4683.639044] disp_clk: Could not find a matching pll-freq for 146850000 pclk
Feb  8 16:59:07 cubie kernel: [ 4683.644969] disp_clk: Could not find a matching pll-freq for 78800000 pclk
Feb  8 16:59:07 cubie kernel: [ 4683.650798] disp_clk: Could not find a matching pll-freq for 26150000 pclk
Feb  8 16:59:41 cubie kernel: [ 4717.408698] ParseEDID


Thanks, Brakelmann.

patwood

Quote from: Brakelmann on February 08, 2014, 11:01:21 am
Hi,

any idea how to get rid of these messages which logged almost every 30 seconds to syslog?

Feb  8 16:58:33 cubie kernel: [ 4649.494984] EDID version: 1.3
Feb  8 16:58:33 cubie kernel: [ 4649.509877] PCLK=119000000 X 1680 1728 1760 1840 Y 1050 1053 1059 1080 fr 59 PN
Feb  8 16:58:33 cubie kernel: [ 4649.529007] disp_clk: Could not find a matching pll-freq for 146850000 pclk
Feb  8 16:58:33 cubie kernel: [ 4649.534869] disp_clk: Could not find a matching pll-freq for 78800000 pclk
Feb  8 16:58:33 cubie kernel: [ 4649.540708] disp_clk: Could not find a matching pll-freq for 26150000 pclk
Feb  8 16:59:07 cubie kernel: [ 4683.568683] ParseEDID
Feb  8 16:59:07 cubie kernel: [ 4683.604979] EDID version: 1.3
Feb  8 16:59:07 cubie kernel: [ 4683.619908] PCLK=119000000 X 1680 1728 1760 1840 Y 1050 1053 1059 1080 fr 59 PN
Feb  8 16:59:07 cubie kernel: [ 4683.639044] disp_clk: Could not find a matching pll-freq for 146850000 pclk
Feb  8 16:59:07 cubie kernel: [ 4683.644969] disp_clk: Could not find a matching pll-freq for 78800000 pclk
Feb  8 16:59:07 cubie kernel: [ 4683.650798] disp_clk: Could not find a matching pll-freq for 26150000 pclk
Feb  8 16:59:41 cubie kernel: [ 4717.408698] ParseEDID


Thanks, Brakelmann.


These usually appear when the HDMI cable is plugged. Maybe yours isn't making good contact?

Morphy

Quote from: patwood on February 07, 2014, 10:50:39 am
Are you sure the usb-storage module is built-into the kernel?  If not, the USB HDD won't mount until the module is loaded.  First check for USB_STORAGE in the kernel's configuration:

zgrep USB_STORAGE /proc/config.gz

If it's m, then you actually may be better off than if it's built into the kernel, since you want to have both SATA and USB drives connected at boot time, and you want these drives to be consistently named.  You could try putting usb_storage in /etc/modules and adding a mount line to /etc/rc.local; I believe all the modules should be loaded by then.


Yes the output is m. Sorry you've lost me now, where is usb_storage? Sorry I'm still learning the ropes when it comes to linux...

So it seems the problem lies with my USB-Sata board. I've tried another and it works much better, mounts at boot and everything. The problem is I want to use this as it has dual sata channels and a nice 4 amp psu supplying it so I can power the CT and SATA drive off it. I'm thinking its driver related somehow as it works fine in windows and even fine when I was running it on raspbian on the pi.
Two problems are:
Transfer speed under 1MB/s
Only way to work is powering on after CT has booted.

patwood

February 09, 2014, 05:42:20 pm #215 Last Edit: February 09, 2014, 05:45:14 pm by patwood
If you do

modprobe usb_storage


do the USB drives and partitions show up in /proc/partitions?  If it mounts after booting, try adding usb_storage to /etc/modules and the mount command for /dev/sdb1 in /etc/rc.local.

Morphy

Quote from: patwood on February 09, 2014, 05:42:20 pm
If you do

modprobe usb_storage


do the USB drives and partitions show up in /proc/partitions?  If it mounts after booting, try adding usb_storage to /etc/modules and the mount command for /dev/sdb1 in /etc/rc.local.


Nope nothing happens entering that? This is with it mounted too. Output of fdisk -l and sdb1 is usb-sata drive:

fdisk -l

Disk /dev/nand: 7700 MB, 7700742144 bytes
255 heads, 63 sectors/track, 936 cylinders, total 15040512 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/nand doesn't contain a valid partition table

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc80e13d0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  3907028991  1953513472   83  Linux



patwood

Quote from: Morphy on February 10, 2014, 01:51:59 pm
Nope nothing happens entering that? This is with it mounted too. Output of fdisk -l and sdb1 is usb-sata drive:

fdisk -l

Disk /dev/nand: 7700 MB, 7700742144 bytes
255 heads, 63 sectors/track, 936 cylinders, total 15040512 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/nand doesn't contain a valid partition table

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc80e13d0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  3907028991  1953513472   83  Linux



Okay, I'm lost here.  Let me take a step back and try to summarize:

1. You've got a 3TB SATA drive (nice!) set up on sda and use that for your root fs.  Works fine.  Mounts as your rootfs at boot up.
2. You've got a 2 channel USB SATA board with sdb on it.  It doesn't want to mount at boot time.
3. If you connect a different board (or perhaps a USB thumb drive) to the USB port, the drive mounts at boot time.

So it sounds like the usb-storage driver works and loads properly at boot time but the USB SATA board doesn't.  Perhaps there's a driver for it that's not being loaded properly, or perhaps it's not being loaded early enough.

So, first, boot without the USB SATA board and run the lsmod command; then plug in the board, mount the drive, and run lsmod again.  Any differences?  If you run dmesg and look at the last 30 lines or so, you should see some like this:

[   44.953203] ehci_irq: port change detect
[   45.234591] usb 2-1: new high-speed USB device number 2 using sw-ehci
[   45.461702] Initializing USB Mass Storage driver...
[   45.474246] scsi1 : usb-storage 2-1:1.0
[   45.485845] usbcore: registered new interface driver usb-storage
[   45.489426] USB Mass Storage support registered.
[   46.878170] scsi 1:0:0:0: Direct-Access     FLASH    Drive SM_USB20   3000 PQ: 0 ANSI: 0 CCS
[   46.899354] sd 1:0:0:0: [sda] 30965760 512-byte logical blocks: (15.8 GB/14.7 GiB)
... [all partition stuff after this]


Anything else in there?

Morphy

February 10, 2014, 07:40:20 pm #218 Last Edit: February 10, 2014, 07:41:58 pm by Morphy
Yep you got it. Except root fs is on nand still. The 3tb is a WD red download drive. Speaking of which does this kernel have power saving features ie hd spin down?

I digress... lsmod before:
Module                  Size  Used by
tusbd                  38450  1
cpufreq_userspace       3294  0
nfsd                  221296  13
bcmdhd                496591  0
wifi_gpio               5853  1 bcmdhd
hci_uart               23864  0
bluetooth             263915  1 hci_uart


And after:

Module                  Size  Used by
sg                     22739  0
usb_storage            44995  0
tusbd                  38450  1
cpufreq_userspace       3294  0
nfsd                  221296  13
bcmdhd                496591  0
wifi_gpio               5853  1 bcmdhd
hci_uart               23864  0
bluetooth             263915  1 hci_uart


So yes its picking up after I flick the power once booted. I suspect its a driver issue as I'm getting awful speeds too.
dmesg:
[   20.030571] =========== WLAN placed in RESET ========
[   21.910017] EXT4-fs error (device nand2): ext4_mb_generate_buddy:741: group 2                                               1, 21964 clusters in bitmap, 21960 in gd
[   21.953418] EXT4-fs error (device nand2): ext4_mb_generate_buddy:741: group 1                                               9, 38 clusters in bitmap, 39 in gd
[   21.979930] EXT4-fs error (device nand2): ext4_mb_generate_buddy:741: group 2                                               0, 17179 clusters in bitmap, 17181 in gd
[   22.772730] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:                                                (null)
[   24.289399] sunxi_gmac: probed
[   24.303014] eth0: PHY ID 001cc915 at 0 IRQ 0 (sunxi_gmac-0:00) active
[   24.319334] eth0: PHY ID 001cc915 at 1 IRQ 0 (sunxi_gmac-0:01)
[   26.331955] PHY: sunxi_gmac-0:00 - Link is Up - 1000/Full
[   30.508464] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   34.901746] eth0: no IPv6 routers present
[   36.565815] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery d                                               irectory
[   36.589267] NFSD: starting 90-second grace period
[   37.806870] usbcore: registered new interface driver usb-stub-driver
[   38.259747] EXT4-fs error (device nand2): ext4_mb_generate_buddy:741: group 1                                               , 40 clusters in bitmap, 19 in gd
[   38.309397] EXT4-fs error (device nand2): ext4_mb_generate_buddy:741: group 2                                               , 8585 clusters in bitmap, 8092 in gd
[  129.178833] ata1: exception Emask 0x10 SAct 0x0 SErr 0x10200 action 0xe froze                                               n
[  129.190798] ata1: irq_stat 0x00400000, PHY RDY changed
[  129.200127] ata1: SError: { Persist PHYRdyChg }
[  129.207645] ata1: hard resetting link
[  129.972720] ata1: SATA link down (SStatus 0 SControl 300)
[  131.634712] ehci_irq: port change detect
[  131.641451] ehci_irq: port change detect
[  131.715883] ata1: hard resetting link
[  132.753014] ehci_irq: port change detect
[  132.971487] ehci_irq: port change detect
[  133.033981] hub 2-0:1.0: unable to enumerate USB device on port 1
[  133.043311] The port change to OHCI now!
[  137.114324] ata1: link is slow to respond, please be patient (ready=0)
[  139.763989] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[  139.957314] ata1.00: configured for UDMA/133
[  139.964566] ata1: EH complete
[  144.807808] ehci_irq: port change detect
[  145.084327] usb 2-1: new high-speed USB device number 3 using sw-ehci
[  145.383753] Initializing USB Mass Storage driver...
[  145.394108] scsi1 : usb-storage 2-1:1.0
[  145.415608] usbcore: registered new interface driver usb-storage
[  145.427020] USB Mass Storage support registered.
[  146.417467] scsi 1:0:0:0: Direct-Access     Ext Hard  Disk                 PQ                                               : 0 ANSI: 4
[  146.438998] sd 1:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.                                               81 TiB)
[  146.452420] sd 1:0:0:0: [sdb] Write Protect is off
[  146.464177] sd 1:0:0:0: [sdb] Mode Sense: 10 00 00 00
[  146.480585] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, does                                               n't support DPO or FUA
[  146.513432] sd 0:0:0:0: Attached scsi generic sg0 type 0
[  146.525821] sd 1:0:0:0: Attached scsi generic sg1 type 0
[  148.651382]  sdb: sdb1
[  148.660990] sd 1:0:0:0: [sdb] Attached SCSI disk
[  315.382093] EXT4-fs (nand2): error count: 103
[  315.393271] EXT4-fs (nand2): initial error at 1391195499: ext4_mb_generate_bu                                               ddy:741
[  315.407956] EXT4-fs (nand2): last error at 1392078659: ext4_mb_generate_buddy                                               :741

A lot of errors with the nand2 there which is not the problem but worrying!

manofring

Hi Slovenia!
Tnx for u efforts, sorry my english is poor, its not my native language. Im from Russia. You script may build two image for Cubieboard2 (im successfully install self - build image for Cubietruck, but from u script im cut usb-director, add mc, screen, gpm ...  my be u add install its packages for defaults, install usb-director like option ? Because we build server image). My question - u may add RTC support for u kernel? For example DS1307, just patch 3 lines in u kernel config, for building CB2 image, and CB dont have VGA (but its available, need only 3 750OM resistors, dupont cables and VGA female connector). For Cb2 need build only HDMI version. And u make kernel like with
export ARCH=arm
export DEB_HOST_ARCH=armhf
export CONCURRENCY_LEVEL=`grep -m1 cpu\ cores /proc/cpuinfo | cut -d : -f 2`
fakeroot make-kpkg --arch arm --cross-compile arm-linux-gnueabihf- --initrd --append-to-version=-custom1 kernel_image kernel_headers
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- EXTRAVERSION=-custom1 uImage
After the compilation, in the directory one level above the kernel source tree, you will get:
linux-image-*.deb, a Debian package with the kernel;
linux-headers-*.deb, a Debian package with kernel headers (mostly unneeded);
an uImage, the kernel itself in the u-boot compatible format.

slovenia

Quote from: manofring on February 12, 2014, 01:43:40 pm
Hi Slovenia!
Tnx for u efforts, sorry my english is poor, its not my native language. Im from Russia. You script may build two image for Cubieboard2 (im successfully install self - build image for Cubietruck, but from u script im cut usb-director, add mc, screen, gpm ...  my be u add install its packages for defaults, install usb-director like option ? Because we build server image). My question - u may add RTC support for u kernel? For example DS1307, just patch 3 lines in u kernel config, for building CB2 image, and CB dont have VGA (but its available, need only 3 750OM resistors, dupont cables and VGA female connector). For Cb2 need build only HDMI version. And u make kernel like with
export ARCH=arm
export DEB_HOST_ARCH=armhf
export CONCURRENCY_LEVEL=`grep -m1 cpu\ cores /proc/cpuinfo | cut -d : -f 2`
fakeroot make-kpkg --arch arm --cross-compile arm-linux-gnueabihf- --initrd --append-to-version=-custom1 kernel_image kernel_headers
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- EXTRAVERSION=-custom1 uImage
After the compilation, in the directory one level above the kernel source tree, you will get:
linux-image-*.deb, a Debian package with the kernel;
linux-headers-*.deb, a Debian package with kernel headers (mostly unneeded);
an uImage, the kernel itself in the u-boot compatible format.


I will test and implement your suggestions asap / in next image release. I know that there are things to be fixed and sure we can try to add new features ... if they are not causing any new troubles  ;)

VGA. It's needed for Cubietruck and since there is one image for both why bother with removing? :) I left configuration on purpose for those who self constructed an VGA output.

Script. It would be easier and clearly if you add a suggestion / pull directly to script on Github.

Thanks for support!
Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4
http://www.armbian.com

triglav

February 12, 2014, 05:02:09 pm #221 Last Edit: February 12, 2014, 06:39:31 pm by triglav
Well, I just had a wild goose chase.

After running the nand-install script on a HDMI setup I reboot CT and there is dead screen. SSH still worked, so the copy went over fine.

After being paranoid and starting over from scratch (lubunto -> this image -> nand) the same thing happened. And here I still am, stuck at a dead screen when booting from NAND. If I reinsert the SD card and boot from there everything is OK.

Anyone got any ideas? The .bin files seem OK, they are bit by bit identical to the SD card ones.

Edit:

Bahhhhhhh, now I see what happened... It is outputting to VGA. Bloody hell.

I'll try to switch it back, any tips on where exactly the setting is?

Edit2:

Well, now things are rolling along.
Copying the /boot from SDcard to NAND does make a difference :)

#CT has booted from NAND, and then you insert the sdcard
#Mount sdcard to /mnt
mount /dev/mmcblk0p1 /mnt/
#Save old boot and copy over the one from sdcard
mv /boot /boot_old
cp /mnt/boot/   /
reboot

Tadaa, HDMI is again alive.

Edit4:

Well, back where I started. Copied over the root system to an external HDD /sda1 and once again HDMI stopped working and VGA is outputting again. Where is this getting set? :(

Edit5:
Yesss, conquest. It seems the actual file was located in /dev/nand1 namely  script.bin was a copy of ct-vga.bin instead of ct-hdmi.bin
A simple cp ct-hdmi.bin script.bin solved it yet again, no idea why what I did before worked

Brakelmann

Quote from: patwood on February 08, 2014, 08:05:26 pm
These usually appear when the HDMI cable is plugged. Maybe yours isn't making good contact?


Hi patwood,

I found out that these messages appear when I switch off my monitor and the HDMI calbe is still connected.
So removing the HDMI calbe from the CT stops theses messages.

Thanks, Brakelmann.



Brakelmann

Hi there,

is there any information how to set up the cubie as WLAN Acces Point / HotSpot?
I am using the following interfaces configuration.
auto lo br0
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual

iface br0 inet static
        address 192.168.1.10
        netmask 255.255.255.0
        gateway 192.168.1.3
        hwaddress ether AE:50:30:27:5A:CF
bridge_ports eth0 wlan0


The hostapd file is still untouched, just for testing purposes:
ssid=CUBIE
interface=wlan0
hw_mode=g
channel=1
bridge=br0

logger_syslog=0
logger_syslog_level=0

wmm_enabled=0
wpa=2
preamble=1
wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0


What else is neccesary?
I started "/etc/init.d/hostapd start" but I am not able to find the SSID with my WLAN scanner.

Any help is much appreciated, thanks Brakelmann.

rose28357

Somewhere here we found that you need to start the wifi driver in the ap mode.

Solved it by modifying bcmdhd module load :
bcmdhd op_mode=2

Read the whole story here