Bug 228285 - FreeBSD 11.2-BETA1 does not boot on BeagleBone Black
Summary: FreeBSD 11.2-BETA1 does not boot on BeagleBone Black
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 11.1-STABLE
Hardware: arm Any
: --- Affects Some People
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-16 02:40 UTC by Mike Karels
Modified: 2018-05-19 21:50 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Karels freebsd_committer freebsd_triage 2018-05-16 02:40:12 UTC
I tried to boot 11.2-BETA1 on a BeagleBone Black that had been running
11.1-RELEASE.  It didn't boot, falling back to the EMMC (which isn't bootable,
a different problem).  I was also unable to boot the snapshot from 12/20.
I see that the boot partition has different contents:

11.1-RELEASE:
MLO             u-boot.img      ubldr           ubldr.bin

11.2-BETA1:
MLO             boot.scr        u-boot.img      ubldr.bin

fwiw, when trying to boot the failing versions, I get a stream of 'C' characters on the serial console, which I also get when trying to boot from EMMC.
Comment 1 Emmanuel Vadot freebsd_committer freebsd_triage 2018-05-16 10:21:29 UTC
I have an ~old snapshot (FreeBSD-12.0-CURRENT-arm-armv7-BEAGLEBONE-20180426-r333017.img) which works.

gpart show mmcsd0                                                                                                               
=>      63  31116225  mmcsd0  MBR  (15G)
        63       961          - free -  (481K)
      1024      4096       1  !12  [active]  (2.0M)
      5120   6286336       2  freebsd  (3.0G)
   6291456  24824832          - free -  (12G)

The current snapshot (FreeBSD-12.0-CURRENT-arm-armv7-BEAGLEBONE-20180514-r333606.img):

gpart show mmcsd0
=>      63  31116225  mmcsd0  MBR  (15G)
        63      1008          - free -  (504K)
      1071     83916       1  !12  [active]  (41M)
     84987   6206445       2  freebsd  (3.0G)
   6291432  24824856          - free -  (12G)

Reformating the msdos partition to FAT16 and copy the old content make it boot.
FAT12 that big could be the problem.
Maybe it's time to switch to fat16.

Kernel panic early (panic: kobj_class_compile: out of memory) which is a other issue.
Comment 2 Emmanuel Vadot freebsd_committer freebsd_triage 2018-05-16 12:54:45 UTC
Same trick did make 11.2-PRERELEASE boot
Comment 3 Rodney W. Grimes freebsd_committer freebsd_triage 2018-05-16 14:05:55 UTC
(In reply to Emmanuel Vadot from comment #1)
From a quick look at Fat12 and Fat16 Eugene is correct, the maximum size of a fat12 file system based on 4k clusters would be 16MB, and on 8k clusters would be 32MB.

We can either shrink to <32MB, and retain Fat12 format, or change to fat16.
I would strongly suggest the change to fat16.

Also there should of been an error when this partition was formatted during the build process flagging that it could not be formatted to its capacity (a seperate bug and fix should be done for this issue)
Comment 4 Rodney W. Grimes freebsd_committer freebsd_triage 2018-05-16 14:06:47 UTC
(In reply to Rodney W. Grimes from comment #3)
Grr.. Sorry Eugene and Emmanuel, I mixed your names!
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-05-17 16:21:29 UTC
A commit references this bug:

Author: manu
Date: Thu May 17 16:21:13 UTC 2018
New revision: 333737
URL: https://svnweb.freebsd.org/changeset/base/333737

Log:
  release: arm: Format FAT partition as FAT16

  r332674 raised the size of the FAT partition from 2MB to 41MB for some
  boards. But we format them in FAT12 and this size appears to be to big
  for FAT12 and some SoC bootrom cannot cope with that.
  Format the msdosfs partition as FAT16,

  PR:		228285
  MFC after:	soon

Changes:
  head/release/arm/BEAGLEBONE.conf
  head/release/arm/GUMSTIX.conf
  head/release/arm/PANDABOARD.conf
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-05-17 17:01:03 UTC
A commit references this bug:

Author: manu
Date: Thu May 17 17:00:08 UTC 2018
New revision: 333739
URL: https://svnweb.freebsd.org/changeset/base/333739

Log:
  MFC r333737:

  release: arm: Format FAT partition as FAT16

  r332674 raised the size of the FAT partition from 2MB to 41MB for some
  boards. But we format them in FAT12 and this size appears to be to big
  for FAT12 and some SoC bootrom cannot cope with that.
  Format the msdosfs partition as FAT16,

  PR:             228285
  Approved by:	re (marius)

Changes:
_U  stable/11/
  stable/11/release/arm/BEAGLEBONE.conf
  stable/11/release/arm/GUMSTIX.conf
  stable/11/release/arm/PANDABOARD.conf
Comment 7 Mike Karels freebsd_committer freebsd_triage 2018-05-19 21:44:57 UTC
11.2-BETA2 boots fine for me.
Comment 8 Emmanuel Vadot freebsd_committer freebsd_triage 2018-05-19 21:50:25 UTC
Thanks for confirming.