Preparing a bootable micro-SD card

Not unlike the popular BeagleBone Black, the BAV335x includes a serial-EEProm which contains information about the board such as model, serial number and MAC address. The OEM must run a customized version of u-boot which includes support for the BAV335x. For convenience, we provide a already compiled u-boot with all the support for the BAV335x. The sources for this image have been pushed to the u-boot community if one whishes to build it from sources. There are two versions of the pre-compiled version, one is for the Rev.A or BAV335x and the other for the Rev.B. Both these version of u-boot will run on both boards by detecting the board model from the serial-EEProm, however, both versions will default to their respective hardware version should the serial-EEProm be erased by the OEM (not that this is only possible intetionally as it requires hardware knowledge/modification).

The instructions bellow use a working pre-compiled working copy of u-boot for the BAV335x.

Partitionning the micro-SD card

You need to create partitions on the card before you can format it. The system device name for your micro-SD card will vary depending on the Linux distribution you are using for your desktop. If you do not understand what this means, you should seek help from somebody who does as this is very important and could result in data loss.

For most Systems the card will be /dev/sdX where X would be a letter like b or c. For these systems sda would typically be your hard-disk and the one to avoid.
On other systems the card will be /dev/mmcblkN where N would be 0, 1 or some other number. Use lsblk to see all devices and determine which one is your μSD.

Partition the μSD card.

In the commands below, replace <YOUR_CARD> with the device name of the card (eg: /dev/sdb or /dev/mmcblk0)
$ sudo sfdisk --in-order --Linux --unit M <YOUR_CARD> <<-__EOF__ 1,16,0xE,* ,,,- __EOF__

Formatting the card.

If your card is /dev/sdb then partition1 and partition2 would be /dev/sdb1 and /dev/sdb2 respectively.
If your card is /dev/mmcblk0, the partition1 and partition2 would be /dev/mmcblk0p1 and /dev/mmcblk0p2 respectively.
Replace <YOURCARD_PARTITION1> and <YOURCARD_PARTITION2> with the appropriate name of the two partitions of your μSD card
$ sudo mkfs.vfat -F 16 <YOURCARD_PARTITION1> -n BOOT $ sudo mkfs.ext4 <YOURCARD_PARTITION2> -L rootfs

Get uboot for the BAV335x

Download u-boot and copy it to the card. You will need to create a mountpoint somewhere (in your home would be fine)
NOTE: This version of u-boot has been modified so that it can run properly on a blank BAV right out of manufacturing, and does not require the EEPROM to be pre-programmed. Actually, this bersion of u-boot probes the serial-EE and adapts for the hardware declared in the EE, if the EE is blank, it will then default to either Rev.A or B depending on which version you downloaded.
The pre-compiled versions of u-boot will run on both boards but ethernet will be broken if you use the wrong version. Make sure to download uboot-bav335a.tgz if you have a Rev.A (with 10/100MB Ethernet), or uboot-bav335b.tgz if you have the newer Rev.B with Gigabit Ethernet.
$ cd ~ $ mkdir mnt $ wget

Copy u-boot files to the card

Attention: Replace <YOURCARD_PARTITION1> with the appropriate name for the first partition of your μSD card (eg:/dev/sdb1 or /dev/mmcblk0p1)
$ sudo mount <YOURCARD_PARTITION1> mnt $ cd mnt $ tar zxvf ../uboot-bav335b.tgz $ mkdir dtbs $ sudo umount mnt

Now let's create your own "Linux distribution"

We're done creating a bootble u-boot micro-SD card. Now let's create a full linux system distribution.