Jump to content

Since Tanix TX6 can boot from the SD card


xaduha

Recommended Posts

hi @balbes150, i think the attached one should be it (just dd it to the sd card with bs=512 skip=1 seek=1 to save the partiton table) - please let me know in case it should not work. i'll also attach my kernel config - maybe it helps you to figure out what is the problem with your generic one.

 

good luck and best wishes - hexdump

boot-h6_tv_box-aarch64.dd config-h6

Link to comment
Share on other sites

hi @balbes150 - here is my dtb in source and binary and to make it complete also the other patches i use against the current megous 5.4 tree (just in case there is anything interesting in them for you). to my surprise the frequency scaling hack i was using with an adjusted opp table and fake vcccpu and dcdcc does not seem to work anymore in v5.4 (it only runs at fixed 900mhz again now) - i'll have to investigate why ...

 

best wishes - hexdump

emmc-fix.patch h6-ac200-eth-and-local-changes-v5.4.patch h6-ac200-eth-new-files.patch sun50i-h6-eachlink-h6mini.dts sun50i-h6-eachlink-h6mini.dtb

Link to comment
Share on other sites

53 minutes ago, balbes150 said:

Took "clean" config from LE and built Armbian with It (version 20191222). Now the wired network works.  Perhaps when using the universal kernel config, some options are not in the state that would ensure the operation of a wired network. :)

 

@hexdump  @PiotrO   Can you drop me a copy of the u-boot and dtb you use for Eachlink H6 ? For u-boot, you can simply make a copy of the DD - 4M from your working SD card.

@balbes150

pls find below:

On 5.5 kernel - for eachlink H6 i'm using this patch to get dtb:

https://github.com/warpme/minimyth2/blob/master/script/kernel/linux-5.5/files/0530-arm64-dts-allwinner-add-Eeachlink-H6-Mini.patch

For u-boot I'm using custodian repo:

https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi

with patch adding H6 support:

https://github.com/warpme/minimyth2/blob/master/script/bootloaders/u-boot-sunxi/files/0001-sunxi-H6-Add-basic-Eachlink-H6-Mini-support.patch

Pls let me know do You still need 4M from SD card. 

(of corse I'm sure You remember to add PWM & AC200 support in kernel)

br

Link to comment
Share on other sites

Looks like for my eachlink H6 model (not mini), need another u-boot. None of the tested variants did not produce results. Android starts. When you connect the SD card, there is no launch of Android (so there is an appeal to the SD card). On TX6 if is used not the right DTB, there is modicum any message, and here full silence. Without UART it is not clear what is happening. I tried to connect UART, but there is no output to the console at all. On infe in Internet, on this model there is no full-fledged UART, lacks parts of details. :(

Link to comment
Share on other sites

ok - i got the frequency scaling problem sorted out for my 5.4 kernel: if the opp table in your arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi is compatible = "allwinner,sun50i-h6-operating-points" instead of the old compatible = "operating-points-v2" then you need the attached dts/dtb and add the CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM option to your kernel ... it seems to be specific to the megous kernel i guess (https://github.com/megous/linux/commit/8bad58044be498d409400dbf9757f2ae25c6ad9d#diff-6b1746cab346b54e23ae12e093173b4c) but might get relevant for newer mainline kernel versions too as he seems to upstream quite a bit of his stuff ...

 

best wishes - hexdump

sun50i-h6-eachlink-h6mini.dtb sun50i-h6-eachlink-h6mini.dts

Link to comment
Share on other sites

2 hours ago, hexdump said:

mem=2048M video=HDMI-A-1:e

Added these settings and got the message from the TV about an unsupported mode. Pulled out HDMI and plugged again and the image appeared. Means u-boot, kernel and DTB working. But there is no wired network yet. But this is already a big progress, there is something to work on that would make this TV box work, and not fall on the shelf. By the way, the sound and USB WiFi\LAN and stuff works. :)

 

 

 

Added these parameters to (extlinux.conf) for the Le image and everything automatically started with default u-boot and dtb for TX6. There is a network, a sound and other on Eachlink H6.  :)

Link to comment
Share on other sites

1 hour ago, balbes150 said:

Added these settings and got the message from the TV about an unsupported mode. Pulled out HDMI and plugged again and the image appeared. Means u-boot, kernel and DTB working. But there is no wired network yet. But this is already a big progress, there is something to work on that would make this TV box work, and not fall on the shelf. By the way, the sound and USB WiFi\LAN and stuff works. :)

 

 

 

Added these parameters to (extlinux.conf) for the Le image and everything automatically started with default u-boot and dtb for TX6. There is a network, a sound and other on Eachlink H6.  :)

@balbes150

Regarding Eth: for sure You have AC200 2& H6 and PWM patches + proper kernel config?

IIRC kernel config should have:

CONFIG_COMMON_CLK_PWM=y

CONFIG_PWM_SUN4I=y

CONFIG_DWMAC_SUN8I=m

CONFIG_AC200_PHY=y

CONFIG_MFD_AC200=y

CONFIG_I2C_MV64XXX=y

note that all mentioned drivers have to be =y and only DWMAC_SUN8I=m 

 

Link to comment
Share on other sites

25 minutes ago, PiotrO said:

IIRC kernel config should have:

I'll try to check these options for the universal kernel config.

 

10 minutes ago, hexdump said:

for the ethernet patches maybe have a look at the patches i have appended above - they are mostly consisting of the ac200 eth + pwm stuff ...

The kernel sources are the same, the difference is only in the kernel config. With config from LE network and everything else works well on both models (Tx6 and Eachlink). The network does not work only in a universal image (as @jernej and @PiotrO said above due to the specifics of kernel options).

Link to comment
Share on other sites

31 minutes ago, PiotrO said:

CONFIG_COMMON_CLK_PWM=y

CONFIG_PWM_SUN4I=y

CONFIG_DWMAC_SUN8I=m

CONFIG_AC200_PHY=y

CONFIG_MFD_AC200=y

CONFIG_I2C_MV64XXX=y

note that all mentioned drivers have to be =y and only DWMAC_SUN8I=m 

I checked these options, they correspond to the specified values. Means the reason in availability of options from other platforms (RK and AML), which can hinder work AW.

Link to comment
Share on other sites

2 hours ago, balbes150 said:

I checked these options, they correspond to the specified values. Means the reason in availability of options from other platforms (RK and AML), which can hinder work AW.

@balbes150: fyi: I take special care with these options to have single kernel config working for AML/RK/ALW/BCM.

Tested on 7 hw platforms I have and those seems to work ok...

Link to comment
Share on other sites

@balbes150 Just build Armbian from your repo, used the aw-h6-tv config and flashed SD. Booted Eachlink H6 Mini and it seems to be working pretty good. Wired network works and I used the console uart mod from here. Made it crash by installing some apt packages. 

Ooops here:

Spoiler

 [  137.449120] Unhandled fault at 0xfffffdffbff05fe8
[  137.453843] Mem abort info:
[  137.456639]   ESR = 0x96000001
[  137.459696]   EC = 0x25: DABT (current EL), IL = 32 bits
[  137.465006]   SET = 0, FnV = 0
[  137.468060]   EA = 0, S1PTW = 0
[  137.471201] Data abort info:
[  137.474081]   ISV = 0, ISS = 0x00000001
[  137.477917]   CM = 0, WnR = 0
[  137.480886] swapper pgtable: 4k pages, 48-bit VAs, pgdp=000000004149b000
[  137.487586] [fffffdffbff05fe8] pgd=6f6900007665e003, pud=fff3ffffeffbffff
[  137.487597] Unable to handle kernel paging request at virtual address ffffffffaffbfff8
[  137.502294] Mem abort info:
[  137.505088]   ESR = 0x96000004
[  137.508143]   EC = 0x25: DABT (current EL), IL = 32 bits
[  137.513453]   SET = 0, FnV = 0
[  137.516507]   EA = 0, S1PTW = 0
[  137.519648] Data abort info:
[  137.522529]   ISV = 0, ISS = 0x00000004
[  137.526363]   CM = 0, WnR = 0
[  137.529332] swapper pgtable: 4k pages, 48-bit VAs, pgdp=000000004149b000
[  137.536031] [ffffffffaffbfff8] pgd=6e6f0000706f0000
[  137.540911] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[  137.546483] Modules linked in: rfkill zram nls_ascii ir_nec_decoder crct10dif_ce rc_tanix_tx5max snd_soc_simple_card sunxi_cir rc_core snd_soc_simple_card_utils sunxi_wdt dw_hdmi_cec sunxi_cedrus(C) v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common panfrost videodev gpu_sched mc ip_tables x_tables ipv6 nf_defrag_ipv6 phy_sun50i_usb3 sunxi musb_hdrc dwmac_sun8i
[  137.581270] CPU: 1 PID: 1538 Comm: dpkg Tainted: G         C        5.5.0-rc2-aw-h6-tv #19.11.4
[  137.589966] Hardware name: Tanix TX6 (DT)
[  137.593978] pstate: 60000085 (nZCv daIf -PAN -UAO)
[  137.598777] pc : show_pte+0x134/0x1d0
[  137.602441] lr : show_pte+0x10c/0x1d0
[  137.606102] sp : ffff80001101b7b0
[  137.609417] x29: ffff80001101b7b0 x28: ffff0000a2c34240 
[  137.614730] x27: fffffe0001e54140 x26: 0000000000000000 
[  137.620043] x25: 0000000000000001 x24: ffff000082811478 
[  137.625356] x23: ffff8000123f6000 x22: 000000007665e000 
[  137.630669] x21: 0000ffffeffbf000 x20: fffeffffc0000ff8 
[  137.635983] x19: fffffdffbff05fe8 x18: 0000000000000030 
[  137.641295] x17: 0000000000000000 x16: 0000000000000000 
[  137.646608] x15: ffffffffffffffff x14: ffff8000125b1888 
[  137.651922] x13: ffff800012707a88 x12: ffff8000127076b0 
[  137.657235] x11: 0734073007300730 x10: ffff80001101b7b0 
[  137.662548] x9 : ffff80001101b7b0 x8 : 6666666662666665 
[  137.667861] x7 : 6666666633666666 x6 : ffff800012706d6d 
[  137.673174] x5 : 0000000000000000 x4 : 0000000000000000 
[  137.678486] x3 : 00000000ffffffff x2 : 5b286de77a749100 
[  137.683799] x1 : 0001000040000000 x0 : ffff8000122a1f48 
[  137.689112] Call trace:
[  137.691562]  show_pte+0x134/0x1d0
[  137.694880]  do_mem_abort+0x6c/0x98
[  137.698373]  el1_sync_handler+0x108/0x128
[  137.702385]  el1_sync+0x7c/0x100
[  137.705618]  __mod_memcg_state.part.77+0x18/0xc8
[  137.710238]  account_page_dirtied+0x7c/0x1f8
[  137.714511]  __set_page_dirty+0x68/0xd8
[  137.718340]  mark_buffer_dirty+0xfc/0x130
[  137.722352]  __block_commit_write.isra.43+0x9c/0xf8
[  137.727230]  block_write_end+0x40/0x98
[  137.730981]  generic_write_end+0x2c/0xf0
[  137.734906]  ext4_da_write_end+0xf8/0x238
[  137.738919]  generic_perform_write+0x148/0x1a0
[  137.743366]  ext4_buffered_write_iter+0x80/0x138
[  137.747984]  ext4_file_write_iter+0x50/0x6a0
[  137.752256]  new_sync_write+0x100/0x180
[  137.756093]  __vfs_write+0x2c/0x40
[  137.759497]  vfs_write+0xb0/0x1d0
[  137.762813]  ksys_write+0x64/0xe8
[  137.766129]  __arm64_sys_write+0x18/0x20
[  137.770056]  el0_svc_handler+0xac/0x200
[  137.773892]  el0_sync_handler+0x18c/0x490
[  137.777903]  el0_sync+0x140/0x180
[  137.781223] Code: cb010294 f0009020 92748eb5 913d2000 (f8756a96) 
[  137.787318] ---[ end trace 05ba6183f5b7a563 ]---
[  137.791939] note: dpkg[1538] exited with preempt_count 1
[  137.797358] Unhandled fault at 0xfffffe0001e52f78
[  137.797449] Unhandled fault at 0xfffffdffbffd7998
[  137.797484] Unhandled fault at 0xfffffdffbff4a410
[  137.797487] Unhandled fault at 0xfffffdffbff2dab8
[  137.797488] Mem abort info:
[  137.797490] Mem abort info:
[  137.797491]   ESR = 0x96000001
[  137.797493]   ESR = 0x96000001
[  137.797495]   EC = 0x25: DABT (current EL), IL = 32 bits
[  137.797498]   EC = 0x25: DABT (current EL), IL = 32 bits
[  137.797500]   SET = 0, FnV = 0
[  137.797501]   SET = 0, FnV = 0
[  137.797503]   EA = 0, S1PTW = 0
[  137.797504]   EA = 0, S1PTW = 0
[  137.797505] Data abort info:
[  137.797506] Data abort info:
[  137.797508]   ISV = 0, ISS = 0x00000001
[  137.797509]   ISV = 0, ISS = 0x00000001
[  137.797511]   CM = 0, WnR = 0
[  137.797512]   CM = 0, WnR = 0
[  137.797515] swapper pgtable: 4k pages, 48-bit VAs, pgdp=000000004149b000
[  137.797518] swapper pgtable: 4k pages, 48-bit VAs, pgdp=000000004149b000
[  137.797520] [fffffdffbff4a410] pgd=6f6900007665e003
[  137.797522] [fffffdffbff2dab8] pgd=6f6900007665e003
[  137.797524] , pud=fff3ffffeffbffff
[  137.797525] , pud=fff3ffffeffbffff
[  137.797531] Unable to handle kernel paging request at virtual address ffffffffaffbfff8
[  137.797534] Unable to handle kernel paging request at virtual address ffffffffaffbfff8
[  137.797534] Mem abort info:
[  137.797535] Mem abort info:
[  137.797537]   ESR = 0x96000004
[  137.797538]   ESR = 0x96000004
[  137.797540]   EC = 0x25: DABT (current EL), IL = 32 bits
[  137.797543]   EC = 0x25: DABT (current EL), IL = 32 bits
[  137.797544]   SET = 0, FnV = 0
[  137.797546]   SET = 0, FnV = 0
[  137.797547]   EA = 0, S1PTW = 0
[  137.797548]   EA = 0, S1PTW = 0
[  137.797549] Data abort info:
[  137.797550] Data abort info:
[  137.797552]   ISV = 0, ISS = 0x00000004
[  137.797553]   ISV = 0, ISS = 0x00000004
[  137.797554]   CM = 0, WnR = 0
[  137.797556]   CM = 0, WnR = 0
[  137.797558] swapper pgtable: 4k pages, 48-bit VAs, pgdp=000000004149b000
[  137.797561] swapper pgtable: 4k pages, 48-bit VAs, pgdp=000000004149b000
[  137.797563] [ffffffffaffbfff8] pgd=6e6f0000706f0000
[  137.797565] [ffffffffaffbfff8] pgd=6e6f0000706f0000
[  137.797570] Internal error: Oops: 96000004 [#2] PREEMPT SMP
[  137.797572] Modules linked in: rfkill zram nls_ascii ir_nec_decoder crct10dif_ce rc_tanix_tx5max snd_soc_simple_card sunxi_cir rc_core snd_soc_simple_card_utils sunxi_wdt dw_hdmi_cec sunxi_cedrus(C) v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common panfrost videodev gpu_sched mc ip_tables x_tables ipv6 nf_defrag_ipv6 phy_sun50i_usb3 sunxi musb_hdrc dwmac_sun8i
[  137.797625] CPU: 0 PID: 716 Comm: in:imklog Tainted: G      D  C        5.5.0-rc2-aw-h6-tv #19.11.4
[  137.797628] Hardware name: Tanix TX6 (DT)
[  137.797633] pstate: 80000085 (Nzcv daIf -PAN -UAO)
[  137.797640] pc : show_pte+0x134/0x1d0
[  137.797644] lr : show_pte+0x10c/0x1d0
[  137.797647] sp : ffff800010003b90
[  137.797649] x29: ffff800010003b90 x28: ffff00009fd90d40 
[  137.797655] x27: ffff800011160438 x26: 0000000000000000 
[  137.797660] x25: 0000000000000001 x24: 0000000000000080 
[  137.797665] x23: ffff8000123f6000 x22: 000000007665e000 
[  137.797671] x21: 0000ffffeffbf000 x20: fffeffffc0000ff8 
[  137.797676] x19: fffffdffbff4a410 x18: 00000000fffffff0 
[  137.797681] x17: 0000000000000000 x16: 0000000000000000 
[  137.797686] x15: ffff8000125c5cd8 x14: ffff800012706d30 
[  137.797691] x13: 0000000000000000 x12: ffff800012706000 
[  137.797696] x11: ffff8000125c5000 x10: ffff800012706cf8 
[  137.797701] x9 : 0000000000000000 x8 : 6666666662666665 
[  137.797706] x7 : 6666666633666666 x6 : ffff800012706d46 
[  137.797711] x5 : 0000000000000001 x4 : 0000000000000000 
[  137.797716] x3 : 0000000000000000 x2 : 5b286de77a749100 
[  137.797721] x1 : 0001000040000000 x0 : ffff8000122a1f48 
[  137.797726] Call trace:
[  137.797731]  show_pte+0x134/0x1d0
[  137.797736]  do_mem_abort+0x6c/0x98
[  137.797741]  el1_sync_handler+0x108/0x128
[  137.797745]  el1_sync+0x7c/0x100
[  137.797752]  __cgroup_account_cputime_field+0x28/0x60
[  137.797757]  account_system_index_time+0xac/0xc8
[  137.797762]  irqtime_account_process_tick.isra.7+0x174/0x1d0
[  137.797766]  account_process_tick+0x134/0x150
[  137.797772]  update_process_times+0x20/0x68
[  137.797778]  tick_sched_handle.isra.18+0x3c/0x50
[  137.797784]  tick_sched_timer+0x48/0x98
[  137.797789]  __hrtimer_run_queues+0x118/0x1a8
[  137.797793]  hrtimer_interrupt+0xe4/0x238
[  137.797800]  arch_timer_handler_phys+0x2c/0x38
[  137.797807]  handle_percpu_devid_irq+0x80/0x140
[  137.797813]  generic_handle_irq+0x24/0x38
[  137.797819]  __handle_domain_irq+0x60/0xb8
[  137.797826]  gic_handle_irq+0x50/0xa0
[  137.797830]  el1_irq+0xcc/0x180
[  137.797835]  do_syslog+0x570/0x928
[  137.797840]  kmsg_read+0x48/0x60
[  137.797845]  proc_reg_read+0x5c/0xc8
[  137.797849]  __vfs_read+0x18/0x40
[  137.797853]  vfs_read+0x9c/0x188
[  137.797857]  ksys_read+0x64/0xe8
[  137.797861]  __arm64_sys_read+0x18/0x20
[  137.797867]  el0_svc_handler+0xac/0x200
[  137.797872]  el0_sync_handler+0x18c/0x490
[  137.797876]  el0_sync+0x140/0x180
[  137.797883] Code: cb010294 f0009020 92748eb5 913d2000 (f8756a96) 
[  137.797887] ---[ end trace 05ba6183f5b7a564 ]---
[  137.797891] Kernel panic - not syncing: Fatal exception in interrupt
[  137.797897] SMP: stopping secondary CPUs
[  137.802065] Mem abort info:
[  137.802067]   ESR = 0x96000001
[  137.802071]   EC = 0x25: DABT (current EL), IL = 32 bits
[  137.802073]   SET = 0, FnV = 0
[  137.802075]   EA = 0, S1PTW = 0
[  137.802077] Data abort info:
[  137.802079]   ISV = 0, ISS = 0x00000001
[  137.802082]   CM = 0, WnR = 0
[  137.802085] swapper pgtable: 4k pages, 48-bit VAs, pgdp=000000004149b000
[  137.802088] [fffffe0001e52f78] pgd=3e65000061723003, pud=0024ffff2800ffff
[  137.802094] Unable to handle kernel paging request at virtual address fffffffee800f078
[  137.802096] Mem abort info:
[  137.802098]   ESR = 0x96000004
[  137.802101]   EC = 0x25: DABT (current EL), IL = 32 bits
[  137.802103]   SET = 0, FnV = 0
[  137.802105]   EA = 0, S1PTW = 0
[  137.802107] Data abort info:
[  137.802109]   ISV = 0, ISS = 0x00000004
[  137.802111]   CM = 0, WnR = 0
[  137.802115] swapper pgtable: 4k pages, 48-bit VAs, pgdp=000000004149b000
[  137.802117] [fffffffee800f078] pgd=6e6f0000706f0000
[  138.873910] SMP: failed to stop secondary CPUs 0-1,3
[  138.873913] Kernel Offset: disabled
[  138.873916] CPU features: 0x00002,20002000
[  138.873919] Memory Limit: none
[  139.452752] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
 

 

Link to comment
Share on other sites

@Redferne - try to add mem=2048M to the kernel cmdline - the eachlink h6 mini otherwise detects the memory wrong as 3gb although only 2gb are useable - thus it will crash as soon as it tries to access the part of the memory which does not really exist :)

 

best wishes - hexdump

Link to comment
Share on other sites

I'm trying to add support for running from USB. Changed the polling order and added commands to the config for working with USB. Assembled u-boot. When checking, I see an attempt to initialize USB in the UART console, but the system shows that there are no USB controllers. As far as I understand, they should be described in the DTS used ? Or do I need to add something else to the u-boot source code ?

Link to comment
Share on other sites

Checked the ability to install and normal operation of the Linux system in eMMC on TV boxes with H6. The next step is to add the installation script to the eMMC for the armbian generic image. Details can be seen in this topic.  :)

 

https://forum.freaktab.com/forum/tv-player-support/allwinner-tv-players/793034-libreelec-and-armbian-for-allwinner-tv-box?p=794681#post794681

Link to comment
Share on other sites

i have qidianz H6-6K series tvb, it seems almost the same with the tanix tx6 (H6 with DDR3)

this device is able to run tanix image "Tanix_H6_4Gddr_8822bs_20190228.img" from the sdcard. everything seems to be well except the wifi

 

nah,,, the problem is it still couldn't run any linux until now, for about a week have been working on it...

so far this is what i got, the success boot log from the Android and the stuck log from compiled linux Armbian 19.11.8 - Orangepi 3 (with few patch, LPDDR3 to DDR3)

 

hope anyone can tell what next step i should do on it... thanks...

android.log linux-failed.log

Link to comment
Share on other sites

2 hours ago, balbes150 said:

Judging by the Armbian startup log, you are missing a working DTB for the kernel itself.

 

ok thanks, i'll give it a try...

so far i only working on the u-boot part...

 

still have not touch or doing any patch on the kernel, i just copy it from a working kernel from my orangepi 3 board...

soon i'll report again... thank you..

Link to comment
Share on other sites

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

Important Information

Terms of Use - Privacy Policy - Guidelines