SPI boot by phase my progress

Moderators: mdrjr, odroid

Re: SPI boot by phase my progress

Unread postby phaseshifter » Tue May 08, 2018 3:36 pm

dmesg out put

Code: Select all
U-Boot SPL board init
SF: unrecognized JEDEC id bytes: f7, a0, 0c
Trying to boot from MMC2
Card did not respond to voltage select!
mmc_init: -95, time 23
spl: mmc init failed with error: -95
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 15
spl: mmc init failed with error: -95
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###


but there is still no uInitrd file loaded as i cannot get the code to work as above post

Code: Select all
i have erased the  chip and am flashing it again..maybe i did not get a clean flash ...
will report the dmesg  of the  next flash when it`s done...
Odroids
phaseshifter
 
Posts: 2930
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: SPI boot by phase my progress

Unread postby mad_ady » Tue May 08, 2018 3:54 pm

Hmm, The last error is something I need to fix (the offset being a multiple of 4k was a wrong assumption I made because the flash is aligned in 4k blocks). I'll have to rethink things. But you should have been able to boot from flash with uboot (running with no sd/emmc) - if we're not missing anything...

I'll try some more.
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: SPI boot by phase my progress

Unread postby phaseshifter » Tue May 08, 2018 3:58 pm

i have not erased the chip as yet should i leave it and await futher notes from you
Odroids
phaseshifter
 
Posts: 2930
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: SPI boot by phase my progress

Unread postby mad_ady » Tue May 08, 2018 4:10 pm

Yes, wait - I'll have a look later on my end.
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: SPI boot by phase my progress

Unread postby mad_ady » Wed May 09, 2018 9:39 pm

I've updated the spi flashing script so that it uses a 2k flashing block and 5s wait periods so that you can write the last block. It should take the same time as 4k + 10s waits. I'm now writing uInitrd, but it will take a while. We'll see how booting goes.
Once you update the flash-spi script, you can run:
Code: Select all
./flash-spi /media/boot/uInitrd /dev/mtd0 8730624
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: SPI boot by phase my progress

Unread postby phaseshifter » Thu May 10, 2018 10:23 am

ok i will do that today and post a dmesg output for you..phase
Odroids
phaseshifter
 
Posts: 2930
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: SPI boot by phase my progress

Unread postby phaseshifter » Thu May 10, 2018 3:19 pm

that did not work..maybe i need to erase the chip and start over..???
Odroids
phaseshifter
 
Posts: 2930
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: SPI boot by phase my progress

Unread postby mad_ady » Thu May 10, 2018 3:33 pm

Hold on, I'm giving it a try now as well... We'll see. I think the environment needs to be set in the SPI chip as well, so that it can read the kernel/dtb/initrd from the correct offsets.
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: SPI boot by phase my progress

Unread postby mad_ady » Thu May 10, 2018 4:24 pm

Well, it seems it doesn't boot and behaves the same as when flashed from uboot (with emmc disconnected):
Code: Select all
�U-Boot SPL board init
SF: unrecognized JEDEC id bytes: ff, e0, 1c
Trying to boot from MMC2
Card did not respond to voltage select!
mmc_init: -95, time 23
spl: mmc init failed with error: -95
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 15
spl: mmc init failed with error: -95
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###


I think we're missing something, but I don't know what it is...
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: SPI boot by phase my progress

Unread postby phaseshifter » Thu May 10, 2018 9:54 pm

Code: Select all
# setenv loadaddr 0x400000


this was the first line of code that you have omitted from your install list does this held any ground on things also this the second line below also missing just thought i would add this to the equation
Code: Select all
# sf probe
# sf erase 0x0 0x1000000
Odroids
phaseshifter
 
Posts: 2930
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: SPI boot by phase my progress

Unread postby phaseshifter » Thu May 10, 2018 11:48 pm

sf probe does not seem to work is there a problem with your kernel rebuild...???
Odroids
phaseshifter
 
Posts: 2930
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: SPI boot by phase my progress

Unread postby mad_ady » Fri May 11, 2018 12:08 am

No, those are uboot commands used to erase the flash and write data to it. Uboot should have booted from the flash - at least, even without kernel, dtb, initrd - and it's not booting. Something is wrong with either our uboot build, or with the locations where we flash it. Perhaps @joy can help - too bad HK has frozen development :(
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: SPI boot by phase my progress

Unread postby phaseshifter » Fri May 11, 2018 6:41 am

are you going to pursue the issue with @joy...???
Odroids
phaseshifter
 
Posts: 2930
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: SPI boot by phase my progress

Unread postby odroid » Fri May 11, 2018 6:54 am

We suspended the N1 development from a few weeks ago.
We will make a decision of the direction of N1 project in the middle of June.
Please be patient until that time frame.
User avatar
odroid
Site Admin
 
Posts: 28704
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: SPI boot by phase my progress

Unread postby mad_ady » Fri May 11, 2018 1:27 pm

We understand that, but since we (testusers) have the sample units and nothing better to do, we'll continue to tinker with them in the meantime and use the forum to coordinate our efforts :)
Even if you choose not to pursue the N1, it's a great piece of hardware and a it's a pitty to waste it...
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: SPI boot by phase my progress

Unread postby phaseshifter » Fri May 11, 2018 9:22 pm

I have a few theory`s i`d like to pass by you.

if the start point is 32768..should this not be 32769/70 or something ..y i ask as if we are actually starting this in reseved space then this would be why u-boot fails.
ok that said . it`s maybe not actually writing to a usable block dunno...
I`m trying a few ideas my self..if i have success..i will post ,..

any way also i did the math on the hex figures and in your third line for the image.gz file ..the start point should be 1310720..i coded it in and it accepts it as an integer of 4096...thus still stuck on u-boot my self..
Odroids
phaseshifter
 
Posts: 2930
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: SPI boot by phase my progress

Unread postby mad_ady » Fri May 11, 2018 9:53 pm

I think 32768 is correct, because blocks are addressed/numbered from 0, so 32768 is the start of a new section (it's aligned to a power of 2). Maybe something else needs to be written before it - I don't know.
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: SPI boot by phase my progress

Unread postby phaseshifter » Fri May 11, 2018 10:34 pm

yeah your right about the 32768..i forgot about the "0"..being counted...no it`s setenv`s parts that sort of bother me ..i know you explained earlier about those..but leaves me to wonder ..
Odroids
phaseshifter
 
Posts: 2930
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: SPI boot by phase my progress

Unread postby mad_ady » Sat May 12, 2018 12:55 am

I think uboot (which is made of those two initial files we flashed) should boot without anything else and should drop you to a prompt. Once this happens we can worry about environment/dtb/kernel/initrd.
The bootloader is made of two parts - the first stage loader and uboot itself.

The board says it's trying to read something from spi - I wonder if that message comes from first stage or not. We can try the following (I will likely not have time in the following month, but here goes):
1. Use strings on the first stage and uboot to see if the boot error message we see comes from either one. This would mean that something potentially loads
2. Identify if possible where those bad bytes are read from. Should be in the first MB of flash.
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: SPI boot by phase my progress

Unread postby rooted » Sat May 12, 2018 2:22 am

I would wait, unless you have nothing more productive to do.
User avatar
rooted
 
Posts: 5582
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: SPI boot by phase my progress

Unread postby back2future » Sat May 12, 2018 2:39 am

mad_ady wrote:We understand that, but since we (testusers) have the sample units and nothing better to do, we'll continue to tinker with them in the meantime and use the forum to coordinate our efforts :)
Even if you choose not to pursue the N1, it's a great piece of hardware and a it's a pitty to waste it...

[ http://wiki.pine64.org/index.php/ROCKPro64_Main_Page ]
naturally beYOnd spectrum
back2future
 
Posts: 87
Joined: Sun Jul 23, 2017 3:19 pm
languages_spoken: english

Re: SPI boot by phase my progress

Unread postby mad_ady » Sat May 12, 2018 2:53 am

rooted wrote:I would wait, unless you have nothing more productive to do.
I have lots more productive things to do - except I know how to do them and there's little appeal in doing it. The flash problem, on the other hand I don't know how to fix, so my brain is running a background task working on it... You must know the feeling :)
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: SPI boot by phase my progress

Unread postby mad_ady » Sat May 12, 2018 2:57 am

back2future wrote:
mad_ady wrote:We understand that, but since we (testusers) have the sample units and nothing better to do, we'll continue to tinker with them in the meantime and use the forum to coordinate our efforts :)
Even if you choose not to pursue the N1, it's a great piece of hardware and a it's a pitty to waste it...

[ http://wiki.pine64.org/index.php/ROCKPro64_Main_Page ]
Thanks for the tip, but they currently say:
Storage Memory: ROCK64 boards have 128Mb built-in SPI Flash memory but not yet in use, currently use bootable microSD Cards or bootable attachable eMMC.


One think I hadn't thought of - uboot is not signed in any way. For xu4 HK had to sign a part of the bootloader if I remember correctly...
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: SPI boot by phase my progress

Unread postby rooted » Sat May 12, 2018 5:35 am

mad_ady wrote: The flash problem, on the other hand I don't know how to fix, so my brain is running a background task working on it... You must know the feeling :)


LOL, I hope you have it nice'd and running on a slow core ;)
User avatar
rooted
 
Posts: 5582
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: SPI boot by phase my progress

Unread postby phaseshifter » Sat May 12, 2018 9:16 am

i agree with @mad_ady why should we stop ..
we are the tester`s and even though my coding is not that good at the best of times..
i am the guy just that need`s to know how ,i can and have the ability to do something when i know how...

it`s our preference to pursue what we can with the n-1...thus why we even have a board to start with......phase
Odroids
phaseshifter
 
Posts: 2930
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: SPI boot by phase my progress

Unread postby rooted » Sat May 12, 2018 9:56 am

phaseshifter wrote:i agree with @mad_ady why should we stop ..
we are the tester`s and even though my coding is not that good at the best of times..
i am the guy just that need`s to know how ,i can and have the ability to do something when i know how...

it`s our preference to pursue what we can with the n-1...thus why we even have a board to start with......phase
You are free to do as you wish, I wasn't trying to tell anyone what to do.

Just saying what I would do unless I didn't have anything else to work on, no offense was intended if any was implied.
User avatar
rooted
 
Posts: 5582
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: SPI boot by phase my progress

Unread postby phaseshifter » Sat May 12, 2018 10:45 am

@rooted that is ok none taken...but it is @mad_ady`s idea to start with ..
it looked promising after following his thread for some time so i jumped onto the wagon..
i like the concept as well...phase
Odroids
phaseshifter
 
Posts: 2930
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: SPI boot by phase my progress

Unread postby rooted » Sat May 12, 2018 10:55 am

Me too, I am excited about on-board flash. Just makes it all the more flexible.
User avatar
rooted
 
Posts: 5582
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: SPI boot by phase my progress

Unread postby mad_ady » Sat May 12, 2018 5:00 pm

rooted wrote:LOL, I hope you have it nice'd and running on a slow core ;)


Don't worry, all my cores are slow [emoji14]
User avatar
mad_ady
 
Posts: 4585
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Previous

Return to Projects

Who is online

Users browsing this forum: No registered users and 0 guests