<div dir="ltr"><div dir="ltr"><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 30, 2019 at 9:21 PM Christian Mauderer <<a href="mailto:list@c-mauderer.de">list@c-mauderer.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 30/06/2019 17:29, Vijay Kumar Banerjee wrote:<br>
> ---<br>
> Makefile.todo | 13 ++++++<br>
> libbsd.py | 12 +++++<br>
> rtemsbsd/include/bsp/nexus-devices.h | 2 +<br>
> .../machine/rtems-bsd-kernel-namespace.h | 2 +<br>
> rtemsbsd/include/rtems/bsd/local/fb_if.h | 45 +++++++++++++++++++<br>
> rtemsbsd/include/rtems/bsd/local/opt_splash.h | 0<br>
> .../include/rtems/bsd/local/opt_syscons.h | 0<br>
> rtemsbsd/include/rtems/bsd/local/opt_teken.h | 0<br>
> rtemsbsd/local/fb_if.c | 30 +++++++++++++<br>
> 9 files changed, 104 insertions(+)<br>
> create mode 100644 rtemsbsd/include/rtems/bsd/local/fb_if.h<br>
> create mode 100644 rtemsbsd/include/rtems/bsd/local/opt_splash.h<br>
> create mode 100644 rtemsbsd/include/rtems/bsd/local/opt_syscons.h<br>
> create mode 100644 rtemsbsd/include/rtems/bsd/local/opt_teken.h<br>
> create mode 100644 rtemsbsd/local/fb_if.c<br>
> <br>
> diff --git a/Makefile.todo b/Makefile.todo<br>
> index 358d6956..ed1e428e 100644<br>
> --- a/Makefile.todo<br>
> +++ b/Makefile.todo<br>
> @@ -51,6 +51,8 @@ GENERATED += $(LOCAL_INC)/clknode_if.h<br>
> GENERATED += $(LOCAL_SRC)/clknode_if.c<br>
> GENERATED += $(LOCAL_INC)/hdmi_if.h<br>
> GENERATED += $(LOCAL_SRC)/hdmi_if.c<br>
> +GENERATED += $(LOCAL_INC)/fb_if.h<br>
> +GENERATED += $(LOCAL_SRC)/fb_if.c<br>
> GENERATED += rtemsbsd/include/machine/rtems-bsd-regdomain.h<br>
> GENERATED += rtemsbsd/rtems/rtems-bsd-regdomain.c<br>
> <br>
> @@ -266,6 +268,17 @@ $(LOCAL_SRC)/hdmi_if.c: $(FREEBSD_SRC)/sys/dev/hdmi/hdmi_if.m<br>
> -e 's|#include "hdmi_if.h"|#include <rtems/bsd/local/hdmi_if.h>|'<br>
> mv hdmi_if.c $@<br>
> <br>
> +$(LOCAL_INC)/fb_if.h: $(FREEBSD_SRC)/sys/dev/fb/fb_if.m<br>
> + awk -f $(TOOLS)/makeobjops.awk $< -h<br>
> + mv fb_if.h $@<br>
> +<br>
> +$(LOCAL_SRC)/fb_if.c: $(FREEBSD_SRC)/sys/dev/fb/fb_if.m<br>
> + awk -f $(TOOLS)/makeobjops.awk $< -c<br>
> + sed -i fb_if.c \<br>
> + -e '1 i\#include <machine/rtems-bsd-kernel-space.h>\n' \<br>
> + -e 's|#include "fb_if.h"|#include <rtems/bsd/local/fb_if.h>|'<br>
> + mv fb_if.c $@<br>
> +<br>
> $(LOCAL_SRC)/gpio_if.c: $(FREEBSD_SRC)/sys/dev/gpio/gpio_if.m<br>
> awk -f $(TOOLS)/makeobjops.awk $< -c<br>
> mv gpio_if.c $@<br>
> diff --git a/libbsd.py b/libbsd.py<br>
> index b21ddccf..bce1d268 100644<br>
> --- a/libbsd.py<br>
> +++ b/libbsd.py<br>
> @@ -799,6 +799,14 @@ class display(builder.Module):<br>
> 'sys/dev/videomode/ediddevs.h',<br>
> 'sys/dev/videomode/ediddevs_data.h',<br>
> 'sys/dev/videomode/vesagtf.h',<br>
> + 'sys/arm/ti/am335x/am335x_lcd.h',<br>
> + 'sys/arm/ti/am335x/am335x_pwm.h',<br>
> + 'sys/dev/fb/fbreg.h',<br>
> + 'sys/dev/vt/vt.h',<br>
> + 'sys/teken/teken.h',<br>
>From the header:<br>
<br>
This library converts an UTF-8 stream of bytes to terminal drawing<br>
commands.<br>
<br>
Where is that necessary?<br></blockquote><div>This is being included in the terminal.h, the defines are necessary hence</div><div>I haven't added teken.c </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> + 'sys/sys/fbio.h',<br>
> + 'sys/sys/consio.h',<br>
> + 'sys/sys/terminal.h',<br>
> ]<br>
> )<br>
> self.addKernelSpaceSourceFiles(<br>
> @@ -811,6 +819,9 @@ class display(builder.Module):<br>
> 'sys/dev/videomode/edid.c',<br>
> 'sys/dev/videomode/vesagtf.c',<br>
> 'sys/dev/videomode/videomode.c',<br>
> + 'sys/arm/ti/am335x/am335x_lcd.c',<br>
> + 'sys/arm/ti/am335x/am335x_pwmss.c',<br>
> + 'sys/arm/ti/am335x/am335x_ecap.c',<br>
> ],<br>
> mm.generator['source']()<br>
> )<br>
> @@ -818,6 +829,7 @@ class display(builder.Module):<br>
> [<br>
> 'local/clknode_if.c',<br>
> 'local/hdmi_if.c',<br>
> + 'local/fb_if.c',<br>
> ],<br>
> mm.generator['source']()<br>
> )<br>
> diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h<br>
> index 3ec136ae..2c718295 100644<br>
> --- a/rtemsbsd/include/bsp/nexus-devices.h<br>
> +++ b/rtemsbsd/include/bsp/nexus-devices.h<br>
> @@ -61,6 +61,8 @@ SYSINIT_DRIVER_REFERENCE(sdhci_ti, simplebus);<br>
> SYSINIT_DRIVER_REFERENCE(mmcsd, mmc);<br>
> SYSINIT_DRIVER_REFERENCE(cpsw, cpswss);<br>
> SYSINIT_DRIVER_REFERENCE(ukphy, miibus);<br>
> +SYSINIT_DRIVER_REFERENCE(am335x_lcd, simplebus);<br>
> +SYSINIT_DRIVER_REFERENCE(am335x_pwmss, simplebus);<br>
> SYSINIT_DRIVER_REFERENCE(rtems_i2c, simplebus);<br>
> SYSINIT_DRIVER_REFERENCE(ofw_iicbus, rtems_i2c);<br>
> SYSINIT_DRIVER_REFERENCE(iic, iicbus);<br>
> diff --git a/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h b/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h<br>
> index bef9f411..3951da79 100644<br>
> --- a/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h<br>
> +++ b/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h<br>
> @@ -46,6 +46,8 @@<br>
> #define altq_remove _bsd_altq_remove<br>
> #define altq_remove_queue _bsd_altq_remove_queue<br>
> #define altqs_inactive_open _bsd_altqs_inactive_open<br>
> +#define am335x_pwm_config_ecap _bsd_am335x_pwm_config_ecap<br>
> +#define am335x_pwmss_driver _bsd_am335x_pwmss_driver<br>
> #define arp_announce_ifaddr _bsd_arp_announce_ifaddr<br>
> #define arp_ifinit _bsd_arp_ifinit<br>
> #define arprequest _bsd_arprequest<br>
> diff --git a/rtemsbsd/include/rtems/bsd/local/fb_if.h b/rtemsbsd/include/rtems/bsd/local/fb_if.h<br>
> new file mode 100644<br>
> index 00000000..7b97028f<br>
> --- /dev/null<br>
> +++ b/rtemsbsd/include/rtems/bsd/local/fb_if.h<br>
> @@ -0,0 +1,45 @@<br>
> +/*<br>
> + * This file is @generated automatically.<br>
> + * Do not modify anything in here by hand.<br>
> + *<br>
> + * Created from source file<br>
> + * freebsd-org/sys/dev/fb/fb_if.m<br>
> + * with<br>
> + * makeobjops.awk<br>
> + *<br>
> + * See the source file for legal information<br>
> + */<br>
> +<br>
> +<br>
> +#ifndef _fb_if_h_<br>
> +#define _fb_if_h_<br>
> +<br>
> +/** @brief Unique descriptor for the FB_PIN_MAX() method */<br>
> +extern struct kobjop_desc fb_pin_max_desc;<br>
> +/** @brief A function implementing the FB_PIN_MAX() method */<br>
> +typedef int fb_pin_max_t(device_t dev, int *npins);<br>
> +<br>
> +static __inline int FB_PIN_MAX(device_t dev, int *npins)<br>
> +{<br>
> + kobjop_t _m;<br>
> + int rc;<br>
> + KOBJOPLOOKUP(((kobj_t)dev)->ops,fb_pin_max);<br>
> + rc = ((fb_pin_max_t *) _m)(dev, npins);<br>
> + return (rc);<br>
> +}<br>
> +<br>
> +/** @brief Unique descriptor for the FB_GETINFO() method */<br>
> +extern struct kobjop_desc fb_getinfo_desc;<br>
> +/** @brief A function implementing the FB_GETINFO() method */<br>
> +typedef struct fb_info * fb_getinfo_t(device_t dev);<br>
> +<br>
> +static __inline struct fb_info * FB_GETINFO(device_t dev)<br>
> +{<br>
> + kobjop_t _m;<br>
> + struct fb_info * rc;<br>
> + KOBJOPLOOKUP(((kobj_t)dev)->ops,fb_getinfo);<br>
> + rc = ((fb_getinfo_t *) _m)(dev);<br>
> + return (rc);<br>
> +}<br>
> +<br>
> +#endif /* _fb_if_h_ */<br>
> diff --git a/rtemsbsd/include/rtems/bsd/local/opt_splash.h b/rtemsbsd/include/rtems/bsd/local/opt_splash.h<br>
> new file mode 100644<br>
> index 00000000..e69de29b<br>
> diff --git a/rtemsbsd/include/rtems/bsd/local/opt_syscons.h b/rtemsbsd/include/rtems/bsd/local/opt_syscons.h<br>
> new file mode 100644<br>
> index 00000000..e69de29b<br>
> diff --git a/rtemsbsd/include/rtems/bsd/local/opt_teken.h b/rtemsbsd/include/rtems/bsd/local/opt_teken.h<br>
> new file mode 100644<br>
> index 00000000..e69de29b<br>
> diff --git a/rtemsbsd/local/fb_if.c b/rtemsbsd/local/fb_if.c<br>
> new file mode 100644<br>
> index 00000000..ceb57e4b<br>
> --- /dev/null<br>
> +++ b/rtemsbsd/local/fb_if.c<br>
> @@ -0,0 +1,30 @@<br>
> +#include <machine/rtems-bsd-kernel-space.h><br>
> +<br>
> +/*<br>
> + * This file is @generated automatically.<br>
> + * Do not modify anything in here by hand.<br>
> + *<br>
> + * Created from source file<br>
> + * freebsd-org/sys/dev/fb/fb_if.m<br>
> + * with<br>
> + * makeobjops.awk<br>
> + *<br>
> + * See the source file for legal information<br>
> + */<br>
> +<br>
> +#include <sys/param.h><br>
> +#include <sys/queue.h><br>
> +#include <sys/kernel.h><br>
> +#include <sys/kobj.h><br>
> +#include <sys/bus.h><br>
> +#include <sys/fbio.h><br>
> +#include <rtems/bsd/local/fb_if.h><br>
> +<br>
> +struct kobjop_desc fb_pin_max_desc = {<br>
> + 0, { &fb_pin_max_desc, (kobjop_t)kobj_error_method }<br>
> +};<br>
> +<br>
> +struct kobjop_desc fb_getinfo_desc = {<br>
> + 0, { &fb_getinfo_desc, (kobjop_t)kobj_error_method }<br>
> +};<br>
> +<br>
> <br>
</blockquote></div></div>