|
| 1 | +# 2026-06-08 UUU + UMS + eMMC Bring-up Note |
| 2 | + |
| 3 | +## Goal |
| 4 | + |
| 5 | +Bring up the i.MX6ULL AES board through USB SDP, expose eMMC through UMS, burn a full eMMC image, then boot either: |
| 6 | + |
| 7 | +- `run netbootaes`: TFTP kernel/DTB + NFS rootfs. |
| 8 | +- `run emmcbootaes`: eMMC boot partition kernel/DTB + eMMC rootfs. |
| 9 | + |
| 10 | +## Conversation Summary |
| 11 | + |
| 12 | +1. Initial plan was to avoid unstable fastboot flashing. |
| 13 | +2. UUU should only boot U-Boot into RAM through USB SDP. |
| 14 | +3. U-Boot should expose eMMC through UMS. |
| 15 | +4. The host should not copy only `zImage`/DTB to a mounted drive letter for production flashing, because that can miss raw U-Boot, partition table, or rootfs. |
| 16 | +5. Correct full burn flow: use Rufus/DD/raw-image mode to write `out/release-latest/images/imx6ull-aes-emmc.img` to the UMS-exposed eMMC. |
| 17 | +6. First UUU lst failed because it referenced `u-boot-dtb.imx` relative to `tools/uuu/`. |
| 18 | +7. Fixed lst to load `../../out/release-latest/uboot/u-boot-dtb.imx`. |
| 19 | +8. U-Boot then entered old `bootcmd_mfg`, which fell through to `fastboot 0`. |
| 20 | +9. Fixed board default manufacturing environment so USB/mfgtools boot runs UMS instead of fastboot. |
| 21 | +10. Updated both U-Boot source and `patches/uboot-imx/charlies_board.patch`. |
| 22 | +11. Rebuilt U-Boot at `out/release-latest/uboot/u-boot-dtb.imx`. |
| 23 | +12. Verified the new U-Boot image contains: |
| 24 | + |
| 25 | +```text |
| 26 | +bootcmd_mfg=echo Run eMMC UMS ...; mmc dev ${emmc_dev}; ums 0 mmc ${emmc_dev}; |
| 27 | +``` |
| 28 | + |
| 29 | +## Files Changed |
| 30 | + |
| 31 | +- `tools/uuu/imx6ull-aes-ums.lst` |
| 32 | +- `tools/uuu/README.md` |
| 33 | +- `third_party/uboot-imx/include/configs/mx6ull_aes_emmc.h` |
| 34 | +- `patches/uboot-imx/charlies_board.patch` |
| 35 | + |
| 36 | +## Current U-Boot Environment Snapshot |
| 37 | + |
| 38 | +The board currently reports: |
| 39 | + |
| 40 | +```text |
| 41 | +baudrate=115200 |
| 42 | +bootcmd=echo Current do not autoboot |
| 43 | +bootcmd_mfg=mmc dev 1; ums 0 mmc 1 |
| 44 | +bootdelay=-1 |
| 45 | +emmc_dev=1 |
| 46 | +ethact=ethernet@20b4000 |
| 47 | +ethprime=eth1 |
| 48 | +loadaddr=0x80800000 |
| 49 | +``` |
| 50 | + |
| 51 | +The environment is minimal and needs normal boot variables. |
| 52 | + |
| 53 | +## Host-side Assumptions |
| 54 | + |
| 55 | +TFTP directory: |
| 56 | + |
| 57 | +```text |
| 58 | +~/tftp |
| 59 | +``` |
| 60 | + |
| 61 | +Files expected in TFTP: |
| 62 | + |
| 63 | +```text |
| 64 | +zImage |
| 65 | +imx6ull-aes.dtb |
| 66 | +``` |
| 67 | + |
| 68 | +NFS rootfs: |
| 69 | + |
| 70 | +```text |
| 71 | +/home/charliechen/imx-forge/rootfs/nfs |
| 72 | +``` |
| 73 | + |
| 74 | +Common tutorial network values: |
| 75 | + |
| 76 | +```text |
| 77 | +board ipaddr = 192.168.60.200 |
| 78 | +serverip = 192.168.60.1 |
| 79 | +netmask = 255.255.255.0 |
| 80 | +gatewayip = 192.168.60.1 |
| 81 | +``` |
| 82 | + |
| 83 | +## Host Preparation |
| 84 | + |
| 85 | +Copy TFTP files: |
| 86 | + |
| 87 | +```bash |
| 88 | +mkdir -p ~/tftp |
| 89 | +cp out/release-latest/images/zImage ~/tftp/ |
| 90 | +cp out/release-latest/images/imx6ull-aes.dtb ~/tftp/ |
| 91 | +chmod a+r ~/tftp/zImage ~/tftp/imx6ull-aes.dtb |
| 92 | +``` |
| 93 | + |
| 94 | +Historical kernel NFS server `/etc/exports` entry: |
| 95 | + |
| 96 | +```text |
| 97 | +/home/charliechen/imx-forge/rootfs/nfs 192.168.60.0/24(rw,sync,no_subtree_check,no_root_squash) |
| 98 | +``` |
| 99 | + |
| 100 | +Reload kernel NFS exports: |
| 101 | + |
| 102 | +```bash |
| 103 | +sudo exportfs -ra |
| 104 | +sudo systemctl restart nfs-kernel-server |
| 105 | +``` |
| 106 | + |
| 107 | +Note: on the newer WSL2 setup, kernel `nfs-kernel-server` hung on local NFSv3 mounts. Use NFS-Ganesha instead and pin `mountport=20048`. See: |
| 108 | + |
| 109 | +```text |
| 110 | +document/notes/2026-06-08-wsl2-nfsroot-ganesha-troubleshoot.md |
| 111 | +``` |
| 112 | + |
| 113 | +## U-Boot Environment: Quick Paste Block |
| 114 | + |
| 115 | +Paste this in U-Boot, adjusting IP values if the host network differs: |
| 116 | + |
| 117 | +```text |
| 118 | +setenv ipaddr 192.168.60.200 |
| 119 | +setenv serverip 192.168.60.1 |
| 120 | +setenv gatewayip 192.168.60.1 |
| 121 | +setenv netmask 255.255.255.0 |
| 122 | +setenv hostname imx6ull-aes |
| 123 | +setenv nfs_iface eth0 |
| 124 | +setenv loadaddr 0x80800000 |
| 125 | +setenv fdt_addr 0x83000000 |
| 126 | +setenv fdt_addr_r 0x83000000 |
| 127 | +setenv bootfile zImage |
| 128 | +setenv fdt_file imx6ull-aes.dtb |
| 129 | +setenv nfsrootdir /home/charliechen/imx-forge/rootfs/nfs |
| 130 | +setenv nfsargs 'setenv bootargs console=ttymxc0,115200 root=/dev/nfs rw nfsroot=${serverip}:${nfsrootdir},vers=3,proto=tcp,nolock,port=2049,mountport=20048 ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${nfs_iface}:off' |
| 131 | +setenv netbootaes 'run nfsargs; tftp ${loadaddr} ${bootfile}; tftp ${fdt_addr} ${fdt_file}; bootz ${loadaddr} - ${fdt_addr}' |
| 132 | +setenv emmcargs 'setenv bootargs console=ttymxc0,115200 root=/dev/mmcblk1p2 rootfstype=ext4 rootwait rw' |
| 133 | +setenv emmcdevsetup 'mmc dev ${emmc_dev}' |
| 134 | +setenv loademmcimage 'ext4load mmc ${emmc_dev}:1 ${loadaddr} /zImage' |
| 135 | +setenv loademmcfdt 'ext4load mmc ${emmc_dev}:1 ${fdt_addr} /imx6ull-aes.dtb' |
| 136 | +setenv emmcbootaes 'run emmcargs; run emmcdevsetup; run loademmcimage; run loademmcfdt; bootz ${loadaddr} - ${fdt_addr}' |
| 137 | +setenv bootcmd 'run emmcbootaes' |
| 138 | +setenv bootdelay 1 |
| 139 | +saveenv |
| 140 | +``` |
| 141 | + |
| 142 | +Manual test commands: |
| 143 | + |
| 144 | +```text |
| 145 | +run netbootaes |
| 146 | +run emmcbootaes |
| 147 | +``` |
| 148 | + |
| 149 | +If eMMC rootfs fails with `VFS: Cannot open root device`, try: |
| 150 | + |
| 151 | +```text |
| 152 | +setenv emmcargs 'setenv bootargs console=ttymxc0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw' |
| 153 | +run emmcbootaes |
| 154 | +``` |
| 155 | + |
| 156 | +## Current Caveat |
| 157 | + |
| 158 | +`out/release-latest/images/imx6ull-aes-emmc.img` must be regenerated after U-Boot changes if the image should contain the latest eMMC-resident U-Boot. The temporary UUU U-Boot only runs from RAM. |
0 commit comments