u-boot: add environmet
Signed-off-by: Thomas Klaehn <tkl@blackfinn.de>
This commit is contained in:
parent
d68af25483
commit
f8a0f3a533
@ -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"
|
||||
|
26
recipes-bsp/u-boot/files/uEnv.txt
Normal file
26
recipes-bsp/u-boot/files/uEnv.txt
Normal 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;
|
||||
|
8
recipes-bsp/u-boot/u-boot_%.bbappend
Normal file
8
recipes-bsp/u-boot/u-boot_%.bbappend
Normal file
@ -0,0 +1,8 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||
|
||||
UBOOT_ENV = "uEnv"
|
||||
|
||||
SRC_URI += " \
|
||||
file://uEnv.txt \
|
||||
"
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user