From a64973604be7892bb5b7788f3425ea3b0ebe669d Mon Sep 17 00:00:00 2001 From: Vincent BENOIT Date: Tue, 24 Jan 2023 11:01:59 +0000 Subject: [PATCH] ajout du fichier d'env uboot --- recipes-bsp/u-boot/files/uEnv.txt | 48 +++++++++++++++++++ .../u-boot/u-boot-ti-staging_2020.07.bb | 11 ++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 recipes-bsp/u-boot/files/uEnv.txt diff --git a/recipes-bsp/u-boot/files/uEnv.txt b/recipes-bsp/u-boot/files/uEnv.txt new file mode 100644 index 0000000..c4f05de --- /dev/null +++ b/recipes-bsp/u-boot/files/uEnv.txt @@ -0,0 +1,48 @@ +arch=arm +baudrate=115200 +board=pengwyn +board_name=pengwyn +bootargs=console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=7,2048 rootfstype=ubifs rootwait=1 +bootcmd=run mmcboot;run nandboot; +bootdelay=2 +bootdir=/boot +bootenv=uEnv.txt +bootfile=uImage +bootpart=0:2 +console=ttyS0,115200n8 +cpu=armv7 +ethact=cpsw +ethaddr=00:18:30:fc:c0:35 +fdtaddr=0x80F80000 +fdtfile=am335x-pengwyn.dtb +importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize +loadaddr=0x80200000 +loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv} +loadfdt=fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile} +loadimage=fatload mmc ${mmcdev} ${loadaddr} ${bootfile} +mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype} +mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadimage; then run loadfdt;run mmcloados;fi;fi; +mmcdev=0 +mmcloados=run mmcargs; bootm ${loadaddr} - ${fdtaddr}; +mmcroot=/dev/mmcblk0p2 rw +mmcrootfstype=ext4 rootwait +mtddevname=SPL +mtddevnum=0 +mtdids=nand0=omap2-nand.0 +mtdparts=mtdparts=omap2-nand.0:512k(SPL),512k(SPL.backup1),512k(SPL.backup2),512k(SPL.backup3),1536k(u-boot),512k(u-boot-spl-os),512k(u-boot-env),5m(kernel),-(rootfs) +nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype} +nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} u-boot-spl-os; nand read ${loadaddr} kernel; bootz ${loadaddr} - ${fdtaddr} +nandroot=ubi0:rootfs rw ubi.mtd=7,2048 +nandrootfstype=ubifs rootwait=1 +netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp +netboot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr} +nfsopts=nolock +partition=nand0,0 +rootpath=/export/rootfs +soc=am33xx +static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off +stderr=ns16550_serial +stdin=ns16550_serial +stdout=ns16550_serial +vendor=silica +ver=U-Boot 2020.07-g2f5fbb5b39 (Jul 06 2020 - 19:22:53 +0000) diff --git a/recipes-bsp/u-boot/u-boot-ti-staging_2020.07.bb b/recipes-bsp/u-boot/u-boot-ti-staging_2020.07.bb index 82ea976..f089174 100644 --- a/recipes-bsp/u-boot/u-boot-ti-staging_2020.07.bb +++ b/recipes-bsp/u-boot/u-boot-ti-staging_2020.07.bb @@ -2,11 +2,20 @@ # Release under the MIT license (see COPYING.MIT for the terms) require u-boot-ti.inc +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" PR = "r33" BRANCH = "master" -SRC_URI = "${UBOOT_GIT_URI};protocol=${UBOOT_GIT_PROTOCOL};branch=${BRANCH}" +SRC_URI = " \ + ${UBOOT_GIT_URI};protocol=${UBOOT_GIT_PROTOCOL};branch=${BRANCH} \ + file://uEnv.txt \ + " # Tag: v2020.07 SRCREV = "2f5fbb5b39f7b67044dda5c35e4a4b31685a3109" + +do_deploy:append () { + install -m 0644 ${WORKDIR}/uEnv.txt ${DEPLOY_DIR_IMAGE} +}