rafaelSorel Posted December 21, 2017 Posted December 21, 2017 Hello, I am using mxq pro 4k and the only dtb file that goes untill the end is the gxbb_p200.dtb, so I have installed every thing on the SD card and every thing works very well. Things getting worse when I installed the linux on the eMMC using the ./install.sh script. The installation goes very well, and every thing starts correctly, the only problem is that many drivers behave strangely, So I have compared the dmesg logs from SD and eMMC and many changes were noticed. So I suspected the dtb file to be not the one used in the SD card, so I have extracted the dtb file used when booting from eMMC and compare it with the one used in SD, and I got a very changed dtb file. I have attached the two dts files. I don't know why the dtb file has changed/patched ? Is there a way to correct the dtb file used in the eMMC ? Thanks for help, mxq_eMMC.dts mxq_SD.dts
Nofan Tasi Posted December 21, 2017 Posted December 21, 2017 23 minutes ago, rafaelSorel said: Hello, I am using mxq pro 4k and the only dtb file that goes untill the end is the gxbb_p200.dtb, so I have installed every thing on the SD card and every thing works very well. Things getting worse when I installed the linux on the eMMC using the ./install.sh script. The installation goes very well, and every thing starts correctly, the only problem is that many drivers behave strangely, So I have compared the dmesg logs from SD and eMMC and many changes were noticed. So I suspected the dtb file to be not the one used in the SD card, so I have extracted the dtb file used when booting from eMMC and compare it with the one used in SD, and I got a very changed dtb file. I have attached the two dts files. I don't know why the dtb file has changed/patched ? Is there a way to correct the dtb file used in the eMMC ? Thanks for help, mxq_eMMC.dts mxq_SD.dts Are you sure mxq pro 4k is p200, not p201 ? If you have (a backup of) android /system/build.prop you can check there. Also how much RAM does the device have? I must admit, there are many boxes called mxq pro 4k with minor differences.
rafaelSorel Posted December 21, 2017 Author Posted December 21, 2017 My box is 1G ram I am not sure about the p200 or p201 but you can check the mxq_SD.dts that I have attached with minor changes that I made to load some other drivers. My problem is coming from the one in the emmc. I don't know how it is autogenerated ? And how to edit/fix it ?
Nofan Tasi Posted December 21, 2017 Posted December 21, 2017 1 hour ago, rafaelSorel said: My box is 1G ram I am not sure about the p200 or p201 but you can check the mxq_SD.dts that I have attached with minor changes that I made to load some other drivers. My problem is coming from the one in the emmc. I don't know how it is autogenerated ? And how to edit/fix it ? Not sure if I can help much. So you compile your own dtb from dts ? Also, which kernel are you running? Just curious: where do the mxq_eMMC.dts mxq_SD.dts files come from?
rafaelSorel Posted December 21, 2017 Author Posted December 21, 2017 No the mxq_SD.dts is a decompiled gxbb_p200.dtb generic file that we could find in the /boot/dtb/ folder . And the mxq_emmc.dts is a decompiled dtb file from emmc after I have run the ./install.sh script. It is a standard armbian server img with kernel version 3.14
Nofan Tasi Posted December 21, 2017 Posted December 21, 2017 55 minutes ago, rafaelSorel said: No the mxq_SD.dts is a decompiled gxbb_p200.dtb generic file that we could find in the /boot/dtb/ folder . And the mxq_emmc.dts is a decompiled dtb file from emmc after I have run the ./install.sh script. It is a standard armbian server img with kernel version 3.14 Thanks for extra information. Perhaps gxbb_p201.dtb in same 3.14 folder would be worth trying. You can still try to boot from external SD using that dtb.img. It does not hurt. If it fits your mxq pro 4k better then again you can try copy to internal. I once had a device called mxq pro 4k which had p201 in build prop. But, as said, there are several mxq pro 4k device variants. Good luck
rafaelSorel Posted December 21, 2017 Author Posted December 21, 2017 Thanks for help but this is not my problem. I want to know why when I have executed the ./linux.sh to copy linux to internal emmc, it does not use the same dtb.img file that is in /boot partition of the SD file, but it generates new one.
Nofan Tasi Posted December 21, 2017 Posted December 21, 2017 1 hour ago, rafaelSorel said: Thanks for help but this is not my problem. I want to know why when I have executed the ./linux.sh to copy linux to internal emmc, it does not use the same dtb.img file that is in /boot partition of the SD file, but it generates new one. I see Need to look into the ./linux.sh script.
rafaelSorel Posted December 21, 2017 Author Posted December 21, 2017 Well actually it's name is install.sh and here is the attached script. install.sh
Nofan Tasi Posted December 21, 2017 Posted December 21, 2017 In the script I notice IMAGE_DTB="/boot/dtb.img" dd if="$IMAGE_DTB" of="/dev/dtb" bs=262144 status=none && sync so it seems it is copied verbatim. Sorry to not answer your question accurately.
rafaelSorel Posted December 21, 2017 Author Posted December 21, 2017 Yes that is my thoughts also, may be we are gona need help from @balbes150 ? to give us some hints about this ? 1
rafaelSorel Posted December 21, 2017 Author Posted December 21, 2017 Yes that is my thoughts also, may be we are gona need help from @balbes150 ? to give us some hints about this ? [Update] It seems that the copy to internal memory that I have done is from armbian-config tools/system/Install to nand, emmc, sata by doing this I could start linux with the mentionned problem of chnaged dtb file. But when running ./install.sh which is suppose to be the same thing I ends up into the android recovery screen. So basically the two methods are not the same : 1- The first one (armbian-config install to nand, emmc) just generate a new dtb file based on the dtb file present on the /boot partition, but really a different dtb file from the sd /boot partion. 2- The second method which is the execution of the ./install.sh script make an exact verbatim copy to the emmc which ends up into recovery android mode.
rafaelSorel Posted December 24, 2017 Author Posted December 24, 2017 [Update] I have backup the android firmware from another mxq box and restore the one that ends up onto the recovery screen, but when I try to install the firmware into the emmc using one of the two scripts (install.sh or nand_sata_install), I always ends up into the recovery screen. Here attached the recovery screen. I don't know why I cannot copy LE from SD to eMMC ? Thanks for your help,
rafaelSorel Posted December 24, 2017 Author Posted December 24, 2017 [Update] I manage to make linux booting from the eMMC, it seems that the boot.img needs to be the same one recovered from android firmware. If we put anther one, the linux one it will ends up onto the recovery screen. [nextstep]: How to change the dtb file to be in sync with the one used on the SD card ? knowing that in andoird the dtb.img file is concatenated with some linux kernel header. any ideas ? Thanks
rafaelSorel Posted December 25, 2017 Author Posted December 25, 2017 I succeded to generate a dtb.img in android format (linux kernel header + dtb.img), The problem comes when I try to update the dtb using this command from LE running on SD or eMMC dd if=./dtb.img of=/dev/dtb bs=256k After rebooting the old dtb is always used !! it seems that u-boot is generating another dtb file and never taking the one that I have flashed on /dev/dtb !!! Any idea on how to resolve this dtb emmc issue ?
balbes150 Posted December 28, 2017 Posted December 28, 2017 You are not the standard model. model = "Amlogic"; compatible = "amlogic, Gxbb"; amlogic-dt-id = "gxl_p281_1g"; This is most likely not S905X , this Amlogic S905W
rafaelSorel Posted December 28, 2017 Author Posted December 28, 2017 Thanks balbes150 for your reply. Yes but I have validate the fact that the dtb used in SD is the suitable one. I want to know Why when booting linux from eMMC it uses different dtb and how to change this dtb ? despite the fact that it is an Amlogic s905W, it works perfectly.
rafaelSorel Posted December 28, 2017 Author Posted December 28, 2017 No not yet , is it possible to do so via serial console ? because via this command : dd if=./dtb.img of=/dev/dtb bs=256k it does not work !
balbes150 Posted December 28, 2017 Posted December 28, 2017 Without the console UART is very difficult to perform the correct script (sequence of commands for u-boot). It's not known what teams are in your u-boot, what is the syntax.
rafaelSorel Posted December 28, 2017 Author Posted December 28, 2017 Ok , I will manage to get the UART output , need to make the UART output on the board.
rafaelSorel Posted January 9, 2018 Author Posted January 9, 2018 @balbes150 Here is attached the serial output of the tvbox. Thanks for help console.log
balbes150 Posted January 12, 2018 Posted January 12, 2018 On 09.01.2018 at 10:55 PM, rafaelSorel said: Here is attached the serial output of the tvbox. Judging by the log, at the start of u-boot is looking for a specific variant ID aml_dt soc: gxl platform: p281 variant: 1g dtb 0 soc: gxl plat: p281 vari: 1g Therefore, when writing to eMMC with another ID dtb, u-boot can use it. For use Armbian of eMMC, You need to collect and write to eMMC correct option dtb (with proper ID). When you run system from SD card ID in the dtb is not checked.
rafaelSorel Posted January 12, 2018 Author Posted January 12, 2018 Thanks for reply, What do you mean by correct option dtb proper ID ? Is it something that I can do ? Thanks,
balbes150 Posted January 15, 2018 Posted January 15, 2018 On 13.01.2018 at 1:36 AM, rafaelSorel said: What do you mean by correct option dtb proper ID ? Is it something that I can do ? Convert a working dtb file (which the system operates) in dts and compare it to the dts file that you have in eMMC. Replace the code and assemble the new dtb with your ID.
rafaelSorel Posted January 15, 2018 Author Posted January 15, 2018 That is what I did, I have created a new dtb file based on the default one present in the emmc, but with minor changes , and when I flash it dd if=./new_dtb.img of=/dev/dtb bs=256k with the new created one and reboot, the system is always using the old one present in the emmc !
rafaelSorel Posted January 20, 2018 Author Posted January 20, 2018 @balbes150: Is there a way to flash a fresh compiled u-boot directly on the emmc, by doing this , it is quite easy to do what ever we wants ? Thanks,
balbes150 Posted January 20, 2018 Posted January 20, 2018 Record your u-boot to eMMC - possible. You need to know, or what teams laid the manufacturer of u-boot, or to have an image of /dev/bootloader , something to record it with the dd command.
rafaelSorel Posted January 20, 2018 Author Posted January 20, 2018 @balbes150, yes of course I will record the /dev/bootloader which is the original u-boot that I could reflash it in case of problem. otherwise is it possible to flash the U-Boot that is used on the SD card to the /dev/bootloader ? Thanks,
balbes150 Posted January 21, 2018 Posted January 21, 2018 9 hours ago, rafaelSorel said: otherwise is it possible to flash the U-Boot that is used on the SD card to the /dev/bootloader ? I recommend to verify that u-boot steps strictly in this order. 1. To erase the u-boot in eMMC (TV box will not start this is normal, it is easy to fix in the future). 2. Record on SD card of your new (made by you) u-boot. 3. To check out the launch of a new u-boot from SD card on your TV box. 4. If your new u-boot will normally be run from SD card, you can try to burn it to eMMC.
Recommended Posts