Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

BananaPi BPI-M4-Zero: Update U-Boot to v2024.10 #7514

Closed
wants to merge 2 commits into from

Conversation

pyavitz
Copy link
Collaborator

@pyavitz pyavitz commented Nov 24, 2024

BananaPi BPI-M4-ZERO

  • Update U-Boot from v2024.04 to v2024.10
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Signed-off-by: Patrick Yavitz <pyavitz@armbian.com>
@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Nov 24, 2024
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
@pyavitz
Copy link
Collaborator Author

pyavitz commented Nov 24, 2024

I know it works, as I've tested it on my own builds, but using Armbian I'm getting an error during the build process.

[🌱] artifact [ armbian-base-files :: armbian-base-files() ]
jq: error: syntax error, unexpected '/', expecting end of file (Unix shell quoting issues?) at <top-level>, line 1:
/home/patrick/build/armbian/.tmp/work-1fd2436d-a617-431f-8d5b-ad01b61fd45c/tmp.8Iz46ETA56
jq: 1 compile error
[🚸] Could not find package filename for 'base-files' in distro repo [ looking for base-files, found_package_filename is  ]
[🚸] Command failed, retrying in 15s [ apt_find_upstream_package_version_and_download_url base-files ]
jq: error: syntax error, unexpected '/', expecting end of file (Unix shell quoting issues?) at <top-level>, line 1:
/home/patrick/build/armbian/.tmp/work-1fd2436d-a617-431f-8d5b-ad01b61fd45c/tmp.WP7jRddEH2

It then spams for a whiles and dies.

@EvilOlaf
Copy link
Member

Hm base-files. There has been a change recently. Maybe related?
#7473

@igorpecovnik
Copy link
Member

JSON structure looks good: https://github.armbian.com/base-files.json

@pyavitz
Copy link
Collaborator Author

pyavitz commented Nov 24, 2024

False alarm? I rebooted the HOST and it's now building fine.

@igorpecovnik
Copy link
Member

OK, still interesting. This feature was just merged so perhaps we need to apply some hardening to prevent this happening in the future.

@pyavitz
Copy link
Collaborator Author

pyavitz commented Nov 24, 2024

Don't merge this. Its not booting using the Armbian img.

I'll touch base again after some testing.

@pyavitz
Copy link
Collaborator Author

pyavitz commented Nov 24, 2024

Don't merge this. Its not booting using the Armbian img.

I'll touch base again after some testing.

The original error above is happening again, not sure how this relates to the IMG not booting though? I ran another one of my IMGs to make sure it wasn't me and it's booting fine.

If and when I can get another Armbian IMG to complete, I'll report back on it.

I did notice this during the boot process

U-Boot SPL 2024.10-armbian-2024.10-Sf919-P7f68-Ha9af-V0782-Bda0a-R448a-dirty (Nov 24 2024 - 12:14:17 -0500)
DRAM: 2048 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.10.7(debug):armbian
NOTICE:  BL31: Built : 12:05:15, Nov 24 2024
NOTICE:  BL31: Detected Allwinner H616 SoC (1823)
NOTICE:  BL31: Found U-Boot DTB at 0x4a0af690, model: BananaPi BPI-M4-Zero
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
INFO:    PMIC: Probing AXP305 on RSB
ERROR:   RSB: set run-time address: 0x10003
INFO:    Could not init RSB: -65539
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for erratum 855873 was applied
INFO:    BL31: cortex_a53: CPU workaround for erratum 1530924 was applied
INFO:    PSCI: Suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9
INFO:    Changed devicetree.
ns16550_serial serial@5000000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19


U-Boot 2024.10-armbian-2024.10-Sf919-P7f68-Ha9af-V0782-Bda0a-R448a-dirty (Nov 24 2024 - 12:14:17 -0500) Allwinner Technology

CPU:   Allwinner H616 (SUN50I)
Model: BananaPi BPI-M4-Zero
DRAM:  2 GiB
Core:  67 devices, 22 uclasses, devicetree: separate
WDT:   Not starting watchdog@30090a0
MMC:   mmc@4020000: 0, mmc@4021000: 2, mmc@4022000: 1
Loading Environment from FAT... Unable to use mmc 0:1...
In:    serial@5000000
Out:   serial@5000000
Err:   serial@5000000
Allwinner mUSB OTG (Peripheral)
Net:   using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
eth0: usb_ether
starting USB...
Bus usb@5311000: USB EHCI 1.00
Bus usb@5311400: USB OHCI 1.0
scanning bus usb@5311000 for devices... 1 USB Device(s) found
scanning bus usb@5311400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
4549 bytes read in 2 ms (2.2 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
207 bytes read in 2 ms (100.6 KiB/s)
Unknown command ':' - try 'help'
36332 bytes read in 10 ms (3.5 MiB/s)
Working FDT set to 4fa00000
Failed to load '/boot/dtb/overlay/sun50i-h616-fixup.scr'
18006258 bytes read in 2907 ms (5.9 MiB/s)
23443464 bytes read in 3783 ms (5.9 MiB/s)
Moving Image from 0x40080000 to 0x40200000, end=418f0000
## Loading init Ramdisk from Legacy Image at 4ff00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    18006194 Bytes = 17.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
Working FDT set to 4fa00000
   Loading Ramdisk to 48ed3000, end 49fff0b2 ... OK
   Loading Device Tree to 0000000048e61000, end 0000000048ed2fff ... OK
Working FDT set to 48e61000

Starting kernel ...

This isn't right --> Unknown command ':' - try 'help'

Looks like the boot.cmd file is off. https://github.com/armbian/build/blob/main/config/bootscripts/boot-sun50i-next.cmd#L41

If you look further down the file it is using source in two places. I'm not 100% on this, but it doesn't look right to me.

@igorpecovnik
Copy link
Member

@The-going aim to improve scripts which nobody touched in ages.

I'm not 100% on this, but it doesn't look right to me.

Probably depends of the version of u-boot interpreter or some config switch?

@pyavitz
Copy link
Collaborator Author

pyavitz commented Nov 25, 2024

Something else is a-mis here. To play it safe, I'm closing this until further testing can be done.

@awinner1
Copy link

not sure this will be seen, but I think the issue is in the "jp" command, current one is:
found_package_filename=$(jq -r .[\"${package_download_release}\"].${ARCH} $package_info_download_url_file)
but if changed to:
found_package_filename=$(jq -r .\"${package_download_release}\".\"${ARCH}\" $package_info_download_url_file)

it seems to work more constantly.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/medium PR with more then 50 and less then 250 lines
Development

Successfully merging this pull request may close these issues.

4 participants