Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Picuntu 4.5 on MK808 & MK808b - SUCCESS!!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Picuntu 4.5 on MK808 & MK808b - SUCCESS!!

    Well I have succeeded in installing Picuntu 4.5 on my MK808b. One caveat, I don't have wi-fi working but I'm using a usb ethernet adaptor. I'll detail my steps here. **You will need a Linux box, unless someone knows how to unpackage the system.img file on Windows and/or can host the unpackaged files. I was unable to mount the .img file in PowerISO on my Windows 8 machine. I also want to thank conred for his help as well as mmm123 and Galland for all the additional files and writeups.

    I'll detail this in two stages. First stage is installing the firmware on your MK808 the second is setting up your USB/SD card with the Picuntu software.

    Things you will need:
    1) A MK808 or MK808b device
    2) An SD card or USB stick 2G or greater
    3) Finless Bob's 1.7 ROM
    4) Picuntu 4.5 easy installer
    5) MK808 3.0.36 Kernel and mod+firmware from here http://hwswbits.blogspot.nl/2013/05/...r-picuntu.html
    (** FYI - I never got the 720P kernel to work only the 1080P)
    6) You will also need to follow the directions from Galland on enabling the 3D drivers after install here http://hwswbits.blogspot.com/2013/04...ntu-linux.html . I ended up downloading all the files he has build (xorg.conf, rk30fb_drv.so, and the mali-package) so that I could add them to my SD card while I was building the system.
    7) A linux system

    First - Installing firmware on the MK808/b
    1) Download and install Finless Bob's 1.7 Rom to start with a clean slate. Don't forget to Erase NAND and install all checked boxes.

    2) Boot TV stick and go to his reboot app and reboot to recovery.

    3) Put MK808 into flash mode and uncheck everything except recovery. Select Galland's 3.0.36 kernel (720 or 1080) (again I only got 1080 to work) and flash to recovery img.

    4) Test by booting up. You should see linux start scrolling on the screen and will end when it can't find the Picuntu software

    Second - Prepare the USB/SD card
    1) I used linux and Gparted to create a partition labeled "linuxroot" . I also selected formating to EXT4 and market a flag for the "boot" partition option.

    2) Download the Picuntu 4.5 software and extract to a folder.

    3) You can delete everything except for the system.img file in the flash rom folder

    4) You need to mount or extract the files from the system.img folder. I used Furius ISO (on linux) to mount the system.img file and extract the files to a folder on my PC. (I tried to use PowerISO on my Win8 machine but it didn't recognize the file)

    5) In the system.img (i'll call this the Picuntu file system) extracted folder you will now have a bunch of folders. Rename or delete the folders /lib/modules/3.0.36 and /lib/firmware .
    5.b) Copy this folder to your USB or SD card with a cp -a command. The folders should be in the root of your storage device.

    6) Download the mods+firmware from Galland here http://hwswbits.blogspot.nl/2013/05/...r-picuntu.html

    7) Extract the files/folders (/lib folder) and place it on your Picuntu MicroSD's root folder (/)

    8) Make sure they have all the same user and group owner. (should be root:root) when I copied the mods+firware file they took on other user and group ownership which messed me up. (I use cp -a for almost everything to make sure the permissions are kept)

    9) Follow these direction from Galland thru #5. Stop before #6. (I'm going to list them below just so we have everything documented in one place.
    http://hwswbits.blogspot.com/2013/04...ntu-linux.html

    10) Copy xorg.conf (from above) and place it on your Picuntu MicroSD's folder /etc/X11/

    11) Copy rk30fb_drv.so (or compile it yourself) and place it on your Picuntu MicroSD's folder /usr/lib/xorg/modules/drivers/

    12) Modify /etc/rc.local by commenting (precede with #) existing lines that use "fbset" and adding the following new lines: (**FYI I didn't have a fbset line so I added the below before the "if" scrip start)

    fbset -rgba 8/16,8/8,8/0,8/24 -a
    chmod 666 /dev/mali /dev/ump


    13) Modify /etc/modules to add the following lines:
    rk29-ipp
    ump

    disp_ump
    mali
    drm
    mali_drm

    14)
    Get the mali package, uncompress and you will need ONLY this file: mali400_2.1-13_armhf.deb
    Place it on your Picuntu MicroSD's root folder (/) - This will be used and installed after we boot linux on the stick (This is the end of step #5 from Galland. Don't run step #6 untill you have installed the mesa drivers, detailed below)

    15) Plug SD or USB stick into MK808 and start booting. If everything has the correct permissions you should boot and it will try the graphics drivers but will fail and fall back to cmd line.

    16) log in using user: picuntu pass: 12qwaszx

    17) To install Mali Driver package run:
    sudo dpkg -i mali400_2.1-13_armhf.deb

    18) To install Mesa Drivers run: (You need to do this before Galland's step #6 or you won't have the directories installed.
    sudo apt-get install libegl1-mesa-drivers

    19) Now you can run Galland's step #6:
    Run the following commands:

    sudo mv /usr/lib/arm-linux-gnueabihf/mesa-egl/ /usr/lib/arm-linux-gnueabihf/.mesa-egl/
    sudo ln -s /usr/lib/libMali.so /usr/lib/libEGL.so
    sudo ln -s /usr/lib/libMali.so /usr/lib/libEGL.so.1.4
    sudo ln -s /usr/lib/libMali.so /usr/lib/libGLESv1_CM.so
    sudo ln -s /usr/lib/libMali.so /usr/lib/libGLESv1_CM.so.1.1
    sudo ln -s /usr/lib/libMali.so /usr/lib/libGLESv2.so
    sudo ln -s /usr/lib/libMali.so /usr/lib/libGLESv2.so.2.0

    -----------------------------------------------------------------------
    Then if you enter: ll /usr/lib | grep libMali

    The output should look something like this:
    lrwxrwxrwx 1 root root 19 abr 16 17:58 libEGL.so -> /usr/lib/libMali.so
    lrwxrwxrwx 1 root root 10 feb 22 02:06 libEGL.so.1.4 -> libMali.so
    lrwxrwxrwx 1 root root 19 abr 16 17:58 libGLESv1_CM.so -> /usr/lib/libMali.so
    lrwxrwxrwx 1 root root 10 feb 22 02:06 libGLESv1_CM.so.1.1 -> libMali.so
    lrwxrwxrwx 1 root root 19 abr 16 17:58 libGLESv2.so -> /usr/lib/libMali.so
    lrwxrwxrwx 1 root root 10 feb 22 02:06 libGLESv2.so.2.0 -> libMali.so
    -rw-r--r-- 1 root root 731492 feb 22 02:06 libMali.so

    20) I didn't have a visible cursor arrow when I booted into the GUI so go ahead and install
    sudo apt-get install dmz-curser-theme

    20) To help lockups you may want to set your cpu freq so you can install this:
    sudo apt-get install cpufrequtils
    - run sudo cpufreq-set -u 1512000

    That should do it. Reboot and enjoy. I'm no expert so I'm not sure if I'll be able to help but I have been able to repeat this 3 times, due to wanting to use different USB and SD options. Good luck.


    --------------------------------------------------------------------------------------
    Hey guys,

    I've been following Picuntu on the MK808 tv sticks and was excited about trying it out. I just don't have the linux experience or a 4G SD card (I have a 2G SD card) to run the "bloated" RC3. I noticed that some of you have been able to load 4.5 on a 3066 (MK808) device and have stated how much faster it is. I am looking for a faster, easier to install (Windows based), version of Picuntu and 4.5 looked to fit the bill. However, I noticed that there isn't support for these earlier stick. I would also like the later release of Ubuntu 13 vs 12 in the RC3 release. Since I'm not masterful at this I will tell you what I tried and I hope others will provide some insight into how they were able to make 4.5 work on their devices.

    The components I downloaded:
    Finless Bob's 1.7 ROM - for bootloader bin
    Picuntu 4.5 easy installer
    MK808 3.0.36 Kernel from here http://hwswbits.blogspot.nl/2013/05/...r-picuntu.html

    I noticed that when I tried to use the Picuntu 4.5 installer without modification that the RK3188 boot loader wouldn't even load on the MK808. This made since so I used the bootloader from Finless Bob's 1.7 Rom which was RK30XXLoader(L)_V1.18.bin. This allowed me to flash the firmware. I have outlined the Flash Tool parameters I used to try to get it to work.

    1 - Loader - RK30XXLoader(L)_V1.18.bin
    2 - parameter - unchanged
    3 - misc - unchecked
    4 - kernel - MK808 3.0.36 kernel
    5 - boot -unchanged - I also tried to change it to the boot for Finless but no luck.
    6 - system - unchanged
    7 - recovery - MK808 3.0.36 kernel
    8 - backup - unchecked

    What I see when the system starts up is the linux boot txt starting to scroll on the screen but then gives me a tty error and stops.

    Lastly, there are some other tips that Galland has posted when running Picuntu on RK3066 platforms. Here is the link.
    http://hwswbits.blogspot.com.es/2013...ems-fixes.html
    You may also want to create a swap file like Galland recommends on his 3D acceleration and kernel page.
    The way to do it is documented here.
    http://www.cyberciti.biz/faq/linux-a...ap-file-howto/

    Thanks for any assistance here. I'm sure there are others who want to have a faster and easier Picuntu install for their MK808s.
    Last edited by hizzle; 11-21-2013, 21:10.

    #2
    The linux kernel boots but it doesn't find a rootfilesystem. You need an ext4 rfs labeled "linuxroot" on sd-card or usb-drive.

    In case of picuntu 4.5 the rfs is in the system.img file. You need to mount it and copy the content to sd-card.

    Don't forget to copy also the kernel modules + firmware to linuxroot. And as this release is intended to run on internal flash, aloksinha put a script to /etc/rc.local to resize the filesystem. Disable it by removing /first_boot file.

    Comment


      #3
      Originally posted by conred View Post
      The linux kernel boots but it doesn't find a rootfilesystem. You need an ext4 rfs labeled "linuxroot" on sd-card or usb-drive.

      In case of picuntu 4.5 the rfs is in the system.img file. You need to mount it and copy the content to sd-card.

      Don't forget to copy also the kernel modules + firmware to linuxroot. And as this release is intended to run on internal flash, aloksinha put a script to /etc/rc.local to resize the filesystem. Disable it by removing /first_boot file.
      Conred, Thanks for the help. I was able to mount the image and copy the contents to my EXT4 USB stick. When you say that I need to copy the kernel modules + firmware to linuxroot do you mean the .img files or open and extract them as well? Also, I assume that I should use the kernel file 3.0.36 that I mentioned I was using for the RK3066 instead of the one in the PicUntu 4.5 package for RK3188. Is that correct?

      Comment


        #4
        Correct, the rk3188 kernel will not work an rk3066 devices.
        The modules that come with picuntu 4.5 RFS are also for the rk3188 kernel and should be replaced by the modules compiled by Galland.

        Get mod+fz.7z from the link above and copy /lib/modules/3.0.36 and /lib/firmware to sd-card.
        First rename the old folders in picuntu rfs.

        If you want to make a clean install first flash Finless Rom 1.7 or 2.1 and then only Gallands 3.0.36 kernel to recovery partition (if you want to use Android and Linux) or to the kernel partition (if you just want to boot into linux).

        Edit: And I think you have to setup Mali hardware acceleration to get correct display output in the X window system and correct colors in the console.
        Good luck.
        Last edited by conred; 11-18-2013, 13:14.

        Comment


          #5
          Conred, Thanks again for the additional information.

          I have some more details for you after I tried what you said.
          First quick question, for my USB stick (4Gb) I formatted it with my Ubuntu 13 box to an EXF4 format and named it linuxroot. I know that using the tool pre-picuntu.sh that it actually builds partitions etc... I just formatted my stick. Is that ok or do I need to create special partitions etc?

          To prepare my USB stick I extracted all of the system.img files and copied them, via a cp -a command to keep the correct permissions, to my USB stick. I removed the first_boot file in the linuxroot <root> directory. I then downloaded the mod+fz.7z from the link above and copied /lib/modules/3.0.36 and /lib/firmware to the USB Stick. Prior to that, I renamed the old folders in Picuntu rfs as you recommended. I think that should be all for my USB stick config.

          Next, I made a clean install on my MK808b first by flashing Finless Rom 1.7. I then flashed only Gallands 3.0.36 kernel to the recovery partition. It gave me a black screen when booting up. (I noticed that it kept the "device found" in the Flash tool when it was in this black screen) I then tried flashing the 3.0.36 kernel to the kernel img. Same thing, black screen. I used the Finless bootloader (RK30xxLoader(L)_V1.16.bin) the parameter file and boot.img from the PicUntu 4.5 Flash tool and it finally booted with the linux kernel. It stopped after a few lines. <see screenshot> I think I'm getting close but still not there yet. Thanks again for all the help.

          Click image for larger version

Name:	Picboot.jpg
Views:	2
Size:	197.5 KB
ID:	431263

          Comment


            #6
            Originally posted by hizzle View Post

            [ATTACH=CONFIG]4028[/ATTACH]
            Your screenshot shows, that you don't have partition table on USB stick.
            go back to linux, use fdisk (or cfdisk) to create a partition table, then create 1 partition, format it ext4, label linuxroot, etc.

            Comment


              #7
              mmm123, thanks. I don't know if I'm better off or worse off now. I was able to create the EXF4 partition and table with the label - linuxboot via GParted. I reformatted and copied all the files over. Then booted up and this is what I see.

              Click image for larger version

Name:	Picboot2.jpg
Views:	1
Size:	194.0 KB
ID:	431264

              Comment


                #8
                Well guys, I got it working... kind of. I found out that I needed to build the partition with a "boot" flag parameter. That got me pretty close. I then flashed the 3.0.8 kernel and was able to boot into Picuntu however since I didn't have the modules + firmware I didn't have any drivers for my USB ethernet stick. But, the graphics looked correct. I did some searching but couldn't find anything. I went back and flashed the 3.0.36 kernel in my recovery and ran into other issues... You saw my picture earlier that it wouldn't boot. Well, I found out that when I copied the modules and firmware to the USB drive that the owner and group had changed. I changed them back and was able to boot using the 1080p 3.0.36 kernel... however the image looks like this. The 720p module gets hung at the same place. (Img 3) I don't know why it'd be any different. The image is skewed and green but this time it did load my drivers for the USB ethernet stick from the 3.0.36 kernel files I added. I'm feeling really good, and close, but not quite there. I'll make sure to write up a tutorial for everyone after we figure this all out. Thanks again.

                Click image for larger version

Name:	picboot 4.jpg
Views:	1
Size:	188.5 KB
ID:	431274 Click image for larger version

Name:	picboot 3.jpg
Views:	1
Size:	65.2 KB
ID:	431275Click image for larger version

Name:	Picboot.jpg
Views:	2
Size:	197.5 KB
ID:	431276

                Comment


                  #9
                  Originally posted by hizzle View Post
                  Well guys, I got it working... kind of.
                  keep it up, buddy. you´re close. next week I´ll try to install it in my mk808.

                  Comment


                    #10
                    Re: Picuntu 4.5 on MK808 &amp; MK808b

                    Great news, thanks for info.

                    Sent from my GT-I9305 using Tapatalk 2

                    Comment


                      #11
                      Originally posted by hizzle View Post
                      .

                      [ATTACH=CONFIG]4042[/ATTACH]
                      Wrong color usually means wrong pixel format. Try to experiment with "fbset" or X server command line parameters.

                      Comment


                        #12
                        You got it, rest is polishing.

                        Had the same on my mk808b.
                        As I said you have to setup Mali hardware acceleration to get correct display output in the X window system.

                        This line added to /etc/rc.local will fix colors:
                        Code:
                        fbset -rgba 8/16,8/8,8/0,8/24 -a


                        Edit:
                        Recently someone found the reason for the color issue: https://www.miniand.com/forums/forum...ge=5#post-8978
                        Kernel needs to be compiled with different LOGO settings.

                        And if you get random deadlocks, install 'cpufrequtils' and add this line to rc.local to set maximum frequency to 1,51 Ghz:
                        Code:
                        cpufreq-set -u 1512000
                        See my posting here: https://www.miniand.com/forums/forum...ge=5#post-9016
                        Last edited by conred; 11-19-2013, 11:40.

                        Comment


                          #13
                          Well guys good news I got it but with one minor caveat!!! I don't have a visible mouse pointer anymore. My mouse works but it doesn't have a visible arrow. If I can get that solved I'm golden. Thanks again for all your help Conred.

                          I went back and followed the directionsand and installed the 3D HW acceleration Mali drivers as you pointed out. Everything went well except for this line in step #6. http://hwswbits.blogspot.com/2013/04...ntu-linux.html

                          sudo mv /usr/lib/arm-linux-gnueabihf/mesa-egl/ /usr/lib/arm-linux-gnueabihf/.mesa-egl/

                          I don't have a mesa-egl file or directory. I'm not sure if I'm missing anything here. It sounds like some others have had the vanishing cursor issue but I didn't see any definitive answers. The cursor was working before I conduced the 3D HW acceleration steps (however the screen and color were off). It also worked when I used the 3.0.8 kernel. It is just now not working. Any advice? I am guessing that the new .conf file is point to a location where the mouse icon doesn't reside or something like that... Thanks again.



                          Click image for larger version

Name:	pic boot 5.jpg
Views:	1
Size:	184.2 KB
ID:	431279

                          Comment


                            #14
                            You're welcome.

                            Installing package 'dmz-cursor-theme' should solve the missing cursor problem if I remember correctly.
                            Code:
                            sudo apt-get install dmz-cursor-theme
                            Also had the missing mesa-egl directory and the hardware acceleration was not working with es2gears. Only got 40 fps, after fixing it 150 fps.
                            But I can't remeber how I fixed it, maybe later it comes to mind ...
                            Last edited by conred; 11-19-2013, 22:19.

                            Comment


                              #15
                              Try this:
                              Install 'libegl1-mesa libgles1-mesa libgles2-mesa' and check if folder /usr/lib/arm-linux-gnueabihf/mesa-egl was created.
                              Then rename it, install 'mesa-utils-extra' and test with 'es2gears' if Mali acceleration works.

                              Should look like this:
                              Code:
                              [email protected]:~$ es2gears 
                              EGL_VERSION = 1.4 Linux-r3p2-01rel0
                              vertex shader info: 
                              fragment shader info: 
                              info: 
                              753 frames in 5.0 seconds = 150.329 FPS

                              Comment

                              Working...
                              X