Announcement

Collapse
No announcement yet.

Does anyone understand AML-AUTOSCRIPT?

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

  • #16
    Originally posted by dairug View Post
    hi Stane

    You can correct me as much as you like when your information is as helpful as this - thank you very much indeed.

    I'll have a go now - no time like the present as they say.

    Just to confirm, you've obviously looked at the MTD layout earlier in the post and there's nothing in there that concerns you within that?

    The reason I'm being careful is because U have tried every single recovery option I can find including Benibenassi's method and nothing will flash this box other than the solution determined by the manufacturer.
    Have you seen the SD card software that prepares the SD card that I have had to use. Shall I sent it to you for a quick look perhaps?

    Thanks again - i'd be screwed without the help!

    Chris
    Yes, I saw both versions of software, old one is SDTool (think also available on my site) and new one was released by Amlogic for same purpose.

    But when it comes to mx2 boxes, lot of $hit is going on.... there are clones and clones of clones. Original factory (shiningworth) changed nand chip on these devices in one of their latest mx2 batches (now on market are just clones afaik) which is not working well with U-Boot supplied for MX boards by Amlogic (I'm talking about Android 4.2.2 branch), but it works just fine with KitKat sources (uboot, android and kernel).

    With mx2 and previous m3 from same factory (aka G-Box midnight) is only mess. 2+ yrs of experience with that manufacturer (starting from m3).
    If you find my work useful, buy me a beer
    Homepage: http://www.stane1983.com

    Comment


    • #17
      Originally posted by dairug View Post
      Just to confirm - I have had this info as well which was also helpful.

      This error
      Assert failed:write_raw_image ("/tmp/bootloader.img", "boot loader).

      Is because the edify script in the ZIP is not correct for the labels of your partitions! Edit that script. Remove and assertion checks at the beginning, and edit the write line to say bootloader not boot loader.

      You cannot use a kernel with different MTD. So you will need a kernel that uses YOUR MTD. Learn to pack and unpack boot.img. You can take a known good kernel and put it in boot.img from the ROM your trying to use. Usually this works but not always.

      Also if it wont boot into recovery then the recovery partition does not have recovery in it! Some ROM you flashed or something erased that and did not write a good recovery in there. If uboot is good, just putting a recovery.img on sdcard should work without having to make a special sdcard. special sdcard is only needed when uboot is hosed up.

      Cheers
      Chris
      MTD layout must be the SAME in recovery image booted to install update and in kernel image which is flashed as boot.img. That is for any MX, M3 and M1 from Amlogic. M8 is different, M8 stores nand layout in bootloader itself.

      And of course, nand chip on pcb must be supported in recovery/kernel/bootloader.
      If you find my work useful, buy me a beer
      Homepage: http://www.stane1983.com

      Comment


      • #18
        Just had a look at your website.

        I've only just realised that the version of Linux I managed to flash from the OTA updater tool was the one that you created! I could only get it to boot following the initial flash and then the box would hang on the @9 screen following a reboot. I was amazed by how slick the intro screens were on your build.

        That's the build I'm trying to get on this box.

        If I manage it, a beer will be on your way for sure.

        Cheers
        Chris

        Comment


        • #19
          Originally posted by stane1983 View Post
          MTD layout must be the SAME in recovery image booted to install update and in kernel image which is flashed as boot.img. That is for any MX, M3 and M1 from Amlogic. M8 is different, M8 stores nand layout in bootloader itself.

          And of course, nand chip on pcb must be supported in recovery/kernel/bootloader.
          Correct which is what I said in the other post. I believe he is trying to flash a ROM with different MTD. His recovery kernel has correct MTD possibly the first time but boot.img did not have correct kernel. After flash the recovery partition is now corrupt which is why he cannot boot into recovery without a special SDcard.

          Bottom line he needs to flash the stock ROM. Then if he can take apart boot and recovery from the other ROM and replace kernel in those with his kernel, he maybe able to port that ROM he wants to his box.

          Also it looks like his uses a SPI.img which is the kernel DTD so he has to have that correct too.

          Bob
          "Pzebacz im, bo nie wiedzą, co czynią"
          "Прости им, они не ведают, что творят"
          "Perdona loro perché non sanno quello che fanno"
          "Vergib ihnen, denn sie wissen nicht, was sie tun"
          "Vergeef hen want ze weten niet wat ze doen"
          "Pardonne-leur car ils ne savent pas ce qu'ils font"
          "Perdónalos porque no saben que lo que hacen"
          "Oprosti im, jer ne znaju što čine"
          "Forgive them as they know not what they do"





          Comment


          • #20
            Originally posted by Finless View Post
            Correct which is what I said in the other post. I believe he is trying to flash a ROM with different MTD. His recovery kernel has correct MTD possibly the first time but boot.img did not have correct kernel. After flash the recovery partition is now corrupt which is why he cannot boot into recovery without a special SDcard.

            Bottom line he needs to flash the stock ROM. Then if he can take apart boot and recovery from the other ROM and replace kernel in those with his kernel, he maybe able to port that ROM he wants to his box.

            Also it looks like his uses a SPI.img which is the kernel DTD so he has to have that correct too.

            Bob
            Never saw SPI.img used on m3/mx boards (except Geniatech). SPI raw image I last saw on aml M1 boards (ubootwhole partition on spi) which contained bootloader + default ubootenv.

            m1/m3 and mx (3.0.x) kernels are not using device tree. DTD support was introduced in 3.8 kernel (android 4.3) and m8 uboot (and latest MX 4.2.2 source release - April this year, but its disabled by default).
            If you find my work useful, buy me a beer
            Homepage: http://www.stane1983.com

            Comment


            • #21
              Originally posted by stane1983 View Post
              Never saw SPI.img used on m3/mx boards (except Geniatech). SPI raw image I last saw on aml M1 boards (ubootwhole partition on spi) which contained bootloader + default ubootenv.

              m1/m3 and mx (3.0.x) kernels are not using device tree. DTD support was introduced in 3.8 kernel (android 4.3) and m8 uboot (and latest MX 4.2.2 source release - April this year, but its disabled by default).
              I have a M6/MX with SPI.img. It's the Jynxbox M6. My ROM uses it (base is from Geniatech). Looking at the spi.img it looks like a very simplified DTD. I know it's not the same but it is some kind of text style description of basic hardware.

              Bob
              "Pzebacz im, bo nie wiedzą, co czynią"
              "Прости им, они не ведают, что творят"
              "Perdona loro perché non sanno quello che fanno"
              "Vergib ihnen, denn sie wissen nicht, was sie tun"
              "Vergeef hen want ze weten niet wat ze doen"
              "Pardonne-leur car ils ne savent pas ce qu'ils font"
              "Perdónalos porque no saben que lo que hacen"
              "Oprosti im, jer ne znaju što čine"
              "Forgive them as they know not what they do"





              Comment


              • #22
                FYI he said earlier the ROM he used had a SPI file. So looks like this might be part of his problem.

                Bob
                "Pzebacz im, bo nie wiedzą, co czynią"
                "Прости им, они не ведают, что творят"
                "Perdona loro perché non sanno quello che fanno"
                "Vergib ihnen, denn sie wissen nicht, was sie tun"
                "Vergeef hen want ze weten niet wat ze doen"
                "Pardonne-leur car ils ne savent pas ce qu'ils font"
                "Perdónalos porque no saben que lo que hacen"
                "Oprosti im, jer ne znaju što čine"
                "Forgive them as they know not what they do"





                Comment


                • #23
                  OK Guys

                  I'm going to try and decipher the fantastic info I've had so far:

                  1. Create aml_autoscript using Mkimage command set up as outlined by Stane (Silly question - do I need to install a Linux Virtual machine on my Mac to create this or will my mac terminal do the job? Have looked for info but every reference is based on the code itself - not how to actually execute it!)

                  2. Extract desired image to SD card - Just done this with Matricom 1.1.6 which I had downloaded already.
                  The extract bootloader.img renamed as u-boot.bin to root of SD card with the existing recovery.img and MX2update.zip.

                  3. Do I leave the factory_update.aml on the SD card? it is set up like this....

                  --update_package=/sdcard/mx2update.zip
                  --wipe_cache

                  4. Shall I replace the boot.img with the one from my stock firmware to ensure the kernel is the same?


                  Thanks again guys

                  Comment


                  • #24
                    Originally posted by dairug View Post
                    OK Guys

                    I'm going to try and decipher the fantastic info I've had so far:

                    1. Create aml_autoscript using Mkimage command set up as outlined by Stane (Silly question - do I need to install a Linux Virtual machine on my Mac to create this or will my mac terminal do the job? Have looked for info but every reference is based on the code itself - not how to actually execute it!)
                    Sorry man, I'm not into Apple s.....tuff , I'd suggest you to install Ubuntu distro (doesnt have to be desktop, can be server - smaller, no need for UI if you're experienced with using shell)

                    Originally posted by dairug View Post
                    2. Extract desired image to SD card - Just done this with Matricom 1.1.6 which I had downloaded already.
                    The extract bootloader.img renamed as u-boot.bin to root of SD card with the existing recovery.img and MX2update.zip.

                    3. Do I leave the factory_update.aml on the SD card? it is set up like this....

                    --update_package=/sdcard/mx2update.zip
                    --wipe_cache
                    Yes, you leave .aml file (if you want automatic process) and...

                    if your zip is named MX2update.zip then I'd suggest (never tried if recovery procedure is case sensitive) to have

                    --update_package=/sdcard/MX2update.zip
                    --wipe_data
                    --wipe_cache

                    wipe_data -> because you want to format your new userdata partition, later you can delete that line

                    Originally posted by dairug View Post
                    4. Shall I replace the boot.img with the one from my stock firmware to ensure the kernel is the same?


                    Thanks again guys
                    If you are using recovery.img that came with MX2update, then DONT!
                    If you find my work useful, buy me a beer
                    Homepage: http://www.stane1983.com

                    Comment


                    • #25
                      Thanks Stane - Ubuntu is 1.04gb - it's grown over the years?!

                      Will run it as a virtual machine and see if I can create the aml_autoscript.

                      If I manage to flash this 1.1.6 image successfully - will it repair my recovery partition so the toothpick should then bring up the android recovery menu without the use of an SD card?

                      Thanks
                      Chris

                      Comment


                      • #26
                        Originally posted by dairug View Post
                        Thanks Stane - Ubuntu is 1.04gb - it's grown over the years?!

                        Will run it as a virtual machine and see if I can create the aml_autoscript.

                        If I manage to flash this 1.1.6 image successfully - will it repair my recovery partition so the toothpick should then bring up the android recovery menu without the use of an SD card?

                        Thanks
                        Chris
                        Yes, when you first boot Android it will make diff between boot image and recovery stuff and will re-create content of recovery partition.
                        If you find my work useful, buy me a beer
                        Homepage: http://www.stane1983.com

                        Comment


                        • #27
                          Seriously, how do you guys know all this stuff?!

                          Comment


                          • #28
                            Originally posted by dairug View Post
                            Seriously, how do you guys know all this stuff?!
                            I don't know for Finless, but I'm developing customized firmwares for Amlogic (specifically) platform for past 3 years or so... Most of them are for clients but some are public too
                            If you find my work useful, buy me a beer
                            Homepage: http://www.stane1983.com

                            Comment


                            • #29
                              Ok - here we go.....

                              I'm in Ubuntu, installed u-tools.

                              I'm not great with terminal - would you know where I need to place the text file prior to executing the command?

                              Also, is the command you specified exact or did I ned to choose the parameters? Cheers again!

                              mkimage -A arm -O linux -T script -C none -d amltxtscript aml_autoscript

                              Comment


                              • #30
                                Originally posted by dairug View Post
                                Ok - here we go.....

                                I'm in Ubuntu, installed u-tools.

                                I'm not great with terminal - would you know where I need to place the text file prior to executing the command?

                                Also, is the command you specified exact or did I ned to choose the parameters? Cheers again!

                                mkimage -A arm -O linux -T script -C none -d amltxtscript aml_autoscript
                                Create amltxtscript in your home folder. When you open terminal make sure you are in home folder ( cd ~/ ) and issue exact command I gave you. In a second it will create aml_autorscript file with needed header for bootloader to recognize it.
                                If you find my work useful, buy me a beer
                                Homepage: http://www.stane1983.com

                                Comment

                                Working...
                                X