From 5c105d9f3fd086aff195d3849dcf847d6b0bd927 Mon Sep 17 00:00:00 2001 From: blogic Date: Fri, 5 Oct 2012 10:12:53 +0000 Subject: branch Attitude Adjustment git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/x86/olpc/base-files/etc/X11/xorg.conf | 71 ++++++++++++ .../linux/x86/olpc/base-files/etc/config/network | 11 ++ .../base-files/lib/preinit/15_essential_fs_x86 | 9 ++ .../olpc/base-files/lib/preinit/45_failsafe_x86 | 14 +++ .../x86/olpc/base-files/lib/upgrade/platform.sh | 27 +++++ target/linux/x86/olpc/config-3.3 | 122 +++++++++++++++++++++ target/linux/x86/olpc/target.mk | 2 + 7 files changed, 256 insertions(+) create mode 100644 target/linux/x86/olpc/base-files/etc/X11/xorg.conf create mode 100644 target/linux/x86/olpc/base-files/etc/config/network create mode 100644 target/linux/x86/olpc/base-files/lib/preinit/15_essential_fs_x86 create mode 100644 target/linux/x86/olpc/base-files/lib/preinit/45_failsafe_x86 create mode 100644 target/linux/x86/olpc/base-files/lib/upgrade/platform.sh create mode 100644 target/linux/x86/olpc/config-3.3 create mode 100644 target/linux/x86/olpc/target.mk (limited to 'target/linux/x86/olpc') diff --git a/target/linux/x86/olpc/base-files/etc/X11/xorg.conf b/target/linux/x86/olpc/base-files/etc/X11/xorg.conf new file mode 100644 index 000000000..d98a8f87a --- /dev/null +++ b/target/linux/x86/olpc/base-files/etc/X11/xorg.conf @@ -0,0 +1,71 @@ +# xorg configuration + +Section "ServerLayout" + Identifier "Default Layout" + Screen 0 "Screen0" 0 0 + InputDevice "Mouse0" "CorePointer" + InputDevice "Keyboard0" "CoreKeyboard" +EndSection + +Section "Files" + FontPath "/usr/lib/X11/fonts/misc" +EndSection + +Section "Module" + Load "dbe" + Load "extmod" + Load "fbdevhw" +# Load "glx" + Load "record" + Load "freetype" + Load "type1" +EndSection + +Section "InputDevice" + Identifier "Keyboard0" + Driver "keyboard" + Option "XkbModel" "pc105" + Option "XkbLayout" "us" +EndSection + +Section "InputDevice" + Identifier "Mouse0" + Driver "mouse" + Option "Protocol" "PS/2" + Option "Device" "/dev/psaux" + Option "ZAxisMapping" "4 5" + Option "Emulate3Buttons" "yes" +EndSection + +Section "Monitor" + Identifier "Monitor0" + VendorName "Monitor Vendor" + ModelName "OWRT" + Option "dpms" +EndSection + +Section "Device" + Identifier "FBDev" + Driver "fbdev" + #Option "shadowfb" "off" + VideoRam 4096 +EndSection + +Section "Screen" + Identifier "Screen0" + Device "FBDev" + Monitor "Monitor0" + DefaultDepth 16 + + SubSection "Display" + Depth 16 + Modes "1200x900-75" + EndSubsection + +EndSection + +Section "DRI" + Group 0 + Mode 0666 +EndSection + diff --git a/target/linux/x86/olpc/base-files/etc/config/network b/target/linux/x86/olpc/base-files/etc/config/network new file mode 100644 index 000000000..faa8f0e78 --- /dev/null +++ b/target/linux/x86/olpc/base-files/etc/config/network @@ -0,0 +1,11 @@ +# Copyright (C) 2006 OpenWrt.org + +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + +config interface wlan + option ifname eth0 + option proto dhcp diff --git a/target/linux/x86/olpc/base-files/lib/preinit/15_essential_fs_x86 b/target/linux/x86/olpc/base-files/lib/preinit/15_essential_fs_x86 new file mode 100644 index 000000000..be342433d --- /dev/null +++ b/target/linux/x86/olpc/base-files/lib/preinit/15_essential_fs_x86 @@ -0,0 +1,9 @@ +#!/bin/sh +# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +do_mount_procfs() { + mount -t proc none /proc +} + + diff --git a/target/linux/x86/olpc/base-files/lib/preinit/45_failsafe_x86 b/target/linux/x86/olpc/base-files/lib/preinit/45_failsafe_x86 new file mode 100644 index 000000000..dd7330d5d --- /dev/null +++ b/target/linux/x86/olpc/base-files/lib/preinit/45_failsafe_x86 @@ -0,0 +1,14 @@ +#!/bin/sh +# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +failsafe_wait() { + FAILSAFE= + grep -q 'failsafe=' /proc/cmdline && FAILSAFE=true && export FAILSAFE + if [ "$FAILSAFE" != "true" ]; then + preinit_net_echo "Please press button now to enter failsafe" + echo -n "Press " + fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true && export FAILSAFE + fi +} + diff --git a/target/linux/x86/olpc/base-files/lib/upgrade/platform.sh b/target/linux/x86/olpc/base-files/lib/upgrade/platform.sh new file mode 100644 index 000000000..ffd0b93ab --- /dev/null +++ b/target/linux/x86/olpc/base-files/lib/upgrade/platform.sh @@ -0,0 +1,27 @@ +platform_check_image() { + [ "$ARGC" -gt 1 ] && return 1 + + case "$(get_magic_word "$1")" in + 48eb) return 0;; + *) + echo "Invalid image type" + return 1 + ;; + esac +} + +platform_do_upgrade() { + get_image "$1" > /dev/hda + sync +} + +x86_prepare_ext2() { + # if we're running from ext2, we need to make sure that we have a mtd + # partition that points to the active rootfs partition. + # however this only matters if we actually need to preserve the config files + [ "$SAVE_CONFIG" -eq 1 ] && return 0 + grep rootfs /proc/mtd >/dev/null || { + echo /dev/hda2,65536,rootfs > /sys/module/block2mtd/parameters/block2mtd + } +} +append sysupgrade_pre_upgrade x86_prepare_ext2 diff --git a/target/linux/x86/olpc/config-3.3 b/target/linux/x86/olpc/config-3.3 new file mode 100644 index 000000000..41357e109 --- /dev/null +++ b/target/linux/x86/olpc/config-3.3 @@ -0,0 +1,122 @@ +# CONFIG_APM is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_GENERIC=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_BACKLIGHT_PROGEAR is not set +# CONFIG_BACKLIGHT_SAHARA is not set +CONFIG_BATTERY_OLPC=y +# CONFIG_BLK_DEV is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +CONFIG_CAN_PM_TRACE=y +CONFIG_CHR_DEV_SG=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_IDLE_GOV_MENU=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_EMBEDDED is not set +CONFIG_FB=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_GEODE=y +# CONFIG_FB_GEODE_GX is not set +# CONFIG_FB_GEODE_GX1 is not set +CONFIG_FB_GEODE_LX=y +# CONFIG_FB_OLPC_DCON is not set +# CONFIG_FB_SM7XX is not set +# CONFIG_FB_VESA is not set +# CONFIG_FB_WMT_GE_ROPS is not set +# CONFIG_FB_XGI is not set +# CONFIG_FIRMWARE_EDID is not set +CONFIG_FREEZER=y +CONFIG_GENERIC_GPIO=y +CONFIG_GPIOLIB=y +# CONFIG_HAMRADIO is not set +CONFIG_HIBERNATE_CALLBACKS=y +CONFIG_HIBERNATION=y +# CONFIG_HIGHMEM64G is not set +# CONFIG_KEXEC_JUMP is not set +CONFIG_LCD_CLASS_DEVICE=y +# CONFIG_LCD_PLATFORM is not set +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +# CONFIG_M486 is not set +# CONFIG_MATH_EMULATION is not set +CONFIG_MGEODE_LX=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_SDHCI=y +# CONFIG_MMC_SDHCI_PCI is not set +# CONFIG_MMC_SDHCI_PLTFM is not set +# CONFIG_MMC_TIFM_SD is not set +# CONFIG_MMC_WBSD is not set +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_OF_PARTS=y +# CONFIG_MTRR is not set +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_NLS=y +CONFIG_NO_HZ=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_DEVICE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_NET=y +CONFIG_OF_PCI=y +CONFIG_OF_PCI_IRQ=y +CONFIG_OF_PROMTREE=y +CONFIG_OLPC=y +CONFIG_OPROFILE=y +# CONFIG_OPROFILE_EVENT_MULTIPLEX is not set +# CONFIG_PARTITION_ADVANCED is not set +# CONFIG_PCI_GOANY is not set +CONFIG_PCI_GOOLPC=y +CONFIG_PCI_OLPC=y +CONFIG_PERF_COUNTERS=y +CONFIG_PM=y +# CONFIG_PM_ADVANCED_DEBUG is not set +CONFIG_PM_DEBUG=y +CONFIG_PM_SLEEP=y +CONFIG_PM_STD_PARTITION="" +# CONFIG_PM_TEST_SUSPEND is not set +# CONFIG_PM_TRACE_RTC is not set +# CONFIG_PREEMPT_NONE is not set +CONFIG_PREEMPT_VOLUNTARY=y +# CONFIG_PROC_DEVICETREE is not set +CONFIG_PROFILING=y +CONFIG_RD_LZO=y +CONFIG_RELAY=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_SCHEDSTATS=y +CONFIG_SCHED_DEBUG=y +# CONFIG_SCx200 is not set +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_TIMER_STATS=y +CONFIG_USB=y +CONFIG_USB_COMMON=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_UHCI_HCD=y +CONFIG_VGA_ARB=y +CONFIG_VGA_ARB_MAX_GPUS=16 +# CONFIG_WATCHDOG is not set +CONFIG_X86_CMOV=y +CONFIG_X86_DEBUGCTLMSR=y +CONFIG_X86_EXTENDED_PLATFORM=y +# CONFIG_X86_MCE is not set +# CONFIG_X86_RDC321X is not set +# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set +CONFIG_X86_TSC=y +CONFIG_X86_USE_3DNOW=y +CONFIG_X86_USE_PPRO_CHECKSUM=y +# CONFIG_X86_WANT_INTEL_MID is not set diff --git a/target/linux/x86/olpc/target.mk b/target/linux/x86/olpc/target.mk new file mode 100644 index 000000000..9ed2edc9e --- /dev/null +++ b/target/linux/x86/olpc/target.mk @@ -0,0 +1,2 @@ +BOARDNAME:=OLPC XO-1 +DEFAULT_PACKAGES += kmod-natsemi kmod-ne2k-pci kmod-libertas -- cgit v1.2.3