Juan Rangel Posted January 3 Posted January 3 Hi, I want to make step by step and I am reading all post that I can't, but I have not information about this. I can use linux commands, but I am a newbie. I have download and flash a micro sd as this links steps (I think there are the same what I have read in several posts here: https://i12bretro.github.io/tutorials/0269.html Firmware donwloaded from https://forum.armbian.com/topic/17106-installation-instructions-for-tv-boxes-with-amlogic-cpus (https://es.sbcmirror.org/dl/aml-s9xx-box/archive/) This one: Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63_xfce_desktop.img.xz Checked SHA256 And flash Boot is ok with armbian. Yesterday I had problem to boot in android after taking off the micro sd card, but today I was preparing to record you some photos and .... android boots, so no problem here. So next step is backup android partition just in case. I have a Mini MXIII-II with 2gb and 16gb emmc S905X So, as my sd card is only 8gb, I plug a 16gb usb to my tv box. This is my situation: 1. u-boot correctly choosen 2. extlinux/extlinux.conf is this: LABEL Armbian LINUX /Image INITRD /uInitrd #FDT /dtb/amlogic/meson-gxbb-p200.dtb FDT /dtb/amlogic/meson-gxl-s905x-p212.dtb #FDT /dtb/amlogic/meson-gxl-s905w-tx3-mini.dtb #FDT /dtb/amlogic/meson-gxm-q200.dtb #FDT /dtb/amlogic/meson-g12a-x96-max.dtb #FDT /dtb/amlogic/meson-g12b-odroid-n2.dtb append root=UUID=b2d62f8f-4a4c-49bb-a09e-779ec9099bb9 rootflags=data=writeback console=ttyAML0,115200n8 console=tty0 rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles 3. Some information of my boot with the armbian sd card: ddbr doesn't detect emmc, but I think that I can see it in lsblk: mmcblk1, can't I? I am newbie, so probably I need something about mount or something like that? Or there is also something wrong in extlinux.conf (append root line?) ? Thanks a lot for your support. After I can make the backup, I will try to install from SD card to EMMC. Then I will solve the problem about audio. I understand that once I have "linux" installed in emmc I can boot with any bootable usb drive, update drivers, and so on, isn't it? 0 Quote
Juan Rangel Posted January 3 Author Posted January 3 I have open it, and the chip is this: FORESEE NCEMBSF9-16G, I think it is a real emmc. 0 Quote
SteeMan Posted January 3 Posted January 3 38 minutes ago, Juan Rangel said: After I can make the backup, I will try to install from SD card to EMMC. Then I will solve the problem about audio. I understand that once I have "linux" installed in emmc I can boot with any bootable usb drive, update drivers, and so on, isn't it? I would warn against installing to emmc. That should be the last thing you do. First get your environment working as you want then once everything works correctly you may want to install to emmc. Running off of emmc doesn't give you any benefits along the lines you are thinking. 0 Quote
SteeMan Posted January 3 Posted January 3 If you can see /dev/mmcblk1 while running armbian off of your sd you have emmc. You say that ddbr can't detect emmc, what messages/log from your run of ddbr can you provide? 0 Quote
Juan Rangel Posted January 3 Author Posted January 3 13 minutes ago, SteeMan said: I would warn against installing to emmc. That should be the last thing you do. First get your environment working as you want then once everything works correctly you may want to install to emmc. Running off of emmc doesn't give you any benefits along the lines you are thinking. Thanks SteeMan, thanks a lot. Then after backup, I will try to "improve" or "check" all things in the "sd card installation". 10 minutes ago, SteeMan said: You say that ddbr can't detect emmc, what messages/log from your run of ddbr can you provide? Thanks, in the first photo of my screen, just above lsblk command, you can see "UNABLE TO FIND YOUR EMMC DRIVE or YOU ALREADY RUN FROM EMMC !!!" I dont know if this helps and it is or isn't normal: in the second photo also says: Does give you a "Key" ? Thansk 0 Quote
SteeMan Posted January 3 Posted January 3 25 minutes ago, Juan Rangel said: Does give you a "Key" ? That is the uboot output. That has nothing to do with ddbr. And yes that is expected output from uboot since linux can't read the android partition table. What is the error/log you are getting from ddbr? 0 Quote
Juan Rangel Posted January 3 Author Posted January 3 11 minutes ago, SteeMan said: What is the error/log you are getting from ddbr? Hi, I am trying this command: sudo ddbr /media/root/16Gb/ Then I push "b" And this is the error (you can see it in the first message of this post): "sed: -e expresion #1, char 6: unterminated 's' command UNABLE TO FIND YOUR EMMC DRIVE OR YOU ALREADY RUN FROM EMMC!!!" I have also tried without any argument, or any sudo, same answer. Command: ddbr Then I push "b" And this answer: "sed: -e expresion #1, char 6: unterminated 's' command UNABLE TO FIND YOUR EMMC DRIVE OR YOU ALREADY RUN FROM EMMC!!!" Do I have any way to get "more log" for you to check? Thanks 0 Quote
SteeMan Posted January 3 Posted January 3 Well, ddbr is a bash shell script. I think you may just need to dig in and debug what is going on. The script is parsing the output of lsblk. 0 Quote
SteeMan Posted January 3 Posted January 3 Try changing the following line in the script: runfrom=$(lsblk | grep / | grep -oE '(mmcblk[0-9]|sda[0-9])') to runfrom=$(lsblk | grep / | grep -oE '(mmcblk[0-9]|sda[0-9])' | uniq) 0 Quote
Juan Rangel Posted January 3 Author Posted January 3 11 minutes ago, SteeMan said: Well, ddbr is a bash shell script. I think you may just need to dig in and debug what is going on. The script is parsing the output of lsblk. I think here is the problem, as I am getting an error message about the "command" sed, I am trying to check ddbr.sh in my disk image (Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63_xfce_desktop.img.xz) Just above this text "UNABLE TO FIND YOUR EMMC DRIVE OR YOU ALREADY RUN FROM EMMC!!!" and after the "click" of "b", I can see this line: emmc=$(echo $avail | sed "s/$runfrom//" | sed "s/sd[a-z][0-9]//g" | sed "s/ //g") if [ "$emmc" = "" ] then echo "$_r UNABLE TO FIND YOUR EMMC DRIVE "$_c"OR"$_r" YOU ALREADY RUN FROM EMMC!!! $_x" exit 1 fi Just in case I attrach here the ddbr.sh that I have found in the sdcard. ddbr 0 Quote
Juan Rangel Posted January 3 Author Posted January 3 4 minutes ago, SteeMan said: Try changing the following line in the script: runfrom=$(lsblk | grep / | grep -oE '(mmcblk[0-9]|sda[0-9])') to runfrom=$(lsblk | grep / | grep -oE '(mmcblk[0-9]|sda[0-9])' | uniq) Let me try, thanks a lot. 0 Quote
Juan Rangel Posted January 3 Author Posted January 3 I have tried and put a command echo $runfrom, I get: "sda1 mmcblk0 sed: -e expresion #1, char 6: unterminated 's' command UNABLE TO FIND YOUR EMMC DRIVE OR YOU ALREADY RUN FROM EMMC!!!" After I have put echo $emmc, but it is empty. Could you help me with next step? 0 Quote
Juan Rangel Posted January 4 Author Posted January 4 (edited) Hi, I have just add some "echo" to ddbr script. hasdrives: mmcblk0 mmcblk1 avail: mmcblk0 mmcblk1 sda1 runfrom: sda1 mmclbk0 sed: -e expression #1, char 6: unterminated `s' command emmc: (empty) UNABLE TO FIND YOUR EMMC DRIVE OR YOU ALREADY RUN FROM EMMC!!! So the "sed error" fires in this line: emmc=$(echo $avail | sed "s/$runfrom//" | sed "s/sd[a-z][0-9]//g" | sed "s/ //g") (I still has your modification un runfrom: runfrom=$(lsblk | grep / | grep -oE '(mmcblk[0-9]|sda[0-9])' | uniq) If I put the original one, I get this runfrom: sda1 mmcblk0 mmclbk0 Here the lsblk output Edited January 4 by Juan Rangel 0 Quote
Juan Rangel Posted January 4 Author Posted January 4 (edited) I supposed that I could write in the script emmc="mmcblk1" (i am not completly sure) but I think it is better to find the error and then share it so experts could check again the ddbr script for everybody, isnt it? EDITED: I have finally forced this two values: runfrom="mmcblk0" emmc="mmcblk1" I am now just backing it up meanwhile I get an answer. Runfrom was forced because it also had "sda1" (my usb to save the backup). I have also found a little error in script about autochecking destinantion free space as it checks in "/" root. I have gone on despite this warning, And I am just doing a backup to my usb pendrive (/media/root/16Gb or /sda1) SAVING AND COMPRESSION mmcblk1 TO /media/root/16Gb/BACKUP-arm-64-emmc.img.gz ... 1. Do you agree that this is correct? then I can go to next step, check audio driver and bluetooth (If I try to enabled it in desktop, the icon just dissapers). If "yes, this backup is correct", I will add here (in the next message) the script, some explanations and also (I don't know where) make a PR or ISSUE about ddbr script.(please tell me in which web page or github repo I could warn about this. Then they will decide if they want to check again the script or not as it is only "one" case) NEXT STEP (as you have said when I have the audio, bluetooth, .... verified) will be "install-aml.sh" (may be this script also fails in my configuration). 2. After that, is it good to make again a "emmc" backup image as "fresh installation" ??? Probably I will have same errors in "install-aml.sh" won't I ? 3. About audio and bluetooth problems... are they related with DTB file? Could I get it from the original android tv box firmware that I have backed up? May be it is better to open another post? Or all things about Mini MXIII-II here changing the post title? Thanks a lot Edited January 4 by Juan Rangel 0 Quote
SteeMan Posted January 4 Posted January 4 11 hours ago, Juan Rangel said: 1. Do you agree that this is correct? What you did to force the script to select the proper devices looks good. 0 Quote
SteeMan Posted January 4 Posted January 4 11 hours ago, Juan Rangel said: Probably I will have same errors in "install-aml.sh" won't I ? I don't know. Those scripts are written very differently so the bug you ran into on ddbr may or may not appear for the install script. 0 Quote
Juan Rangel Posted January 14 Author Posted January 14 if someone read this, please, check also this post: 0 Quote
Juan Rangel Posted January 14 Author Posted January 14 On 1/4/2024 at 7:18 PM, SteeMan said: I don't know. Those scripts are written very differently so the bug you ran into on ddbr may or may not appear for the install script. Could you change the TITLE of this post adding at the begining "[SOLVED]", may be it is good for community, thanks 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.