0
rafaelSorel

Strange behaviour after installing linux on emmc.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

[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,
 

20171221_232524.jpg

Share this post


Link to post
Share on other sites

[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

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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 !

 

 

Share this post


Link to post
Share on other sites

@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,

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0