diff --git a/sysutils/Makefile b/sysutils/Makefile --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1466,6 +1466,7 @@ SUBDIR += u-boot-firefly-rk3399 SUBDIR += u-boot-imx-serial-loader SUBDIR += u-boot-master + SUBDIR += u-boot-mcimx6ull-evk SUBDIR += u-boot-nanopi-a64 SUBDIR += u-boot-nanopi-m1plus SUBDIR += u-boot-nanopi-neo diff --git a/sysutils/u-boot-mcimx6ull-evk/Makefile b/sysutils/u-boot-mcimx6ull-evk/Makefile new file mode 100644 --- /dev/null +++ b/sysutils/u-boot-mcimx6ull-evk/Makefile @@ -0,0 +1,15 @@ +MASTERDIR= ${.CURDIR}/../u-boot-master + +MODEL= mcimx6ull-evk +BOARD_CONFIG= mx6ull_14x14_evk_defconfig +FAMILY= imx6 + +IMXFILE= u-boot-dtb.imx +UBOOT_PLIST= ${IMXFILE} + +CONFIG_FRAGMENT= ${.CURDIR}/files/imx_fragment +FRAGMENT_NAME= imx_fragment + +EXTRA_PATCHES?= ${.CURDIR}/files/ + +.include "${MASTERDIR}/Makefile" diff --git a/sysutils/u-boot-mcimx6ull-evk/files/imx_fragment b/sysutils/u-boot-mcimx6ull-evk/files/imx_fragment new file mode 100644 --- /dev/null +++ b/sysutils/u-boot-mcimx6ull-evk/files/imx_fragment @@ -0,0 +1,5 @@ +CONFIG_API=y +CONFIG_ARMV7_NONSEC=n +CONFIG_DEFAULT_DEVICE_TREE="imx6ull-14x14-evk" +CONFIG_DISTRO_DEFAULTS=y +CONFIG_BOOTCOMMAND="run finduuid; run distro_bootcmd" diff --git a/sysutils/u-boot-mcimx6ull-evk/files/patch-include_configs_mx6ullevk.h b/sysutils/u-boot-mcimx6ull-evk/files/patch-include_configs_mx6ullevk.h new file mode 100644 --- /dev/null +++ b/sysutils/u-boot-mcimx6ull-evk/files/patch-include_configs_mx6ullevk.h @@ -0,0 +1,102 @@ +--- include/configs/mx6ullevk.h.orig 2025-10-06 21:13:09.000000000 +0200 ++++ include/configs/mx6ullevk.h 2025-12-29 15:09:55.909625000 +0100 +@@ -23,78 +23,39 @@ + #define CFG_SYS_FSL_USDHC_NUM 2 + #endif + ++ + #define CFG_EXTRA_ENV_SETTINGS \ + "script=boot.scr\0" \ + "image=zImage\0" \ + "console=ttymxc0\0" \ + "fdt_high=0xffffffff\0" \ + "initrd_high=0xffffffff\0" \ +- "fdt_file=undefined\0" \ ++ "fdtfile=imx6ull-14x14-evk.dtb\0" \ + "fdt_addr=0x83000000\0" \ ++ "fdt_addr_r=0x83000000\0" \ ++ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ ++ "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ ++ "ramdisk_addr_r=0x83000000\0" \ ++ "ramdiskaddr=0x83000000\0" \ ++ "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ ++ "finduuid=part uuid mmc 1:1 uuid\0" \ + "boot_fdt=try\0" \ + "ip_dyn=yes\0" \ + "videomode=video=ctfb:x:480,y:272,depth:24,pclk:108695,le:8,ri:4,up:2,lo:4,hs:41,vs:10,sync:0,vmode:0\0" \ +- "mmcdev="__stringify(CONFIG_ENV_MMC_DEVICE_INDEX)"\0" \ +- "mmcpart=1\0" \ + "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \ + "mmcautodetect=yes\0" \ +- "mmcargs=setenv bootargs console=${console},${baudrate} " \ +- "root=${mmcroot}\0" \ +- "loadbootscript=" \ +- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ +- "bootscript=echo Running bootscript from mmc ...; " \ +- "source\0" \ +- "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ +- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ +- "mmcboot=echo Booting from mmc ...; " \ +- "run mmcargs; " \ +- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ +- "if run loadfdt; then " \ +- "bootz ${loadaddr} - ${fdt_addr}; " \ +- "else " \ +- "if test ${boot_fdt} = try; then " \ +- "bootz; " \ +- "else " \ +- "echo WARN: Cannot load the DT; " \ +- "fi; " \ +- "fi; " \ +- "else " \ +- "bootz; " \ +- "fi;\0" \ +- "findfdt="\ +- "if test $fdt_file = undefined; then " \ +- "if test $board_name = ULZ-EVK && test $board_rev = 14X14; then " \ +- "setenv fdt_file imx6ulz-14x14-evk.dtb; fi; " \ +- "if test $board_name = EVK && test $board_rev = 14X14; then " \ +- "setenv fdt_file imx6ull-14x14-evk.dtb; fi; " \ +- "if test $fdt_file = undefined; then " \ +- "echo WARNING: Could not determine dtb to use; " \ +- "fi; " \ +- "fi;\0" \ +- "netargs=setenv bootargs console=${console},${baudrate} " \ +- "root=/dev/nfs " \ +- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ +- "netboot=echo Booting from net ...; " \ +- "run netargs; " \ +- "if test ${ip_dyn} = yes; then " \ +- "setenv get_cmd dhcp; " \ +- "else " \ +- "setenv get_cmd tftp; " \ +- "fi; " \ +- "${get_cmd} ${image}; " \ +- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ +- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ +- "bootz ${loadaddr} - ${fdt_addr}; " \ +- "else " \ +- "if test ${boot_fdt} = try; then " \ +- "bootz; " \ +- "else " \ +- "echo WARN: Cannot load the DT; " \ +- "fi; " \ +- "fi; " \ +- "else " \ +- "bootz; " \ +- "fi;\0" \ ++ "partitions=" \ ++ "uuid_disk=${uuid_gpt_disk};" \ ++ "name=rootfs,size=0,uuid=${uuid_gpt_rootfs}\0" \ ++ "fastboot_partition_alias_system=rootfs\0" \ ++ "setup_emmc=mmc dev 0; gpt write mmc 0 $partitions; reset;\0" \ ++ BOOTENV ++ ++#define BOOT_TARGET_DEVICES(func) \ ++ func(MMC, mmc, 1) ++ ++#include ++#include + + /* Miscellaneous configurable options */ + diff --git a/sysutils/u-boot-mcimx6ull-evk/pkg-descr b/sysutils/u-boot-mcimx6ull-evk/pkg-descr new file mode 100644 --- /dev/null +++ b/sysutils/u-boot-mcimx6ull-evk/pkg-descr @@ -0,0 +1,4 @@ +U-Boot loader for NXP i.mx6ull EVK (MCIMX6ULL-EVK) + +The process is described here +https://docs.u-boot.org/en/stable/board/nxp/mx6ullevk.html