Jetpack3.1 boot from ramdisk

Hello,

I am trying to boot from ramdisk using TX2(R28.1).
but such logs appear at startup, and the ethrnet can’t be used.
Do you know the cause?

ubuntu-tx2 kernel: [    0.110402] devtmpfs: initialized
ubuntu-tx2 kernel: [    0.136694] Initilizing CustomIPI irq domain
ubuntu-tx2 kernel: [    0.136884] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
ubuntu-tx2 kernel: [    0.144394] pinctrl core: initialized pinctrl subsystem
ubuntu-tx2 kernel: [    0.144773] regulator-dummy: no parameters
ubuntu-tx2 kernel: [    0.144878] Initializing plugin-manager
ubuntu-tx2 kernel: [    0.144931] Plugin module not found
ubuntu-tx2 kernel: [    0.145145] chosen/plugin-manager does'nt have ids, nct and odm-data
ubuntu-tx2 kernel: [    0.145157] Error in parsing node /plugin-manager/soc-prod-a01-fragment: -22
ubuntu-tx2 kernel: [    0.145335] chosen/plugin-manager does'nt have ids, nct and odm-data
ubuntu-tx2 kernel: [    0.145370] Error in parsing node /plugin-manager/soc-prod-a02-fragment: -22
ubuntu-tx2 kernel: [    0.145552] chosen/plugin-manager does'nt have ids, nct and odm-data
ubuntu-tx2 kernel: [    0.145561] Error in parsing node /plugin-manager/fragement@0: -22
ubuntu-tx2 kernel: [    0.145740] chosen/plugin-manager does'nt have ids, nct and odm-data
ubuntu-tx2 kernel: [    0.145749] Error in parsing node /plugin-manager/fragement@1: -22
ubuntu-tx2 kernel: [    0.145927] chosen/plugin-manager does'nt have ids, nct and odm-data
ubuntu-tx2 kernel: [    0.145937] Error in parsing node /plugin-manager/fragement@2: -22
ubuntu-tx2 kernel: [    0.146115] chosen/plugin-manager does'nt have ids, nct and odm-data

[What I have been to]

edit:64_TX2/Linux_for_Tegra_tx2/bootloader/t186ref/p2771-0000/extlinux.conf.emmc

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      FDT /boot/tegra186-quill-p3310-1000-c03-00-base.dtb
      APPEND console=ttyS0,115200n8 console=tty0 OS=l4t fbcon=map:0 net.ifnames=0 memtype=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x03100000 nvdumper_reserved=0x2772e0000 gpt tegraid=18.1.2.0.0 tegra_keep_boot_clocks maxcpus=6 androidboot.serialno=0320318054817 bl_prof_dataptr=0x10000@0x277240000 sdhci_tegra.en_boot_part_access=1 root=/boot/rootfs.img rw rootwait

create rootfs.img and put in 64_TX2/Linux_for_Tegra_tx2/rootfs/boot/.

write for flash
sudo ./flash.sh jetson-tx2 mmcblk0p1

naoto,

I don’t think we support boot from ramdisk… Where do you see such configuration?

WayneWWW

Thanks for the reply.

I have TX2 on carrier board,
challenging rootfs for ramdisk.

ubuntu has started, mouse, keyboard, SDcard are available,
but I can’t use ethernet.
Perhaps I think that this error is the cause.

admin@ubuntu-tx2:~$ ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

admin@ubuntu-tx2:~$ sudo ifconfig eth0 up
SIOCSIFFLAGS: Cannot assign requested address
admin@ubuntu-tx2:~$

Where do you see such configuration?
I can’t find that configuration.

I think that “FDT” field you added is the cause of this problem. We don’t support FDT in extlinux.conf anymore.

Please remove that line first.

Please remove that line first.

OK.
remove that line.
but,kernel don’t start.

Retrieving file: /boot/rootfs.img
406904035 bytes read in 326996 ms (1.2 MiB/s)
Retrieving file: /boot/Image
20280368 bytes read in 537 ms (36 MiB/s)
append: console=ttyS0,115200n8 console=tty0 OS=l4t console=ttyS0,115200n8 console=tty0 OS=l4t fbcon=map:0 net.ifnames=0 net.ifnames=0 memtype=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x03100000 nvdumper_reserved=0x2772e0000 gpt tegraid=18.1.2.0.0 tegra_keep_boot_clocks maxcpus=6 androidboot.serialno=0320318054817 bl_prof_dataptr=0x10000@0x277240000 sdhci_tegra.en_boot_part_access=1 initrd=/boot/rootfs.img rw rootwait
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No controllers found
ethernet@2490000 Waiting for PHY auto negotiation to complete...... done
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.100.48 (355 ms)
*** Warning: no boot file name; using 'C0A86430.img'
Using ethernet@2490000 device
TFTP from server 0.0.0.0; our IP address is 192.168.100.48; sending through gateway 192.168.100.1
Filename 'C0A86430.img'.
Load address: 0x80080000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
missing environment variable: pxeuuid
Retrieving file: /boot/extlinux/pxelinux.cfg/01-00-04-4b-a8-1c-d4
ethernet@2490000 Waiting for PHY auto negotiation to complete...... done
:
:

I tried
“sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1”
result was the same

naoto,

I don’t know much about ramdisk. Maybe other forum users could share some methods here.

WayneWWW

We don’t support FDT in extlinux.conf anymore.
R24.2.1 supported FDT.
R24.2.1 is success boot from ramdisk.

I have a question.
I understood R28.1 is no supported FDT.
Is the cause kernel? Is it u-boot? both?

FDT worked until the R28.1 release when the TX1 and TX2 began using a unified sample rootfs configuration. The boot itself got somewhat more complicated since the two boot differently, and device tree content was moved into other partitions (see “gdisk -l /dev/mmcblk0” for a list of partitions). Part of device tree is used for different stages of boot, e.g., there is a cboot stage device tree, U-Boot stage device tree, Linux kernel device tree, and so on (it actually gets a bit finer than that, but I haven’t read that deeply). Each stage will of course inherit the prior stage to some extent because the hardware will have been set up. The flash script puts the right content in the right place. Details differ depending on release (see the R28.1 customization docs).

Device tree is supported, FDT as a method of using it is not (yes, it is inconvenient). In R28.1 you are probably interested in flashing the “DTB” partition (mmcblk0p13 under R28.1).

The story behind this is from cboot. dtb is picked from DTB partition, and cboot would add some key entries before passing to u-boot. Earlier BSP does not have such change and thus it was working.

For your usecase, plugin-manager seems lose lots of info from DTB. I believe those missing info is added by cboot.

linuxdev, WayneWWW

Thanks for the reply.
I decided to go on without using FDT.
However, without FDT, I have the following error and I don’t know the cause.

ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing ...

I am still trying to solve this u-boot error without using FDT.
Do you have any idea?

Finally, the problem has been fixed.
The cause is the size of “rootfs.img”.
The following is u-boot configuration.

fdt_addr=92000000
ramdisk_addr_r=0x82100000

As rootfs.img has a size of 388Mbyte, when it is loaded to ramdisk_addr_r fdt_addr area has been overwritten.

By making the size of rootfs.img smaller I could boot the kernel and use the ethernet.

Thanks for your help.

naoto,

So you are still using FDT in extlinux.conf? or configure it in uboot?

WayneWWW,

extlinux.conf

TIMEOUT 30
DEFAULT primary

MENU TITLE p2771-0000 eMMC boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/rootfs.img
      APPEND initrd=/boot/rootfs.img rw rootwait console=ttyS0,115200n8 console=tty0 OS=l4t console=ttyS0,115200n8 console=tty0 OS=l4t fbcon=map:0 net.ifnames=0 net.ifnames=0 memtype=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x03100000 nvdumper_reserved=0x2772e0000 gpt tegraid=18.1.2.0.0 tegra_keep_boot_clocks maxcpus=6 androidboot.serialno=0320318054817 bl_prof_dataptr=0x10000@0x277240000 sdhci_tegra.en_boot_part_access=1

u-boot has not been change.

INITRD /boot/rootfs.img → Is this your custom rootfs.img?

INITRD /boot/rootfs.img → Is this your custom rootfs.img?

Yes, my custom.

For example

# cd rootfs_custom
# ls
 bin  boot  dev  etc  home  init  lib  lost+found  media....
# find . | sudo cpio --quiet -H newc -o | sudo gzip -9 -n > ../rootfs.img.gz
# cd ../
# cp rootfs.img.gz 64_TX2/Linux_for_Tegra_tx2/rootfs/boot/rootfs.img

You might add echo statements in your init script, and monitor with serial console. See which steps show up. Then you can use that as debug output.

This was for a TX2 using a newer release (all of the initrd install steps would differ), but it makes a point that to see echo from an initrd you may need to change something (not sure how this might apply on a TK1, but it might be needed to see echo statements over serial early on):
[url]https://devtalk.nvidia.com/default/topic/1041772/jetson-tx1/r28-2-initrd-and-device-tree-/post/5288245/#5288245[/url]