Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Running Linux From SD Card or USB Flash Drive - Using Balbes150 Method And Files.

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by botfap View Post
    Hi Guys

    Small update:

    Ive got a working generic S905X sd card image with new uboot that is currently pushing up to github (s905x-sd-image.bin in sample output). Its not ready for any sort of production use yet. Im adapting it to work with the stock bootloader.

    It also works for ubuntu 16.04 using the kernel image and dtb that the github project builds. Just replace my rootfs with the odroid c2 ubuntu rootfs. Making it work with the Arch linux rootfs is next on my list as thats what im going to be using in my final use of this little project. After that I will be changing the build to generate bootfs as a separate partition so the stock bootloader can be used.

    Progeress is a bit slow at the minute. Blame the Brexit! Im in the middle of moving my businesses from the UK to Dublin and Berlin and travelling most days so its going to take a week or so for me to find the hours.

    I have had feedback from 4 different people who have successfully built working sd card images from the github project using my kernel, dtb and rootfs.

    I have had a quick look at libreelec and the aml_autoscript they use to get the stock bootloader to boot from sd. Im going to have a look at @150balbes s905_autoloader script too. With the info there I should be able to work out a method to boot from stock uboot using a fat16 boot partition. If anyone has any info or input on adapting the boot process it would be welcome.

    Edit: Os so the SD Card image didnt upload to github due to being over 100mb. Where is a good place to host it for download?
    nice progress...

    please, upload it to Mediafire, its much better than Yandex, i can resume the download with my slow internet connection (32-64kbps).
    in Yandex its always stopped if download not finished around 4 hours... and i cannot resume it...

    Thanks...
    Android TV Box - Mini M8S (Amlogic S905) - Ubuntu Mate 16.04 Arm64 - 3.14.29 with VLC (X11 Accelerated XCB), Kodi Odrobian Fbdev 16.1 (VPU Accelerated), X.org 7.7 plus Mali Fbdev 20160315-r5p1

    Comment


      I checked the possibility of installing Linux to the internal memory (eMMC) using standard partitions (FAT and EXT4) and the regular u-boot. Without having access to the source code of u-boot, which are responsible for the Assembly of the first module BL1 - use of standard sections is not obtained. Because when you make the partition table in the boot loader, it stops working. The system will not boot from eMMC. Maybe at the start u-boot checks the signature (checksum) and whenever changes are made - it does not run. Although the partition table is located in a section where the initial state is all zeroes, and obviously there is not any executable code. No where I cannot find the source code of u-boot which is going BL1. In all sources he is presented as a binary file. Maybe you can get it from Amlogic, but they only work with large manufacturers. If we could get them, at least the resulting binary module BL1 , which will be written a predefined partition table (for example, the first 4 GB of internal memory to write under Android, then 512MB FAT partition, and outline the space under the partition EXT4). Then it would be possible to have a dual system in TV set-top boxes - Android + Linux\LE etc.

      Comment


        Originally posted by balbes150 View Post
        I checked the possibility of installing Linux to the internal memory (eMMC) using standard partitions (FAT and EXT4) and the regular u-boot. Without having access to the source code of u-boot, which are responsible for the Assembly of the first module BL1 - use of standard sections is not obtained. Because when you make the partition table in the boot loader, it stops working. The system will not boot from eMMC. Maybe at the start u-boot checks the signature (checksum) and whenever changes are made - it does not run. Although the partition table is located in a section where the initial state is all zeroes, and obviously there is not any executable code. No where I cannot find the source code of u-boot which is going BL1. In all sources he is presented as a binary file. Maybe you can get it from Amlogic, but they only work with large manufacturers. If we could get them, at least the resulting binary module BL1 , which will be written a predefined partition table (for example, the first 4 GB of internal memory to write under Android, then 512MB FAT partition, and outline the space under the partition EXT4). Then it would be possible to have a dual system in TV set-top boxes - Android + Linux\LE etc.
        I have the same problem. The only access I have to AMLogic is the public repo and the BL1 loader is a binary in there. I even tried the uboot code from the odroid c2 but that also has a binary bl1, though it does appear to be a different bl1 than the stock aml uboot.

        I can only use a custom disk layout on the eMMC if I use my own clean u-boot otherwise im stuck with the following inand layout:

        # cat /proc/ntd
        dev: size erasesize name
        inand01: 400000 80000 "bootloader"
        inand02: 4000000 80000 "reserved"
        inand03: 20000000 80000 "cache"
        inand04: 800000 80000 "env"
        inand05: 2000000 80000 "logo"
        inand06: 2000000 80000 "recovery"
        inand07: 800000 80000 "rsv"
        inand08: 800000 80000 "tee"
        inand09: 2000000 80000 "crypt"
        inand10: 2000000 80000 "misc"
        inand11: 20000000 80000 "instaboot"
        inand12: 2000000 80000 "boot"
        inand13: 40000000 80000 "system"
        inand14: 30c200000 80000 "data"

        I was hoping to wipe this out and start with a clean partition table but i dont think that will be possible with stock uboot? You agree?

        In which case maybe I go the libreelec route and leave the default emmc partitioning in place and just use boot, system and data and ignore that some of the storage space is unusable. Im starting to understand uboot better now, I can see how to create an autoscript to set the needed boot params. Just a shame to leave wasted space on the emmc..

        Comment


          To change the MTD partitions is not difficult. They are described in the DTB file. You can use different variants of the DTB - separately for u-boot, one for Recovery mode and for the total system (regular Android). Now I see that most manufacturers use one option - a uniform system of allocation for all systems (u-boot Recovery Android). I plan to use the TV box in dual boot mode, you can try this option. To shrink the last partition DATA until the total size to allocate for a Android 4 GB. And add two the FAT partition (512MB) and the rest for EXT4. Thus, with minimal changes to the boot loader u-boot can be installed in the internal memory of two systems - write regular Android (to maintain compatibility in the transition period - for example, the user after the test Linux\LE, decided to go back to the old system Android). And the second system - Linux or LE. In the near future, I plan to test this option on devices s905 and s905x.


          For a full transition to Linux (to use the entire space of the eMMC under Linux), you can use the simpler partition layout, leaving only the minimum necessary set. The remaining sections to remove AI to use their place under the General system.

          If you want, I can help you create a new DTB file to the new sections.

          Comment


            balbes150 @botfap
            Hi~
            Finally S905X succeeded in booting Linux(odroid ubuntu).
            But Usb port not working and I can't use keyboard and mouse.
            I just build from http://openlinux.amlogic.com:8000/do...ca1b35f.tar.gz
            Here is part of my build https://drive.google.com/file/d/0ByF...ew?usp=sharing
            Image source is Koxx's ubuntu http://koxx3.mooo.com:8086/minimx_ubuntu_1.zip
            I just replaced dtb.img and Image files.
            Can anyone tell me howto enable usb port?

            My BOX is TX5(2G/8G)

            Comment


              Originally posted by garyang View Post
              balbes150 @botfap
              Hi~
              Finally S905X succeeded in booting Linux(odroid ubuntu).
              But Usb port not working and I can't use keyboard and mouse.
              I just build from http://openlinux.amlogic.com:8000/do...ca1b35f.tar.gz
              Here is part of my build https://drive.google.com/file/d/0ByF...ew?usp=sharing
              Image source is Koxx's ubuntu http://koxx3.mooo.com:8086/minimx_ubuntu_1.zip
              I just replaced dtb.img and Image files.
              Can anyone tell me howto enable usb port?

              My BOX is TX5(2G/8G)
              Try to check the state of usb port, with running this command.
              There is two places for the file, i dont know which is for you.
              So try to check /sys/devices/platform/dwc2_a/buspower and /sys/devices/dwc2_a/buspower
              Code:
              more /sys/devices/platform/dwc2_a/buspower
              Code:
              more /sys/devices/dwc2_a/buspower
              or

              Code:
              more /sys/devices/platform/dwc2_b/buspower
              Code:
              more /sys/devices/dwc2_b/buspower
              if you have output 0x0 then The USB Port is Turn Off
              you can Turn it On with this command.
              Example, if the file is /sys/devices/platform/dwc2_a/buspower
              Then, run this command.

              Code:
               echo 0x1 > /sys/devices/platform/dwc2_a/buspower
              I hope this will help you, for my Box Mini M8S, with kernel 3.14.29 its in /sys/devices/dwc2_a/buspower
              so i put this command in /etc/rc.local
              Code:
                echo 0x1 > /sys/devices/dwc2_a/buspower
              Android TV Box - Mini M8S (Amlogic S905) - Ubuntu Mate 16.04 Arm64 - 3.14.29 with VLC (X11 Accelerated XCB), Kodi Odrobian Fbdev 16.1 (VPU Accelerated), X.org 7.7 plus Mali Fbdev 20160315-r5p1

              Comment


                Originally posted by sukanime View Post

                Try to check the state of usb port, with running this command.
                There is two places for the file, i dont know which is for you.
                So try to check /sys/devices/platform/dwc2_a/buspower and /sys/devices/dwc2_a/buspower
                Code:
                more /sys/devices/platform/dwc2_a/buspower
                Code:
                more /sys/devices/dwc2_a/buspower
                There is no buspower file.
                Code:
                odroid@odroid64:~$ ls -al /sys/devices/dwc2_a
                total 0
                drwxr-xr-x  3 root root    0 Oct  9 06:55 .
                drwxr-xr-x 87 root root    0 Dec 31  2014 ..
                -r--r--r--  1 root root 4096 Oct  9 06:55 modalias
                drwxr-xr-x  2 root root    0 Oct  9 06:55 power
                lrwxrwxrwx  1 root root    0 Dec 31  2014 subsystem -> ../../bus/platform
                -rw-r--r--  1 root root 4096 Dec 31  2014 uevent
                odroid@odroid64:~$
                What should I do?

                Comment


                  I've compared dmesg S905 and S905X.(Libreelec)
                  I've found different usb controller between S905 and S905X.
                  S905 has EHCI(hcd) and S905X has XHCI(xhci-hcd).
                  Can anyone tell me howto enable XHCI driver on ubuntu?

                  Comment


                    Originally posted by garyang View Post

                    There is no buspower file.
                    Code:
                    odroid@odroid64:~$ ls -al /sys/devices/dwc2_a
                    total 0
                    drwxr-xr-x 3 root root 0 Oct 9 06:55 .
                    drwxr-xr-x 87 root root 0 Dec 31 2014 ..
                    -r--r--r-- 1 root root 4096 Oct 9 06:55 modalias
                    drwxr-xr-x 2 root root 0 Oct 9 06:55 power
                    lrwxrwxrwx 1 root root 0 Dec 31 2014 subsystem -> ../../bus/platform
                    -rw-r--r-- 1 root root 4096 Dec 31 2014 uevent
                    odroid@odroid64:~$
                    What should I do?
                    hmmm....
                    what about power ?
                    can you give me the info about it
                    Code:
                    more /sys/devices/dwc2_a/power
                    Edit:
                    Never Mind, i try to check the /sys/devices/dwc2_a/power/ its just a folder and no file in the folder.
                    Last edited by sukanime; 10-09-2016, 14:24. Reason: nevermind this reply
                    Android TV Box - Mini M8S (Amlogic S905) - Ubuntu Mate 16.04 Arm64 - 3.14.29 with VLC (X11 Accelerated XCB), Kodi Odrobian Fbdev 16.1 (VPU Accelerated), X.org 7.7 plus Mali Fbdev 20160315-r5p1

                    Comment


                      Originally posted by garyang View Post
                      I've compared dmesg S905 and S905X.(Libreelec)
                      I've found different usb controller between S905 and S905X.
                      S905 has EHCI(hcd) and S905X has XHCI(xhci-hcd).
                      Can anyone tell me howto enable XHCI driver on ubuntu?
                      Afaik, driver is on linux kernel side, so you need to find kernel with xhci-hcd support.
                      cek it in kernel source with make menuconfig and browse it.
                      Android TV Box - Mini M8S (Amlogic S905) - Ubuntu Mate 16.04 Arm64 - 3.14.29 with VLC (X11 Accelerated XCB), Kodi Odrobian Fbdev 16.1 (VPU Accelerated), X.org 7.7 plus Mali Fbdev 20160315-r5p1

                      Comment


                        Updated the images with Armbian (Debian \ Ubuntu)

                        Comment


                          Originally posted by balbes150 View Post
                          Updated the images with Armbian (Debian \ Ubuntu)
                          Sorry to ask, where do we look for 'the images'?
                          Thanks and congratulations for groundbreaking work!

                          Comment


                            Originally posted by Nofan Tasi View Post
                            Sorry to ask, where do we look for 'the images'?
                            Thanks and congratulations for groundbreaking work!
                            Посмотреть и скачать с Яндекс Диска

                            Comment


                              I can' seem to find the changelog for 5.21. What changed?

                              Comment


                                Not much has changed settings or updated packages to the latest versions in repo. The terminal is normally displayed.

                                Comment

                                Working...
                                X