Difference between white & black script.bin

37 views
Skip to first unread message

Manoj Gudi

unread,
Aug 1, 2013, 8:30:05 AM8/1/13
to linux_o...@googlegroups.com, Pritam Baral
It seems the difference is not just for touch_screen:

Can we truly have a single unified script.bin for all devices?

--- white    2013-08-01 17:33:31.437802843 +0530
+++ black    2013-08-01 17:55:32.936355798 +0530
@@ -14,7 +14,7 @@
 
 [card_boot]
 logical_start = 40960
-sprite_gpio0 = ""
+sprite_gpio0 =
 
 [card_boot0_para]
 card_ctrl = 0
@@ -46,7 +46,7 @@
 
 [dram_para]
 dram_baseaddr = 0x40000000
-dram_clk = 408
+dram_clk = 432
 dram_type = 3
 dram_rank_num = 1
 dram_chip_density = 2048
@@ -54,7 +54,7 @@
 dram_bus_width = 16
 dram_cas = 9
 dram_zq = 0x7b
-dram_odt_en = 0
+dram_odt_en = 1
 dram_size = 512
 dram_tpr0 = 0x42d899b7
 dram_tpr1 = 0xa090
@@ -62,7 +62,7 @@
 dram_tpr3 = 0x0
 dram_tpr4 = 0x0
 dram_tpr5 = 0x0
-dram_emr1 = 0x0
+dram_emr1 = 0x4
 dram_emr2 = 0x10
 dram_emr3 = 0x0
 
@@ -84,14 +84,14 @@
 nand_d5 = port:PC13<2><default><default><default>
 nand_d6 = port:PC14<2><default><default><default>
 nand_d7 = port:PC15<2><default><default><default>
-nand_wp = ""
-nand_ce2 = ""
-nand_ce3 = ""
-nand_ce4 = ""
-nand_ce5 = ""
-nand_ce6 = ""
-nand_ce7 = ""
-nand_spi = ""
+nand_wp =
+nand_ce2 =
+nand_ce3 =
+nand_ce4 =
+nand_ce5 =
+nand_ce6 =
+nand_ce7 =
+nand_spi =
 nand_ndqs = port:PC19<2><default><default><default>
 
 [mali_para]
@@ -117,8 +117,8 @@
 uart_used = 0
 uart_port = 0
 uart_type = 2
-uart_tx = port:PG03<4><1><default><default>
-uart_rx = port:PG04<4><1><default><default>
+uart_tx = port:PB19<2><1><default><default>
+uart_rx = port:PB20<2><1><default><default>
 
 [uart_para1]
 uart_used = 1
@@ -136,7 +136,7 @@
 spi_miso = port:PG12<2><default><default><default>
 
 [spi2_para]
-spi_used = 1
+spi_used = 0
 spi_cs0 = port:PE00<4><default><default><default>
 spi_sclk = port:PE01<4><default><default><default>
 spi_mosi = port:PB02<4><default><default><default>
@@ -144,7 +144,7 @@
 
 [rtp_para]
 rtp_used = 0
-rtp_screen_size = 5
+rtp_screen_size = 7
 rtp_regidity_level = 5
 rtp_press_threshold_enable = 0
 rtp_press_threshold = 0x1f40
@@ -153,9 +153,9 @@
 
 [ctp_para]
 ctp_used = 1
-ctp_name = "ft5x_ts"
+ctp_name = "Goodix-TS"
 ctp_twi_id = 1
-ctp_twi_addr = 0x38
+ctp_twi_addr = 0x5d
 ctp_screen_max_x = 800
 ctp_screen_max_y = 480
 ctp_revert_x_flag = 0
@@ -163,29 +163,28 @@
 ctp_exchange_x_y_flag = 0
 ctp_int_port = port:PG11<6><default><default><default>
 ctp_wakeup = port:PB03<1><default><default><1>
-ctp_io_port = port:PG11<6><default><default><default>
 
 [tkey_para]
-tkey_used = 1
+tkey_used = 0
 tkey_name = "hv_keypad"
 tkey_twi_id = 2
 tkey_twi_addr = 0x62
-tkey_int = ""
+tkey_int =
 
 [motor_para]
 motor_used = 0
-motor_shake = ""
+motor_shake =
 
 [disp_init]
 disp_init_enable = 1
 disp_mode = 0
 screen0_output_type = 1
-screen0_output_mode = 1
+screen0_output_mode = 4
 screen1_output_type = 1
-screen1_output_mode = 2
+screen1_output_mode = 4
 fb0_framebuffer_num = 2
 fb0_format = 10
-fb0_pixel_sequence = 2
+fb0_pixel_sequence = 0
 fb0_scaler_mode_enable = 0
 fb1_framebuffer_num = 2
 fb1_format = 10
@@ -199,40 +198,40 @@
 lcd_dclk_freq = 33
 lcd_pwm_not_used = 0
 lcd_pwm_ch = 0
-lcd_pwm_freq = 10000
+lcd_pwm_freq = 18000
 lcd_pwm_pol = 1
 lcd_if = 0
-lcd_hbp = 215
-lcd_ht = 1055
-lcd_vbp = 34
+lcd_hbp = 40
+lcd_ht = 928
+lcd_vbp = 28
 lcd_vt = 1050
 lcd_hv_if = 0
 lcd_hv_smode = 0
 lcd_hv_s888_if = 0
 lcd_hv_syuv_if = 0
-lcd_hv_vspw = 3
-lcd_hv_hspw = 48
+lcd_hv_vspw = 0
+lcd_hv_hspw = 0
 lcd_lvds_ch = 0
 lcd_lvds_mode = 0
 lcd_lvds_bitwidth = 0
 lcd_lvds_io_cross = 0
 lcd_cpu_if = 0
 lcd_frm = 1
-lcd_io_cfg0 = 0
+lcd_io_cfg0 = 268435456
 lcd_gamma_correction_en = 0
 lcd_gamma_tbl_0 = 0x0
 lcd_gamma_tbl_1 = 0x10101
 lcd_gamma_tbl_255 = 0xffffff
-lcd_bl_en_used = 0
+lcd_bl_en_used = 1
 lcd_bl_en = port:power1<1><0><default><1>
 lcd_power_used = 1
 lcd_power = port:power0<1><0><default><1>
 lcd_pwm_used = 1
 lcd_pwm = port:PB02<2><0><default><default>
-lcd_gpio_0 = ""
-lcd_gpio_1 = ""
-lcd_gpio_2 = ""
-lcd_gpio_3 = ""
+lcd_gpio_0 =
+lcd_gpio_1 =
+lcd_gpio_2 =
+lcd_gpio_3 =
 lcdd0 = port:PD00<2><0><default><default>
 lcdd1 = port:PD01<2><0><default><default>
 lcdd2 = port:PD02<2><0><default><default>
@@ -309,13 +308,13 @@
 csi_reset = port:power3<1><default><default><0>
 csi_power_en = port:power2<1><default><default><0>
 csi_stby = port:PB10<1><default><default><1>
-csi_flash = ""
-csi_af_en = ""
-csi_reset_b = ""
-csi_power_en_b = ""
-csi_stby_b = ""
-csi_flash_b = ""
-csi_af_en_b = ""
+csi_flash =
+csi_af_en =
+csi_reset_b =
+csi_power_en_b =
+csi_stby_b =
+csi_flash_b =
+csi_af_en_b =
 
 [csi1_para]
 csi_used = 0
@@ -342,16 +341,16 @@
 csi_avdd_b = ""
 csi_dvdd_b = ""
 csi_flash_pol_b = 1
-csi_reset = ""
-csi_power_en = ""
-csi_stby = ""
-csi_flash = ""
-csi_af_en = ""
-csi_reset_b = ""
-csi_power_en_b = ""
-csi_stby_b = ""
-csi_flash_b = ""
-csi_af_en_b = ""
+csi_reset =
+csi_power_en =
+csi_stby =
+csi_flash =
+csi_af_en =
+csi_reset_b =
+csi_power_en_b =
+csi_stby_b =
+csi_flash_b =
+csi_af_en_b =
 
 [mmc0_para]
 sdc_used = 1
@@ -365,21 +364,21 @@
 sdc_d2 = port:PF05<2><1><2><default>
 sdc_det = port:PG00<0><1><default><default>
 sdc_use_wp = 0
-sdc_wp = ""
+sdc_wp =
 
 [mmc1_para]
 sdc_used = 0
-sdc_detmode = ""
-bus_width = ""
-sdc_cmd = ""
-sdc_clk = ""
-sdc_d0 = ""
-sdc_d1 = ""
-sdc_d2 = ""
-sdc_d3 = ""
-sdc_det = ""
-sdc_use_wp = ""
-sdc_wp = ""
+sdc_detmode =
+bus_width =
+sdc_cmd =
+sdc_clk =
+sdc_d0 =
+sdc_d1 =
+sdc_d2 =
+sdc_d3 =
+sdc_det =
+sdc_use_wp =
+sdc_wp =
 
 [mmc2_para]
 sdc_used = 0
@@ -391,40 +390,40 @@
 sdc_d1 = port:PE05<4><1><2><default>
 sdc_d2 = port:PE06<4><1><2><default>
 sdc_d3 = port:PE07<4><1><2><default>
-sdc_det = ""
+sdc_det =
 sdc_use_wp = 0
-sdc_wp = ""
+sdc_wp =
 
 [ms_para]
 ms_used = 0
-ms_bs = ""
-ms_clk = ""
-ms_d0 = ""
-ms_d1 = ""
-ms_d2 = ""
-ms_d3 = ""
-ms_det = ""
+ms_bs =
+ms_clk =
+ms_d0 =
+ms_d1 =
+ms_d2 =
+ms_d3 =
+ms_det =
 
 [keypad_para]
 kp_used = 0
-kp_in_size = ""
-kp_out_size = ""
-kp_in0 = ""
-kp_in1 = ""
-kp_in2 = ""
-kp_in3 = ""
-kp_in4 = ""
-kp_in5 = ""
-kp_in6 = ""
-kp_in7 = ""
-kp_out0 = ""
-kp_out1 = ""
-kp_out2 = ""
-kp_out3 = ""
-kp_out4 = ""
-kp_out5 = ""
-kp_out6 = ""
-kp_out7 = ""
+kp_in_size =
+kp_out_size =
+kp_in0 =
+kp_in1 =
+kp_in2 =
+kp_in3 =
+kp_in4 =
+kp_in5 =
+kp_in6 =
+kp_in7 =
+kp_out0 =
+kp_out1 =
+kp_out2 =
+kp_out3 =
+kp_out4 =
+kp_out5 =
+kp_out6 =
+kp_out7 =
 
 [usbc0]
 usb_used = 1
@@ -439,10 +438,10 @@
 usb_used = 1
 usb_port_type = 1
 usb_detect_type = 0
-usb_id_gpio = ""
-usb_det_vbus_gpio = ""
-usb_drv_vbus_gpio = port:PG11<1><0><default><0>
-usb_host_init_state = 1
+usb_id_gpio =
+usb_det_vbus_gpio =
+usb_drv_vbus_gpio = port:power203<1><0><default><0>
+usb_host_init_state = 0
 
 [usb_feature]
 vendor_id = 6353
@@ -453,47 +452,35 @@
 serial_number = "20080411"
 
 [msc_feature]
-vendor_name = "USB 2.0"
+vendor_name = "NUCLEAR"
 product_name = "USB Flash Driver"
 release = 100
 luns = 2
 
 [gsensor_para]
 gsensor_used = 1
-gsensor_name = "mma7660"
-gsensor_twi_id = 1
-gsensor_twi_addr = 0x4c
-gsensor_direct_x = 1
-gsensor_direct_y = 1
-gsensor_direct_z = 0
-gsensor_xy_revert = 1
-
-[gsensor1_para]
-gsensor_used = 0
-gsenser_name = "mma8452"
+gsensor_name = "dmard06"
 gsensor_twi_id = 1
 gsensor_twi_addr = 0x1c
-gsensor_direct_x = 1
-gsensor_direct_y = 1
-gsensor_direct_z = 0
-gsensor_xy_revert = 1
+gsensor_int1 =
+gsensor_int2 =
 
 [gps_para]
 gps_used = 0
-gps_spi_id = ""
-gps_spi_cs_num = ""
-gps_lradc = ""
-gps_clk = ""
-gps_sign = ""
-gps_mag = ""
-gps_vcc_en = ""
-gps_osc_en = ""
-gps_rx_en = ""
+gps_spi_id =
+gps_spi_cs_num =
+gps_lradc =
+gps_clk =
+gps_sign =
+gps_mag =
+gps_vcc_en =
+gps_osc_en =
+gps_rx_en =
 
 [sdio_wifi_para]
 sdio_wifi_used = 0
-sdio_wifi_sdc_id = ""
-sdio_wifi_mod_sel = ""
+sdio_wifi_sdc_id =
+sdio_wifi_mod_sel =
 
 [usb_wifi_para]
 usb_wifi_used = 1
@@ -501,56 +488,56 @@
 
 [3g_para]
 3g_used = 0
-3g_name = ""
-3g_usbc_num = ""
-3g_on_off = ""
-3g_reset = ""
-3g_poweron = ""
-3g_wakeup_out = ""
-3g_wakeup_in = ""
+3g_name =
+3g_usbc_num =
+3g_on_off =
+3g_reset =
+3g_poweron =
+3g_wakeup_out =
+3g_wakeup_in =
 
 [gy_para]
 gy_used = 0
 gy_twi_id = 1
 gy_twi_addr = 0
-gy_int1 = ""
-gy_int2 = ""
+gy_int1 =
+gy_int2 =
 
 [ls_para]
-ls_used = 0
-ls_name = "ltr501"
+ls_used = 1
+ls_name = "ltr501als"
 ls_twi_id = 1
-ls_twi_addr = ""
-ls_int = ""
+ls_twi_addr =
+ls_int =
 
 [compass_para]
 compass_used = 0
-compass_twi_id = ""
-compass_twi_addr = ""
-compass_int = ""
+compass_twi_id =
+compass_twi_addr =
+compass_int =
 
 [bt_para]
 bt_used = 0
-bt_uart_id = ""
-bt_mod_type = ""
+bt_uart_id =
+bt_mod_type =
 
 [i2s_para]
 i2s_used = 0
-i2s_channel = ""
-i2s_mclk = ""
-i2s_bclk = ""
-i2s_lrclk = ""
-i2s_dout0 = ""
-i2s_dout1 = ""
-i2s_dout2 = ""
-i2s_dout3 = ""
-i2s_din = ""
+i2s_channel =
+i2s_mclk =
+i2s_bclk =
+i2s_lrclk =
+i2s_dout0 =
+i2s_dout1 =
+i2s_dout2 =
+i2s_dout3 =
+i2s_din =
 
 [spdif_para]
 spdif_used = 0
-spdif_mclk = ""
-spdif_dout = ""
-spdif_din = ""
+spdif_mclk =
+spdif_dout =
+spdif_din =
 
 [audio_para]
 audio_used = 1
@@ -571,7 +558,7 @@
 pmu_twi_addr = 52
 pmu_twi_id = 0
 pmu_irq_id = 0
-pmu_battery_rdc = 200
+pmu_battery_rdc = 100
 pmu_battery_cap = 2600
 pmu_init_chgcur = 300
 pmu_earlysuspend_chgcur = 600
@@ -586,21 +573,23 @@
 pmu_init_chg_pretime = 50
 pmu_init_chg_csttime = 720
 pmu_bat_para1 = 0
-pmu_bat_para2 = 3
-pmu_bat_para3 = 4
-pmu_bat_para4 = 5
-pmu_bat_para5 = 7
-pmu_bat_para6 = 8
-pmu_bat_para7 = 12
-pmu_bat_para8 = 17
-pmu_bat_para9 = 27
-pmu_bat_para10 = 38
-pmu_bat_para11 = 52
-pmu_bat_para12 = 60
-pmu_bat_para13 = 72
-pmu_bat_para14 = 82
-pmu_bat_para15 = 89
+pmu_bat_para2 = 0
+pmu_bat_para3 = 0
+pmu_bat_para4 = 0
+pmu_bat_para5 = 5
+pmu_bat_para6 = 13
+pmu_bat_para7 = 16
+pmu_bat_para8 = 26
+pmu_bat_para9 = 36
+pmu_bat_para10 = 46
+pmu_bat_para11 = 53
+pmu_bat_para12 = 61
+pmu_bat_para13 = 73
+pmu_bat_para14 = 84
+pmu_bat_para15 = 92
 pmu_bat_para16 = 100
+pmu_usbvol_limit = 1
+pmu_usbcur_limit = 0
 pmu_usbvol = 4000
 pmu_usbcur = 0
 pmu_usbvol_pc = 4000
@@ -615,7 +604,7 @@
 pmu_pwrnoe_time = 2000
 pmu_intotp_en = 1
 pmu_used2 = 0
-pmu_adpdet = ""
+pmu_adpdet =
 pmu_init_chgcur2 = 400
 pmu_earlysuspend_chgcur2 = 600
 pmu_suspend_chgcur2 = 1200
@@ -625,13 +614,6 @@
 pmu_batdeten = 1
 
 [recovery_key]
-key_min = 2
-key_max = 8
-key_fact_min = 9
-key_fact_max = 13
-key_map = "115,114,0,0,158,0,0,0,0,0,0,0,0"
-
-[hwinfo]
-para_num = 0
-hw_para1 = ""
+key_min = 4
+key_max = 6
 

pri...@pritambaral.com

unread,
Aug 1, 2013, 8:53:55 AM8/1/13
to linux_o...@googlegroups.com
This whole script.bin thing is a massive hack (on linux-sunxi project's part.) They even had to patch the kernel to explicitly read their non-interoperable sunxi-specific script.bin code. Such hacks have been common in Linux-ARM world. Only recently has there been a successful effort to consolidate Linux across the diversity on ARM. I'm sure everyone would prefer a more portable approach.

Anyway, looking at the diff, I can see three patterns:

1) Differently coded, but semantically same values. e.g., "" vs <empty space>
2) Same keys, different values altogether.
3) Board specific keys.

#1 isn't a problem. As for #s 2 and 3, I propose a system of separating differing key-value pairs into board-specific files, and picking appropriate files at boot-time. Identifying the board can be done by a kernel, or by the bootloader.

Common sense dictates that if we're to have a single flashable image, we have to include a Union of all data required by all boards, in the image.

Manoj Gudi

unread,
Aug 1, 2013, 9:27:30 AM8/1/13
to Pritam Baral, linux_o...@googlegroups.com
On Thu, Aug 1, 2013 at 6:23 PM, <pri...@pritambaral.com> wrote:
This whole script.bin thing is a massive hack (on linux-sunxi project's part.) They even had to patch the kernel to explicitly read their non-interoperable sunxi-specific script.bin code. Such hacks have been common in Linux-ARM world. Only recently has there been a successful effort to consolidate Linux across the diversity on ARM. I'm sure everyone would prefer a more portable approach.

Anyway, looking at the diff, I can see three patterns:

1) Differently coded, but semantically same values. e.g., "" vs <empty space>
2) Same keys, different values altogether.
3) Board specific keys.

#1 isn't a problem. As for #s 2 and 3, I propose a system of separating differing key-value pairs into board-specific files, and picking appropriate files at boot-time. Identifying the board can be done by a kernel, or by the bootloader.

Common sense dictates that if we're to have a single flashable image, we have to include a Union of all data required by all boards, in the image.
With union comes pain of intersection.
For ex:
-dram_clk = 408  => white
+dram_clk = 432  => black

I propose a separate namespace of each of devices; and union of all: like
black_dram_clk = 432
white_dram_clk = 408

Q: How will kernel know which namespace variables to load?
A: One variable which separates all the three tablets -> ctp_name

 
--
You received this message because you are subscribed to the Google Groups "Linux-on-Aakash" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux_on_aaka...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Pritam Baral

unread,
Aug 1, 2013, 9:36:29 AM8/1/13
to linux_o...@googlegroups.com

Pritam Baral

unread,
Aug 1, 2013, 9:38:16 AM8/1/13
to linux_o...@googlegroups.com
Check quoted content above.

Using ctp_name to identify board would still mean different script.bin for different boards, defeating the whole purpose.

Manoj Gudi

unread,
Aug 1, 2013, 10:26:16 AM8/1/13
to Pritam Baral, linux_o...@googlegroups.com
That was impulsive and silly, sorry for the noise.


Reply all
Reply to author
Forward
0 new messages