0

i got the problem that a device isnt booting up into linux. It just holds on "Starting kernel ...".

To get a better grip on what goes wrong i thought it would be nice to get access to the logs from linux.

I can access the userland from uboot via "ls":

Zynq> ls mmc 0:2 
ostree/deploy/poky/deploy/9d325972b955e6584d3fad0a7ff1bf1a8.0/etc
<DIR>       2048 .
<DIR>       1024 ..
<DIR>       1024 modprobe.d
            0 motd
<DIR>       1024 xdg
<DIR>       1024 logrotate.d
          58 rpcbind.conf
        1633 inputrc
         828 mke2fs.conf
          15 timestamp
       10929 login.defs
         324 issue
<DIR>       1024 sudoers.d
etc ...

Now im looking for a way to copy files from the userland to another device(remote-pc).

I learned about "tftpput" which is available in uboot. My problem is that "tftpput" expects a save address and size. But i dont know how to get those information.

tftpput - TFTP put command, for uploading files to a server

Usage:
tftpput Address Size [[hostIPaddr:]filename]

I was not able to find a good documentation on "tftpput". Maybe someone has a link for me or provide me a small "how to" about this?

Thanks in advance

Heiko
  • 103
  • 1
  • 6

3 Answers3

0

To answer the specific question, you need a tftp server on another machine. Then when you use 'load' to bring a file into memory you will now have that address, $filesize will now be set for you (for the size parameter) and the machine you setup a tftp server on is the final part of the command.

That said, if you only see "Starting kernel" and nothing else, it is quite likely that the linux kernel isn't getting to the point where the rootfs is mounted, userland runs and you're going to see log files. Without more information it's hard to say what you need to do here, but your bootargs are the first place to make sure are correct.

Tom Rini
  • 2,058
  • 8
  • 11
  • Hi, thanks for your help. Sadly i got a new task with higher priority so i will not be able to test this immediately. – Heiko Mar 07 '19 at 08:32
0

To analyze why the kernel is not booting you could enable the early console.

For ARM 64bit systems the early console is enabled via the kernel command line parameters. U-Boot takes these from the environment variable bootargs.

The arguments for earlycon depend on your board, e.g. for the Odroid C2:

setenv bootargs earlycon=meson,0xc81004c0

For an early console on 32bit ARM system you will have to compile the kernel with appropriate configuration options, e.g. for the Banana Pi:

CONFIG_DEBUG_LL=y
CONFIG_DEBUG_SUNXI_UART0=y
CONFIG_EARLY_PRINTK=y
Xypron
  • 2,215
  • 1
  • 12
  • 24
  • Hi, thanks for your help. Sadly i got a new task with higher priority so i will not be able to test this immediately. – Heiko Mar 07 '19 at 08:33
0

lets assume that file.txt has 16bytes of size (it is 10 in hex)

First it is necessary load the file into the memory fatload mmc 1:1 0x40400000 file.txt

Then you can send it to tftp server: tftpput 0x40400000 10 192.168.7.1:filetxt

Robert
  • 1