Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:arm:tqma28:linux:ptxdist:how_to [2018/07/23 12:59] – added label product_type liedmannen:arm:tqma28:linux:ptxdist:how_to [2022/08/04 15:02] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ~~NOCACHE~~ ~~NOCACHE~~
-<embed en:templates:tabs_new>+<embed en:templates:tabs_ptxdist_bootstrap>
   <label product_type>Embedded module</label>   <label product_type>Embedded module</label>
   <label lang>en</label>   <label lang>en</label>
Line 42: Line 42:
  
 <WRAP round alert>These commands erase the MBR and the system is not bootable anymore afterwards!\\ The system detects this and switches to rescue mode after a short while, thus a new firmware image can be installed using the MFG-Tool.</WRAP> <WRAP round alert>These commands erase the MBR and the system is not bootable anymore afterwards!\\ The system detects this and switches to rescue mode after a short while, thus a new firmware image can be installed using the MFG-Tool.</WRAP>
 +
 +----
 +
 +==== U-Boot 2013.04 | MMC timeouts ====
 +<code>
 +MMC:   MXS MMC: 0, MXS MMC: 1
 +MMC0: Command 8 timeout (status 0xe03c4020)
 +MMC0: Command 55 timeout (status 0xe02c4020)
 +</code>
 +These timeouts are **no** errors and totally normal U-Boot behaviour.
 +
 +U-Boot probes the device connected to the Synchronous Serial Port. In order to identify eMMC or SD cards U-Boot sends these two commands. A timeout on both commands identifies the eMMC.
 +
 +==== U-Boot | Warning: FECx MAC addresses don't match ====
 +<code>
 +FEC0 [PRIME]
 +Warning: FEC0 MAC addresses don't match:
 +Address in SROM is         00:d0:00:00:00:00
 +Address in environment is  02:00:01:00:00:01
 +, FEC1
 +</code>
 +In U-Boot the MAC address for networking tasks (tftp, ping, dhcp, etc) and to pass to the kernel is stored in the variable **ethaddr**. This variable is defined in the default environment (this is the one used, when environment on e-MMC can't be loaded) with a generic "local-only" MAC address (i.e. first byte, bit 1 "U/L" = 1)
 +
 +During ethernet initialisation U-Boot checks MAC address stored in OTP and compares both addresses. Hence the warning.
 +
 +To disable the warning you need to set **ethaddr** to your OTP-saved MAC:
 +<code>
 +TQMa28 U-Boot > setenv ethaddr 00:0d:xx:xx:xx:xx; saveenv
 +</code>
 +
 +Using __U-Boot 2013.04__ you can also simply use the command otp_mxs:
 +<code>
 +TQMa28 U-Boot > print ethaddr
 +ethaddr=02:00:01:00:00:01
 +TQMa28 U-Boot > otp_mxs getmac; saveenv
 +TQMa28 U-Boot > print ethaddr
 +ethaddr=00:D0:00:00:00:00
 +</code>
 +
 +==== Linux | Error: no PHY found or Segmentation fault when ifconfig up ====
 +BSP0106 changed the default source of ENET_CLK to external oscillator. Previously the source was FEC unit inside the CPU. The source is selected in U-Boot, which provides the setting to kernel via device tree (TQMa28/28L) or command-line (TQMa28-fsl).
 +
 +U-Boot informs about the selected clock on boot:
 +  * **Net:   [FEC MXS: Using external ENET_CLK]**
 +  * **Net:   [FEC MXS: Using internal ENET_CLK]**
 +
 +To switch ENET_CLK source to internal FEC unit:
 +<code>
 +TQMa28 U-Boot > setenv enet_clk_internal 1; saveenv; reset
 +</code>
 +
 +Switching back is easy:
 +<code>
 +TQMa28 U-Boot > setenv enet_clk_internal; saveenv; reset
 +# notice that setenv assigns no value to delete the variable
 +</code>
 +
 +U-Boot selects the internal ENET_CLK source upon presence of this environment variable with a positive value (y/yes/1).
 +The variable is evaluated during ethernet initialisation and therefore a change in the variable takes place upon next boot.
 +
 +==== PTXdist | Error: Couldn't allocate a block (no free space) ====
 +Creating root.ext2 from working dir...<BSP project path>/platform-<platform_name>/sysroot-host/bin/genext2fs: couldn't allocate a block (no free space)
 +
 +The error signals that the filesystem is too small for the content that should be installed. Increase size.
 +
 +<code>
 +=> go to ptxdist menu
 +=> platformconfig
 +=> image creation options
 +=> Generate images/root.ext2
 + -> Size in kilobytes: increase to reasonable size (65536 should be enough for most cases)
 +</code>
 +
 +==== PTXdist | Download packages through proxy authentication ====
 +In case you have a proxy server in your local network that requires user authentication before going online,
 +you have several ways to have ptxdist perform the authentication for you when downloading packages.
 +
 +Because ptxdist relies on the program wget to download sources,
 +we need to tell wget about the authentication: 
 +<code>
 +(tested)
 +=> edit /etc/wgetc (needs sudo privileges)
 +=> Add lines anywhere in the file:
 + http_proxy = http://<proxy address>:<proxy port>/
 + ftp_proxy = ftp://<proxy address>:<proxy port>/
 + proxy_user = <your proxy username>
 + proxy_password = <your proxy password>
 + use_proxy = on
 +</code>
 +
 +<code>
 +(untested - please tell us if one of these works for you)
 +> Change ptxdist setting at "User Properties" - "Proxies"
 + -> Set http proxy to this format: http://<username>:<password>@<proxy address>:<port>/
 + -> Adapt for the ftp proxy
 +> Or export http_proxy and ftp_proxy environment variables alike
 +</code>
 +
 +==== U-Boot | "MMC: block number ... exceeds max (...)" ===
 +The reason for this error is that the saved environment belongs to a different U-Boot version.
 +TQ provides U-Boot in versions 2009.08 and 2012.10, because the kernels can't run both on 2009.08.
 +The syntax of some commands changed between U-Boot versions and thus their environment (which holds scripts using these commands) are incompatible.
 +
 +=> To resolve this error please delete the saved environment as follows depending on your current U-Boot version:
 +  * U-Boot 2009.08
 +<code>
 +mw.b $loadaddr 0 512
 +mmc write 0 $loadaddr 2 1
 +</code>
 +  * U-Boot 2012.10
 +<code>
 +mw.b $loadaddr 0 512
 +mmc dev 0
 +mmc write $loadaddr 2 1
 +</code>
 +
 +<WRAP round important>Please consider a [[en:arm:tqma28:linux:ptxdist:known_issues|known issue]] where the environment gets always saved to e-MMC\\ even when booting the SD card.</WRAP>
 +
 +==== U-Boot | "set read bl len failed" on access to SD card ====
 +=> After being plugged in the sd card must be initialised prior to any access. The command <code>mmc rescan 1</code> does that.
 +
 +==== U-Boot | Usage messages for the command "setenv" ====
 +U-Boot prints the following error message at boot time: 
 +<code>
 +setenv - set environment variables
 +
 +Usage:
 +setenv name value ...
 +    - set environment variable 'name' to 'value ...'
 +setenv name
 +    - delete environment variable 'name'
 +</code>
 +=> Amongst others a reason for this is that the U-Boot environment variable //bootargs// has been accidentally stored in the flash environment and already contains a value. The error occurs because the final value (string) to be stored in this variable eventually becomes too long.
 +
 +To remedy just clear the variable //bootargs// und save the environment to flash:
 +
 +<code>
 +setenv bootargs
 +saveenv
 +</code>
 +
 +==== Errormessage "can't access tty" at login ====
 +
 +If you use a precompiled rootfs you probably encounter following error message:
 +<code>
 +generic-armv5te login: root
 +-sh: can't access tty; job control turned off
 +root@generic-armv5te:~#
 +</code>
 +
 +To resolve this issue specify your real console in /etc/inittab
 +<code>
 +#change following line
 +S:2345:respawn:/sbin/getty 115200 console
 +#to i.e. (depending on your console, see your kernel command line arguments)
 +S:2345:respawn:/sbin/getty 115200 ttyAPP3
 +</code>
 +and reboot.
 +
 +
 +
 +==== Linux boot Kernel panic Unable to mount root fs ====
 +
 +Error message:
 +<code>
 +[    1.090000] VFS: Cannot open root device "mmcblk0p3" or unknown-block(0,0): error -6
 +[    1.100000] Please append a correct "root=" boot option; here are the available partitions:
 +[    1.110000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
 +[    1.110000] [<c00139f8>] (unwind_backtrace+0x0/0xf0) from [<c02f87fc>] (panic+0x98/0x1f4)
 +[    1.110000] [<c02f87fc>] (panic+0x98/0x1f4) from [<c042cbf4>] (mount_block_root+0x178/0x22c)
 +[    1.110000] [<c042cbf4>] (mount_block_root+0x178/0x22c) from [<c042cd8c>] (mount_root+0xe4/0x10c)
 +[    1.110000] [<c042cd8c>] (mount_root+0xe4/0x10c) from [<c042ced0>] (prepare_namespace+0x11c/0x180)
 +[    1.110000] [<c042ced0>] (prepare_namespace+0x11c/0x180) from [<c042c8b0>] (kernel_init+0x170/0x1ac)
 +[    1.110000] [<c042c8b0>] (kernel_init+0x170/0x1ac) from [<c000f8b4>] (kernel_thread_exit+0x0/0x8)
 +[    1.110000] Rebooting in 1 seconds..
 +</code>
 +
 +Kernel command line:
 +<code>
 +[    0.000000] Kernel command line: fec_mac=02:00:01:00:00:01 ip=:::::eth0:off root=/dev/mmcblk0p3 ro console=ttyAPP3,115200 lcd_panel=fg0700 ssp1 panic=1
 +</code>
 +
 +U-Boot mmc part lists the partition:
 +<code>
 +TQMa28 U-Boot > mmc part
 +
 +Partition Map for MMC device 0  --   Partition Type: DOS
 +
 +Partition     Start Sector     Num Sectors     Type
 +    1                16384           16384      53
 +    2                32768           16384      83
 +    3                49152         3784704      83
 +</code>
 +
 +Solution: add the ''rootwait'' option to the command line:
 +
 +<code>
 +TQMa28 U-Boot > setenv addmmc 'setenv bootargs $bootargs root=/dev/mmcblk0p3 ro rootwait'
 +</code>
 +
 +----
  • Last modified: 2022/08/04 15:04