Coder Social home page Coder Social logo

ingenic-usbboot's People

Contributors

ballaswag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ingenic-usbboot's Issues

unable to load uboot.bin after spl.bin

Hello, this issue could be due to my naivety, but I am unable to get your tool to boot the modified SPL and UBOOT.bin.

I am thinking this is potentially a power issue, but I would appreciate if you could clarify exactly how you are launching your modified SPL and UBOOT.

Here is what I have.

Hardware:

  1. RK3328 SBC with USB male to female connected to K1 micro usb port.
  2. 5v USB to TTL plugged into the K1 serial port.
  3. The RK3328 board is powered by a 3 amp usb power brick, but I have not verified the power delivery.
  4. The only power going to the K1 board is from the RK3328 board. I do not know what the USB power limits are on this device, but this could potentially be our issue. I am doubtful though, because without this SPL and UBOOT, I am able to power the whole K1 board with normal boot from this usb. I unplugged all other connections from the K1 mainboard as a precaution.

Steps to launch SPL and UBOOT:

  1. Clone your git repo, re-make the usbboot tool by running make clean && make
  2. Connected from RK3328 SBC to k1 via sudo screen /dev/ttyUSB0 115200 - Verify console output from normal boot chatter.
  3. Run the following:

Attempt 1:

alex@renegade:~/ingenic-usbboot$ sudo ./usbboot --cpu x2000 --addr 0x80100000 --download uboot.bin
alex@renegade:~/ingenic-usbboot$ sudo ./usbboot --cpu x2000 --stage1 spl.bin --start1 0xb2401800
alex@renegade:~/ingenic-usbboot$ sudo ./usbboot --cpu x2000 --start2 0x80100000

Request PROGRAM_START2 failed: -7

Attempt 2:

alex@renegade:~/ingenic-usbboot$ sudo ./usbboot --cpu x2000 --stage1 spl.bin --start1 0xb2401800
alex@renegade:~/ingenic-usbboot$ sudo ./usbboot --cpu x2000 --stage2 uboot.bin --start2 0x80100000
Request SET_DATA_ADDRESS failed: -7

Attempt 3:

alex@renegade:~/ingenic-usbboot$ sudo ./usbboot --cpu x2000 --stage1 spl.bin --start1 0xb2401800 --stage2 uboot.bin --start2 0x80100000
Request SET_DATA_ADDRESS failed: -7

The only thing that seems to partially work is the stage 1 SPL.bin loading. Giving me the following serial output.

U-Boot SPL 2013.07-00032-ga0524e4 (Aug 24 2023 - 10:25:53)
ERROR EPC b2401944
Current Version: V2
CPA_CPAPCR:0c70902d
CPM_CPMPCR:0310086d
CPM_CPEPCR:0310186d
CPM_CPCCR:9a094410
DDR: W97BV6MK_LPDDR2 type is : LPDDR2
DDRP_INNOPHY_CALIB_DELAY_AL:00000051
DDRP_INNOPHY_CALIB_DELAY_AH:00000051
-----ddr_readl(DDRP_INNOPHY_CALIB_DONE): 00000003

U-Boot SPL 2013.07-00032-ga0524e4 (Aug 24 2023 - 10:25:53)
ERROR EPC b2401944
Current Version: V2
CPA_CPAPCR:0c70902d
CPM_CPMPCR:0310086d
CPM_CPEPCR:0310186d
CPM_CPCCR:9a094410
DDR: W97BV6MK_LPDDR2 type is : LPDDR2
DDRP_INNOPHY_CALIB_DELAY_AL:00000051
DDRP_INNOPHY_CALIB_DELAY_AH:00000051
-----ddr_readl(DDRP_INNOPHY_CALIB_DONE): 00000003

Sometimes I will randomly get this error on serial output repeating indefinitely after attempting to launch SPL.bin:

-----ddr_readl(DDRP_INNOPHY_CALIB_DONE): 00000012
DDRP_INNOPHY_CALIB_DELAY_AL:00000051
DDRP_INNOPHY_CALIB_DELAY_AH:00000051
-----ddr_readl(DDRP_INNOPHY_CALIB_DONE): 00000012
DDRP_INNOPHY_CALIB_DELAY_AL:00000051
DDRP_INNOPHY_CALIB_DELAY_AH:00000051

I would greatly appreciate your input here!

It looks like there is some issue with initializing the RAM. Perhaps I am writing to the incorrect address?

Additional note, I was able to successfully dump the kernel partition after:

$ sudo ./usbboot --uboot

## dump the kernel partition to file ./kernel.out
$ sudo ./usbboot -o 0x000b00000 -s 0x0000800000 --dump-partition ./kernel.out

Thanks!
Alex

SPL creation info

Would you please detail how you created (or modified) the SPL that defines ddr speed, etc?

I'd like to add support for the Ingenic T series CPU's if possible for reading from NOR/NAND

example cloner config:

[ddr]
bank8=1
creator_version=1
cs0=1
cs1=0
current_ddr=M14D1G1664A_DDR2.cfg
current_type="4,DDR2"
dw32=0

[debug]
boot_stage_send_length=1
cpu_info_length=8
log=1
read_back_chk=0
stage2_init_timeout=200
str_to_hex=-1
transfer_data_chk=1
transfer_size=1048576
uart_burn_baudrate=921600
uart_transfer_size=32768

[gpio]
config="-1,-1,0,"

[info]
baud_rate=115200
complete=0
count=0
cpu_and_ddr_freq_limit_index=0
cpufreq=576000000
ddrfreq=400000000
extal=24000000
force_reset=1
power_off=0
sync_time=0
uart_gpio=1

cloner spl/uboot for reference: t31_spl_uboot.zip

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.