diff --git a/buildconf/local.conf.sample b/buildconf/local.conf.sample index d06ab74..969df9a 100644 --- a/buildconf/local.conf.sample +++ b/buildconf/local.conf.sample @@ -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" diff --git a/recipes-bsp/u-boot/files/uEnv.txt b/recipes-bsp/u-boot/files/uEnv.txt new file mode 100644 index 0000000..c8a7125 --- /dev/null +++ b/recipes-bsp/u-boot/files/uEnv.txt @@ -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; + diff --git a/recipes-bsp/u-boot/u-boot_%.bbappend b/recipes-bsp/u-boot/u-boot_%.bbappend new file mode 100644 index 0000000..d78d9b4 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot_%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +UBOOT_ENV = "uEnv" + +SRC_URI += " \ + file://uEnv.txt \ +" + diff --git a/tools/scripts/flash_bbb.sh b/tools/scripts/flash_bbb.sh index 458cd40..932fa94 100755 --- a/tools/scripts/flash_bbb.sh +++ b/tools/scripts/flash_bbb.sh @@ -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