rpi2 uboot no overlays via nfs

Discussion about U-Boot and the kernel.

rpi2 uboot no overlays via nfs

Postby qaron » Thu Feb 13, 2020 12:08 pm

i have raspberry pi 2 v1.1 and its working via nfs with the exception that no overlays are loaded.

my sd contains:
boot.cmd boot.scr bootcode.bin config.txt start.elf u-boot.bin

my boot.cmd contains:
Code: Select all
setenv kernel kernel7.img
setenv fdtfile bcm2709-rpi-2-b.dtb
setenv initramfs initramfs-linux.img
setenv ipaddr 192.168.1.254
setenv serverip 192.168.1.2
setenv bootargs "ip=192.168.1.254::192.168.1.1:255.255.255.0:pi:eth0:off root=/dev/nfs/ nfsroot=${serverip}:/ rootfstype=ext4 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop"
tftp ${fdt_addr_r} /${fdtfile}
tftp ${kernel_addr_r} /${kernel}
tftp ${ramdisk_addr_r} /${initramfs}
bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};


my config.txt contains:
Code: Select all
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# for more options see http://elinux.org/RPi_config.txt
kernel=u-boot.bin
dtparam=i2c_arm=on


Code: Select all
[pi@pi /]$ cat /etc/modules-load.d/i2c.conf
i2c-dev
i2c-bcm2708

[pi@pi /]$ i2cdetect -y 1
Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory
[pi@pi /]$ i2cdetect -y 0
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory


Code: Select all
[pi@pi /]$ ls /boot
bcm2709-rpi-2-b.dtb       bcm2710-rpi-cm3.dtb       bootcode.bin  fixup_cd.dat         overlays
bcm2710-rpi-2-b.dtb       bcm2836-rpi-2-b.dtb       cmdline.txt   fixup_db.dat         start.elf
bcm2710-rpi-3-b-plus.dtb  bcm2837-rpi-3-b-plus.dtb  config.txt    initramfs-linux.img  start_cd.elf
bcm2710-rpi-3-b.dtb       bcm2837-rpi-3-b.dtb       fixup.dat     kernel7.img          start_db.elf


the system is booting no argue about that BUT!!! arch linux has the ability to update indefinitely and with uboot i want to target my network boot folder, load in memory the kernel7.img/bcm2709-rpi-2-b.dtb/initramfs-linux.img and take advantage of that without worrying about sd degradation. can i do that?
Last edited by qaron on Thu Feb 13, 2020 12:16 pm, edited 1 time in total.
qaron
 
Posts: 3
Joined: Mon Dec 23, 2019 8:04 am

Re: rpi2 uboot no overlays via nfs

Postby qaron » Thu Feb 13, 2020 12:10 pm

and yes before anyone says about permissions:
Code: Select all
[pi@pi /]$ cat /etc/udev/rules.d/i2c.rules
KERNEL=="i2c-[0-9]*", GROUP="wheel"
qaron
 
Posts: 3
Joined: Mon Dec 23, 2019 8:04 am

Re: rpi2 uboot no overlays via nfs

Postby qaron » Sat Feb 15, 2020 12:49 pm

Finally I think , I found it!!!!!
you copy all files inside the sd and you boot the system
you login via ssh and you give this command to create the new device tree for raspberry pi:
Code: Select all
dtc -I fs -O dtb -o base.dtb /proc/device-tree

you copy the file inside the nfs/boot folder and you edit the boot.cmd to download it from the tft server!!!!!!
after that everything works!!!

Code: Select all
[pi@pi ~]$ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --
qaron
 
Posts: 3
Joined: Mon Dec 23, 2019 8:04 am


Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 1 guest