[Solved] Asus TB S

This is for any ARMv7 device that we do not officially support.

Re: Asus TB S

Postby TheSaint » Thu Aug 16, 2018 3:32 pm

OK, we should convene to which media we want to work with.
A part that, for later cases, there could be an option to scan for all media, eMMC,SD card, UMS and NFS ;)

One more round :)
Code: Select all
=> ext4ls mmc0       
** No device specified **
=>  ext4ls mmc
** No device specified **
=>  ext4ls mmc:0
** No device specified **
=>  ext4ls mmc:1
** No device specified **
=>  ext4ls /boot
** No device specified **

=> echo ${prefix}     

=> echo ${devnum}

=> echo ${partitions}
uuid_disk=${uuid_gpt_disk};name=loader1,start=32K,size=4000K,uuid=${uuid_gpt_loader1};name=loader2,start=8MB,size=4MB,uuid=${uuid_gpt_loader2};name=trust,size=4M,uuid=${uuid_gpt_atf};name=boot,size=112M,bootable,uuid=${uuid_gpt_boot};name=rootfs,size=-,uuid=69DAD710-2CE4-4E3C-B16C-21A1D49ABED3;

Sorry I don't get what should be this definition
Code: Select all
Usage:
ls <interface> [<dev[:part]> [directory]]
    - List files in directory 'directory' of partition 'part' on
      device type 'interface' instance 'dev'.

I don't find the dev name accepted for the listing.

You may give me some guidelines, I can compile the uboot and patch it on the last image.
Would you post your configuration ?
TheSaint
 
Posts: 345
Joined: Mon Jul 23, 2018 7:57 am

Re: Asus TB S

Postby summers » Thu Aug 16, 2018 4:17 pm

Hi

try
Code: Select all
mmc rescan


what does
Code: Select all
mmc list
show

I think you can do
Code: Select all
help mmc
to learn about what do can do.

Think what I need is the device numbers of the sd/emmc - then I can add those to what is auto scanned. Ther are the bits set in here btw http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/tinker_rk3288.h

Oh yes also
Code: Select all
mmc dev 0

And slowly try other numbers hopefully something below 2...

oh yes for ls you need something like
Code: Select all
ls mmc 0
summers
 
Posts: 889
Joined: Sat Sep 06, 2014 12:56 pm

Re: Asus TB S

Postby summers » Thu Aug 16, 2018 9:51 pm

Just read that it worked on the sd card - but alas no initramdisk. Ah yes - that created at install - and I just unpacked the kernel. We should be able to boot without, command something like:

Code: Select all
part uuid ${devtype} ${devnum}:${bootpart} uuid
setenv bootargs "console=tty0 console=${console} root=PARTUUID=${uuid} rw rootwait"
load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/zImage
load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}
bootz ${kernel_addr_r} - ${fdt_addr_r}

actaully look at the code - thats what it should have done when it didn't find the initramfs

So the kernel didn't send any output to tty2 ?

OOps - just seen a mistake in my boot.txt and boot.scr I sent you:

setenv bootargs "console=tty0 console=${console} root=PARTUUID=${uuid} rw rootwait"

of course it should be tty2 for you to keep getting the messages - apols for that.

Anyway getting close. Did you manage to find the eMMC from uboot?

And actaully the setting of the gpio pins you won't need! So I didn't do a good job.

Can you respin the boot.txt and boot.scr or do you want me to?
summers
 
Posts: 889
Joined: Sat Sep 06, 2014 12:56 pm

Re: Asus TB S

Postby TheSaint » Fri Aug 17, 2018 8:20 am

Code: Select all
=> mmc rescan
MMC Device 0 not found
no mmc device at slot 0
=> mmc list
dwmmc@ff0c0000: 1
=> ext4ls dwmmc@ff0c0000: 1
** Bad device dwmmc@ff0c0000: 1 **
=> ext4ls dwmmc@ff0c0000:1
** No device specified **
=> ext4ls dwmmc: 1         
** Bad device dwmmc: 1 **

The eMMC is not found, also I cannot read it from the PC. Even it still good for booting. I've done this mistake before and correct it within TB itself. I think we lost the partition table or the PID/VID to recognize it when plugged.
summers wrote:Just read that it worked on the sd card

It might work for either memory media, but the eMMC is not found, yet.
summers wrote:So the kernel didn't send any output to tty2 ?

It won't, I just see the message "Starting kernel ..." stuck. Therefore the kernel don't get alive :)

For the boot.scr I saw that is not a plain text file, there are non-printable character in the header. I don't know exactly how it will be converted. I may try to issue the commands directly at the u-boot shell.

First part of the story, I'll be back when I've fixed the eMMC disappearance, first :)

EDIT

The eMMC is recovered, just reformatted from within TB itself.
A little progress, I can list the partition:
Code: Select all
=> ls mmc 1
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<SYM>          7 bin
<DIR>       4096 boot
<DIR>       4096 dev
<DIR>       4096 etc
<DIR>       4096 home
<SYM>          7 lib
<DIR>       4096 mnt
<DIR>       4096 opt
<DIR>       4096 proc
<DIR>       4096 root
<DIR>       4096 run
<SYM>          7 sbin
<DIR>       4096 srv
<DIR>       4096 sys
<DIR>       4096 tmp
<DIR>       4096 usr
<DIR>       4096 var
             990 .PKGINFO
             511 .INSTALL
            5305 .BUILDINFO
          307812 .MTREE
<DIR>       4096 .Trash-0
=> ls mmc 1/boot
** Bad device specification mmc 1/boot **
=> ls mmc 1 boot
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      36864 dtbs
         5898240 vmlinux.kpart
         6233208 zImage
             345 boot.txt
             829 boot.scr
             757 boot.bk

Sorry, I couldn't change the boot.scr. It may need the mkscr to process the boot.txt (which I modified). So I still at the point where the kernel don't comes in.
Also I see this message
Code: Select all
MMC:   dwmmc@ff0c0000: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment
which means that there's something gone invalidated.
So, summarizing, if you pass me the u-boot config, perhaps I'll try some experiment.
summers wrote:sector 0x7c rather than 0x84

So what is the effect to have it move to that point ?
Last edited by TheSaint on Fri Aug 17, 2018 12:19 pm, edited 1 time in total.
TheSaint
 
Posts: 345
Joined: Mon Jul 23, 2018 7:57 am

Re: Asus TB S

Postby summers » Fri Aug 17, 2018 11:56 am

On the way riding into work today, though time to reflect where we are.

Two days ago, we didn't understand the rock chip boot process, couldn't get the uart to work, and wasn't clear if we could get the TB S to work. For the OS we used the veryon arm arch, as its focused on rock chip - but it turned out its aimed at chrome devices and reuses their kernel and boot process, so don't include these bits in the image.

Now, we have managed to get u-boot to work, to go via a spl and to the main u-boot. With this the uart has worked as expected. u-boot can find the sd card, but not the eMMC. but on finding the sd card, it discovers /boot/boot.scr and runs that. This means we can do standard arm arch set up. Now the u-boot code that does boot.src also does the extlinux set up - so if that is desired we could do that as well; but I don't know that set up. There are a number of errors at startup, and when control passed to the kernel it produces no output - but interesting a LED flashes, like the heart beat - so suggesting that maybe the kernel has started, and just not producing any output.

So way forward, not clear to me that the veryon image is giving us anything. Think instead we should start from tham main armv7 image, as that has kernel and device trees in the image: http://de6.mirror.archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz. The uboot errors are understood, they were in the configuration used to build u-boot, and so are easily removed. The kernel not giving output, can be traced to an incorrect bootargs. So these can be easily solved.

The missing eMMC is confusing, I check in the tinker device tree https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/rk3288-tinker.dts and it turns out it only enables a single sd/eMMC dwmmc@ff0c0000. This is all that u-boot sees. Now in linux this will mean that it will only see the device at ff0c0000. u-boot is know to have similar device trees, is this why it only sees the one sd/eMMC? Both are set up for the Asus TinkerBoard and not the TinkerBoard S. Now Tinker OS can access the eMMC - so need to check its device tree, to see what is enabled. there are several options in https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/rk3288.dtsi - but the obvious one is emmc: dwmmc@ff0f0000.

Anyway one discovered we can enable in the kernel via device tree modification, which is know how to do in boot.scr.

enabling the eMMC in uboot is harder, and will take some work.

So anyway I'll run up this evening a uboot image, boot.txt and boot.src that should boot the default armv7 arch. Then we should be able to continue from there.

Oh yes your fomat of ext4ls commands is wrong you want something like
Code: Select all
ext4ls mmc 1:1 /
so that ls ls the mmc device 1 partition 1. We know we are on MMC, we know we are device 1 - partition will be either 0 or 1 ...
summers
 
Posts: 889
Joined: Sat Sep 06, 2014 12:56 pm

Re: Asus TB S

Postby TheSaint » Fri Aug 17, 2018 12:41 pm

Boys! it got started! :D :D
I follow your script manually
Code: Select all
=> part uuid mmc 1 uuid
=> echo ${uuid}
fdb2ce6e-01
=> setenv bootargs "console=tty0 console=ttyS2,115200n root=PARTUID=${uuid} rw rootwait""
=> load mmc 1 ${kernel_addr_r} /boot/zImage
6233208 bytes read in 275 ms (21.6 MiB/s)
=> echo ${fdtfile}
rk3288-tinker.dtb
=> load mmc 1 ${fdt_addr_r} /boot/dtbs/${fdtfile}
50542 bytes read in 25 ms (1.9 MiB/s)
=> bootz ${kernel_addr_r} - ${fdt_addr_r}
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Device Tree to 0fff0000, end 0ffff56d ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x500
[    0.000000] Linux version 4.17.12-1-ARCH (builduser@leming) (gcc version 8.2.0 (GCC)) #1 SMP PREEMPT Sat Aug 11 02:09:44 UTC 2018
[    0.000000] CPU: ARMv7 Processor [410fc0d1] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Rockchip RK3288 Tinker Board
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 48 MiB at 0x7d000000
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x480 with crng_init=0

So now, it stuck at
Code: Select all
[    3.956604] input: Generic USB Audio as /devices/platform/ff500000.usb/usb3/3-1/3-1:1.255/0003:0BDA:481A.0001/input/input1
[    4.025585] hid-generic 0003:0BDA:481A.0001: input,hiddev0,hidraw0: USB HID v1.11 Device [Generic USB Audio] on usb-ff500000.usb-1/input255

And the orange LED keeps blinking.
TheSaint
 
Posts: 345
Joined: Mon Jul 23, 2018 7:57 am

Re: Asus TB S

Postby TheSaint » Fri Aug 17, 2018 12:50 pm

summers wrote:and it turns out it only enables a single sd/eMMC dwmmc@ff0c0000

The process during the boot is explained in this flowchart.
So the TB S has this jumper (MASKROM) which is sensed by the bootrom, then it will take step which way to start from.

Furthermore, there are other two pins which shorten will cause the board to power down ;)
Later on, the system will find both memory media. So I could reformat the eMMC ;)
Last edited by TheSaint on Fri Aug 17, 2018 12:52 pm, edited 1 time in total.
TheSaint
 
Posts: 345
Joined: Mon Jul 23, 2018 7:57 am

Re: Asus TB S

Postby summers » Fri Aug 17, 2018 12:52 pm

Is the uart on tty2 or ttyS2 ? Boot log should say.

You don't need the console=tty0 that was the typo in my set up copied from the beagle set up.
summers
 
Posts: 889
Joined: Sat Sep 06, 2014 12:56 pm

Re: Asus TB S

Postby TheSaint » Fri Aug 17, 2018 12:59 pm

At the first attempt I putted just tty2, as you wrote. Didn't work
The I putted like is used do for TinkerOS console_ttyS2,115200n8 and the rest
summers wrote:Is the uart on tty2 or ttyS2 ? Boot log should say.

Code: Select all
[    1.527658] Serial: 8250/16550 driver, 6 ports, IRQ sharing enabled
[    1.533288] ff690000.serial: ttyS2 at MMIO 0xff690000 (irq = 35, base_baud = 1500000) is a 16550A
[    2.524140] console [ttyS2] enabled
[    2.529107] ff1b0000.serial: ttyS3 at MMIO 0xff1b0000 (irq = 36, base_baud = 1500000) is a 16550A
[    2.540105] ff1c0000.serial: ttyS4 at MMIO 0xff1c0000 (irq = 37, base_baud = 1500000) is a 16550A
[    2.551622] Serial: AMBA driver


Even an old post has reported, but just with tinkerOS (or Linaro).
TheSaint
 
Posts: 345
Joined: Mon Jul 23, 2018 7:57 am

Re: Asus TB S

Postby summers » Fri Aug 17, 2018 8:07 pm

OK redone uboot and boot.{txt,scr} that should have the other errors. You can download from:

http://davidjohnsummers.uk/TBS.tar.gz

Instructions in the README.

Think I've got to the bottom of why the eMMC doesn't work, looks like we need to enable dwmmc@ff0d0000 - this is enabled on the TinkerOS. Its set in neither u-boot not the tinker device tree.

When I know what your set up comes up like, we can set it in the boot.{txt,scr}. Then if linux detects the eMMC, we can look at getting it to work in u-boot. Also try and mainline the device tree.

When you get boot messages through to 4 seconds, I recon your linux has come up, especially if the heartbeat led is flashing. I think the problem is that it doesn't start a terminal on ttyS2 - so I've given you the command to do that. Otherwise, plug in the ethernet, find its address, and ssh into the box ...

You ask for the u-boot configuration I used. Its close to the standard tinker-rk3288_defconfig. Think I added the boot command and the device tree ...
Code: Select all
CONFIG_ARM=y
CONFIG_ARCH_ROCKCHIP=y
CONFIG_SYS_TEXT_BASE=0x00000000
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_ROCKCHIP_RK3288=y
CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
CONFIG_TARGET_TINKER_RK3288=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SPL_STACK_R_ADDR=0x80000
CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker"
CONFIG_DEBUG_UART=y
CONFIG_BOOTCOMMAND="run distro_bootcmd"
# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_SILENT_CONSOLE=y
CONFIG_CONSOLE_MUX=y
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_STACK_R=y
CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
CONFIG_SPL_I2C_SUPPORT=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_SF=y
CONFIG_CMD_SPI=y
CONFIG_CMD_USB=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_SPL_PARTITION_UUIDS=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_REGMAP=y
CONFIG_SPL_REGMAP=y
CONFIG_SYSCON=y
CONFIG_SPL_SYSCON=y
# CONFIG_SPL_SIMPLE_BUS is not set
CONFIG_CLK=y
CONFIG_SPL_CLK=y
CONFIG_FASTBOOT_FLASH=y
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
CONFIG_I2C_EEPROM=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_GMAC_ROCKCHIP=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
# CONFIG_SPL_PINCTRL_FULL is not set
CONFIG_PINCTRL_ROCKCHIP_RK3288=y
CONFIG_DM_PMIC=y
CONFIG_PMIC_RK8XX=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_REGULATOR_RK8XX=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_RAM=y
CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_SHIFT=2
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_DWC2=y
CONFIG_ROCKCHIP_USB2_PHY=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
CONFIG_USB_GADGET_VENDOR_NUM=0x2207
CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_USB_FUNCTION_MASS_STORAGE=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_USE_TINY_PRINTF=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
CONFIG_OF_LIBFDT=y
summers
 
Posts: 889
Joined: Sat Sep 06, 2014 12:56 pm

PreviousNext

Return to Community Supported

Who is online

Users browsing this forum: No registered users and 2 guests