Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Mar 2017 11:47:38 -0300
From:      Dr. Rolf Jansen <rj@obsigna.com>
To:        freebsd-arm@freebsd.org
Subject:   Re: BeagleBone Black MMC ordering clashes
Message-ID:  <0D45AE79-E31B-4E81-BE70-AEAC2CA093C0@obsigna.com>
In-Reply-To: <CAFt_gkw-Hu1xVHsGjJjz0gWjFyBJuGisqB4-QuEnOJ63iZsOVQ@mail.gmail.com>
References:  <7D750433-59FC-4999-AC24-041683E17310@obsigna.com> <1483718084.96230.5.camel@freebsd.org> <0D800E14-799A-4926-AEF8-CD698D647E40@obsigna.com> <1483722560.96230.10.camel@freebsd.org> <F0D101AF-181B-4630-B539-C354C21538EC@obsigna.com> <1483928120.96230.61.camel@freebsd.org> <A0506EF1-F01A-426E-AC46-D58C2155D887@obsigna.com> <6A97EEB3-6B24-48E7-959F-67F4275AFEC8@obsigna.com> <1487735878.73144.140.camel@freebsd.org> <419A8740-2BA4-45A6-B73D-15012373A5A0@obsigna.com> <DE52B981-4779-424A-A762-FC4C2878B05D@obsigna.com> <CAFt_gkw-Hu1xVHsGjJjz0gWjFyBJuGisqB4-QuEnOJ63iZsOVQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 10.03.2017 um 10:30 schrieb Otac=EDlio de Ara=FAjo Ramos Neto =
<otacilio.neto@bsd.com.br>:

> Dear
>=20
> Coud tou please indicate to me where you found the procedure to =
install FreeBSD in BBB flash memory?
>=20
> []'s
> -Otacilio

It's not exactly that I found the procedure anywhere, I simply did it in =
accordance to the common sense of an experienced FreeBSD user.

1. Start the BBB using a FreeBSD installation on the SD card.


2. Partition the internal flash -- note, this will destroy the factory =
installation:
# gpart -F destroy mmcsd1
# gpart create -s MBR mmcsd1
# gpart add -b 8192 -s 8192 -t fat32 mmcsd1
# gpart add -s 7536640 -t freebsd mmcsd1
# gpart add -s 7536640 -t freebsd-ufs mmcsd1s2
# gpart set -a active -i 1 mmcsd1s1


3. Create the file systems:
# newfs_msdos -L boot /dev/mmcsd1s1
# newfs -ntUE -L system /dev/mmcsd1s2a
# tunefs -a enable /dev/mmcsd1s2a


4. Configure the snapshot image as virtual memory disk,
  assuming the unpacked image is present in the working dir:
# mdconfig -a -t vnode -f =
FreeBSD-12.0-CURRENT-arm-armv6-BEAGLEBONE-20170309-r314972.img -u 0


5. Copy over the U-BOOT data:
# mount_msdosfs -o noatime /dev/md0s1 /media
# mount_msdosfs -o noatime /dev/mmcsd1s1 /mnt

# cp -p /media/* /mnt

# umount /mnt
# umount /media


6. As a Prerequisite, install the filesystem cloning tool
// I use the tool sysutils/clone, and it can be installed either from =
the ports:
# cd /usr/ports/sysutils/clone
# make install clean

// or install it directly from the GitHub repository:
# mkdir ~/bin
# cd ~/bin
# ln -s /usr/bin/svnliteversion svnversion
# cd
# svnlite checkout https://github.com/cyclaero/clone/trunk/ clone
# cd clone
# make install clean


7. Copy over the FreeBSD Installation
# mount -o noatime /dev/md0s2a /media
# mount -o noatime /dev/mmcsd1s2a /mnt

# clone -c rwoff /media /mnt

# umount /mnt
# umount /media
# mdconfig -d -u 0


8. Edit /etc/fstab so it gets the following content:

/dev/ufs/system         /               ufs     rw              1       =
1
/dev/label/boot         /boot/msdos     msdosfs rw,noatime      0       =
0
tmpfs                   /tmp            tmpfs   rw,mode=3D1777,size=3D50m =
0 0


9. Shutdown the BBB, remove the SD card, then restart.

The BBB should now start from the internal flash. If it does not, then =
perhaps I have forgotten a crucial step in the above procedure.

Best regards

Rolf




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0D45AE79-E31B-4E81-BE70-AEAC2CA093C0>