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 canadien View Post
    Ok thanks balbes. Yes it is to run only on a usb drive as I want to keep Android for some specific streaming apps.

    So I will have to have two different images (see two usb drives)? One for librelec and the other for armbian or any other desktop (I think your image includes five of them)?

    My goal was two put both of them on the same usb drive...

    The librelec k1 plus version here.

    Simultaneous use of LE and Armbian (USB or SD) and Android (eMMC) is possible. You need to write a new script s905_autoscript.

    Comment


      Originally posted by maco222 View Post

      I am trying to run Armbian from internal memory on MXQ Pro 4K. After succesfuly copying files using install.sh script i'm getting this errors:

      Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.


      The log above come from ttl console output, but on the screen I see also sth like this:

      Code:
      Gave up waiting for root device. Common problems:
      - Boot args (cat /proc/cmdline)
      - Check rootdelay= (did the system wait long enough?)
      - Check root= (did the system wait for the right device?)
      - Missing modules (cat /proc/modules: ls /dev)
      ALERT! /dev/data /does not exists. Dropping to a shell!
      printenv gives this: http://pastebin.com/tLLyZsLh

      It would be nice if you take a look at this. Meybe you will find the problem.
      If I'm not mistaken, judging by the logs You on TV Boxing uses NAND, not eMMC. I have not tested the installation in TV boxes with this option the internal memory. Perhaps it is necessary to compile the kernel with NAND support. You can check option. After installation. BEFORE rebooting, try to perform a "chroot" into the installed system (/dev/data) ?

      Comment


        Originally posted by balbes150 View Post

        If I'm not mistaken, judging by the logs You on TV Boxing uses NAND, not eMMC. I have not tested the installation in TV boxes with this option the internal memory. Perhaps it is necessary to compile the kernel with NAND support. You can check option. After installation. BEFORE rebooting, try to perform a "chroot" into the installed system (/dev/data) ?
        Thank you for your tips. I will check later if I can chroot to the destination directory, but as far as I remember, when I booted device from sd card I could mount and access data from /dev/data. Also the installation script doesn't report any errors.

        I've also checked your amlogic kernel repository for armbian (on github) and the most of the config options are marked as 'y' (not even 'm', which could be the reason of nand boot problem).

        I'll back when I try your suggestions about chroot.
        Thanks.

        Comment


          OK. I've checked it and as I thought, performing chroot is possible.
          But somebody had similiar problem with libreelec (https://forum.libreelec.tv/post-34037.html#pid34037) and he noticed that nand partitions are maintained by aml_nftl_dev module (CONFIG_AML_NFTL_NEW kernel option). So I have to learn now how to recompile Armbian kernel or prepare custom one in virtualized environment.

          Comment


            The module is a part of the image, but why it is not loaded on Your TV-box in the initrd, I do not yet understand. It is necessary to try to collect another variant of the initrd.

            GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.


            A question to other users. Has anyone else tried installing Armbian to eMMC, what is the result ?

            Comment


              Originally posted by balbes150 View Post
              The module is a part of the image, but why it is not loaded on Your TV-box in the initrd, I do not yet understand. It is necessary to try to collect another variant of the initrd.

              GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.


              A question to other users. Has anyone else tried installing Armbian to eMMC, what is the result ?
              Yesterday I have successfully compiled the kernel with that config option changed from 'm' to 'y'. But I don't understand what type of image is linux.img in the /boot partition of your system images. After kernel compilation I have standard uncompressed image in arch/arm64/boot. I guess I have to convert it using mkimage from u-boot-tools, but every try ends with sth like 'Invalid ARM64 image magic' error message.

              Comment


                Try using the collected core file without processing. Just copy the Image file to external media with the name zImage.

                Script s905_autoscript uses to run a "straight" version of the kernel team booti.

                But remember, to use the new kernel for install to eMMC, you need to manually Repack the file "linux.img" with the new kernel. You can use the utility mkbootimg or abootimg.

                Comment


                  Finally got it work, but let's start from the beginning:

                  After reading your hint about using mkbootimg I prepared image, but the system was hanging right after loading. I gave up, and tried to compile kernel from scratch using your version of Igor's Pecovnik build scripts. I gave up one more time when I couldn't get rid of some reference errors related to this aml_nftl_dev module. Then i thought, that it could be just the problem with ramdisk image and meybe it would be enough if I change module loading order or sth. And that was a point. The module wasn't included in ramdisk file at all (checked with lsinitramfs after unpacking linux.img using abootimg with -x option). So I thought it couldn't be easier. I've booted from SD, added module to /etc/initramfs-tools/modules and ran update-initramfs. After cheking if new ramdisk image contains the ko file I prepared boot image with new ramdisk and tried to boot from nand once again, but as you probably guess with no success. Here are just few last lines of console log:
                  Code:
                  [    8.129592@0] VFS: Cannot open root device "data" or unknown-block(0,0): error -6
                  [    8.137694@0] Please append a correct "root=" boot option; here are the available partitions:
                  [    8.146947@0] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
                  [    8.156125@0] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.29-amlogics905x-ga865730-dirty #13
                  [    8.165633@0] Call trace:
                  So I've unpacked both ramdisk images (the original one and the one generated after update-initramfs) and I noticed that they are totally different. Then I decided to modify original ramdisk image manually. After unpacking it I copied module file to the adequate destination in directory structure, updated all necessary files (modules.dep and similiar) and packed it again. This thing required from me some tricky operations, because modprobe depends on binary version of modules.dep (which is normally created by depmod), so I had to copy /lib directory from ramdisk image to temporary folder on sd card with working armbian and run depmod (with -b parameter, which can tell depmod base directory). The binary files were updated, I copied it back to the unpacked ramdisk structure, packed it again and it started working.

                  Sorry if something is hard to understand, but I wanted to describe the whole process before I forgot it.

                  Now I should check how the ramdisk image is created dureing armbian building process and contribute to it, but I will tak some rest before I start. Two sleepless nights is much for one weekend

                  balbes150 Finally, I want to thank you for your greate job. I see the huge amount of work you spent on preparing all the necessary things to make it possible to run linux on TV boxes.

                  Click image for larger version

Name:	IMG_20170306_032715.jpg
Views:	150
Size:	226.2 KB
ID:	634121

                  Comment


                    Well done. Good job.

                    Comment


                      Thanks, but now i get stucked at the another problem. I am trying to make hardware 2d acceleration to work. I need it to run my application (written in QT5 with python bindings) which uses GLES for rendering. As far as I remember there wasn't a big problem with doing it for example on banana Pi. There was three kernel modules, mali, mali_drm and ump and after compiling some libraries and drivers (https://blog.eldajani.net/banana-pi-...ated-mali-gpu/), the gles was warking.
                      S905x has Mali 450 GPU. Its quite different form Mali 450. Did it supports DRM and UMP at all? Did someone make it work with any s905 based tv box or even odroid? I have seen the balbes150 images with mali driver, but when I try to run my application I get few FPS max (simple animations, Full HD). I also tried to compile the mali_drm module using solutions I have found in odroid kernel repositories, but when I try to modprobe the module I get error message which sounds like "Cannot allocate memory".

                      Thanks.

                      Comment


                        Originally posted by maco222 View Post
                        Thanks, but now i get stucked at the another problem. I am trying to make hardware 2d acceleration to work. I need it to run my application (written in QT5 with python bindings) which uses GLES for rendering. As far as I remember there wasn't a big problem with doing it for example on banana Pi. There was three kernel modules, mali, mali_drm and ump and after compiling some libraries and drivers (https://blog.eldajani.net/banana-pi-...ated-mali-gpu/), the gles was warking.
                        S905x has Mali 450 GPU. Its quite different form Mali 450. Did it supports DRM and UMP at all? Did someone make it work with any s905 based tv box or even odroid? I have seen the balbes150 images with mali driver, but when I try to run my application I get few FPS max (simple animations, Full HD). I also tried to compile the mali_drm module using solutions I have found in odroid kernel repositories, but when I try to modprobe the module I get error message which sounds like "Cannot allocate memory".

                        Thanks.
                        Try the latest test version of the image 20170309. It has libMali.so

                        Comment


                          Thanks everyone for the great job. I am a newbie so...........Need help. I installed linux on my mxq pro 4k tv box (S9xxx_4G_ICEWM_MATE_XFCE_LXDE_LXQT_20170129.img).
                          Thanks Balbes150. But my keyboard is always down. What can I do ? Whithout a keyboard system is useless. Sorry for my english.

                          Comment


                            Hello sergiola, Welcome to Freaktab.

                            Wired or Wireless KB?

                            Comment


                              Wired. Usb wired. I also try to power on usb port but no fortune. Thanks.

                              Comment


                                Do any USB accessories work?

                                I do not own the box you have, but I have not observed this behavior on others.

                                Comment

                                Working...
                                X