Other OS

OpenBSD 5.5

6 6090
nnn2  
Post Last Edited by nnn2 at 2014-7-16 03:49

Hi. I'm trying to boot OpenBSD and I feel I'm on the right track, but something's still off.
Using http://ftp.openbsd.org/pub/OpenBSD/snapshots/armv7/ :

My uENV.txt:

  1. bootargs=console=ttyS0,115200 console=tty0 disp.screen0_output_mode=EDID:1280x720p50 hdmi.audio=EDID:0 console=tty1 root=/dev/mmcblk0p3
  2. aload_script=fatload mmc 0 0x43000000 bananapi/script.bin;
  3. mmcboot=mmc rescan ; fatload mmc 0 0x48000000 bsd.umg && bootm 0x48000000;
  4. uenvcmd=run mmcboot;
Copy the Code



Using the downloaded bsd.SUNXI.umg as bsd.umg; base55.tgz is extracted on the 3rd partition of the card (mmcblk0p3)

I either get panics:

  1. sxie0 at sunxi0, address 02:53:03:01:9b:55ukphy0 at sxie0 phy 0: Generic IEEE 802.3u media interface, rev. 5: OUI 0x000731ukphy1 at sxie0 phy 1: Generic IEEE 802.3u media interface, rev. 5: OUI 0x000731ahci0 at sunxi0 AHCI 1.1pmap_fault_fixup: va c5590000 ftype 2 s pte 7ff9001epanic: uvm_fault: fault on non-pageable map (0xc0afaf60, 0xc5590000)Stopped at      Debugger+0x4:   ldrb    r15, [r15, r15, ror r15]!
Copy the Code


or it boots a bit more and just freezes, either after this:

  1. uhub0 at usb0 "Allwinner EHCI root hub" rev 2.00/1.00 addr 1ehci1 at sunxi0usb1 at ehci1: USB revision 2.0uhub1 at usb1 "Allwinner EHCI root hub" rev 2.00/1.00 addr 1
Copy the Code


or this:

  1. gpio0 at sxipio0: 18 pinsgpio1 at sxipio0: 24 pinsgpio2 at sxipio0: 25 pinsgpio3 at sxipio0: 28 pinsgpio4 at sxipio0: 12 pinsgpio5 at sxipio0: 6 pinsgpio6 at sxipio0: 12 pinsgpio7 at sxipio0: 28 pinsgpio8 at sxipio0: 22 pins
Copy the Code


The full log looks like http://pastebay.com/1466100

Any tips would be helpful .. maybe I have something wrong with uENV.txt params? Or my script.bin (stock from raspbian)? I also tried without the script.bin, got panic as well
TooMeeK  
Post Last Edited by TooMeeK at 2014-8-11 23:37

Erm.. well..
Why there is LOADADDR 40800000, shouldn't be 40008000?
also, what's that? spl: not an uImage at 1600
Don't know BSD so well.. I would like also port FreeBSD kernel for Banana.. don't even know where to start
EDIT:
I'll report progress in new thread.

kvsari  
Edited by kvsari at Tue Mar 24, 2015 06:37

Hi, I'm also trying to get OpenBSD to run on the BananaPro.  The board is fine as I can get the archlinux image working.

I followed the instructions at http://wiki.lemaker.org/Building ... in_and_linux-kernel I used bsd.SUNXI.umg (fromhttp://ftp.openbsd.org/pub/OpenBSD/snapshots/armv7/) as uImage.

Here is my uEnv.txt;
  1. aload_script=fatload mmc 0 0x43000000 /script.bin;
  2. aload_kernel=fatload mmc 0 0x48000000 /uImage;bootm 0x48000000;
  3. uenvcmd=run aload_script aload_kernel
  4. bootargs=console=ttyS0,115200 consoleblank=0 console=tty0 disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0 root=/dev/mmcblk0p2 rootfstype=ext2 elevator=deadline rootwait
Copy the Code
The u-boot-sunxi-with-spl.bin works as I tested dd'ing it onto the working arch microSD image. The script.bin also works since I replaced the arch image's script.bin file with the one I generated. The arch image still loads up fine. Yet the microSD with the OpenBSD doesn't even bring up a console or kernel panic. Just a blank screen.

Doing a "file uImage" from the arch image gives;
  1. uImage: u-boot legacy uImage, Linux-3.4.103, Linux/ARM, OS Kernel Image (Not compressed), 4822880 bytes, Thu Dec 18 13:56:02 2014, Load Address: 0x40008000, Entry Point: 0x40008000, Header CRC: 0xEF37B6C3, Data CRC: 0x7F6B86A3
Copy the Code
Doing a file bsd.SUNXI.umg gives;
  1. bsd.SUNXI.umg: u-boot legacy uImage, boot, Linux/ARM, OS Kernel Image (Not compressed), 3743544 bytes, Sat Mar 21 20:19:23 2015, Load Address: 0x40800000, Entry Point: 0x40800000, Header CRC: 0xCB82EEE0, Data CRC: 0xA4E862ED
Copy the Code
Basically, the green light comes on and stays on instead of blinking like when it loads arch. I don't get any other info than that.

Is this something to do with the load addresses? Does anyone have any ideas? How can I get more information about where it's failing? I'll continue trying to figure this out and post any progress.

kvsari  
Edited by kvsari at Wed Mar 25, 2015 07:22

Hello,

I got myself a PL2303 and I can now see whats going on.

The OpenBSD kernel freezes at gpio8.
  1. OpenBSD/sunxi booting ...
  2. arg0 0x0 arg1 0x10bb arg2 0x40000100
  3. atag core flags 0 pagesize 0 rootdev 0
  4. atag cmdline [hda0:/bsd.SUNXI.umg set ]
  5. atag mem start 0x40000000 size 0x40000000
  6. bootfile: hda0:/bsd.SUNXI.umg
  7. bootargs: set
  8. memory size derived from u-boot
  9. bootconf.mem[0].address = 40000000 pages 262144/0x40000000
  10. Allocating page tables
  11. freestart = 0x40b92000, free_pages = 259182 (0x0003f46e)
  12. IRQ stack: p0x40bc0000 v0xc0bc0000
  13. ABT stack: p0x40bc1000 v0xc0bc1000
  14. UND stack: p0x40bc2000 v0xc0bc2000
  15. SVC stack: p0x40bc3000 v0xc0bc3000
  16. Creating L1 page table at 0x40b94000
  17. Mapping kernel
  18. Constructing L2 page tables
  19. undefined page pmap [ using 301744 bytes of bsd ELF symbol table ]
  20. Copyright (c) 1982, 1986, 1989, 1991, 1993
  21.         The Regents of the University of California.  All rights reserved.
  22. Copyright (c) 1995-2015 OpenBSD. All rights reserved.  http://www.OpenBSD.org

  23. OpenBSD 5.7-current (GENERIC-SUNXI) #14: Sat Mar 21 22:18:05 AEDT 2015
  24.     jsg@armv7.jsg.id.au:/usr/src/sys/arch/armv7/compile/GENERIC-SUNXI
  25. real mem  = 1073741824 (1024MB)
  26. avail mem = 1039736832 (991MB)
  27. warning: no entropy supplied by boot loader
  28. mainbus0 at root
  29. cortex0 at mainbus0
  30. ampintc0 at cortex0 nirq 160
  31. cpu0 at mainbus0: ARM Cortex A7 rev 4 (ARMv7 core)
  32. cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
  33. cpu0: 32KB(32b/l,2way) I-cache, 32KB(64b/l,4way) wr-back D-cache
  34. sunxi0 at mainbus0: A20
  35. sxipio0 at sunxi0
  36. sxiccmu0 at sunxi0
  37. sxitimer0 at sunxi0: ticktimer 100hz @ 32KHz
  38. sxitimer1 at sunxi0: stattimer 128hz @ 32KHz
  39. sxitimer2 at sunxi0: cntrtimer @ 32KHz
  40. sxidog0 at sunxi0
  41. sxirtc0 at sunxi0
  42. sxiuart0 at sunxi0: console
  43. sxiuart1 at sunxi0
  44. sxiuart2 at sunxi0
  45. sxiuart3 at sunxi0
  46. sxiuart4 at sunxi0
  47. sxiuart5 at sunxi0
  48. sxiuart6 at sunxi0
  49. sxiuart7 at sunxi0
  50. sxie0 at sunxi0, address 02:c2:02:41:5b:f7
  51. rgephy0 at sxie0 phy 0: RTL8169S/8110S PHY, rev. 5
  52. rgephy1 at sxie0 phy 1: RTL8169S/8110S PHY, rev. 5
  53. ahci0 at sunxi0 AHCI 1.1
  54. scsibus0 at ahci0: 32 targets
  55. ehci0 at sunxi0
  56. usb0 at ehci0: USB revision 2.0
  57. uhub0 at usb0 "Allwinner EHCI root hub" rev 2.00/1.00 addr 1
  58. ehci1 at sunxi0
  59. usb1 at ehci1: USB revision 2.0
  60. uhub1 at usb1 "Allwinner EHCI root hub" rev 2.00/1.00 addr 1
  61. gpio0 at sxipio0: 18 pins
  62. gpio1 at sxipio0: 24 pins
  63. gpio2 at sxipio0: 25 pins
  64. gpio3 at sxipio0: 28 pins
  65. gpio4 at sxipio0: 12 pins
  66. gpio5 at sxipio0: 6 pins
  67. gpio6 at sxipio0: 12 pins
  68. gpio7 at sxipio0: 28 pins
  69. gpio8 at sxipio0: 22 pins
Copy the Code
I've tried changing the boot paramaters to fit in with the OpenBSD boot params instead of the linux ones. I want to enter user kernel config with the -c option. My idea is to switch off certain hardware drivers etc so as to see how far I can get. When I do add -c it gives me a command line but my input isn't read. Am I setting the tty wrong?

kvsari  
Edited by kvsari at Sun Apr 5, 2015 07:57

Hi Guys, did some digging around and received some nice help.

Apparently this thread here goes into some further detail.

My attempt to fix the problem was to the enter UKC mode and get at the kernels hardware detection and utilization. Problem is that the serial console stops.

Does anyone know whether the script.bin file is used at all by the OpenBSD kernel? The NetBSD kernel has a kernel parameter called sysconfig where you can set sysconfig=0x43000000 at boot. I've stripped USB from the script.bin but to no avail. The kernel still hangs at usb1.
  1. Environment size: 2155/131068 bytes
  2. sun7i# bootm 0x48000000
  3. ## Booting kernel from Legacy Image at 48000000 ...
  4.    Image Name:   boot
  5.    Image Type:   ARM Linux Kernel Image (uncompressed)
  6.    Data Size:    7128100 Bytes = 6.8 MiB
  7.    Load Address: 40800000
  8.    Entry Point:  40800000
  9.    Verifying Checksum ... OK
  10.    Loading Kernel Image ... OK

  11. Starting kernel ...


  12. OpenBSD/sunxi booting ...
  13. arg0 0x0 arg1 0x10bb arg2 0x40000100
  14. atag core flags 0 pagesize 0 rootdev 0
  15. atag cmdline [sd0a:/bsd sysconfig=0x43000000]
  16. atag mem start 0x40000000 size 0x40000000
  17. bootfile: sd0a:/bsd
  18. bootargs: sysconfig=0x43000000
  19. memory size derived from u-boot
  20. bootconf.mem[0].address = 40000000 pages 262144/0x40000000
  21. Allocating page tables
  22. freestart = 0x40ecd000, free_pages = 258355 (0x0003f133)
  23. IRQ stack: p0x40efb000 v0xc0efb000
  24. ABT stack: p0x40efc000 v0xc0efc000
  25. UND stack: p0x40efd000 v0xc0efd000
  26. SVC stack: p0x40efe000 v0xc0efe000
  27. Creating L1 page table at 0x40ed0000
  28. Mapping kernel
  29. Constructing L2 page tables
  30. undefined page pmap Copyright (c) 1982, 1986, 1989, 1991, 1993
  31.         The Regents of the University of California.  All rights reserved.
  32. Copyright (c) 1995-2015 OpenBSD. All rights reserved.  http://www.OpenBSD.org

  33. OpenBSD 5.7-current (RAMDISK-SUNXI) #11: Tue Mar 31 18:06:08 AEDT 2015
  34.     jsg@armv7.jsg.id.au:/usr/src/sys/arch/armv7/compile/RAMDISK-SUNXI
  35. real mem  = 1073741824 (1024MB)
  36. avail mem = 1036423168 (988MB)
  37. mainbus0 at root
  38. cortex0 at mainbus0
  39. ampintc0 at cortex0 nirq 160
  40. cpu0 at mainbus0: ARM Cortex A7 rev 4 (ARMv7 core)
  41. cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
  42. cpu0: 32KB(32b/l,2way) I-cache, 32KB(64b/l,4way) wr-back D-cache
  43. sunxi0 at mainbus0: A20
  44. sxipio0 at sunxi0
  45. sxiccmu0 at sunxi0
  46. sxitimer0 at sunxi0: ticktimer 100hz @ 32KHz
  47. sxitimer1 at sunxi0: stattimer 128hz @ 32KHz
  48. sxitimer2 at sunxi0: cntrtimer @ 32KHz
  49. sxidog0 at sunxi0
  50. sxirtc0 at sunxi0
  51. sxiuart0 at sunxi0: console
  52. sxiuart1 at sunxi0
  53. sxiuart2 at sunxi0
  54. sxiuart3 at sunxi0
  55. sxiuart4 at sunxi0
  56. sxiuart5 at sunxi0
  57. sxiuart6 at sunxi0
  58. sxiuart7 at sunxi0
  59. sxie0 at sunxi0, address 02:c2:02:41:5b:f7
  60. rgephy0 at sxie0 phy 0: RTL8169S/8110S PHY, rev. 5
  61. rgephy1 at sxie0 phy 1: RTL8169S/8110S PHY, rev. 5
  62. ahci0 at sunxi0 AHCI 1.1
  63. scsibus0 at ahci0: 32 targets
  64. ehci0 at sunxi0
  65. usb0 at ehci0: USB revision 2.0
  66. uhub0 at usb0 "Allwinner EHCI root hub" rev 2.00/1.00 addr 1
  67. ehci1 at sunxi0
  68. usb1 at ehci1: USB revision 2.0
  69. uhub1 at usb1 "Allwinner EHCI root hub" rev 2.00/1.00 addr 1
Copy the Code
And when running in UKC mode (-c kernel arg) it hangs at UKC.
  1. Environment size: 2113/131068 bytes
  2. sun7i# setenv bootargs sd0i:/bsd -c
  3. sun7i# bootm 0x48000000
  4. ## Booting kernel from Legacy Image at 48000000 ...
  5.    Image Name:   boot
  6.    Image Type:   ARM Linux Kernel Image (uncompressed)
  7.    Data Size:    7128100 Bytes = 6.8 MiB
  8.    Load Address: 40800000
  9.    Entry Point:  40800000
  10.    Verifying Checksum ... OK
  11.    Loading Kernel Image ... OK

  12. Starting kernel ...


  13. OpenBSD/sunxi booting ...
  14. arg0 0x0 arg1 0x10bb arg2 0x40000100
  15. atag core flags 0 pagesize 0 rootdev 0
  16. atag cmdline [sd0i:/bsd -c]
  17. atag mem start 0x40000000 size 0x40000000
  18. bootfile: sd0i:/bsd
  19. bootargs: -c
  20. memory size derived from u-boot
  21. bootconf.mem[0].address = 40000000 pages 262144/0x40000000
  22. Allocating page tables
  23. freestart = 0x40ecd000, free_pages = 258355 (0x0003f133)
  24. IRQ stack: p0x40efb000 v0xc0efb000
  25. ABT stack: p0x40efc000 v0xc0efc000
  26. UND stack: p0x40efd000 v0xc0efd000
  27. SVC stack: p0x40efe000 v0xc0efe000
  28. Creating L1 page table at 0x40ed0000
  29. Mapping kernel
  30. Constructing L2 page tables
  31. undefined page pmap Copyright (c) 1982, 1986, 1989, 1991, 1993
  32.         The Regents of the University of California.  All rights reserved.
  33. Copyright (c) 1995-2015 OpenBSD. All rights reserved.  http://www.OpenBSD.org

  34. User Kernel Config
  35. UKC>
Copy the Code

Why don't you post these concerns on the OpenBSD's arm@ mailing list? It's where there are a higher probability to find other OpenBSD users and (of course) the developers.

TooMeeK  
I think You're missing bootloader options. Kernel seems to be booting however.
Shoudln't You review http://www.openbsd.org/faq/faq5.html at section 5.9?

You have to log in before you can reply Login | Sign Up

Points Rules