u-boot: add environmet

Signed-off-by: Thomas Klaehn <tkl@blackfinn.de>
This commit is contained in:
Thomas Klaehn 2018-03-14 09:29:18 +01:00
parent d68af25483
commit f8a0f3a533
4 changed files with 43 additions and 5 deletions

View File

@ -13,6 +13,8 @@ PACKAGE_CLASSES ?= "package_ipk"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
IMAGE_BOOT_FILES_append = " uEnv.txt"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
@ -31,13 +33,14 @@ BB_DISKMON_DIRS = "\
CONF_VERSION = "1"
INHERIT += "rm_work own-mirrors icecc"
INHERIT += "rm_work"
ICECC_PATH = "/usr/bin/icecc"
ICECC_PARALLEL_MAKE = "-j 20"
#INHERIT += "icecc"
#ICECC_PATH = "/usr/bin/icecc"
#ICECC_PARALLEL_MAKE = "-j 20"
INHERIT += "own-mirrors"
SOURCE_MIRROR_URL = "https://files.blackfinn.de/mirror/sources"
BB_GENERATE_MIRROR_TARBALLS = "1"
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE DL_DIR"

View File

@ -0,0 +1,26 @@
# boot from sd card
bootpart=0:2
# boot from emmc
#bootpart=1:2
bootdir=/boot
bootfile=zImage
console=ttyO0,115200n8
fdtaddr=0x88000000
fdtfile=am335x-boneblack.dtb
loadaddr=0x82000000
# rootfs on sd card
mmcroot=/dev/mmcblk0p2 ro
# rootfs on emmc
#mmcroot=/dev/mmcblk1p2 ro
mmcrootfstype=ext4 rootwait
optargs=consoleblank=0
mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot}
findfdtfile=setenv fdtfile ${fdtfile}
rootfstype=${mmcrootfstype}
loadfdt=run findfdtfile; load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
uenvcmd=if run loadfdt; then echo Loaded ${fdtfile}; if run loadimage; then run mmcargs; bootz ${loadaddr} - ${fdtaddr}; fi; fi;

View File

@ -0,0 +1,8 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
UBOOT_ENV = "uEnv"
SRC_URI += " \
file://uEnv.txt \
"

View File

@ -21,13 +21,14 @@ w" | fdisk /dev/mmcblk1
# Create file systems.
mkfs.vfat -F 32 -n "boot" /dev/mmcblk1p1
mkfs.ext4 -L "rootfs" /dev/mmcblk1p2
yes | mkfs.ext4 -L "rootfs" /dev/mmcblk1p2
# Flash boot partition.
mount /dev/mmcblk1p1 /media
cp MLO /media
cp u-boot.img /media
cp uExt.txt /media
sync
umount /dev/mmcblk1p1