Cannot reconfigure pins to gpio

Hi I’m fairly new to embedded linux development and I’ve been stuck on this problem for quite some time so any help would be greatly appreciated.

I am using a BeagleBoneBlack Wireless with Ubuntu 18.04 and Linux Kernel 4.14.108-ti-r113.

i need to reconfigure the pins that are not by default gpio. For example P8_46 pin which is by default an LCD_Data pin.

When using the BBB with a debian stretch image I can use those pins as gpio. However, when I use my ubuntu distro, those pins will not work as gpio. When I try and reconfigure the pins using the config-pin utility I get this error:

P8_46 pinmux file not found! bash: /sys/devices/platform/ocp/ocp*P8_46_pinmux/state: No such file or directory Cannot write pinmux file: /sys/devices/platform/ocp/ocp*P8_46_pinmux/state

I have tried following numerous tutorials online with no luck. I have looked into using device tree overlays but I always get stuck because there is no slots file in this path:

/sys/devices/platform/bone_capemgr/slots

This slots file doesn’t exist and so I can never proceed.

Note: I need to be running the ubuntu distro.

Please help. Thanks!

i need to reconfigure the pins that are not by default gpio. For example
P8_46 pin which is by default an LCD_Data pin.

by default the lcd pins are assigned to/used by the hdmi framer, as per the
system reference manual.

When using the BBB with a debian stretch image I can use those pins as
gpio. However, when I use my ubuntu distro, those pins will not work as
gpio. When I try and reconfigure the pins using the config-pin utility I
get this error:

P8_46 pinmux file not found!

to make these pins available for other purposes you'll need
to disable hdmi, using "disable_uboot_overlay_video=1" in uEnv.txt.

see for example:

and not quite as directly related:

This slots file doesn't exist and so I can never proceed.

the slots stuff is long gone, you need to convince your uboot (via uEnv.txt)
to load the relevant overlays.
see Beagleboard:BeagleBoneBlack Debian - eLinux.org for
a little bit of explanation.

Note: I need to be running the ubuntu distro.

you may have to update your uboot version to make the u-boot overlay stuff
work properly, but otherwise there shouldn't be any big differences
between ubuntu and debian that are relevant for your specific situation.

Thank you so much! This cleared up a lot of confusion for me and I was able to get things working.