Closed danielkucera closed 1 year ago
I was able to boot it after changing:
# setenv loadaddr "0x44000000"
setenv loadaddr 0x01080000
this is my env print:
U-Boot 2021.04-00056-g13ac02db31-dirty (Apr 28 2021 - 22:52:02 +0800) p212
Model: Amlogic Meson GXL (S905X) P212 Development Board
SoC: Amlogic Meson GXL (S905X) Revision 21:c (84:2)
DRAM: 1 GiB
MMC: mmc@70000: 0, mmc@72000: 1, mmc@74000: 2
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial
[BL31]: tee size: 0
[BL31]: tee size: 0
Net: eth0: ethernet@c9410000
Hit any key to stop autoboot: 0
=> env print
arch=arm
baudrate=115200
board=p212
board_name=p212
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=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} ${fdtcont
roladdr};fi
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_source=emmc
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=romusb usb0 mmc0 mmc1 mmc2 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=setenv devtype dhcp; run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_ar
ch ${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=run boot_net_usb_start; 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
bootcmd_usb0=devnum=0; run usb_boot
bootdelay=2
cpu=armv8
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
ethaddr=fa:93:f9:84:06:9a
fdt_addr_r=0x08008000
fdtcontroladdr=3df4e8c0
fdtfile=amlogic/meson-gxl-s905x-p212.dtb
fdtoverlay_addr_r=0x01000000
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} bootfs
type; 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;run boot_efi_bootm
gr;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 FAIL
ED: continuing...; fi; done
scriptaddr=0x08000000
soc=meson
stderr=serial
stdin=serial
stdout=serial
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
vendor=amlogic
Environment size: 3886/8188 bytes
=>
The installation seemed to work:
root@armbian:~# armbian-install
[ STEPS ] Installing Armbian to internal eMMC...
[ STEPS ] Checking dependencies...
[ INFO ] Dependency check completed. Proceeding installation...
[ STEPS ] Initializing the environment...
[ INFO ] Use mainline u-boot: [ no ]
[ INFO ] Using ampart tool: [ yes ]
[ INFO ] Show all lists: [ no ]
[ INFO ] Internal eMMC : [ /dev/mmcblk2 ]
[ STEPS ] Start selecting device...
--------------------------------------------------------------------------------------
ID SOC MODEL DTB
--------------------------------------------------------------------------------------
101 s905d Phicomm-N1 meson-gxl-s905d-phicomm-n1.dtb
102 s905d Phicomm-N1(DMA-thresh) meson-gxl-s905d-phicomm-n1-thresh.dtb
103 s905d MECOOL-KI-Pro meson-gxl-s905d-mecool-ki-pro.dtb
104 s905d SML-5442TW meson-gxl-s905d-sml5442tw.dtb
105 s905x HG680P meson-gxl-s905x-p212.dtb
106 s905x B860H meson-gxl-s905x-b860h.dtb
107 s905x TX9 meson-gxl-s905x-tx9.dtb
108 s905x T95,XiaoMI-3S,X96 meson-gxl-s905x-p212.dtb
109 s905x TBee meson-gxl-s905x-tbee.dtb
110 s905w TX3-Mini meson-gxl-s905w-tx3-mini.dtb
--------------------------------------------------------------------------------------
111 s905w W95 meson-gxl-s905w-p281.dtb
112 s905w X96-Mini meson-gxl-s905w-x96-mini.dtb
113 s905w X96W,FunTV,MXQ-Pro-4K meson-gxl-s905w-x96w.dtb
114 s905l2 MGV2000,MGV3000,M301A meson-gxl-s905l2-x7-5g.dtb
115 s905l2 E900v21E meson-gxl-s905l2-x7-5g.dtb
116 s905l2 Wojia-TV-IPBS9505 meson-gxl-s905l2-ipbs9505.dtb
117 s905l3 CM311-1,HG680-LC,M401A,UNT402A meson-gxl-s905l2-x7-5g.dtb
118 s905l3 UNT400G1 meson-gxl-s905l2-x7-5g.dtb
119 s905l3 CM211-1 meson-gxl-s905l3b-m302a.dtb
120 s905l3b E900V22D,TY1608 meson-gxl-s905l2-x7-5g.dtb
--------------------------------------------------------------------------------------
121 s905l3b E900V21E,E900V22E meson-gxl-s905l3b-e900v22e.dtb
122 s905l3b M302A,M304A,CM211-1,CM311-1 meson-gxl-s905l3b-m302a.dtb
123 s905l3b IP103H,TY1608,ZXV10-BV310 meson-gxl-s905l3b-m302a.dtb
124 s905lb BesTV-R3300L,SumaVision-Q7,MG101 meson-gxl-s905x-p212.dtb
125 s905lb Q96-mini meson-gxl-s905x-p212.dtb
126 s905l UNT402A,M201-S meson-gxl-s905l3b-m302a.dtb
0 Other Customize Enter-custom-dtb-name
--------------------------------------------------------------------------------------
[ OPTIONS ] Please Input ID: 108
[ INFO ] Input Box ID: [ 108 ]
[ INFO ] Model Name: [ T95,XiaoMI-3S,X96 ]
[ INFO ] FDTFILE: [ meson-gxl-s905x-p212.dtb ]
[ INFO ] MAINLINE_UBOOT: [ ]
[ INFO ] BOOTLOADER_IMG: [ ]
[ INFO ] UBOOT_OVERLOAD: [ u-boot-s905x-s912.bin ]
[ INFO ] NEED_OVERLOAD: [ yes ]
[ STEPS ] Which type of filesystem do you want for your root?
-----------------------------------------------
ID TYPE
-----------------------------------------------
1 ext4
2 btrfs
-----------------------------------------------
[ OPTIONS ] Please Input ID (1/2): 1
[ INFO ] Input Type ID: [ 1 ]
[ INFO ] Type of filesystem: [ ext4 ]
[ STEPS ] Partitioning eMMC...
[ INFO ] Start backing up the default bootloader.
4+0 records in
4+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.546488 s, 7.7 MB/s
[ STEPS ] Successfully partitioned internal eMMC with amaprt.
[ INFO ] Start create MBR and partittion.
[ INFO ] 03. Write the mybox bootloader: [ /usr/lib/u-boot/mybox-bootloader.img ]
444+0 records in
444+0 records out
444 bytes copied, 0.00421042 s, 105 kB/s
8191+0 records in
8191+0 records out
4193792 bytes (4.2 MB, 4.0 MiB) copied, 0.345492 s, 12.1 MB/s
[ STEPS ] Processing BOOTFS partition...
[ INFO ] Formatting BOOTFS partition...
mkfs.fat 4.2 (2021-01-31)
mount: (hint) your fstab has been modified, but systemd still uses
the old version; use 'systemctl daemon-reload' to reload.
[ INFO ] Copying BOOTFS ...
[ INFO ] Update the [ uEnv.txt ] file.
[ INFO ] Copy [ u-boot-s905x-s912.bin ] to u-boot.emmc
[ STEPS ] Start processing the rootfs partition...
[ INFO ] Formatting ROOTFS ...
mount: (hint) your fstab has been modified, but systemd still uses
the old version; use 'systemctl daemon-reload' to reload.
[ INFO ] Copying ROOTFS ...
[ INFO ] Copying [ etc ] ...
[ INFO ] Copying [ home ] ...
[ INFO ] Copying [ lib64 ] ...
[ INFO ] Copying [ opt ] ...
[ INFO ] Copying [ root ] ...
[ INFO ] Copying [ selinux ] ...
[ INFO ] Copying [ srv ] ...
[ INFO ] Copying [ usr ] ...
[ INFO ] Copying [ var ] ...
[ INFO ] Generate the new fstab file.
[ INFO ] Update the relevant parameters.
[ SUCCESS ] Installation successful. Run [ poweroff ], remove the installation media then re-insert the power supply to boot new system.
but it doesn't boot from eMMC, only from the inserted USB:
U-Boot 2021.04-00056-g13ac02db31-dirty (Apr 28 2021 - 22:52:02 +0800) p212
Model: Amlogic Meson GXL (S905X) P212 Development Board
SoC: Amlogic Meson GXL (S905X) Revision 21:c (84:2)
DRAM: 1 GiB
MMC: mmc@70000: 0, mmc@72000: 1, mmc@74000: 2
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial
[BL31]: tee size: 0
[BL31]: tee size: 0
Net: eth0: ethernet@c9410000
Hit any key to stop autoboot: 0
starting USB...
Bus usb@c9000000: dwc3_meson_gxl_get_phys: usb2 ports: 2
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@c9000000 for devices... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc2 is current device
** No partition table - mmc 2 **
ethernet@c9410000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Yes, I was able to modify it and boot from sdcard. Then I installed the system to internal emmc but it is not booting from it:
** No partition table - mmc 2 **
Looking at the documentation, it is invalid to modify this file. This is a source file and needs to be compiled. Moreover, usb and emmc use unused files. If they are written into emmc, both files must be compiled and updated.
Let me recap again.
The first error was:
** Reading file would overwrite reserved memory **
This I have fixed by changing boot.cmd by setting setenv loadaddr 0x01080000
and recompiling boot.scr.
After this, the box booted both from sdcard or USB stick.
Then I wanted to install armbian to eMMC. So I run armbian-install but it doesn't work and when booting from emmc the error is shown:
** No partition table - mmc 2 **
Do you have an idea how to fix this one?
boot-emmc.cmd/src
This seems to be describing the issue but I don't have time to fix it as it is too deep. I'll continue running from SD card which works fine.
Device Information | 设备信息
Armbian Version | 系统版本
Describe the bug | 问题描述 Hi, I am having a bootloop when trying to run the image
:
My question is - is the override of
loadaddr
necessary in boot.scr? https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/armbian-files/platform-files/amlogic/bootfs/boot.cmd#L3