Setting pcDuino Display Resolution

        原文来自:http://www.the-greathouses.net/blog/2013/03/setting-pcduino-display-resolution/comment-page-1/#comment-601


        本人已成功使用该方法修改HDMI Mode为10 (1080P60),启动后由于显示器分辨率只有1280x1024,显示不完整,使用显示器上的自动调整后显示正常。另外选择HDMI Mode为27,显示器无显示,不知驱动支持多少种模式。在此感谢原文作者Bill。


        One of the things I had noted earlier was that the HDMI output resolution is fixed at 720p (1280×720) and there was no documented way of setting a new resolution. There was a posting in the comments at Sparkfun that a script for setting the resolution was being worked on. Well, I decided to take a look at it myself and see what was required. It is actually quite simple once you have the right tools. With a little research, I had my display running at 1080p (1920×1080).


Background


        The resolution of the frame buffer device and subsequently the X11 display is set at system boot. The default setting for the display is in the evb.bin configuration file. This is a binary configuration file compiled from a fex text file. Learn more about the  fex file format at Sunxi Wiki in the Fex Guide. To change values in the/boot/evb.bin it must first be decompiled back to the text format, edited, then recompiled to the binary format. Luckily, there is an open source set of tools for accomplishing just what is needed —sunxi-tools.


Preparation


        To install sunxi-tools, there some additional packages that must be installed on the pcDuino first. To fetch the sources, you need  git. To compile sunxi-tools, you also need to have  libusb and  pkg-config. The following commands will need to be done from a terminal window.

        Now that the prerequisites have been installed, the sunxi-tools source files can be fetched from github. The following commands will need to be done from a terminal window.

       

        This will fetch the source files and build the binary programs needed to update theevb.bin configuration file.


Accessing evb.bin


        The evb.bin file is stored in the NAND flash boot partition. By default, this is not available after the pcDuino boots. The default boot partition is /dev/nanda and can be mounted to /boot using the following command.

        If you look at the directory of /boot, you will now see several files.



Editing Display Resolution


         We are only interested in the evb.bin file at this time. Use the following commands make a backup of your original file and to extract the content of the evb.bin file toevb.fex.

        Open the new evb.fex file and locate the disp_init section. It will look like this:

        To change the default HDMI resolution, the line of interest is the screen0_output_mode line. The value to the right of the equal sign is the resolution selection. The available resolutions as listed on the Sunxi site are:

HDMI ModeResolution
0480i
1576i
2480p
3576p
4720p50
5720p60 (default)
61080i50
71080i60
81080p24
91080p50
101080p60
11PAL
12PAL_SVIDEO
14NTSC
15NTSC_SVIDEO
17PAL_M
18PAL_M_SVIDEO
10PAL_NC
21PAL_NC_SVIDEO
231080p24-3D
24720p50-3D
25720p60-3D
261360×768-60
271280×1024-60

        Change the screen0_output_mode to your desired resolution selection and save the file. As an example, for 1080p60:


Activate New Display Settings


        To make the new display resolution settings active, the evb.bin file in the boot partition must be replaced with a compiled version of your new evb.fex file. This is accomplished with the following commands.

       This compiles the new text configuration to a binary configuration file, copies the new file to the/boot partition, and unmounts the boot partition.


Moment of Truth


        Once the configuration file has been updated, it is time to test. Reboot your pcDuino and enjoy the new setting.


WARNING

        ONLY PERFORM THE ABOVE IF YOU UNDERSTAND WHAT YOU ARE DOING. Editing the evb.bin file has the potential to make your pcDuino unusable. If this occurs, you will need to restore your original evb.bin file from the backup. This can be done from a remote network login (you have set up the ssh server?) or using the debug serial port with the appropriate adapter.





引用中提到的报错"Cannot set properties of undefined (setting 'display')"通常是由于访问了未定义的变量、属性或方法导致的。根据引用中提供的信息,解决这个问题的方法可以有以下几种: 1. 检查访问域的问题:在外部创建一个指向this的变量,例如使用`let that = this`。这样可以确保在内部访问到正确的作用域。 2. 检查是否定义了相应的变量、属性、方法:请确保所要访问的变量、属性或方法已经在代码中进行了定义。如果未定义,则可能会导致出现该错误。 3. 检查获取变量、属性、方法的方式:确保使用正确的方式来获取所需的变量、属性或方法。根据引用中提到的问题,可能是由于使用了过时的jQuery方法或语法导致的错误。 以上是解决"Cannot set properties of undefined (setting 'display')"错误的几种常见方法。根据具体情况,您可以尝试其中一种或多种方法来解决该问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [【vue报错:Cannot set properties of undefined (setting ‘xxx‘)】](https://blog.csdn.net/m0_67841039/article/details/129402816)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* [jQuery 出现Cannot read property ‘msie’ of undefined错误的解决方法](https://download.csdn.net/download/weixin_38693586/14805574)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值