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

    balbes150
    okay i think i understand most of it but my knowledge of the dtb / aml kernel relationship, is too limited, i'll try to learn more about that.

    One last thing though, the modifications or patches you mention for the external dtb, are they made manually by yourself or do they come from the kernel source code ?
    In other words would it be the same patch for every dtb or each dtb needs some specific modifications ?

    I may be wrong but i believe that kszaq LE aml_autoscript do patch "on the fly" the dtb data (fdt commands) before booting their kernel, it seems they do that for 4k output and hdmi cec, i thought you could use the same technique to patch the internal dtb. Or maybe it's simpler for you to managed patched dtb and put them in the external image.
    Well it would also mean that you need a dynamic aml_autoscript so it's probably the same as having an dynamic (auto) dtb on the external image.

    Another thing i'm trying to better understand, the uboot patch you apply using the android update, couldn't that also be included in the aml_autoscript, that way your image would boot directly without having to apply an update ?

    thx for the comments it's really nice to learn how those device work an how linux interacts with those boards, i'll read more about uboot and dtb it looks very interesting.



    Comment


      The patches are different. There are patches associated with the kernel and dtb file at a time (make unrelated changes). There are those that deal with specific models of TV consoles (connected with different equipment, 1 GB of memory or 2 GB). There are universal patches that are common to all models of TV consoles (improve the work or add new features). fdt command modifies the configuration of the dtb file. Ideally, this should allow to make a generic dtb file. But there are a lot of questions and requires a deep study of the control algorithms and testing on different hardware (something to guarantee the desired result). Script aml_autoscript is the scenario that the system reserved for official use (for updates, fixes, etc.). So you need to use it as intended. S905_autoscript script is a script for a nominal load of different systems. Which contains all the necessary information for the correct start of the system (any system, with their paramtere, kernel names, etc.). This scheme provides the security of a script, all the steps made in an external script file. It can be easily changed without the risk of a brick. Pulled out a carrier with no proper script, made changes and check the work (external media is easy to fix on any PC). If you use the variant with the modification in the internal memory (to register all the commands in the ENV from u-boot), at the slightest mistake - get problem. The system is not possible to correct because it will not boot and will have to perform flashing. So I basically divided the procedure. The first step is making a proven and minimum changes to the loader. Which is solely responsible for one function - to load the external script and pass to it. All ostalnoe what kernel where to load, what parameters, etc., makes external script s905_autoscript. In librelec the script uses one time for all changes (all commands and steps) in the loader itself and on subsequent loads it is not in use. And for that, would for example, to boot the system with a different kernel name (for example, if you use separate kernel and ramfs) to re-run another script which will make changes to the loader itself.

      Comment


        eldonT Thanks for the files Managed to overwrite uboot already but got it back after shorting 29/30 on the nand, lesson learned !

        Comment


          Set up a build environment armbian for obtaining images to S905. The first beta version of the image on the website. Pay attention, this is a test version, there may be errors.
          Please note. This version does not automatically expand a partition on USB drives. To use USB you need BEFORE the first start of the system to create the empty file /root/.no_rootfs_resize . If it doesn't complete, the setup script will remove the root partition on the USB drive. Expanding the root partition on the USB you need to perform manually on your PC.
          The rules of the primary system start-up and passwords see here.



          Armbian_5.17_Vegas95_Debian_jessie_3.14.73_desktop .img







          Can choose to collect your version of Debian or Ubuntu (with GUI or just the console version). Working GIT to be here.






          p.s.
          I found the reason why it is not working properly auto-expand the root partition on the USB media. In the next version it will be fixed. To correct this feature in the current image, it is sufficient to fix one line in the script. If someone needs it, I will describe in more detail where and what you need to correct.
          Last edited by balbes150; 23 July 2016, 18:40.

          Comment


            Included in the build of firefox is not running. For Internet access, you can install midori or any other browser. I checked midori works.

            Comment




              Everyone who knows how this stuff works should check this out. I can confirm it boots with Bables' uboot script. Wireless doesnt work but everything else seems to. I haven't had much time to play with it.

              The interesting thing is that they get the dtb.img during boot, so there is no need to have multiple files to choose from.

              I don't know enough to figure out everything else that is going on there.

              Comment


                Originally posted by nosmokingbandit View Post
                https://forum.libreelec.tv/thread-524.html

                Everyone who knows how this stuff works should check this out. I can confirm it boots with Bables' uboot script. Wireless doesnt work but everything else seems to. I haven't had much time to play with it.

                The interesting thing is that they get the dtb.img during boot, so there is no need to have multiple files to choose from.

                I don't know enough to figure out everything else that is going on there.
                Images downloaded, but not yet enough time to check everything. From what I saw at a cursory study. Version activate the multi-boot designed to boot only OE\LE. Therefore be necessary to adapt these systems under universally-boot. For me it is important the existence of universal multi-boot, something you can run Linux and other systems (same OE with separate kernel and RAM-disk). Might be able to use dynamic formation of dtb data, but there are a number of nuances that need to finish, for the real versatility of this scheme. I have known cases when this scheme (to use the dtb data in the internal memory) is not working, have to use a completely different file (used by the manufacturer TV box structure is very different from the kernel). Again, I support the idea of universal dtb , but it requires adaptation and testing.






                Updated image. Added support for mini mx. Sound works (alsa). Perhaps on some models of TV consoles will work WiFi (need to check).



                Comment


                  Updated image, using the automatically load dtb file from the internal memory. After writing it to the media, you need to replace the script s905_autoscript the one to be on the website next to the image. To use the new script s905_autoscript, with the same images armbian, you need to replace script and remove from the first partition (FAT) file of the dtb.img.

                  Armbian_5.17_Vegas95_Debian_jessie_3.14.73_desktop _20160729.img.xz


                  This option can be used on any models. Copy the dtb file in the manual as previously required. But keep in mind that sometimes the dtb file from internal memory not operating properly (system not loaded). In these cases, you need to copy the first section finished the dtb file.img as you did previously.

                  Comment


                    Hi. I have already installed libreelec s905 from the link mentioned by nosmokingbandit.
                    So my mini m8s boots from sd with the libreelec sd place, or android with it removed.
                    Would it be possible to create an sd card with armbian that I could swap in/out with the libreelec sd card?
                    That would be awesome!

                    Comment


                      Hello doobree, I am not current on balbes150's work. But I have had Android on the box, OpenELEC on a card, and a variety of his Linux distros on card all boot. I don't know why it would not work. I would think switching between Linux on SD card and Librelec on SD card should work.

                      balbes150 will be away for some time, and he will not be able to answer.....I think he is in the land of no internet now.
                      Originally posted by balbes150 View Post
                      .....
                      Soon I'm leaving for a couple of weeks to places where there is no Internet. So sorry, I will not be able to reply to emails and messages ....

                      Comment


                        Amazing!!!!!!!!

                        Got Ubuntu running on my MXQ Pro 4K, using my own dtb.img and it boots just fine. Anyway to improve performance? Seems really slow even with a 32GB USB3.0 thumb drive. I know we can't do much with the limited 1GB ram but wondering if there would be any benefit running this on a SSD with a SATA to USB enclosure. I have a spare drive that I'm not using but can't test since I don't have an enclosure for the drive.

                        Comment


                          I think I remember balbes150 saying an actual drive should not be used, but I am going on memory and could be mistaken.

                          Comment


                            RISCy Dude
                            thanks for replying. If I create an sd card with armbian as per the instructions above, I want to be able to boot from it without doing another reset as I'm worried it may corrupt my LE boot if I reset with armbian sd having already installed the libreelec sd boot. balbes150 mentioned the LE boot mechanism only worked for LE/OE and used dtb data in internal memory so does that mean the LE boot has put stuff in my NAND that is incompatible with an armbian boot?
                            -
                            I don't want to trash my mini m8s! I'm more of a Windows (Developer) guy and a Linux newbie....
                            I tried Logitech media server on an rpi2 but it was pretty slow. Would like to try it on this mini m8s under Ubuntu to compare
                            shame I can't run LMS inside LE as that would be enough for me...
                            Is there a wiki or something I could read explaining how all this boot stuff works? I'd like to better understand all this...
                            Have the T10 z8300 box as a possible alternative purchase as you saw me in that thread but I already have a mini m8s which I reckon should do a good job if I can work out how to do it, but would also like to keep a working LE boot as it seems to work really well. Maybe I should wait for balbes150 to work out how to add multi boot as that would solve everything if he could get it to work Ubuntu,Android and LE...

                            Comment


                              I have not tried the LE and so I am unfamiliar with the process. Formally for SD card or flash drive booting, only the boxes u-boot was modified, otherwise no change to installed system. Unfortunately I have fallen a bit behind on balbes150's work, so I'm not sure. I don't want to give you bad or outdated info, as I don't want you to trash your box either.

                              Please see his Wiki here for additional info on his methods, ref u-boot. Also read back through his most recent FT threads for info on his latest efforts. He also posts on the Tronsmart S95 section on Tronsmart's forum, might help to have a look at his more recent posts over there too.

                              I regret I cannot be more helpful.

                              It will be about two weeks before balbes150 returns. If you can't find the answer in his posts here, or on the Wiki, might be a good idea to wait. Two weeks is a good bit of time, but un-bricking your box may also take a while. His answers will be infinitely more certain, than mine.

                              BTW Time is a little short at the moment. But over the coming days I will try his new bits(LE) on the S95 and then see if I can do the things you are looking for. I will post my findings, but again, could be a few days.
                              If the M8S is a 1GB RAM unit, I can try it on the Inphic I7, also a 1GB box.

                              Comment


                                Hi, my box is actually a 2gb ram mini m8s. From what you say I think it should be safe to boot from an sd card as long as I don't hold the reset button in.
                                i may try it out later in the week and see what happens, but I will read through your suggested posts first. Thanks.

                                Comment

                                Working...
                                X