96boards / documentation

This repository hosts the documentation for 96Boards products and specifications.
https://www.96boards.org/documentation/
Other
465 stars 286 forks source link

hisilicon poplar kernel source #39

Closed mattgorski closed 7 years ago

mattgorski commented 8 years ago

Could someone here please let me know where to find the kernel source and if possible the vendor binaries and device tree for the new TV platform 96 board linaro hisilicon poplar? Thank you in advance. I'm excited to get my current Android TV builds ported to the poplar.

fixxxxxxer commented 8 years ago

@mattgorski

You can run an image that is already in flash.

We will be pushing out a Poplar Github landing page by the end of the week, until then I would suggest utilizing the resources available by Tocoding:

http://en.tocoding.com/index.php/96boards-poplar/

I will leave this issue open in the mean time.

Thanks!

mattgorski commented 8 years ago

Okay great! Thank you for the reply Robert. I guess we will have to use a prebuilt kernel for the time being which is not a problem. I can start work on an AOSP TV device tree and share when ready. I look forward to the landing page and future updates!

mattgorski commented 8 years ago

Any updates on the landing page? I didnt see anything up yet for poplar. If there is anything I can do to help please let me know...

fixxxxxxer commented 8 years ago

@mattgorski

Right now I am still waiting on some key players to begin their contributions to the landing page.

I will do my best to get as much core information up to the 96Boards github this week.

In the mean time, you can find the Poplar repository under my personal github:

www.github.com/sdrobertw/Poplar

Sorry for the inconvenience, I expect things to be coming together soon.

mattgorski commented 8 years ago

Thank you for the informative response Robert! I apprciate the update and github link.

mattgorski commented 8 years ago

I've created my own github page for poplar dedicated to Android TV builds. I just got my board in so ill be testing some builds tonight, not even sure if the device tree or vendor blobs/binaries are correct but it's a work inprogress :)

https://github.com/96Boards-AndroidTV

mattgorski commented 8 years ago

Just a quick question. How do we enter fastboot mode on the poplar the manual isnt too clear? I can understand all jumpers off is default emmc...

The 96Boards Poplar board allows system to boot from the SPI flash, NAND flash, fSD, eMMC, or SPI NAND flash. Jumper J21 BOOTSEL0, Jumper J20 BOOTSEL1, and Jumper J19 BOOTSEL2 work together to select the boot mode.

The value of BOOTSEL2, BOOTSEL1, or BOOTSEL0 is as follows: BOOTSEL2: BOOTSEL1: BOOTSEL0 Boot Mode 000 boot from the SPI NOR flash 001 boot from the NAND flash Copyright©Tocoding Technologies Co., Ltd. 2011-2016 All rights reserved. 8 010 boot from the fSD 011 boot from the eMMC 100 boot from the SPI NAND flash other reserved The value of jumpers is as follows: J21 CLOSED BOOTSEL2 will be set 0 OPEN(default) BOOTSEL2 will be set 1(default) J20 CLOSED BOOTSEL1 will be set 0 OPEN(default) BOOTSEL1 will be set 1(default) J19 CLOSED BOOTSEL0 will be set 1 OPEN(default) BOOTSEL0 will be set 0(default)

fixxxxxxer commented 8 years ago

@kuscsik

Can you help with this please?

mattgorski commented 8 years ago

There does seem to be an S1 recovery button but when held down during power does nothing to enter fastboot. Thanks for any pointers 96 team...

mattgorski commented 8 years ago

Okay I sucessfully got fastboot in bootloader now buy ctrl+c immmediatly at boot but now how to enter fastboot? From my experience the command fastboot enters fastboot usb protocol. Does tocoding use an imx type usb tool for uart flashing? I've been in contact with support and I am awaiting a response on the proceedure.

Here is the correct minicom settings:

sudo minicom -b 115200 -o -D /dev/ttyUSB0

ctrl+A the Z then O select serial port settings.

Software flow: ON Hardware flow: OFF

One other side note I wasnt aware that they are only selling 1GB RAM version on Ali. Hopfully they will stock the 2GB version also because 1GB isnt very adequate. Might want to change the specs on 96 boards poplar page.

"DRAM DDR3/3L/4 SDRAM interface, maximum 32-bit data width 2 GB on board"

mattgorski commented 7 years ago

Still have not heard a thing from tocoding on how to flash thru UART. I'd love to try some of my custom builds or even a repacked system image but no idea how to reflash in fastboot. My poor poplar is just collecting dust now...

fixxxxxxer commented 7 years ago

@mattgorski I am very sorry, I am really trying to find someone to help with this. Unfortunately I do not own a Poplar nor do I have an experience with it.

I have been hunting down people who can help since this issue started.

Sorry for the inconvenience.

-Robert W.

afaerber commented 7 years ago

In addition to lack of documentation of the current state, is there any "proper" bootloader in the works by Linaro, such as Tianocore or U-Boot? It's disappointing to see Poplar regress compared to HiKey.

zoltan-ongithub commented 7 years ago

Hi @mattgorski,

to enter fastboot you need to hit Ctrl-c on the serial line during the first seconds of the boot. You can download the images over TFTP after setting the network parameters:

   setenv serverip xxx.xxx.xxx.xxx
    setenv ipaddr xxx.xxx.xxx.xxx
    setenv gatewayip xxx.xxx.xxx.xxx
    setenv ethaddr 00:xx:xx:xx:xx:xx
    setenv netmask 255.255.xxx.0

To download the boot image:


        mw.b 1000000 ff 80000                       //Write 0xff to 0x1000000. 0x80000 space is used.
        tftp 1000000 fastboot-burn.bin              //Download fastboot-burn.bin to 0x1000000.
        nand erase 0 100000                         //Erase the 0x100000 flash space after the 0x0 address.
        nand write 1000000 0 80000                  //Write fastboot-burn.bin (starting from 0x1000000 with the size of 0x80000) to 0x0 of the NAND flash.

To download the Linux image:

        mw.b 1000000 ff 400000
        tftp 1000000 hi_kernel.bin
        nand erase 100000 400000
        nand write 1000000 100000 400000

File system image:

        mw.b 1000000 ff 6000000
        tftp 1000000 rootfs.yaffs
        nand erase 500000 6000000
        nand write.yaffs 1000000 500000 $(filesize)     //Write rootfs.yaffs (starting from 0x1000000 with the size of $(filesize)) to 0x500000 of the NAND flash.

Kernel Source is still not available for the board, we are trying to speed up the process so it gets released ASAP.

fixxxxxxer commented 7 years ago

@mattgorski did this help? I would like to close this issue until more Poplar information is available.

Please get back to me.

Thank you.

Robert Wolff - www.96board.org/openhours robert.wolff@linaro.org

afaerber commented 7 years ago

@sdrobertw The title says "kernel source" - and without sources we have no hi_kernel.bin to flash. Nor does it tell us how a Linux arch/arm64/boot/Image relates to this hi_kernel.bin.

FTR playing with the above instructions shows that "Fastboot 3.3.0" is in fact a U-Boot fork (whose sources will be needed, too), unrelated to Android's fastboot protocol/tool.

To speed up the process of getting all those sources, have you considered taking down the "Buy Poplar Board" link from 96boards.org until the products sold comply with the GPL? You don't show any on the Latest Boards and Enterprise Edition overview pages, but on the Poplar product page there is one. Isn't release of schematics and sources a compliance criteria for your specification?

mattgorski commented 7 years ago

Great to see all the detailed responses. I really have had no time to do any custom flashes yet, will be much easier when we have the kernel source and vendor binaries. One thing that is disappointing to see on the poplar is the deinterlacing with Mali. Almost unusable as an Android TV device due to this. I really hope this is fixable with some codec configs and upgraded mali gl binaries.

fixxxxxxer commented 7 years ago

@afaerber : The current status on Poplar source is out of our hands, though we do have control over the website and your recommendations make a lot of sense, it is a very legitimate observation, one that I will surely pass up the line asap. Thank you very much for your contribution to this thread, once again I am very sorry for the inconvenience.

@mattgorski : I am going to keep this issue active, we appreciate your contributions and hope to help get these issues resolved asap. We will continue to push for answers and provide them to you as we become informed.

Thanks,

R.W.

mattgorski commented 7 years ago

Thanks again for everything @sdrobertw and all who contributed to this issue (a big thanks to @kuscsik for the tftp flash instructions), I am sure we have gotten the wheels rolling faster with more interest.

I will make some time to try the device tree with prebuilt kernel I made awhile back (https://github.com/96Boards-AndroidTV). At least we can get some testing done on some modified system images repacked and built with tv permissions in mind not tablet ;)

mattgorski commented 7 years ago

@kuscsik would it be possible to get the u-boot includes/config for poplar so we can implement the android fastboot sparse image format so we can use the USB OTG interface for flashing images? I've implemented fastboot on a couple non Android devices so I can lend a hand...

EDIT: Actually can OTG ADB/Fastboot even be used on poplar? It uses the front otg port with the FTDI USB converter not the standard OTG usb port. Might be able to use a standard USB port with a male-to-male USB cable...

mattgorski commented 7 years ago

I am attempting to flash a new system image today and I noticed in the tftp instructions that the rootfs you are flashing is yaffs (android 4.x) yet the tocoding flash package has a system.ext4 which i am also building for. So do i convert to yaffs or substitute ext4 for yaffs? Kinda confused again here I just wish we could fastboot flash and be done..

TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true TARGET_USERIMAGES_USE_EXT4 := true

        mw.b 1000000 ff 6000000
        tftp 1000000 system.ext4
        nand erase 500000 6000000
        nand write.ext4 1000000 500000 $(filesize)     //Write system.ext4 (starting from 0x1000000 with the size of $(filesize)) to 0x500000 of the NAND flash.

Guess the ol poplar goes back into hiding again until we can flash a system.img :(

mattgorski commented 7 years ago

Okay different approach. @kuscsik What is the hex offset for recovery flashing?

I'll just get a TWRP recovery built and we can bypass the uboot/fastboot until we can build a proper android u-boot.

One other thing is the flash package comes with an xml config for flashing so how do we implement this? Nvidia uses a similar protocol with the nvflash APX recovery. There must be a hidden function we are unaware of....

example:

./nvflash --bct flash_pm358_792.cfg --setbct --configfile Hi3798CV200-emmc.xml --dtbfile golfish.dtb --create --bl u-boot.bin --odmdata 0x6209C000 --go

Hi3798CV200-emmc.xml

`<?xml version="1.0" encoding="GB2312" ?>

`
mattgorski commented 7 years ago

Not getting the tftp to work. I have followed the basic tftp guide here setting server ip:

http://processors.wiki.ti.com/index.php/Booting_Linux_kernel_using_U-Boot

And get this error:

fastboot# tftp 1000000 system.ext4 ETH0: PHY(phyaddr=255, mii) not link! ETH1: PHY(phyaddr=3, rgmii) not link! higmac init fail!

I must not have my network params correct.

ipaddr=192.168.1.10 - poplar ip addess set in u-boot/fastboot netmask=255.255.255.0 - mask serverip=192.168.1.109 - tftp server ip ethaddr=00:16:8e:62:66:xx - mac of poplar

Tried multiple settings.... i know my tftp server is running. Is there any other way to flash??? This mysterious Hi3798CV200-emmc.xml was definitely made to be the easy way to flash but WHERE ARE THE INSTRUCTIONS???

Graphicscore commented 7 years ago

Any news on this ? Will we be able to compile AOSP 7.0 for the Poplar aswell ? I'm interested in this board but only if I can compile up to date android versions for it.

mattgorski commented 7 years ago

Looks like we will have sources at least after next week. For 6.0/7.0/7.1 we will have to wait and see how caught up to mainline google the kernel is for selinux and such. Here is the latest word from tocoding as of this morning:

Issue pertaining to no fastboot instructions in flash package:
http://en.tocoding.com/index.php/96boards-poplar/ https://app.box.com/s/kxsqbp6qq067y9aifnrzgcbo042xr1qc

Hisilicon was working on this issue, you will get the source after next week, the package will provide a tool what you can flash in fastboot. Thanks for your understanding.

mattgorski commented 7 years ago

Just got the word from tocoding that they have released the sources to Linaro 2 weeks ago. So any update on the sources guys :)

lecotex commented 7 years ago

Hi guys.

Mine Polar board just arrived and even I tried to start some discussion on 96board's forum I got zero answers. I see the only one discussion is here. So far not so good :(

Yesterday I at least requested for creation some subforum on 96boards regarding Poplar. So we can move there when it will be done.

My intention is to get not Android, but simple Linux system running, of course GPLed.

But until we get some official sources, I agree fully with @afaerber = on Linaro there should be some note to prevent others to have some big plans with devboard which is not supported by Linaro yet.

ProfFan commented 7 years ago

Same here. Just got our shipment (~10s) of the poplar board from the original manufacturer and I am astonished to discover that there is almost no support! There should be a big warning on the 96boards page on this situation. We should push the vendor to at least push out a usable port of Debian.

mattgorski commented 7 years ago

At this point I just wish we had kernel sources and fastboot/u-boot sources/support so we could at least test 64bit support since the device ships with 32bit android tablet :(

Graphicscore commented 7 years ago

Any news on this ? Is it possible to build android for the poplar board already or is the source still disclosed ?

mattgorski commented 7 years ago

Tocoding released the kernel sources to Linaro a few weeks ago but we still have heard nothing officially from them regarding a wiki for Android/Linux building. I'm about to give up on the poplar. Got mine in October and it just collects dust...

lecotex commented 7 years ago

My intention is to start with kernel. Normally (means if supported by Linaro) it would take few hours of creation of dev environment and that's it! So in our situation I'm just going to make some working kernel during weekend and will see what is going on.

mattgorski commented 7 years ago

But the real issue is how to flash the kernel and what type of image to build? hi_kernel.bin?

lecotex commented 7 years ago

Well, I think the first step is having own kernel running. Unfortunately I'm still stuck on it - my own compiled kernel is not starting :-( it seems like some platform specific values are set incorrectly (retrieved from net by tftp in fastboot/uboot)

afaerber commented 7 years ago

A .dts patch for the Poplar has recently been posted upstream by Hisilicon: https://patchwork.kernel.org/patch/9564139/

Graphicscore commented 7 years ago

As of right now I am pretty disappointed of the support that this device got. They've said that the source for the device would be released soon after the launch of the device but as of right now, almost none of it is available....

lecotex commented 7 years ago

@Graphicscore I have very same feeling, unfortunately. I have got the devboard about month ago and only because of releasing firmware for current device (old chip, not 4K) I wasn't able to start touching it. But w/o any, AT LEAST BASIC support, it looks like close to impossible way of work :(

afaerber commented 7 years ago

HiSilicon just confirmed (at the link above) that U-Boot and ATF updates will be needed to run an arm64 kernel on the board. So without those we are still lost.

mattgorski commented 7 years ago

So disappointing. This board has sooooo much potential but is just lost without the proper 64bit support. Time to sell mine. I even bought the remote with high hopes.

96boards I think we need a new TV platform device. Ditch the poplar.

Graphicscore commented 7 years ago

We had planned to use that device in a commercial environment because we need alot of power from the cpu as well as the gpu. Guess we have to keep looking then, does somebody knows an alternative to this device ? I'm looking for a board which has fully published source code available and supports video playback for at least 2 videos simultaneously.

mattgorski commented 7 years ago

The Nvidia Jetson TK1 is an affordable alternative with very well documented support for Android (UNOFFICIAL) and Linux. You can use HDMI and DSI touchscreen output at the same time. It's only 32 bit but very powerful and now affordable at around $170-$190

Stephen-Neal commented 7 years ago

I received this email from Tocoding this morning after I pressed for the source code. Again.

"For the source code, we have provided to Linaro many weeks ago, this time we need to wait Linaro release it and announce the information. And we are always push this action ASAP to release it to developers."

Anyone from Linaro here able to confirm this, and if true explain the delays in posting?

lecotex commented 7 years ago

It must be somebody is playing with us = Tocoding, Linaro or Hisilicon? Even I don't trust Tocoding much (they NEVER answered my direct mails regarding Poplar support) I'm also a bit disappointed by Linaro. Why they did such announcement (soooo many moths ago!) and from that time they stayed quiet. What is going on???

sbambrough commented 7 years ago

Linaro is working with HiSilicon and ToCoding to provide a source code release for Poplar as soon as possible. This is not yet ready for release but will provide ports of ARM TF, UEFI, and U-Boot to Poplar along with an upstream based kernel and AOSP support. We will be providing another update at the end of April 2017 based on current progress but we do not yet have a final release date yet. This is a high priority for us, and we will keep this list updated.

Dr. Yang Zhang Director of 96Boards and Technologies Group

Scott Bambrough Technical Director, Linaro Services Group

lecotex commented 7 years ago

FYI, I just got answer on my 2 months old request regarding creation of Poplar subforum on Linaro's 96Borad. Not as speedy as needed, but anyway ...

Also I finally finished firmware for 3716cv100 so I'm moving to Poplar. If I find something usefull, I drop msg.

tonyho commented 7 years ago

It's near the end of the April 2017, Is the AOSP released now? Any one knows?

If the sources/resources are released, I want to buy some Polar boards.

@lecotex

mattgorski commented 7 years ago

I would love to know myself if anyone has even built an android build and if so how did they even flash with no flash tools.... Been over 6 months and this board has zero love.

Stephen-Neal commented 7 years ago

Any news on the 25th Feb posting? It's now gone past the end of April.

tonyho commented 7 years ago

From the Status of Android “AOSP” TV – BUD17-118 presentation at Linaro Connect BUD17: http://connect.linaro.org/resource/bud17/bud17-118/ , it seems that "migrate to 96Boards " is the last item of the Next 6 month plan (See the PPT, Page 8).

Also, here, hikey appears, no polar. I guess maybe resources wouldn't be released in near future.?

Below is the page 8 from PPT:

AOSP TV Project -Tasks Planned : Next 6 Months Secure media playback with Widevine / Playready DRM ○ Integrating OPTEE with Android N, Kernel 4.9. ○ Secure buffer allocation : Pass the xtest sdp_perf testing ○ Handling ION buffer descriptor ○ Widevine validation with device key. (May 2017) ○ Implement and support Playready DRM playback. TVIF (initial development on Hikey) ○ Identify USB Antenna or USB Video-In module with open Linux drivers support and implement TVIF service and HALs. Create LHG M-LCR for AOSP TV (Begin releases from May 2017) Migrate to Android O Migrate to 96boards TV platform

afaerber commented 7 years ago

Initial U-Boot patches have arrived on u-boot mailing list on Thursday, along with a README for flashing.