On Sun, Aug 25, 2013 at 03:27:03PM +0200, Stefan Sperling wrote: > On Sun, Aug 25, 2013 at 01:38:00PM +0200, Patrick Wildt wrote: > > mkuboot was recently changed to be able to handle "bsd" files directly. > > If you're still on an older mkuboot, it's possible that you need to do > > objcopy before, so you can get it out of it's (iirc) ELF container. > > I'm using mkuboot which comes with the snapshot from Aug 17. > The change you're referring to was made on July 28.
But indeed, using objcopy and then mkuboot allowed me to boot my self-compiled kernel. Thanks! A freshly compiled mkuboot from -current sources works fine without the objcopy step. I wonder why it didn't work out of the box, though. Perhaps the Aug 17 snapshot was built from outdated sources? # objcopy -O binary /bsd bsd.img # mkuboot -a arm -o linux -e 0x80300000 -l 0x80300000 bsd.img bsd.umg # cp bsd.umg /mnt/bsd.umg # ls -l /mnt total 6476 -rwxr-xr-x 1 root wheel 2831184 Aug 14 21:30 bsd.umg -rwxr-xr-x 1 root wheel 99904 Aug 25 01:06 mlo -rwxr-xr-x 1 root wheel 378900 Aug 25 01:06 u-boot.img -rwxr-xr-x 1 root wheel 151 Aug 25 01:06 uenv.txt # reboot boot: howto=00000000 curproc=0xc9341304 syncing disks... done rebooting... U-Boot SPL 2013.04-rc1-14237-g90639fe-dirty (Apr 13 2013 - 13:57:11) musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn) musb-hdrc: MHDRC RTL version 2.0 musb-hdrc: setup fifo_mode 4 musb-hdrc: 28/31 max ep, 16384/16384 memory USB Peripheral mode controller at 47401000 using PIO, IRQ 0 musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn) musb-hdrc: MHDRC RTL version 2.0 musb-hdrc: setup fifo_mode 4 musb-hdrc: 28/31 max ep, 16384/16384 memory USB Host mode controller at 47401800 using PIO, IRQ 0 OMAP SD/MMC: 0 mmc_send_cmd : timeout: No status update reading u-boot.img reading u-boot.img U-Boot 2013.04-rc1-14237-g90639fe-dirty (Apr 13 2013 - 13:57:11) I2C: ready DRAM: 512 MiB WARNING: Caches not enabled NAND: No NAND device found!!! 0 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 *** Warning - readenv() failed, using default environment musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn) musb-hdrc: MHDRC RTL version 2.0 musb-hdrc: setup fifo_mode 4 musb-hdrc: 28/31 max ep, 16384/16384 memory USB Peripheral mode controller at 47401000 using PIO, IRQ 0 musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn) musb-hdrc: MHDRC RTL version 2.0 musb-hdrc: setup fifo_mode 4 musb-hdrc: 28/31 max ep, 16384/16384 memory USB Host mode controller at 47401800 using PIO, IRQ 0 Net: <ethaddr> not set. Validating first E-fuse MAC cpsw, usb_ether Hit any key to stop autoboot: 0 gpio: pin 53 (gpio 53) value is 1 mmc0 is current device micro SD card found mmc0 is current device gpio: pin 54 (gpio 54) value is 1 SD/MMC found on device 0 reading uEnv.txt 151 bytes read in 4 ms (36.1 KiB/s) Loaded environment from uEnv.txt Importing environment from mmc ... Running uenvcmd ... reading bsd.umg 2831184 bytes read in 330 ms (8.2 MiB/s) ## Booting kernel from Legacy Image at 82800000 ... Image Name: boot Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2831120 Bytes = 2.7 MiB Load Address: 80300000 Entry Point: 80300000 Verifying Checksum ... OK Loading Kernel Image ... OK OK Starting kernel ... OpenBSD/beagle booting ... arg0 0x0 arg1 0xe05 arg2 0x80000100 atag core flags 0 pagesize 0 rootdev 0 atag cmdline [sd0i:/bsd.umg] atag mem start 0x80000000 size 0x20000000 bootfile: sd0i:/bsd.umg bootargs: memory size derived from u-boot bootconf.mem[0].address = 80000000 pages 131072/0x20000000 Allocating page tables freestart = 0x8062a000, free_pages = 129494 (0x0001f9d6) IRQ stack: p0x80658000 v0xc0658000 ABT stack: p0x80659000 v0xc0659000 UND stack: p0x8065a000 v0xc065a000 SVC stack: p0x8065b000 v0xc065b000 Creating L1 page table at 0x8062c000 Mapping kernel Constructing L2 page tables undefined page pmap [ no symbol table formats found ] board type: beaglebone Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2013 OpenBSD. All rights reserved. http://www.OpenBSD.org OpenBSD 5.4-current (GENERIC) #0: Sun Aug 25 13:04:15 CEST 2013 s...@jessup.stsp.name:/usr/src/sys/arch/beagle/compile/GENERIC