################################################################################ ## Raspberry Pi Configuration Settings ## ## Revision 14, 2012/10/22 ## ## Details taken from the eLinux wiki ## For up-to-date information please refer to wiki page. ## ## Wiki Location : http://elinux.org/RPi_config.txt ## ## ## Description: ## Details of each setting are described with each section that begins with ## a double hashed comment ('##') ## It is up to the user to remove the single hashed comment ('#') from each ## option they want to enable, and to set the specific value of that option. ## ## WARNING: Setting the following combination of parameters will set a ## permanent bit within the SOC and your warranty is void. ## over_voltage>0, and at least one of the following: ## force_turbo=1 ## current_limit_override=0x5A000020 ## temp_limit>85 ## ## Overclock settings will be disabled at runtime if the SoC reaches temp_limit ## ################################################################################ ################################################################################ ## Standard Definition Video Settings ################################################################################ ## sdtv_mode ## defines the TV standard for composite output ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Normal NTSC (Default) ## 1 Japanese version of NTSC - no pedestal ## 2 Normal PAL ## 3 Brazilian version of PAL - 525/60 rather than 625/50, different ## subcarrier ## #sdtv_mode=0 ## sdtv_aspect ## defines the aspect ratio for composite output ## ## Value Description ## ------------------------------------------------------------------------- ## 1 4:3 (Default) ## 2 14:9 ## 3 16:9 ## #sdtv_aspect=1 ## sdtv_disable_colourburst ## Disables colour burst on composite output. The picture will be ## monochrome, but possibly sharper ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Colour burst is enabled (Default) ## 1 Colour burst is disabled ## #sdtv_disable_colourburst=1 ################################################################################ ## High Definition Video Settings ################################################################################ ## hdmi_safe ## Use "safe mode" settings to try to boot with maximum hdmi compatibility. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Disabled (Default) ## 1 Enabled (this does: hdmi_force_hotplug=1, config_hdmi_boost=4, ## hdmi_group=1, hdmi_mode=1, ## disable_overscan=0) ## #hdmi_safe=1 ## hdmi_force_hotplug ## Pretends HDMI hotplug signal is asserted so it appears a HDMI display ## is attached ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Disabled (Default) ## 1 Use HDMI mode even if no HDMI monitor is detected ## #hdmi_force_hotplug=1 ## hdmi_ignore_hotplug ## Pretends HDMI hotplug signal is not asserted so it appears a HDMI ## display is not attached ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Disabled (Default) ## 1 Use composite mode even if HDMI monitor is detected ## #hdmi_ignore_hotplug=1 ## hdmi_drive ## chooses between HDMI and DVI modes ## ## Value Description ## ------------------------------------------------------------------------- ## 1 Normal DVI mode (No sound) ## 2 Normal HDMI mode (Sound will be sent if supported and enabled) ## #hdmi_drive=2 ## hdmi_ignore_edid ## Enables the ignoring of EDID/display data ## #hdmi_ignore_edid=0xa5000080 ## hdmi_edid_file ## Read the EDID data from the edid.dat file instead of from the attached ## device ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Read EDID data from attached device (Default) ## 1 Read EDID data from edid.txt file ## #hdmi_edid_file=1 ## hdmi_force_edid_audio ## Pretends all audio formats are supported by display, allowing ## passthrough of DTS/AC3 even when not reported as supported. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Use EDID provided values (Default) ## 1 Pretend all audio formats are supported ## #hdmi_force_edid_audio=1 ## avoid_edid_fuzzy_match ## Avoid fuzzy matching of modes described in edid. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Use fuzzy matching (Default) ## 1 Avoid fuzzy matching ## #avoid_edid_fuzzy_match=1 ## hdmi_group ## Defines the HDMI type ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Use the preferred group reported by the edid (Default) ## 1 CEA ## 2 DMT ## #hdmi_group=1 ## hdmi_mode ## defines screen resolution in CEA or DMT format ## ## H means 16:9 variant (of a normally 4:3 mode). ## 2x means pixel doubled (i.e. higher clock rate, with each pixel repeated ## twice) ## 4x means pixel quadrupled (i.e. higher clock rate, with each pixel ## repeated four times) ## reduced blanking means fewer bytes are used for blanking within the data ## stream (i.e. lower clock rate, with fewer wasted bytes) ## ## Value hdmi_group=CEA hdmi_group=DMT ## ------------------------------------------------------------------------- ## 1 VGA 640x350 85Hz ## 2 480p 60Hz 640x400 85Hz ## 3 480p 60Hz H 720x400 85Hz ## 4 720p 60Hz 640x480 60Hz ## 5 1080i 60Hz 640x480 72Hz ## 6 480i 60Hz 640x480 75Hz ## 7 480i 60Hz H 640x480 85Hz ## 8 240p 60Hz 800x600 56Hz ## 9 240p 60Hz H 800x600 60Hz ## 10 480i 60Hz 4x 800x600 72Hz ## 11 480i 60Hz 4x H 800x600 75Hz ## 12 240p 60Hz 4x 800x600 85Hz ## 13 240p 60Hz 4x H 800x600 120Hz ## 14 480p 60Hz 2x 848x480 60Hz ## 15 480p 60Hz 2x H 1024x768 43Hz DO NOT USE ## 16 1080p 60Hz 1024x768 60Hz ## 17 576p 50Hz 1024x768 70Hz ## 18 576p 50Hz H 1024x768 75Hz ## 19 720p 50Hz 1024x768 85Hz ## 20 1080i 50Hz 1024x768 120Hz ## 21 576i 50Hz 1152x864 75Hz ## 22 576i 50Hz H 1280x768 reduced blanking ## 23 288p 50Hz 1280x768 60Hz ## 24 288p 50Hz H 1280x768 75Hz ## 25 576i 50Hz 4x 1280x768 85Hz ## 26 576i 50Hz 4x H 1280x768 120Hz reduced blanking ## 27 288p 50Hz 4x 1280x800 reduced blanking ## 28 288p 50Hz 4x H 1280x800 60Hz ## 29 576p 50Hz 2x 1280x800 75Hz ## 30 576p 50Hz 2x H 1280x800 85Hz ## 31 1080p 50Hz 1280x800 120Hz reduced blanking ## 32 1080p 24Hz 1280x960 60Hz ## 33 1080p 25Hz 1280x960 85Hz ## 34 1080p 30Hz 1280x960 120Hz reduced blanking ## 35 480p 60Hz 4x 1280x1024 60Hz ## 36 480p 60Hz 4x H 1280x1024 75Hz ## 37 576p 50Hz 4x 1280x1024 85Hz ## 38 576p 50Hz 4x H 1280x1024 120Hz reduced blanking ## 39 1080i 50Hz reduced blanking 1360x768 60Hz ## 40 1080i 100Hz 1360x768 120Hz reduced blanking ## 41 720p 100Hz 1400x1050 reduced blanking ## 42 576p 100Hz 1400x1050 60Hz ## 43 576p 100Hz H 1400x1050 75Hz ## 44 576i 100Hz 1400x1050 85Hz ## 45 576i 100Hz H 1400x1050 120Hz reduced blanking ## 46 1080i 120Hz 1440x900 reduced blanking ## 47 720p 120Hz 1440x900 60Hz ## 48 480p 120Hz 1440x900 75Hz ## 49 480p 120Hz H 1440x900 85Hz ## 50 480i 120Hz 1440x900 120Hz reduced blanking ## 51 480i 120Hz H 1600x1200 60Hz ## 52 576p 200Hz 1600x1200 65Hz ## 53 576p 200Hz H 1600x1200 70Hz ## 54 576i 200Hz 1600x1200 75Hz ## 55 576i 200Hz H 1600x1200 85Hz ## 56 480p 240Hz 1600x1200 120Hz reduced blanking ## 57 480p 240Hz H 1680x1050 reduced blanking ## 58 480i 240Hz 1680x1050 60Hz ## 59 480i 240Hz H 1680x1050 75Hz ## 60 1680x1050 85Hz ## 61 1680x1050 120Hz reduced blanking ## 62 1792x1344 60Hz ## 63 1792x1344 75Hz ## 64 1792x1344 120Hz reduced blanking ## 65 1856x1392 60Hz ## 66 1856x1392 75Hz ## 67 1856x1392 120Hz reduced blanking ## 68 1920x1200 reduced blanking ## 69 1920x1200 60Hz ## 70 1920x1200 75Hz ## 71 1920x1200 85Hz ## 72 1920x1200 120Hz reduced blanking ## 73 1920x1440 60Hz ## 74 1920x1440 75Hz ## 75 1920x1440 120Hz reduced blanking ## 76 2560x1600 reduced blanking ## 77 2560x1600 60Hz ## 78 2560x1600 75Hz ## 79 2560x1600 85Hz ## 80 2560x1600 120Hz reduced blanking ## 81 1366x768 60Hz ## 82 1080p 60Hz ## 83 1600x900 reduced blanking ## 84 2048x1152 reduced blanking ## 85 720p 60Hz ## 86 1366x768 reduced blanking ## #hdmi_mode=1 ## config_hdmi_boost ## configure the signal strength of the HDMI interface. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 (Default) ## 1 ## 2 ## 3 ## 4 Try if you have interference issues with HDMI ## 5 ## 6 ## 7 Maximum ## #config_hdmi_boost=0 ## hdmi_ignore_cec_init ## Doesn't sent initial active source message. Avoids bringing ## (CEC enabled) TV out of standby and channel switch when rebooting. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Normal behaviour (Default) ## 1 Doesn't sent initial active source message ## #hdmi_ignore_cec_init=1 ## hdmi_ignore_cec ## Pretends CEC is not supported at all by TV. ## No CEC functions will be supported. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Normal behaviour (Default) ## 1 Pretend CEC is not supported by TV ## #hdmi_ignore_cec=1 ################################################################################ ## Overscan Video Settings ################################################################################ ## overscan_left ## Number of pixels to skip on left ## #overscan_left=0 ## overscan_right ## Number of pixels to skip on right ## #overscan_right=0 ## overscan_top ## Number of pixels to skip on top ## #overscan_top=0 ## overscan_bottom ## Number of pixels to skip on bottom ## #overscan_bottom=0 ## disable_overscan ## Set to 1 to disable overscan ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Overscan Enabled (Default) ## 1 Overscan Disabled ## #disable_overscan=1 ################################################################################ ## Framebuffer Video Settings ################################################################################ ## framebuffer_width ## Console framebuffer width in pixels. Default is display width minus ## overscan. ## #framebuffer_width=0 ## framebuffer_height ## Console framebuffer height in pixels. Default is display height minus ## overscan. ## #framebuffer_height=0 ## framebuffer_depth ## Console framebuffer depth in bits per pixel. ## ## Value Description ## ------------------------------------------------------------------------- ## 8 Valid, but default RGB palette makes an unreadable screen ## 16 (Default) ## 24 Looks better but has corruption issues as of 2012/06/15 ## 32 Has no corruption issues but needs framebuffer_ignore_alpha=1 ## and shows the wrong colors as of 2012/06/15 ## #framebuffer_depth=16 ## framebuffer_ignore_alpha ## Set to 1 to disable alpha channel. Helps with 32bit. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Enable Alpha Channel (Default) ## 1 Disable Alpha Channel ## #framebuffer_ignore_alpha=0 ################################################################################ ## General Video Settings ################################################################################ ## display_rotate ## Rotate the display clockwise or flip the display. ## The 90 and 270 degrees rotation options require additional memory on GPU, ## so won't work with the 16M GPU split. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 0 degrees (Default) ## 1 90 degrees ## 2 180 degrees ## 3 270 degrees ## 0x10000 Horizontal flip ## 0x20000 Vertical flip ## #display_rotate=0 ################################################################################ ## Licensed Codecs ## ## Hardware decoding of additional codecs can be enabled by purchasing a ## license that is locked to the CPU serial number of your Raspberry Pi. ## ## Up to 8 licenses per CODEC can be specified as a comma seperated list. ## ################################################################################ ## decode_MPG2 ## License key to allow hardware MPEG-2 decoding. ## #decode_MPG2=0x12345678 ## decode_WVC1 ## License key to allow hardware VC-1 decoding. ## #decode_WVC1=0x12345678 ################################################################################ ## Test Settings ################################################################################ ## test_mode ## Enable test sound/image during boot for manufacturing test. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Disable Test Mod (Default) ## 1 Enable Test Mode ## #test_mode=0 ################################################################################ ## Memory Settings ################################################################################ ## disable_l2cache ## Disable arm access to GPU's L2 cache. Needs corresponding L2 disabled ## kernel. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Enable L2 Cache (Default) ## 1 Disable L2 cache ## #disable_l2cache=0 ## gpu_mem ## GPU memory allocation in MB for all board revisions. ## ## Default 64 ## #gpu_mem=128 ## gpu_mem_256 ## GPU memory allocation in MB for 256MB board revision. ## This option overrides gpu_mem. ## #gpu_mem_256=128 ## gpu_mem_512 ## GPU memory allocation in MB for 512MB board revision. ## This option overrides gpu_mem. ## #gpu_mem_512=128 ################################################################################ ## Boot Option Settings ################################################################################ ## disable_commandline_tags ## Stop start.elf from filling in ATAGS (memory from 0x100) before ## launching kernel ## #disable_commandline_tags=0 ## cmdline (string) ## Command line parameters. Can be used instead of cmdline.txt file ## #cmdline="" ## kernel (string) ## Alternative name to use when loading kernel. ## #kernel="" ## kernel_address ## Address to load kernel.img file at ## #kernel_address=0x00000000 ## ramfsfile (string) ## ramfs file to load ## #ramfsfile="" ## ramfsaddr ## Address to load ramfs file at ## #ramfsaddr=0x00000000 ## initramfs (string address) ## ramfs file and address to load it at (it's like ramfsfile+ramfsaddr in ## one option). ## ## NOTE: this option uses different syntax than all other options - you ## should not use "=" character here. ## #initramfs initramf.gz 0x00800000 ## device_tree_address ## Address to load device_tree at ## #device_tree_address=0x00000000 ## init_uart_baud ## Initial uart baud rate. ## ## Default 115200 ## #init_uart_baud=115200 ## init_uart_clock ## Initial uart clock. ## ## Default 3000000 (3MHz) ## #init_uart_clock=3000000 ## init_emmc_clock ## Initial emmc clock, increasing this can speedup your SD-card. ## ## Default 100000000 (100mhz) ## #init_emmc_clock=100000000 ## boot_delay ## Wait for a given number of seconds in start.elf before loading ## kernel.img. ## ## delay = (1000 * boot_delay) + boot_delay_ms ## ## Default 1 ## #boot_delay=0 ## boot_delay_ms ## Wait for a given number of milliseconds in start.elf before loading ## kernel.img. ## ## delay = (1000 * boot_delay) + boot_delay_ms ## ## Default 0 ## #boot_delay_ms=0 ## avoid_safe_mode ## Adding a jumper between pins 5 & 6 of P1 enables a recovery Safe Mode. ## If pins 5 & 6 are used for connecting to external devices (e.g. GPIO), ## then this setting can be used to ensure Safe Mode is not triggered. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Respect Safe Mode input (Default) ## 1 Ignore Safe Mode input ## #avoid_safe_mode=1 ################################################################################ ## Overclocking Settings ## ## ARM, SDRAM and GPU each have their own PLLs and can have unrelated ## frequencies. ## ## The GPU core, h264, v3d and isp share a PLL, so need to have related ## frequencies. ## pll_freq = floor(2400 / (2 * core_freq)) * (2 * core_freq) ## gpu_freq = pll_freq / [even number] ## ## The effective gpu_freq is automatically rounded to nearest even integer, so ## asking for core_freq = 500 and gpu_freq = 300 will result in divisor of ## 2000/300 = 6.666 => 6 and so 333.33MHz. ## ## ## Standard Profiles: ## arm_freq core_freq sdram_freq over_voltage ## ------------------------------------------------------------------------- ## None 700 250 400 0 ## Modest 800 300 400 0 ## Medium 900 333 450 2 ## High 950 450 450 6 ## Turbo 1000 500 500 6 ## ################################################################################ ## force_turbo ## Control the kernel "ondemand" governor. It has no effect if no overclock ## settings are specified. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Enable dynamic clocks and voltage for the ARM core, GPU core and ## SDRAM (Default). ## Overclocking of h264_freq, v3d_freq and isp_freq is ignored. ## 1 Disable dynamic clocks and voltage for the ARM core, GPU core ## and SDRAM. ## Overclocking of h264_freq, v3d_freq and isp_freq is allowed. ## #force_turbo=0 ## initial_turbo ## Enables turbo mode from boot for the given value in seconds (up to 60) ## or until cpufreq sets a frequency. Can help with sdcard corruption if ## overclocked. ## ## Default 0 ## #initial_turbo=0 ## temp_limit ## Overheat protection. Sets clocks and voltages to default when the SoC ## reaches this Celsius value. ## Setting this higher than default voids warranty. ## ## Default 85 ## #temp_limit=85 ## arm_freq ## Frequency of ARM in MHz. ## ## Default 700. ## #arm_freq=700 ## arm_freq_min ## Minimum frequency of ARM in MHz (used for dynamic clocking). ## ## Default 700. ## #arm_freq_min=700 ## gpu_freq ## Sets core_freq, h264_freq, isp_freq, v3d_freq together. ## ## Default 250. ## #gpu_freq=250 ## core_freq ## Frequency of GPU processor core in MHz. It has an impact on ARM ## performance since it drives L2 cache. ## ## Default 250. ## #core_freq=250 ## core_freq_min ## Minimum frequency of GPU processor core in MHz (used for dynamic ## clocking). It has an impact on ARM performance since it drives L2 cache. ## ## Default 250. ## #core_freq_min=250 ## h264_freq ## Frequency of hardware video block in MHz. ## ## Default 250. ## #h264_freq=250 ## isp_freq ## Frequency of image sensor pipeline block in MHz. ## ## Default 250. ## #isp_freq=250 ## v3d_freq ## Frequency of 3D block in MHz. ## ## Default 250. ## #v3d_freq=250 ## sdram_freq ## Frequency of SDRAM in MHz. ## ## Default 400. ## #sdram_freq=400 ## sdram_freq_min ## Minimum frequency of SDRAM in MHz (used for dynamic clocking). ## ## Default 400. ## #sdram_freq_min=400 ## avoid_pwm_pll ## Unlink core_freq from the rest of the gpu. Analog audio should still ## work, but from a fractional divider, so lower quality. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Linked core_freq (Default) ## 1 Unlinked core_freq ## #avoid_pwm_pll=1 ################################################################################ ## Voltage Settings ################################################################################ ## current_limit_override ## Disables SMPS current limit protection. Can help if you are currently ## hitting a reboot failure when overclocking too high. ## #current_limit_override=0x5A000020 ## over_voltage ## ARM/GPU core voltage adjust. ## ## Value Description ## ------------------------------------------------------------------------- ## -16 0.8 V ## -15 0.825 V ## -14 0.85 V ## -13 0.875 V ## -12 0.9 V ## -11 0.925 V ## -10 0.95 V ## -9 0.975 V ## -8 1.0 V ## -7 1.025 V ## -6 1.05 V ## -5 1.075 V ## -4 1.1 V ## -3 1.125 V ## -2 1.15 V ## -1 1.175 V ## 0 1.2 V (Default) ## 1 1.225 V ## 2 1.25 V ## 3 1.275 V ## 4 1.3 V ## 5 1.325 V ## 6 1.35 V ## 7 1.375 V (requires force_turbo=1) ## 8 1.4 V (requires force_turbo=1) ## #over_voltage=0 ## over_voltage_min ## Minimum ARM/GPU core voltage adjust (used for dynamic clocking). ## ## Value Description ## ------------------------------------------------------------------------- ## -16 0.8 V ## -15 0.825 V ## -14 0.85 V ## -13 0.875 V ## -12 0.9 V ## -11 0.925 V ## -10 0.95 V ## -9 0.975 V ## -8 1.0 V ## -7 1.025 V ## -6 1.05 V ## -5 1.075 V ## -4 1.1 V ## -3 1.125 V ## -2 1.15 V ## -1 1.175 V ## 0 1.2 V (Default) ## 1 1.225 V ## 2 1.25 V ## 3 1.275 V ## 4 1.3 V ## 5 1.325 V ## 6 1.35 V ## 7 1.375 V (requires force_turbo=1) ## 8 1.4 V (requires force_turbo=1) ## #over_voltage_min=0 ## over_voltage_sdram ## Sets over_voltage_sdram_c, over_voltage_sdram_i, over_voltage_sdram_p ## together ## ## Value Description ## ------------------------------------------------------------------------- ## -16 0.8 V ## -15 0.825 V ## -14 0.85 V ## -13 0.875 V ## -12 0.9 V ## -11 0.925 V ## -10 0.95 V ## -9 0.975 V ## -8 1.0 V ## -7 1.025 V ## -6 1.05 V ## -5 1.075 V ## -4 1.1 V ## -3 1.125 V ## -2 1.15 V ## -1 1.175 V ## 0 1.2 V (Default) ## 1 1.225 V ## 2 1.25 V ## 3 1.275 V ## 4 1.3 V ## 5 1.325 V ## 6 1.35 V ## 7 1.375 V ## 8 1.4 V ## #over_voltage_sdram=0 ## over_voltage_sdram_c ## SDRAM controller voltage adjust. ## ## Value Description ## ------------------------------------------------------------------------- ## -16 0.8 V ## -15 0.825 V ## -14 0.85 V ## -13 0.875 V ## -12 0.9 V ## -11 0.925 V ## -10 0.95 V ## -9 0.975 V ## -8 1.0 V ## -7 1.025 V ## -6 1.05 V ## -5 1.075 V ## -4 1.1 V ## -3 1.125 V ## -2 1.15 V ## -1 1.175 V ## 0 1.2 V (Default) ## 1 1.225 V ## 2 1.25 V ## 3 1.275 V ## 4 1.3 V ## 5 1.325 V ## 6 1.35 V ## 7 1.375 V ## 8 1.4 V ## #over_voltage_sdram_c=0 ## over_voltage_sdram_i ## SDRAM I/O voltage adjust. ## ## Value Description ## ------------------------------------------------------------------------- ## -16 0.8 V ## -15 0.825 V ## -14 0.85 V ## -13 0.875 V ## -12 0.9 V ## -11 0.925 V ## -10 0.95 V ## -9 0.975 V ## -8 1.0 V ## -7 1.025 V ## -6 1.05 V ## -5 1.075 V ## -4 1.1 V ## -3 1.125 V ## -2 1.15 V ## -1 1.175 V ## 0 1.2 V (Default) ## 1 1.225 V ## 2 1.25 V ## 3 1.275 V ## 4 1.3 V ## 5 1.325 V ## 6 1.35 V ## 7 1.375 V ## 8 1.4 V ## #over_voltage_sdram_i=0 ## over_voltage_sdram_p ## SDRAM phy voltage adjust. ## ## Value Description ## ------------------------------------------------------------------------- ## -16 0.8 V ## -15 0.825 V ## -14 0.85 V ## -13 0.875 V ## -12 0.9 V ## -11 0.925 V ## -10 0.95 V ## -9 0.975 V ## -8 1.0 V ## -7 1.025 V ## -6 1.05 V ## -5 1.075 V ## -4 1.1 V ## -3 1.125 V ## -2 1.15 V ## -1 1.175 V ## 0 1.2 V (Default) ## 1 1.225 V ## 2 1.25 V ## 3 1.275 V ## 4 1.3 V ## 5 1.325 V ## 6 1.35 V ## 7 1.375 V ## 8 1.4 V ## #over_voltage_sdram_p=0
标签归档:Raspberry Pi
解决Raspberry Pi只能在默认640×480模式下显示的问题
购买Raspberry Pi V2后,还得为他配置其他一些周边器件,如5V2A的micro usb电源线、显示器、键盘、鼠标等。手头上有N多VGA显示器,却没一台DVI的,没办法,淘宝上买了专门针对树莓派生产的电源(18RMB)和hdmi转vga线(70RMB)。
按照网上的一些说法,先通过SSH登录进去,把/boot/config.txt里的几个参数放出:
hdmi_safe=1 disable_overscan=1 overscan_left=-30 overscan_right=-30 overscan_top=-30 overscan_bottom=-30 hdmi_force_hotplug=1 hdmi_group=2 hdmi_mode=16 hdmi_drive=2 config_hdmi_boost=4
注意,必须把hdmi_drive设为2,因为1是DVI输出,2才是hdmi输出,因为我的线是hdmi转vga的。
这样,重新启动Pi后,基本能显示了,可是默认是640×480的,看着非常别扭,网上找了很多资料,包括把如下config.txt部分放开:
framebuffer_width=1280 framebuffer_height=960
貌似分辨率成了1280×960,而实际上是,只是Pi按1280×960输出到屏幕上了,而屏幕的分辨率还是640×480的,所以字体很虚很模糊,几乎看不清。
按理说只要更改
hdmi_group=2 —>1:CEA 2:DMT
hdmi_mode=4 —>从模式列表中选取一种显示模式
就可以切换显示分辨率了,可是怎么改都没啥用。貌似不起任何作用!
幸好看了完整的Raspberry Pi配置说明,发现当hdmi_safe设置为1时,hdmi_group默认为1,hdmi_mode为1,后面你怎么改hdmi_group和hdmi_mode都不起作用了!!!
## hdmi_safe ## Use "safe mode" settings to try to boot with maximum hdmi compatibility. ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Disabled (Default) ## 1 Enabled (this does: hdmi_force_hotplug=1, config_hdmi_boost=4, ## hdmi_group=1, hdmi_mode=1, ## disable_overscan=0) ## #hdmi_safe=1
注意看完整的Raspberry Pi配置说明,你会发现,当disable_overscan=1时,overscan_top、overscan_botom、overscan_left、overscan_right几个参数不起作用!
################################################################################ ## Overscan Video Settings ################################################################################ ## overscan_left ## Number of pixels to skip on left ## #overscan_left=0 ## overscan_right ## Number of pixels to skip on right ## #overscan_right=0 ## overscan_top ## Number of pixels to skip on top ## #overscan_top=0 ## overscan_bottom ## Number of pixels to skip on bottom ## #overscan_bottom=0 ## disable_overscan ## Set to 1 to disable overscan ## ## Value Description ## ------------------------------------------------------------------------- ## 0 Overscan Enabled (Default) ## 1 Overscan Disabled ## #disable_overscan=1
所以,最后我的配置文件是这样的:
pi@raspberrypi:/boot$ vi config.txt #hdmi_edid_file=1 # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan disable_overscan=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=-30 #overscan_right=-30 #overscan_top=-30 #overscan_bottom=-30 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) hdmi_group=2 hdmi_mode=32 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # for more options see http://elinux.org/RPi_config.txt
绝对完美运行。
一个对hdmi_safe=1的不了解,折腾了我这么多天,真是不值啊。
后面写的就不用看了,都是以前走的弯路,那个弯啊,绕啊,希望你们就别走了……
===========================================================
用tvservice -d edid.dat将edid数据导出到edid.dat:
pi@raspberrypi:/opt/vc/bin$ tvservice -d edid.dat Written 0 bytes to edid.dat
没数据。。。
使用tvservice -s查看当前的显示状态
pi@raspberrypi:~$ tvservice -s state: HPD high|HDMI mode|HDCP off|composite off (0x12001a), 640x480 @ 60Hz, progressive
的确是640×480 @ 60 Hz显示的。再用-m查看支持的显示,却发现只有一种CEA模式,而DMT模式根本就没有:
pi@raspberrypi:~$ tvservice -m CEA Group CEA has 1 modes: mode 1: 640x480 @ 60Hz, progressive pi@raspberrypi:~$ tvservice -m DMT Group DMT has 0 modes:
这就难怪怎么改config.txt中的hdmi_group和hdmi_mode都没用的原因了!!!
网上翻了很多资料,终于发现,只要在config.txt文件开头加入如下信息,重启,终于以更高的分辨率显示了:
hdmi_edid_file=1
hdmi_edid_file默认为0,表示从设备读取edid信息,如果为1,则强制从edid.txt文件读取edid信息。
启动后,进入终端,查看当前状态:
pi@raspberrypi:~$ tvservice -s state: HPD high|HDMI mode|HDCP off|composite off (0x12001a), 1280x720 @ 60Hz, progressive
可见现在的显示模式是 1280×720 @ 60Hz。
现在hdmi是如下配置的:
hdmi_group=1 hdmi_mode=16
貌似这个值不起作用了。
很疑惑,这个edid.txt文件在哪里???如果不存在,是否可以通过导入一个edit.txt文件来达到配置显示分辨率的目的呢?
附:
从这里http://elinux.org/RPiconfig可以看到group和mode的对应关系,相应的修改即可:
These values are valid if hdmi_group=1 (CEA) hdmi_mode=1 VGA hdmi_mode=2 480p 60Hz hdmi_mode=3 480p 60Hz H hdmi_mode=4 720p 60Hz hdmi_mode=5 1080i 60Hz hdmi_mode=6 480i 60Hz hdmi_mode=7 480i 60Hz H hdmi_mode=8 240p 60Hz hdmi_mode=9 240p 60Hz H hdmi_mode=10 480i 60Hz 4x hdmi_mode=11 480i 60Hz 4x H hdmi_mode=12 240p 60Hz 4x hdmi_mode=13 240p 60Hz 4x H hdmi_mode=14 480p 60Hz 2x hdmi_mode=15 480p 60Hz 2x H hdmi_mode=16 1080p 60Hz hdmi_mode=17 576p 50Hz hdmi_mode=18 576p 50Hz H hdmi_mode=19 720p 50Hz hdmi_mode=20 1080i 50Hz hdmi_mode=21 576i 50Hz hdmi_mode=22 576i 50Hz H hdmi_mode=23 288p 50Hz hdmi_mode=24 288p 50Hz H hdmi_mode=25 576i 50Hz 4x hdmi_mode=26 576i 50Hz 4x H hdmi_mode=27 288p 50Hz 4x hdmi_mode=28 288p 50Hz 4x H hdmi_mode=29 576p 50Hz 2x hdmi_mode=30 576p 50Hz 2x H hdmi_mode=31 1080p 50Hz hdmi_mode=32 1080p 24Hz hdmi_mode=33 1080p 25Hz hdmi_mode=34 1080p 30Hz hdmi_mode=35 480p 60Hz 4x hdmi_mode=36 480p 60Hz 4xH hdmi_mode=37 576p 50Hz 4x hdmi_mode=38 576p 50Hz 4x H hdmi_mode=39 1080i 50Hz reduced blanking hdmi_mode=40 1080i 100Hz hdmi_mode=41 720p 100Hz hdmi_mode=42 576p 100Hz hdmi_mode=43 576p 100Hz H hdmi_mode=44 576i 100Hz hdmi_mode=45 576i 100Hz H hdmi_mode=46 1080i 120Hz hdmi_mode=47 720p 120Hz hdmi_mode=48 480p 120Hz hdmi_mode=49 480p 120Hz H hdmi_mode=50 480i 120Hz hdmi_mode=51 480i 120Hz H hdmi_mode=52 576p 200Hz hdmi_mode=53 576p 200Hz H hdmi_mode=54 576i 200Hz hdmi_mode=55 576i 200Hz H hdmi_mode=56 480p 240Hz hdmi_mode=57 480p 240Hz H hdmi_mode=58 480i 240Hz hdmi_mode=59 480i 240Hz H H means 16:9 variant (of a normally 4:3 mode). 2x means pixel doubled (i.e. higher clock rate, with each pixel repeated twice) 4x means pixel quadrupled (i.e. higher clock rate, with each pixel repeated four times)
These values are valid if hdmi_group=2 (DMT) hdmi_mode=1 640x350 85Hz hdmi_mode=2 640x400 85Hz hdmi_mode=3 720x400 85Hz hdmi_mode=4 640x480 60Hz hdmi_mode=5 640x480 72Hz hdmi_mode=6 640x480 75Hz hdmi_mode=7 640x480 85Hz hdmi_mode=8 800x600 56Hz hdmi_mode=9 800x600 60Hz hdmi_mode=10 800x600 72Hz hdmi_mode=11 800x600 75Hz hdmi_mode=12 800x600 85Hz hdmi_mode=13 800x600 120Hz hdmi_mode=14 848x480 60Hz hdmi_mode=15 1024x768 43Hz DO NOT USE hdmi_mode=16 1024x768 60Hz hdmi_mode=17 1024x768 70Hz hdmi_mode=18 1024x768 75Hz hdmi_mode=19 1024x768 85Hz hdmi_mode=20 1024x768 120Hz hdmi_mode=21 1152x864 75Hz hdmi_mode=22 1280x768 reduced blanking hdmi_mode=23 1280x768 60Hz hdmi_mode=24 1280x768 75Hz hdmi_mode=25 1280x768 85Hz hdmi_mode=26 1280x768 120Hz reduced blanking hdmi_mode=27 1280x800 reduced blanking hdmi_mode=28 1280x800 60Hz hdmi_mode=29 1280x800 75Hz hdmi_mode=30 1280x800 85Hz hdmi_mode=31 1280x800 120Hz reduced blanking hdmi_mode=32 1280x960 60Hz hdmi_mode=33 1280x960 85Hz hdmi_mode=34 1280x960 120Hz reduced blanking hdmi_mode=35 1280x1024 60Hz hdmi_mode=36 1280x1024 75Hz hdmi_mode=37 1280x1024 85Hz hdmi_mode=38 1280x1024 120Hz reduced blanking hdmi_mode=39 1360x768 60Hz hdmi_mode=40 1360x768 120Hz reduced blanking hdmi_mode=41 1400x1050 reduced blanking hdmi_mode=42 1400x1050 60Hz hdmi_mode=43 1400x1050 75Hz hdmi_mode=44 1400x1050 85Hz hdmi_mode=45 1400x1050 120Hz reduced blanking hdmi_mode=46 1440x900 reduced blanking hdmi_mode=47 1440x900 60Hz hdmi_mode=48 1440x900 75Hz hdmi_mode=49 1440x900 85Hz hdmi_mode=50 1440x900 120Hz reduced blanking hdmi_mode=51 1600x1200 60Hz hdmi_mode=52 1600x1200 65Hz hdmi_mode=53 1600x1200 70Hz hdmi_mode=54 1600x1200 75Hz hdmi_mode=55 1600x1200 85Hz hdmi_mode=56 1600x1200 120Hz reduced blanking hdmi_mode=57 1680x1050 reduced blanking hdmi_mode=58 1680x1050 60Hz hdmi_mode=59 1680x1050 75Hz hdmi_mode=60 1680x1050 85Hz hdmi_mode=61 1680x1050 120Hz reduced blanking hdmi_mode=62 1792x1344 60Hz hdmi_mode=63 1792x1344 75Hz hdmi_mode=64 1792x1344 120Hz reduced blanking hdmi_mode=65 1856x1392 60Hz hdmi_mode=66 1856x1392 75Hz hdmi_mode=67 1856x1392 120Hz reduced blanking hdmi_mode=68 1920x1200 reduced blanking hdmi_mode=69 1920x1200 60Hz hdmi_mode=70 1920x1200 75Hz hdmi_mode=71 1920x1200 85Hz hdmi_mode=72 1920x1200 120Hz reduced blanking hdmi_mode=73 1920x1440 60Hz hdmi_mode=74 1920x1440 75Hz hdmi_mode=75 1920x1440 120Hz reduced blanking hdmi_mode=76 2560x1600 reduced blanking hdmi_mode=77 2560x1600 60Hz hdmi_mode=78 2560x1600 75Hz hdmi_mode=79 2560x1600 85Hz hdmi_mode=80 2560x1600 120Hz reduced blanking hdmi_mode=81 1366x768 60Hz hdmi_mode=82 1080p 60Hz hdmi_mode=83 1600x900 reduced blanking hdmi_mode=84 2048x1152 reduced blanking hdmi_mode=85 720p 60Hz hdmi_mode=86 1366x768 reduced blanking
Raspberry Pi通过SSH登录
Raspberry Pi的R2版本默认开启了SSH服务,所以你可以直接通过通过Secure Shell Client等SSH客户端工具登录到Pi中。
默认用户为pi,密码为raspberry。
三步实现在 Raspberry Pi 上运行 JavaFX 应用
英文原文:JavaFX on Raspberry Pi – 3 Easy Steps
参与翻译者(4人):Tom Lin, Grisson, 寂寞沙洲, ksc
那么,你可以用 JavaFX 在一个 Raspberry Pi 上做什么呢?一个很棒的例子是,我们为 Devoxx 制作了一个会议日程表运行在数字标牌上,这个会议日程表通过一个飞行在太空的宇宙飞船动画显示出来:
更新:如果你不信任运行在 Pi 的 Java 应用程序的性能,那么看看 Rich Bair 在网站 fxexperience.com 上发布的文章:http://fxexperience.com/2012/12/javafx-on-raspberry-pi/
只需要简单的三个步骤既可让你的Pi跑上JavaFx, 如果你决定开始动手的话。
1. 安装Linux到你的Raspberry Pi上
2. 下载并拷贝Java/JavaFX 8到你的Pi上
3. 部署和运行JavaFX 应用在你的Pi上
当然,这里的前提是你已经入手了Raspberry Pi. 如果你还不知道哪里可以买到Raspberry Pi, 或怎么启动它的话. 我推荐你去看看Raspberry Pi的官网. Raspberry Pi Site
第一步 – 在你的 Raspberry Pi 上安装 Linux
最新发布的 Java 8 支持硬件浮点运算了,这是一件好事,因为这将为您带来更高的性能,同时其推荐的 Raspberry Pi 编译器也是用硬件进行浮点运算了。现在可以抛弃那些 soft, sofrfp 等等了,因为这些已经不再兼容支持硬件浮点运算的 JVM 了。
注:为什么原来一直为浮点运算而烦恼呢?主要是以前小的嵌入式系统芯片都不提供用于浮点运算模块以节省成本(如 ARM Cortex M0-M3 等)。幸运的是,用于支持 Raspberry Pi 运行的 ARMv6 芯片已经提供真正的硬件浮点运算了。
要在你的SD卡上部署Linux, 你首先要有一台具有SD card 读写能力的Windows, Mac 或者linux 机器。你所需要的安装版本是Raspbian Wheezy hard float , 这也是Respberry Pi上推荐安装版本。 下载地址是 http://www.raspberrypi.org/downloads
有好几种方法可以烧录镜像文件到SD card上,具体说明在这里,但基本上可以归类为:
windows: 使用 Win32DiskImager
Mac: 使用 RPi-sd Card Builder
Linux: 使用dd命令
一旦搞好你的 SD 卡,那就把它取出并连接到你的显示器上,并插上一个好点的 usb 电源(5v 700mA 或更高)。
注意:顺序很重要! – 如果你在给你的 Pi 接通电源前没有连接好HDMI显示器。那结果可能会是,虽然指示灯在闪烁,但你却只得到了一个空白的屏幕,这时你应该尝试重新启动的你的PI(拔下并重新插入它)。
这时,你的 Pi 应该已经启动起来了,并在屏幕上显示出你的 Raspberry Pi 的配置。这里有些参数你可能需要考虑调整,包括:
- CPU/GPU 内存分配 – 要给予 GPU 最少 128MB 的内存,以使得一些对图形要求较高的应用能跑得更流畅 (这点对 JavaFX 很重要!)
- 更改区域设置/键盘/时区 – 这些默认设置是英国的,因此每个非英国的人都应该修改这些设置,否则在试图输入标点符号时,你会骂你的键盘的!
- Overscan – 如果你的显示器在显示时有黑框,那么你把这个选项设为关闭,那么你就可以看到全屏了。
- 扩大根文件系统 – 这点不需要重启就可以重新指定你的卡的大小以便使用你的卡的全部空间(默认的映像文件只有 2GB 的根分区)。高度推荐,但如果在一个较大的卡上,完成这个操作可能需要花费点时间。
- SSH – 如果你想要通过网络来访问你的 Pi,那么就把这个选项打开 (这是除了重启之外的、关闭空闲 JavaFX 进程的唯一方法)
在 JavaFX Raspberry Pi 的官方文档 里,他们也推荐通过修改配置文件 (/boot/config.txt) 来设置视频缓存区为 720p,把配置文件里下面两行前的注释符号去掉即可:
framebuffer_width=1280 framebuffer_height=720
当然这是可选的,但如果让 Pi 的输出分辨率低些,你肯定可以获得更好的性能。但在你明白这样改动会带来什么后果之前,不要修改这个配置。(同时,如果要改的话,你必须先通过 ssh 远程登录进 Pi 中,以防改动后显示不正常的话,你还可以改回来)。更多相关 HDMI 显示的问题,可以到 这里 来查询文档。
第2步 – 下载并复制 Java/JavaFX 8 到你的 Pi
你可以从下面地址中下载兼容的 Java/JavaFX 8 到你的 Raspberry Pi 上:
http://jdk8.java.net/fxarmpreview
如果你的 Pi 是通过以太网连接到网络的话,你可以直接下载到你的设备中。否则的话,你可以通过 sftp(通过 ssh)或 sneakernet 拷贝进去。
下载下来后,你就可以解压到你指定的路径下:
sudo tar -zxvf file_name -C /opt
然后,用以下命令运行:
sudo /opt/jdk1.8.0/bin/java -version
第 3 步– 在你的 Pi 上配置和运行 JavaFX 应用
几乎所有的 JavaFX 桌面应用都可以不经修改,仅需简单复制进去就可以在你的 Pi 上运行了。(有两种应用例外,这两种应用是为 WebView 或者 MediaView 开发的,当前的设备还没实现些应用的兼容)
一个更好的开始构建你的 Pi 的 JavaFX 应用的方法是,先使用 Scene Builder 可视化设计工具来设计你的用户界面,并把设计好的用户界面放到你的应用中,然后再配置到你的 Pi 上。我昨晚就在 Davis 的 Linux 用户组 (LUGOD) 上,在其他非常精明的与会者 的帮助下完成了这个工作(我还跟其他人学会了一些 linux 的命令技巧)。
我提交了一个花了我们15分钟的应用到 GitHub 上,你可以到下面的地址中下下来试试:
https://github.com/steveonjava/LUGOD-Pi-Test
要在你的 Pi 上运行这个例子,先用你喜欢的 IDE 构建好源码(或者直接在命令行里构建)并发布 Jar 包文件。然后把 jar 复制到你的 Pi 中,并用类似下面的命令来运行它:
sudo /opt/jdk1.8.0/bin/java -Djavafx.platform=eglfb \ -cp /opt/jdk1.8.0/jre/lib/jfxrt.jar:LUGODTest.jar lugodtest.LUGODTest
下图是我们在 LUGOD 会议上展出的运行在 Raspberry Pi 的 Scene Builder 工程界面和运行输出结果。
然而,让你感受最深的,还是你自己开发的应用。试着发布一个你自己的 JavaFX 应用,然后在后面的评论中,请留下你发布成功的应用的链接。
本文中的所有译文仅用于学习和交流目的,转载请务必注明文章译者、出处、和本文链接
我们的翻译工作遵照 CC 协议,如果我们的工作有侵犯到您的权益,请及时联系我们
Raspberry Pi快速上手教程
首先看看除了Raspberry Pi之外还需要哪些附件吧:
- USB接口键盘和鼠标:其中USB键盘是必不可少的。
- SD存储卡:Raspberry Pi的系统都是放在SD卡上。可以选择标准大小的SD卡或者micro SD卡,如果是micro SD卡还必须有一个适配器(adapter),板上的插槽是SD/MMC式的,当然还要准备一个读卡器。SD卡最少要选择4GB容量以上以及速度CLASS4以上,Raspberry Pi上大部分可用的系统需求都超过2GB。
- Micro USB连接线:做电源线用。
- USB口适配器:Raspberry Pi最少需要5V@700ma电流,因此不能通过计算机USB口供电。
- 视频线:可以是HDMI线或者是接电视的复合视频线。如果显示器不带HDMI接口,还需要配置HDMI转DVI或者HDMI转VGA的线缆。
- 以太网线:网线虽然不是必需的但是却很重要。
- USB集线器:这不是必须的,Raspberry Pi只有2个USB口,如果配置一个带电源的USB集线器,能减轻Raspberry Pi的负荷而且能扩展更多USB设备。
Raspberry Pi Wiki上列举了非常多可支持的硬件外设以及可能有问题的外设,上图是我们准备的一些外设,并没有刻意选择型号:
- Raspberry Pi B型
- 普通USB键盘鼠标
- Kingston 4GB micro SD(Class4)以及micro SD Adapter
- 一个旧手机的USB电源适配器(5V@1A)
- 一根HDMI-DVI连接线
- 一台带DVI接口液晶显示器
- 一根网线
安装系统
Raspberry Pi的系统是在SD卡上运行,必须先将系统安装到SD卡上。目前支持Raspberry Pi的Linux有很多版本。开始的时候我们还是选择一个官方量身定制的Raspian ”wheezy“,这是一个在Debian基础上优化的版本,可以在官网下载。
如果使用Windows系统,官方建议使用Wi32DiskImager来复制image文件到SD卡(如果是Linux系统可以用工具dd)。这里就在常用的Windows系统下说明,下载最新的Raspian wheezy(目前是2012-8-16),解压缩zip文件。
解压缩后的img文件有1.8G左右,插入读卡器,打开下载的Win32DiskImager软件,将img写入到SD卡中。
上电启动
Raspberry Pi最有可能碰到的问题就是供电电压不足或者USB适配器不能提供足够电流。Raspberry Pi的供电电压范围为4.75V~5.25V,而且板上留了两个测试点TP1、TP2(电源和地)用来检测供电电压。如下图可以用万用表首先测量下供电电压。
连接好所有的外设,插好SD卡。
Raspian系统第一次启动会多花点时间,而且启动后程序首先会进入系统设置画面。
Raspian系统设置:
- info:系统设置工具的信息
- expand-rootfs:扩大Linux系统root分区的大小
- overscan:使能overscan
- configure_keyboard:选择键盘布局(Raspberry Pi键盘布局默认英式,这里可以调整)
- change_pass:修改用户密码(Raspbian默认用户名为pi,密码raspberry)
- change_local:修改输入法(可以修改成中文输入,不过先要安装字体,暂时不修改)
- change_timezone:修改系统时区(Raspberry Pi没有实时时钟,靠网络同步时间)
- memory_split:修改内存划分(一共256MB内存,修改ARM处理器和图形加速器的分配)
- ssh:使能ssh服务器(建议开启,这样可以通过ssh访问Raspberry Pi)
- boot_behaviour:设置系统启动进入命令行界面还是图形界面(在命令行模式输入startx可以进入图形界面)
- update:可以在线升级
设置完成后选择finish退出设置界面,重启系统,Raspberry Pi就首次进入了命令行模式
设置网络
Raspian系统的网络设置文件包括dns设置/etc/resolv.conf 和dhcp设置 /etc/network/interfaces,笔者的网络采用了固定IP,因此需要修改文件设定静态IP,如果网络遇到问题可以查看这两个文件。
输入
sudo vi /etc/resolv.conf
显示
domain router search router nameserver 192.168.0.111
其中的nameserver就是指DNS服务器IP,上面这个IP不正确,修改nameserver 的IP地址。
输入
sudo vi /etc/network/interfaces
显示
auto lo iface lo inet loopback iface eth0 inet dhcp
其中iface eth0 inet dhcp代表网口目前是采用自动dhcp分配IP,修改成:
atuo eth0 iface eth0 inet static address 192.168.0.160 network 192.168.0.0 netmask 255.255.255.0 broadcast 192.168.0.255 gateway 192.168.0.1
设置了Raspberry Pi的静态IP为192.168.0.160,这些可以根据自己网络修改设置。
保存退出重启网络,输入:
sudo /etc/init.d/networking restart
网络重启后可以通过ping命令看看网络有没有连通。
中文设置
网络连通后其实Raspberry Pi的初步设置已经完成了,软件环境已经可以使用。对于我们来说中文更习惯,而Raspian系统是支持中文显示的,所以我们来看看怎么设置中文。
还是在命令行模式下,因为网络已经连通,先进行在线升级,输入:
sudo apt-get update
安装中文字体:
sudo apt-get install ttf-wqy-microhei
安装完成后设置中文:
sudo dpkg-reconfigure locales
将zh_CN前缀的都选上,然后选择zh_CN.UTF-8,这就设置系统默认环境语言为中文。
当然我们也可以输入
sudo raspi-config
进入系统最初的那个设置界面设置中文(change_locale)。
接下来安装中文输入法。输入:
sudo apt-get install scim
sudo apt-get install scim-pinyin
重启系统进入图形界面模式,可以看到一个中文的Linux系统了。
用Raspian自带的Midori浏览器可以上网冲浪了!
小结
介绍了Raspberry Pi B型开发板如何快速上手,所需要的基本外设以及网络配置。设置了Raspian系统以及中文环境,快速的搭好了一个中文的Linux系统。
参考链接
Enable Secure Shell (SSH) On Your Raspberry Pi
Posted on May 31, 2012 by Matt
Secure Shell or SSH is a network protocol that allows you to run commands on a remote device. In the case of the Raspberry Pi can you execute commands over your network from another device such as a PC or laptop. This allows you to control the Pi without attaching a keyboard, mouse or even a monitor.
The free utility “PuTTY” can be used to connect to your Pi using SSH once it is enabled.
Update : The newer Debian “Wheezy” image enabled SSH by default so Methods 1 & 2 below are not required if you are using this image.
Method 1
To start the SSH server on a Pi you can open a terminal window (i.e. LXTerminal) and type :
sudo /etc/init.d/ssh start
followed by Enter. This needs to be done every time the Pi boots.
Method 2
To enable SSH automatically every time the Pi starts you need to :
- Prepare an SD card with the Debian “Squeeze” image
- Insert the SD card in your PC
- Rename ” boot_enable_ssh.rc” as “boot.rc”
- Eject the SD card and insert into your Pi
When the Pi boots SSH is enabled by default.
Using SSH
You can now open a remote terminal window using PuTTY or any other SSH enabled client. This will allow you to type commands as if you were using the Pi directly.
You can even use SSH to transfer files using a file explorer style interface on your PC. I recommend the free utility WinSCP which will allow you to drag and drop. Transfering files is easy and similar to using FTP.
转自:http://www.raspberrypi-spy.co.uk/2012/05/enable-secure-shell-ssh-on-your-raspberry-pi/