[U-Boot] "fdt" commands in extlinux.conf ?

2018-01-07 Thread Ken Harris
I'd like to enable the CANbus on a Beagle Bone Black (on Fedora ...
which doesn't do "cape manager").

The crux is a fdt command in u-boot :

fdt set d_can1 status okay

Is there a way to do this in extlinux.conf ?

I didn't see a way (in uboot 2017.09), so I wrote a uEnv.txt script
(see attached).

That's a bit verbose and duplicates a bunch of stuff already in uboot
(also : uEnv.txt doesn't exist on my "Orange Pi One").

It there a simpler way to state "fdt" commands ?

Thanks

##run findfdt; run init_console
##mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device 
${mmcdev};fi
###run distro_bootcmd

##run loadbootenv; run importbootenv

devtype=mmc
bootpart=0:1

## scan_dev_for_boot_part ??
## finduuid ??

uuid=b2c019d9-2401-4a22-9a40-36a92a00cdfe

#u0=-4.13.11-200.fc26.armv7hl
#u0=-4.13.12-300.fc27.armv7hl
u0=-4.13.13-300.fc27.armv7hl

loadfdt=load ${devtype} ${bootpart} ${fdtaddr} dtb${u0}/${fdtfile}

loadramdisk=load ${devtype} ${bootpart} ${rdaddr} uInitrd${u0}

loadimage=load ${devtype} ${bootpart} ${loadaddr} vmlinuz${u0}

##fdt addr ${fdtaddr}

### CBB-Serial :
#fdt set d_can1 status okay
#fdt set d_can0 status okay
#fdt set serial1 status disable
#fdt set serial2 status okay
#fdt set i2c2 status disable
#fdt set serial4 status okay

uenvcmd=run loadimage; run loadramdisk; run loadfdt; fdt addr ${fdtaddr} ; fdt 
set d_can1 status okay ; fdt set d_can0 status okay ; fdt set serial1 status 
disable ; fdt set serial2 status okay ; fdt set i2c2 status disable ; fdt set 
serial4 status okay ; setenv bootargs ro root=UUID=${uuid}; bootz ${loadaddr} 
${rdaddr} ${fdtaddr}

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] "fdt" commands in extlinux.conf ?

2018-01-07 Thread Peter Robinson
On Sun, Jan 7, 2018 at 4:04 AM, Ken Harris  wrote:
> I'd like to enable the CANbus on a Beagle Bone Black (on Fedora ...
> which doesn't do "cape manager").

Well Fedora doesn't so stuff that's not upstream, and while there's
been a bunch of discussion there's been no decision upstream of how
best to do overlay management.

> The crux is a fdt command in u-boot :
>
> fdt set d_can1 status okay
>
> Is there a way to do this in extlinux.conf ?

You could probably load an overlay and save the environment? Dealing
with this better in Fedora is on my
 todo list to get to eventually.

> I didn't see a way (in uboot 2017.09), so I wrote a uEnv.txt script
> (see attached).
>
> That's a bit verbose and duplicates a bunch of stuff already in uboot
> (also : uEnv.txt doesn't exist on my "Orange Pi One").
>
> It there a simpler way to state "fdt" commands ?
>
> Thanks
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] "fdt" commands in extlinux.conf ?

2018-01-08 Thread Ken Harris
On Sun, Jan 7, 2018 at 6:39 PM, Peter Robinson  wrote:
> On Sun, Jan 7, 2018 at 4:04 AM, Ken Harris  wrote:

>> The crux is a fdt command in u-boot :
>>
>> fdt set d_can1 status okay
>>
>> Is there a way to do this in extlinux.conf ?

> You could probably load an overlay and save the environment?

FYI, this is not an overlay (fdt apply), but just a "fdt set" command
: the d_can1 section is already in am335x-boneblack.dtb (but with
status = "disabled")

>> I didn't see a way (in uboot 2017.09), so I wrote a uEnv.txt script
>> (see attached).
>>
>> That's a bit verbose and duplicates a bunch of stuff already in uboot

> Dealing with this better in Fedora is on my todo list to get to eventually.

Thanks, but as the uEnv.txt script shows, this can be handled in
u-boot and Fedora will react to those changes.

>> It there a simpler way to state "fdt" commands ?

It seems to me there should be some new fields in extlinux.conf to
state u-boot "fdt" commands, such as "fdt set" and "fdt apply"

>> Thanks
>>
>> ___
>> U-Boot mailing list
>> U-Boot@lists.denx.de
>> https://lists.denx.de/listinfo/u-boot
>>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot