Jump to content

Recommended Posts

Posted

Try to press and hold the "CTRL+C" keys and only then turn on the power (do not release the keys until you get the output on the prompt screen from u-boot "#")

Posted

I had an attempt and building mainline uboot, adding in the N2 support and building the ATF firmware to run uboot.  I did not have uboot working (some issues not long after uboot is started,  I think I missed reserving memory) but I did manage to work out how to format the amlogic firmware to start uboot.  It was a bit more complex and messy than the C2 process but can be scripted easy enough I believe,  we would need some compiled blobs from the hardkernel git still I think for the moment as in the C2.

 

I will keep trying uboot as baylibre add support for the g12a there.  Would be nice to have mainline running on the SPI as many more possible features for booting images.

Posted

I added to the site new images 5.87 for N2 with kernel 5.1 which already have the necessary scripts to start the activation of multi-boot (n2_autoscript) and start the system from USB (boot.scr).

If activation is already done, then after burning the image to USB media, you do not need to add\change anything. When you connect to N2 in the USB stick, the system automatically starts up. By the way, I checked the fast USB 3.0 flash drive on N2 , the speed is higher than the SD card. And when using USB-SSD , much faster than eMMC. :)

 

 

p.s.

After comparing the operation of the system with eMMC and with a good USB-SSD, I concluded that eMMC is not needed for N2 at all. :)

Posted

Gathered and checked the startup script of the system Armbian kernel 4.9. Everything works. Scripts on the site are marked according to the kernel used. Before using these scripts on existing systems, be sure to rename them correctly after writing to USB media. The file name must be boot.scr.

 

In the new images Armbian 5.87 these scripts are already in both versions of the images and not to add in the is not necessary.

 

When you start the system from an SD card or eMMC with a new u-boot , in the "boot.ini", you need to comment out or delete this line .

 

 

if test "${display_autodetect}" = "true"; then hdmitx edid; fi

Posted
6 hours ago, balbes150 said:

Try to press and hold the "CTRL+C" keys and only then turn on the power (do not release the keys until you get the output on the prompt screen from u-boot "#")

I've tried again, but no, it still doesn't work. It seems a different U-Boot present in SPI which doesn't check keystrokes ...

Posted
10 minutes ago, balbes150 said:

What version does Piteboot write after running at the top of the screen ?

 

It is even trying to boot a kernel present in the Flash :

 



bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

L0:00000000
L1:00000703
L2:00008067
L3:04000000
B2:00002000
B1:e0f83180

TE: 58289

BL2 Built : 10:47:19, Jan 14 2019. g12b g152d217 - guotai.shen@droid11-sz

Board ID = 4
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 00012bea
DDR driver_vesion: LPDDR4_PHY_V_0_1_11 build time: Jan 14 2019 10:47:15
board id: 4
Load FIP HDR from SPI, src: 0x00010000, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from SPI, src: 0x00030000, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from SPI, src: 0x0002c000, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from SPI, src: 0x00014000, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from SPI, src: 0x00020000, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!

R0_RxClkDly_Margin==106 ps 9
R0_TxDqDly_Margi==94 ps 8


R1_RxClkDly_Margin==0 ps 0
R1_TxDqDly_Margi==0 ps 0

 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001

 ddr scramble enable
2D training succeed
auto size-- 65535DDR cs0 size: 2048MB
DDR cs1 size: 2048MB
DMC_DDR_CTRL: 00600024DDR size: 3928MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
 pre test  bdlr_100_average==435 bdlr_100_min==435 bdlr_100_max==435 bdlr_100_cur==435
 aft test  bdlr_100_average==435 bdlr_100_min==435 bdlr_100_max==435 bdlr_100_cur==435
100bdlr_step_size ps== 440
result report
boot times 0Enable ddr reg access
Load FIP HDR from SPI, src: 0x00010000, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from SPI, src: 0x0003c000, des: 0x0172c000, size: 0x00094000, part: 0
0.0;M3 CHK:0;cm4_sp_mode 0
E30HDR
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12b_v1.1.3375-8f9c8a7 2019-01-24 10:44:46 guotai.shen@droid11-sz]
OPS=0x40
ring efuse init
chipver efuse init
29 0a 40 00 01 14 26 00 00 05 30 32 54 52 4d 50
[0.019924 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE:  BL31: v1.3(release):ab8811b
NOTICE:  BL31: Built : 15:03:31, Feb 12 2019
NOTICE:  BL31: G12A normal boot!
NOTICE:  BL31: BL33 decompress pass
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01 (Mar 31 2019 - 08:22:28)

DRAM:  3.5 GiB
Relocation Offset is: d6ef5000
spi_post_bind(spifc): req_seq = 0
register usb cfg[0][1] = 00000000d7f85e48
MMC:   aml_priv->desc_buf = 0x00000000d3ee57c0
aml_priv->desc_buf = 0x00000000d3ee7b00
SDIO Port C: 0, SDIO Port B: 1
spifc_probe: reg=00000000ffd14000, mem_map=00000000f6000000
SF: Detected MX25U6435F with page size 256 Bytes, erase size 64 KiB, total 8 MiB
In:    serial
Out:   serial
Err:   serial
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100)
vpu: vpu_clk_gate_init_off finish
vpp: vpp_init
vpp: g12a/b osd1 matrix rgb2yuv ..............
vpp: g12a/b osd2 matrix rgb2yuv..............
vpp: g12a/b osd3 matrix rgb2yuv..............
cvbs_config_hdmipll_g12a
cvbs_set_vid2_clk
** Bad device specification mmc -1 **
** Bad device specification mmc -1 **
movi: not registered partition name, logo
movi - Read/write command from/to SD/MMC for ODROID board

Usage:
movi <read|write> <partition|sector> <offset> <address> [<length>]
    - <read|write>  the command to access the storage
    - <offset>  the offset from the start of given partiton in lba
    - <address>  the memory address to load/store from/to the storage device
    - [<length>]  the size of the block to read/write in bytes
    - all parameters must be hexa-decimal only

[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]set initrd_high: 0x3d800000
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]VPP_OFIFO_SIZE:0xfff01fff
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=5760, height=2160
[OSD]wait_vsync_wakeup exit
cvbs: outputmode[1080p60hz] is invalid
vpp: vpp_matrix_update: 2
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6  vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1302]
rx version is 1.4 or below  div=10
Net:   dwmac.ff3f0000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, status=0x1bf2800
emmc/sd response timeout, cmd55, status=0x1bf2800
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x1, tx-dly 0, clock 40000000
aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x2000
[mmc_startup] mmc refix success
[mmc_init] mmc init success
Hit Enter or space or Ctrl+C key to stop autoboot -- :  0
HDMI cable is NOT connected
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]VPP_OFIFO_SIZE:0xfff01000
cvbs: outputmode[1080p60hz] is invalid
vpp: vpp_matrix_update: 2
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6  vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1302]
rx version is 1.4 or below  div=10
SF: Detected MX25U6435F with page size 256 Bytes, erase size 64 KiB, total 8 MiB
SF: 3988480 bytes @ 0x119000 Read: OK
SF: 3249152 bytes @ 0x4e6c00 Read: OK
SF: 102400 bytes @ 0x100000 Read: OK
card out
** Bad device mmc 1 **
ee_gate_off ...
## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   
   Image Type:   AArch64 Linux Kernel Image (gzip compressed)
   Data Size:    3615036 Bytes = 3.4 MiB
   Load Address: 01080000
   Entry Point:  01080000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 3d800000 ...
   Image Name:   
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    2903899 Bytes = 2.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
libfdt fdt_path_offset() returned FDT_ERR_BADPATH
   Uncompressing Kernel Image ... OK
   kernel loaded at 0x01080000, end = 0x01903808
   Loading Ramdisk to 3d53b000, end 3d7fff5b ... OK
   Loading Device Tree to 000000001ffec000, end 000000001ffffaba ... OK

Starting kernel ...

uboot time: 8534479 us

 

 

Thanks ! I will proceed to SPI Update ... I will post results later ...

Posted
9 minutes ago, martinayotte said:

It is even trying to boot a kernel present in the Flash :

Yes, I've seen this behavior. By the way, connect the image with the kernel 5.1 and you will see the work of the monitor\TV with the message of the reason that it was not possible to mount the root system. Piteboot will even show the available system on USB\SD (if they have the correct "boot.ini" from which it tries to read and form its startup script). :)

 

By the way, on the old version of Piteboot (20190202) I normally started systems from SD card in u-boot SPI mode.

Posted
2 minutes ago, balbes150 said:

Yes, I've seen this behavior.

SPI Update done ! Now working perfectly ! I've booted my USB dongle without any eMMC or SDCard ...

 

Many Thanks !

 

Posted

Although I have SPI/USB combo working, I've continued investigating about the eMMC ...

 

Now, I'm throwing the towel !!! :angry:

 

Just for example, few days ago, I was trying to push image to eMMC using "xzcat theimage.img.zx | dd of=/dev/mmcblk0 bs=100M" and it hangs with "load average > 10" forever.

Then I extracted the image, and did "dd if=theimage.img of=/dev/mmcblk0 bs=100M", it success, but the eMMC didn't boot, hanging early after mount ROOTFS.

I've suspected corruptions, confirmed with "fsck", so today I tried to restore manually doing "tar cf - <source> | tar xvf", from working USB to eMMC, but again "load average > 10" forever.

I did only few directory at a time, fine, the tar finished, but doing "sync", again "load average > 10" forever ...

What the F*%K !!! And as cherry on the icecream : this eMMC can't be used with the eMMC/USB adaptor I've coming from RockPro64, although mechanically compatible, and looking at schematic should be also electronically compatible.

 

So, end of the story, I will stay with SPI/USB combo like @balbes150 suggested !

Posted
49 minutes ago, martinayotte said:

So, end of the story, I will stay with SPI/USB combo like @balbes150 suggested !

What model eMMC is it? Is it a pine one? I've had issues with Odroid eMMC working on pine, but Pine eMMC not working on Odroid or RockPi.

Always a simular behaviour of showing initial boot and then hanging. If you've got another. Try it. Mine with problems has V 1.0 written on the underside. Works with some, most not.

Posted
2 hours ago, NicoD said:

What model eMMC is it? Is it a pine one?

Nope ! It is eMMC part of the parcel shipped by Lisa's HardKernel DEV sample recently received.

I maybe going to restore original 4.9.162 to see if such "load average > 10" exist on their image ... (But now I  have doubt how I will be able to restore it)

Posted
2 hours ago, NicoD said:

If you've got another. Try it.

I have one from my defunct RockProg64, but it is not been recognise properly from Odroid-N2, so both seems to be incompatible ...

Posted
5 hours ago, martinayotte said:

I have one from my defunct RockProg64, but it is not been recognise properly from Odroid-N2, so both seems to be incompatible ...

I have an eMMC module from HK (was bundled with N2). I haven't tried it yet. I'll try to test it with the image Armbian in the course of the week.

Posted
5 hours ago, martinayotte said:

Nope ! It is eMMC part of the parcel shipped by Lisa's HardKernel DEV sample recently received.

I maybe going to restore original 4.9.162 to see if such "load average > 10" exist on their image ... (But now I  have doubt how I will be able to restore it)

I didn't see the emmc issue on N2 with the 5.0 based kernel,  and I did try a few different emmc's & sd's.  I'm currently trying to see what minimal patches I need to apply to 5.2-rc to have a booting kernel.

Posted
8 hours ago, balbes150 said:

I'll try to test it with the image Armbian in the course of the week.

Just to let you know, I've been able to restore original 4.9.162 image on eMMC and booted it ...

Then, I've done some test of doing "tar | tar" of almost all ROOTFS into a new folder without any "load average > 10" issue.

So, it is most probably a kernel issue within 5.1.y image. I've compared mmc nodes of both DT, I didn't find much differences ...

Posted

I've just faced a new issue : since I've restored eMMC with 4.9.162, even if I place the boot switch to SPI position, U-Boot doesn't report anything while doing "usb start", although "usb tree" is working fine. :wacko:

So, I can't boot from USB anymore if eMMC is present/connected ... :( To be able to boot from USB while eMMC is present, I had to wipe out the eMMC, filling its first sectors with zeros ...

Strange AmLogic boot sequence ... :angry:

 

EDIT : Even worst ! If I re-create a simple data partition on eMMC, "usb start" doesn't work anymore ... :angry:

The only way to make both co-exist is to have a duplicate BOOT from USB into eMMC, simply because this poor U-Boot is still looking at /dev/mmcblk0p1. :blink:

 

EDIT2 : No, it is not the BOOT partition that produced such behavior, since I was able to delete all partitions and recreate only one for data. So it is most probably the presence or not of the bootenv sectors ! :angry:

Posted

I've had something very strange with it when leaving the eMMC in with Ubuntu Mate. And putting SD-card with Meveric's Stretch in. It did boot stretch, but with the kernel of Mate.
So best to leave the eMMC disconnected when using an SD-card.
See here : https://forum.odroid.com/viewtopic.php?f=179&t=33865

The post of mine(badpritt) with 2 pictures in it. Then Meverics response that it wasn't his kernel...

To make it easier, here the post of Meveric : 
 

Quote

by meveric » Fri Apr 12, 2019 10:56 pm

Your Kernel looks very odd...

Linux odroid-stretch64 4.9.162-22

That is none of my Kernel.

Also now that I look at the picture I see you have eMMC and SD card connected at the same time...

Could it be that you have Ubuntu and Debian connected at the same time?
If so, please remove the Ubuntu image, as you will have lots of issues with this combination.
This would actually explain a lot of the issues I've seen in the syslog that I was confused about... like missing /lib/modules/ folder.

 

Posted
14 hours ago, martinayotte said:

I've just faced a new issue : since I've restored eMMC with 4.9.162, even if I place the boot switch to SPI position, U-Boot doesn't report anything while doing "usb start", although "usb tree" is working fine. :wacko:

So, I can't boot from USB anymore if eMMC is present/connected ... :( To be able to boot from USB while eMMC is present, I had to wipe out the eMMC, filling its first sectors with zeros ...

Strange AmLogic boot sequence ... :angry:

 

EDIT : Even worst ! If I re-create a simple data partition on eMMC, "usb start" doesn't work anymore ... :angry:

The only way to make both co-exist is to have a duplicate BOOT from USB into eMMC, simply because this poor U-Boot is still looking at /dev/mmcblk0p1. :blink:

 

EDIT2 : No, it is not the BOOT partition that produced such behavior, since I was able to delete all partitions and recreate only one for data. So it is most probably the presence or not of the bootenv sectors !

Try removing the u-boot loader from the eMMC and remove the startup scripts (boot.ini).

Posted
6 hours ago, balbes150 said:

Try removing the u-boot loader from the eMMC and remove the startup scripts (boot.ini).

As I said, I've removed all partitions, and still work, as long as I keep the u-boot and bootenv sectors. If I do "dd if=/dev/zero of=/dev/mmcblk0 bs=1024 count=1000", then, from SPI U-Boot, "usb start" won't work if the eMMC is present, even if boot switch is at SPI position. So, my conclusion is that U-Boot still use eMMC bootenv, even if switch is at SPI position, and if eMMC bootenv emptied, it chokes ! If eMMC isn't present, it fallback reading the bootenv from SPI instead.

Posted
1 hour ago, martinayotte said:

As I said, I've removed all partitions, and still work, as long as I keep the u-boot and bootenv sectors. If I do "dd if=/dev/zero of=/dev/mmcblk0 bs=1024 count=1000", then, from SPI U-Boot, "usb start" won't work if the eMMC is present, even if boot switch is at SPI position. So, my conclusion is that U-Boot still use eMMC bootenv, even if switch is at SPI position, and if eMMC bootenv emptied, it chokes ! If eMMC isn't present, it fallback reading the bootenv from SPI instead.

Hooked module eMMC (blank) to N2. Switch to SPI. Starting Armbian from USB works without problems. Created a partition table and two partitions (FAT and EXT4) on eMMC . Reboot N2. Everything normally starts from USB and SD card. I haven't checked the system for eMMC yet (I don't have enough time).

Posted
2 hours ago, balbes150 said:

Hooked module eMMC (blank) to N2.

Are you sure it is blank (no bootenv sectors left) ?

Because I've repeated the scenario twice, and as soon I'm erasing the bootenv on eMMC, the "usb start" do nothing (no output at all) and comes back to u-boot prompt silently.

 

EDIT : I've even checked with an ohmmeter if the Boot switch was properly doing contact in SPI position, and it was Ok ...)

 

EDIT2 : I've checked the schematic, and this SPI Boot switch only add a 10K pulldown to eMMC_D6, schematic is Rev0.1, while my board is v0.4 ... Which Rev is yours ?

 

EDIT3 : Ok ! I've tried to repeat tests a third time, I was wrong, the symptom occurs when u-boot/bootenv sectors of the original 4.9.162 are present.

But still, why if the switch is at SPI position, the AmLogic BROM still load something from eMMC ?

 

EDIT4 : In fact, I was partially right : If eMMC is blanked, then create a single ext4 partition, but using default fdisk start at 2048, it produce the same symptoms ! But not at 8192 ...

 

EDIT5 : If I remove the partition starting at 2048 and redo it at 8192, symptoms are still there, until I pushed zeros around that location 2048 !

Posted
15 hours ago, martinayotte said:

Are you sure it is blank (no bootenv sectors left) ?

Because I've repeated the scenario twice, and as soon I'm erasing the bootenv on eMMC, the "usb start" do nothing (no output at all) and comes back to u-boot prompt silently.

 

EDIT : I've even checked with an ohmmeter if the Boot switch was properly doing contact in SPI position, and it was Ok ...)

 

EDIT2 : I've checked the schematic, and this SPI Boot switch only add a 10K pulldown to eMMC_D6, schematic is Rev0.1, while my board is v0.4 ... Which Rev is yours ?

 

EDIT3 : Ok ! I've tried to repeat tests a third time, I was wrong, the symptom occurs when u-boot/bootenv sectors of the original 4.9.162 are present.

But still, why if the switch is at SPI position, the AmLogic BROM still load something from eMMC ?

 

EDIT4 : In fact, I was partially right : If eMMC is blanked, then create a single ext4 partition, but using default fdisk start at 2048, it produce the same symptoms ! But not at 8192 ...

 

EDIT5 : If I remove the partition starting at 2048 and redo it at 8192, symptoms are still there, until I pushed zeros around that location 2048 ! 

I forgot to write in the first message about eMMC that I always create partitions with an offset of 4M.

 

New test results. :)

Added files to the images to install the system in eMMC. Checked the Armbian installation with kernel 4.9. Everything was installed and when you restart properly run system from eMMC. Further an interesting outcome. The system startup from USB stopped working. Running from SD card works. When installed on eMMC, only system files were copied, u-boot did not copy. When clean the first 4M for eMMC, start with USB again earned. Now I have collected new images with the addition of the installation script in eMMC and a new option to activate multi-boot (changed the order of polling MMC), now the order of polling boot such

1. USB 

2. SD card

3. eMMC.

This ensures that the external system starts from USB\SD if there is a breakage with the start-up from eMMC.

Posted
6 hours ago, balbes150 said:

Now I have collected new images with the addition of the installation script in eMMC and a new option to activate multi-boot

Thanks a lot !

Posted
10 hours ago, balbes150 said:

Added files to the images to install the system in eMMC

Just to let you know, I've tried this custom "nand-sata-install", and I've faced the "load average > 10", and the install didn't finished, even after 1 hour... :wacko:

Posted
14 minutes ago, martinayotte said:

Just to let you know, I've tried this custom "nand-sata-install", and I've faced the "load average > 10", and the install didn't finished, even after 1 hour..

This still works on kernel 4.9. The 5.1 kernel needs patches.

Posted
12 hours ago, martinayotte said:

What do you mean ? Is it a DT issue or some things in eMMC driver itself ?

On S905x2 (it's a close platform with S922) eMMC works with this kernel. Perhaps the reason for the settings or is it the result of using a removable connector for the eMMC on the N2. I noticed that if you copy the data in manual parts no more than 500MB, with an intermediate "sync" , everything is copied correctly.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines