Author: titmuss
Date: Fri Jan 2 09:18:00 2009
New Revision: 3658
URL: http://svn.slimdevices.com?rev=3658&root=Jive&view=rev
Log:
r3...@harrypotter (orig r3641): titmuss | 2008-12-29 23:44:51 +0000
Bug: N/A
Description:
Correct timing parameter.
r3...@harrypotter (orig r3647): titmuss | 2009-01-02 10:26:37 +0000
Bug: N/A
Description:
bootloader update for jive refresh to pass board revision '1' to kernel.
r3...@harrypotter (orig r3648): titmuss | 2009-01-02 10:56:21 +0000
Bug: N/A
Description:
Select correct lcd driver for jive, based on the system revision passed from
the
bootloader.
r3...@harrypotter (orig r3649): titmuss | 2009-01-02 12:58:56 +0000
Bug: N/A
Description:
Add /sys interface to modify the gamma settings of the lcd panel:
# old lcd settings
echo "0x0000,0x0505,0x0004,0x0006,0x0707,0x0105,0x0002,0x0707,0x0704,0x0807"
>
/sys/class/lcd/ili9320/gamma
# new lcd settings
echo "0x0000,0x0506,0x0104,0x0207,0x000F,0x0306,0x0102,0x0707,0x0702,0x1604"
>
/sys/class/lcd/ili9320/gamma
r3...@harrypotter (orig r3650): titmuss | 2009-01-02 14:52:09 +0000
Bug: N/A
Description:
Remove support for (very early) P4 prototype jives in the firmware upgrade.
r3...@harrypotter (orig r3652): titmuss | 2009-01-02 17:05:10 +0000
Bug: N/A
Description:
Add support for testing different board revisions during a firmware upgrade.
This
prevents downgrading to an firmware version that won't run on the board.
r3...@harrypotter (orig r3653): titmuss | 2009-01-02 17:08:34 +0000
Bug: N/A
Description:
Added board.version file in the firmware binary, that includes the board
revisions the
firmware is compatible with.
New kernel configuration for jive refresh.
Added:
7.3/trunk/bootloaders/uboot/u-boot-jive-rev1.bin (with props)
Modified:
7.3/trunk/ (props changed)
7.3/trunk/bootloaders/uboot/s3c24x0_uboot/board/smdk2413/smdk2413.c
7.3/trunk/bootloaders/uboot/s3c24x0_uboot/common/cmd_bootm.c
7.3/trunk/bootloaders/uboot/s3c24x0_uboot/include/asm-arm/u-boot.h
7.3/trunk/squeezeos/poky/meta-squeezeos/classes/squeezeos-upgrade-image.bbclass
7.3/trunk/squeezeos/poky/meta-squeezeos/conf/machine/jive.conf
7.3/trunk/squeezeos/poky/meta-squeezeos/packages/linux/files/defconfig-jive
7.3/trunk/squeezeos/poky/meta-squeezeos/packages/linux/linux-jive_svn.bb
7.3/trunk/squeezeos/src/s3c2412/linux-2.6.22/arch/arm/mach-s3c2412/mach-jive.c
7.3/trunk/squeezeos/src/s3c2412/linux-2.6.22/drivers/video/backlight/ili9320.c
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/Upgrade.lua
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
Propchange: 7.3/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Fri Jan 2 09:18:00 2009
@@ -2,7 +2,7 @@
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/branches/discovery-refactor:2596
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2920
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.2/trunk:2921
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/private-branches/jive-refresh:3640
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/private-branches/jive-refresh:3653
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified: 7.3/trunk/bootloaders/uboot/s3c24x0_uboot/board/smdk2413/smdk2413.c
URL:
http://svn.slimdevices.com/7.3/trunk/bootloaders/uboot/s3c24x0_uboot/board/smdk2413/smdk2413.c?rev=3658&root=Jive&r1=3657&r2=3658&view=diff
==============================================================================
--- 7.3/trunk/bootloaders/uboot/s3c24x0_uboot/board/smdk2413/smdk2413.c
(original)
+++ 7.3/trunk/bootloaders/uboot/s3c24x0_uboot/board/smdk2413/smdk2413.c Fri Jan
2 09:18:00 2009
@@ -118,6 +118,7 @@
/* arch number of Jive Board */
gd->bd->bi_arch_number = 1490;
+ gd->bd->bi_revision = 1;
/* adress of boot parameters */
gd->bd->bi_boot_params = 0x30000100;
Modified: 7.3/trunk/bootloaders/uboot/s3c24x0_uboot/common/cmd_bootm.c
URL:
http://svn.slimdevices.com/7.3/trunk/bootloaders/uboot/s3c24x0_uboot/common/cmd_bootm.c?rev=3658&root=Jive&r1=3657&r2=3658&view=diff
==============================================================================
--- 7.3/trunk/bootloaders/uboot/s3c24x0_uboot/common/cmd_bootm.c (original)
+++ 7.3/trunk/bootloaders/uboot/s3c24x0_uboot/common/cmd_bootm.c Fri Jan 2
09:18:00 2009
@@ -522,6 +522,7 @@
/* richard copied from armlinux for kernel cmdline */
setup_start_tag(bd);
setup_commandline_tag(bd, commandline);
+ setup_revision_tag(bd, bd->bi_revision);
setup_end_tag(bd);
/* Go Go Go */
@@ -564,6 +565,16 @@
params->hdr.size = (sizeof(struct tag_header) + strlen(p) + 1 + 4) >> 2;
strcpy(params->u.cmdline.cmdline, p);
+
+ params = tag_next(params);
+}
+
+static void setup_revision_tag(bd_t *bd, u32 revision)
+{
+ params->hdr.tag = ATAG_REVISION;
+ params->hdr.size = tag_size(tag_revision);
+
+ params->u.revision.rev = revision;
params = tag_next(params);
}
Modified: 7.3/trunk/bootloaders/uboot/s3c24x0_uboot/include/asm-arm/u-boot.h
URL:
http://svn.slimdevices.com/7.3/trunk/bootloaders/uboot/s3c24x0_uboot/include/asm-arm/u-boot.h?rev=3658&root=Jive&r1=3657&r2=3658&view=diff
==============================================================================
--- 7.3/trunk/bootloaders/uboot/s3c24x0_uboot/include/asm-arm/u-boot.h
(original)
+++ 7.3/trunk/bootloaders/uboot/s3c24x0_uboot/include/asm-arm/u-boot.h Fri Jan
2 09:18:00 2009
@@ -35,6 +35,7 @@
unsigned char bi_enetaddr[6]; /* Ethernet adress */
struct environment_s *bi_env;
ulong bi_arch_number; /* unique id for this board */
+ u32 bi_revision; /* revsion for this board */
ulong bi_boot_params; /* where this board expects params */
struct /* RAM configuration */
{
Added: 7.3/trunk/bootloaders/uboot/u-boot-jive-rev1.bin
URL:
http://svn.slimdevices.com/7.3/trunk/bootloaders/uboot/u-boot-jive-rev1.bin?rev=3658&root=Jive&view=auto
==============================================================================
Binary file - no diff available.
Propchange: 7.3/trunk/bootloaders/uboot/u-boot-jive-rev1.bin
------------------------------------------------------------------------------
svn:executable = *
Propchange: 7.3/trunk/bootloaders/uboot/u-boot-jive-rev1.bin
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified:
7.3/trunk/squeezeos/poky/meta-squeezeos/classes/squeezeos-upgrade-image.bbclass
URL:
http://svn.slimdevices.com/7.3/trunk/squeezeos/poky/meta-squeezeos/classes/squeezeos-upgrade-image.bbclass?rev=3658&root=Jive&r1=3657&r2=3658&view=diff
==============================================================================
---
7.3/trunk/squeezeos/poky/meta-squeezeos/classes/squeezeos-upgrade-image.bbclass
(original)
+++
7.3/trunk/squeezeos/poky/meta-squeezeos/classes/squeezeos-upgrade-image.bbclass
Fri Jan 2 09:18:00 2009
@@ -15,18 +15,20 @@
tmpdir=`mktemp -d /tmp/squeezeos-XXXXXX`
# Copy image files
- cp ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME} ${tmpdir}/zImage-P7
+ cp ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}
${tmpdir}/zImage${IMAGE_SQUEEZEOS_EXTRA_VERSION}
cp ${DEPLOY_DIR_IMAGE}/${ROOTFS_IMAGE_NAME} ${tmpdir}/root.cramfs
cp ${TMPDIR}/rootfs/etc/squeezeos.version ${tmpdir}/jive.version
+ echo -e ${IMAGE_SQUEEZEOS_BOARD_VERSION} > ${tmpdir}/board.version
# Prepare files
cd ${tmpdir}
- md5sum zImage-P7 root.cramfs > upgrade.md5
+ md5sum zImage${IMAGE_SQUEEZEOS_EXTRA_VERSION} root.cramfs > upgrade.md5
VERSION=${DISTRO_VERSION}_r${SQUEEZEOS_REVISION}
# Create zip
- zip ${DEPLOY_DIR_IMAGE}/${MACHINE}_${VERSION}.bin *
+ rm -f ${DEPLOY_DIR_IMAGE}/${MACHINE}_${VERSION}.bin
+ zip ${DEPLOY_DIR_IMAGE}/${MACHINE}_${VERSION}.bin jive.version
board.version upgrade.md5 zImage${IMAGE_SQUEEZEOS_EXTRA_VERSION} root.cramfs
cd ${DEPLOY_DIR_IMAGE}
rm -f ${MACHINE}.bin
Modified: 7.3/trunk/squeezeos/poky/meta-squeezeos/conf/machine/jive.conf
URL:
http://svn.slimdevices.com/7.3/trunk/squeezeos/poky/meta-squeezeos/conf/machine/jive.conf?rev=3658&root=Jive&r1=3657&r2=3658&view=diff
==============================================================================
--- 7.3/trunk/squeezeos/poky/meta-squeezeos/conf/machine/jive.conf (original)
+++ 7.3/trunk/squeezeos/poky/meta-squeezeos/conf/machine/jive.conf Fri Jan 2
09:18:00 2009
@@ -17,5 +17,9 @@
IMAGE_INSTALL += "squeezeplay-jive"
IMAGE_SQUEEZEOS_UPGRADE = "1"
+IMAGE_SQUEEZEOS_EXTRA_VERSION = "-P7"
+IMAGE_SQUEEZEOS_BOARD_VERSION = "jive:0000\\n\
+jive:0001\\n\
+"
require conf/machine/include/tune-arm926ejs.inc
Modified:
7.3/trunk/squeezeos/poky/meta-squeezeos/packages/linux/files/defconfig-jive
URL:
http://svn.slimdevices.com/7.3/trunk/squeezeos/poky/meta-squeezeos/packages/linux/files/defconfig-jive?rev=3658&root=Jive&r1=3657&r2=3658&view=diff
==============================================================================
--- 7.3/trunk/squeezeos/poky/meta-squeezeos/packages/linux/files/defconfig-jive
(original)
+++ 7.3/trunk/squeezeos/poky/meta-squeezeos/packages/linux/files/defconfig-jive
Fri Jan 2 09:18:00 2009
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.22
-# Mon Apr 14 11:50:24 2008
+# Fri Jan 2 14:20:11 2009
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -774,6 +774,7 @@
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_ILI9320=y
CONFIG_LCD_VGG2432A4=y
+CONFIG_LCD_VGG243271=y
#
# Display device support
Modified:
7.3/trunk/squeezeos/poky/meta-squeezeos/packages/linux/linux-jive_svn.bb
URL:
http://svn.slimdevices.com/7.3/trunk/squeezeos/poky/meta-squeezeos/packages/linux/linux-jive_svn.bb?rev=3658&root=Jive&r1=3657&r2=3658&view=diff
==============================================================================
--- 7.3/trunk/squeezeos/poky/meta-squeezeos/packages/linux/linux-jive_svn.bb
(original)
+++ 7.3/trunk/squeezeos/poky/meta-squeezeos/packages/linux/linux-jive_svn.bb
Fri Jan 2 09:18:00 2009
@@ -4,7 +4,7 @@
LINUX_VERSION = "2.6.22"
PV = "${LINUX_VERSION}+${DISTRO_VERSION}+svnr${SRCREV}"
-PR = "r1"
+PR = "r2"
inherit kernel
Modified:
7.3/trunk/squeezeos/src/s3c2412/linux-2.6.22/arch/arm/mach-s3c2412/mach-jive.c
URL:
http://svn.slimdevices.com/7.3/trunk/squeezeos/src/s3c2412/linux-2.6.22/arch/arm/mach-s3c2412/mach-jive.c?rev=3658&root=Jive&r1=3657&r2=3658&view=diff
==============================================================================
---
7.3/trunk/squeezeos/src/s3c2412/linux-2.6.22/arch/arm/mach-s3c2412/mach-jive.c
(original)
+++
7.3/trunk/squeezeos/src/s3c2412/linux-2.6.22/arch/arm/mach-s3c2412/mach-jive.c
Fri Jan 2 09:18:00 2009
@@ -391,7 +391,7 @@
#undef LCD_UPPER_MARGIN
#define LCD_UPPER_MARGIN 2
-static struct ili9320_platdata jive_lcm_config = {
+static struct ili9320_platdata jive_vgg2432a4_lcm_config = {
.hsize = LCD_XRES,
.vsize = LCD_YRES,
@@ -401,7 +401,6 @@
.entry_mode = ILI9320_ENTRYMODE_ID(3) | ILI9320_ENTRYMODE_BGR,
-#if 0
.display2 = (ILI9320_DISPLAY2_FP(LCD_UPPER_MARGIN) |
ILI9320_DISPLAY2_BP(LCD_LOWER_MARGIN)),
.display3 = 0x0,
@@ -415,7 +414,18 @@
ILI9320_INTERFACE4_DIVE(1)),
.interface5 = 0x0,
.interface6 = 0x0,
-#else
+};
+
+static struct ili9320_platdata jive_vgg243271_lcm_config = {
+ .hsize = LCD_XRES,
+ .vsize = LCD_YRES,
+
+ .reset = jive_lcm_reset,
+ .set_power = jive_backlight_powercb,
+ .suspend = ILI9320_SUSPEND_DEEP,
+
+ .entry_mode = ILI9320_ENTRYMODE_ID(3) | ILI9320_ENTRYMODE_BGR,
+
.display2 = (ILI9320_DISPLAY2_FP(LCD_UPPER_MARGIN) |
ILI9320_DISPLAY2_BP(LCD_LOWER_MARGIN)),
.display3 = 0x0,
@@ -423,8 +433,7 @@
.rgb_if1 = (ILI9320_RGBIF1_RIM_RGB16 |
ILI9320_RGBIF1_RM | ILI9320_RGBIF1_CLK_RGBIF),
.rgb_if2 = ILI9320_RGBIF2_DPL,
- .interface2 = 0x0,
-#endif
+ .interface2 = 0x0600,
};
/* LCD SPI support */
@@ -434,14 +443,23 @@
s3c2410_gpio_setpin(S3C2410_GPB7, cs ? 0 : 1);
}
-#if 0
-static struct spi_board_info jive_lcd_spi_board[] = {
+static struct spi_board_info jive_lcd_vgg2432a4_spi_board[] = {
[0] = {
.modalias = "VGG2432A4",
.chip_select = 0,
.mode = SPI_MODE_3, /* CPOL=1, CPHA=1 */
.max_speed_hz = 100000, /* todo: confirm */
- .platform_data = &jive_lcm_config,
+ .platform_data = &jive_vgg2432a4_lcm_config,
+ },
+};
+
+static struct spi_board_info jive_lcd_vgg243271_spi_board[] = {
+ [0] = {
+ .modalias = "VGG243271",
+ .chip_select = 0,
+ .mode = SPI_MODE_3, /* CPOL=1, CPHA=1 */
+ .max_speed_hz = 100000, /* todo: confirm */
+ .platform_data = &jive_vgg243271_lcm_config,
},
};
@@ -450,29 +468,9 @@
.pin_clk = S3C2410_GPG8,
.pin_mosi = S3C2410_GPB8,
.chip_select = jive_lcd_spi_chipselect,
- .board_info = jive_lcd_spi_board,
- .board_size = ARRAY_SIZE(jive_lcd_spi_board),
-};
-#else
-static struct spi_board_info jive_lcd_spi_board[] = {
- [0] = {
- .modalias = "VGG243271",
- .chip_select = 0,
- .mode = SPI_MODE_3, /* CPOL=1, CPHA=1 */
- .max_speed_hz = 100000, /* todo: confirm */
- .platform_data = &jive_lcm_config,
- },
-};
-
-static struct s3c2410_spigpio_info jive_lcd_spi = {
- .bus_num = 0,
- .pin_clk = S3C2410_GPG8,
- .pin_mosi = S3C2410_GPB8,
- .chip_select = jive_lcd_spi_chipselect,
- .board_info = jive_lcd_spi_board,
- .board_size = ARRAY_SIZE(jive_lcd_spi_board),
-};
-#endif
+ .board_info = NULL,
+ .board_size = 0,
+};
static struct platform_device jive_device_lcdspi = {
.name = "s3c24xx-spi-gpio",
@@ -503,7 +501,7 @@
.pin_mosi = S3C2410_GPB9,
.chip_select = jive_wm8750_chipselect,
.board_info = jive_wm8750_board,
- .board_size = ARRAY_SIZE(jive_lcd_spi_board),
+ .board_size = ARRAY_SIZE(jive_wm8750_board),
};
static struct platform_device jive_device_wm8750 = {
@@ -740,6 +738,18 @@
s3c_device_nand.dev.platform_data = &jive_nand_info;
+ switch (system_rev) {
+ case 0:
+ jive_lcd_spi.board_info = jive_lcd_vgg2432a4_spi_board;
+ jive_lcd_spi.board_size =
ARRAY_SIZE(jive_lcd_vgg2432a4_spi_board);
+ break;
+
+ default:
+ jive_lcd_spi.board_info = jive_lcd_vgg243271_spi_board;
+ jive_lcd_spi.board_size =
ARRAY_SIZE(jive_lcd_vgg243271_spi_board);
+ break;
+ }
+
/* make sure CLKOUT0 is turn off for EMI emissions */
s3c2410_gpio_cfgpin(S3C2410_GPH9, S3C2410_GPIO_INPUT);
Modified:
7.3/trunk/squeezeos/src/s3c2412/linux-2.6.22/drivers/video/backlight/ili9320.c
URL:
http://svn.slimdevices.com/7.3/trunk/squeezeos/src/s3c2412/linux-2.6.22/drivers/video/backlight/ili9320.c?rev=3658&root=Jive&r1=3657&r2=3658&view=diff
==============================================================================
---
7.3/trunk/squeezeos/src/s3c2412/linux-2.6.22/drivers/video/backlight/ili9320.c
(original)
+++
7.3/trunk/squeezeos/src/s3c2412/linux-2.6.22/drivers/video/backlight/ili9320.c
Fri Jan 2 09:18:00 2009
@@ -184,6 +184,31 @@
.set_power = ili9320_set_power,
};
+#define class_to_lcd(_w) container_of(_w, struct lcd_device, class_dev)
+
+static ssize_t ili9320_gamma_store(struct class_device *dev,
+ const char *buf, size_t count)
+{
+ struct lcd_device *lcd = class_to_lcd(dev);
+ struct ili9320 *ili = class_get_devdata(&lcd->class_dev);
+ char *ptr, *end;
+ unsigned long val;
+ unsigned int reg = ILI9320_GAMMA1;
+
+ end = (char *)buf + count;
+ ptr = (char *)buf;
+ while (ptr < end && reg <= ILI9320_GAMMA10) {
+ val = simple_strtoul(ptr, &ptr, 0);
+ ptr++;
+
+ ili9320_write(ili, reg++, val);
+ }
+
+ return count;
+}
+
+static CLASS_DEVICE_ATTR(gamma, 0644, NULL, ili9320_gamma_store);
+
static void __devinit ili9320_setup_spi(struct ili9320 *ili,
struct spi_device *dev)
{
@@ -216,7 +241,7 @@
struct ili9320_platdata *cfg = spi->dev.platform_data;
struct ili9320 *ili;
struct lcd_device *lcd;
- int ret = 0;
+ int err, ret = 0;
/* verify we where given some information */
@@ -266,6 +291,10 @@
goto err_unregister;
}
+ if ((err = class_device_create_file(&lcd->class_dev,
&class_device_attr_gamma))) {
+ dev_err(&spi->dev, "cannot attach gamma attribute\n");
+ }
+
return 0;
err_unregister:
@@ -281,6 +310,8 @@
int __devexit ili9320_remove(struct ili9320 *lcd)
{
ili9320_power(lcd, FB_BLANK_POWERDOWN);
+
+ class_device_remove_file(&lcd->lcd->class_dev,
&class_device_attr_gamma);
lcd_device_unregister(lcd->lcd);
kfree(lcd);
Modified:
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/Upgrade.lua
URL:
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/Upgrade.lua?rev=3658&root=Jive&r1=3657&r2=3658&view=diff
==============================================================================
---
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/Upgrade.lua
(original)
+++
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/Upgrade.lua
Fri Jan 2 09:18:00 2009
@@ -33,6 +33,7 @@
_mtd = {},
_size = {},
_checksum = "",
+ _boardVersion = "",
})
return obj
@@ -49,6 +50,13 @@
callback(false, "UPDATE_DOWNLOAD", "")
+ -- parse the board revision
+ t, err = self:parseCpuInfo()
+ if not t then
+ log:warn("parseCpuInfo failed")
+ return nil, err
+ end
+
-- parse the flash devices
t, err = self:parseMtd()
if not t then
@@ -56,15 +64,6 @@
return nil, err
end
- -- parse the kernel version
- self._zImageExtraVersion = "zImage-P7"
- self._mtd[self._zImageExtraVersion] = self._mtd["zImage"]
- t, err = self:parseVersion()
- if not t then
- log:warn("parseVersion failed")
- return nil, err
- end
-
-- disable VOL+ on boot
t, err = self:fw_setenv({ sw7 = "" })
if not t then
@@ -73,7 +72,7 @@
end
-- erase flash
- t, err = self:flashErase(self._zImageExtraVersion)
+ t, err = self:flashErase("zImage")
if not t then
log:warn("flash kernel failed")
return nil, err
@@ -95,7 +94,7 @@
callback(false, "UPDATE_VERIFY")
-- checksum kernel
- t, err = self:checksum(self._zImageExtraVersion)
+ t, err = self:checksum("zImage")
if not t then
log:warn("flash checksum failed")
return nil, err
@@ -187,6 +186,9 @@
elseif action == "checksum" then
-- store checksum
self._checksum = self._checksum .. chunk
+
+ elseif action == "board.version" then
+ self._boardVersion = self._boardVersion
.. chunk
end
return 1
@@ -209,9 +211,9 @@
if type(chunk) == "table" then
-- new file
- if chunk.filename == self._zImageExtraVersion
then
+ if string.match(chunk.filename, "^zImage") then
-- kernel
- part = self._zImageExtraVersion
+ part = "zImage"
elseif chunk.filename == "root.cramfs" then
-- cramfs
@@ -221,13 +223,20 @@
-- md5 checksums
action = "checksum"
+ elseif chunk.filename == "board.version" then
+ action = "board.version"
+
else
action = nil
end
-
-- open file handle
if part ~= nil then
+ if not self:verifyPlatformRevision() then
+ self.sinkErr = "Incompatible
firmware"
+ return nil
+ end
+
action = "store"
length = 0
@@ -244,6 +253,56 @@
-- should never get here
return nil
end
+end
+
+
+-- utility function to parse /dev/cpuinfo
+function parseCpuInfo(self)
+ local fh, err = io.open("/proc/cpuinfo")
+ if fh == nil then
+ return fh, err
+ end
+
+ while true do
+ local line = fh:read()
+ if line == nil then
+ break
+ end
+
+ if string.match(line, "Hardware") then
+ self._platform = string.lower(string.match(line,
".+:%s+([^%s]+)"))
+ elseif string.match(line, "Revision") then
+ self._revision = tonumber(string.match(line,
".+:%s+([^%s]+)"))
+ end
+
+ end
+ fh:close()
+
+ return 1
+end
+
+
+function verifyPlatformRevision(self)
+ for platform, revision in string.gmatch(self._boardVersion,
"(%a+):(%d+)") do
+ platform = string.lower(platform)
+ revision = tonumber(revision)
+
+ if string.match(platform, self._platform)
+ and revision == self._revision then
+ return true
+ end
+ end
+
+ -- backwards compatibility for initial jive boards
+ if self._boardVersion == ""
+ and self._platform == "jive"
+ and self._revision == 0 then
+ return true
+ end
+
+ log:warn("Firmware is not compatible with ", self._platform, ":",
self._revision)
+
+ return false
end
@@ -303,36 +362,6 @@
end
--- parse kernel extraversion
-function parseVersion(self)
-
- local fh, err = io.open("/proc/version")
- if fh == nil then
- return fh, err
- end
-
- local version = fh:read("*all")
- fh:close()
-
- local extraversion = string.match(version, "Linux version
[%d%.]+(%-[^%s]+)") or ""
-
- -- backwards compatibility
- if extraversion == "-P4" then
- extraversion = ""
- end
-
- log:info("extraversion=", extraversion)
-
- -- select kernel to use
- self._zImageExtraVersion = "zImage" .. extraversion
- self._mtd[self._zImageExtraVersion] = self._mtd["zImage"]
-
- Task:yield(true)
-
- return 1
-end
-
-
-- update bootloader environment
function fw_setenv(self, variables)
local cmd = { "/usr/sbin/fw_setenv" }
@@ -410,16 +439,16 @@
end
Task:yield(true)
end
-
- if self.sinkErr then
- log:info("sinkErr=", self.sinkErr)
- return false, self.sinkErr
- end
-
- return true
else
return false, "Unsupported url scheme"
end
+
+ if self.sinkErr then
+ log:info("sinkErr=", self.sinkErr)
+ return false, self.sinkErr
+ end
+
+ return true
end
Modified:
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
URL:
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua?rev=3658&root=Jive&r1=3657&r2=3658&view=diff
==============================================================================
---
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
(original)
+++
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
Fri Jan 2 09:18:00 2009
@@ -101,7 +101,7 @@
text = self:string("INVALID_MAC_CONTINUE"),
sound = "WINDOWHIDE",
callback = function()
- window:hide()
+ popup:hide()
end
},
})
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins