Giter VIP home page Giter VIP logo

Comments (8)

Kwiboo avatar Kwiboo commented on August 21, 2024

I can now successfully wake-up my C2 using the HK IR-remote from the always-on suspended state with Kwiboo@c31b6f7
The power_off/on_vcck methods was using GPIOAO.BIT4 (usb reset?) and power_off/on_3v3 was using the GPIOAO.BIT2 that controls VCCK_CON.
Unsure what power_off/on_3v3 is supposed to power off/on so just left it commented out for now.

from u-boot.

JeonghwaCho avatar JeonghwaCho commented on August 21, 2024

Hello, Kwiboo.
Thanks for your code and information.
bl301.bin-related source will be merged on HK's Github soon
and there are some modifications like blue led and ups-related port handling.
Because of current issue, we've adjusted some routines, I think there are some gaps.
so we will check AMLogic's updated u-boot scp_task code and suspend-related codes.
Also the aforementioned your code about VCCK_CON will be merged after checking.

from u-boot.

Kwiboo avatar Kwiboo commented on August 21, 2024

@JeonghwaCho thanks for adding the bl301/scp_task source code.

I suspected that there was some odroidc2 specific changes, I used the odroidc2 code from uboot-2015-12-15-685bb0bc6f.tar.gz and merged some p200 changes from my amlogic-v2015.01-20160701 tree.

Will try to make IR wake-up to work with minimum changes using your tree with the added bl301 code going forward.
My main goal is to get this working for LibreELEC/OpenPHT with minimal changes but also see if I can remove one or two C2 commits from my amlogic-20160701 kernel if some code is moved to u-boot (mac address and usb reset).

I was having problem getting the updated bl2 in my tree to boot using eMMC (SD worked fine) and it turned out the newer aml_encrypt_gxb is using pos 112-49152 for sha256 check causing problems with MBR.
Kwiboo@de1678f includes a small tool I wrote (aml_chksum) that changes the sha256 check range to 512-49152 and calculates a new checksum.
Unfortunately it does not contain the magic in your bl2 (bl1.bin.hardkernel) that makes SD and eMMC use same offset for bl3X images and requires u-boot.bin.emmc.bin be written to 512+ for SD and to 0-112 and 512+ for eMMC.

from u-boot.

Kwiboo avatar Kwiboo commented on August 21, 2024

There is now a odroidc2-v2015.01-remote-power-on branch with a small amount of changes to get power-on from power-off state using HK ir-remote working (resume from suspend state do not work).

LibreELEC-master test-image: https://www.dropbox.com/s/rm32sej9bf7ius7/LibreELEC-Odroid_C2.aarch64-8.0-devel-20160813173106-r23611-gebc8203.img.gz?dl=0

from u-boot.

JeonghwaCho avatar JeonghwaCho commented on August 21, 2024

@Kwiboo Thanks a lot for sharing your code.
Power-on using remote contoller is working well with uboot of odroidc2-v2015.01-remote-power-on branch and odroidc2 ubuntu image.

And about bl1.bin.hardkernel binary, it's a difficult structure from AMLogic original released one. (I think you already know it.). To release a same image regardless the boot storage, SD or eMMC, we adjusted header structures including MBR part and made some utils to build sha checksum.
Actually I couldn't catch what you mean and if I need to help you about the structure (blX) for your work. The current bl2.bin includes magic number and sha checksum result in its header.

And for the bl2.bin version, we have no plan to update it, but we're checking the newer version of u-boot firmware to adjust suspend/resume. If you have any idea or request, we can talk on the following forum thread. :)
http://forum.odroid.com/viewtopic.php?f=139&t=23073#p155601

from u-boot.

JeonghwaCho avatar JeonghwaCho commented on August 21, 2024

@Kwiboo
Can I cherry-pick and merge your commits of odroidc2-v2015.01-remote-power-on branch to HK's u-boot?
Now I'm checking and adjusting power controls (3v3 and so on) and current of C2. The current increase should be fixed.

  • current after poweroff : 80mA -> 120mA
    And could you leave messages here or the forum thread if you have any more request or TODO things about bl binaries?

from u-boot.

Kwiboo avatar Kwiboo commented on August 21, 2024

@JeonghwaCho feel free to cherry pick the commits you think is safe to include, I am currently working on CEC wakeup in my odroidc2-v2015.01-cec-power-on branch and can now also power on using CEC (this branch replaces the 'Disable CEC wakeup' commit with a "working" CEC handler).
The CEC code is still work-in-progress and currently forces a 0x2f cec config, expects kernel to set physical and logical CEC address and needs more testing.

LibreELEC-master cec+remote wakeup test-image: https://www.dropbox.com/s/jj78rdc7gwi3k9v/LibreELEC-Odroid_C2.aarch64-8.0-devel-20160817133009-r23641-ge6dbce4.img.gz?dl=0

As for blX I have no real question and I have settled my curiosity with Kwiboo@6d0a176 where I can modify the 20160701 bl2 and make it boot from both SD and eMMC. It is a very dirty hack and limits the bl21 size from 3k to 2k due to realignments but was the best I could do without any access to blX source code.

I will however make an attempt to update bl30/31 to the 20151205 version as that version adds 'wait for interrupt' handling to the scp_task power-key detection loop and "worked" with current bl2 in my previous tests.

from u-boot.

Kwiboo avatar Kwiboo commented on August 21, 2024

Closing this issue as most code is merged, see #32 for the final cec-wakeup code changes

from u-boot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.