I am attempting to build images with a more recent kernel version (the default appears to be 3.0.35) for the i.MX6SoloLite Evalutation Kit and seem to be running into a few problems.
I have successfully run the pre-built images from L3.0.35_13.10.02 from an SD card on the i.MX6SLEVK.
I have been working largely from the directions found here: https://community.freescale.com/docs/DOC-94849
I am building on Ubuntu 12.04
Bitbake reports version 1.20.0
Yocto version 1.5 (dora)
My local.conf file in /fsl-community-bsp/build/conf/ is unmodified with the following exceptions:
Machine was changed to imx6slevk:
MACHINE ??= 'imx6slevk'
The following line was added to the bottom of the file:
PREFERRED_VERSION_linux-imx_mx6 = "3.10.9"
After syncing repos, cleaning out the /tmp diectory and running 'bitbake -c cleanstate linux-imx', running 'bitbake core-image-base' runs successfully with a few duplicate inclusion warnings but no errors and the following files are created in /fsl-community-bsp/build/tmp$ cd deploy/images/imx6slevk/:
core-image-base-imx6slevk-20140116230057.rootfs.ext3
core-image-base-imx6slevk-20140116230057.rootfs.sdcard
core-image-base-imx6slevk-20140116230057.rootfs.tar.bz2
core-image-base-imx6slevk.ext3
core-image-base-imx6slevk.sdcard
core-image-base-imx6slevk.tar.bz2
modules--3.10.9-r0-imx6slevk-20140116230057.tgz
modules-imx6slevk.tgz
README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
u-boot.imx
u-boot-imx6slevk.imx
u-boot-imx6slevk-v2013.10-r0.imx
uImage
uImage--3.10.9-r0-imx6slevk-20140116230057.bin
uImage--3.10.9-r0-imx6sl-evk-20140116230057.dtb
uImage--3.10.9-r0-imx6sl-evk-ldo-20140116230057.dtb
uImage-imx6slevk.bin
uImage-imx6sl-evk.dtb
uImage-imx6sl-evk-ldo.dtb
Simply replacing the uImage on my currently working SD card from the L3.0.35_13.10.02 images (sudo dd if=uImage of=/dev/mmcblk0 bs=512 seek=2048 conv=fsync) results in the boot process getting to "Starting kernel" then hanging indefinitely. The same result also occurs when using the generated version of u-boot as well.
Interestingly though, simply using the generated core-image-base-imx6slevk.sdcard image ($ sudo dd if=core-image-base-imx6slevk.sdcard of=/dev/mmcblk0 bs=1M) also results in the same behavior.
I am a bit uncertain as to how my SD card should be partitioned for use with the Yocto images.
The partitions on the SD card with the L3.0.35_12.10.20 images (which run successfully) appear as such:
(with u-boot and the uImage dd'd to the unallocated space before mmcblk0p1)
The partitions on the SD card dd'd from the .sdcard image, however, appear like this:
(with the uImage, dtb and ldo-dtb on the fat partition and u-boot *presumablly?* on the unallocated space just before the fat partition)
My u-boot environmental variables for the L3.0.35_12.10.20 images with the uImage and u-boot from the Yocto build dd'd are as follows:
baudrate=115200
boot_fdt=try
bootargs_base=setenv bootargs console=ttymxc0,115200
bootargs_mmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rootwait
bootcmd=run bootcmd_mmc
bootcmd_mmc=run bootargs_base bootargs_mmc;mmc dev 1;mmc read ${loadaddr} 0x800 0x4000;bootm
bootdelay=3
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0
ethact=FEC
ethaddr=00:04:9f:03:02:72
ethprime=FEC
fdt_addr=0x81000000
fdt_file=imx6sl-evk.dtb
fdt_high=0xffffffff
initrd_high=0xffffffff
ip_dyn=yes
loadaddr=0x80800000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}
mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot}
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootm ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootm; else echo WARN: Cannot load the DT; fi; fi; else bootm; fi;
mmcdev=0
mmcpart=1
mmcroot=/dev/mmcblk0p1 rootwait rw
netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
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} ${uimage}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootm ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootm; else echo WARN: Cannot load the DT; fi; fi; else bootm; fi;
script=boot.scr
stderr=serial
stdin=serial
stdout=serial
uimage=uImage
My u-boot environmental variables for the .sdcard image are as follows:
baudrate=115200
boot_fdt=try
bootcmd=mmc dev ${mmcdev};mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi
bootdelay=3
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0
ethact=FEC
ethaddr=00:04:9f:03:02:72
ethprime=FEC
fdt_addr=0x81000000
fdt_file=imx6sl-evk.dtb
fdt_high=0xffffffff
initrd_high=0xffffffff
ip_dyn=yes
loadaddr=0x82000000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}
mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot}
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootm ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootm; else echo WARN: Cannot load the DT; fi; fi; else bootm; fi;
mmcdev=0
mmcpart=1
mmcroot=/dev/mmcblk0p2 rootwait rw
netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
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} ${uimage}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootm ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootm; else echo WARN: Cannot load the DT; fi; fi; else bootm; fi;
script=boot.scr
stderr=serial
stdin=serial
stdout=serial
uimage=uImage
My apologies for the large quantity of information but I figure that too much is better than not enough.
Any help in regards to what direction I should go or resources that might help would be greatly appreciated.
已解决! 转到解答。
Stephen
Follow the guide on imx/docs
meta-fsl-bsp-release.git - Freescale i.MX Yocto BSP Release Layer
These are the metadata layers released from freescale, doing all the work necessary to boot a 3.10.9 kernel.
Leo
So, this looks good.
Even though the do_rootfs failed, the following files were still generated, much like before:
modules--3.10.9-r0-imx6slevk-20140120181707.tgz
u-boot-imx6slevk.imx
uImage-imx6slevk.bin
modules-imx6slevk.tgz
uImage
uImage-imx6sl-evk.dtb
README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
uImage--3.10.9-r0-imx6slevk-20140120181707.bin
uImage-imx6sl-evk-ldo.dtb
u-boot.imx
uImage--3.10.9-r0-imx6sl-evk-20140120181707.dtb
u-boot-imx6slevk-2013.04-r0.imx
uImage--3.10.9-r0-imx6sl-evk-ldo-20140120181707.dtb
A lot of them appear to be symlinks? Why is that?
Copying uImage--3.10.9-r0-imx6slevk-20140120181707.bin (renamed uImage), uImage--3.10.9-r0-imx6sl-evk-20140120181707.dtb (renamed imx6sl-evk.dtb), and uImage--3.10.9-r0-imx6sl-evk-ldo-20140120181707.dtb (renamed imx6sl-evk-ldo.dtb) to the Boot partition of the SD card created with an earlier .sdcard image, as well as dd'ing u-boot-imx6slevk-2013.04-r0.imx (sudo dd if =u-boot-imx6slevk-2013.04-r0.imx of=/dev/mmcblk0 bs=512 seek=2 conv=fsync), while leaving the previous rootfs in tact seems to have created a bootable image! Woot!
I would still like to sort out why my build is failing at do_rootfs and fails to build a .sdcard image.
Any thoughts?
Thanks!
Just to be slightly more verbose, I am using the directions from here: meta-fsl-bsp-release.git - Freescale i.MX Yocto BSP Release Layer
With the modifications for the Dora branch found here: meta-fsl-bsp-release.git - Freescale i.MX Yocto BSP Release Layer