Yes, both should really work but remember to change the U-Boot bootm
command as used for uImages to bootz
as used for zImages.
@brandon.tx Oh right. On what does a suitable setting depend on? What would you suggest?
That’s your partition offset isn’t it.
@marcel.tx I did some step back and used the original apalis image (with my custom rootfs + apalis image rootfs drivers). I moved uImage
from boot
to rootfs/boot
and tegra124-apalis-eval.dtb
from boot
to rootfs/boot
.
I adjusted the u-boot environment:
emmcargs=ip=off root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait
emmcboot=run setup; setenv bootargs ${defargs} ${emmcargs} ${setupargs} ${vidargs}; echo Booting from internal eMMC chip...; run emmcdtbload; load mmc 0:2 ${kernel_addr_r} /boot/${boot_file} && run fdt_fixup && bootm ${kernel_addr_r} - ${dtbparam}
emmcdtbload=setenv dtbparam; load mmc 0:2 ${fdt_addr_r} /boot/${soc}-apalis-${fdt_board}.dtb && setenv dtbparam ${fdt_addr_r}
It seems like the kernel is loaded but the dtb is not:
Apalis TK1 # reset
resetting ...
U-Boot 2015.04 (Nov 21 2016 - 20:39:53)
TEGRA124
DRAM: 2 GiB
MMC: Tegra SD/MMC: 0, Tegra SD/MMC: 1, Tegra SD/MMC: 2
tegra-pcie: PCI regions:
tegra-pcie: I/O: 0x12000000-0x12010000
tegra-pcie: non-prefetchable memory: 0x13000000-0x20000000
tegra-pcie: prefetchable memory: 0x20000000-0x40000000
tegra-pcie: 2x1, 1x1 configuration
tegra-pcie: probing port 1, using 1 lanes
In: serial
Out: serial
Err: serial
Missing Toradex config block
Model: Toradex Apalis TK1 2GB
Net: e1000: no NVM
e1000#0
Error: e1000#0 address not set.
Hit any key to stop autoboot: 0
Booting from internal eMMC chip...
** File not found /boot/tegra124-apalis-eval.dtb **
5472144 bytes read in 209 ms (25 MiB/s)
## Booting kernel from Legacy Image at 81000000 ...
Image Name: Angstrom/3.10.40+gitr774e3704de9
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5472080 Bytes = 5.2 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
I used this settings and hope they are ok:
Apalis TK1 # cfgblock create
Is the module an IT version? [y/N] N
Enter the module version (e.g. V1.1B): V1.1A
Enter module serial number: <8 digits>
Toradex config block successfully written
And what does ls mmc 0:2 /boot
say?
I guess. What does U-Boot now output e.g. mine does
Model: Toradex Apalis TK1 2GB V1.1A, Serial# 02864476
You are right, if I run ls
it is missing:
Apalis TK1 # ls mmc 0:2 /boot
<DIR> 4096 .
<DIR> 4096 ..
5472144 uImage
448890 u-boot-dtb-tegra.bin
<DIR> 4096 extlinux
However if I use ums 0 mmc 0
there is extlinux/
, tegra124-apalis-eval.dtb
, u-boot-dtb-tegra.bin
and uImage
?
This could be due to one of them many known ext driver issues in U-Boot. But as we do not usually recommend directly booting off such an ext partition we have not much further experience with it. One thing you could try is updating to our lastest V2.7 beta 1 BSP featuring U-Boot 2016.11 supposedly having quite some such ext driver bugs resolved.
@marcel.tx Ok, good to know. Thanks. Is this behaviour reproducable or random?
BTW: The partition offset ~ blkstart is output when running (here: 40960s
in hex a000
, 12328960
in hex bc2000
)
~/Apalis_TK1_LinuxImageV2.7$ ./update.sh -m 2 -o /srv/tftp/
Number Start End Size Type File system Flags
1 8192s 40959s 32768s primary lba
2 40960s 12328959s 12288000s primary
3 12328960s 24616959s 12288000s primary
4 24616960s 30760959s 6144000s primary
Meanwhile I switched to Apalis Linux Image v2.7Beta1. Here some update script variant:
copy uImage and tegra124-apalis-eval.dtb from /srv/tftp/ into Apalis_TK1_LinuxImagev2.7/rootfs/boot/
patch Apalis_TK1_LinuxImagev2.7/update.sh
@@ -22,9 +22,8 @@
echo "to update a component stored in UBI enter:"
echo "'run prepare_ubi' (for Colibri T20)"
echo "followed by one of:"
- echo "'run update_kernel'"
- echo "'run update_fdt' (for device tree enabled kernels)"
echo "'run update_rootfs'"
@@ -403,33 +412,13 @@
echo ""
- echo "Creating VFAT partition image with the kernel"
+ echo "Creating VFAT partition image (empty)"
rm -f ${BINARIES}/boot.vfat
${MKFSVFAT} -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${BINARIES}/boot.vfat $BOOT_BLOCKS
export MTOOLS_SKIP_CHECK=1
- mcopy -i ${BINARIES}/boot.vfat -s ${BINARIES}/${KERNEL_IMAGETYPE} ::/${KERNEL_IMAGETYPE}
-
- # Copy device tree file
- COPIED=false
- if test -n "${KERNEL_DEVICETREE}"; then
- for DTS_FILE in ${KERNEL_DEVICETREE}; do
- DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
- if [ -e "${BINARIES}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
- kernel_bin="`readlink ${BINARIES}/${KERNEL_IMAGETYPE}`"
- kernel_bin_for_dtb="`readlink ${BINARIES}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MODTYPE},g;s,\.dtb$,.bin,g"`"
- if [ "$kernel_bin" = "$kernel_bin_for_dtb" ]; then
- mcopy -i ${BINARIES}/boot.vfat -s ${BINARIES}/${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb
- #copy also to out_dir
- sudo cp ${BINARIES}/${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb "$OUT_DIR/${DTS_BASE_NAME}.dtb"
- COPIED=true
- fi
- fi
- done
- ([ "${MODTYPE}" = "apalis-tk1" ] || [ "${MODTYPE}" = "apalis-tk1-mainline" ]) && ([ $COPIED = true ] || { echo "Did not find the devicetrees from KERNEL_DEVICETREE, ${KERNEL_DEVICETREE}. Aborting."; exit 1; })
- fi
echo ""
patch Apalis_TK1_LinuxImagev2.7/apalis-tk1_bin/flash_eth.scr
-setenv update_kernel 'tftpboot ${loadaddr} ${board_name}/uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}'
-
-setenv update_fdt 'tftpboot ${loadaddr} ${board_name}/${soc}-apalis-${fdt_board}.dtb && fatwrite mmc 0:1 ${loadaddr} ${soc}-apalis-${fdt_board}.dtb ${filesize}'
-
setenv update_configblock 'run check_configblock; tftpboot ${loadaddr} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
-setenv update 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_rootfs; reset'
+setenv update 'run update_uboot; run update_1; run update_2; run update_rootfs; run update_rootfs_b; reset'
adjust u-boot environment (here via u-boot prompt)
Apalis TK1 # setenv emmcargs 'ip=off root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait'
Apalis TK1 # setenv emmcboot 'run setup; setenv bootargs ${defargs} ${emmcargs} ${setupargs} ${vidargs}; echo Booting from internal eMMC chip...; run emmcdtbload; load mmc 0:2 ${kernel_addr_r} /boot/${boot_file} && run fdt_fixup && bootm ${kernel_addr_r} - ${dtbparam}'
Apalis TK1 # setenv emmcdtbload 'dtbparam; load mmc 0:2 ${fdt_addr_r} /boot/${soc}-apalis-${fdt_board}.dtb && setenv dtbparam ${fdt_addr_r}'