0
Younes_Thabet

why some armbian images have script.bin in /boot and some doesn't!?

Recommended Posts

I have orange pi one with Armbian Xenial desktop legacy kernel 3.4.y which have a script.bin file in /boot directory and doesn't have /boot/dtb directory ...but when i installed Armbian Bionic mainline based kernel 4.19.y, I found the .dtb files but not the script.bin ....now i don't know how to configure both touch screen and the pwm pin!

 

is the .dtb file (sun8i-h3-orangepi-one.dtb) is the same as script.bin or orangepione.bin ?

if so, how to configure it? because i am used to convert the script.bin to .fex to configure it and then back to .bin.

Share this post


Link to post
Share on other sites
15 minutes ago, martinayotte said:

This is one of the major differences between Legacy and Mainline images.

thank you for the answer, sir.

 

I want to remap the uart0 to be pwm on the PA05 according to https://github.com/iboguslavsky/pwm-sunxi-opi0 , i used to do this using script.bin in /boot...now i don't know how to do that!?

could you please show me the file to configure pwm? 

 

Share this post


Link to post
Share on other sites
57 minutes ago, Younes_Thabet said:

is the .dtb file (sun8i-h3-orangepi-one.dtb) is the same as script.bin or orangepione.bin ?

They are different solutions for the same problem, so no, they are not the same. script.bin is Allwinner invention, whereas DTs is universal way in Linux for multiple platforms.

58 minutes ago, Younes_Thabet said:

if so, how to configure it? because i am used to convert the script.bin to .fex to configure it and then back to .bin. 

You can use same workflow for dtb too, just with different tools and different syntax. However, it's easier to use DT overlays. I'm not the right person to ask questions about DT overlays, but I'm sure you can find enough info in Armbian documentation and forum.

Share this post


Link to post
Share on other sites
16 minutes ago, Younes_Thabet said:

pwm on the PA05 according

There is already an DT overlay present in Armbian build, check here : /boot/dtb/overlay/sun8i-h3-pwm.dtbo

To activate it, you need to edit /boot/armbianEnv.txt and add a line with "overlays=pwm", save and reboot ...

 

More info here : https://docs.armbian.com/User-Guide_Allwinner_overlays/

and here : /boot/dtb/overlay/README.sun8i-h3-overlays

Share this post


Link to post
Share on other sites

thanks again for the quick answer @martinayotte,

 

i see from your answer that i don't need to modify a .dtb file but just add lines to armbianEnv.txt ... so i did  add the "overlays=pwm" to armbianEnv and rebooted but when i use the PA05 pin i got a noisy signal, maybe i need to disactivate uart0 first, idk!     

 

I sure need to read more about overlays.

Share this post


Link to post
Share on other sites
1 hour ago, Younes_Thabet said:

so i did  add the "overlays=pwm" to armbianEnv and rebooted but when i use the PA05 pin i got a noisy signal, maybe i need to disactivate uart0 first, idk!

Strange ... I didn't tried myself, but in the /boot/dtb/overlay/README.sun8i-h3-overlays, it is mentioned the following :

Quote

### pwm

Activates hardware PWM controller

PWM pin: PA5

Pin PA5 is used as UART0 RX by default, so if this overlay is activated,
UART0 and kernel console on ttyS0 will be disabled

When you said "noisy signal", did you attached a scope on it ?

Did you do the following to provide settings or to show existing settings ?

echo 0 > /sys/class/pwm/pwmchip0/export
ll /sys/class/pwm/pwmchip0/pwm0/
cat /sys/class/pwm/pwmchip0/pwm0/duty_cycle

 

Share this post


Link to post
Share on other sites

Yes, i used the oscilloscope to see the signal... it was working all the time i just had a bad connectivity that's all..

 

Thank you sir for your support. 

Share this post


Link to post
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0