View: 6083|Reply: 4

[Solved] Kernel IP-config

[Copy link]

1

threads

3

posts

31

credits

Novice

Rank: 1

credits
31
Published in 2016-4-3 01:16:40 | Show all floors |Read mode
Edited by jernej at 2016-4-19 06:39

Hi,

I have OrangePI PC with OpenELEC and trying to avoid SD card as much as possible. As current U-Boot does not support gmac yet I am trying at least change OpenELEC's storage (disk) to NFS.

I have changed the kernel bootargs in boot.scr from:
  1. setenv bootargs console=ttyS0,115200 boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 consoleblank=0 noram
Copy code
to:
  1. setenv bootargs ip=dhcp console=ttyS0,115200 boot=/dev/mmcblk0p1 disk=NFS=192.168.1.4:/virtual/diskless/openelec/storage overlay consoleblank=0 noram
Copy code
Unfortunately, network stack was not initialized during kernel boot and storage was not mounted. I can see that boot arguments are passed to kernel:
  1. [    0.000000] Kernel command line: ip=dhcp console=ttyS0,115200 boot=/dev/mmcblk0p1 disk=NFS=192.168.1.4:/virtual/diskless/openelec/storage overlay consoleblank=0 noram
Copy code
But later boot ends with this error:
  1. *** Error in mount_storage: mount_common: Could not mount 192.168.1.4:/virtual/diskless/openelec/storage ***
  2. ### Starting debugging shell... type  exit  to quit ###
Copy code
I can't see any indication of NIC initialization and kernel IP configuration during boot.
In contrast, this is how looks working setup on my older amd64 box with Generic build of OpenELEC:
  1. [    0.000000] Kernel command line: root=/dev/ram0 rdinit=/init usbcore.autosuspend=-1 openelec/KERNEL openelec/KERNEL ip=dhcp boot=NFS=192.168.1.4:/virtual/diskless/openelec disk=NFS=192.168.1.4:/virtual/diskless/openelec/storage overlay
  2. [    3.293776] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
  3. [    3.294669] r8169 0000:03:00.0 eth0: RTL8168evl/8111evl at 0xffffc90000654000, 74:d4:35:8f:7f:de, XID 0c900880 IRQ 29
  4. [    3.294842] r8169 0000:03:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
  5. [    6.586009] Sending DHCP requests .., OK
  6. [    8.875916] IP-Config: Got DHCP answer from 192.168.1.4, my address is 192.168.1.98
  7. [    8.882243] IP-Config: Complete:
  8. [    8.887703]      device=eth0, hwaddr=74:d4:35:8f:7f:de, ipaddr=192.168.1.98, mask=255.255.255.0, gw=192.168.1.1
  9. [    8.893376]      host=tv1, domain=example.com, nis-domain=example
  10. [    8.899032]      bootserver=192.168.1.4, rootserver=192.168.1.4, rootpath=
  11. [    8.899156]      nameserver0=192.168.1.66, nameserver1=192.168.1.16
Copy code

Dou you have any idea what i am missing? Is there something in current kernel setup or in GMAC driver in OpenELEC on Orange PI that prevent kernel ip configuration from working?

Thanks.

1

threads

90

posts

785

credits

Senior member

Rank: 4

credits
785
Published in 2016-4-4 01:59:16 | Show all floors
Edited by lymon at 2016-4-4 02:19

Probably the kernel doesn't have  root NFS support enabled and I'm not sure it's even supported with sunxi's 3.4 crapkernel

wouldn't it be easier to have KODI take care of this through pathsubstitutions in advancedsettings.xml ?

This method also works pretty goodl if you want to share KODI settings/database/icons/cache/passwords/profiles/favorites/etc between different devices running KODI

1

threads

3

posts

31

credits

Novice

Rank: 1

credits
31
 Author| Published in 2016-4-4 04:13:26 | Show all floors
Lymon, thank you. You are right. According to /proc/config.gz there is neither  CONFIG_ROOT_NFS nor CONFIG_IP_PNP in current Openelec kernel config on Orange PI.
I would rather have only U-Boot on SD card, but pathsubstitutions for everything possible is for sure easier then adding NFS root support to the kernel ;-)

Thanks.

1

threads

3

posts

31

credits

Novice

Rank: 1

credits
31
 Author| Published in 2016-4-18 02:57:01 | Show all floors
Guys,

thank you, problem solved. I just added few config options to kernel:

  1. CONFIG_IP_PNP=y
  2. CONFIG_IP_PNP_DHCP=y
  3. CONFIG_IP_PNP_BOOTP=y
  4. CONFIG_ROOT_NFS=y
Copy code

and voilà:

  1. [    6.860206] PHY: gmac0-0:00 - Link is Up - 100/Full
  2. [    9.190025] ., OK
  3. [    9.300032] IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.1.94
  4. [    9.300210] IP-Config: Complete:
  5. [    9.303791]      device=eth0, addr=192.168.1.94, mask=255.255.255.0, gw=192.168.1.1
  6. [    9.312305]      host=orange, domain=xxxxx.yy, nis-domain=xxxxx
  7. [    9.318862]      bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=
Copy code

kernel IP autoconfigured and storage mounted via NFS.

Thanks.

4

threads

1118

posts

9497

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9497
Published in 2016-4-19 13:38:42 | Show all floors
I included those options in my source.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list