Jump to content

Recommended Posts

Posted

@balbes150

Hello Oleg, I have downloaded file KM8P-MHC19J-20170224.165245.V0923.img  from 4pda thread on Km8-P ( http://4pda.ru/forum/index.php?showtopic=807465 ) , is there any way I could extract the u-boot binary from that image file and put it on an SD card using your previous instructions? Or do you suggest I try another u-boot binary ? Thank you for your help. :)

 

 

Edit: I have answered my own question by following the instructions on this page: https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-recovery-sd-card-for-amlogic-tv-boxes/

 

and after rebooting with the card with the u-boot from the image file linked above, IT WORKS! :beer:

 

Here is the dmesg first few lines:

 

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 4.20.5-aml-s912 (root@vbox) (gcc version 7.2.1 2017
1011 (Linaro GCC 7.2-2017.11)) #5.75 SMP PREEMPT Mon Feb 11 17:40:28 MSK 2019
[    0.000000] Machine model: Amlogic Meson GXM (S912) Q201 Development Board
[    0.000000] OF: reserved mem: failed to allocate memory for node 'linux,cma'
[    0.000000] cma: Reserved 256 MiB at 0x0000000023400000
[    0.000000] On node 0 totalpages: 224000
[    0.000000]   DMA32 zone: 3520 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 224000 pages, LIFO batch:63
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] random: get_random_bytes called from start_kernel+0xa8/0x400 with

...

 

Conclusion: Oleg, you are a genius, it was exactly the u-boot in my Km8-P original firmware that was preventing booting a 4.xx kernel.

:beer: :beer: :beer: 
 

<
Posted
2 hours ago, AndrewDB said:

and after rebooting with the card with the u-boot from the image file linked above, IT WORKS!

Congratulations, you've finally resolved this issue. :)

Posted
3 hours ago, AndrewDB said:

it was exactly the u-boot in my Km8-P original firmware that was preventing booting a 4.xx kernel.

Can you show the full startup log of the new kernel (along with messages from u-boot) ?

Posted
55 minutes ago, balbes150 said:

Can you show the full startup log of the new kernel (along with messages from u-boot) ?

Sure, here it is attached. Note that I had to interrupt u-boot and manually load zImage etc and then booti, otherwise it was looping because of different env settings. I still have to reboot this box, enter proper env setting, and save them.

 

The main difference I see is in the handling of the DRAM. The frequency tested is 768MHz in this case.

GXM:BL1:dc8b51:76f1a5;FEAT:ADFC318C:80;POC:3;RCY:0;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;0.0;CHK:0;
no sdio debug board detected
TE: 132425

BL2 Built : 13:18:48, Dec 21 2016.
gxl g4fc4d4e - xiaobo.gu@droid05

set vdd cpu_a to 1120 mv
set vdd cpu_b to 1050 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - FAIL
DDR3 chl: Rank0 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from SD, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from SD, src: 0x00020200, des: 0x10100000, size: 0x00015400
Load bl33 from SD, src: 0x00038200, des: 0x01000000, size: 0x000aa400
NOTICE:  BL3-1: v1.0(debug):fb68908
NOTICE:  BL3-1: Built : 18:30:11, Nov  1 2016
aml log : bl31 normal boot !

...

 

 

S912_uboot_OK.log

Posted
43 minutes ago, AndrewDB said:

Sure, here it is attached. Note that I had to interrupt u-boot and manually load zImage etc and then booti, otherwise it was looping because of different env settings. I still have to reboot this box, enter proper env setting, and save them.

Have you tried to write to eMMC the firmware from which you took this u-boot ? Perhaps with it the kernel 4 \ 5 will be able to be started.

Posted

I haven't tried it yet, I was actually thinking about flashing your Armbian image with kernel 4.20 directly onto the internal eMMC once I have determined working and safe u-boot env settings, since I don't really need Android on these boxes.

Posted
2 minutes ago, AndrewDB said:

I haven't tried it yet, I was actually thinking about flashing your Armbian image with kernel 4.20 directly onto the internal eMMC once I have determined working and safe u-boot env settings, since I don't really need Android on these boxes.

Wait a bit, I am now building a new u-boot and it is advisable to test it on your model.

Posted

@AndrewDB

Now found one feature of. I recorded the last images for S905 to Sd card, changed in DTB settings (file /boot/extlinux/extlinux.conf) for VIM2 (S912) and checked the startup on S912 (without u-boot in eMMC). The system starts with the use of u-boot for VIM1 at S912. And in the console I saw this information. Ie checked all versions of DDR. Try the same version of the kernel startup 4\5 (image from S905 there is another u-boot).

 

set vcck to 1120 mv                                                                                                                                                     
set vddee to 1000 mv                                                                                                                                                    
Board ID = 6                                                                                                                                                            
CPU clk: 1200MHz                                                                                                                                                        
DQS-corr enabled                                                                                                                                                        
DDR scramble enabled                                                                                                                                                    
DDR3 chl: Rank0+1 @ 768MHz - FAIL                                                                                                                                       
DDR3 chl: Rank0 @ 768MHz - FAIL                                                                                                                                         
DDR3 chl: Rank0 16bit @ 768MHz - FAIL                                                                                                                                   
DDR4 chl: Rank0+1 @ 1008MHz - PASS                                                                                                                                      
Rank0: 2048MB(auto)-2T-18                                                                                                                                               
Rank1: 1024MB(auto)-2T-18                                                                                                                                               
DataBus test pass!                                                                                                                                                      
AddrBus test pass!

Posted
1 hour ago, balbes150 said:

Wait a bit, I am now building a new u-boot and it is advisable to test it on your model.

Sure thing, always happy to test your latest work! :thumbup:

Posted (edited)
30 minutes ago, balbes150 said:

@AndrewDB

Now found one feature of. I recorded the last images for S905 to Sd card, changed in DTB settings for VIM2 (S912) and checked the startup on S912 (without u-boot in eMMC). The system starts with the use of u-boot for VIM1 at S912. And in the console I saw this information. Ie checked all versions of DDR. Try the same version of the kernel startup 4\5 (image from S905 there is another u-boot).

 

set vcck to 1120 mv                                                                                                                                                     
set vddee to 1000 mv                                                                                                                                                    
Board ID = 6                                                                                                                                                            
CPU clk: 1200MHz                                                                                                                                                        
DQS-corr enabled                                                                                                                                                        
DDR scramble enabled                                                                                                                                                    
DDR3 chl: Rank0+1 @ 768MHz - FAIL                                                                                                                                       
DDR3 chl: Rank0 @ 768MHz - FAIL                                                                                                                                         
DDR3 chl: Rank0 16bit @ 768MHz - FAIL                                                                                                                                   
DDR4 chl: Rank0+1 @ 1008MHz - PASS                                                                                                                                      
Rank0: 2048MB(auto)-2T-18                                                                                                                                               
Rank1: 1024MB(auto)-2T-18                                                                                                                                               
DataBus test pass!                                                                                                                                                      
AddrBus test pass!

OK, I am downloading the Armbian image now and will report on how it works asap.

 

Edit: WORKED PERFECTLY! Thank you Oleg, you have exactly found the problem and the best solution! Anything else you want me to test, just ask, please! :beer:

Edited by AndrewDB
new info
Posted
53 minutes ago, AndrewDB said:

Anything else you want me to test,

 

I uploaded a test image 5.76 NEXT with kernel 5 (for a quick check of u-boot) to the site. USB does not work in this image. Just downloaded two deb package with uboot (unzip them and use to write to the SD card files u-boot.bin). I checked another NEXT image from the 5.73 directory with the addition to the SD card after burning the image, u-boot.bin from DEB package for S905. The system starts normally and can be controlled via USB keyboard, but there is no wired network.

Posted (edited)
2 hours ago, balbes150 said:

 

I uploaded a test image 5.76 NEXT with kernel 5 (for a quick check of u-boot) to the site. USB does not work in this image. Just downloaded two deb package with uboot (unzip them and use to write to the SD card files u-boot.bin). I checked another NEXT image from the 5.73 directory with the addition to the SD card after burning the image, u-boot.bin from DEB package for S905. The system starts normally and can be controlled via USB keyboard, but there is no wired network.

Completed tests:

 

1. Previous u-boot (from file s905x-uboot.img in Armbian 5.75 image) Image Armbian_5.76_Aml-s905_Ubuntu_bionic_next_5.0.0-rc7-next-20190219-g43dc36c94-dirty.img.xz boots fine on Km8-P (S912) with 1Gb RAM. Ethernet (wired) works erratically. USB does NOT work (kernel or dtb issue?)

 

(Edit)

2. u-boot.bin from deb package for S905: Image Armbian_5.76_Aml-s905_Ubuntu_bionic_next_5.0.0-rc7-next-20190219-g43dc36c94-dirty.img.xz boots BUT there is a kernel panic before prompt is reached (perhaps too tight memory timings?).

 

(Edit)

3. u-boot.bin from deb package for S912: does not boot. Error is in u-boot RAM detection, as before:

BL2 Built : 14:59:36, Aug  9 2017.
gxl ge8c6a83 - xiaobo.gu@droid12

set vdd cpu_a to 1120 mv
set vdd cpu_b to 1050 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 912MHz - FAIL
DDR4 chl: Rank0+1 @ 1008MHz - FAIL
DDR init failed...
Reset...

I am going to use Armbian Image 5.75 with kernel 4.20 with u-boot from file s905x-uboot.img in Armbian 5.75 image for a few days to test for stability and if I don't find any problems, I think I am going to install it in eMMC on my three Km8-P boxes, which I use mainly for kernel compiling.

Edited by AndrewDB
More information added
Posted

Tested the Armbian_5.76_Aml-s905_Ubuntu_bionic_next_5.0.0-rc7-next-20190219-g43dc36c94-dirty on MXQ Pro + 4k >(S905x), boots fine but USB does not work so unable to log in.

 

Posted
17 hours ago, AndrewDB said:

Yes, the WiFi module in the Km8-P uses a S9082 chip for which there is no source code for any Linux kernel, we just have the .ko module built for the Amlogic 3.14.29 kernel as distributed by hardware vendors that use this module, this is why some xxxxelec images are shipped with this module and provide WiFi, but any Linux image with a kernel other than the original Amlogic 3.14.29 won't - including of course any Armbian image.

After reopening my box (m8s pro/s912x-3g)  the wifi  chip is an ltm8830  (it appears to be same as in the T95z ?) there are some threads on it, I'll follow up on those.

 

As for the Ethernet, there is absolutely no joy with any of the dtb's. (tried all the gxm,gxl )  the one thing that 'tickles' me is that upon boot,(prior/during the uboot process)  it shows the following:

...
 size: 0
Net:   eth-1: ethernet@c9410000
Hit any key to stop autoboot:  1 nux/extlinux.conf
....

Does it mean that's using physical interface #1 ? (instead of 0)  ..again, there are some threads that indicate that's the case for the T95z .... 

guess I'll try making /changing the dtd.img and try..

 

On Another issue, after updating the u-boot.img to 2018's,  I seem to no longer be able to boot 3.14 (?) perhaps i need a different version of u-boot.img for 3.14? 

or are there special flags to be passed ? (even tried to manually fatload/booti known-to-work files and it freezes )

 

Thanks for any relevant info/pointers.

C.

 

 

 

Posted
14 hours ago, AndrewDB said:

I am going to use Armbian Image 5.75 with kernel 4.20 with u-boot from file s905x-uboot.img in Armbian 5.75 image for a few days to test for stability and if I don't find any problems, I think I am going to install it in eMMC on my three Km8-P boxes, which I use mainly for kernel compiling.

Try  test. :) Write to eMMC the standard firmware from which you took u-boot. And after that, check the standard option-activate multi-boot and try to run Armbian (with 4.20 kernel) as usual from external media.

 

5 hours ago, Carlos.latour said:

On Another issue, after updating the u-boot.img to 2018's,  I seem to no longer be able to boot 3.14 (?) perhaps i need a different version of u-boot.img for 3.14? 

or are there special flags to be passed ? (even tried to manually fatload/booti known-to-work files and it freezes )

Running the kernel 3.14 is possible, but requires other scripts and settings at startup. To run Armbian in u-boot-2018, use the settings file /boot/extlinux/extlinux.conf

Posted

I was thinking: My Android (7.1.2) for MXQ Pro+ 4k runs on a Linux 3.14.29 kernel, that's the Linux part (and why the correct name for Ubuntu, Debian etc. is GNU/Linux).

The Android image is pre-rooted so I have access to all parts of the system in theory. What if I just copy the missing GNU components from another 3.14.29 GNU/Linux into the proper directories and purge the Android specific stuff, will I get a running system? The kernel has support for all HW in the box, yes some modules I will have to keep, but if I just copy and not overwrite anything I should get a working GNU/Linux?

What do you guys think, am I missing something essential here?

Posted
8 hours ago, Reddwarf said:

I was thinking: My Android (7.1.2) for MXQ Pro+ 4k runs on a Linux 3.14.29 kernel, that's the Linux part (and why the correct name for Ubuntu, Debian etc. is GNU/Linux).

The Android image is pre-rooted so I have access to all parts of the system in theory. What if I just copy the missing GNU components from another 3.14.29 GNU/Linux into the proper directories and purge the Android specific stuff, will I get a running system? The kernel has support for all HW in the box, yes some modules I will have to keep, but if I just copy and not overwrite anything I should get a working GNU/Linux?

What do you guys think, am I missing something essential here?

I was thinking about doing exactly that for an A95Xpro (runs kernel 4.9.xx)  the issue i've run into is the reconfiguration of the Initrd (can't seem find a way to decompress it, which seems to be required to replace init ) 

Really interested in the answer.

Posted

The answer is simple-a waste of time. Details can be found on the Internet on request, what is the difference between Android and Linux systems.

Posted
5 minutes ago, balbes150 said:

The answer is simple-a waste of time. Details can be found on the Internet on request, what is the difference between Android and Linux systems.

It may be a waste of time, however in the case of the s905X2, all the proper drivers are already configured (granted,it's the old/buggy 4.9.xx) which helps in quickly setting up a  linux mini-server. (mqtt,lamp,mysql, node-red, etc etc etc.  )

 

As for android, if I could completely replace/remove it from most of my arm boxes I'd be a very happy man ! (try to setup an apache server under android's !)

Posted
1 hour ago, balbes150 said:

The answer is simple-a waste of time. Details can be found on the Internet on request, what is the difference between Android and Linux systems.

There is a BIG difference between Android and GNU/Linux, I can not run my NewCS carsderver under Android, among countless other applications....

Posted
2 hours ago, Carlos.latour said:

I was thinking about doing exactly that for an A95Xpro (runs kernel 4.9.xx)  the issue i've run into is the reconfiguration of the Initrd (can't seem find a way to decompress it, which seems to be required to replace init ) 

Really interested in the answer.

Interesting, I'll have a look into the initrd issue and see what I can find.

 

Edit: Did you try this method https://www.thegeekstuff.com/2009/07/how-to-view-modify-and-recreate-initrd-img/

or https://sites.google.com/site/sridharlreddylinux/linux-t/initrd-img

or https://access.redhat.com/solutions/24029

Posted
9 hours ago, Reddwarf said:

Yes, all of them use gzip/lz etc. to decompress the initrd file, but on the files that i've tried all of them seem to be compressed with somthing else (file initrd just answer with 'data'  and cpio just can't decode it. ) it is entirely possible that the file is both compressed and encrypted. (actually, quite possible)  it does not appear to be an ramfs file either (at least, not a standard one. compressed or not)

 

I seem to be able to get the kernel image fine (abooting) and a second file too, but can't decode the resulting initrd/ramfs.

 

Posted
4 hours ago, Carlos.latour said:

Yes, all of them use gzip/lz etc. to decompress the initrd file, but on the files that i've tried all of them seem to be compressed with somthing else (file initrd just answer with 'data'  and cpio just can't decode it. ) it is entirely possible that the file is both compressed and encrypted. (actually, quite possible)  it does not appear to be an ramfs file either (at least, not a standard one. compressed or not)

 

I seem to be able to get the kernel image fine (abooting) and a second file too, but can't decode the resulting initrd/ramfs.

 

I see, was this Android 8? I'll do some more digging then. I will test with android 6 and 7 and see what I can find out.

Posted
1 minute ago, Reddwarf said:

I see, was this Android 8? I'll do some more digging then. I will test with android 6 and 7 and see what I can find out.

yes, 8.1, I did a lengthy search, and aside from a (4.4/kitkat, 7ci cheapo tablet) trick where the actual initrd file had a header of about 70bytes of garbage, I've found nothing.   (tried doing a dump/analysis of the file to see if I could find an gzip/lz/xz etc. header within the file, but without results :-( 

 

The only idea that came to mind, was to re-create a similar version of the kernel/init etc, and import the modules from the android setup (i.e cp the /lib/modules) to ease into a clean setup. (at that point, it may be easier just to find and recompile the whole thing! )

 

 

Posted
2 minutes ago, Carlos.latour said:

The only idea that came to mind, was to re-create a similar version of the kernel/init etc, and import the modules from the android setup (i.e cp the /lib/modules) to ease into a clean setup. (at that point, it may be easier just to find and recompile the whole thing! )

 

 

If you could find the source, but I doubt you will. Even cheap China tablet makers holds the source propietary so the only source you will find is open source, and then the HW support is probably not so good so point lost. I don't have any Android build on kernel 4 so can't investigate that.

Posted
25 minutes ago, Carlos.latour said:

yes, 8.1, I did a lengthy search, and aside from a (4.4/kitkat, 7ci cheapo tablet) trick where the actual initrd file had a header of about 70bytes of garbage, I've found nothing.   (tried doing a dump/analysis of the file to see if I could find an gzip/lz/xz etc. header within the file, but without results :-(

According to Stackexcange the following compression is supported:


usr/Kconfig:134:config INITRAMFS_COMPRESSION_NONE

usr/Kconfig:145:config INITRAMFS_COMPRESSION_GZIP

usr/Kconfig:155:config INITRAMFS_COMPRESSION_BZIP2

usr/Kconfig:168:config INITRAMFS_COMPRESSION_LZMA

usr/Kconfig:181:config INITRAMFS_COMPRESSION_XZ

usr/Kconfig:194:config INITRAMFS_COMPRESSION_LZO

usr/Kconfig:206:config INITRAMFS_COMPRESSION_LZ4

Posted
21 minutes ago, Reddwarf said:

According to Stackexcange the following compression is supported:

 


usr/Kconfig:134:config INITRAMFS_COMPRESSION_NONE

usr/Kconfig:145:config INITRAMFS_COMPRESSION_GZIP

usr/Kconfig:155:config INITRAMFS_COMPRESSION_BZIP2

usr/Kconfig:168:config INITRAMFS_COMPRESSION_LZMA

usr/Kconfig:181:config INITRAMFS_COMPRESSION_XZ

usr/Kconfig:194:config INITRAMFS_COMPRESSION_LZO

usr/Kconfig:206:config INITRAMFS_COMPRESSION_LZ4

 

with the sole exception of  bzip2 (gzip2?)  i've tried them all. (I'll try it later)

 

Posted
46 minutes ago, Carlos.latour said:

with the sole exception of  bzip2 (gzip2?)  i've tried them all. (I'll try it later)

 

No bzip2 is not the same as gzip2 afaik...

Posted

New version 5.75 (found in catalog 5.76). This confusion is due to the fact that this variant uses an Assembly from the tvboxes branch (the number has not changed there yet). :)

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines