summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/gentooinstall/Makefile5
-rw-r--r--package/gentooinstall/src/gentooinstall66
-rw-r--r--target/config/Config.in.runtime2
-rw-r--r--target/linux/config/Config.in.block2
-rw-r--r--target/linux/config/Config.in.ethernet13
-rw-r--r--target/linux/config/Config.in.graphics1
-rw-r--r--target/linux/config/Config.in.input3
-rw-r--r--target/linux/config/Config.in.pm3
-rw-r--r--target/linux/config/Config.in.usb3
-rw-r--r--target/x86_64/kernel/lenovo-x2006
-rw-r--r--target/x86_64/systems/lenovo-x20020
11 files changed, 91 insertions, 33 deletions
diff --git a/package/gentooinstall/Makefile b/package/gentooinstall/Makefile
index 251e38a..0af6a19 100644
--- a/package/gentooinstall/Makefile
+++ b/package/gentooinstall/Makefile
@@ -9,7 +9,6 @@ PKG_RELEASE:= 1
PKG_DESCR:= gentoo disk installer
PKG_SECTION:= base/adk
PKG_DEPENDS:= mke2fs parted sfdisk dosfstools mksh
-PKG_DEPENDS+= grub grub-tools
PKG_KDEPENDS:= ext4-fs
NO_DISTFILES:= 1
@@ -22,8 +21,8 @@ CONFIG_STYLE:= manual
BUILD_STYLE:= manual
INSTALL_STYLE:= manual
-fwinstall-install:
+gentooinstall-install:
$(INSTALL_DIR) $(IDIR_GENTOOINSTALL)/usr/sbin
- $(INSTALL_BIN) $(WRKBUILD)/fwinstall $(IDIR_GENTOOINSTALL)/usr/sbin
+ $(INSTALL_BIN) $(WRKBUILD)/gentooinstall $(IDIR_GENTOOINSTALL)/usr/sbin
include ${ADK_TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/gentooinstall/src/gentooinstall b/package/gentooinstall/src/gentooinstall
index 1989b2a..0199df3 100644
--- a/package/gentooinstall/src/gentooinstall
+++ b/package/gentooinstall/src/gentooinstall
@@ -66,17 +66,10 @@ function create_label {
fi
}
-# get max size of disk in sectors
-function get_max_size {
- maxsize=$(env LC_ALL=C parted $1 -s unit s print |awk '/^Disk/ { print $3 }'|sed -e 's/s//')
- rootsize=$(($maxsize-$cfgfssize))
- print device has $maxsize sectors. using $rootsize for root.
-}
-
# create partition, with fstype start and end in sectors
function create_partition {
- print creating partition on $1
- parted -s $1 unit s mkpart primary $2 $3 $4 > /dev/null 2>&1
+ print creating partition on $1 with $2
+ parted -s $1 -- unit MiB mkpart primary $2 $3 $4 > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "creating primary partition failed!"
exit 1
@@ -130,55 +123,68 @@ function extract_archive {
function create_chroot_installer {
(
- emerge-websync
- emerge rsyslog
- rc-update add sshd default
- emerge grub:2
- print grub-mkconfig > /boot/grub/grub.cfg
- print Installing Grub into /dev/sda
- print grub-install /dev/sda
+ print emerge-webrsync
+ print emerge dhcpcd
+ print rc-update add sshd default
+ print emerge grub:2
) >/mnt/install
chmod 755 /mnt/install
}
+function create_chroot_grubinstaller {
+(
+ print 'grub-mkconfig > /boot/grub/grub.cfg'
+ print grub-install /dev/sda
+) >/mnt/installgrub
+ chmod 755 /mnt/installgrub
+}
+
function chroot_install {
print Installing Gentoo
+ cat /etc/resolv.conf > /mnt/etc/resolv.conf
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
- mkdir /mnt/dev/shm
mount -t tmpfs tmpfs /mnt/dev/shm
chroot /mnt /install
if [ $? -ne 0 ]; then
echo "Gentoo installation failed!"
+ umount /mnt/dev/shm
+ umount /mnt/{proc,dev,sys}
+ umount /mnt
+ exit 1
+ fi
+ printf "Now manually install a kernel"
+ chroot /mnt /bin/bash
+ printf "Now installang bootloader"
+ chroot /mnt /installgrub
+ if [ $? -ne 0 ]; then
+ echo "Gentoo installation failed!"
+ umount /mnt/dev/shm
+ umount /mnt/{proc,dev,sys}
+ umount /mnt
exit 1
fi
}
-function fix_perm {
- print fixing permissions
- chmod 1777 ${1}/tmp
-}
-
case $arch {
(x86|x86_64)
- get_max_size $device
create_label $device
- create_partition $device swap 0 $swapsize
- create_partition $device ext2 $(($swapsize+1)) $(($maxsize-1))
- set_boot_flag $device 1
- change_part_type $device 1 82
+ create_partition $device sw 2 2048
+ create_partition $device ext2 2049 -1
+ set_boot_flag $device 2
partprobe $device
sync
- create_filesystem $device $fs 1
+ create_filesystem $device $fs 2
[[ -x /sbin/mdev ]] && mdev -s
- mount_fs $device 1 $fs /mnt
+ mount_fs $device 2 $fs /mnt
extract_archive $archive /mnt
create_chroot_installer
chroot_install /mnt
print "/dev/sda2 / ext4 defaults 0 1" > /mnt/etc/fstab
print hostname=\"$hostname\" > /mnt/etc/conf.d/hostname
- fix_perm /mnt
+ chmod 1777 /mnt/tmp
+ sync
umount /mnt/dev/shm
umount /mnt/{proc,dev,sys}
umount /mnt
diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime
index a103f57..18ae170 100644
--- a/target/config/Config.in.runtime
+++ b/target/config/Config.in.runtime
@@ -195,6 +195,7 @@ source "target/config/Config.in.scripts"
config ADK_RUNTIME_TMPFS_SIZE
string "size of /tmp in memory (kB)"
default "32768" if ADK_TARGET_SYSTEM_IBM_X40
+ default "32768" if ADK_TARGET_SYSTEM_LENOVO_X200
default "32768" if ADK_TARGET_SYSTEM_SGI_O2
default "32768" if ADK_TARGET_SYSTEM_RASPBERRY_PI
default "32768" if ADK_TARGET_SYSTEM_RASPBERRY_PI2
@@ -331,6 +332,7 @@ config ADK_RUNTIME_GETTY_VGA
default y if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default y if ADK_TARGET_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_LENOVO_X200
default y if ADK_TARGET_SYSTEM_ARANYM_M68K
default y if ADK_TARGET_MODEL_PCENGINES_ALIX1C
default y if ADK_TARGET_VBOX
diff --git a/target/linux/config/Config.in.block b/target/linux/config/Config.in.block
index ed9937c..11dce14 100644
--- a/target/linux/config/Config.in.block
+++ b/target/linux/config/Config.in.block
@@ -230,10 +230,12 @@ config ADK_LINUX_KERNEL_SATA_AHCI
select ADK_LINUX_KERNEL_BLK_DEV_SD
depends on ADK_TARGET_SYSTEM_ASUS_P5BVM || \
ADK_TARGET_SYSTEM_PCENGINES_APU || \
+ ADK_TARGET_SYSTEM_LENOVO_X200 || \
ADK_TARGET_GENERIC || \
ADK_TARGET_VBOX
default y if ADK_TARGET_SYSTEM_PCENGINES_APU
default y if ADK_TARGET_SYSTEM_ASUS_P5BVM
+ default y if ADK_TARGET_SYSTEM_LENOVO_X200
default y if ADK_TARGET_VBOX
default n
help
diff --git a/target/linux/config/Config.in.ethernet b/target/linux/config/Config.in.ethernet
index 48b4d29..ed1f5d3 100644
--- a/target/linux/config/Config.in.ethernet
+++ b/target/linux/config/Config.in.ethernet
@@ -396,6 +396,19 @@ config ADK_LINUX_KERNEL_E1000
help
Intel(R) PRO/1000 gigabit ethernet driver
+config ADK_LINUX_KERNEL_E1000E
+ tristate "Intel(R) PRO/1000e Gigabit Ethernet driver"
+ select ADK_LINUX_KERNEL_NET_VENDOR_INTEL
+ select ADK_LINUX_KERNEL_NETDEV_1000
+ select ADK_LINUX_KERNEL_FIRMWARE_IN_KERNEL
+ depends on ADK_TARGET_WITH_PCI || \
+ ADK_TARGET_SYSTEM_LENOVO_X200 || \
+ ADK_TARGET_GENERIC
+ default y if ADK_TARGET_SYSTEM_LENOVO_X200
+ default n
+ help
+ Intel(R) PRO/1000e gigabit ethernet driver
+
config ADK_LINUX_KERNEL_SUNLANCE
tristate "AMD Sunlance Ethernet driver"
select ADK_LINUX_KERNEL_NET_VENDOR_AMD
diff --git a/target/linux/config/Config.in.graphics b/target/linux/config/Config.in.graphics
index b1fd339..737b66a 100644
--- a/target/linux/config/Config.in.graphics
+++ b/target/linux/config/Config.in.graphics
@@ -316,6 +316,7 @@ config ADK_LINUX_KERNEL_DRM_I915
select ADK_LINUX_KERNEL_DRM_KMS_HELPER
select ADK_LINUX_KERNEL_DRM_FBDEV_EMULATION
default y if ADK_TARGET_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_LENOVO_X200
default n
help
Support for Intel chipsets.
diff --git a/target/linux/config/Config.in.input b/target/linux/config/Config.in.input
index a03cd12..e11db26 100644
--- a/target/linux/config/Config.in.input
+++ b/target/linux/config/Config.in.input
@@ -34,6 +34,7 @@ config ADK_LINUX_KERNEL_INPUT
default y if ADK_TARGET_VBOX
default y if ADK_TARGET_SYSTEM_ARANYM_M68K
default y if ADK_TARGET_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_LENOVO_X200
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default y if ADK_TARGET_SYSTEM_SHARP_ZAURUS
default y if ADK_TARGET_SYSTEM_QEMU_ARM_SPITZ
@@ -85,6 +86,7 @@ config ADK_LINUX_KERNEL_INPUT_KEYBOARD
default y if ADK_TARGET_VBOX
default y if ADK_TARGET_SYSTEM_ARANYM_M68K
default y if ADK_TARGET_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_LENOVO_X200
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default y if ADK_TARGET_SYSTEM_SHARP_ZAURUS
default y if ADK_TARGET_SYSTEM_QEMU_ARM_SPITZ
@@ -97,6 +99,7 @@ config ADK_LINUX_KERNEL_INPUT_MOUSE
default y if ADK_TARGET_VBOX
default y if ADK_TARGET_SYSTEM_ARANYM_M68K
default y if ADK_TARGET_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_LENOVO_X200
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default y if ADK_TARGET_SYSTEM_SHARP_ZAURUS
default y if ADK_TARGET_SYSTEM_QEMU_ARM_SPITZ
diff --git a/target/linux/config/Config.in.pm b/target/linux/config/Config.in.pm
index 4586477..948508b 100644
--- a/target/linux/config/Config.in.pm
+++ b/target/linux/config/Config.in.pm
@@ -48,6 +48,7 @@ config ADK_HARDWARE_ACPI
select ADK_LINUX_KERNEL_ACPI_FAN
select ADK_LINUX_KERNEL_ACPI_DOCK
default y if ADK_TARGET_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_LENOVO_X200
default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX
default y if ADK_TARGET_SYSTEM_PCENGINES_APU
default y if ADK_TARGET_SYSTEM_GENERIC_X86
@@ -62,6 +63,7 @@ config ADK_LINUX_KERNEL_SUSPEND
select ADK_LINUX_KERNEL_PM
select ADK_LINUX_KERNEL_PM_RUNTIME
default y if ADK_TARGET_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_LENOVO_X200
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default n
help
@@ -74,6 +76,7 @@ config ADK_LINUX_KERNEL_HIBERNATION
select ADK_LINUX_KERNEL_SWAP
select BUSYBOX_SWAPONOFF
default y if ADK_TARGET_SYSTEM_IBM_X40
+ default y if ADK_TARGET_SYSTEM_LENOVO_X200
default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default n
help
diff --git a/target/linux/config/Config.in.usb b/target/linux/config/Config.in.usb
index 629cff0..25472a1 100644
--- a/target/linux/config/Config.in.usb
+++ b/target/linux/config/Config.in.usb
@@ -63,6 +63,7 @@ config ADK_LINUX_KERNEL_USB
default m if ADK_TARGET_SYSTEM_PCENGINES_APU
default m if ADK_TARGET_SYSTEM_PCENGINES_ALIX
default m if ADK_TARGET_SYSTEM_IBM_X40
+ default m if ADK_TARGET_SYSTEM_LENOVO_X200
default m if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default m if ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20
default m if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
@@ -112,6 +113,7 @@ config ADK_LINUX_KERNEL_USB_EHCI_HCD
default m if ADK_TARGET_SYSTEM_PCENGINES_APU
default m if ADK_TARGET_SYSTEM_PCENGINES_ALIX
default m if ADK_TARGET_SYSTEM_IBM_X40
+ default m if ADK_TARGET_SYSTEM_LENOVO_X200
default m if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default m if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
default y if ADK_TARGET_SYSTEM_KINETIS_K70
@@ -145,6 +147,7 @@ config ADK_LINUX_KERNEL_USB_UHCI_HCD
default m if ADK_TARGET_SYSTEM_PCENGINES_APU
default m if ADK_TARGET_SYSTEM_PCENGINES_ALIX
default m if ADK_TARGET_SYSTEM_IBM_X40
+ default m if ADK_TARGET_SYSTEM_LENOVO_X200
default m if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default n
help
diff --git a/target/x86_64/kernel/lenovo-x200 b/target/x86_64/kernel/lenovo-x200
new file mode 100644
index 0000000..ad080ab
--- /dev/null
+++ b/target/x86_64/kernel/lenovo-x200
@@ -0,0 +1,6 @@
+CONFIG_X86=y
+CONFIG_X86_64=y
+CONFIG_GENERIC_CPU=y
+CONFIG_PROCESSOR_SELECT=y
+CONFIG_CPU_SUP_INTEL=y
+CONFIG_CMDLINE_BOOL=y
diff --git a/target/x86_64/systems/lenovo-x200 b/target/x86_64/systems/lenovo-x200
new file mode 100644
index 0000000..6c58e68
--- /dev/null
+++ b/target/x86_64/systems/lenovo-x200
@@ -0,0 +1,20 @@
+config ADK_TARGET_SYSTEM_LENOVO_X200
+ bool "Lenovo X200"
+ select ADK_TARGET_CPU_X86_64_CORE2
+ select ADK_TARGET_KERNEL_BZIMAGE
+ select ADK_TARGET_KERNEL_WITH_COMPRESSION
+ select ADK_TARGET_WITH_VGA
+ select ADK_TARGET_WITH_PCI
+ select ADK_TARGET_WITH_MINIPCI
+ select ADK_TARGET_WITH_USB
+ select ADK_TARGET_WITH_USB_BOOT
+ select ADK_TARGET_WITH_ACPI
+ select ADK_TARGET_WITH_SATA
+ select ADK_TARGET_WITH_SMP
+ select ADK_TARGET_WITH_NET
+ select ADK_TARGET_WITH_NETDEVICE
+ select ADK_TARGET_WITH_BLOCK
+ select ADK_PACKAGE_GRUB
+ help
+ Support for Lenovo X200 subnotebook.
+