Bug 201401

Summary: [PATCH] sysutils/u-boot-beaglebone
Product: Ports & Packages Reporter: Emmanuel Vadot <manu>
Component: Individual Port(s)Assignee: Ian Lepore <ian>
Status: Closed FIXED    
Severity: Affects Many People CC: freebsd-arm, imp, manu
Priority: --- Keywords: patch
Version: LatestFlags: bugzilla: maintainer-feedback? (ian)
Hardware: arm   
OS: Any   
Attachments:
Description Flags
patch_saveenv none

Description Emmanuel Vadot 2015-07-07 14:29:56 UTC
Created attachment 158505 [details]
patch_saveenv

This patch removes the hardcoded device for env location and set the variable bootdevice to 0 (i.e. the SD card) to the default env.
This makes u-boot saves the env file according to bootdevice instead of hardcoded one (now the SD card) when using the saveenv command.

This is an enhancement for users who boot from eMMC and don't affect users of SD card only.

It also correct the SetupUenv command to load u-boot.env (the filename of the saved end) instead of uEnv.txt.

Note that currently u-boot fails to correctly saves the env to a FAT12 partition, you must use a FAT16 one.
You can create a correct bootable FAT16 partition for the eMMC like this when booting from SD card :

gpart destroy -F mmcsd1
gpart create -s mbr mmcsd1
gpart add -t fat16 -b 4096 -s 10M
gpart set -a active -i 1 mmcsd1
newfs_msdos -F 16 -h 4 -u 16 -S 512 -m 0xf8 -n 2 -c 4 -a 20 -r 4 -e 512 /dev/mmcsd1s1

Cheers,
Comment 1 Warner Losh freebsd_committer freebsd_triage 2017-08-02 15:46:55 UTC
This was fixed / made not relevant by u-boot-master changes.