8 8
xaduha

research Since Tanix TX6 can boot from the SD card

Recommended Posts

You have u-boot already doing the minimum necessary work-loading the kernel and running it. Will try different DTB that are available for H6. Perhaps some of them will have the minimum necessary configuration for starting the kernel.

Share this post


Link to post
Share on other sites

By the way, I published new images 20200117 19.11.5, there are several different DTB there. You can take this image, add your u-boot to it, and play with the different DTB that are there (you can try other ready-made DTB for kernel 5 from other sources). Setting up the DTB used there is very simple - change the name in the file " uEnv.txt".  

 

 

For all. These images added a test version of the system installation in eMMC for H6.  :)

Share this post


Link to post
Share on other sites
34 minutes ago, balbes150 said:

By the way, I published new images 20200117 19.11.5, there are several different DTB there. You can take this image, add your u-boot to it, and play with the different DTB that are there (you can try other ready-made DTB for kernel 5 from other sources). Setting up the DTB used there is very simple - change the name in the file " uEnv.txt".  

 

 

For all. These images added a test version of the system installation in eMMC for H6.  :)

great,,, and where i can download and try this "20200117 19.11.5" things?:D

Share this post


Link to post
Share on other sites
21 minutes ago, zero said:

great,,, and where i can download and try this "20200117 19.11.5" things?

See the topic in the section TV boxes RK+AML+AW

Share this post


Link to post
Share on other sites
6 hours ago, balbes150 said:

See the topic in the section TV boxes RK+AML+AW

I sometimes think that there should be some ... more obvious centralized ressource pointing to the various architectures, platforms and such.

Like a directory "images", and each architecture gets its own subthread ( allwinner A33 ; s905W ) there, and whenever an new installation directory is created ( like somebody swapping from yadisk to google drive, or somebody posting a new image on baidu ) a new posting is made. 

 

I admit I suck at using the search, for when I look for "s905w  .img" I get dozens of results, just none pointing to images for the s905w chipset.

Share this post


Link to post
Share on other sites

@jernej  Do you know why on H6, u-boot-2019 defines the SD card as mmc 0 and eMMC is defined as mmc 1 (on other RK and AML platforms, it's the opposite of SD-1 and eMMC 0)  ?

Share this post


Link to post
Share on other sites

@balbes150 I don't know much about RK and AML, but on AW most, if not all, SoCs have 3 mmc ports. SD card is always connected on first one, wifi SDIO module on second and eMMC on third. I guess that U-Boot enumerates devices in port order, so that would mean that SD card is always first device. However, another explanation would be that first device is one which you booted from - did you check that?

Share this post


Link to post
Share on other sites
19 hours ago, jernej said:

However, another explanation would be that first device is one which you booted from - did you check that?

Tnx. I will check this, although the first explanation looks like the real situation.

Share this post


Link to post
Share on other sites

Now I checked the launch of my image on Orangepi PC2 and found that u-boot for this model supports a number of interesting features, including starting from USB. I wonder if it is possible to take work items from u-boot OPI PC2 for USB And add them to u-boot for H6 ?

Share this post


Link to post
Share on other sites

AFAIK H6 USB3 is not supported yet in U-Boot, I have no idea about USB2 though. Also ethernet driver is not yet supported, although patch for boards with external PHY exist.

Share this post


Link to post
Share on other sites
10 minutes ago, jernej said:

AFAIK H6 USB3 is not supported yet in U-Boot, I have no idea about USB2 though. Also ethernet driver is not yet supported, although patch for boards with external PHY exist.

For now, it would be enough to start with USB 2.0 (support in u-boot USB 2.0). Then the kernel starts working with its support for the rest of the hardware. :)

Share this post


Link to post
Share on other sites

Added several patches to u-boot and now the system starts immediately from USB (u-boot now sees USB flash drives and normally starts the system from them).  :)

Share this post


Link to post
Share on other sites

@jernej  I found a strange bug. I added patches for enabling USB startup to the LE source code a long time ago, but when using them on H6, when initializing USB in u-boot, I see a controller error. But when I used the same patches with the same version of u-boot in Armbian, everything worked well on H6 (I checked running with USB Armbian and LE, everything works without problems). It is not clear why the patches do not work correctly in LE.  :(

 

Share this post


Link to post
Share on other sites
16 minutes ago, jernej said:

(up to 5 seconds on some boards)

USB makes life very easy for users, and 5 seconds is not worth the convenience. :)

Share this post


Link to post
Share on other sites
2 minutes ago, balbes150 said:

USB makes life very easy for users, and 5 seconds is not worth the convenience.

Well, there is another issue. U-Boot detected spurious key press on some keyboards, which were plugged in during boot. This caused abort of boot and clueless user thought that something is broken (there was nothing on screen). Such reports happened several times already.

 

Besides you, nobody complained that USB support in U-Boot is missing. I think most users don't care about U-Boot, they just want that LE is booted either from SD or eMMC.

Share this post


Link to post
Share on other sites
15 minutes ago, jernej said:

 

Besides you, nobody complained that USB support in U-Boot is missing. I think most users don't care about U-Boot, they just want that LE is booted either from SD or eMMC.

Users are not aware of this feature. It does not appear immediately (in regular Android firmware it is not). Need to inform users how  can use  it. :)

Share this post


Link to post
Share on other sites

Allwinner SoCs can't boot from USB natively. So you must have SD card or eMMC to boot from anyway. But then it doesn't really matter if you load kernel and base filesystem from SD, eMMC or USB, does it? Once you booted Linux, you can use USB sticks as additional storage device.

Share this post


Link to post
Share on other sites
53 minutes ago, jernej said:

Allwinner SoCs can't boot from USB natively. So you must have SD card or eMMC to boot from anyway. But then it doesn't really matter if you load kernel and base filesystem from SD, eMMC or USB, does it? Once you booted Linux, you can use USB sticks as additional storage device.

 

If eMMC has a system with a u-boot that supports starting from USB, I can easily start any additional systems without any additional configuration, just plug in the USB and turn on the power. For example, I have Armbian installed in eMMC for main use, but I can connect USB with LE to start it immediately (I don't change anything in the existing system in eMMC). Same with the SD card. I don't need anything to pull out and change, just plug in the USB and immediately get a fully working USB system (including the kernel and everything else). It is much easier to use USB, I can write it on absolutely any PC, all of them have USB. Card reader-rarely available on a PC. The same goes for USB distribution, it's much easier to buy and use anywhere than an SD card. By the way, USB 3.0 speeds are now much higher than any SD card. Yes, initially I may need an SD card, for a one-time write to eMMC of a new system with u-boot with support for starting from USB. Or if there is Android in eMMC, I can replace u-boot without an SD card, using only USB.  :)

Share this post


Link to post
Share on other sites
2 hours ago, jernej said:

Allwinner SoCs can't boot from USB natively.

Not natively, but with the help of some SPI-NOR, such as OrangePiPC2 or OrangePiWin. I've even added a custom patch to my Armbian build tree to add a SPI-NOR to the header of my Pine64, I could then boot from USB.

Share this post


Link to post
Share on other sites
6 minutes ago, martinayotte said:

Not natively, but with the help of some SPI-NOR, such as OrangePiPC2 or OrangePiWin. I've even added a custom patch to my Armbian build tree to add a SPI-NOR to the header of my Pine64, I could then boot from USB.

I know, but now and then there are U-Boot changes which influence Linux. For example, I figured out that enabled display driver in U-Boot occasionally prevents Linux driver to read EDID. I could as well add unconditional HDMI reset in kernel, but then display would blink. Eventually, we will also add support for DT overlays in extlinux.conf which needs patched U-Boot, at least at first, until changes get merged upstream. Because of such things I like to keep U-Boot under control in official LE images. I have nothing against community builds which change this behaviour and enable multi-boot systems, but this is can of worms if not done correctly. I don't want to support that as official LE feature at this point.

Share this post


Link to post
Share on other sites

Got this msg from the very beginning of the boat log...

is this really tell that the board is broken/hardware fault?

 

boot emmc

[168]HELLO! BOOT0 is starting!
[171]boot0 commit : 8
[185]set pll start
[188]set pll end
[190]rtc[0] value = 0x00000000
[193]rtc[1] value = 0x00000000
[196]rtc[2] value = 0x00000000
[199]rtc[3] value = 0x00000000
[202]rtc[4] value = 0x00000000
[205]rtc[5] value = 0x00000000
[208]DRAM VERSION IS V2_78
[211]the chip id is 0x00000003
[214]the chip id is 0x00000003
[217]the chip id is 0x00000003
[220]the chip id is 0x00000003
[223]the chip id is 0x00000003
[226]chip id check OK
[229]DRAM CLK =648 MHZ
[231]DRAM Type =3 (3:DDR3,4:DDR4,6:LPDDR2,7:LPDDR3)
[236]DRAM zq value: 003b3bfb
[540]MP_PGSR0 IS = 0100017d
[543]BYTE0 GATE ERRO IS = 00000000
[546]BYTE1 GATE ERRO IS = 00000000
[550]BYTE2 GATE ERRO IS = 00000000
[553]BYTE3 GATE ERRO IS = 00000000
[556]IPRD=00710070--PGCR0=0100017d--PLL=b0003500
[561]DRAM initial error : 1 !
[564]initializing SDRAM Fail.

 

boot sdcard (tx6 image)

[177]HELLO! BOOT0 is starting!
[181]boot0 commit : 92fbece68a08eb88ae0862889a59ae15d6963156

[199]set pll start
[202]set pll end
[204]DRAM VERSION IS V2_761
[508]MP_PGSR0 IS = 0040005d
[511]BYTE0 GATE ERRO IS = 00000002
[514]BYTE1 GATE ERRO IS = 00000002
[518]BYTE2 GATE ERRO IS = 00000002
[521]BYTE3 GATE ERRO IS = 00000002
[826]MP_PGSR0 IS = 0100017d
[829]BYTE0 GATE ERRO IS = 00000000
[832]BYTE1 GATE ERRO IS = 00000000
[835]BYTE2 GATE ERRO IS = 00000000
[839]BYTE3 GATE ERRO IS = 00000000
[842]scan dram size fail !
[845]initializing SDRAM Fail.

is there anything i can do to resolve this issue?

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
8 8