Jump to content

Recommended Posts

Posted
  On 3/14/2020 at 2:37 PM, martinayotte said:

I can be that "Guinea pig" ...

Expand  

You need to write this u-boot image to eMMC with a simple command dd.

After recording, check the General launch of u-boot (control via the UART console). If it starts, write the last image of Armbian-TV 20200314 to USB (this will allow you to immediately check the possibility of starting systems from USB media), configure DTB and start the system from USB. After writing the new u-boot to eMMC, you will have an MBR table with two partitions that you can use to install any system in eMMC (for example, using a ready-made script install-aml-s905-emmc.sh from the Armbian-TV image). If you want, you can install your system in eMMC, but keep in mind that you will need a set of scripts from Armbian-TV to run it.

 

https://yadi.sk/d/FieAroFgp9b-qQ

Posted
  On 3/14/2020 at 2:55 PM, balbes150 said:

You need to write this u-boot image to eMMC with a simple command dd.

Expand  

Thanks !

At first, I've wished to keep /boot files and stuctures in the rootfs partition like normal Armbian, it works fine when booting from SDCard using those u-boot commands :

  Reveal hidden contents

But for eMMC it doesn't work, even doing "ext4ls mmc 0:2 /boot" shows an empty directory while doing "ext4ls mmc 1:0 /boot" for SDCard is working fine.

It seems that eMMC driver within this old u-boot requires that files need to be at root level, probably not able to browse sub-folders, so the above commands works if all paths are root / ...

If I'm using the FAT partition, the following commands are the ones needed :

  Reveal hidden contents

 

Posted
  On 3/14/2020 at 7:32 PM, martinayotte said:

It seems that eMMC driver within this old u-boot requires that files need to be at root level, probably not able to browse sub-folders, so the above commands works if all paths are root / ...

Expand  

Try creating links from /boot to the desired files in the mmc 0:2 root .

 

 

  On 3/14/2020 at 7:32 PM, martinayotte said:

booti 0x1080000 0x39000000 0x1000000

Expand  

Hmmm

Why this address ? It is better to use addresses from a closer area.

It is proven and guaranteed to work on s905

https://github.com/150balbes/Build-Armbian/blob/master/config/bootscripts/boot-aml-s912_ENV.cmd#L9

Posted
  On 3/15/2020 at 8:51 AM, balbes150 said:

How much RAM does u-boot show on your K2 ?

 

Can you show the UART log of the u-boot start from eMMC ?

Expand  

Here it is :

  Reveal hidden contents
Posted
  On 3/15/2020 at 11:15 AM, balbes150 said:

Hmmm

Why this address ? It is better to use addresses from a closer area.

Expand  

I kept the default ENV which was in your original image :

initrd_start=0x39000000

I will try to change that according to your boot-aml-s912_ENV.cmd later ...

Posted
  On 3/15/2020 at 12:08 PM, martinayotte said:

I will try to change that according to your boot-aml-s912_ENV.cmd later ...

Expand  

If you have everything working correctly, this is not necessary. The main thing is that on K2 this version works almost correctly with eMMC and will allow you to easily install Armbian in eMMC and run it fully without any SD cards.

Posted

By the way, it will be interesting to check with, delete the FAT partition and resize  EXT4 partition for the entire eMMC and check whether u-boot can work or not.

Posted
  On 3/19/2020 at 12:45 PM, martinayotte said:

What do you want me to check ?

Expand  

If possible (if time) , check the General launch of the LE image on K2. It is advisable to perform two checks. 1. Write the image to the SD card ( you don't need to change anything in the settings) and check how u-boot works witchout modul eMMC (whether it can start the system or not). 2. If you have my u-boot  in eMMC, check the launch from a USB flash drive (write the image to the flash drive and see if it can start FROM the flash drive or not). Ideally (but not necessarily), show the UART logs of these checks.  :)

 

https://yadi.sk/d/hf5XdV2ffFPwWA

Posted
  On 3/24/2020 at 7:12 PM, martinayotte said:

It doesn't boot with SDCard alone :  http://ix.io/2faw

Expand  

It is interesting. Do I understand correctly, this is the log of launching the LE image from the Sd card ? You can stop running in the UART console and check which mmc devices are available "mmcinfo" and what will "fatls mmc 0" and "fatls mmc 1" show from these devices\partitions ?

Posted
  On 3/25/2020 at 7:36 AM, balbes150 said:

Do I understand correctly, this is the log of launching the LE image from the Sd card ?

Expand  

Right ! I'm struggling to figure out how to make it boot, looking at "printenv" don't shows me why it try to boot from "mmc 2" where it is supposed to be 1.

=> fatls mmc 1 
            dtb/
      175   uEnv.txt
      224   android_disable.sh
      223   android_enable.sh
     1732   ddbr-backup.sh
     1710   ddbr-restore.sh
     3433   install2emmc.sh
 26386440   KERNEL
 124035072   SYSTEM
       48   KERNEL.md5
       48   SYSTEM.md5

10 file(s), 1 dir(s)

=> ext4ls mmc 1:2
<DIR>       1024 .
<DIR>       1024 ..
<DIR>      12288 lost+found
               0 .please_resize_me
=> 

As you can see, the second partition is empty, and during startup, it seems to wish to load something from partition 2 after successfully loaded the DTB, although kernel is on partition 1:

Scanning mmc 1:1...
26660 bytes read in 6 ms (4.2 MiB/s)           // <--- DTB loaded successfully
MMC Device 2 not found
no mmc device at slot 2

 

Posted

Can you show printenv (UART) ?

 

I think I understand the reason.  :)

I don't see the start script (boot.scr). I need to check the contents of the resulting image.

Try taking (boot.scr) from any image for RK.

Posted
  On 3/25/2020 at 2:23 PM, balbes150 said:

Can you show printenv (UART) ?

Expand  

Here it is :

=> printenv
arch=arm
baudrate=115200
board=p200
board_name=p200
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_source=sd
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=romusb mmc0 mmc1 mmc2 pxe dhcp 
bootcmd=run distro_bootcmd
bootcmd_dhcp=if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00011:UNDI:003000;setenv bootp_arch 0xb;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_mmc1=devnum=1; run mmc_boot
bootcmd_mmc2=devnum=2; run mmc_boot
bootcmd_pxe=dhcp; if pxe get; then pxe boot; fi
bootcmd_romusb=if test "${boot_source}" = "usb" && test -n "${scriptaddr}"; then echo '(ROM USB boot)'; source ${scriptaddr}; fi
bootdelay=2
cpu=armv8
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
fdt_addr_r=0x08008000
fdtcontroladdr=7df63e38
fdtfile=amlogic/meson-gxbb-nanopi-k2.dtb
kernel_addr_r=0x08080000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
pxefile_addr_r=0x01080000
ramdisk_addr_r=0x13000000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x08000000
soc=meson
stderr=serial@4c0
stdin=serial@4c0
stdout=serial@4c0
vendor=amlogic

Environment size: 3591/8188 bytes
=> 

 

  On 3/25/2020 at 2:23 PM, balbes150 said:

Try taking (boot.scr) from any image for RK.

Expand  

 

I don't have any RK image, only Armbian, so I will try this one .

Still, that image looks strange to me since ROOTFS is empty ...

 

EDIT: With the Armbian boot.scr, it try to executed it and fail (because Armbian is looking for Image), and continuing with same earlier fail :

switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
3056 bytes read in 3 ms (994.1 KiB/s)
## Executing script at 08000000
26660 bytes read in 7 ms (3.6 MiB/s)
Bad Linux ARM64 Image magic!
SCRIPT FAILED: continuing...
26660 bytes read in 7 ms (3.6 MiB/s)
MMC Device 2 not found
no mmc device at slot 2

 

Posted

I'm not sure if it's relevant, but 26386440 looks rather large for an LE kernel .. we normally compress things:

LibreELEC (chewitt): 9.80.0 (AMLGX.arm)
SDCARD:~ # ls -l /flash/
total 106856
-rwxr-xr-x    1 root     root      10739122 Jan  1  1980 KERNEL
-rwxr-xr-x    1 root     root      98639872 Jan  1  1980 SYSTEM
drwxr-xr-x    2 root     root          8192 Jan 24 12:35 extlinux
-rwxr-xr-x    1 root     root         26926 Mar 16 18:26 meson-gxbb-wetek-play2.dtb

Current LE master nightly is here (different boot scripts to Oleg's images): https://test.libreelec.tv/LibreELEC-AMLGX.arm-9.80-nightly-20200324-aeb6e84-nanopi-k2.img.gz

Posted
  On 3/25/2020 at 2:38 PM, martinayotte said:

I don't have any RK image, only Armbian, so I will try this one .

Still, that image looks strange to me since ROOTFS is empty ...

 

EDIT: With the Armbian boot.scr, it try to executed it and fail (because Armbian is looking for Image), and continuing with same earlier fail :

Expand  

Everything is correct, LE uses a different startup scheme ( a set of core files, etc. ), so the Armbian version of the script will not be able to run LE fully . For me, the important result is that the reason why LE can 't run yet is the absence of the necessary file in the image (this is my error, I didn 't check the finished image for components). Tomorrow there will be a fixed version and it should be correct (automatically starts).  :)

 

 

P.S. in the same directory on the site there are images marked for rk3399, they have the necessary script (boot.scr).

 

Posted
  On 3/25/2020 at 3:08 PM, chewitt said:

I'm not sure if it's relevant, but 26386440 looks rather large for an LE kernel .. we normally compress things:

Expand  

That 's right, I'm using a universal core that is the same for all versions of RK+AW+AML, so it is larger than the AML-only version . By the way, in the near future I plan to release a universal Le image for three platforms at once (which use LIMA+Panfrost). I've already checked, they work fine from USB media or from an SD card, when adding the correct u-boot (just like it now works with Armbian).

Posted
  On 3/25/2020 at 3:14 PM, balbes150 said:

P.S. in the same directory on the site there are images marked for rk3399, they have the necessary script (boot.scr).

Expand  

Ok ! I've downloaded RK3399, copied its boot.scr and placed it on the SD, it got a bit further : there was a reboot in the middle of the process, then it booted in some kind of emergency mode without login prompt.

  Reveal hidden contents

 

And here is the "dmesg" :

 

  Reveal hidden contents

Posted
  On 3/25/2020 at 3:57 PM, martinayotte said:

Ok ! I've downloaded RK3399, copied its boot.scr and placed it on the SD, it got a bit further : there was a reboot in the middle of the process, then it booted in some kind of emergency mode without login prompt.

Expand  

I can make mistakes, but this behavior usually happens when there is a problem with the media. It is advisable to perform a clean check, write the LE image for K2, and immediately (before use) add the script (boot.scr) to the SD card. And then try launching it. The system should automatically expand the second partition at the first start and restart automatically, after which the KODI interface with the primary configuration wizard should start.

 

 

PS is the monitor connected to HDMI ? It is necessary for the correct launch.

Posted
  On 3/25/2020 at 4:13 PM, balbes150 said:

The system should automatically expand the second partition at the first start and restart automatically, after which the KODI interface with the primary configuration wizard should start.

 

PS is the monitor connected to HDMI ? It is necessary for the correct launch.

Expand  

Ah ! Ok ! I didn't have HDMI connected, so it wasn't emergency mode, but plain console on Serial without login prompt ...

 

EDIT: Right ! The KODI interface is there and working, at least the few setups I've done ...

Posted
  On 3/25/2020 at 4:50 PM, martinayotte said:

Ah ! Ok ! I didn't have HDMI connected, so it wasn't emergency mode, but plain console on Serial without login prompt ...

 

EDIT: Right ! The KODI interface is there and working, at least the few setups I've done ...

Expand  

I fixed the images (added a startup script). It is interesting to check how it will work on K2. Images are located at this link in the folder with the last date.  :)

 

https://yadi.sk/d/8vNYuuxynz1L0w

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.

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines