Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - patwood

Pages: [1] 2 3
1
Cubieboard v1 OS (A10 Based) / 3.4.75+ kernel
« on: January 13, 2014, 11:54:22 pm »
I have uploaded a new build of the 3.4.75 kernel for A10 with three changes.  The first fixes Mali on the CT (there was a problem with physical memory addressing on boards with > 1GB of DRAM) and has no impact on the original cubieboard.  The second adds the hid-elecom.ko driver.  The third moves the I2S driver to a loadable module, which was preventing SATA from starting up.

http://dl.cubieforums.com/patwood/A10-kernel-3.4.75.tar.gz

2
Tips, Tricks and Guides / Multi boot on cubieboards
« on: January 13, 2014, 12:38:04 am »
I've uploaded a basic multi-boot uInitrd: http://dl.cubieforums.com/patwood/bootselect.tar.gz

It works by booting the kernel with a ramdisk and an init program that lists the available partitions and lets you select one for booting. If it's not a linux root fs, it'll complain and ask again.

There are two versions: uInitrd.serial and uInitrd.tty1; they interact with the serial debug port and tty1, respectively.  The file uEnv.tty1 shows the lines that need to be added to uEnv.txt to enable this for tty1; note that you cannot have another root= line in uEnv.txt following the root=/dev/ram.

Here's how it works:

1. u-boot runs the uenvcmd line during startup, which loads the uInitrd.tty1 ramdisk into memory at location 0x44000000.

2. u-boot eventually gets around to running the autoboot line, which has replaced the default boot command with

 bootm 0x48000000 0x44000000

which tells the kernel there's a ramdisk at location 0x44000000.

3. the kernel boots and uses /dev/ram (the ramdisk at 0x44000000) as the root file system.

4. the kernel runs /sbin/init (one of several default locations for the boot-time init program), which is a small shell script that displays the partition selection, reads the user's response, attempts to mount it, and if successful does a chroot and runs the real /sbin/init script.

Here's what the prompt looks like:

Code: [Select]
1   /dev/nand1: SEC_TYPE="msdos" LABEL="Volumn" TYPE="vfat"
2   /dev/nand4: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
3   /dev/nand5: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
4   /dev/nand8: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
5   /dev/nand9: LABEL="PRIVATE" UUID="5043-07F4" TYPE="vfat"
6   /dev/nand10: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
7   /dev/nand11: LABEL="SUGAR" UUID="199A-07D0" TYPE="vfat"
8   /dev/mmcblk0p1: SEC_TYPE="msdos" UUID="815B-BF7D" TYPE="vfat"
9   /dev/mmcblk0p2: UUID="764506f2-95cd-48c9-8cde-a09534ff147e" TYPE="ext4"
10   /dev/sda1: LABEL="cubieboard" UUID="8dd66cca-51df-4153-8493-a44d096c1c70" TYPE="ext4"

select a root block device:

In this case, /dev/sda1 is on a USB stick.  Entering 10 produces the following:

Code: [Select]
select a root block device: 10
mounting /dev/sda1
<3>EXT3-fs (sda1): error: couldn't mount because of unsupported optional features (240)
[  130.616684] EXT3-fs (sda1): error: couldn't mount because of unsupported optional features (240)
<3>EXT2-fs (sda1): error: couldn't mount because of unsupported optional features (240)
[  130.637052] EXT2-fs (sda1): error: couldn't mount because of unsupported optional features (240)
<6>EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[  130.678971] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
booting image from /dev/sda1

If you want to use the serial port for selection instead of tty1, simply replace uInitrd.tty1 with uInitrd.serial in uEnv.txt.

This currently only works with the mmc version of u-boot, so no multi-boot on nand yet; also, it requires a distro that uses /sbin/init and not some from other  location (e.g., /init).  Since the kernel has to be loaded first in order for this to interact with the HDMI or VGA port, the distro that you boot should have the corresponding modules in /lib/modules; otherwise, the only drivers you'll have are the built-in ones.

Like any initial implementation of something new, this should be considered experimental until it's been thoroughly tested.

3
Cubieboard v3 Images (Cubietruck) / Cubiuntu0.6.5c for CB2 and CT
« on: January 11, 2014, 06:10:18 pm »
I have uploaded a new Cubiuntu A20 for both Cubieboard V2 and Cubietruck.  It can detect the difference between the two boards (based on the fact that the CT has 2GB of RAM) and load the appropriate script.bin file for each: http://dl.cubieforums.com/patwood/Cubiuntu0.6.5c-a20.img.xz

Note that other than the dual-boot feature, there is no difference on the CB2 between this version and Cubiuntu0.6.5b-a20.img, other than some drivers in /etc/modules for the CT that get loaded (bt_gpio and bcmdhd -- you can remove them on the CB2) but have no effect on the CB2.

It uses the OS build referenced in this topic: http://www.cubieforums.com/index.php/topic,1413.0.html.

Note for tinkerers:  changing the u-boot on this distro will break the dual-boot feature.  I will post more information and upload the u-boot changes to my github repo for supporting dual-boot.

4
Cubieboard v2 OS (A20 Based) / g_ether weirdness
« on: January 10, 2014, 12:49:02 am »
Has anyone noticed that with g_ether, you have to plug the cable into the host and CB OTG port before installing the g_ether module?  Otherwise, you get this message:

Code: [Select]
WRN:L2762(/home/pwood/arm/mk802/linux-sunxi/drivers/usb/sunxi_usb/udc/sw_udc.c):ERR: usb device is not active
and no connection when you plug in the cable?  Sometimes rmmod g_ether/modprobe g_ether works, but the multiple runs of modprobe g_ether also sometimes crash the kernel.

Has anyone found a workaround that either loads g_ether when the a host plugs into the OTG port or lets it wait until one plugs in before finishing loading?

5
Cubieboard v3 OS (Cubietruck) / 3.4.75+ kernel for CB2 and CT
« on: January 08, 2014, 11:01:13 pm »
I've uploaded a build of the 3.4.75 kernel that runs on both the Cubieboard2 and Cubietruck.  It's merged from the linux-sunxi/sunxi-3.4 branch of about December 23rd, and includes the Broadcom driver from Benn's 3.4.67 kernel (sunxi-3.4-ct-v101): http://dl.cubieforums.com/patwood/A20-kernel-3.4.75.tar.gz.  Edit: the kernel no longer contains the "-ct" in its name.

The git repository is here: https://github.com/patrickhwood/linux-sunxi/tree/pat-3.4.75.  Edit: the repo branch no longer contains the "-ct" in its name.

Edit: 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.  See the posting later on in this thread for more information.

What's working:

Gbit ethernet and wifi on CT (put bcmdhd in /etc/modules to auto load the driver)
100Mbit ethernet on CB2
CedarX
Mali
USB OTG (and g_ether)
GPIO, LED, all the other usual stuff

Note: sunxi-gmac and sunxi-emac are built in and don't need to be loaded on boot from /etc/modules.  Also, all the modules from my earlier kernels are still there, but most have not been tested on the CT.

What's not working:

Bluetooth on CT (maybe it is, but I can't get brcm_patchram_plus to cooperate). Edit: fixed, but doesn't always load the firmware consistently.
8192cu driver refuses to load on the CT (works fine on CB2).

What's next:

1. updating the Broadcom driver to the latest version.
2. updating the branch to the latest stage/sunxi-3.4 version. Edit: merged 3.4.79 kernel uploaded.
3. put together a single cubiuntu distro for CB2 and CT. Edit: new dual-boot Cubiuntu distro uploaded.

6
Cubieboard v2 OS (A20 Based) / 3.4.75+ kernel for CB2 and CT
« on: January 08, 2014, 11:00:27 pm »
I've uploaded a build of the 3.4.75 kernel that runs on both the Cubieboard2 and Cubietruck.  It's merged from the linux-sunxi/sunxi-3.4 branch of about December 23rd, and includes the Broadcom driver from Benn's 3.4.67 kernel (sunxi-3.4-ct-v101): http://dl.cubieforums.com/patwood/A20-kernel-3.4.75-ct.tar.gz

The git repository is here: https://github.com/patrickhwood/linux-sunxi/tree/pat-3.4.75-ct

What's working:

Gbit ethernet and wifi on CT (put bcmdhd in /etc/modules to auto load the driver)
100Mbit ethernet on CB2
CedarX
Mali
USB OTG (and g_ether)
GPIO, LED, all the other usual stuff

Note: sunxi-gmac and sunxi-emac are built in and don't need to be loaded on boot from /etc/modules.  Also, all the modules from my earlier kernels are still there, but most have not been tested on the CT.

What's not working:

Bluetooth on CT (maybe it is, but I can't get brcm_patchram_plus to cooperate). Edit: fixed.
8192cu driver refuses to load on the CT (works fine on CB2).

What's next:

1. updating the Broadcom driver to the latest version.
2. updating the branch to the latest stage/sunxi-3.4 version.
3. put together a single cubiuntu distro for CB2 and CT.

7
Projects / mpd server
« on: January 01, 2014, 12:23:56 pm »
I'm currently listening to a portable speaker connected to the HP jack on my CB1 running mpd. It's also streaming out a 128Kbit stream to port 8000; chrome plays it directly as do mplayer and vlc.

I've got Droid MPD Client 1.4 installed on my phone and tablet for remote control.

Currently playing:

Code: [Select]
[linaro-ubuntu-desktop]/etc: mpc
Rolling Stones - Neighbours
[playing] #33/98   0:33/3:33 (15%)
volume: 65%   repeat: on    random: on    single: off   consume: off

Next steps: output to BT and an HDMI sound bar.
Ultimate goals: stream to Chromecast app, integrate internet radio streams from pandora, spotify, etc.

Edit1: Okay, so streaming generic internet radio stations is simply a matter of dropping the m3u playlists into the /var/lib/mpd/playlists directory.  Now I need to decide if I want to bother recompiling mpd to enable the last.fm plugin.  Looks like pandora might be a pain to set up.

Edit2: So last.fm support has been discontinued as of version 0.18.  Bah! Humbug!  I enabled Soundcloud instead.  Now I just need to create an account.

8
Cubieboard v2 Images (A20 Based) / Cubiuntu 0.6 for A20 with 3.4.75+ kernel
« on: December 30, 2013, 09:17:00 pm »
I have uploaded a new CUBIUNTU for the A20 with the latest 3.4.75+ kernel.  HW video decode is working, and libhybris is integrated: http://linux-sunxi.org/CedarX/libve.  This solves issues with weighted P-frame prediction in files like the Sintel movie trailer described here: http://linux-sunxi.org/CedarXVideoRenderingChart.

http://dl.cubieforums.com/patwood/Cubiuntu0.6.5b-a20.img.xz
size: 901406416, md5: 994133991092ca09a1d0e9e44ed31353

As before passwords are root/root linaro/linaro.

No, xbmc isn't in this version.


EDIT: This version is obsolete and unsupported (and removed).  See http://www.cubieforums.com/index.php?topic=568.0 for a newer distro.

9
Cubieboard v2 OS (A20 Based) / 3.4.67+ kernel
« on: November 24, 2013, 06:42:47 pm »
I have uploaded a build of the 3.4.67 kernel pulled from the stage/sunxi-3.4 linux-sunxi git repository today (Nov 13th is the most recent commit) + an update for the Realtek 8188eu wifi adapter: http://dl.cubieforums.com/patwood/A20-kernel-3.4.67.tar.gz

The stage/sunxi-3.4 and pat-3.4.67 branches on my github repo at https://github.com/patrickhwood/linux-sunxi have been updated.

Note that the cedar video decoder driver for the A20 requires an updated libcedarx from here: https://github.com/jemk/libcedarx and not the willswang version, which has not incorporated the latest patch.

10
Cubieboard v1 OS (A10 Based) / 3.4.67+ kernel
« on: November 24, 2013, 06:39:57 pm »
I have uploaded a build of the 3.4.67 kernel pulled from the stage/sunxi-3.4 linux-sunxi git repository today (Nov 13th is the most recent commit) + an update for the Realtek 8188eu wifi adapter: http://dl.cubieforums.com/patwood/A10-kernel-3.4.67.tar.gz

The stage/sunxi-3.4 and pat-3.4.67 branches on my github repo at https://github.com/patrickhwood/linux-sunxi have been updated.

11
Cubieboard v2 OS (A20 Based) / Ubuntu 13.10 developer for A20
« on: October 15, 2013, 05:58:21 pm »
I have uploaded an A20 build of the Ubuntu 13.10 (Saucy Salamander) core distribution taken from here a couple of days ago: http://cdimage.ubuntu.com/ubuntu-core/daily/current and combined it with the latest 3.4.61 kernel+modules here: http://dl.cubieforums.com/patwood/A20-kernel-3.4.61.tar.gz.
The download is here: http://dl.cubieforums.com/patwood/saucy-core-developer-20131013-A20-3.4.61.img.xz and is only 133MB; the 590MB root fs fits on a 1GB SD card.  The file size is 138596052 bytes and the md5sum (compressed file) is c6ad3257237b6aa59725593b2e1e3d0e.


Edit: this image has been superseded by this one: http://dl.cubieforums.com/patwood/saucy-13.10-ct-cb2-3.4.75.img.xz.  It was created from the official 13.10 build for armhf from here: http://cdimage.ubuntu.com/ubuntu-core/releases/saucy/release/ and the 3.4.75+ kernel from here: http://dl.cubieforums.com/patwood/A20-kernel-3.4.75-ct.tar.gz (the previous image was based on a pre-release build from about a week before).  It supports both CB2 and CT dual-boot and has OTG, with g_ether loaded at startup.  The file size is 128655692 bytes and the md5sum (compressed file) 335c481c71e915f1cd66e33ef0ec912d.

Edit2: I have removed the saucy-core-developer-20131013-A20-3.4.61.img.xz due to problems with replacing the kernel on the ext4 root fs.  Please use the newer image instead.

This is useful for headless servers and do-it-yourself image builders.  apt-get is installed and updated, along with openssh, networking (including wireless), and developer tools.  There's no GUI, but X and desktops can be installed with apt-get.  HDMI console framebuffer and virtual terminals are supported. Note that if you want to use Mali, G2D, or CedarX, you should remove the extraargs settings in /boot/uEnv.txt; similarly, the HDMI settings are currently locked at 1280x720p60 in extraargs to support the widest array of monitors and TVs.

root password is root, but the serial console and virtual terminal tty1 are automatically logged in as root.

I've also made it easy to boot this system with the SD card mounted read-only, and various system dirs that need write access are mounted as ramdisks (e.g., /run, /tmp, /var/tmp, /var/cache, /etc).  To enable this, copy /boot/uEnv-ro.txt over /boot/uEnv.txt; to switch back to writable SD, copy /boot/uEnv-rw.txt over /boot/uEnv.txt.  I've posted the mechanisms used here separately in the initrd.gz download.

Note: if you plan on deploying something based on this distro, make sure you disable ssh or generate a new set of ssh host keys:

Code: [Select]
rm /etc/ssh/ssh_host_*
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

Note: unlike a lot of distros, this one has only one partition.  I've done away with the FAT32 boot partition; all the boot files (uImage, script.bin, uEnv.txt) live on the root partition in /boot.  I've gone back to a dual-partition layout, mostly because u-boot seems fussy about loading large files from ext4 file systems.

12
Cubieboard v2 OS (A20 Based) / 3.4.61+ kernel
« on: October 15, 2013, 12:01:18 am »
I have uploaded a build of the 3.4.61 kernel merged from the stage/sunxi-3.4 linux-sunxi git repository today (Oct 9th is the most recent commit) plus the cedar HW patches for the A20: http://dl.cubieforums.com/patwood/A20-kernel-3.4.61.tar.gz

It has a few new drivers that people have requested (HIDRAW, HID_LOGITECH, and other Logitech drivers, Reiser FS, XFS).

The stage/sunxi-3.4 and cedar branches on my github repo at https://github.com/patrickhwood/linux-sunxi have been updated.

The 3.4.43 kernel is now deprecated.

13
Cubieboard v1 OS (A10 Based) / 3.4.61+ kernel
« on: October 14, 2013, 11:57:19 pm »
I have uploaded a build of the 3.4.61 kernel pulled from the stage/sunxi-3.4 linux-sunxi git repository today (Oct 9th is the most recent commit): http://dl.cubieforums.com/patwood/A10-kernel-3.4.61.tar.gz

It has a few new drivers that people have requested (HIDRAW, HID_LOGITECH, and other Logitech drivers, Reiser FS, XFS).

The stage/sunxi-3.4 and cedar branches on my github repo at https://github.com/patrickhwood/linux-sunxi have been updated.

The 3.4.43 kernel is now deprecated.

14
I've uploaded a small patch to the Linaro 13.04 developer for A20 image that allows it to boot with the SD card's rootfs mounted read-only: http://dl.cubieforums.com/patwood/initrd.tar.  It works by running a custom script at boot time before the system's init process is started.

To use it, untar it in /boot on the disribution (note: it will overwrite uEnv.txt, so you may want to save a copy of yours).

By default, it will boot into a bash prompt on the serial port and tty1 before running init; /tmp, /var, and /etc are on regular ramdisks, and /root is on the initrd ramdisk (only about 2.5MB free space available on this).  All the other system directories are mounted read-only from the SD card's root fs, and the entire SD card is mounted read-only on /mnt/root.

You can poke around and see how it's set up; changes won't be persistent, and you can just unplug the board if you like without damaging anything (commands like shutdown and halt won't work at this point in the boot process).  The script that sets all this up is in /init/init.

To test booting into multi-user mode, just type:

Code: [Select]
exec /sbin/init
on the serial console.

At this point you'll be at run level 2, the network should be available, and if you have /etc/network/interfaces set up for wifi, that should work as well.  shutdown, halt, poweroff, and the power button will work now.

In addition to uEnv.txt, the tar archive contains the following files:

initrd.tar.gz -- original files for the initrd file system
initrd.gz -- compressed ext2 initrd file system
uInitrd -- initrd run though mkimage to produce a file u-boot will load

uEnv.txt was changed to load uInitrd and boot the kernel with its address as a parameter and set root=/dev/ram to use this file system as the root device instead of the SD card.

You can mount the initrd file system (as root; gunzip the file first) if you want to make changes with:

Code: [Select]
mount initrd /mnt
and you can rebuild uInitrd (don't forget to unmount and gzip the initrd file first) with:
Code: [Select]
mkimage -A arm -O linux -T ramdisk -C none -n initrd-3.4.61-sun7i+ -d initrd.gz uInitrd

You can force the system to boot into multi-user mode by putting the line

Code: [Select]
export RUNEXEC=1

in /initconfig on the SD card's root file system.  (You can also put other initialization commands in this file if you want to make changes without regenerating the initrd file system.)

To revert back to the original distro (with the SD card mounted read-write), just restore your /boot/uEnv.txt file.

This initrd will also work on an A10 linaro/ubuntu distro (but hasn't been tested on one, and has only been tested with this linaro distro on the A20).

Edit: I have also tested this on Cubiuntu A20; you'll need to use the uEnv-CU0.6.txt file in place of uEnv.txt (you may need to change the kernel= line from uImage.3.4.61-sun7i+ to uImage.3.4.43-sun7i+ depending on which one you're using).  I was able to get lxde running and play videos with vlc.

You can get the Linaro 13.04 distro here: http://dl.cubieforums.com/patwood/linaro-quantal-developer-20130422-342-A20-3.4.61.img.xz and read more about it here: http://www.cubieforums.com/index.php/topic,838.0.html

15
Cubieboard v2 Images (A20 Based) / Linaro 13.04 developer for A20
« on: October 02, 2013, 02:02:07 pm »
I have uploaded an updated Linaro Quantal developer distribution for the A20 with the latest kernel.  It is at http://dl.cubieforums.com/patwood/linaro-quantal-developer-20130422-342-A20-3.4.61.img.xz.

It's the same distro as http://dl.cubieforums.com/patwood/linaro-quantal-developer-20130422-342-A20.img.gz with the following changes:

1. Newer, faster u-boot.
2. 3.4.61 kernel (about 2 weeks old from last night -- includes working CedarX driver for A20), with lots more drivers.
3. Fix problem in /etc/network/interfaces to allow hotplug of eth0 and auto dhcp.

As before, root/root and linaro/linaro.  Distro is 1GB with about 250MB free; use gparted or fdisk/resizefs to make it bigger.

Edit: I just updated with the stage/sunxi-3.4 kernel pulled last night.  File size is 147603532 bytes, md5 is 3c5db4fc01051b3e9c9cf3b8d9db4f18.

Pages: [1] 2 3