diff --git a/packages/devel/dbus-glib/build b/packages/devel/dbus-glib/build index 5bf4fdbe24..f921d9bf47 100755 --- a/packages/devel/dbus-glib/build +++ b/packages/devel/dbus-glib/build @@ -30,4 +30,4 @@ $STRIP dbus/.libs/*.so* make -C dbus DESTDIR=$SYSROOT_PREFIX install-libdbus_glibHEADERS make -C dbus DESTDIR=$SYSROOT_PREFIX install-libLTLIBRARIES -make -C dbus DESTDIR=$SYSROOT_PREFIX install-pkgconfigDATA +make DESTDIR=$SYSROOT_PREFIX install-pkgconfigDATA diff --git a/packages/linux/patches/1811_drm-next.diff b/packages/linux/1811_drm-next.diff similarity index 100% rename from packages/linux/patches/1811_drm-next.diff rename to packages/linux/1811_drm-next.diff diff --git a/packages/linux/patches/1812_drm-modesetting-radeon-0.1.diff b/packages/linux/1812_drm-modesetting-radeon-0.1.diff similarity index 100% rename from packages/linux/patches/1812_drm-modesetting-radeon-0.1.diff rename to packages/linux/1812_drm-modesetting-radeon-0.1.diff diff --git a/packages/linux/patches/1814_drm-nouveau.diff b/packages/linux/1814_drm-nouveau.diff similarity index 100% rename from packages/linux/patches/1814_drm-nouveau.diff rename to packages/linux/1814_drm-nouveau.diff diff --git a/packages/linux/patches/1818_drm-i915-resume-force-mode.diff b/packages/linux/1818_drm-i915-resume-force-mode.diff similarity index 100% rename from packages/linux/patches/1818_drm-i915-resume-force-mode.diff rename to packages/linux/1818_drm-i915-resume-force-mode.diff diff --git a/packages/linux/patches/1819_drm-intel-big-hammer.diff b/packages/linux/1819_drm-intel-big-hammer.diff similarity index 100% rename from packages/linux/patches/1819_drm-intel-big-hammer.diff rename to packages/linux/1819_drm-intel-big-hammer.diff diff --git a/packages/linux/patches/1821_drm-intel-lying-systems-without-lvds.diff b/packages/linux/1821_drm-intel-lying-systems-without-lvds.diff similarity index 100% rename from packages/linux/patches/1821_drm-intel-lying-systems-without-lvds.diff rename to packages/linux/1821_drm-intel-lying-systems-without-lvds.diff diff --git a/packages/linux/patches/1822_drm-intel-gen3-fb-hack.diff b/packages/linux/1822_drm-intel-gen3-fb-hack.diff similarity index 100% rename from packages/linux/patches/1822_drm-intel-gen3-fb-hack.diff rename to packages/linux/1822_drm-intel-gen3-fb-hack.diff diff --git a/packages/linux/patches/1823_drm-intel-tiled-front.diff b/packages/linux/1823_drm-intel-tiled-front.diff similarity index 100% rename from packages/linux/patches/1823_drm-intel-tiled-front.diff rename to packages/linux/1823_drm-intel-tiled-front.diff diff --git a/packages/linux/config/linux.i386.conf b/packages/linux/config/linux.i386.conf index 19dfa39cf0..5d83ff6ab0 100644 --- a/packages/linux/config/linux.i386.conf +++ b/packages/linux/config/linux.i386.conf @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.29.1 +# Linux kernel version: 2.6.30-rc3 # # CONFIG_64BIT is not set CONFIG_X86_32=y @@ -33,6 +33,7 @@ CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_DEFAULT_IDLE=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y +CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y # CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y @@ -40,15 +41,16 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_POPULATES_NODE_MAP=y # CONFIG_AUDIT_ARCH is not set CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_X86_SMP=y CONFIG_USE_GENERIC_SMP_HELPERS=y CONFIG_X86_32_SMP=y CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y CONFIG_X86_TRAMPOLINE=y +CONFIG_X86_32_LAZY_GS=y CONFIG_KTIME_SCALAR=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" @@ -60,10 +62,17 @@ CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_BZIP2=y +CONFIG_HAVE_KERNEL_LZMA=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_BZIP2 is not set +CONFIG_KERNEL_LZMA=y # CONFIG_SWAP is not set CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y CONFIG_TASKSTATS=y @@ -104,6 +113,13 @@ CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="/home/stephan/projects/OpenELEC/packages/linux/config/initramfs" CONFIG_INITRAMFS_ROOT_UID=0 CONFIG_INITRAMFS_ROOT_GID=0 +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_INITRAMFS_COMPRESSION_NONE=y +# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set +# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set +# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_ANON_INODES=y @@ -112,6 +128,7 @@ CONFIG_UID16=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_EXTRA_PASS=y +# CONFIG_STRIP_ASM_SYMS is not set CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y @@ -133,6 +150,7 @@ CONFIG_SLUB_DEBUG=y CONFIG_SLUB=y # CONFIG_SLOB is not set # CONFIG_PROFILING is not set +# CONFIG_MARKERS is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y @@ -140,6 +158,8 @@ CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_API_DEBUG=y +# CONFIG_SLOW_WORK is not set CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y @@ -153,7 +173,6 @@ CONFIG_MODULE_UNLOAD=y CONFIG_STOP_MACHINE=y CONFIG_BLOCK=y CONFIG_LBD=y -# CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_INTEGRITY is not set @@ -180,14 +199,9 @@ CONFIG_HIGH_RES_TIMERS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_SMP=y # CONFIG_SPARSE_IRQ is not set -CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y -CONFIG_X86_PC=y -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_VSMP is not set -# CONFIG_X86_RDC321X is not set +# CONFIG_X86_BIGSMP is not set +# CONFIG_X86_EXTENDED_PLATFORM is not set CONFIG_SCHED_OMIT_FRAME_POINTER=y # CONFIG_PARAVIRT_GUEST is not set # CONFIG_MEMTEST is not set @@ -218,8 +232,10 @@ CONFIG_M586=y # CONFIG_GENERIC_CPU is not set CONFIG_X86_GENERIC=y CONFIG_X86_CPU=y +CONFIG_X86_L1_CACHE_BYTES=64 +CONFIG_X86_INTERNODE_CACHE_BYTES=64 CONFIG_X86_CMPXCHG=y -CONFIG_X86_L1_CACHE_SHIFT=7 +CONFIG_X86_L1_CACHE_SHIFT=5 CONFIG_X86_XADD=y CONFIG_X86_PPRO_FENCE=y CONFIG_X86_F00F_BUG=y @@ -234,7 +250,7 @@ CONFIG_PROCESSOR_SELECT=y CONFIG_CPU_SUP_INTEL=y CONFIG_CPU_SUP_CYRIX_32=y CONFIG_CPU_SUP_AMD=y -CONFIG_CPU_SUP_CENTAUR_32=y +CONFIG_CPU_SUP_CENTAUR=y CONFIG_CPU_SUP_TRANSMETA_32=y CONFIG_CPU_SUP_UMC_32=y CONFIG_HPET_TIMER=y @@ -250,7 +266,7 @@ CONFIG_SCHED_MC=y CONFIG_PREEMPT=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y -# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set +CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y CONFIG_X86_MCE=y CONFIG_X86_MCE_NONFATAL=y # CONFIG_X86_MCE_P4THERMAL is not set @@ -261,6 +277,7 @@ CONFIG_X86_REBOOTFIXUPS=y # CONFIG_MICROCODE is not set # CONFIG_X86_MSR is not set # CONFIG_X86_CPUID is not set +# CONFIG_X86_CPU_DEBUG is not set # CONFIG_NOHIGHMEM is not set CONFIG_HIGHMEM4G=y # CONFIG_HIGHMEM64G is not set @@ -289,6 +306,8 @@ CONFIG_ZONE_DMA_FLAG=1 CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y CONFIG_UNEVICTABLE_LRU=y +CONFIG_HAVE_MLOCK=y +CONFIG_HAVE_MLOCKED_PAGE_BIT=y CONFIG_HIGHPTE=y CONFIG_X86_CHECK_BIOS_CORRUPTION=y CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y @@ -301,6 +320,7 @@ CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 # CONFIG_X86_PAT is not set CONFIG_EFI=y # CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set CONFIG_HZ_300=y @@ -370,7 +390,6 @@ CONFIG_X86_POWERNOW_K6=y CONFIG_X86_POWERNOW_K7=y CONFIG_X86_POWERNOW_K7_ACPI=y CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y CONFIG_X86_GX_SUSPMOD=y # CONFIG_X86_SPEEDSTEP_CENTRINO is not set CONFIG_X86_SPEEDSTEP_ICH=y @@ -403,6 +422,7 @@ CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y CONFIG_PCI_DOMAINS=y +# CONFIG_DMAR is not set CONFIG_PCIEPORTBUS=y CONFIG_HOTPLUG_PCI_PCIE=m CONFIG_PCIEAER=y @@ -412,6 +432,7 @@ CONFIG_PCI_MSI=y CONFIG_PCI_LEGACY=y # CONFIG_PCI_STUB is not set CONFIG_HT_IRQ=y +# CONFIG_PCI_IOV is not set CONFIG_ISA_DMA_API=y # CONFIG_ISA is not set # CONFIG_MCA is not set @@ -454,7 +475,6 @@ CONFIG_NET=y # # Networking options # -CONFIG_COMPAT_NET_DEV_OPS=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y @@ -501,6 +521,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_LAPB is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set # CONFIG_NET_SCHED is not set # CONFIG_DCB is not set @@ -535,11 +556,9 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m # CONFIG_BT_HCIVHCI is not set # CONFIG_AF_RXRPC is not set -# CONFIG_PHONET is not set CONFIG_WIRELESS=y CONFIG_CFG80211=y # CONFIG_CFG80211_REG_DEBUG is not set -CONFIG_NL80211=y CONFIG_WIRELESS_OLD_REGULATORY=y CONFIG_WIRELESS_EXT=y CONFIG_WIRELESS_EXT_SYSFS=y @@ -609,10 +628,6 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=2048 # CONFIG_BLK_DEV_XIP is not set -# CONFIG_LZMA_INITRD is not set -CONFIG_LZMA_INITRAM_FS=y -# CONFIG_LZMA_INITRAM_FS_SMALLMEM is not set -# CONFIG_LZMA_INITRAM_FS_KMALLOC_ONLY is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set # CONFIG_BLK_DEV_HD is not set @@ -625,6 +640,7 @@ CONFIG_TIFM_7XX1=m # CONFIG_ICS932S401 is not set # CONFIG_ENCLOSURE_SERVICES is not set # CONFIG_HP_ILO is not set +# CONFIG_ISL29003 is not set # CONFIG_C2PORT is not set # @@ -699,10 +715,12 @@ CONFIG_AIC7XXX_DEBUG_MASK=0 # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set +# CONFIG_SCSI_MPT2SAS is not set # CONFIG_SCSI_HPTIOP is not set CONFIG_SCSI_BUSLOGIC=m # CONFIG_SCSI_FLASHPOINT is not set # CONFIG_LIBFC is not set +# CONFIG_LIBFCOE is not set # CONFIG_FCOE is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set @@ -729,6 +747,7 @@ CONFIG_SCSI_DC390T=m # CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_SRP is not set # CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set CONFIG_ATA=y # CONFIG_ATA_NONSTANDARD is not set CONFIG_ATA_ACPI=y @@ -819,6 +838,7 @@ CONFIG_IEEE1394_SBP2=m # CONFIG_I2O is not set # CONFIG_MACINTOSH_DRIVERS is not set CONFIG_NETDEVICES=y +CONFIG_COMPAT_NET_DEV_OPS=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_MACVLAN is not set @@ -856,6 +876,7 @@ CONFIG_CASSINI=y CONFIG_NET_VENDOR_3COM=y CONFIG_VORTEX=y CONFIG_TYPHOON=y +# CONFIG_ETHOC is not set CONFIG_DNET=y CONFIG_NET_TULIP=y # CONFIG_DE2104X is not set @@ -915,7 +936,7 @@ CONFIG_E1000=y CONFIG_E1000E=y CONFIG_IP1000=y CONFIG_IGB=y -# CONFIG_IGB_LRO is not set +# CONFIG_IGBVF is not set CONFIG_NS83820=y CONFIG_HAMACHI=y CONFIG_YELLOWFIN=y @@ -946,14 +967,9 @@ CONFIG_LIBERTAS_SDIO=m CONFIG_LIBERTAS_THINFIRM=m CONFIG_LIBERTAS_THINFIRM_USB=m CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_HERMES_CACHE_FW_ON_INIT=y -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m CONFIG_ATMEL=m CONFIG_PCI_ATMEL=m +# CONFIG_AT76C50X_USB is not set CONFIG_PRISM54=m CONFIG_USB_ZD1201=m CONFIG_USB_NET_RNDIS_WLAN=m @@ -961,12 +977,15 @@ CONFIG_RTL8180=m CONFIG_RTL8187=m CONFIG_ADM8211=m # CONFIG_MAC80211_HWSIM is not set +# CONFIG_MWL8K is not set CONFIG_P54_COMMON=m CONFIG_P54_USB=m CONFIG_P54_PCI=m +CONFIG_P54_LEDS=y # CONFIG_ATH5K is not set CONFIG_ATH9K=m # CONFIG_ATH9K_DEBUG is not set +# CONFIG_AR9170_USB is not set CONFIG_IPW2100=m # CONFIG_IPW2100_MONITOR is not set # CONFIG_IPW2100_DEBUG is not set @@ -977,20 +996,15 @@ CONFIG_IPW2200=m CONFIG_LIBIPW=m # CONFIG_LIBIPW_DEBUG is not set CONFIG_IWLWIFI=m -CONFIG_IWLCORE=m CONFIG_IWLWIFI_LEDS=y CONFIG_IWLWIFI_RFKILL=y +# CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT is not set # CONFIG_IWLWIFI_DEBUG is not set CONFIG_IWLAGN=m -CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y -CONFIG_IWLAGN_LEDS=y CONFIG_IWL4965=y CONFIG_IWL5000=y CONFIG_IWL3945=m -CONFIG_IWL3945_RFKILL=y CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y -CONFIG_IWL3945_LEDS=y -# CONFIG_IWL3945_DEBUG is not set # CONFIG_HOSTAP is not set CONFIG_B43=m CONFIG_B43_PCI_AUTOSELECT=y @@ -1023,6 +1037,12 @@ CONFIG_RT2X00_LIB_CRYPTO=y CONFIG_RT2X00_LIB_RFKILL=y CONFIG_RT2X00_LIB_LEDS=y # CONFIG_RT2X00_DEBUG is not set +CONFIG_HERMES=m +CONFIG_HERMES_CACHE_FW_ON_INIT=y +CONFIG_PLX_HERMES=m +CONFIG_TMD_HERMES=m +CONFIG_NORTEL_HERMES=m +CONFIG_PCI_HERMES=m # # Enable WiMAX (Networking options) to see the WiMAX drivers @@ -1177,6 +1197,7 @@ CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_IPMI_HANDLER is not set CONFIG_HW_RANDOM=m +# CONFIG_HW_RANDOM_TIMERIOMEM is not set # CONFIG_HW_RANDOM_INTEL is not set # CONFIG_HW_RANDOM_AMD is not set # CONFIG_HW_RANDOM_GEODE is not set @@ -1256,7 +1277,6 @@ CONFIG_SCx200_ACB=m # Miscellaneous I2C Chip support # # CONFIG_DS1682 is not set -CONFIG_SENSORS_PCF8591=m # CONFIG_SENSORS_MAX6875 is not set # CONFIG_SENSORS_TSL2550 is not set # CONFIG_I2C_DEBUG_CORE is not set @@ -1310,6 +1330,7 @@ CONFIG_HWMON=m # CONFIG_SENSORS_ADT7475 is not set # CONFIG_SENSORS_K8TEMP is not set # CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_ATK0110 is not set # CONFIG_SENSORS_ATXP1 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_I5K_AMB is not set @@ -1319,6 +1340,7 @@ CONFIG_HWMON=m # CONFIG_SENSORS_FSCHER is not set # CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_FSCHMD is not set +# CONFIG_SENSORS_G760A is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_CORETEMP is not set @@ -1334,11 +1356,15 @@ CONFIG_HWMON=m # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_LM92 is not set # CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4215 is not set # CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LM95241 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_MAX6650 is not set # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_PC87427 is not set +CONFIG_SENSORS_PCF8591=m +# CONFIG_SENSORS_SHT15 is not set # CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_DME1737 is not set # CONFIG_SENSORS_SMSC47M1 is not set @@ -1415,7 +1441,7 @@ CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_MEDIA_ATTACH=y CONFIG_MEDIA_TUNER=m -CONFIG_MEDIA_TUNER_CUSTOMIZE=y +# CONFIG_MEDIA_TUNER_CUSTOMISE is not set CONFIG_MEDIA_TUNER_SIMPLE=m CONFIG_MEDIA_TUNER_TDA8290=m CONFIG_MEDIA_TUNER_TDA827X=m @@ -1432,6 +1458,7 @@ CONFIG_MEDIA_TUNER_XC2028=m CONFIG_MEDIA_TUNER_XC5000=m CONFIG_MEDIA_TUNER_MXL5005S=m CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=m CONFIG_VIDEO_V4L2=m CONFIG_VIDEO_V4L1=m CONFIG_VIDEOBUF_GEN=m @@ -1449,7 +1476,6 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y CONFIG_VIDEO_IR_I2C=m CONFIG_VIDEO_TVAUDIO=m CONFIG_VIDEO_TDA7432=m -CONFIG_VIDEO_TDA9875=m CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS5345=m CONFIG_VIDEO_CS53L32A=m @@ -1457,6 +1483,7 @@ CONFIG_VIDEO_M52790=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m CONFIG_VIDEO_VP27SMPX=m +CONFIG_VIDEO_SAA6588=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA717X=m CONFIG_VIDEO_TVP5150=m @@ -1468,7 +1495,6 @@ CONFIG_VIDEO_UPD64083=m # CONFIG_VIDEO_VIVI is not set CONFIG_VIDEO_BT848=m CONFIG_VIDEO_BT848_DVB=y -# CONFIG_VIDEO_SAA6588 is not set # CONFIG_VIDEO_CPIA is not set # CONFIG_VIDEO_CPIA2 is not set # CONFIG_VIDEO_SAA5246A is not set @@ -1497,14 +1523,17 @@ CONFIG_VIDEO_CX18=m # CONFIG_SOC_CAMERA is not set CONFIG_V4L_USB_DRIVERS=y # CONFIG_USB_VIDEO_CLASS is not set +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y # CONFIG_USB_GSPCA is not set CONFIG_VIDEO_PVRUSB2=m CONFIG_VIDEO_PVRUSB2_SYSFS=y CONFIG_VIDEO_PVRUSB2_DVB=y # CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +# CONFIG_VIDEO_HDPVR is not set CONFIG_VIDEO_EM28XX=m CONFIG_VIDEO_EM28XX_ALSA=m CONFIG_VIDEO_EM28XX_DVB=m +# CONFIG_VIDEO_CX231XX is not set # CONFIG_VIDEO_USBVISION is not set # CONFIG_USB_VICAM is not set # CONFIG_USB_IBMCAM is not set @@ -1518,6 +1547,7 @@ CONFIG_VIDEO_EM28XX_DVB=m # CONFIG_USB_STV680 is not set # CONFIG_USB_ZC0301 is not set # CONFIG_USB_PWC is not set +CONFIG_USB_PWC_INPUT_EVDEV=y # CONFIG_USB_ZR364XX is not set # CONFIG_USB_STKWEBCAM is not set # CONFIG_USB_S2255 is not set @@ -1574,6 +1604,7 @@ CONFIG_DVB_USB_CINERGY_T2=m CONFIG_DVB_USB_ANYSEE=m CONFIG_DVB_USB_DTV5100=m CONFIG_DVB_USB_AF9015=m +# CONFIG_DVB_USB_CE6230 is not set CONFIG_DVB_TTUSB_BUDGET=m CONFIG_DVB_TTUSB_DEC=m CONFIG_DVB_SIANO_SMS1XXX=m @@ -1610,28 +1641,19 @@ CONFIG_DVB_DM1105=m # # Supported DVB Frontends # - -# -# Customise DVB Frontends -# # CONFIG_DVB_FE_CUSTOMISE is not set - -# -# Multistandard (satellite) frontends -# CONFIG_DVB_STB0899=m CONFIG_DVB_STB6100=m - -# -# DVB-S (satellite) frontends -# CONFIG_DVB_CX24110=m CONFIG_DVB_CX24123=m CONFIG_DVB_MT312=m +CONFIG_DVB_ZL10036=m CONFIG_DVB_S5H1420=m CONFIG_DVB_STV0288=m CONFIG_DVB_STB6000=m CONFIG_DVB_STV0299=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_STV0900=m CONFIG_DVB_TDA8083=m CONFIG_DVB_TDA10086=m CONFIG_DVB_TDA8261=m @@ -1642,15 +1664,10 @@ CONFIG_DVB_TDA826X=m CONFIG_DVB_TUA6100=m CONFIG_DVB_CX24116=m CONFIG_DVB_SI21XX=m - -# -# DVB-T (terrestrial) frontends -# CONFIG_DVB_SP8870=m CONFIG_DVB_SP887X=m CONFIG_DVB_CX22700=m CONFIG_DVB_CX22702=m -CONFIG_DVB_DRX397XD=m CONFIG_DVB_L64781=m CONFIG_DVB_TDA1004X=m CONFIG_DVB_NXT6000=m @@ -1661,52 +1678,26 @@ CONFIG_DVB_DIB3000MC=m CONFIG_DVB_DIB7000M=m CONFIG_DVB_DIB7000P=m CONFIG_DVB_TDA10048=m - -# -# DVB-C (cable) frontends -# +CONFIG_DVB_AF9013=m CONFIG_DVB_VES1820=m CONFIG_DVB_TDA10021=m CONFIG_DVB_TDA10023=m CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m -CONFIG_DVB_LGDT3304=m +CONFIG_DVB_LGDT3305=m CONFIG_DVB_S5H1409=m CONFIG_DVB_AU8522=m CONFIG_DVB_S5H1411=m - -# -# ISDB-T (terrestrial) frontends -# -CONFIG_DVB_S921=m - -# -# Digital terrestrial only tuners/PLL -# CONFIG_DVB_PLL=m CONFIG_DVB_TUNER_DIB0070=m - -# -# SEC control devices for DVB-S -# CONFIG_DVB_LNBP21=m CONFIG_DVB_ISL6405=m CONFIG_DVB_ISL6421=m CONFIG_DVB_LGS8GL5=m - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set -CONFIG_DVB_AF9013=m CONFIG_DAB=y # CONFIG_USB_DABUSB is not set @@ -1728,7 +1719,6 @@ CONFIG_DRM=y # CONFIG_DRM_TDFX is not set # CONFIG_DRM_R128 is not set CONFIG_DRM_RADEON=m -CONFIG_DRM_RADEON_KMS=y CONFIG_DRM_I810=m CONFIG_DRM_I830=m CONFIG_DRM_I915=m @@ -1737,8 +1727,6 @@ CONFIG_DRM_I915_KMS=y # CONFIG_DRM_SIS is not set CONFIG_DRM_VIA=m # CONFIG_DRM_SAVAGE is not set -CONFIG_DRM_NOUVEAU=m -CONFIG_DRM_NOUVEAU_KMS=y # CONFIG_VGASTATE is not set CONFIG_VIDEO_OUTPUT_CONTROL=y CONFIG_FB=y @@ -1794,7 +1782,6 @@ CONFIG_FB_VESA=y # CONFIG_FB_3DFX is not set # CONFIG_FB_VOODOO1 is not set # CONFIG_FB_VT8623 is not set -# CONFIG_FB_CYBLA is not set # CONFIG_FB_TRIDENT is not set # CONFIG_FB_ARK is not set # CONFIG_FB_PM3 is not set @@ -1803,6 +1790,7 @@ CONFIG_FB_VESA=y # CONFIG_FB_VIRTUAL is not set # CONFIG_FB_METRONOME is not set # CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=y # CONFIG_LCD_ILI9320 is not set @@ -1835,6 +1823,11 @@ CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y # CONFIG_LOGO is not set + +# +# Bootsplash configuration +# +CONFIG_BOOTSPLASH=y CONFIG_SOUND=m # CONFIG_SOUND_OSS_CORE is not set CONFIG_SND=m @@ -1900,6 +1893,8 @@ CONFIG_SND_ECHO3G=m CONFIG_SND_INDIGO=m CONFIG_SND_INDIGOIO=m CONFIG_SND_INDIGODJ=m +CONFIG_SND_INDIGOIOX=m +CONFIG_SND_INDIGODJX=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2052,11 +2047,11 @@ CONFIG_USB_WDM=m # CONFIG_USB_TMC is not set # -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may # # -# see USB_STORAGE Help for more information +# also be needed; see USB_STORAGE Help for more info # CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set @@ -2091,7 +2086,7 @@ CONFIG_USB_SERIAL_BELKIN=m # CONFIG_USB_SERIAL_CH341 is not set # CONFIG_USB_SERIAL_WHITEHEAT is not set CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m +# CONFIG_USB_SERIAL_CP210X is not set # CONFIG_USB_SERIAL_CYPRESS_M8 is not set # CONFIG_USB_SERIAL_EMPEG is not set CONFIG_USB_SERIAL_FTDI_SIO=m @@ -2115,11 +2110,13 @@ CONFIG_USB_SERIAL_FUNSOFT=m # CONFIG_USB_SERIAL_NAVMAN is not set # CONFIG_USB_SERIAL_PL2303 is not set # CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_QUALCOMM is not set # CONFIG_USB_SERIAL_SPCP8X5 is not set # CONFIG_USB_SERIAL_HP4X is not set # CONFIG_USB_SERIAL_SAFE is not set # CONFIG_USB_SERIAL_SIEMENS_MPI is not set # CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_SYMBOL is not set # CONFIG_USB_SERIAL_TI is not set # CONFIG_USB_SERIAL_CYBERJACK is not set # CONFIG_USB_SERIAL_XIRCOM is not set @@ -2142,7 +2139,6 @@ CONFIG_USB_SERIAL_FUNSOFT=m # CONFIG_USB_LED is not set # CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGET is not set # CONFIG_USB_IDMOUSE is not set # CONFIG_USB_FTDI_ELAN is not set # CONFIG_USB_APPLEDISPLAY is not set @@ -2159,6 +2155,7 @@ CONFIG_USB_SERIAL_FUNSOFT=m # OTG and related infrastructure # # CONFIG_USB_GPIO_VBUS is not set +# CONFIG_NOP_USB_XCEIV is not set # CONFIG_UWB is not set CONFIG_MMC=y # CONFIG_MMC_DEBUG is not set @@ -2203,8 +2200,10 @@ CONFIG_LEDS_CLASS=m # CONFIG_LEDS_ALIX2 is not set # CONFIG_LEDS_PCA9532 is not set # CONFIG_LEDS_GPIO is not set +# CONFIG_LEDS_LP5521 is not set # CONFIG_LEDS_CLEVO_MAIL is not set # CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_BD2802 is not set # # LED Triggers @@ -2213,7 +2212,12 @@ CONFIG_LEDS_TRIGGERS=y # CONFIG_LEDS_TRIGGER_TIMER is not set # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set +# CONFIG_LEDS_TRIGGER_GPIO is not set # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set + +# +# iptables trigger is under Netfilter config (LED target) +# # CONFIG_ACCESSIBILITY is not set # CONFIG_INFINIBAND is not set # CONFIG_EDAC is not set @@ -2272,10 +2276,12 @@ CONFIG_RTC_DRV_CMOS=y # on-CPU RTC drivers # # CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set # CONFIG_UIO is not set # CONFIG_STAGING is not set CONFIG_X86_PLATFORM_DEVICES=y CONFIG_ACER_WMI=m +# CONFIG_DELL_WMI is not set CONFIG_FUJITSU_LAPTOP=m # CONFIG_FUJITSU_LAPTOP_DEBUG is not set CONFIG_TC1100_WMI=m @@ -2288,6 +2294,7 @@ CONFIG_SONY_LAPTOP=m CONFIG_THINKPAD_ACPI=m # CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set # CONFIG_THINKPAD_ACPI_DEBUG is not set +# CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set CONFIG_THINKPAD_ACPI_BAY=y CONFIG_THINKPAD_ACPI_VIDEO=y CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y @@ -2315,6 +2322,7 @@ CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set # CONFIG_EXT2_FS_XIP is not set CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set # CONFIG_EXT3_FS_XATTR is not set CONFIG_EXT4_FS=y # CONFIG_EXT4DEV_COMPAT is not set @@ -2352,6 +2360,11 @@ CONFIG_INOTIFY_USER=y # CONFIG_AUTOFS4_FS is not set CONFIG_FUSE_FS=y +# +# Caches +# +# CONFIG_FSCACHE is not set + # # CD-ROM/DVD Filesystems # @@ -2405,6 +2418,7 @@ CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 CONFIG_UFS_FS=m # CONFIG_UFS_FS_WRITE is not set # CONFIG_UFS_DEBUG is not set +# CONFIG_NILFS2_FS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y CONFIG_NFS_V3=y @@ -2418,7 +2432,6 @@ CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y -# CONFIG_SUNRPC_REGISTER_V4 is not set CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set @@ -2524,13 +2537,30 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_FTRACE_SYSCALLS=y +CONFIG_TRACING_SUPPORT=y # # Tracers # +# CONFIG_FUNCTION_TRACER is not set +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_PREEMPT_TRACER is not set # CONFIG_SYSPROF_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_CONTEXT_SWITCH_TRACER is not set +# CONFIG_EVENT_TRACER is not set +# CONFIG_FTRACE_SYSCALLS is not set +# CONFIG_BOOT_TRACER is not set +# CONFIG_TRACE_BRANCH_PROFILING is not set +# CONFIG_POWER_TRACER is not set +# CONFIG_STACK_TRACER is not set +# CONFIG_KMEMTRACE is not set +# CONFIG_WORKQUEUE_TRACER is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_MMIOTRACE is not set # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set -# CONFIG_DYNAMIC_PRINTK_DEBUG is not set +# CONFIG_DMA_API_DEBUG is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y CONFIG_STRICT_DEVMEM=y @@ -2558,6 +2588,7 @@ CONFIG_OPTIMIZE_INLINING=y # CONFIG_SECURITY is not set # CONFIG_SECURITYFS is not set # CONFIG_SECURITY_FILE_CAPABILITIES is not set +# CONFIG_IMA is not set CONFIG_CRYPTO=y # @@ -2572,10 +2603,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y # CONFIG_CRYPTO_GF128MUL is not set # CONFIG_CRYPTO_NULL is not set +CONFIG_CRYPTO_WORKQUEUE=y # CONFIG_CRYPTO_CRYPTD is not set # CONFIG_CRYPTO_AUTHENC is not set # CONFIG_CRYPTO_TEST is not set @@ -2648,6 +2681,7 @@ CONFIG_CRYPTO_DES=y # Compression # # CONFIG_CRYPTO_DEFLATE is not set +CONFIG_CRYPTO_ZLIB=m # CONFIG_CRYPTO_LZO is not set # @@ -2656,7 +2690,9 @@ CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_HW is not set CONFIG_HAVE_KVM=y +CONFIG_HAVE_KVM_IRQCHIP=y # CONFIG_VIRTUALIZATION is not set +# CONFIG_BINARY_PRINTF is not set # # Library routines @@ -2675,7 +2711,10 @@ CONFIG_LIBCRC32C=m CONFIG_AUDIT_GENERIC=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y +CONFIG_NLATTR=y diff --git a/packages/linux/patches/21_lzma-initrd.diff.i386 b/packages/linux/patches/21_lzma-initrd.diff.i386 deleted file mode 100644 index 9b0e150a68..0000000000 --- a/packages/linux/patches/21_lzma-initrd.diff.i386 +++ /dev/null @@ -1,748 +0,0 @@ -diff -Naur linux-2.6.29-rc3.orig/drivers/block/Kconfig linux-2.6.29-rc3/drivers/block/Kconfig ---- linux-2.6.29-rc3.orig/drivers/block/Kconfig 2009-01-31 18:44:26.000000000 +0100 -+++ linux-2.6.29-rc3/drivers/block/Kconfig 2009-01-31 18:45:21.000000000 +0100 -@@ -358,6 +358,47 @@ - will prevent RAM block device backing store memory from being - allocated from highmem (only a problem for highmem systems). - -+config LZMA_INITRD -+ boolean "Allow LZMA compression on initrd" -+ depends on BLK_DEV_INITRD=y -+ default "y" -+ help -+ Use lzma compression on initrd, example 'lzma e initrd initrd.7z -d16'. -+ If you have sufficient memory, you could compress using bigger dictionary size, -+ 'lzma e initrd initrd.7z'. -+ -+config LZMA_INITRD_KMALLOC_ONLY -+ boolean "Use only kmalloc, do not use vmalloc on lzma initrd" -+ depends on LZMA_INITRD=y -+ default "n" -+ help -+ Set to y if you do not want to use vmalloc, ie use only kmalloc. -+ -+config LZMA_INITRAM_FS -+ boolean "Allow LZMA compression on initramfs" -+ depends on BLK_DEV_RAM=y -+ default "y" -+ help -+ Use lzma compression on initramfs, example 'lzma e initramfs.cpio initramfs.cpio.lzma'. -+ -+config LZMA_INITRAM_FS_SMALLMEM -+ boolean "Use lzma compression with small dictonary size." -+ depends on LZMA_INITRAM_FS=y -+ default "y" -+ help -+ Use lzma compression on initramfs with small dictionary size, example -+ 'lzma e initramfs.cpio initramfs.cpio.lzma -d16'. -+ Affects only the initramfs.cpio in the ~usr directory, which is compiled into -+ the kernel. If you prepared initramfs.cpio for use with bootloader, you would -+ need to specify the commandline options (-d16) yourself. -+ -+config LZMA_INITRAM_FS_KMALLOC_ONLY -+ boolean "Use only kmalloc, do not use vmalloc on lzma initramfs" -+ depends on LZMA_INITRAM_FS=y -+ default "n" -+ help -+ Set to y if you do not want to use vmalloc, ie use only kmalloc. -+ - config CDROM_PKTCDVD - tristate "Packet writing on CD/DVD media" - depends on !UML -diff -Naur linux-2.6.29-rc3.orig/init/do_mounts_rd.c linux-2.6.29-rc3/init/do_mounts_rd.c ---- linux-2.6.29-rc3.orig/init/do_mounts_rd.c 2009-01-31 18:44:40.000000000 +0100 -+++ linux-2.6.29-rc3/init/do_mounts_rd.c 2009-01-31 18:45:21.000000000 +0100 -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - #include "do_mounts.h" - #include "../fs/squashfs/squashfs_fs.h" -@@ -30,6 +31,9 @@ - __setup("ramdisk_start=", ramdisk_start_setup); - - static int __init crd_load(int in_fd, int out_fd); -+#ifdef CONFIG_LZMA_INITRD -+static int __init lzma_rd_load(int in_fd, int out_fd); -+#endif - - /* - * This routine tries to find a RAM disk image to load, and returns the -@@ -84,6 +88,17 @@ - nblocks = 0; - goto done; - } -+ /* -+ * handle lzma compressed initrd, returns nblocks=1 as indication -+ */ -+ if( buf[0] < 9 * 5 * 5 && buf[9] == 0 && buf[10] == 0 && buf[11] == 0 -+ && buf[12] == 0 ) -+ { -+ printk( KERN_NOTICE "RAMDISK: LZMA image found at block %d\n", -+ start_block); -+ nblocks = 1; // just a convenient return flag -+ goto done; -+ } - - /* romfs is at block zero too */ - if (romfsb->word0 == ROMSB_WORD0 && -@@ -178,7 +193,22 @@ - goto successful_load; - goto done; - } -- -+#ifdef CONFIG_LZMA_INITRD -+ /* -+ * handle lzma compressed image -+ */ -+ if ( nblocks == 1 ) -+ { -+ nblocks = 0; -+ if ( lzma_rd_load(in_fd, out_fd) == 0 ) -+ { -+ printk("\nLZMA initrd loaded successfully\n"); -+ goto successful_load; -+ } -+ printk(KERN_NOTICE "LZMA initrd is not in the correct format\n"); -+ goto done; -+ } -+#endif - /* - * NOTE NOTE: nblocks is not actually blocks but - * the number of kibibytes of data to load into a ramdisk. -@@ -376,6 +406,134 @@ - unzip_error = 1; - } - -+#ifdef CONFIG_LZMA_INITRD -+#define _LZMA_IN_CB -+#define _LZMA_OUT_READ -+#include "LzmaDecode.h" -+#include "LzmaDecode.c" -+ -+static int read_byte(void *object, const unsigned char **buffer, SizeT *bufferSize); -+ -+/* -+ * Do the lzma decompression -+ */ -+static int __init lzma_rd_load(int in_fd, int out_fd) -+{ -+ unsigned int i; -+ CLzmaDecoderState state; -+ unsigned char* outputbuffer; -+ unsigned int uncompressedSize = 0; -+ unsigned char* p; -+ unsigned int kBlockSize = 0x10000; -+ unsigned int nowPos = 0; -+ unsigned int outsizeProcessed = 0; -+ int res; -+ ILzmaInCallback callback; -+ -+ insize = 0; /* valid bytes in inbuf */ -+ inptr = 0; /* index of next byte to be processed in inbuf */ -+ exit_code = 0; -+ crd_infd = in_fd; -+ inbuf = kmalloc(INBUFSIZ, GFP_KERNEL); -+ if (inbuf == 0) -+ { -+ printk(KERN_ERR "RAMDISK: Couldn't allocate lzma input buffer\n"); -+ return -1; -+ } -+ -+ callback.Read = read_byte; -+ -+ /* lzma args */ -+ i = get_byte(); -+ state.Properties.lc = i % 9, i = i / 9; -+ state.Properties.lp = i % 5, state.Properties.pb = i / 5; -+ -+ /* read dictionary size */ -+ p = (char*)&state.Properties.DictionarySize; -+ for (i = 0; i < 4; i++) -+ *p++ = get_byte(); -+ -+ /* get uncompressedSize */ -+ p= (char*)&uncompressedSize; -+ for (i = 0; i < 4; i++) -+ *p++ = get_byte(); -+ -+ /* skip big file */ -+ for (i = 0; i < 4; i++) -+ get_byte(); -+ -+ printk( KERN_NOTICE "RAMDISK: LZMA lc=%d,lp=%d,pb=%d,dictSize=%d,origSize=%d\n", -+ state.Properties.lc, state.Properties.lp, state.Properties.pb, state.Properties.DictionarySize, uncompressedSize); -+ outputbuffer = kmalloc(kBlockSize, GFP_KERNEL); -+ if (outputbuffer == 0) { -+ printk(KERN_ERR "RAMDISK: Couldn't allocate lzma output buffer\n"); -+ return -1; -+ } -+ -+ state.Probs = (CProb*)kmalloc( LzmaGetNumProbs(&state.Properties)*sizeof(CProb), GFP_KERNEL); -+ if ( state.Probs == 0) { -+ printk(KERN_ERR "RAMDISK: Couldn't allocate lzma workspace\n"); -+ return -1; -+ } -+ -+#ifdef CONFIG_LZMA_INITRD_KMALLOC_ONLY -+ state.Dictionary = kmalloc( state.Properties.DictionarySize, GFP_KERNEL); -+#else -+ state.Dictionary = vmalloc( state.Properties.DictionarySize); -+#endif -+ if ( state.Dictionary == 0) { -+ printk(KERN_ERR "RAMDISK: Couldn't allocate lzma dictionary\n"); -+ return -1; -+ } -+ -+ printk( KERN_NOTICE "LZMA initrd by Ming-Ching Tiew " ); -+ -+ LzmaDecoderInit( &state ); -+ -+ for( nowPos =0; nowPos < uncompressedSize ; ) -+ { -+ UInt32 blockSize = uncompressedSize - nowPos; -+ if( blockSize > kBlockSize) -+ blockSize = kBlockSize; -+ res = LzmaDecode( &state, &callback, outputbuffer, blockSize, &outsizeProcessed); -+ if( res != 0 ) { -+ printk( KERN_ERR "RAMDISK: Lzma decode failure\n"); -+ return -1; -+ } -+ if( outsizeProcessed == 0 ) -+ { -+ uncompressedSize = nowPos; -+ printk( KERN_NOTICE "RAMDISK nowPos=%d, uncompressedSize=%d\n", -+ nowPos, uncompressedSize ); -+ break; -+ } -+ sys_write(out_fd, outputbuffer, outsizeProcessed ); -+ nowPos += outsizeProcessed; -+ printk( "."); -+ } -+ -+#ifdef CONFIG_LZMA_INITRD_KMALLOC_ONLY -+ kfree(state.Dictionary); -+#else -+ vfree(state.Dictionary); -+#endif -+ kfree(inbuf); -+ kfree(outputbuffer); -+ kfree(state.Probs); -+ return 0; -+} -+ -+static int read_byte(void *object, const unsigned char **buffer, SizeT *bufferSize) -+{ -+ static unsigned char val; -+ *bufferSize = 1; -+ val = get_byte(); -+ *buffer = &val; -+ return LZMA_RESULT_OK; -+} -+ -+#endif /*CONFIG_LZMA_INITRD*/ -+ - static int __init crd_load(int in_fd, int out_fd) - { - int result; -diff -Naur linux-2.6.29-rc3.orig/init/initramfs.c linux-2.6.29-rc3/init/initramfs.c ---- linux-2.6.29-rc3.orig/init/initramfs.c 2009-01-31 18:44:40.000000000 +0100 -+++ linux-2.6.29-rc3/init/initramfs.c 2009-01-31 18:46:08.000000000 +0100 -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - static __initdata char *message; - static void __init error(char *x) -@@ -476,6 +477,118 @@ - outcnt = 0; - } - -+#ifdef CONFIG_LZMA_INITRAM_FS -+#define _LZMA_IN_CB -+#define _LZMA_OUT_READ -+#include "LzmaDecode.h" -+#ifndef CONFIG_LZMA_INITRD -+ #include "LzmaDecode.c" -+#endif -+static int read_byte(void *object, const unsigned char **buffer, SizeT *bufferSize) -+{ -+ static unsigned char val; -+ *bufferSize = 1; -+ val = get_byte(); -+ *buffer = &val; -+ return LZMA_RESULT_OK; -+} -+ -+static int __init lzma_unzip(void) -+{ -+ unsigned int i; -+ CLzmaDecoderState state; -+ unsigned char* outputbuffer; -+ unsigned int uncompressedSize = 0; -+ unsigned char* p; -+ unsigned int kBlockSize = 0x10000; -+ unsigned int nowPos = 0; -+ unsigned int outsizeProcessed = 0; -+ int res; -+ ILzmaInCallback callback; -+ -+ callback.Read = read_byte; -+ -+ // lzma args -+ i = get_byte(); -+ state.Properties.lc = i % 9, i = i / 9; -+ state.Properties.lp = i % 5, state.Properties.pb = i / 5; -+ -+ // read dictionary size -+ p = (char*)&state.Properties.DictionarySize; -+ for (i = 0; i < 4; i++) -+ *p++ = get_byte(); -+ -+ // get uncompressedSize -+ p= (char*)&uncompressedSize; -+ for (i = 0; i < 4; i++) -+ *p++ = get_byte(); -+ -+ // skip big file -+ for (i = 0; i < 4; i++) -+ get_byte(); -+ -+ printk( KERN_NOTICE "initramfs: LZMA lc=%d,lp=%d,pb=%d,dictSize=%d,origSize=%d\n", -+ state.Properties.lc,state.Properties.lp,state.Properties.pb,state.Properties.DictionarySize, uncompressedSize); -+ outputbuffer = kmalloc(kBlockSize, GFP_KERNEL); -+ if (outputbuffer == 0) { -+ printk(KERN_ERR "initramfs: Couldn't allocate lzma output buffer\n"); -+ return -1; -+ } -+ -+ state.Probs = (CProb*) kmalloc( LzmaGetNumProbs(&state.Properties)*sizeof(CProb), GFP_KERNEL); -+ if ( state.Probs == 0) { -+ printk(KERN_ERR "initramfs: Couldn't allocate lzma workspace\n"); -+ return -1; -+ } -+ -+#ifdef CONFIG_LZMA_INITRAM_FS_KMALLOC_ONLY -+ state.Dictionary = kmalloc( state.Properties.DictionarySize, GFP_KERNEL); -+#else -+ state.Dictionary = vmalloc( state.Properties.DictionarySize); -+#endif -+ if ( state.Dictionary == 0) { -+ printk(KERN_ERR "initramfs: Couldn't allocate lzma dictionary\n"); -+ return -1; -+ } -+ -+ printk( KERN_NOTICE "LZMA initramfs by Ming-Ching Tiew " ); -+ -+ LzmaDecoderInit( &state ); -+ -+ for( nowPos =0; nowPos < uncompressedSize ; ) -+ { -+ UInt32 blockSize = uncompressedSize - nowPos; -+ if( blockSize > kBlockSize) -+ blockSize = kBlockSize; -+ res = LzmaDecode( &state, &callback, outputbuffer, blockSize, &outsizeProcessed); -+ if( res != 0 ) { -+ panic( KERN_ERR "initramfs: Lzma decode failure\n"); -+ return -1; -+ } -+ if( outsizeProcessed == 0 ) -+ { -+ uncompressedSize = nowPos; -+ printk( KERN_NOTICE "initramfs: nowPos=%d, uncompressedSize=%d\n", -+ nowPos, uncompressedSize ); -+ break; -+ } -+ flush_buffer(outputbuffer, outsizeProcessed); -+ nowPos += outsizeProcessed; -+ printk( "."); -+ } -+ -+#ifdef CONFIG_LZMA_INITRAM_FS_KMALLOC_ONLY -+ kfree(state.Dictionary); -+#else -+ vfree(state.Dictionary); -+#endif -+ kfree(outputbuffer); -+ kfree(state.Probs); -+ return 0; -+} -+ -+#endif /*CONFIG LZMA_INITRAM_FS*/ -+ - static char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only) - { - int written; -@@ -510,12 +623,31 @@ - inptr = 0; - outcnt = 0; /* bytes in output buffer */ - bytes_out = 0; -- crc = (ulg)0xffffffffL; /* shift register contents */ -- makecrc(); -- gunzip(); -- if (state != Reset) -+ if( inbuf[0] == 037 && ((inbuf[1] == 0213) || (inbuf[1] == 0236))) -+ { -+ printk( KERN_NOTICE "detected gzip initramfs\n"); -+ crc = (ulg)0xffffffffL; /* shift register contents */ -+ makecrc(); -+ gunzip(); -+ if (state != Reset) - error("junk in gzipped archive"); -- this_header = saved_offset + inptr; -+ } -+#ifdef CONFIG_LZMA_INITRAM_FS -+ else if( inbuf[0] < 9 * 5 * 5 && buf[9] == 0 && buf[10] == 0 -+ && buf[11] == 0 && buf[12] == 0 ) -+ { -+ printk( KERN_NOTICE "detected lzma initramfs\n"); -+ lzma_unzip(); -+ } -+#endif -+ else -+ { -+ // skip forward ? -+ crc = (ulg)0xffffffffL; /* shift register contents */ -+ makecrc(); -+ gunzip(); -+ } -+ this_header = saved_offset + inptr; - buf += inptr; - len -= inptr; - } -diff -Naur linux-2.6.29-rc3.orig/scripts/gen_lzma_initramfs_list.sh linux-2.6.29-rc3/scripts/gen_lzma_initramfs_list.sh ---- linux-2.6.29-rc3.orig/scripts/gen_lzma_initramfs_list.sh 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.29-rc3/scripts/gen_lzma_initramfs_list.sh 2009-01-31 18:45:21.000000000 +0100 -@@ -0,0 +1,292 @@ -+#!/bin/bash -+# Copyright (C) Martin Schlemmer -+# Copyright (c) 2006 Sam Ravnborg -+# -+# Released under the terms of the GNU GPL -+# -+# Generate a cpio packed initramfs. It uses gen_init_cpio to generate -+# the cpio archive, and gzip to pack it. -+# The script may also be used to generate the inputfile used for gen_init_cpio -+# This script assumes that gen_init_cpio is located in usr/ directory -+ -+# error out on errors -+set -e -+ -+usage() { -+cat << EOF -+Usage: -+$0 [-o ] [-u ] [-g ] { -s | -d | } ... -+ -o Create lzma initramfs file named using -+ gen_init_cpio and lzma -+ -u User ID to map to user ID 0 (root). -+ is only meaningful if -+ is a directory. -+ -g Group ID to map to group ID 0 (root). -+ is only meaningful if -+ is a directory. -+ File list or directory for cpio archive. -+ If is a .cpio file it will be used -+ as direct input to initramfs. -+ -s Create lzma file with small dictionary size -+ -d Output the default cpio list. -+ -+All options except -o and -l may be repeated and are interpreted -+sequentially and immediately. -u and -g states are preserved across -+ options so an explicit "-u 0 -g 0" is required -+to reset the root/group mapping. -+EOF -+} -+ -+list_default_initramfs() { -+ # echo usr/kinit/kinit -+ : -+} -+ -+default_initramfs() { -+ cat <<-EOF >> ${output} -+ # This is a very simple, default initramfs -+ -+ dir /dev 0755 0 0 -+ nod /dev/console 0600 0 0 c 5 1 -+ dir /root 0700 0 0 -+ # file /kinit usr/kinit/kinit 0755 0 0 -+ # slink /init kinit 0755 0 0 -+ EOF -+} -+ -+filetype() { -+ local argv1="$1" -+ -+ # symlink test must come before file test -+ if [ -L "${argv1}" ]; then -+ echo "slink" -+ elif [ -f "${argv1}" ]; then -+ echo "file" -+ elif [ -d "${argv1}" ]; then -+ echo "dir" -+ elif [ -b "${argv1}" -o -c "${argv1}" ]; then -+ echo "nod" -+ elif [ -p "${argv1}" ]; then -+ echo "pipe" -+ elif [ -S "${argv1}" ]; then -+ echo "sock" -+ else -+ echo "invalid" -+ fi -+ return 0 -+} -+ -+list_print_mtime() { -+ : -+} -+ -+print_mtime() { -+ local my_mtime="0" -+ -+ if [ -e "$1" ]; then -+ my_mtime=$(find "$1" -printf "%T@\n" | sort -r | head -n 1) -+ fi -+ -+ echo "# Last modified: ${my_mtime}" >> ${output} -+ echo "" >> ${output} -+} -+ -+list_parse() { -+ echo "$1 \\" -+} -+ -+# for each file print a line in following format -+# -+# for links, devices etc the format differs. See gen_init_cpio for details -+parse() { -+ local location="$1" -+ local name="${location/${srcdir}//}" -+ # change '//' into '/' -+ name="${name//\/\///}" -+ local mode="$2" -+ local uid="$3" -+ local gid="$4" -+ local ftype=$(filetype "${location}") -+ # remap uid/gid to 0 if necessary -+ [ "$uid" -eq "$root_uid" ] && uid=0 -+ [ "$gid" -eq "$root_gid" ] && gid=0 -+ local str="${mode} ${uid} ${gid}" -+ -+ [ "${ftype}" == "invalid" ] && return 0 -+ [ "${location}" == "${srcdir}" ] && return 0 -+ -+ case "${ftype}" in -+ "file") -+ str="${ftype} ${name} ${location} ${str}" -+ ;; -+ "nod") -+ local dev_type= -+ local maj=$(LC_ALL=C ls -l "${location}" | \ -+ gawk '{sub(/,/, "", $5); print $5}') -+ local min=$(LC_ALL=C ls -l "${location}" | \ -+ gawk '{print $6}') -+ -+ if [ -b "${location}" ]; then -+ dev_type="b" -+ else -+ dev_type="c" -+ fi -+ str="${ftype} ${name} ${str} ${dev_type} ${maj} ${min}" -+ ;; -+ "slink") -+ local target=$(LC_ALL=C ls -l "${location}" | \ -+ gawk '{print $11}') -+ str="${ftype} ${name} ${target} ${str}" -+ ;; -+ *) -+ str="${ftype} ${name} ${str}" -+ ;; -+ esac -+ -+ echo "${str}" >> ${output} -+ -+ return 0 -+} -+ -+unknown_option() { -+ printf "ERROR: unknown option \"$arg\"\n" >&2 -+ printf "If the filename validly begins with '-', " >&2 -+ printf "then it must be prefixed\n" >&2 -+ printf "by './' so that it won't be interpreted as an option." >&2 -+ printf "\n" >&2 -+ usage >&2 -+ exit 1 -+} -+ -+list_header() { -+ : -+} -+ -+header() { -+ printf "\n#####################\n# $1\n" >> ${output} -+} -+ -+# process one directory (incl sub-directories) -+dir_filelist() { -+ ${dep_list}header "$1" -+ -+ srcdir=$(echo "$1" | sed -e 's://*:/:g') -+ dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" 2>/dev/null) -+ -+ # If $dirlist is only one line, then the directory is empty -+ if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then -+ ${dep_list}print_mtime "$1" -+ -+ echo "${dirlist}" | \ -+ while read x; do -+ ${dep_list}parse ${x} -+ done -+ fi -+} -+ -+# if only one file is specified and it is .cpio file then use it direct as fs -+# if a directory is specified then add all files in given direcotry to fs -+# if a regular file is specified assume it is in gen_initramfs format -+input_file() { -+ source="$1" -+ if [ -f "$1" ]; then -+ ${dep_list}header "$1" -+ is_cpio="$(echo "$1" | sed 's/^.*\.cpio/cpio/')" -+ if [ $2 -eq 0 -a ${is_cpio} == "cpio" ]; then -+ cpio_file=$1 -+ [ ! -z ${dep_list} ] && echo "$1" -+ return 0 -+ fi -+ if [ -z ${dep_list} ]; then -+ print_mtime "$1" >> ${output} -+ cat "$1" >> ${output} -+ else -+ cat "$1" | while read type dir file perm ; do -+ if [ "$type" == "file" ]; then -+ echo "$file \\"; -+ fi -+ done -+ fi -+ elif [ -d "$1" ]; then -+ dir_filelist "$1" -+ else -+ echo " ${prog}: Cannot open '$1'" >&2 -+ exit 1 -+ fi -+} -+ -+prog=$0 -+root_uid=0 -+root_gid=0 -+dep_list= -+cpio_file= -+cpio_list= -+output="/dev/stdout" -+output_file="" -+opt="" -+ -+arg="$1" -+case "$arg" in -+ "-l") # files included in initramfs - used by kbuild -+ dep_list="list_" -+ echo "deps_initramfs := \\" -+ shift -+ ;; -+ "-o") # generate lzma-ed cpio image named $1 -+ shift -+ output_file="$1" -+ cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)" -+ output=${cpio_list} -+ shift -+ ;; -+esac -+while [ $# -gt 0 ]; do -+ arg="$1" -+ shift -+ case "$arg" in -+ "-u") # map $1 to uid=0 (root) -+ root_uid="$1" -+ shift -+ ;; -+ "-g") # map $1 to gid=0 (root) -+ root_gid="$1" -+ shift -+ ;; -+ "-s") -+ opt="-d16" -+ ;; -+ "-d") # display default initramfs list -+ default_list="$arg" -+ ${dep_list}default_initramfs -+ ;; -+ "-h") -+ usage -+ exit 0 -+ ;; -+ *) -+ case "$arg" in -+ "-"*) -+ unknown_option -+ ;; -+ *) # input file/dir - process it -+ input_file "$arg" "$#" -+ ;; -+ esac -+ ;; -+ esac -+done -+ -+# If output_file is set we will generate cpio archive and lzma it -+# we are carefull to delete tmp files -+if [ ! -z ${output_file} ]; then -+ if [ -z ${cpio_file} ]; then -+ cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)" -+ usr/gen_init_cpio ${cpio_list} > ${cpio_tfile} -+ else -+ cpio_tfile=${cpio_file} -+ fi -+ rm ${cpio_list} -+ lzma e ${cpio_tfile} ${output_file} ${opt} -+ [ -z ${cpio_file} ] && rm ${cpio_tfile} -+fi -+exit 0 -diff -Naur linux-2.6.29-rc3.orig/usr/Makefile linux-2.6.29-rc3/usr/Makefile ---- linux-2.6.29-rc3.orig/usr/Makefile 2009-01-31 18:44:42.000000000 +0100 -+++ linux-2.6.29-rc3/usr/Makefile 2009-01-31 18:45:21.000000000 +0100 -@@ -19,6 +19,7 @@ - - hostprogs-y := gen_init_cpio - initramfs := $(CONFIG_SHELL) $(srctree)/scripts/gen_initramfs_list.sh -+lzma_initramfs := $(CONFIG_SHELL) $(srctree)/scripts/gen_lzma_initramfs_list.sh - ramfs-input := $(if $(filter-out "",$(CONFIG_INITRAMFS_SOURCE)), \ - $(shell echo $(CONFIG_INITRAMFS_SOURCE)),-d) - ramfs-args := \ -@@ -36,6 +37,14 @@ - quiet_cmd_initfs = GEN $@ - cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input) - -+ifdef CONFIG_LZMA_INITRAM_FS_SMALLMEM -+quiet_cmd_lzma_initfs = LZRAMFS $@ -+ cmd_lzma_initfs = $(lzma_initramfs) -o $@ $(ramfs-args) -s $(ramfs-input) -+else -+quiet_cmd_lzma_initfs = LZRAMFS $@ -+ cmd_lzma_initfs = $(lzma_initramfs) -o $@ $(ramfs-args) $(ramfs-input) -+endif -+ - targets := initramfs_data.cpio.gz - # do not try to update files included in initramfs - $(deps_initramfs): ; -@@ -48,5 +57,9 @@ - # 4) arguments to gen_initramfs.sh changes - $(obj)/initramfs_data.cpio.gz: $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs - $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/.initramfs_data.cpio.gz.d -+ifdef CONFIG_LZMA_INITRAM_FS -+ $(call if_changed,lzma_initfs) -+else - $(call if_changed,initfs) -+endif - diff --git a/packages/linux/patches/32_lzma.diff b/packages/linux/patches/32_lzma.diff new file mode 100644 index 0000000000..9d239b597d --- /dev/null +++ b/packages/linux/patches/32_lzma.diff @@ -0,0 +1,9 @@ +diff -Naur linux-2.6.30-rc3.orig/scripts/Makefile.lib linux-2.6.30-rc3/scripts/Makefile.lib +--- linux-2.6.30-rc3.orig/scripts/Makefile.lib 2009-04-25 12:42:08.000000000 +0200 ++++ linux-2.6.30-rc3/scripts/Makefile.lib 2009-04-25 18:29:44.000000000 +0200 +@@ -204,4 +204,4 @@ + # --------------------------------------------------------------------------- + + quiet_cmd_lzma = LZMA $@ +-cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false) ++cmd_lzma = (lzma e -a1 -so $< && $(size_append) $<) >$@ || (rm -f $@ ; false) diff --git a/packages/linux/patches/50_bootsplash.diff b/packages/linux/patches/50_bootsplash.diff new file mode 100644 index 0000000000..7e4c618fa0 --- /dev/null +++ b/packages/linux/patches/50_bootsplash.diff @@ -0,0 +1,2961 @@ +diff -Naur linux-2.6.30-rc3.orig/drivers/char/keyboard.c linux-2.6.30-rc3/drivers/char/keyboard.c +--- linux-2.6.30-rc3.orig/drivers/char/keyboard.c 2009-04-25 12:41:48.000000000 +0200 ++++ linux-2.6.30-rc3/drivers/char/keyboard.c 2009-04-25 12:44:23.000000000 +0200 +@@ -1180,6 +1180,15 @@ + if (keycode < BTN_MISC && printk_ratelimit()) + printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode); + ++#ifdef CONFIG_BOOTSPLASH ++ /* This code has to be redone for some non-x86 platforms */ ++ if (down == 1 && (keycode == 0x3c || keycode == 0x01)) { /* F2 and ESC on PC keyboard */ ++ extern int splash_verbose(void); ++ if (splash_verbose()) ++ return; ++ } ++#endif ++ + #ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */ + if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1 && sysrq_alt))) { + if (!sysrq_down) { +diff -Naur linux-2.6.30-rc3.orig/drivers/char/n_tty.c linux-2.6.30-rc3/drivers/char/n_tty.c +--- linux-2.6.30-rc3.orig/drivers/char/n_tty.c 2009-04-25 12:41:48.000000000 +0200 ++++ linux-2.6.30-rc3/drivers/char/n_tty.c 2009-04-25 12:44:31.000000000 +0200 +@@ -1815,6 +1815,17 @@ + retval = -ERESTARTSYS; + break; + } ++ ++#ifdef CONFIG_BOOTSPLASH ++ if (file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,0) || ++ file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,1) || ++ file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,0) || ++ file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,1)) { ++ extern int splash_verbose(void); ++ (void)splash_verbose(); ++ } ++#endif ++ + /* FIXME: does n_tty_set_room need locking ? */ + n_tty_set_room(tty); + timeout = schedule_timeout(timeout); +diff -Naur linux-2.6.30-rc3.orig/drivers/char/vt.c linux-2.6.30-rc3/drivers/char/vt.c +--- linux-2.6.30-rc3.orig/drivers/char/vt.c 2009-04-25 12:41:48.000000000 +0200 ++++ linux-2.6.30-rc3/drivers/char/vt.c 2009-04-25 12:44:23.000000000 +0200 +@@ -858,10 +858,6 @@ + old_screen_size = vc->vc_screenbuf_size; + + err = resize_screen(vc, new_cols, new_rows, user); +- if (err) { +- kfree(newscreen); +- return err; +- } + + vc->vc_rows = new_rows; + vc->vc_cols = new_cols; +@@ -4074,6 +4070,31 @@ + } + } + ++#ifdef CONFIG_BOOTSPLASH ++void con_remap_def_color(struct vc_data *vc, int new_color) ++{ ++ unsigned short *sbuf = vc->vc_screenbuf; ++ unsigned c, len = vc->vc_screenbuf_size >> 1; ++ int old_color; ++ ++ if (sbuf) { ++ old_color = vc->vc_def_color << 8; ++ new_color <<= 8; ++ while(len--) { ++ c = *sbuf; ++ if (((c ^ old_color) & 0xf000) == 0) ++ *sbuf ^= (old_color ^ new_color) & 0xf000; ++ if (((c ^ old_color) & 0x0f00) == 0) ++ *sbuf ^= (old_color ^ new_color) & 0x0f00; ++ sbuf++; ++ } ++ new_color >>= 8; ++ } ++ vc->vc_def_color = vc->vc_color = new_color; ++ update_attr(vc); ++} ++#endif ++ + /* + * Visible symbols for modules + */ +diff -Naur linux-2.6.30-rc3.orig/drivers/video/bootsplash/bootsplash.c linux-2.6.30-rc3/drivers/video/bootsplash/bootsplash.c +--- linux-2.6.30-rc3.orig/drivers/video/bootsplash/bootsplash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.30-rc3/drivers/video/bootsplash/bootsplash.c 2009-04-25 13:21:50.000000000 +0200 +@@ -0,0 +1,954 @@ ++/* ++ * linux/drivers/video/bootsplash/bootsplash.c - ++ * splash screen handling functions. ++ * ++ * (w) 2001-2004 by Volker Poplawski, , ++ * Stefan Reinauer, , ++ * Steffen Winterfeldt, , ++ * Michael Schroeder ++ * ++ * Ideas & SuSE screen work by Ken Wimer, ++ * ++ * For more information on this code check http://www.bootsplash.org/ ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "../console/fbcon.h" ++#include "bootsplash.h" ++#include "decode-jpg.h" ++ ++/* extern struct fb_ops vesafb_ops; */ ++extern signed char con2fb_map[MAX_NR_CONSOLES]; ++ ++#define SPLASH_VERSION "3.1.7.4-geexbox" ++ ++/* These errors have to match fbcon-jpegdec.h */ ++static unsigned char *jpg_errors[] = { ++ "no SOI found", ++ "not 8 bit", ++ "height mismatch", ++ "width mismatch", ++ "bad width or height", ++ "too many COMPPs", ++ "illegal HV", ++ "quant table selector", ++ "picture is not YCBCR 221111", ++ "unknow CID in scan", ++ "dct not sequential", ++ "wrong marker", ++ "no EOI", ++ "bad tables", ++ "depth mismatch" ++}; ++ ++static struct jpeg_decdata *decdata = 0; /* private decoder data */ ++ ++static int splash_registered = 0; ++static int splash_usesilent = 0; /* shall we display the silentjpeg? */ ++int splash_default = 0xf01; ++ ++static int splash_check_jpeg(unsigned char *jpeg, int width, int height, int depth); ++ ++static int __init splash_setup(char *options) ++{ ++ if(!strncmp("silent", options, 6)) { ++ printk(KERN_INFO "bootsplash: silent mode.\n"); ++ splash_usesilent = 1; ++ /* skip "silent," */ ++ if (strlen(options) == 6) ++ return 0; ++ options += 7; ++ } ++ if(!strncmp("verbose", options, 7)) { ++ printk(KERN_INFO "bootsplash: verbose mode.\n"); ++ splash_usesilent = 0; ++ return 0; ++ } ++ splash_default = simple_strtoul(options, NULL, 0); ++ return 0; ++} ++ ++__setup("splash=", splash_setup); ++ ++ ++static int splash_hasinter(unsigned char *buf, int num) ++{ ++ unsigned char *bufend = buf + num * 12; ++ while(buf < bufend) { ++ if (buf[1] > 127) /* inter? */ ++ return 1; ++ buf += buf[3] > 127 ? 24 : 12; /* blend? */ ++ } ++ return 0; ++} ++ ++static int boxextract(unsigned char *buf, unsigned short *dp, unsigned char *cols, int *blendp) ++{ ++ dp[0] = buf[0] | buf[1] << 8; ++ dp[1] = buf[2] | buf[3] << 8; ++ dp[2] = buf[4] | buf[5] << 8; ++ dp[3] = buf[6] | buf[7] << 8; ++ *(unsigned int *)(cols + 0) = ++ *(unsigned int *)(cols + 4) = ++ *(unsigned int *)(cols + 8) = ++ *(unsigned int *)(cols + 12) = *(unsigned int *)(buf + 8); ++ if (dp[1] > 32767) { ++ dp[1] = ~dp[1]; ++ *(unsigned int *)(cols + 4) = *(unsigned int *)(buf + 12); ++ *(unsigned int *)(cols + 8) = *(unsigned int *)(buf + 16); ++ *(unsigned int *)(cols + 12) = *(unsigned int *)(buf + 20); ++ *blendp = 1; ++ return 24; ++ } ++ return 12; ++} ++ ++static void boxit(unsigned char *pic, int bytes, unsigned char *buf, int num, int percent, int overpaint, int depth) ++{ ++ int x, y, i, p, doblend, r, g, b, a, add; ++ unsigned short data1[4]; ++ unsigned char cols1[16]; ++ unsigned short data2[4]; ++ unsigned char cols2[16]; ++ unsigned char *bufend; ++ unsigned char *picp; ++ unsigned int stipple[32], sti, stin, stinn, stixs, stixe, stiys, stiye; ++ int xs, xe, ys, ye, xo, yo; ++ ++ if (num == 0) ++ return; ++ bufend = buf + num * 12; ++ stipple[0] = 0xffffffff; ++ stin = 1; ++ stinn = 0; ++ stixs = stixe = 0; ++ stiys = stiye = 0; ++ while(buf < bufend) { ++ doblend = 0; ++ buf += boxextract(buf, data1, cols1, &doblend); ++ if (data1[0] == 32767 && data1[1] == 32767) { ++ /* box stipple */ ++ if (stinn == 32) ++ continue; ++ if (stinn == 0) { ++ stixs = data1[2]; ++ stixe = data1[3]; ++ stiys = stiye = 0; ++ } else if (stinn == 4) { ++ stiys = data1[2]; ++ stiye = data1[3]; ++ } ++ stipple[stinn++] = (cols1[ 0] << 24) | (cols1[ 1] << 16) | (cols1[ 2] << 8) | cols1[ 3] ; ++ stipple[stinn++] = (cols1[ 4] << 24) | (cols1[ 5] << 16) | (cols1[ 6] << 8) | cols1[ 7] ; ++ stipple[stinn++] = (cols1[ 8] << 24) | (cols1[ 9] << 16) | (cols1[10] << 8) | cols1[11] ; ++ stipple[stinn++] = (cols1[12] << 24) | (cols1[13] << 16) | (cols1[14] << 8) | cols1[15] ; ++ stin = stinn; ++ continue; ++ } ++ stinn = 0; ++ if (data1[0] > 32767) ++ buf += boxextract(buf, data2, cols2, &doblend); ++ if (data1[0] == 32767 && data1[1] == 32766) { ++ /* box copy */ ++ i = 12 * (short)data1[3]; ++ doblend = 0; ++ i += boxextract(buf + i, data1, cols1, &doblend); ++ if (data1[0] > 32767) ++ boxextract(buf + i, data2, cols2, &doblend); ++ } ++ if (data1[0] == 32767) ++ continue; ++ if (data1[2] > 32767) { ++ if (overpaint) ++ continue; ++ data1[2] = ~data1[2]; ++ } ++ if (data1[3] > 32767) { ++ if (percent == 65536) ++ continue; ++ data1[3] = ~data1[3]; ++ } ++ if (data1[0] > 32767) { ++ data1[0] = ~data1[0]; ++ for (i = 0; i < 4; i++) ++ data1[i] = (data1[i] * (65536 - percent) + data2[i] * percent) >> 16; ++ for (i = 0; i < 16; i++) ++ cols1[i] = (cols1[i] * (65536 - percent) + cols2[i] * percent) >> 16; ++ } ++ *(unsigned int *)cols2 = *(unsigned int *)cols1; ++ a = cols2[3]; ++ if (a == 0 && !doblend) ++ continue; ++ ++ if (stixs >= 32768) { ++ xo = xs = (stixs ^ 65535) + data1[0]; ++ xe = stixe ? stixe + data1[0] : data1[2]; ++ } else if (stixe >= 32768) { ++ xs = stixs ? data1[2] - stixs : data1[0]; ++ xe = data1[2] - (stixe ^ 65535); ++ xo = xe + 1; ++ } else { ++ xo = xs = stixs; ++ xe = stixe ? stixe : data1[2]; ++ } ++ if (stiys >= 32768) { ++ yo = ys = (stiys ^ 65535) + data1[1]; ++ ye = stiye ? stiye + data1[1] : data1[3]; ++ } else if (stiye >= 32768) { ++ ys = stiys ? data1[3] - stiys : data1[1]; ++ ye = data1[3] - (stiye ^ 65535); ++ yo = ye + 1; ++ } else { ++ yo = ys = stiys; ++ ye = stiye ? stiye : data1[3]; ++ } ++ xo = 32 - (xo & 31); ++ yo = stin - (yo % stin); ++ if (xs < data1[0]) ++ xs = data1[0]; ++ if (xe > data1[2]) ++ xe = data1[2]; ++ if (ys < data1[1]) ++ ys = data1[1]; ++ if (ye > data1[3]) ++ ye = data1[3]; ++ ++ for (y = ys; y <= ye; y++) { ++ sti = stipple[(y + yo) % stin]; ++ x = (xs + xo) & 31; ++ if (x) ++ sti = (sti << x) | (sti >> (32 - x)); ++ if (doblend) { ++ if ((p = data1[3] - data1[1]) != 0) ++ p = ((y - data1[1]) << 16) / p; ++ for (i = 0; i < 8; i++) ++ cols2[i + 8] = (cols1[i] * (65536 - p) + cols1[i + 8] * p) >> 16; ++ } ++ add = (xs & 1); ++ add ^= (add ^ y) & 1 ? 1 : 3; /* 2x2 ordered dithering */ ++ picp = pic + xs * (depth>>3) + y * bytes; ++ for (x = xs; x <= xe; x++) { ++ if (!(sti & 0x80000000)) { ++ sti <<= 1; ++ picp += depth>>3; ++ add ^= 3; ++ continue; ++ } ++ sti = (sti << 1) | 1; ++ if (doblend) { ++ if ((p = data1[2] - data1[0]) != 0) ++ p = ((x - data1[0]) << 16) / p; ++ for (i = 0; i < 4; i++) ++ cols2[i] = (cols2[i + 8] * (65536 - p) + cols2[i + 12] * p) >> 16; ++ a = cols2[3]; ++ } ++ r = cols2[0]; ++ g = cols2[1]; ++ b = cols2[2]; ++ #define CLAMP(x) ((x) >= 256 ? 255 : (x)) ++ switch (depth) { ++ case 16: ++ if (a != 255) { ++ i = *(unsigned short *)picp; ++ r = ((i >> 8 & 0xf8) * (255 - a) + r * a) / 255; ++ g = ((i >> 3 & 0xfc) * (255 - a) + g * a) / 255; ++ b = ((i << 3 & 0xf8) * (255 - a) + b * a) / 255; ++ } ++ i = ((CLAMP(r + add*2+1) & 0xf8) << 8) | ++ ((CLAMP(g + add ) & 0xfc) << 3) | ++ ((CLAMP(b + add*2+1) ) >> 3); ++ *((unsigned short *)picp) = i; ++ picp = (unsigned char *)((unsigned short *)picp + 1); ++ add ^= 3; ++ break; ++ case 24: ++ if (a != 255) { ++ b = (picp[0] * (255 - a) + b * a) / 255; ++ g = (picp[1] * (255 - a) + g * a) / 255; ++ r = (picp[2] * (255 - a) + r * a) / 255; ++ } ++ *picp++ = CLAMP(b); ++ *picp++ = CLAMP(g); ++ *picp++ = CLAMP(r); ++ break; ++ case 32: ++ if (a != 255) { ++ b = (picp[0] * (255 - a) + b * a) / 255; ++ g = (picp[1] * (255 - a) + g * a) / 255; ++ r = (picp[2] * (255 - a) + r * a) / 255; ++ } ++ *picp++ = CLAMP(b); ++ *picp++ = CLAMP(g); ++ *picp++ = CLAMP(r); ++ *picp++ = 0; ++ break; ++ } ++ } ++ } ++ } ++} ++ ++static int splash_check_jpeg(unsigned char *jpeg, int width, int height, int depth) ++{ ++ int size, err; ++ unsigned char *mem; ++ ++ size = ((width + 15) & ~15) * ((height + 15) & ~15) * (depth >> 3); ++ mem = vmalloc(size); ++ if (!mem) { ++ printk(KERN_INFO "bootsplash: no memory for decoded picture.\n"); ++ return -1; ++ } ++ if (!decdata) ++ decdata = vmalloc(sizeof(*decdata)); ++ if ((err = jpeg_decode(jpeg, mem, ((width + 15) & ~15), ((height + 15) & ~15), depth, decdata))) ++ printk(KERN_INFO "bootsplash: error while decompressing picture: %s (%d)\n",jpg_errors[err - 1], err); ++ vfree(mem); ++ return err ? -1 : 0; ++} ++ ++static void splash_free(struct vc_data *vc, struct fb_info *info) ++{ ++ if (!vc->vc_splash_data) ++ return; ++ if (info->silent_screen_base) ++ info->screen_base = info->silent_screen_base; ++ info->silent_screen_base = 0; ++ if (vc->vc_splash_data->splash_silentjpeg) ++ vfree(vc->vc_splash_data->splash_sboxes); ++ vfree(vc->vc_splash_data); ++ vc->vc_splash_data = 0; ++ info->splash_data = 0; ++} ++ ++static int splash_mkpenguin(struct splash_data *data, int pxo, int pyo, int pwi, int phe, int pr, int pg, int pb) ++{ ++ unsigned char *buf; ++ int i; ++ ++ if (pwi ==0 || phe == 0) ++ return 0; ++ buf = (unsigned char *)data + sizeof(*data); ++ pwi += pxo - 1; ++ phe += pyo - 1; ++ *buf++ = pxo; ++ *buf++ = pxo >> 8; ++ *buf++ = pyo; ++ *buf++ = pyo >> 8; ++ *buf++ = pwi; ++ *buf++ = pwi >> 8; ++ *buf++ = phe; ++ *buf++ = phe >> 8; ++ *buf++ = pr; ++ *buf++ = pg; ++ *buf++ = pb; ++ *buf++ = 0; ++ for (i = 0; i < 12; i++, buf++) ++ *buf = buf[-12]; ++ buf[-24] ^= 0xff; ++ buf[-23] ^= 0xff; ++ buf[-1] = 0xff; ++ return 2; ++} ++ ++static const int splash_offsets[3][16] = { ++ /* len, unit, size, state, fgcol, col, xo, yo, wi, he ++ boxcnt, ssize, sboxcnt, percent, overok, palcnt */ ++ /* V1 */ ++ { 20, -1, 16, -1, -1, -1, 8, 10, 12, 14, ++ -1, -1, -1, -1, -1, -1 }, ++ /* V2 */ ++ { 35, 8, 12, 9, 10, 11, 16, 18, 20, 22, ++ -1, -1, -1, -1, -1, -1 }, ++ /* V3 */ ++ { 38, 8, 12, 9, 10, 11, 16, 18, 20, 22, ++ 24, 28, 32, 34, 36, 37 }, ++}; ++ ++#define SPLASH_OFF_LEN offsets[0] ++#define SPLASH_OFF_UNIT offsets[1] ++#define SPLASH_OFF_SIZE offsets[2] ++#define SPLASH_OFF_STATE offsets[3] ++#define SPLASH_OFF_FGCOL offsets[4] ++#define SPLASH_OFF_COL offsets[5] ++#define SPLASH_OFF_XO offsets[6] ++#define SPLASH_OFF_YO offsets[7] ++#define SPLASH_OFF_WI offsets[8] ++#define SPLASH_OFF_HE offsets[9] ++#define SPLASH_OFF_BOXCNT offsets[10] ++#define SPLASH_OFF_SSIZE offsets[11] ++#define SPLASH_OFF_SBOXCNT offsets[12] ++#define SPLASH_OFF_PERCENT offsets[13] ++#define SPLASH_OFF_OVEROK offsets[14] ++#define SPLASH_OFF_PALCNT offsets[15] ++ ++static inline int splash_getb(unsigned char *pos, int off) ++{ ++ return off == -1 ? 0 : pos[off]; ++} ++ ++static inline int splash_gets(unsigned char *pos, int off) ++{ ++ return off == -1 ? 0 : pos[off] | pos[off + 1] << 8; ++} ++ ++static inline int splash_geti(unsigned char *pos, int off) ++{ ++ return off == -1 ? 0 : ++ pos[off] | pos[off + 1] << 8 | pos[off + 2] << 16 | pos[off + 3] << 24; ++} ++ ++static int splash_getraw(unsigned char *start, unsigned char *end) ++{ ++ unsigned char *ndata; ++ int version; ++ int splash_size; ++ int unit; ++ int width, height; ++ int silentsize; ++ int boxcnt; ++ int sboxcnt; ++ int palcnt; ++ int i, len; ++ const int *offsets; ++ struct vc_data *vc; ++ struct fb_info *info; ++ struct splash_data *sd; ++ ++ printk(KERN_INFO "bootsplash %s: looking for picture...", SPLASH_VERSION); ++ ++ for (ndata = start; ndata < end; ndata++) { ++ if (ndata[0] != 'B' || ndata[1] != 'O' || ndata[2] != 'O' || ndata[3] != 'T') ++ continue; ++ if (ndata[4] != 'S' || ndata[5] != 'P' || ndata[6] != 'L' || ndata[7] < '1' || ndata[7] > '3') ++ continue; ++ printk("."); ++ version = ndata[7] - '0'; ++ offsets = splash_offsets[version - 1]; ++ len = SPLASH_OFF_LEN; ++ unit = splash_getb(ndata, SPLASH_OFF_UNIT); ++ if (unit >= MAX_NR_CONSOLES) ++ continue; ++ if (unit) { ++ acquire_console_sem(); ++ vc_allocate(unit); ++ release_console_sem(); ++ } ++ vc = vc_cons[unit].d; ++ info = registered_fb[(int)con2fb_map[unit]]; ++ width = info->var.xres; ++ height = info->var.yres; ++ splash_size = splash_geti(ndata, SPLASH_OFF_SIZE); ++ if (splash_size == (int)0xffffffff && version > 1) { ++ printk(KERN_INFO " found, updating values.\n"); ++ if ((sd = vc->vc_splash_data) != 0) { ++ i = splash_getb(ndata, SPLASH_OFF_STATE); ++ if (i != 255) { ++ sd->splash_state = i; ++ } ++ i = splash_getb(ndata, SPLASH_OFF_FGCOL); ++ if (i != 255) { ++ sd->splash_fg_color = i; ++ } ++ i = splash_getb(ndata, SPLASH_OFF_COL); ++ if (i != 255) { ++ sd->splash_color = i; ++ } ++ } ++ return unit; ++ } ++ if (splash_size == 0) { ++ printk(KERN_INFO"...found, freeing memory.\n"); ++ if (vc->vc_splash_data) ++ splash_free(vc, info); ++ return unit; ++ } ++ boxcnt = splash_gets(ndata, SPLASH_OFF_BOXCNT); ++ palcnt = 3 * splash_getb(ndata, SPLASH_OFF_PALCNT); ++ if (ndata + len + splash_size > end) { ++ printk(KERN_INFO "...found, but truncated!\n"); ++ return -1; ++ } ++ if (!jpeg_check_size(ndata + len + boxcnt * 12 + palcnt, width, height)) { ++ ndata += len + splash_size - 1; ++ continue; ++ } ++ if (splash_check_jpeg(ndata + len + boxcnt * 12 + palcnt, width, height, info->var.bits_per_pixel)) ++ return -1; ++ silentsize = splash_geti(ndata, SPLASH_OFF_SSIZE); ++ if (silentsize) ++ printk(KERN_INFO" silentjpeg size %d bytes,", silentsize); ++ if (silentsize >= splash_size) { ++ printk(KERN_INFO " bigger than splashsize!\n"); ++ return -1; ++ } ++ splash_size -= silentsize; ++ if (!splash_usesilent) ++ silentsize = 0; ++ else if (height * 2 * info->fix.line_length > info->fix.smem_len) { ++ printk(KERN_INFO " does not fit into framebuffer.\n"); ++ silentsize = 0; ++ } ++ sboxcnt = splash_gets(ndata, SPLASH_OFF_SBOXCNT); ++ if (silentsize > 12 * sboxcnt) { ++ unsigned char *simage = ndata + len + splash_size + 12 * sboxcnt; ++ if (!jpeg_check_size(simage, width, height) || ++ splash_check_jpeg(simage, width, height, info->var.bits_per_pixel)) { ++ printk(KERN_INFO " error in silent jpeg.\n"); ++ silentsize = 0; ++ } ++ } ++ if (vc->vc_splash_data) ++ splash_free(vc, info); ++ vc->vc_splash_data = sd = vmalloc(sizeof(*sd) + splash_size + (version < 3 ? 2 * 12 : 0)); ++ if (!sd) ++ break; ++ sd->splash_silentjpeg = 0; ++ sd->splash_sboxes = 0; ++ sd->splash_sboxcount = 0; ++ if (silentsize) { ++ sd->splash_sboxes = vmalloc(silentsize); ++ if (sd->splash_sboxes) { ++ memcpy(sd->splash_sboxes, ndata + len + splash_size, silentsize); ++ sd->splash_sboxcount = sboxcnt; ++ if (silentsize > 12 * sboxcnt) ++ sd->splash_silentjpeg = sd->splash_sboxes + 12 * sboxcnt; ++ } ++ } ++ sd->splash_state = splash_getb(ndata, SPLASH_OFF_STATE); ++ sd->splash_fg_color = splash_getb(ndata, SPLASH_OFF_FGCOL); ++ sd->splash_color = splash_getb(ndata, SPLASH_OFF_COL); ++ sd->splash_overpaintok = splash_getb(ndata, SPLASH_OFF_OVEROK); ++ sd->splash_text_xo = splash_gets(ndata, SPLASH_OFF_XO); ++ sd->splash_text_yo = splash_gets(ndata, SPLASH_OFF_YO); ++ sd->splash_text_wi = splash_gets(ndata, SPLASH_OFF_WI); ++ sd->splash_text_he = splash_gets(ndata, SPLASH_OFF_HE); ++ sd->splash_percent = splash_gets(ndata, SPLASH_OFF_PERCENT); ++ if (version == 1) { ++ sd->splash_text_xo *= 8; ++ sd->splash_text_wi *= 8; ++ sd->splash_text_yo *= 16; ++ sd->splash_text_he *= 16; ++ sd->splash_color = (splash_default >> 8) & 0x0f; ++ sd->splash_fg_color = (splash_default >> 4) & 0x0f; ++ sd->splash_state = splash_default & 1; ++ } ++ if (sd->splash_text_xo + sd->splash_text_wi > width || sd->splash_text_yo + sd->splash_text_he > height) { ++ splash_free(vc, info); ++ printk(KERN_INFO " found, but has oversized text area!\n"); ++ return -1; ++ } ++ if (!vc_cons[unit].d) { ++ splash_free(vc, info); ++ printk(KERN_INFO " found, but framebuffer can't handle it!\n"); ++ return -1; ++ } ++ printk(KERN_INFO "...found (%dx%d, %d bytes, v%d).\n", width, height, splash_size, version); ++ if (version == 1) { ++ printk(KERN_WARNING "bootsplash: Using deprecated v1 header. Updating your splash utility recommended.\n"); ++ printk(KERN_INFO "bootsplash: Find the latest version at http://www.bootsplash.org/\n"); ++ } ++ ++ /* fake penguin box for older formats */ ++ if (version == 1) ++ boxcnt = splash_mkpenguin(sd, sd->splash_text_xo + 10, sd->splash_text_yo + 10, sd->splash_text_wi - 20, sd->splash_text_he - 20, 0xf0, 0xf0, 0xf0); ++ else if (version == 2) ++ boxcnt = splash_mkpenguin(sd, splash_gets(ndata, 24), splash_gets(ndata, 26), splash_gets(ndata, 28), splash_gets(ndata, 30), splash_getb(ndata, 32), splash_getb(ndata, 33), splash_getb(ndata, 34)); ++ ++ memcpy((char *)sd + sizeof(*sd) + (version < 3 ? boxcnt * 12 : 0), ndata + len, splash_size); ++ sd->splash_boxcount = boxcnt; ++ sd->splash_boxes = (unsigned char *)sd + sizeof(*sd); ++ sd->splash_palette = sd->splash_boxes + boxcnt * 12; ++ sd->splash_jpeg = sd->splash_palette + palcnt; ++ sd->splash_palcnt = palcnt / 3; ++ if (splash_usesilent && sd->splash_silentjpeg == 0) ++ sd->splash_silentjpeg = sd->splash_jpeg; ++ sd->splash_dosilent = sd->splash_silentjpeg != 0; ++ return unit; ++ } ++ printk(KERN_INFO "...no good signature found.\n"); ++ return -1; ++} ++ ++int splash_verbose(void) ++{ ++ struct vc_data *vc; ++ struct fb_info *info; ++ ++ if (!splash_usesilent) ++ return 0; ++ ++ vc = vc_cons[0].d; ++ ++ if (!vc || !vc->vc_splash_data || !vc->vc_splash_data->splash_state) ++ return 0; ++ if (fg_console != vc->vc_num) ++ return 0; ++ if (!vc->vc_splash_data->splash_silentjpeg || !vc->vc_splash_data->splash_dosilent) ++ return 0; ++ vc->vc_splash_data->splash_dosilent = 0; ++ info = registered_fb[(int)con2fb_map[0]]; ++ if (!info->silent_screen_base) ++ return 0; ++ splashcopy(info->silent_screen_base, info->screen_base, info->var.yres, info->var.xres, info->fix.line_length, info->fix.line_length, info->var.bits_per_pixel); ++ info->screen_base = info->silent_screen_base; ++ info->silent_screen_base = 0; ++ return 1; ++} ++ ++static void splash_off(struct fb_info *info) ++{ ++ if (info->silent_screen_base) ++ info->screen_base = info->silent_screen_base; ++ info->silent_screen_base = 0; ++ info->splash_data = 0; ++ if (info->splash_pic) ++ vfree(info->splash_pic); ++ info->splash_pic = 0; ++ info->splash_pic_size = 0; ++} ++ ++int splash_prepare(struct vc_data *vc, struct fb_info *info) ++{ ++ int err; ++ int width, height, depth, size, sbytes; ++ ++ if (!vc->vc_splash_data || !vc->vc_splash_data->splash_state) { ++ if (decdata) ++ vfree(decdata); ++ decdata = 0; ++ splash_off(info); ++ return -1; ++ } ++ ++ width = info->var.xres; ++ height = info->var.yres; ++ depth = info->var.bits_per_pixel; ++ if (depth < 16) { ++ splash_off(info); ++ return -2; ++ } ++ ++ sbytes = ((width + 15) & ~15) * (depth >> 3); ++ size = sbytes * ((height + 15) & ~15); ++ if (size != info->splash_pic_size) ++ splash_off(info); ++ if (!info->splash_pic) ++ info->splash_pic = vmalloc(size); ++ ++ if (!info->splash_pic) { ++ printk(KERN_INFO "bootsplash: not enough memory.\n"); ++ splash_off(info); ++ return -3; ++ } ++ ++ if (!decdata) ++ decdata = vmalloc(sizeof(*decdata)); ++ ++ if (vc->vc_splash_data->splash_silentjpeg && vc->vc_splash_data->splash_dosilent) { ++ /* fill area after framebuffer with other jpeg */ ++ if ((err = jpeg_decode(vc->vc_splash_data->splash_silentjpeg, info->splash_pic, ++ ((width + 15) & ~15), ((height + 15) & ~15), depth, decdata))) { ++ printk(KERN_INFO "bootsplash: error while decompressing silent picture: %s (%d)\n", jpg_errors[err - 1], err); ++ if (info->silent_screen_base) ++ info->screen_base = info->silent_screen_base; ++ vc->vc_splash_data->splash_dosilent = 0; ++ } else { ++ if (vc->vc_splash_data->splash_sboxcount) ++ boxit(info->splash_pic, sbytes, vc->vc_splash_data->splash_sboxes, ++ vc->vc_splash_data->splash_sboxcount, vc->vc_splash_data->splash_percent, 0, info->var.bits_per_pixel); ++ ++ if (!info->silent_screen_base) ++ info->silent_screen_base = info->screen_base; ++ splashcopy(info->silent_screen_base, info->splash_pic, info->var.yres, info->var.xres, info->fix.line_length, sbytes, depth); ++ info->screen_base = info->silent_screen_base + info->fix.line_length * info->var.yres; ++ } ++ } else if (info->silent_screen_base) ++ info->screen_base = info->silent_screen_base; ++ ++ if ((err = jpeg_decode(vc->vc_splash_data->splash_jpeg, info->splash_pic, ++ ((width + 15) & ~15), ((height + 15) & ~15), depth, decdata))) { ++ printk(KERN_INFO "bootsplash: error while decompressing picture: %s (%d) .\n", jpg_errors[err - 1], err); ++ splash_off(info); ++ return -4; ++ } ++ info->splash_pic_size = size; ++ info->splash_bytes = sbytes; ++ if (vc->vc_splash_data->splash_boxcount) ++ boxit(info->splash_pic, sbytes, vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount, vc->vc_splash_data->splash_percent, 0, info->var.bits_per_pixel); ++ if (vc->vc_splash_data->splash_state) ++ info->splash_data = vc->vc_splash_data; ++ else ++ splash_off(info); ++ return 0; ++} ++ ++ ++#ifdef CONFIG_PROC_FS ++ ++#include ++ ++static int splash_read_proc(char *buffer, char **start, off_t offset, int size, ++ int *eof, void *data); ++static int splash_write_proc(struct file *file, const char *buffer, ++ unsigned long count, void *data); ++static int splash_status(struct vc_data *vc); ++static int splash_recolor(struct vc_data *vc); ++static int splash_proc_register(void); ++ ++static struct proc_dir_entry *proc_splash; ++ ++static int splash_recolor(struct vc_data *vc) ++{ ++ if (!vc->vc_splash_data) ++ return -1; ++ if (!vc->vc_splash_data->splash_state) ++ return 0; ++ con_remap_def_color(vc, vc->vc_splash_data->splash_color << 4 | vc->vc_splash_data->splash_fg_color); ++ if (fg_console == vc->vc_num) { ++ update_region(vc, vc->vc_origin + vc->vc_size_row * vc->vc_top, ++ vc->vc_size_row * (vc->vc_bottom - vc->vc_top) / 2); ++ } ++ return 0; ++} ++ ++static int splash_status(struct vc_data *vc) ++{ ++ struct fb_info *info; ++ printk(KERN_INFO "bootsplash: status on console %d changed to %s\n", vc->vc_num, vc->vc_splash_data && vc->vc_splash_data->splash_state ? "on" : "off"); ++ ++ info = registered_fb[(int) con2fb_map[vc->vc_num]]; ++ if (fg_console == vc->vc_num) ++ splash_prepare(vc, info); ++ if (vc->vc_splash_data && vc->vc_splash_data->splash_state) { ++ con_remap_def_color(vc, vc->vc_splash_data->splash_color << 4 | vc->vc_splash_data->splash_fg_color); ++ acquire_console_sem(); ++ /* vc_resize also calls con_switch which resets yscroll */ ++ vc_resize(vc, vc->vc_splash_data->splash_text_wi / vc->vc_font.width, vc->vc_splash_data->splash_text_he / vc->vc_font.height); ++ if (fg_console == vc->vc_num) { ++ update_region(vc, vc->vc_origin + vc->vc_size_row * vc->vc_top, ++ vc->vc_size_row * (vc->vc_bottom - vc->vc_top) / 2); ++ splash_clear_margins(vc->vc_splash_data, vc, info, 0); ++ } ++ release_console_sem(); ++ } else { ++ /* Switch bootsplash off */ ++ con_remap_def_color(vc, 0x07); ++ acquire_console_sem(); ++ vc_resize(vc, info->var.xres / vc->vc_font.width, info->var.yres / vc->vc_font.height); ++ release_console_sem(); ++ } ++ return 0; ++} ++ ++static int splash_read_proc(char *buffer, char **start, off_t offset, int size, ++ int *eof, void *data) ++{ ++ int len = 0; ++ off_t begin = 0; ++ struct vc_data *vc = vc_cons[0].d; ++ struct fb_info *info = registered_fb[(int)con2fb_map[0]]; ++ int color = vc->vc_splash_data ? vc->vc_splash_data->splash_color << 4 | ++ vc->vc_splash_data->splash_fg_color : splash_default >> 4; ++ int status = vc->vc_splash_data ? vc->vc_splash_data->splash_state & 1 : 0; ++ len += sprintf(buffer + len, "Splash screen v%s (0x%02x, %dx%d%s): %s\n", ++ SPLASH_VERSION, color, info->var.xres, info->var.yres, ++ (vc->vc_splash_data ? vc->vc_splash_data->splash_dosilent : 0)? ", silent" : "", ++ status ? "on" : "off"); ++ if (offset >= begin + len) ++ return 0; ++ ++ *start = buffer + (begin - offset); ++ ++ return (size < begin + len - offset ? size : begin + len - offset); ++} ++ ++static int splash_write_proc(struct file *file, const char *buffer, ++ unsigned long count, void *data) ++{ ++ int new, unit; ++ struct vc_data *vc; ++ ++ if (!buffer || !splash_default) ++ return count; ++ ++ if (!strncmp(buffer, "show", 4) || !strncmp(buffer, "hide", 4)) { ++ int pe, oldpe; ++ ++ vc = vc_cons[0].d; ++ if (buffer[4] == ' ' && buffer[5] == 'p') ++ pe = 0; ++ else if (buffer[4] == '\n') ++ pe = 65535; ++ else ++ pe = simple_strtoul(buffer + 5, NULL, 0); ++ if (pe < 0) ++ pe = 0; ++ if (pe > 65535) ++ pe = 65535; ++ if (*buffer == 'h') ++ pe = 65535 - pe; ++ pe += pe > 32767; ++ if (vc->vc_splash_data && vc->vc_splash_data->splash_percent != pe) { ++ struct fb_info *info; ++ ++ oldpe = vc->vc_splash_data->splash_percent; ++ vc->vc_splash_data->splash_percent = pe; ++ if (fg_console != 0 || !vc->vc_splash_data->splash_state) { ++ return count; ++ } ++ info = registered_fb[(int) con2fb_map[vc->vc_num]]; ++ if (!vc->vc_splash_data->splash_overpaintok || pe == 65536 || pe < oldpe) { ++ if (splash_hasinter(vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount)) ++ splash_status(vc); ++ else ++ splash_prepare(vc, info); ++ } else { ++ if (vc->vc_splash_data->splash_silentjpeg && vc->vc_splash_data->splash_dosilent && info->silent_screen_base) ++ boxit(info->silent_screen_base, info->fix.line_length, vc->vc_splash_data->splash_sboxes, vc->vc_splash_data->splash_sboxcount, vc->vc_splash_data->splash_percent, 1, info->var.bits_per_pixel); ++ boxit(info->screen_base, info->fix.line_length, vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount, vc->vc_splash_data->splash_percent, 1, info->var.bits_per_pixel); ++ } ++ } ++ return count; ++ } ++ if (!strncmp(buffer,"silent\n",7) || !strncmp(buffer,"verbose\n",8)) { ++ vc = vc_cons[0].d; ++ if (vc->vc_splash_data && vc->vc_splash_data->splash_silentjpeg) { ++ if (vc->vc_splash_data->splash_dosilent != (buffer[0] == 's')) { ++ vc->vc_splash_data->splash_dosilent = buffer[0] == 's'; ++ splash_status(vc); ++ } ++ } ++ return count; ++ } ++ if (!strncmp(buffer,"freesilent\n",11)) { ++ vc = vc_cons[0].d; ++ if (vc->vc_splash_data && vc->vc_splash_data->splash_silentjpeg) { ++ printk(KERN_INFO "bootsplash: freeing silent jpeg\n"); ++ vc->vc_splash_data->splash_silentjpeg = 0; ++ vfree(vc->vc_splash_data->splash_sboxes); ++ vc->vc_splash_data->splash_sboxes = 0; ++ vc->vc_splash_data->splash_sboxcount = 0; ++ if (vc->vc_splash_data->splash_dosilent) ++ splash_status(vc); ++ vc->vc_splash_data->splash_dosilent = 0; ++ } ++ return count; ++ } ++ ++ if (!strncmp(buffer, "BOOTSPL", 7)) { ++ unit = splash_getraw((unsigned char *)buffer, (unsigned char *)buffer + count); ++ if (unit >= 0) { ++ vc = vc_cons[unit].d; ++ splash_status(vc); ++ } ++ return count; ++ } ++ vc = vc_cons[0].d; ++ if (!vc->vc_splash_data) { ++ return count; ++ } ++ if (buffer[0] == 't') { ++ vc->vc_splash_data->splash_state ^= 1; ++ splash_status(vc); ++ return count; ++ } ++ new = simple_strtoul(buffer, NULL, 0); ++ if (new > 1) { ++ /* expert user */ ++ vc->vc_splash_data->splash_color = new >> 8 & 0xff; ++ vc->vc_splash_data->splash_fg_color = new >> 4 & 0x0f; ++ } ++ if ((new & 1) == vc->vc_splash_data->splash_state) ++ splash_recolor(vc); ++ else { ++ vc->vc_splash_data->splash_state = new & 1; ++ splash_status(vc); ++ } ++ return count; ++} ++ ++static int splash_proc_register(void) ++{ ++ if ((proc_splash = create_proc_entry("splash", 0, 0))) { ++ proc_splash->read_proc = splash_read_proc; ++ proc_splash->write_proc = splash_write_proc; ++ return 0; ++ } ++ return 1; ++} ++ ++# if 0 ++static int splash_proc_unregister(void) ++{ ++ if (proc_splash) ++ remove_proc_entry("splash", 0); ++ return 0; ++} ++# endif ++#endif /* CONFIG_PROC_FS */ ++ ++void splash_init(void) ++{ ++ struct fb_info *info; ++ struct vc_data *vc; ++ int isramfs = 1; ++ int fd; ++ int len; ++ int max_len = 1024*1024*2; ++ char *mem; ++ ++ if (splash_registered) ++ return; ++ vc = vc_cons[0].d; ++ info = registered_fb[0]; ++ if (!vc || !info || info->var.bits_per_pixel < 16) ++ return; ++#ifdef CONFIG_PROC_FS ++ splash_proc_register(); ++#endif ++ splash_registered = 1; ++ if (vc->vc_splash_data) ++ return; ++ if ((fd = sys_open("/bootsplash", O_RDONLY, 0)) < 0) { ++ isramfs = 0; ++ fd = sys_open("/initrd.image", O_RDONLY, 0); ++ } ++ if (fd < 0) ++ return; ++ if ((len = (int)sys_lseek(fd, (off_t)0, 2)) <= 0) { ++ sys_close(fd); ++ return; ++ } ++ /* Don't look for more than the last 2MB */ ++ if (len > max_len) { ++ printk( KERN_INFO "bootsplash: scanning last %dMB of initrd for signature\n", ++ max_len>>20); ++ sys_lseek(fd, (off_t)(len - max_len), 0); ++ len = max_len; ++ } else { ++ sys_lseek(fd, (off_t)0, 0); ++ } ++ ++ mem = vmalloc(len); ++ if (mem) { ++ if ((int)sys_read(fd, mem, len) == len && splash_getraw((unsigned char *)mem, (unsigned char *)mem + len) == 0 && vc->vc_splash_data) ++ vc->vc_splash_data->splash_state = splash_default & 1; ++ vfree(mem); ++ } ++ sys_close(fd); ++ if (isramfs) ++ sys_unlink("/bootsplash"); ++ return; ++} ++ +diff -Naur linux-2.6.30-rc3.orig/drivers/video/bootsplash/bootsplash.h linux-2.6.30-rc3/drivers/video/bootsplash/bootsplash.h +--- linux-2.6.30-rc3.orig/drivers/video/bootsplash/bootsplash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.30-rc3/drivers/video/bootsplash/bootsplash.h 2009-04-25 12:44:31.000000000 +0200 +@@ -0,0 +1,44 @@ ++/* ++ * linux/drivers/video/bootsplash/bootsplash.h - splash screen definition. ++ * ++ * (w) 2001-2003 by Volker Poplawski, ++ * Stefan Reinauer, ++ * ++ * ++ * idea and SuSE screen work by Ken Wimer, ++ */ ++ ++#ifndef __BOOTSPLASH_H ++#define __BOOTSPLASH_H ++ ++struct fb_info; ++ ++/* splash.c */ ++extern int splash_prepare(struct vc_data *, struct fb_info *); ++extern void splash_init(void); ++ ++/* splash_render.c */ ++extern void splash_putcs(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, ++ const unsigned short *s, int count, int ypos, int xpos); ++extern void splash_putc(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, ++ int c, int ypos, int xpos); ++extern void splashcopy(u8 *dst, u8 *src, int height, int width, int dstbytes, int srcbytes, int depth); ++extern void splash_clear(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int sy, ++ int sx, int height, int width); ++extern void splash_bmove(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int sy, ++ int sx, int dy, int dx, int height, int width); ++extern void splash_clear_margins(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, ++ int bottom_only); ++extern void splash_cursor(struct splash_data *sd, struct fb_info *info, struct fb_cursor *cursor); ++extern void splash_bmove_redraw(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, ++ int y, int sx, int dx, int width); ++extern void splash_blank(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, ++ int blank); ++ ++/* vt.c */ ++extern void con_remap_def_color(struct vc_data *, int new_color); ++ ++extern void acquire_console_sem(void); ++extern void release_console_sem(void); ++ ++#endif +diff -Naur linux-2.6.30-rc3.orig/drivers/video/bootsplash/decode-jpg.c linux-2.6.30-rc3/drivers/video/bootsplash/decode-jpg.c +--- linux-2.6.30-rc3.orig/drivers/video/bootsplash/decode-jpg.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.30-rc3/drivers/video/bootsplash/decode-jpg.c 2009-04-25 12:44:31.000000000 +0200 +@@ -0,0 +1,1007 @@ ++/* ++ * linux/drivers/video/bootsplash/decode-jpg.c - a tiny jpeg decoder. ++ * ++ * (w) August 2001 by Michael Schroeder, ++ * ++ */ ++ ++#include ++#include ++ ++#include "decode-jpg.h" ++ ++#define ISHIFT 11 ++ ++#define IFIX(a) ((int)((a) * (1 << ISHIFT) + .5)) ++#define IMULT(a, b) (((a) * (b)) >> ISHIFT) ++#define ITOINT(a) ((a) >> ISHIFT) ++ ++#ifndef __P ++# define __P(x) x ++#endif ++ ++/* special markers */ ++#define M_BADHUFF -1 ++#define M_EOF 0x80 ++ ++struct in { ++ unsigned char *p; ++ unsigned int bits; ++ int left; ++ int marker; ++ ++ int (*func) __P((void *)); ++ void *data; ++}; ++ ++/*********************************/ ++struct dec_hufftbl; ++struct enc_hufftbl; ++ ++union hufftblp { ++ struct dec_hufftbl *dhuff; ++ struct enc_hufftbl *ehuff; ++}; ++ ++struct scan { ++ int dc; /* old dc value */ ++ ++ union hufftblp hudc; ++ union hufftblp huac; ++ int next; /* when to switch to next scan */ ++ ++ int cid; /* component id */ ++ int hv; /* horiz/vert, copied from comp */ ++ int tq; /* quant tbl, copied from comp */ ++}; ++ ++/*********************************/ ++ ++#define DECBITS 10 /* seems to be the optimum */ ++ ++struct dec_hufftbl { ++ int maxcode[17]; ++ int valptr[16]; ++ unsigned char vals[256]; ++ unsigned int llvals[1 << DECBITS]; ++}; ++ ++static void decode_mcus __P((struct in *, int *, int, struct scan *, int *)); ++static int dec_readmarker __P((struct in *)); ++static void dec_makehuff __P((struct dec_hufftbl *, int *, unsigned char *)); ++ ++static void setinput __P((struct in *, unsigned char *)); ++/*********************************/ ++ ++#undef PREC ++#define PREC int ++ ++static void idctqtab __P((unsigned char *, PREC *)); ++static void idct __P((int *, int *, PREC *, PREC, int)); ++static void scaleidctqtab __P((PREC *, PREC)); ++ ++/*********************************/ ++ ++static void initcol __P((PREC[][64])); ++ ++static void col221111 __P((int *, unsigned char *, int)); ++static void col221111_16 __P((int *, unsigned char *, int)); ++static void col221111_32 __P((int *, unsigned char *, int)); ++ ++/*********************************/ ++ ++#define M_SOI 0xd8 ++#define M_APP0 0xe0 ++#define M_DQT 0xdb ++#define M_SOF0 0xc0 ++#define M_DHT 0xc4 ++#define M_DRI 0xdd ++#define M_SOS 0xda ++#define M_RST0 0xd0 ++#define M_EOI 0xd9 ++#define M_COM 0xfe ++ ++static unsigned char *datap; ++ ++static int getbyte(void) ++{ ++ return *datap++; ++} ++ ++static int getword(void) ++{ ++ int c1, c2; ++ c1 = *datap++; ++ c2 = *datap++; ++ return c1 << 8 | c2; ++} ++ ++struct comp { ++ int cid; ++ int hv; ++ int tq; ++}; ++ ++#define MAXCOMP 4 ++struct jpginfo { ++ int nc; /* number of components */ ++ int ns; /* number of scans */ ++ int dri; /* restart interval */ ++ int nm; /* mcus til next marker */ ++ int rm; /* next restart marker */ ++}; ++ ++static struct jpginfo info; ++static struct comp comps[MAXCOMP]; ++ ++static struct scan dscans[MAXCOMP]; ++ ++static unsigned char quant[4][64]; ++ ++static struct dec_hufftbl dhuff[4]; ++ ++#define dec_huffdc (dhuff + 0) ++#define dec_huffac (dhuff + 2) ++ ++static struct in in; ++ ++static int readtables(int till) ++{ ++ int m, l, i, j, lq, pq, tq; ++ int tc, th, tt; ++ ++ for (;;) { ++ if (getbyte() != 0xff) ++ return -1; ++ if ((m = getbyte()) == till) ++ break; ++ ++ switch (m) { ++ case 0xc2: ++ return 0; ++ ++ case M_DQT: ++ lq = getword(); ++ while (lq > 2) { ++ pq = getbyte(); ++ tq = pq & 15; ++ if (tq > 3) ++ return -1; ++ pq >>= 4; ++ if (pq != 0) ++ return -1; ++ for (i = 0; i < 64; i++) ++ quant[tq][i] = getbyte(); ++ lq -= 64 + 1; ++ } ++ break; ++ ++ case M_DHT: ++ l = getword(); ++ while (l > 2) { ++ int hufflen[16], k; ++ unsigned char huffvals[256]; ++ ++ tc = getbyte(); ++ th = tc & 15; ++ tc >>= 4; ++ tt = tc * 2 + th; ++ if (tc > 1 || th > 1) ++ return -1; ++ for (i = 0; i < 16; i++) ++ hufflen[i] = getbyte(); ++ l -= 1 + 16; ++ k = 0; ++ for (i = 0; i < 16; i++) { ++ for (j = 0; j < hufflen[i]; j++) ++ huffvals[k++] = getbyte(); ++ l -= hufflen[i]; ++ } ++ dec_makehuff(dhuff + tt, hufflen, ++ huffvals); ++ } ++ break; ++ ++ case M_DRI: ++ l = getword(); ++ info.dri = getword(); ++ break; ++ ++ default: ++ l = getword(); ++ while (l-- > 2) ++ getbyte(); ++ break; ++ } ++ } ++ return 0; ++} ++ ++static void dec_initscans(void) ++{ ++ int i; ++ ++ info.nm = info.dri + 1; ++ info.rm = M_RST0; ++ for (i = 0; i < info.ns; i++) ++ dscans[i].dc = 0; ++} ++ ++static int dec_checkmarker(void) ++{ ++ int i; ++ ++ if (dec_readmarker(&in) != info.rm) ++ return -1; ++ info.nm = info.dri; ++ info.rm = (info.rm + 1) & ~0x08; ++ for (i = 0; i < info.ns; i++) ++ dscans[i].dc = 0; ++ return 0; ++} ++ ++int jpeg_check_size(unsigned char *buf, int width, int height) ++{ ++ datap = buf; ++ getbyte(); ++ getbyte(); ++ readtables(M_SOF0); ++ getword(); ++ getbyte(); ++ if (height != getword() || width != getword()) ++ return 0; ++ return 1; ++} ++ ++int jpeg_decode(buf, pic, width, height, depth, decdata) ++unsigned char *buf, *pic; ++int width, height, depth; ++struct jpeg_decdata *decdata; ++{ ++ int i, j, m, tac, tdc; ++ int mcusx, mcusy, mx, my; ++ int max[6]; ++ ++ if (!decdata) ++ return -1; ++ datap = buf; ++ if (getbyte() != 0xff) ++ return ERR_NO_SOI; ++ if (getbyte() != M_SOI) ++ return ERR_NO_SOI; ++ if (readtables(M_SOF0)) ++ return ERR_BAD_TABLES; ++ getword(); ++ i = getbyte(); ++ if (i != 8) ++ return ERR_NOT_8BIT; ++ if (((getword() + 15) & ~15) != height) ++ return ERR_HEIGHT_MISMATCH; ++ if (((getword() + 15) & ~15) != width) ++ return ERR_WIDTH_MISMATCH; ++ if ((height & 15) || (width & 15)) ++ return ERR_BAD_WIDTH_OR_HEIGHT; ++ info.nc = getbyte(); ++ if (info.nc > MAXCOMP) ++ return ERR_TOO_MANY_COMPPS; ++ for (i = 0; i < info.nc; i++) { ++ int h, v; ++ comps[i].cid = getbyte(); ++ comps[i].hv = getbyte(); ++ v = comps[i].hv & 15; ++ h = comps[i].hv >> 4; ++ comps[i].tq = getbyte(); ++ if (h > 3 || v > 3) ++ return ERR_ILLEGAL_HV; ++ if (comps[i].tq > 3) ++ return ERR_QUANT_TABLE_SELECTOR; ++ } ++ if (readtables(M_SOS)) ++ return ERR_BAD_TABLES; ++ getword(); ++ info.ns = getbyte(); ++ if (info.ns != 3) ++ return ERR_NOT_YCBCR_221111; ++ for (i = 0; i < 3; i++) { ++ dscans[i].cid = getbyte(); ++ tdc = getbyte(); ++ tac = tdc & 15; ++ tdc >>= 4; ++ if (tdc > 1 || tac > 1) ++ return ERR_QUANT_TABLE_SELECTOR; ++ for (j = 0; j < info.nc; j++) ++ if (comps[j].cid == dscans[i].cid) ++ break; ++ if (j == info.nc) ++ return ERR_UNKNOWN_CID_IN_SCAN; ++ dscans[i].hv = comps[j].hv; ++ dscans[i].tq = comps[j].tq; ++ dscans[i].hudc.dhuff = dec_huffdc + tdc; ++ dscans[i].huac.dhuff = dec_huffac + tac; ++ } ++ ++ i = getbyte(); ++ j = getbyte(); ++ m = getbyte(); ++ ++ if (i != 0 || j != 63 || m != 0) ++ return ERR_NOT_SEQUENTIAL_DCT; ++ ++ if (dscans[0].cid != 1 || dscans[1].cid != 2 || dscans[2].cid != 3) ++ return ERR_NOT_YCBCR_221111; ++ ++ if (dscans[0].hv != 0x22 || dscans[1].hv != 0x11 || dscans[2].hv != 0x11) ++ return ERR_NOT_YCBCR_221111; ++ ++ mcusx = width >> 4; ++ mcusy = height >> 4; ++ ++ ++ idctqtab(quant[dscans[0].tq], decdata->dquant[0]); ++ idctqtab(quant[dscans[1].tq], decdata->dquant[1]); ++ idctqtab(quant[dscans[2].tq], decdata->dquant[2]); ++ initcol(decdata->dquant); ++ setinput(&in, datap); ++ ++#if 0 ++ /* landing zone */ ++ img[len] = 0; ++ img[len + 1] = 0xff; ++ img[len + 2] = M_EOF; ++#endif ++ ++ dec_initscans(); ++ ++ dscans[0].next = 6 - 4; ++ dscans[1].next = 6 - 4 - 1; ++ dscans[2].next = 6 - 4 - 1 - 1; /* 411 encoding */ ++ for (my = 0; my < mcusy; my++) { ++ for (mx = 0; mx < mcusx; mx++) { ++ if (info.dri && !--info.nm) ++ if (dec_checkmarker()) ++ return ERR_WRONG_MARKER; ++ ++ decode_mcus(&in, decdata->dcts, 6, dscans, max); ++ idct(decdata->dcts, decdata->out, decdata->dquant[0], IFIX(128.5), max[0]); ++ idct(decdata->dcts + 64, decdata->out + 64, decdata->dquant[0], IFIX(128.5), max[1]); ++ idct(decdata->dcts + 128, decdata->out + 128, decdata->dquant[0], IFIX(128.5), max[2]); ++ idct(decdata->dcts + 192, decdata->out + 192, decdata->dquant[0], IFIX(128.5), max[3]); ++ idct(decdata->dcts + 256, decdata->out + 256, decdata->dquant[1], IFIX(0.5), max[4]); ++ idct(decdata->dcts + 320, decdata->out + 320, decdata->dquant[2], IFIX(0.5), max[5]); ++ ++ switch (depth) { ++ case 32: ++ col221111_32(decdata->out, pic + (my * 16 * mcusx + mx) * 16 * 4, mcusx * 16 * 4); ++ break; ++ case 24: ++ col221111(decdata->out, pic + (my * 16 * mcusx + mx) * 16 * 3, mcusx * 16 * 3); ++ break; ++ case 16: ++ col221111_16(decdata->out, pic + (my * 16 * mcusx + mx) * (16 * 2), mcusx * (16 * 2)); ++ break; ++ default: ++ return ERR_DEPTH_MISMATCH; ++ break; ++ } ++ } ++ } ++ ++ m = dec_readmarker(&in); ++ if (m != M_EOI) ++ return ERR_NO_EOI; ++ ++ return 0; ++} ++ ++/****************************************************************/ ++/************** huffman decoder ***************/ ++/****************************************************************/ ++ ++static int fillbits __P((struct in *, int, unsigned int)); ++static int dec_rec2 ++__P((struct in *, struct dec_hufftbl *, int *, int, int)); ++ ++static void setinput(in, p) ++struct in *in; ++unsigned char *p; ++{ ++ in->p = p; ++ in->left = 0; ++ in->bits = 0; ++ in->marker = 0; ++} ++ ++static int fillbits(in, le, bi) ++struct in *in; ++int le; ++unsigned int bi; ++{ ++ int b, m; ++ ++ if (in->marker) { ++ if (le <= 16) ++ in->bits = bi << 16, le += 16; ++ return le; ++ } ++ while (le <= 24) { ++ b = *in->p++; ++ if (b == 0xff && (m = *in->p++) != 0) { ++ if (m == M_EOF) { ++ if (in->func && (m = in->func(in->data)) == 0) ++ continue; ++ } ++ in->marker = m; ++ if (le <= 16) ++ bi = bi << 16, le += 16; ++ break; ++ } ++ bi = bi << 8 | b; ++ le += 8; ++ } ++ in->bits = bi; /* tmp... 2 return values needed */ ++ return le; ++} ++ ++static int dec_readmarker(in) ++struct in *in; ++{ ++ int m; ++ ++ in->left = fillbits(in, in->left, in->bits); ++ if ((m = in->marker) == 0) ++ return 0; ++ in->left = 0; ++ in->marker = 0; ++ return m; ++} ++ ++#define LEBI_DCL int le, bi ++#define LEBI_GET(in) (le = in->left, bi = in->bits) ++#define LEBI_PUT(in) (in->left = le, in->bits = bi) ++ ++#define GETBITS(in, n) ( \ ++ (le < (n) ? le = fillbits(in, le, bi), bi = in->bits : 0), \ ++ (le -= (n)), \ ++ bi >> le & ((1 << (n)) - 1) \ ++) ++ ++#define UNGETBITS(in, n) ( \ ++ le += (n) \ ++) ++ ++ ++static int dec_rec2(in, hu, runp, c, i) ++struct in *in; ++struct dec_hufftbl *hu; ++int *runp; ++int c, i; ++{ ++ LEBI_DCL; ++ ++ LEBI_GET(in); ++ if (i) { ++ UNGETBITS(in, i & 127); ++ *runp = i >> 8 & 15; ++ i >>= 16; ++ } else { ++ for (i = DECBITS; (c = ((c << 1) | GETBITS(in, 1))) >= (hu->maxcode[i]); i++); ++ if (i >= 16) { ++ in->marker = M_BADHUFF; ++ return 0; ++ } ++ i = hu->vals[hu->valptr[i] + c - hu->maxcode[i - 1] * 2]; ++ *runp = i >> 4; ++ i &= 15; ++ } ++ if (i == 0) { /* sigh, 0xf0 is 11 bit */ ++ LEBI_PUT(in); ++ return 0; ++ } ++ /* receive part */ ++ c = GETBITS(in, i); ++ if (c < (1 << (i - 1))) ++ c += (-1 << i) + 1; ++ LEBI_PUT(in); ++ return c; ++} ++ ++#define DEC_REC(in, hu, r, i) ( \ ++ r = GETBITS(in, DECBITS), \ ++ i = hu->llvals[r], \ ++ i & 128 ? \ ++ ( \ ++ UNGETBITS(in, i & 127), \ ++ r = i >> 8 & 15, \ ++ i >> 16 \ ++ ) \ ++ : \ ++ ( \ ++ LEBI_PUT(in), \ ++ i = dec_rec2(in, hu, &r, r, i), \ ++ LEBI_GET(in), \ ++ i \ ++ ) \ ++) ++ ++static void decode_mcus(in, dct, n, sc, maxp) ++struct in *in; ++int *dct; ++int n; ++struct scan *sc; ++int *maxp; ++{ ++ struct dec_hufftbl *hu; ++ int i, r, t; ++ LEBI_DCL; ++ ++ memset(dct, 0, n * 64 * sizeof(*dct)); ++ LEBI_GET(in); ++ while (n-- > 0) { ++ hu = sc->hudc.dhuff; ++ *dct++ = (sc->dc += DEC_REC(in, hu, r, t)); ++ ++ hu = sc->huac.dhuff; ++ i = 63; ++ while (i > 0) { ++ t = DEC_REC(in, hu, r, t); ++ if (t == 0 && r == 0) { ++ dct += i; ++ break; ++ } ++ dct += r; ++ *dct++ = t; ++ i -= r + 1; ++ } ++ *maxp++ = 64 - i; ++ if (n == sc->next) ++ sc++; ++ } ++ LEBI_PUT(in); ++} ++ ++static void dec_makehuff(hu, hufflen, huffvals) ++struct dec_hufftbl *hu; ++int *hufflen; ++unsigned char *huffvals; ++{ ++ int code, k, i, j, d, x, c, v; ++ for (i = 0; i < (1 << DECBITS); i++) ++ hu->llvals[i] = 0; ++ ++/* ++ * llvals layout: ++ * ++ * value v already known, run r, backup u bits: ++ * vvvvvvvvvvvvvvvv 0000 rrrr 1 uuuuuuu ++ * value unknown, size b bits, run r, backup u bits: ++ * 000000000000bbbb 0000 rrrr 0 uuuuuuu ++ * value and size unknown: ++ * 0000000000000000 0000 0000 0 0000000 ++ */ ++ code = 0; ++ k = 0; ++ for (i = 0; i < 16; i++, code <<= 1) { /* sizes */ ++ hu->valptr[i] = k; ++ for (j = 0; j < hufflen[i]; j++) { ++ hu->vals[k] = *huffvals++; ++ if (i < DECBITS) { ++ c = code << (DECBITS - 1 - i); ++ v = hu->vals[k] & 0x0f; /* size */ ++ for (d = 1 << (DECBITS - 1 - i); --d >= 0;) { ++ if (v + i < DECBITS) { /* both fit in table */ ++ x = d >> (DECBITS - 1 - v - ++ i); ++ if (v && x < (1 << (v - 1))) ++ x += (-1 << v) + 1; ++ x = x << 16 | (hu-> vals[k] & 0xf0) << 4 | ++ (DECBITS - (i + 1 + v)) | 128; ++ } else ++ x = v << 16 | (hu-> vals[k] & 0xf0) << 4 | ++ (DECBITS - (i + 1)); ++ hu->llvals[c | d] = x; ++ } ++ } ++ code++; ++ k++; ++ } ++ hu->maxcode[i] = code; ++ } ++ hu->maxcode[16] = 0x20000; /* always terminate decode */ ++} ++ ++/****************************************************************/ ++/************** idct ***************/ ++/****************************************************************/ ++ ++#define ONE ((PREC)IFIX(1.)) ++#define S2 ((PREC)IFIX(0.382683432)) ++#define C2 ((PREC)IFIX(0.923879532)) ++#define C4 ((PREC)IFIX(0.707106781)) ++ ++#define S22 ((PREC)IFIX(2 * 0.382683432)) ++#define C22 ((PREC)IFIX(2 * 0.923879532)) ++#define IC4 ((PREC)IFIX(1 / 0.707106781)) ++ ++#define C3IC1 ((PREC)IFIX(0.847759065)) /* c3/c1 */ ++#define C5IC1 ((PREC)IFIX(0.566454497)) /* c5/c1 */ ++#define C7IC1 ((PREC)IFIX(0.198912367)) /* c7/c1 */ ++ ++#define XPP(a,b) (t = a + b, b = a - b, a = t) ++#define XMP(a,b) (t = a - b, b = a + b, a = t) ++#define XPM(a,b) (t = a + b, b = b - a, a = t) ++ ++#define ROT(a,b,s,c) ( t = IMULT(a + b, s), \ ++ a = IMULT(a, c - s) + t, \ ++ b = IMULT(b, c + s) - t) ++ ++#define IDCT \ ++( \ ++ XPP(t0, t1), \ ++ XMP(t2, t3), \ ++ t2 = IMULT(t2, IC4) - t3, \ ++ XPP(t0, t3), \ ++ XPP(t1, t2), \ ++ XMP(t4, t7), \ ++ XPP(t5, t6), \ ++ XMP(t5, t7), \ ++ t5 = IMULT(t5, IC4), \ ++ ROT(t4, t6, S22, C22),\ ++ t6 -= t7, \ ++ t5 -= t6, \ ++ t4 -= t5, \ ++ XPP(t0, t7), \ ++ XPP(t1, t6), \ ++ XPP(t2, t5), \ ++ XPP(t3, t4) \ ++) ++ ++static unsigned char zig2[64] = { ++ 0, 2, 3, 9, 10, 20, 21, 35, ++ 14, 16, 25, 31, 39, 46, 50, 57, ++ 5, 7, 12, 18, 23, 33, 37, 48, ++ 27, 29, 41, 44, 52, 55, 59, 62, ++ 15, 26, 30, 40, 45, 51, 56, 58, ++ 1, 4, 8, 11, 19, 22, 34, 36, ++ 28, 42, 43, 53, 54, 60, 61, 63, ++ 6, 13, 17, 24, 32, 38, 47, 49 ++}; ++ ++void idct(in, out, quant, off, max) ++int *in; ++int *out; ++PREC *quant; ++PREC off; ++int max; ++{ ++ PREC t0, t1, t2, t3, t4, t5, t6, t7, t; ++ PREC tmp[64], *tmpp; ++ int i, j; ++ unsigned char *zig2p; ++ ++ t0 = off; ++ if (max == 1) { ++ t0 += in[0] * quant[0]; ++ for (i = 0; i < 64; i++) ++ out[i] = ITOINT(t0); ++ return; ++ } ++ zig2p = zig2; ++ tmpp = tmp; ++ for (i = 0; i < 8; i++) { ++ j = *zig2p++; ++ t0 += in[j] * quant[j]; ++ j = *zig2p++; ++ t5 = in[j] * quant[j]; ++ j = *zig2p++; ++ t2 = in[j] * quant[j]; ++ j = *zig2p++; ++ t7 = in[j] * quant[j]; ++ j = *zig2p++; ++ t1 = in[j] * quant[j]; ++ j = *zig2p++; ++ t4 = in[j] * quant[j]; ++ j = *zig2p++; ++ t3 = in[j] * quant[j]; ++ j = *zig2p++; ++ t6 = in[j] * quant[j]; ++ IDCT; ++ tmpp[0 * 8] = t0; ++ tmpp[1 * 8] = t1; ++ tmpp[2 * 8] = t2; ++ tmpp[3 * 8] = t3; ++ tmpp[4 * 8] = t4; ++ tmpp[5 * 8] = t5; ++ tmpp[6 * 8] = t6; ++ tmpp[7 * 8] = t7; ++ tmpp++; ++ t0 = 0; ++ } ++ for (i = 0; i < 8; i++) { ++ t0 = tmp[8 * i + 0]; ++ t1 = tmp[8 * i + 1]; ++ t2 = tmp[8 * i + 2]; ++ t3 = tmp[8 * i + 3]; ++ t4 = tmp[8 * i + 4]; ++ t5 = tmp[8 * i + 5]; ++ t6 = tmp[8 * i + 6]; ++ t7 = tmp[8 * i + 7]; ++ IDCT; ++ out[8 * i + 0] = ITOINT(t0); ++ out[8 * i + 1] = ITOINT(t1); ++ out[8 * i + 2] = ITOINT(t2); ++ out[8 * i + 3] = ITOINT(t3); ++ out[8 * i + 4] = ITOINT(t4); ++ out[8 * i + 5] = ITOINT(t5); ++ out[8 * i + 6] = ITOINT(t6); ++ out[8 * i + 7] = ITOINT(t7); ++ } ++} ++ ++static unsigned char zig[64] = { ++ 0, 1, 5, 6, 14, 15, 27, 28, ++ 2, 4, 7, 13, 16, 26, 29, 42, ++ 3, 8, 12, 17, 25, 30, 41, 43, ++ 9, 11, 18, 24, 31, 40, 44, 53, ++ 10, 19, 23, 32, 39, 45, 52, 54, ++ 20, 22, 33, 38, 46, 51, 55, 60, ++ 21, 34, 37, 47, 50, 56, 59, 61, ++ 35, 36, 48, 49, 57, 58, 62, 63 ++}; ++ ++static PREC aaidct[8] = { ++ IFIX(0.3535533906), IFIX(0.4903926402), ++ IFIX(0.4619397663), IFIX(0.4157348062), ++ IFIX(0.3535533906), IFIX(0.2777851165), ++ IFIX(0.1913417162), IFIX(0.0975451610) ++}; ++ ++ ++static void idctqtab(qin, qout) ++unsigned char *qin; ++PREC *qout; ++{ ++ int i, j; ++ ++ for (i = 0; i < 8; i++) ++ for (j = 0; j < 8; j++) ++ qout[zig[i * 8 + j]] = qin[zig[i * 8 + j]] * ++ IMULT(aaidct[i], aaidct[j]); ++} ++ ++static void scaleidctqtab(q, sc) ++PREC *q; ++PREC sc; ++{ ++ int i; ++ ++ for (i = 0; i < 64; i++) ++ q[i] = IMULT(q[i], sc); ++} ++ ++/****************************************************************/ ++/************** color decoder ***************/ ++/****************************************************************/ ++ ++#define ROUND ++ ++/* ++ * YCbCr Color transformation: ++ * ++ * y:0..255 Cb:-128..127 Cr:-128..127 ++ * ++ * R = Y + 1.40200 * Cr ++ * G = Y - 0.34414 * Cb - 0.71414 * Cr ++ * B = Y + 1.77200 * Cb ++ * ++ * => ++ * Cr *= 1.40200; ++ * Cb *= 1.77200; ++ * Cg = 0.19421 * Cb + .50937 * Cr; ++ * R = Y + Cr; ++ * G = Y - Cg; ++ * B = Y + Cb; ++ * ++ * => ++ * Cg = (50 * Cb + 130 * Cr + 128) >> 8; ++ */ ++ ++static void initcol(q) ++PREC q[][64]; ++{ ++ scaleidctqtab(q[1], IFIX(1.77200)); ++ scaleidctqtab(q[2], IFIX(1.40200)); ++} ++ ++/* This is optimized for the stupid sun SUNWspro compiler. */ ++#define STORECLAMP(a,x) \ ++( \ ++ (a) = (x), \ ++ (unsigned int)(x) >= 256 ? \ ++ ((a) = (x) < 0 ? 0 : 255) \ ++ : \ ++ 0 \ ++) ++ ++#define CLAMP(x) ((unsigned int)(x) >= 256 ? ((x) < 0 ? 0 : 255) : (x)) ++ ++#ifdef ROUND ++ ++#define CBCRCG(yin, xin) \ ++( \ ++ cb = outc[0 +yin*8+xin], \ ++ cr = outc[64+yin*8+xin], \ ++ cg = (50 * cb + 130 * cr + 128) >> 8 \ ++) ++ ++#else ++ ++#define CBCRCG(yin, xin) \ ++( \ ++ cb = outc[0 +yin*8+xin], \ ++ cr = outc[64+yin*8+xin], \ ++ cg = (3 * cb + 8 * cr) >> 4 \ ++) ++ ++#endif ++ ++#define PIC(yin, xin, p, xout) \ ++( \ ++ y = outy[(yin) * 8 + xin], \ ++ STORECLAMP(p[(xout) * 3 + 0], y + cb), \ ++ STORECLAMP(p[(xout) * 3 + 1], y - cg), \ ++ STORECLAMP(p[(xout) * 3 + 2], y + cr) \ ++) ++ ++#ifdef __LITTLE_ENDIAN ++#define PIC_16(yin, xin, p, xout, add) \ ++( \ ++ y = outy[(yin) * 8 + xin], \ ++ y = ((CLAMP(y + cr + add*2+1) & 0xf8) << 8) | \ ++ ((CLAMP(y - cg + add ) & 0xfc) << 3) | \ ++ ((CLAMP(y + cb + add*2+1) ) >> 3), \ ++ p[(xout) * 2 + 0] = y & 0xff, \ ++ p[(xout) * 2 + 1] = y >> 8 \ ++) ++#else ++#ifdef CONFIG_PPC ++#define PIC_16(yin, xin, p, xout, add) \ ++( \ ++ y = outy[(yin) * 8 + xin], \ ++ y = ((CLAMP(y + cr + add*2+1) & 0xf8) << 7) | \ ++ ((CLAMP(y - cg + add*2+1) & 0xf8) << 2) | \ ++ ((CLAMP(y + cb + add*2+1) ) >> 3), \ ++ p[(xout) * 2 + 0] = y >> 8, \ ++ p[(xout) * 2 + 1] = y & 0xff \ ++) ++#else ++#define PIC_16(yin, xin, p, xout, add) \ ++( \ ++ y = outy[(yin) * 8 + xin], \ ++ y = ((CLAMP(y + cr + add*2+1) & 0xf8) << 8) | \ ++ ((CLAMP(y - cg + add ) & 0xfc) << 3) | \ ++ ((CLAMP(y + cb + add*2+1) ) >> 3), \ ++ p[(xout) * 2 + 0] = y >> 8, \ ++ p[(xout) * 2 + 1] = y & 0xff \ ++) ++#endif ++#endif ++ ++#define PIC_32(yin, xin, p, xout) \ ++( \ ++ y = outy[(yin) * 8 + xin], \ ++ STORECLAMP(p[(xout) * 4 + 0], y + cb), \ ++ STORECLAMP(p[(xout) * 4 + 1], y - cg), \ ++ STORECLAMP(p[(xout) * 4 + 2], y + cr), \ ++ STORECLAMP(p[(xout) * 4 + 3], 0) \ ++) ++ ++#define PIC221111(xin) \ ++( \ ++ CBCRCG(0, xin), \ ++ PIC(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0), \ ++ PIC(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1), \ ++ PIC(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0), \ ++ PIC(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1) \ ++) ++ ++#define PIC221111_16(xin) \ ++( \ ++ CBCRCG(0, xin), \ ++ PIC_16(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0, 3), \ ++ PIC_16(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1, 0), \ ++ PIC_16(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0, 1), \ ++ PIC_16(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1, 2) \ ++) ++ ++#define PIC221111_32(xin) \ ++( \ ++ CBCRCG(0, xin), \ ++ PIC_32(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0), \ ++ PIC_32(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1), \ ++ PIC_32(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0), \ ++ PIC_32(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1) \ ++) ++ ++static void col221111(out, pic, width) ++int *out; ++unsigned char *pic; ++int width; ++{ ++ int i, j, k; ++ unsigned char *pic0, *pic1; ++ int *outy, *outc; ++ int cr, cg, cb, y; ++ ++ pic0 = pic; ++ pic1 = pic + width; ++ outy = out; ++ outc = out + 64 * 4; ++ for (i = 2; i > 0; i--) { ++ for (j = 4; j > 0; j--) { ++ for (k = 0; k < 8; k++) { ++ PIC221111(k); ++ } ++ outc += 8; ++ outy += 16; ++ pic0 += 2 * width; ++ pic1 += 2 * width; ++ } ++ outy += 64 * 2 - 16 * 4; ++ } ++} ++ ++static void col221111_16(out, pic, width) ++int *out; ++unsigned char *pic; ++int width; ++{ ++ int i, j, k; ++ unsigned char *pic0, *pic1; ++ int *outy, *outc; ++ int cr, cg, cb, y; ++ ++ pic0 = pic; ++ pic1 = pic + width; ++ outy = out; ++ outc = out + 64 * 4; ++ for (i = 2; i > 0; i--) { ++ for (j = 4; j > 0; j--) { ++ for (k = 0; k < 8; k++) { ++ PIC221111_16(k); ++ } ++ outc += 8; ++ outy += 16; ++ pic0 += 2 * width; ++ pic1 += 2 * width; ++ } ++ outy += 64 * 2 - 16 * 4; ++ } ++} ++ ++static void col221111_32(out, pic, width) ++int *out; ++unsigned char *pic; ++int width; ++{ ++ int i, j, k; ++ unsigned char *pic0, *pic1; ++ int *outy, *outc; ++ int cr, cg, cb, y; ++ ++ pic0 = pic; ++ pic1 = pic + width; ++ outy = out; ++ outc = out + 64 * 4; ++ for (i = 2; i > 0; i--) { ++ for (j = 4; j > 0; j--) { ++ for (k = 0; k < 8; k++) { ++ PIC221111_32(k); ++ } ++ outc += 8; ++ outy += 16; ++ pic0 += 2 * width; ++ pic1 += 2 * width; ++ } ++ outy += 64 * 2 - 16 * 4; ++ } ++} +diff -Naur linux-2.6.30-rc3.orig/drivers/video/bootsplash/decode-jpg.h linux-2.6.30-rc3/drivers/video/bootsplash/decode-jpg.h +--- linux-2.6.30-rc3.orig/drivers/video/bootsplash/decode-jpg.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.30-rc3/drivers/video/bootsplash/decode-jpg.h 2009-04-25 12:44:23.000000000 +0200 +@@ -0,0 +1,35 @@ ++/* ++ * linux/drivers/video/bootsplash/decode-jpg.h - a tiny jpeg decoder. ++ * ++ * (w) August 2001 by Michael Schroeder, ++ */ ++ ++#ifndef __DECODE_JPG_H ++#define __DECODE_JPG_H ++ ++#define ERR_NO_SOI 1 ++#define ERR_NOT_8BIT 2 ++#define ERR_HEIGHT_MISMATCH 3 ++#define ERR_WIDTH_MISMATCH 4 ++#define ERR_BAD_WIDTH_OR_HEIGHT 5 ++#define ERR_TOO_MANY_COMPPS 6 ++#define ERR_ILLEGAL_HV 7 ++#define ERR_QUANT_TABLE_SELECTOR 8 ++#define ERR_NOT_YCBCR_221111 9 ++#define ERR_UNKNOWN_CID_IN_SCAN 10 ++#define ERR_NOT_SEQUENTIAL_DCT 11 ++#define ERR_WRONG_MARKER 12 ++#define ERR_NO_EOI 13 ++#define ERR_BAD_TABLES 14 ++#define ERR_DEPTH_MISMATCH 15 ++ ++struct jpeg_decdata { ++ int dcts[6 * 64 + 16]; ++ int out[64 * 6]; ++ int dquant[3][64]; ++}; ++ ++extern int jpeg_decode(unsigned char *, unsigned char *, int, int, int, struct jpeg_decdata *); ++extern int jpeg_check_size(unsigned char *, int, int); ++ ++#endif +diff -Naur linux-2.6.30-rc3.orig/drivers/video/bootsplash/Kconfig linux-2.6.30-rc3/drivers/video/bootsplash/Kconfig +--- linux-2.6.30-rc3.orig/drivers/video/bootsplash/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.30-rc3/drivers/video/bootsplash/Kconfig 2009-04-25 12:44:31.000000000 +0200 +@@ -0,0 +1,17 @@ ++# ++# Bootsplash configuration ++# ++ ++menu "Bootsplash configuration" ++ ++config BOOTSPLASH ++ bool "Bootup splash screen" ++ depends on FRAMEBUFFER_CONSOLE=y && BLK_DEV_INITRD=y ++ default n ++ ---help--- ++ This option enables the Linux bootsplash screen. For more ++ information on the bootsplash screen have a look at ++ http://www.bootsplash.org/. ++ If you are unsure, say N ++endmenu ++ +diff -Naur linux-2.6.30-rc3.orig/drivers/video/bootsplash/Makefile linux-2.6.30-rc3/drivers/video/bootsplash/Makefile +--- linux-2.6.30-rc3.orig/drivers/video/bootsplash/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.30-rc3/drivers/video/bootsplash/Makefile 2009-04-25 12:44:23.000000000 +0200 +@@ -0,0 +1,5 @@ ++# Makefile for the Linux bootsplash ++ ++obj-$(CONFIG_BOOTSPLASH) += bootsplash.o ++obj-$(CONFIG_BOOTSPLASH) += decode-jpg.o ++obj-$(CONFIG_BOOTSPLASH) += render.o +diff -Naur linux-2.6.30-rc3.orig/drivers/video/bootsplash/render.c linux-2.6.30-rc3/drivers/video/bootsplash/render.c +--- linux-2.6.30-rc3.orig/drivers/video/bootsplash/render.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.30-rc3/drivers/video/bootsplash/render.c 2009-04-25 12:44:31.000000000 +0200 +@@ -0,0 +1,357 @@ ++/* ++ * linux/drivers/video/bootsplash/render.c - splash screen render functions. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "../console/fbcon.h" ++#include "bootsplash.h" ++ ++void splash_putcs(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, ++ const unsigned short *s, int count, int ypos, int xpos) ++{ ++ unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; ++ int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; ++ int fgshift = (vc->vc_hi_font_mask) ? 9 : 8; ++ u8 *src; ++ u8 *dst, *splashsrc; ++ unsigned int d, x, y, Bpp = info->var.bits_per_pixel >> 3; ++ u32 dd, fgx, bgx; ++ u16 c = scr_readw(s); ++ ++ int fg_color, bg_color, transparent; ++ fg_color = attr_fgcol(fgshift, c); ++ bg_color = attr_bgcol(bgshift, c); ++ transparent = sd->splash_color == bg_color; ++ xpos = xpos * vc->vc_font.width + sd->splash_text_xo; ++ ypos = ypos * vc->vc_font.height + sd->splash_text_yo; ++ splashsrc = (u8 *)(info->splash_pic + ypos * info->splash_bytes + xpos * Bpp); ++ dst = (u8 *)(info->screen_base + ypos * info->fix.line_length + xpos * Bpp); ++ ++ fgx = ((u32 *)info->pseudo_palette)[fg_color]; ++ if (transparent && sd->splash_color == 15) { ++ if (fgx == 0xffea) ++ fgx = 0xfe4a; ++ else if (fgx == 0x57ea) ++ fgx = 0x0540; ++ else if (fgx == 0xffff) ++ fgx = 0x52aa; ++ } ++ bgx = ((u32 *)info->pseudo_palette)[bg_color]; ++ d = 0; ++ ++ while (count--) { ++ c = scr_readw(s++); ++ src = vc->vc_font.data + (c & charmask) * vc->vc_font.height * ((vc->vc_font.width + 7) >> 3); ++ ++ for (y = 0; y < vc->vc_font.height; y++) { ++ for (x = 0; x < vc->vc_font.width; x++) { ++ if ((x & 7) == 0) ++ d = *src++; ++ switch (info->var.bits_per_pixel) { ++ case 16: ++ if (d & 0x80) ++ dd = fgx; ++ else ++ dd = transparent ? *(u16 *)splashsrc : bgx; ++ fb_writew(dd, dst); ++ break; ++ case 24: ++ if (d & 0x80) ++ dd = fgx; ++ else ++ dd = transparent ? *(u32 *)splashsrc >> 8 : bgx; ++ fb_writeb(dd >> 16, dst); ++ fb_writew(dd & 0xFFFF, dst+1); ++ break; ++ case 32: ++ if (d & 0x80) ++ dd = fgx; ++ else ++ dd = transparent ? *(u32 *)splashsrc : bgx; ++ fb_writel(dd, dst); ++ break; ++ } ++ splashsrc += Bpp; ++ dst += Bpp; ++ d <<= 1; ++ } ++ dst += info->fix.line_length - vc->vc_font.width * Bpp; ++ splashsrc += info->splash_bytes - vc->vc_font.width * Bpp; ++ } ++ dst -= info->fix.line_length * vc->vc_font.height - vc->vc_font.width * Bpp; ++ splashsrc -= info->splash_bytes * vc->vc_font.height - vc->vc_font.width * Bpp; ++ } ++} ++ ++static void splash_renderc(struct splash_data *sd, struct fb_info *info, int fg_color, int bg_color, u8 *src, int ypos, int xpos, int height, int width) ++{ ++ int transparent = sd->splash_color == bg_color; ++ u32 dd, fgx, bgx; ++ u8 *dst, *splashsrc; ++ unsigned int d, x, y, Bpp = info->var.bits_per_pixel >> 3; ++ ++ splashsrc = (u8 *)(info->splash_pic + ypos * info->splash_bytes + xpos * Bpp); ++ dst = (u8 *)(info->screen_base + ypos * info->fix.line_length + xpos * Bpp); ++ fgx = ((u32 *)info->pseudo_palette)[fg_color]; ++ if (transparent && sd->splash_color == 15) { ++ if (fgx == 0xffea) ++ fgx = 0xfe4a; ++ else if (fgx == 0x57ea) ++ fgx = 0x0540; ++ else if (fgx == 0xffff) ++ fgx = 0x52aa; ++ } ++ bgx = ((u32 *)info->pseudo_palette)[bg_color]; ++ d = 0; ++ for (y = 0; y < height; y++) { ++ for (x = 0; x < width; x++) { ++ if ((x & 7) == 0) ++ d = *src++; ++ switch (info->var.bits_per_pixel) { ++ case 16: ++ if (d & 0x80) ++ dd = fgx; ++ else ++ dd = transparent ? *(u16 *)splashsrc : bgx; ++ fb_writew(dd, dst); ++ break; ++ case 24: ++ if (d & 0x80) ++ dd = fgx; ++ else ++ dd = transparent ? *(u32 *)splashsrc >> 8 : bgx; ++ fb_writeb(dd >> 16, dst); ++ fb_writew(dd & 0xFFFF, dst+1); ++ break; ++ case 32: ++ if (d & 0x80) ++ dd = fgx; ++ else ++ dd = transparent ? *(u32 *)splashsrc : bgx; ++ fb_writel(dd, dst); ++ break; ++ } ++ splashsrc += Bpp; ++ dst += Bpp; ++ d <<= 1; ++ } ++ dst += info->fix.line_length - width * Bpp; ++ splashsrc += info->splash_bytes - width * Bpp; ++ } ++} ++ ++void splash_putc(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, ++ int c, int ypos, int xpos) ++{ ++ unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; ++ int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; ++ int fgshift = (vc->vc_hi_font_mask) ? 9 : 8; ++ u8 *src = vc->vc_font.data + (c & charmask) * vc->vc_font.height * ((vc->vc_font.width + 7) >> 3); ++ xpos = xpos * vc->vc_font.width + sd->splash_text_xo; ++ ypos = ypos * vc->vc_font.height + sd->splash_text_yo; ++ splash_renderc(sd, info, attr_fgcol(fgshift, c), attr_bgcol(bgshift, c), src, ypos, xpos, vc->vc_font.height, vc->vc_font.width); ++} ++ ++void splashcopy(u8 *dst, u8 *src, int height, int width, int dstbytes, int srcbytes, int depth) ++{ ++ int i; ++ ++ while (height-- > 0) { ++ u32 *p = (u32 *)dst; ++ u32 *q = (u32 *)src; ++ u8 *r, *s; ++ for (i=0; i < (depth>>3)*width/4; i++) ++ fb_writel(*q++,p++); ++ r = (u8 *)p; ++ s = (u8 *)q; ++ for (i=0; i < (depth>>3)*(width&3); i++) ++ fb_writeb(*s++,r++); ++ dst += dstbytes; ++ src += srcbytes; ++ } ++} ++ ++static void splashset(u8 *dst, int height, int width, int dstbytes, u32 bgx) { ++ int i; ++ ++ bgx |= bgx << 16; ++ while (height-- > 0) { ++ u32 *p = (u32 *)dst; ++ for (i=0; i < width/4; i++) { ++ fb_writel(bgx,p++); ++ fb_writel(bgx,p++); ++ } ++ if (width & 2) ++ fb_writel(bgx,p++); ++ if (width & 1) ++ fb_writew(bgx,(u16*)p); ++ dst += dstbytes; ++ } ++} ++ ++static void splashfill(struct fb_info *info, int sy, int sx, int height, int width) { ++ splashcopy((u8 *)(info->screen_base + sy * info->fix.line_length + sx * (info->var.bits_per_pixel>>3)), (u8 *)(info->splash_pic + sy * info->splash_bytes + sx * (info->var.bits_per_pixel>>3)), height, width, info->fix.line_length, info->splash_bytes, info->var.bits_per_pixel); ++} ++ ++void splash_clear(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int sy, ++ int sx, int height, int width) ++{ ++ int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; ++ int bg_color = attr_bgcol_ec(bgshift, vc, info); ++ int transparent = sd->splash_color == bg_color; ++ u32 bgx; ++ u8 *dst; ++ ++ sy = sy * vc->vc_font.height + sd->splash_text_yo; ++ sx = sx * vc->vc_font.width + sd->splash_text_xo; ++ height *= vc->vc_font.height; ++ width *= vc->vc_font.width; ++ if (transparent) { ++ splashfill(info, sy, sx, height, width); ++ return; ++ } ++ dst = (u8 *)(info->screen_base + sy * info->fix.line_length + sx * (info->var.bits_per_pixel>>3)); ++ bgx = ((u32 *)info->pseudo_palette)[bg_color]; ++ splashset(dst, height, width, info->fix.line_length, bgx); ++} ++ ++void splash_bmove(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int sy, ++ int sx, int dy, int dx, int height, int width) ++{ ++ struct fb_copyarea area; ++ ++ area.sx = sx * vc->vc_font.width; ++ area.sy = sy * vc->vc_font.height; ++ area.dx = dx * vc->vc_font.width; ++ area.dy = dy * vc->vc_font.height; ++ area.sx += sd->splash_text_xo; ++ area.sy += sd->splash_text_yo; ++ area.dx += sd->splash_text_xo; ++ area.dy += sd->splash_text_yo; ++ area.height = height * vc->vc_font.height; ++ area.width = width * vc->vc_font.width; ++ ++ info->fbops->fb_copyarea(info, &area); ++} ++ ++void splash_clear_margins(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, ++ int bottom_only) ++{ ++ unsigned int tw = vc->vc_cols*vc->vc_font.width; ++ unsigned int th = vc->vc_rows*vc->vc_font.height; ++ ++ if (!bottom_only) { ++ /* top margin */ ++ splashfill(info, 0, 0, sd->splash_text_yo, info->var.xres); ++ /* left margin */ ++ splashfill(info, sd->splash_text_yo, 0, th, sd->splash_text_xo); ++ /* right margin */ ++ splashfill(info, sd->splash_text_yo, sd->splash_text_xo + tw, th, info->var.xres - sd->splash_text_xo - tw); ++ ++ } ++ splashfill(info, sd->splash_text_yo + th, 0, info->var.yres - sd->splash_text_yo - th, info->var.xres); ++} ++ ++void splash_cursor(struct splash_data *sd, struct fb_info *info, struct fb_cursor *cursor) ++{ ++ int i; ++ unsigned int dsize, s_pitch; ++ ++ if (cursor->set & FB_CUR_SETSIZE) { ++ info->cursor.image.height = cursor->image.height; ++ info->cursor.image.width = cursor->image.width; ++ } ++ if (cursor->set & FB_CUR_SETPOS) { ++ info->cursor.image.dx = cursor->image.dx; ++ info->cursor.image.dy = cursor->image.dy; ++ } ++ if (cursor->set & FB_CUR_SETHOT) ++ info->cursor.hot = cursor->hot; ++ if (cursor->set & FB_CUR_SETCMAP) { ++ if (cursor->image.depth == 1) { ++ info->cursor.image.bg_color = cursor->image.bg_color; ++ info->cursor.image.fg_color = cursor->image.fg_color; ++ } else if (cursor->image.cmap.len) { ++ fb_copy_cmap(&cursor->image.cmap, &info->cursor.image.cmap); ++ } ++ info->cursor.image.depth = cursor->image.depth; ++ } ++ s_pitch = (info->cursor.image.width + 7) >> 3; ++ dsize = s_pitch * cursor->image.height; ++ if (info->cursor.enable) { ++ switch (info->cursor.rop) { ++ case ROP_XOR: ++ for (i = 0; i < dsize; i++) ++ info->fb_cursordata[i] = cursor->image.data[i] ^ info->cursor.mask[i]; ++ break; ++ case ROP_COPY: ++ default: ++ for (i = 0; i < dsize; i++) ++ info->fb_cursordata[i] = cursor->image.data[i] & info->cursor.mask[i]; ++ break; ++ } ++ } else if (info->fb_cursordata != cursor->image.data) ++ memcpy(info->fb_cursordata, cursor->image.data, dsize); ++ info->cursor.image.data = info->fb_cursordata; ++ splash_renderc(sd, info, info->cursor.image.fg_color, info->cursor.image.bg_color, (u8 *)info->fb_cursordata, info->cursor.image.dy + sd->splash_text_yo, info->cursor.image.dx + sd->splash_text_xo, info->cursor.image.height, info->cursor.image.width); ++} ++ ++void splash_bmove_redraw(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int y, int sx, int dx, int width) ++{ ++ unsigned short *d = (unsigned short *) (vc->vc_origin + vc->vc_size_row * y + dx * (info->var.bits_per_pixel>>3)); ++ unsigned short *s = d + (dx - sx); ++ unsigned short *start = d; ++ unsigned short *ls = d; ++ unsigned short *le = d + width; ++ unsigned short c; ++ int x = dx; ++ unsigned short attr = 1; ++ ++ do { ++ c = scr_readw(d); ++ if (attr != (c & 0xff00)) { ++ attr = c & 0xff00; ++ if (d > start) { ++ splash_putcs(sd, vc, info, start, d - start, y, x); ++ x += d - start; ++ start = d; ++ } ++ } ++ if (s >= ls && s < le && c == scr_readw(s)) { ++ if (d > start) { ++ splash_putcs(sd, vc, info, start, d - start, y, x); ++ x += d - start + 1; ++ start = d + 1; ++ } else { ++ x++; ++ start++; ++ } ++ } ++ s++; ++ d++; ++ } while (d < le); ++ if (d > start) ++ splash_putcs(sd, vc, info, start, d - start, y, x); ++} ++ ++void splash_blank(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int blank) ++{ ++ if (blank) { ++ if (info->silent_screen_base) ++ splashset((u8 *)info->silent_screen_base, info->var.yres, info->var.xres, info->fix.line_length, 0); ++ splashset((u8 *)info->screen_base, info->var.yres, info->var.xres, info->fix.line_length, 0); ++ } else { ++ if (info->silent_screen_base) ++ splash_prepare(vc, info); ++ splash_clear_margins(vc->vc_splash_data, vc, info, 0); ++ /* no longer needed, done in fbcon_blank */ ++ /* update_screen(vc->vc_num); */ ++ } ++} ++ +diff -Naur linux-2.6.30-rc3.orig/drivers/video/console/bitblit.c linux-2.6.30-rc3/drivers/video/console/bitblit.c +--- linux-2.6.30-rc3.orig/drivers/video/console/bitblit.c 2009-04-25 12:42:01.000000000 +0200 ++++ linux-2.6.30-rc3/drivers/video/console/bitblit.c 2009-04-25 12:44:31.000000000 +0200 +@@ -17,6 +17,9 @@ + #include + #include + #include "fbcon.h" ++#ifdef CONFIG_BOOTSPLASH ++#include "../bootsplash/bootsplash.h" ++#endif + + /* + * Accelerated handlers. +@@ -47,6 +50,13 @@ + { + struct fb_copyarea area; + ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) { ++ splash_bmove(info->splash_data, vc, info, ++ sy, sx, dy, dx, height, width); ++ return; ++ } ++#endif + area.sx = sx * vc->vc_font.width; + area.sy = sy * vc->vc_font.height; + area.dx = dx * vc->vc_font.width; +@@ -63,6 +73,13 @@ + int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; + struct fb_fillrect region; + ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) { ++ splash_clear(info->splash_data, vc, info, ++ sy, sx, height, width); ++ return; ++ } ++#endif + region.color = attr_bgcol_ec(bgshift, vc, info); + region.dx = sx * vc->vc_font.width; + region.dy = sy * vc->vc_font.height; +@@ -160,6 +177,13 @@ + image.height = vc->vc_font.height; + image.depth = 1; + ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) { ++ splash_putcs(info->splash_data, vc, info, s, count, yy, xx); ++ return; ++ } ++#endif ++ + if (attribute) { + buf = kmalloc(cellsize, GFP_KERNEL); + if (!buf) +@@ -213,6 +237,13 @@ + unsigned int bs = info->var.yres - bh; + struct fb_fillrect region; + ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) { ++ splash_clear_margins(info->splash_data, vc, info, bottom_only); ++ return; ++ } ++#endif ++ + region.color = attr_bgcol_ec(bgshift, vc, info); + region.rop = ROP_COPY; + +@@ -357,6 +388,10 @@ + switch (mode) { + case CM_ERASE: + ops->cursor_state.enable = 0; ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) ++ splash_cursor(info->splash_data, info, &cursor); ++#endif + break; + case CM_DRAW: + case CM_MOVE: +@@ -379,6 +414,14 @@ + cursor.image.depth = 1; + cursor.rop = ROP_XOR; + ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) { ++ splash_cursor(info->splash_data, info, &cursor); ++ ops->cursor_reset = 0; ++ return; ++ } ++#endif ++ + if (info->fbops->fb_cursor) + err = info->fbops->fb_cursor(info, &cursor); + +diff -Naur linux-2.6.30-rc3.orig/drivers/video/console/fbcon.c linux-2.6.30-rc3/drivers/video/console/fbcon.c +--- linux-2.6.30-rc3.orig/drivers/video/console/fbcon.c 2009-04-25 12:42:01.000000000 +0200 ++++ linux-2.6.30-rc3/drivers/video/console/fbcon.c 2009-04-25 12:44:31.000000000 +0200 +@@ -81,6 +81,10 @@ + + #include "fbcon.h" + ++#ifdef CONFIG_BOOTSPLASH ++#include "../bootsplash/bootsplash.h" ++#endif ++ + #ifdef FBCONDEBUG + # define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args) + #else +@@ -94,8 +98,7 @@ + }; + + static struct display fb_display[MAX_NR_CONSOLES]; +- +-static signed char con2fb_map[MAX_NR_CONSOLES]; ++signed char con2fb_map[MAX_NR_CONSOLES]; + static signed char con2fb_map_boot[MAX_NR_CONSOLES]; + + static int logo_lines; +@@ -384,6 +387,14 @@ + return; + } + ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) { ++ splash_cursor(info->splash_data, info, &info->cursor); ++ release_console_sem(); ++ return; ++ } ++#endif ++ + p = &fb_display[vc->vc_num]; + c = scr_readw((u16 *) vc->vc_pos); + mode = (!ops->cursor_flash || ops->cursor_state.enable) ? +@@ -536,6 +547,10 @@ + for (i = first_fb_vc; i <= last_fb_vc; i++) + con2fb_map[i] = info_idx; + ++#ifdef CONFIG_BOOTSPLASH ++ splash_init(); ++#endif ++ + err = take_over_console(&fb_con, first_fb_vc, last_fb_vc, + fbcon_is_default); + +@@ -1005,7 +1020,11 @@ + struct vc_data **default_mode = vc->vc_display_fg; + struct vc_data *svc = *default_mode; + struct display *t, *p = &fb_display[vc->vc_num]; ++#ifdef CONFIG_BOOTSPLASH ++ int logo = 0, new_rows, new_cols, rows, cols, charcnt = 256; ++#else + int logo = 1, new_rows, new_cols, rows, cols, charcnt = 256; ++#endif + int cap; + + if (info_idx == -1 || info == NULL) +@@ -1082,6 +1101,16 @@ + new_rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres); + new_cols /= vc->vc_font.width; + new_rows /= vc->vc_font.height; ++ ++#ifdef CONFIG_BOOTSPLASH ++ if (vc->vc_splash_data && vc->vc_splash_data->splash_state) { ++ new_cols = vc->vc_splash_data->splash_text_wi / vc->vc_font.width; ++ new_rows = vc->vc_splash_data->splash_text_he / vc->vc_font.height; ++ logo = 0; ++ con_remap_def_color(vc, vc->vc_splash_data->splash_color << 4 | vc->vc_splash_data->splash_fg_color); ++ } ++#endif ++ + vc_resize(vc, new_cols, new_rows); + + /* +@@ -1235,6 +1264,12 @@ + struct display *p = &fb_display[vc->vc_num]; + struct fbcon_ops *ops = info->fbcon_par; + ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) { ++ splash_putcs(info->splash_data, vc, info, s, count, ypos, xpos); ++ return; ++ } ++#endif + if (!fbcon_is_inactive(vc, info)) + ops->putcs(vc, info, s, count, real_y(p, ypos), xpos, + get_color(vc, info, scr_readw(s), 1), +@@ -1283,6 +1318,14 @@ + y = 0; + } + ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) { ++ splash_cursor(info->splash_data, info, &info->cursor); ++ vbl_cursor_cnt = CURSOR_DRAW_DELAY; ++ return; ++ } ++#endif ++ + ops->cursor(vc, info, mode, y, get_color(vc, info, c, 1), + get_color(vc, info, c, 0)); + vbl_cursor_cnt = CURSOR_DRAW_DELAY; +@@ -1777,6 +1820,10 @@ + fbcon_softback_note(vc, t, count); + if (logo_shown >= 0) + goto redraw_up; ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) ++ goto redraw_up; ++#endif + switch (p->scrollmode) { + case SCROLL_MOVE: + fbcon_redraw_blit(vc, info, p, t, b - t - count, +@@ -1866,6 +1913,10 @@ + case SM_DOWN: + if (count > vc->vc_rows) /* Maximum realistic size */ + count = vc->vc_rows; ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) ++ goto redraw_down; ++#endif + if (logo_shown >= 0) + goto redraw_down; + switch (p->scrollmode) { +@@ -2016,6 +2067,14 @@ + } + return; + } ++ ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data && sy == dy && height == 1) { ++ /* must use slower redraw bmove to keep background pic intact */ ++ splash_bmove_redraw(info->splash_data, vc, info, sy, sx, dx, width); ++ return; ++ } ++#endif + ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx, + height, width); + } +@@ -2124,6 +2183,10 @@ + info = registered_fb[con2fb_map[vc->vc_num]]; + ops = info->fbcon_par; + ++#ifdef CONFIG_BOOTSPLASH ++ splash_prepare(vc, info); ++#endif ++ + if (softback_top) { + if (softback_lines) + fbcon_set_origin(vc); +@@ -2251,6 +2314,12 @@ + { + struct fb_event event; + ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) { ++ splash_blank(info->splash_data, vc, info, blank); ++ return; ++ } ++#endif + if (blank) { + unsigned short charmask = vc->vc_hi_font_mask ? + 0x1ff : 0xff; +@@ -2453,10 +2522,19 @@ + if (resize) { + int cols, rows; + ++ u32 xres = info->var.xres, yres = info->var.yres; + cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres); + rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres); + cols /= w; + rows /= h; ++ ++#ifdef CONFIG_BOOTSPLASH ++ if (info->splash_data) { ++ xres = info->splash_data->splash_text_wi; ++ yres = info->splash_data->splash_text_he; ++ } ++#endif ++ + vc_resize(vc, cols, rows); + if (CON_IS_VISIBLE(vc) && softback_buf) + fbcon_update_softback(vc); +diff -Naur linux-2.6.30-rc3.orig/drivers/video/console/fbcon.h linux-2.6.30-rc3/drivers/video/console/fbcon.h +--- linux-2.6.30-rc3.orig/drivers/video/console/fbcon.h 2009-04-25 12:42:01.000000000 +0200 ++++ linux-2.6.30-rc3/drivers/video/console/fbcon.h 2009-04-25 12:44:23.000000000 +0200 +@@ -25,6 +25,34 @@ + * low-level frame buffer device + */ + ++#ifdef CONFIG_BOOTSPLASH ++struct splash_data { ++ int splash_state; /* show splash? */ ++ int splash_color; /* transparent color */ ++ int splash_fg_color; /* foreground color */ ++ int splash_width; /* width of image */ ++ int splash_height; /* height of image */ ++ int splash_text_xo; /* text area origin */ ++ int splash_text_yo; ++ int splash_text_wi; /* text area size */ ++ int splash_text_he; ++ int splash_showtext; /* silent/verbose mode */ ++ int splash_boxcount; ++ int splash_percent; ++ int splash_overpaintok; /* is it ok to overpaint boxes */ ++ int splash_palcnt; ++ char *oldscreen_base; /* pointer to top of virtual screen */ ++ unsigned char *splash_boxes; ++ unsigned char *splash_jpeg; /* jpeg */ ++ unsigned char *splash_palette; /* palette for 8-bit */ ++ ++ int splash_dosilent; /* show silent jpeg */ ++ unsigned char *splash_silentjpeg; ++ unsigned char *splash_sboxes; ++ int splash_sboxcount; ++}; ++#endif ++ + struct display { + /* Filled in by the low-level console driver */ + const u_char *fontdata; +diff -Naur linux-2.6.30-rc3.orig/drivers/video/Kconfig linux-2.6.30-rc3/drivers/video/Kconfig +--- linux-2.6.30-rc3.orig/drivers/video/Kconfig 2009-04-25 12:42:01.000000000 +0200 ++++ linux-2.6.30-rc3/drivers/video/Kconfig 2009-04-25 12:44:23.000000000 +0200 +@@ -2160,4 +2160,8 @@ + source "drivers/video/logo/Kconfig" + endif + ++if FB ++ source "drivers/video/bootsplash/Kconfig" ++endif ++ + endmenu +diff -Naur linux-2.6.30-rc3.orig/drivers/video/Makefile linux-2.6.30-rc3/drivers/video/Makefile +--- linux-2.6.30-rc3.orig/drivers/video/Makefile 2009-04-25 12:42:01.000000000 +0200 ++++ linux-2.6.30-rc3/drivers/video/Makefile 2009-04-25 12:44:23.000000000 +0200 +@@ -14,6 +14,7 @@ + obj-$(CONFIG_VT) += console/ + obj-$(CONFIG_LOGO) += logo/ + obj-y += backlight/ display/ ++obj-$(CONFIG_BOOTSPLASH) += bootsplash/ + + obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o + obj-$(CONFIG_FB_CFB_COPYAREA) += cfbcopyarea.o +diff -Naur linux-2.6.30-rc3.orig/drivers/video/vesafb.c linux-2.6.30-rc3/drivers/video/vesafb.c +--- linux-2.6.30-rc3.orig/drivers/video/vesafb.c 2009-04-25 12:42:01.000000000 +0200 ++++ linux-2.6.30-rc3/drivers/video/vesafb.c 2009-04-25 12:44:23.000000000 +0200 +@@ -174,7 +174,10 @@ + return err; + } + +-static struct fb_ops vesafb_ops = { ++#ifndef CONFIG_BOOTSPLASH ++static ++#endif ++struct fb_ops vesafb_ops = { + .owner = THIS_MODULE, + .fb_setcolreg = vesafb_setcolreg, + .fb_pan_display = vesafb_pan_display, +@@ -258,6 +261,11 @@ + * option to simply use size_total as that + * wastes plenty of kernel address space. */ + size_remap = size_vmode * 2; ++ ++#ifdef CONFIG_BOOTSPLASH ++ size_remap *= 2; /* some more for the images */ ++#endif ++ + if (vram_remap) + size_remap = vram_remap * 1024 * 1024; + if (size_remap < size_vmode) +diff -Naur linux-2.6.30-rc3.orig/include/linux/console_struct.h linux-2.6.30-rc3/include/linux/console_struct.h +--- linux-2.6.30-rc3.orig/include/linux/console_struct.h 2009-04-25 12:42:04.000000000 +0200 ++++ linux-2.6.30-rc3/include/linux/console_struct.h 2009-04-25 12:44:23.000000000 +0200 +@@ -106,6 +106,11 @@ + struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */ + unsigned long vc_uni_pagedir; + unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */ ++ ++#ifdef CONFIG_BOOTSPLASH ++ struct splash_data *vc_splash_data; ++#endif ++ + /* additional information is in vt_kern.h */ + }; + +diff -Naur linux-2.6.30-rc3.orig/include/linux/fb.h linux-2.6.30-rc3/include/linux/fb.h +--- linux-2.6.30-rc3.orig/include/linux/fb.h 2009-04-25 12:42:04.000000000 +0200 ++++ linux-2.6.30-rc3/include/linux/fb.h 2009-04-25 12:44:31.000000000 +0200 +@@ -817,6 +817,7 @@ + struct fb_var_screeninfo var; /* Current var */ + struct fb_fix_screeninfo fix; /* Current fix */ + struct fb_monspecs monspecs; /* Current Monitor specs */ ++ struct fb_cursor cursor; /* Current cursor */ + struct work_struct queue; /* Framebuffer event queue */ + struct fb_pixmap pixmap; /* Image hardware mapper */ + struct fb_pixmap sprite; /* Cursor hardware mapper */ +@@ -855,6 +856,14 @@ + void *fbcon_par; /* fbcon use-only private area */ + /* From here on everything is device dependent */ + void *par; ++#ifdef CONFIG_BOOTSPLASH ++ struct splash_data *splash_data; ++ unsigned char *splash_pic; ++ int splash_pic_size; ++ int splash_bytes; ++ char *silent_screen_base; /* real screen base */ ++ char fb_cursordata[64]; ++#endif + }; + + #ifdef MODULE +diff -Naur linux-2.6.30-rc3.orig/kernel/panic.c linux-2.6.30-rc3/kernel/panic.c +--- linux-2.6.30-rc3.orig/kernel/panic.c 2009-04-25 12:42:06.000000000 +0200 ++++ linux-2.6.30-rc3/kernel/panic.c 2009-04-25 13:21:33.000000000 +0200 +@@ -100,6 +100,12 @@ + */ + printk(KERN_EMERG "Rebooting in %d seconds..", panic_timeout); + ++#ifdef CONFIG_BOOTSPLASH ++ { ++ extern int splash_verbose(void); ++ (void)splash_verbose(); ++ } ++#endif + for (i = 0; i < panic_timeout*1000; ) { + touch_nmi_watchdog(); + i += panic_blink(i); diff --git a/packages/linux/patches/98_toshsb0500.diff b/packages/linux/patches/98_toshsb0500.diff deleted file mode 100644 index e4ed832460..0000000000 --- a/packages/linux/patches/98_toshsb0500.diff +++ /dev/null @@ -1,86 +0,0 @@ -diff -Naur linux-2.6.29-rc3.orig/sound/usb/usbmixer.c linux-2.6.29-rc3/sound/usb/usbmixer.c ---- linux-2.6.29-rc3.orig/sound/usb/usbmixer.c 2009-01-31 18:44:42.000000000 +0100 -+++ linux-2.6.29-rc3/sound/usb/usbmixer.c 2009-01-31 18:52:44.000000000 +0100 -@@ -66,6 +66,7 @@ - { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */ - { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */ - { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */ -+ { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */ - }; - - struct usb_mixer_interface { -@@ -1706,7 +1707,8 @@ - break; - /* live24ext: 4 = line-in jack */ - case 3: /* hp-out jack (may actuate Mute) */ -- if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040)) -+ if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || -+ mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) - snd_usb_mixer_notify_id(mixer, mixer->rc_cfg->mute_mixer_id); - break; - default: -@@ -1957,7 +1959,8 @@ - - for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_controls); ++i) { - if (i > 1 && /* Live24ext has 2 LEDs only */ -- mixer->chip->usb_id == USB_ID(0x041e, 0x3040)) -+ (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || -+ mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) - break; - err = snd_ctl_add(mixer->chip->card, - snd_ctl_new1(&snd_audigy2nx_controls[i], mixer)); -@@ -1994,7 +1997,8 @@ - snd_iprintf(buffer, "%s jacks\n\n", mixer->chip->card->shortname); - if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020)) - jacks = jacks_audigy2nx; -- else if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040)) -+ else if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || -+ mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) - jacks = jacks_live24ext; - else - return; -@@ -2044,7 +2048,8 @@ - goto _error; - - if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020) || -- mixer->chip->usb_id == USB_ID(0x041e, 0x3040)) { -+ mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || -+ mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) { - struct snd_info_entry *entry; - - if ((err = snd_audigy2nx_controls_create(mixer)) < 0) -diff -Naur linux-2.6.29-rc3.orig/sound/usb/usbmixer_maps.c linux-2.6.29-rc3/sound/usb/usbmixer_maps.c ---- linux-2.6.29-rc3.orig/sound/usb/usbmixer_maps.c 2009-01-31 18:44:42.000000000 +0100 -+++ linux-2.6.29-rc3/sound/usb/usbmixer_maps.c 2009-01-31 18:53:29.000000000 +0100 -@@ -284,6 +284,11 @@ - .id = USB_ID(0x041e, 0x3040), - .map = live24ext_map, - }, -+ { -+ .id = USB_ID(0x041e, 0x3048), -+ .map = audigy2nx_map, -+ .selector_map = audigy2nx_selectors, -+ }, - { - /* Hercules DJ Console (Windows Edition) */ - .id = USB_ID(0x06f8, 0xb000), -diff -Naur linux-2.6.29-rc3.orig/sound/usb/usbquirks.h linux-2.6.29-rc3/sound/usb/usbquirks.h ---- linux-2.6.29-rc3.orig/sound/usb/usbquirks.h 2009-01-31 18:44:42.000000000 +0100 -+++ linux-2.6.29-rc3/sound/usb/usbquirks.h 2009-01-31 18:54:49.000000000 +0100 -@@ -39,6 +39,16 @@ - .idProduct = prod, \ - .bInterfaceClass = USB_CLASS_VENDOR_SPEC - -+/* Creative/Toshiba Multimedia Center SB-0500 */ -+{ -+ USB_DEVICE(0x041e, 0x3048), -+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { -+ .vendor_name = "Toshiba", -+ .product_name = "SB-0500", -+ .ifnum = QUIRK_NO_INTERFACE -+ } -+}, -+ - /* Creative/E-Mu devices */ - { - USB_DEVICE(0x041e, 0x3010), diff --git a/packages/linux/url b/packages/linux/url index d42e466956..dc2718ca3b 100644 --- a/packages/linux/url +++ b/packages/linux/url @@ -1 +1 @@ -http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.1.tar.bz2 \ No newline at end of file +http://eu.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.30-rc3.tar.bz2 diff --git a/packages/linux/url.old b/packages/linux/url.old new file mode 100644 index 0000000000..d42e466956 --- /dev/null +++ b/packages/linux/url.old @@ -0,0 +1 @@ +http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/xproto/build b/packages/x11/proto/xproto/build index 50eb7b7c5b..45c7bf3517 100755 --- a/packages/x11/proto/xproto/build +++ b/packages/x11/proto/xproto/build @@ -8,7 +8,6 @@ cd $BUILD/$1* ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ - --sysconfdir=/etc \ make