TS-4900 Yocto getting started: Difference between revisions

From embeddedTS Manuals
No edit summary
m (Links auto-updated for 2022 re-branding ( https://files.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/zeus/ts-x11-image-tsimx6-latest.rootfs.tar.bz2 →‎ https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/zeus/ts-x11-image-tsimx6-latest.rootfs.tar.bz2))
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Yocto itself is a set of scripts and tools used to build a custom Distribution. In our default images we try to include all of the common utilities requested by users so rebuilding Yocto should not be necessary in many cases. Our Yocto rootfs is available here:
Yocto itself is a set of scripts and tools used to build a custom distribution. In our default images we try to include all the common utilities requested by users. Rebuilding Yocto should not be necessary for many users, but is possible if needed. See the [[#Custom Build Yocto|Custom Build Yocto]] section for information on this process.
 
 
Our Yocto rootfs tarball is available here:


{| class=wikitable
{| class=wikitable
Line 6: Line 9:
| Download Link
| Download Link
|-
|-
| ts-x11-image
| ts-x11-image (Yocto Zeus)
| [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/fido/ts-x11-image-tsimx6-latest.tar.bz2 Download]
| [https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/zeus/ts-x11-image-tsimx6-latest.rootfs.tar.bz2 Download]
|}
|}


To write this to an SD card, first partition the SD card to have one large ext4 partition.  See the guide [[#Partition i.MX6 SD cards|here]] for more information.  Once it is formatted, extract this tar with:
To write this to an SD card, first partition the SD card to have one large ext3 partition.  Most SD cards include one MBR partition by default.  Cards can also be partitioned with fdisk, cfdisk, or the graphical gparted utility. This should be an MBR partition table, not GPT.  Once it is partitioned, format the SD and extract this tar with:
<source lang=bash>
<source lang=bash>
# Assuming your SD card is /dev/sdc with one partition
# Assuming your SD card is /dev/sdc with one partition
mkfs.ext4 /dev/sdc1
mkfs.ext3 /dev/sdc1
mkdir /mnt/sd/
mkdir /mnt/sd/
sudo mount /dev/sdc1 /mnt/sd/
sudo mount /dev/sdc1 /mnt/sd/
sudo tar -jxf ts-x11-image-tsimx6-latest.rootfs.tar.bz2 -C /mnt/sd
sudo tar --numeric-owner -jxf ts-x11-image-tsimx6-latest.rootfs.tar.bz2 -C /mnt/sd
sudo umount /mnt/sd
sudo umount /mnt/sd
sync
sync
</source>
</source>
{{:U-Boot ext4 warning}}
To rewrite the eMMC, boot to the SD card.  You cannot rewrite the eMMC while it is mounted elsewhere, or used to currently boot the system.  Once booted to the SD, run:
<source lang=bash>
mkfs.ext3 /dev/mmcblk2p1
mkdir /mnt/emmc
mount /dev/mmcblk2p1 /mnt/emmc
wget -qO- https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/zeus/ts-x11-image-tsimx6-latest.rootfs.tar.bz2 | tar --numeric-owner xj -C /mnt/emmc/
umount /mnt/emmc
sync
</source>
The same commands can be used to write SATA by substituting /dev/mmcblk2p1 with /dev/sda1.


Once installed the default user is "root" with no password.
=== First Boot ===
The stock Yocto image provides a single login of <source lang=bash inline>root</source> with no password. With Zeus, the wired ethernet interface will attempt to acquire an IP address via DHCP automatically. However, it is not possible to log in via the network at this time due to security of the device requiring a password for SSH access. Initial login to the device must first be done on the [[#Getting_Console_and_Powering_up|serial console]].

Latest revision as of 17:00, 17 January 2022

Yocto itself is a set of scripts and tools used to build a custom distribution. In our default images we try to include all the common utilities requested by users. Rebuilding Yocto should not be necessary for many users, but is possible if needed. See the Custom Build Yocto section for information on this process.


Our Yocto rootfs tarball is available here:

Yocto Download Links
Yocto Image Download Link
ts-x11-image (Yocto Zeus) Download

To write this to an SD card, first partition the SD card to have one large ext3 partition. Most SD cards include one MBR partition by default. Cards can also be partitioned with fdisk, cfdisk, or the graphical gparted utility. This should be an MBR partition table, not GPT. Once it is partitioned, format the SD and extract this tar with:

# Assuming your SD card is /dev/sdc with one partition
mkfs.ext3 /dev/sdc1
mkdir /mnt/sd/
sudo mount /dev/sdc1 /mnt/sd/
sudo tar --numeric-owner -jxf ts-x11-image-tsimx6-latest.rootfs.tar.bz2 -C /mnt/sd
sudo umount /mnt/sd
sync
Note: The ext4 filesystem can be used instead of ext3, but it may require additional options. U-Boot does not support the 64bit addressing added as the default behavior in recent revisions of mkfs.ext4. If using e2fsprogs 1.43 or newer, the options "-O ^64bit,^metadata_csum" must be used with ext4 for proper compatibility. Older versions of e2fsprogs do not need these options passed nor are they needed for ext3.

To rewrite the eMMC, boot to the SD card. You cannot rewrite the eMMC while it is mounted elsewhere, or used to currently boot the system. Once booted to the SD, run:

mkfs.ext3 /dev/mmcblk2p1
mkdir /mnt/emmc
mount /dev/mmcblk2p1 /mnt/emmc
wget -qO- https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/zeus/ts-x11-image-tsimx6-latest.rootfs.tar.bz2 | tar --numeric-owner xj -C /mnt/emmc/
umount /mnt/emmc
sync

The same commands can be used to write SATA by substituting /dev/mmcblk2p1 with /dev/sda1.

First Boot

The stock Yocto image provides a single login of root with no password. With Zeus, the wired ethernet interface will attempt to acquire an IP address via DHCP automatically. However, it is not possible to log in via the network at this time due to security of the device requiring a password for SSH access. Initial login to the device must first be done on the serial console.