On Thu, May 26, 2016 at 12:34:54AM +0200, Mattieu Baptiste wrote:
> Hi,
> 
> I freshly installed the latest snapshot (may 25) on a BeagleBone Black.
> The install process works flawlessly but it refuses to load the kernel
> at first boot:
> 
> # halt -p
> syncing disks... done
> 
> Attempting to power down...
> The operating system has halted.
> Please press any key to reboot.
> 
> rebooting...
> 
> U-Boot SPL 2016.05 (May 17 2016 - 17:11:59)
> Trying to boot from MMC1
> Card doesn't support part_switch
> MMC partition switch failed
> *** Warning - MMC partition switch failed, using default environment
> 
> reading u-boot.img
> reading u-boot.img
> 
> 
> U-Boot 2016.05 (May 17 2016 - 17:11:59 +1000)
> 
> Watchdog enabled
> I2C:   ready
> DRAM:  512 MiB
> MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
> *** Warning - bad CRC, using default environment
> 
> Net:   <ethaddr> not set. Validating first E-fuse MAC
> cpsw, usb_ether
> Press SPACE to abort autoboot in 2 seconds
> switch to partitions #0, OK
> mmc0 is current device
> SD/MMC found on device 0
> reading boot.scr
> ** Unable to read file boot.scr **
> reading uEnv.txt
> ** Unable to read file uEnv.txt **
> switch to partitions #0, OK
> mmc0 is current device
> Scanning mmc 0:1...
> reading /am335x-boneblack.dtb
> 32577 bytes read in 8 ms (3.9 MiB/s)
> Found EFI removable media binary efi/boot/bootarm.efi
> reading efi/boot/bootarm.efi
> 65556 bytes read in 12 ms (5.2 MiB/s)
> ## Starting EFI application at 0x82000000 ...
> Scanning disks on usb...
> Scanning disks on mmc...
> MMC Device 2 not found
> MMC Device 3 not found
> Found 2 disks
> >> OpenBSD/armv7 BOOTARM 0.1
> boot>
> booting sd0a:/bsd: 3691740data abort
> pc : [<9df293f4>]          lr : [<9df2c8e4>]
> reloc pc : [<7e7d23f4>]    lr : [<7e7d58e4>]
> sp : 9ef35db8  ip : 00000000     fp : 9ef35df0
> r10: 9df3382c  r9 : 9ef35dc0     r8 : 00000000
> r7 : 003854dc  r6 : 10300000     r5 : 9de25010  r4 : 00003000
> r3 : 00000000  r2 : 00003000     r1 : 9de280e0  r0 : 10300000
> Flags: nzCv  IRQs off  FIQs on  Mode SVC_32
> Resetting CPU ...
> 
> resetting ...

It seems efiboot may need some tweaks to deal with the memory map
of non imx systems:

bbb
DRAM bank   = 0x00000000
-> start    = 0x80000000
-> size     = 0x20000000
TLB addr    = 0x9FFF0000
relocaddr   = 0x9FF57000
reloc off   = 0x1F757000
irq_sp      = 0x9EF36EC0
sp start    = 0x9EF36EB0

loadaddr=0x82000000
kernel_addr_r=0x82000000
fdt_addr_r=0x88000000
ramdisk_addr_r=0x88080000

cubox
DRAM bank   = 0x00000000
-> start    = 0x10000000
-> size     = 0x80000000
TLB addr    = 0x8FFF0000
relocaddr   = 0x8FF64000
reloc off   = 0x78764000
irq_sp      = 0x8F563ED0
sp start    = 0x8F563EC0
FB base     = 0x8F568FE0

loadaddr=0x12000000
kernel_addr_r=0x12000000
fdt_addr_r=0x18000000
ramdisk_addr_r=0x13000000

efiboot looks for a free 32MB block of memory on a 256MB boundary
starting at 0x10000000

Changing it to start searching at 0x80000000 allows efiboot to work
on bbb but obviously isn't a proper fix.

I've put up a BOOTARM.EFI with this change at
http://jsg.id.au/openbsd/BOOTARM.EFI
SHA256 (BOOTARM.EFI) = 
539ba94277647e3b4ac518ea9941460d02ade4c9119c5e10ed3ff3b70e90429f

Copy that to efi/boot/bootarm.efi on the fat FS of your boot device.

Reply via email to