Jump to content

5p0ng3b0b

Members
  • Posts

    8
  • Joined

  • Last visited

Reputation Activity

  1. Like
    5p0ng3b0b reacted to TRS-80 in Armbian for new Amlogic S905X3   
    @Jijo,
     
    I found the post that @NicoD mentioned above, in literally seconds looking around the TV Boxes forum, and I don't even own a TV Box nor trying to get one working, etc. Please look around, search, read on your own for some time before you make posts looking to be spoon fed.
     
    In defense of the first 2 posts, the development of the above did not really begin until 2019-12-03 as can be seen by the post date.
     
    At any rate, since this thread is not really providing anything useful (other than @NicoD redirect above, you should probably thank him BTW) I am locking it so people don't continue to post in here.
  2. Like
    5p0ng3b0b got a reaction from TRS-80 in Armbian for Amlogic S905X3   
    Really looking forward to running armbian one day on my S905x3 device but ran into difficulty from the get go running aml_autoscript.
    I was initially posting here with a cry for help but managed to sort the problem and thought I'd share my solution as this alternative method doesn't appear to be documented anywhere.
     
    The problem:
     
    Downloaded and burned Armbian_20.02.0-rc1.037_Aml-s9xxx_buster_current_5.5.0-rc6_20200205.img to sdcard.
    Using the update app that was preinstalled on the android device, I tried loading aml_autoscript from external sd card, usb ports and internal storage but got the same error every time.
    E:Block map file is too short: 3 E:Map of '@/cache/recovery/block.map' failed E:failed to map file Installation aborted I tried all the above with different sdcards and usb sticks but still no luck. Running aml_autoscript from stock recovery gave a different error:
    E:mmap(0, R, PRIVATE, 6, 0) failed: Invalid argument E:Map of 'udisk/aml_autoscript.zip' failed E:failed to map file Installation aborted The solution:
     
    I didn't want to go down the uart/uboot route as I don't know where the tx/rx points are on this box and my eyesight isn't that great anymore. Plus my soldering days were over many years ago. I was able to boot into a twrp.zip via stock recovery, but there was no setenv command in the twrp console to enter the info manually. Perhaps there is a command I could enter to run the aml_autoscript from here, I have no idea. I decided the way forward was to extract the env partition with twrp (you can just as easily do it with dd or fastboot) and hack it before flashing it back. I opened the file up with a hex editor and could see what looked like a uboot environment with fatload commands etc, a 4 byte header at the start of the file then each command separated by a null byte. I'm looking at yet another brick if I bork it, so I'm not doing this with a hex editor. Convert it to a text file, make the changes and convert the text file back to the original 8mb image format was the plan. All I had to do was trim the trailing zeros and replace the remaining null bytes with a newline. I copied the file to my PC to do the job but it can all be done from a rooted box with busybox installed.
    cp env.emmc.win env.emmc.bak; cat env.emmc.win | sed '$ s/\x00*$//' | sed "s/\x00/\n/g" > env.txt That one-liner seemed to do the the trick (note backup). The resulting file gave me:
     
     
    So, I delete the 1st 4 characters as it turns out this is a checksum and if it isn't right then everything goes back to default values and it's back to square one. Then amended the exsisting variables (bootcmd and upgrade_step) and added the start_* variables. Note each variable has an '=' before the definition and there are no quotes, so not exactly copy and paste from the aml_autoscript file. I also observed that the environment variables were sort of in alphabetical order and thought it cautious to keep it that way and inserted the new variables between the 'serverip' and 'storeargs' variables. Now it was just a case of saving env.txt and converting the file back. As the 4 byte checksum needs to be there, I had to install uboot-tools as only the mkenvimage command can do this and build the env image.
    mkenvimage -s 8388608 -p 0x00 -o env.emmc.win env.txt Check the file with;
    cat env.emmc.win | od -tx1 Burn the file back to the /dev/block/env or $(find /dev/block/platform | grep by-name/env) partition. Remember the file is now modded so the original twrp backup checksum won't work. Recreate it with;
    md5sum env.emmc.win > env.emmc.win.md5  
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines