Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Compiling an LCD driver for armbian on Allwinner A33.

Featured Replies

Hi, I'am Patrick from France, it is my first post on the forum.

 

I am porting the Zortrax m200 plus 3D printer to Armbian and my last important step would be to have the LCD screen working.

I cross compiled my module but I have this message when installing it:

# insmod panel-himax-hx8394.ko 
[ 1760.189919] BPF: [120533] Invalid name_offset:2238391
[ 1760.195183] failed to validate module [panel_himax_hx8394] BTF: -22
insmod: ERROR: could not insert module panel-himax-hx8394.ko: Invalid parameters

 

Then I added the module source code to the sources, but calling ./compile.sh seems to update the repo and revert my changes such as I do not see my module in there.

 

The next possibility would be to create an image with the kernel headers included. I will try to compile the driver on the system.

And is there another way?

 

 

Edited by Patrick 42

You dont need to cross-compile. You need to select the in-kernel-source option: https://www.kernelconfig.io/config_drm_panel_himax_hx8394 within the armbian build process.

 

Then you need to create a DTS like: https://forum.armbian.com/topic/47971-driving-the-ili9488-lcd-40-inch-cheap-chinese-clone/

 

 

And also dig through the experience in this thread: https://forum.armbian.com/topic/50963-dsi-display-does-not-work-on-raspberry-pi-5/#comment-216030

 

 

Send photo of the a33 and LCD

  • Author

I have managed to compile the driver on the target with a brand new image compiled using "./compile.sh INSTALL_HEADERS=yes". Yet I would like to cross compile it. If you know how, I will greatly appreciate if you give the method.

Edited by Patrick 42

  • Author

Thanks  Robertoj

All the documentation for the board is here https://github.com/zharijs/zmxxxp-re

But the LCD is not an himax-hx8394. The screen is a "MTF0397SWI-06" using the chip OTM8019A.

It just that I am starting from this driver to port the sunxi driver: sl698ph_720p.

 

I will now look at your links.

  • Author

I am strugling withthe AXP223 gpio LDO configuration to initialise properly, otherwise the i2C lines to the touchscreen controller are unpowered. Therefore I will add traces in the axP223 rsb (reduced signal bus) driver code.

And I try to not be annoying here, but I am a bit lost. What is the common method for driver debugging/development in armbian?

I mean how to recompile the kernel without rebuilding all the image?

 

For now I changed the kernel configuration for the rsb driver to module. And I will compile it on the target to add my traces.

 

In case someone has the solution to my problem,  my dts looks like this:

&axp_gpio {
	gpio1_ldo_pin: gpio1-ldo-pin {
		pins = "GPIO1";
		function = "ldo";
	};
};

&reg_ldo_io1 {
	pinctrl-names = "default";
	pinctrl-0 = <&gpio1_ldo_pin>;
	regulator-always-on;
	regulator-min-microvolt = <3000000>;
	regulator-max-microvolt = <3000000>;
	regulator-name = "i2C0-iovcc";
 	status = "okay";
 };

 

And while the regulator initialises for the AXP223 GPIO1/LDO, I have nothing but GND on the pin.

 

[    1.223696] i2C0-iovcc: Bringing 3800000uV into 3000000-3000000uV

 

Because the driver configures the pin in the regulators, it seems like the axp_gpio and pinctrl definitions are useless.

  • Author

I fixed my i2c gpio ldo regulator issue by disabling the axp_gpio in the device tree.

 

&axp_gpio {
	status = "disabled";
};

 

The separate driver must have been rewriting the registers configured by the regulators driver.

 

Now back to the LCD

Edited by Patrick 42

On 12/6/2025 at 3:03 AM, Patrick 42 said:

And I try to not be annoying here, but I am a bit lost. What is the common method for driver debugging/development in armbian?

I mean how to recompile the kernel without rebuilding all the image?

 

 

Rebuilding all the image doesn't represent much more time than the time to recompile the kernel.

 

I can't advise to download the linux source to the armbian SBC, because you would also need the armbian patches.

 

One thing I use for debugging of DTS (and maybe linux kernel modules) taking control of GPIO is:

sudo cat /sys/kernel/debug/gpio

  • Author

Thanks.

I am figuring thing up, like fixing a cycle dependency and adding traces to my lcd driver module. But I can compile this one on the target. So it is fine. The "fixing cycle(s) dependency" thing is annoying because I mostly find example boards using the lcd pins and not the dsi lanes.

 

  • Author

Armbian monitor

https://paste.armbian.com/sakicoqowe

 

I am nearly there with my panel driver, but I fried my dsi output. I plan to replace the A33 chip.

As I can compile the driver and solved my device tree issues, we can close the topic.

 

You can follow my progress here https://www.eevblog.com/forum/3d-printing/hack-zortrax-driver-board-port-klipper/50/

 

Thanks for the help.

Edited by Patrick 42

  • Author

My solution is to compile the image like this:

./compile.sh INSTALL_HEADERS=yes

 

Then scp the driver on the machine, and execute

 

echo "obj-m += panel-mtf0397swi.o" > Makefile
make -C /lib/modules/`uname -r`/build M=$PWD
cp panel-mtf0397swi.ko /lib/modules/$(uname -r)/kernel/drivers/gpu/drm/panel/
depmod -a

 

Edited by Patrick 42

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.