diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-11-17 19:13:37 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-11-17 19:13:37 +0100 |
commit | 53d22bb88e82c1d8dd19db418ca12c664e341ba4 (patch) | |
tree | e1f35a46f56d1c8c0f8e8bc63b43dc8da63e4d2a | |
parent | b47f6f464d38ad18716e4b270231812b123dcf67 (diff) | |
parent | c6fa9771807b4438e35df864de9a01fb768d33d2 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
76 files changed, 530 insertions, 3802 deletions
@@ -143,37 +143,6 @@ prompt "Hardware profile (autodetection on OpenADK systems)" config ADK_HARDWARE_NOPROFILE bool "no profile" -config ADK_HARDWARE_IBMX40 - bool "IBM X40 laptop" - select ADK_TARGET_WITH_USB - select ADK_TARGET_WITH_VGA - select ADK_TARGET_WITH_INPUT - select ADK_TARGET_WITH_RTC - select ADK_TARGET_WITH_HDD - select ADK_KERNEL_NLS - select ADK_KERNEL_EXT2_FS - select ADK_KERNEL_SCSI - select ADK_KERNEL_ATA - select ADK_KERNEL_BLK_DEV_SD - select ADK_KERNEL_INPUT_KEYBOARD - select ADK_KERNEL_NETDEVICES - select ADK_KERNEL_NET_PCI - select ADK_KERNEL_NET_ETHERNET - select ADK_KERNEL_MII - select ADK_KERNEL_SWAP - select ADK_KPACKAGE_KMOD_MAC80211 - select ADK_KPACKAGE_KMOD_ATH5K - select ADK_KERNEL_MAC80211_LEDS - select ADK_KERNEL_ATH_COMMON - select ADK_KPACKAGE_KMOD_SND - select ADK_KPACKAGE_KMOD_SND_OSSEMUL - select ADK_PACKAGE_KMOD_USB_CONTROLLER - select ADK_KPACKAGE_KMOD_USB - select ADK_KPACKAGE_KMOD_USB_EHCI_HCD - select ADK_KPACKAGE_KMOD_USB_OHCI_HCD - help - Hardware profile for IBM X40 laptop's. - config ADK_HARDWARE_YEELONG bool "Yeelong laptop" select ADK_TARGET_WITH_USB diff --git a/mk/rootfs.mk b/mk/rootfs.mk index 3093f532f..e5c4c7089 100644 --- a/mk/rootfs.mk +++ b/mk/rootfs.mk @@ -8,6 +8,8 @@ FS_CMDLINE:=$(3) endif endef +ADK_TARGET_ROOTFS_USB_DEVICE:=$(strip $(subst ",, $(ADK_TARGET_ROOTFS_USB_DEVICE))) + ifeq ($(ADK_LINUX_MIPS_RB532),y) ROOTFS:= root=/dev/sda2 MTDDEV:= root=/dev/mtdblock1 @@ -22,7 +24,7 @@ ROOTFS:= root=/dev/mmcblk0p2 rootwait endif $(eval $(call rootfs_template,ext2-block,EXT2_BLOCK,$(ROOTFS))) -$(eval $(call rootfs_template,usb,USB,root=/dev/sdb1 rootdelay=3)) +$(eval $(call rootfs_template,usb,USB,root=$(ADK_TARGET_ROOTFS_USB_DEVICE) rootdelay=3)) $(eval $(call rootfs_template,archive,ARCHIVE)) $(eval $(call rootfs_template,initramfs,INITRAMFS)) $(eval $(call rootfs_template,initramfs-piggyback,INITRAMFS_PIGGYBACK)) diff --git a/package/MesaLib/Makefile b/package/MesaLib/Makefile index 474821f88..12692b86b 100644 --- a/package/MesaLib/Makefile +++ b/package/MesaLib/Makefile @@ -22,7 +22,7 @@ PKGSD_GLXGEARS:= Nice little OpenGL demo application PKGSC_GLXGEARS:= x11/apps PKG_HOST_DEPENDS:= !cygwin !darwin -PKG_TARGET_DEPENDS:= ibmx40 lemote +PKG_TARGET_DEPENDS:= x86 lemote WRKDIST= ${WRKDIR}/Mesa-${PKG_VERSION} diff --git a/package/dillo/Makefile b/package/dillo/Makefile index 853f3e4ce..f98b709ba 100644 --- a/package/dillo/Makefile +++ b/package/dillo/Makefile @@ -16,7 +16,7 @@ PKG_URL:= http://www.dillo.org/ PKG_SITES:= http://www.dillo.org/download/ PKG_HOST_DEPENDS:= !cygwin -PKG_TARGET_DEPENDS:= ibmx40 lemote +PKG_TARGET_DEPENDS:= x86 lemote DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 diff --git a/package/firefox/Makefile b/package/firefox/Makefile index 163d740f6..98ac0c41e 100644 --- a/package/firefox/Makefile +++ b/package/firefox/Makefile @@ -17,7 +17,7 @@ PKG_BUILDDEP+= nspr nss jpeg libXt fontconfig PKG_URL:= http://www.mozilla.org/ PKG_SITES:= http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${PKG_VERSION}/source/ -PKG_TARGET_DEPENDS:= alix x86_qemu x86_64_qemu shuttle ibmx40 lemote +PKG_TARGET_DEPENDS:= alix x86 x86_64 lemote PKG_HOST_DEPENDS:= !netbsd !freebsd !openbsd !cygwin !darwin DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.source.tar.bz2 diff --git a/package/fltk/Makefile b/package/fltk/Makefile index d35ca0e97..37a426eee 100644 --- a/package/fltk/Makefile +++ b/package/fltk/Makefile @@ -14,7 +14,7 @@ PKG_URL:= http://www.fltk.org/ PKG_SITES:= http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/fltk/snapshots/ PKG_SUBPKGS:= LIBFLTK -PKG_TARGET_DEPENDS:= ibmx40 lemote +PKG_TARGET_DEPENDS:= x86 lemote PKG_HOST_DEPENDS:= !cygwin !darwin DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.x-r7513.tar.bz2 diff --git a/package/freeglut/Makefile b/package/freeglut/Makefile index b4ba58a16..bfd13aa2c 100644 --- a/package/freeglut/Makefile +++ b/package/freeglut/Makefile @@ -14,7 +14,7 @@ PKG_URL:= http://freeglut.sourceforge.net/ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=freeglut/} PKG_HOST_DEPENDS:= !cygwin !darwin -PKG_TARGET_DEPENDS:= ibmx40 lemote +PKG_TARGET_DEPENDS:= x86 lemote include $(TOPDIR)/mk/package.mk diff --git a/package/libvirt/Makefile b/package/libvirt/Makefile index 32682603f..92f74109e 100644 --- a/package/libvirt/Makefile +++ b/package/libvirt/Makefile @@ -15,7 +15,7 @@ PKG_URL:= http://www.libvirt.org/ PKG_SITES:= ftp://libvirt.org/libvirt/ PKG_HOST_DEPENDS:= !freebsd !netbsd !openbsd -PKG_TARGET_DEPENDS:= shuttle +PKG_TARGET_DEPENDS:= x86 x86_64 include ${TOPDIR}/mk/package.mk diff --git a/package/mplayer/Makefile b/package/mplayer/Makefile index 62b3cdbc1..3da200fa0 100644 --- a/package/mplayer/Makefile +++ b/package/mplayer/Makefile @@ -18,7 +18,7 @@ PKG_URL:= http://www.mplayerhq.hu/ PKG_SITES:= http://openadk.org/distfiles/ PKG_HOST_DEPENDS:= !darwin -PKG_TARGET_DEPENDS:= alix x86_qemu x86_64_qemu shuttle lemote +PKG_TARGET_DEPENDS:= alix x86 x86_64 lemote PKG_FLAVOURS:= WITH_DIRECTFB PKGFD_WITH_DIRECTFB:= enable DirectFB video output support diff --git a/package/xf86-video-intel/Makefile b/package/xf86-video-intel/Makefile index 50e4d30db..fc634f708 100644 --- a/package/xf86-video-intel/Makefile +++ b/package/xf86-video-intel/Makefile @@ -13,8 +13,6 @@ PKG_DEPENDS:= xorg-server libdrm PKG_BUILDDEP:= xorg-server libdrm PKG_SITES:= http://www.x.org/releases/X11R7.5/src/driver/ -PKG_TARGET_DEPENDS:= ibmx40 - include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XF86_VIDEO_INTEL,${PKG_NAME},$(PKG_VERSION)-$(PKG_RELEASE),${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) diff --git a/scripts/install-chroot.sh b/scripts/install-chroot.sh new file mode 100755 index 000000000..cab2e6d7f --- /dev/null +++ b/scripts/install-chroot.sh @@ -0,0 +1,242 @@ +#!/usr/bin/env bash +if [ $(id -u) -ne 0 ];then + printf "Installation is only possible as root\n" + exit 1 +fi + +printf "Checking if sfdisk is installed" +sfdisk=$(which sfdisk) + +if [ ! -z $sfdisk -a -x $sfdisk ];then + printf "...okay\n" +else + printf "...failed\n" + exit 1 +fi + +printf "Checking if parted is installed" +parted=$(which parted) + +if [ ! -z $parted -a -x $parted ];then + printf "...okay\n" +else + printf "...failed\n" + exit 1 +fi + +printf "Checking if mke2fs is installed" +mke2fs=$(which mke2fs) + +if [ ! -z $mke2fs -a -x $mke2fs ];then + printf "...okay\n" +else + printf "...failed\n" + exit 1 +fi + +printf "Checking if tune2fs is installed" +tune2fs=$(which tune2fs) + +if [ ! -z $tune2fs -a -x $tune2fs ];then + printf "...okay\n" +else + printf "...failed\n" + exit 1 +fi + +cfgfs=1 +rb532=0 +while getopts "nr" option +do + case $option in + n) + cfgfs=0 + ;; + r) + rb532=1 + ;; + *) + printf "Option not recognized\n" + exit 1 + ;; + esac +done +shift $(($OPTIND - 1)) + + +if [ -z $1 ];then + printf "Please give your compact flash or USB device as first parameter\n" + exit 1 +else + if [ -z $2 ];then + printf "Please give your install tar archive as second parameter\n" + exit 2 + fi + if [ -f $2 ];then + printf "Installing $2 on $1\n" + else + printf "$2 is not a file, Exiting\n" + exit 1 + fi + if [ $rb532 -eq 1 ];then + if [ -z $3 ];then + printf "Please give the kernel as third parameter\n" + exit 2 + fi + if [ -f $3 ];then + printf "Installing $3 on $1\n" + else + printf "$3 is not a file, Exiting\n" + exit 1 + fi + fi + if [ -b $1 ];then + printf "Using $1 as CF/USB disk for installation\n" + printf "This will destroy all data on $1, are you sure?\n" + printf "Type "y" to continue\n" + read y + if [ "$y" = "y" ];then + $sfdisk -l $1 2>&1 |grep 'No medium' + if [ $? -eq 0 ];then + exit 1 + else + printf "Starting with installation\n" + fi + else + printf "Exiting.\n" + exit 1 + fi + else + printf "Sorry $1 is not a block device\n" + exit 1 + fi +fi + + +if [ $(mount | grep $1| wc -l) -ne 0 ];then + printf "Block device $1 is in use, please umount first.\n" + exit 1 +fi + + +if [ $($sfdisk -l $1 2>/dev/null|grep Empty|wc -l) -ne 4 ];then + printf "Partitions already exist, should I wipe them?\n" + printf "Type y to continue\n" + read y + if [ $y = "y" ];then + printf "Wiping existing partitions\n" + dd if=/dev/zero of=$1 bs=512 count=1 >/dev/null 2>&1 + else + printf "Exiting.\n" + exit 1 + fi +fi + +case $2 in + wrap*) + speed=38400 + ;; + *) + speed=115200 + ;; +esac + +if [ $rb532 -ne 0 ];then + printf "Create partition and filesystem for rb532\n" + rootpart=${1}2 + $parted -s $1 mklabel msdos + sleep 2 + maxsize=$(env LC_ALL=C $parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//') + rootsize=$(($maxsize-2)) + + $parted -s $1 unit cyl mkpart primary ext2 0 1 + $parted -s $1 unit cyl mkpart primary ext2 1 $rootsize + $parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize + $parted -s $1 set 1 boot on + $sfdisk --change-id $1 1 27 + $sfdisk --change-id $1 3 88 + sleep 2 + $mke2fs ${1}2 + sync + dd if=$3 of=${1}1 bs=2048 + sync +else + rootpart=${1}1 + if [ $cfgfs -eq 0 ];then + printf "Create partition and filesystem without cfgfs\n" +$sfdisk $1 << EOF +,,L +; +; +; +y +EOF + $mke2fs ${rootpart} + else + printf "Create partition and filesystem with cfgfs\n" + $parted -s $1 mklabel msdos + sleep 2 + maxsize=$(env LC_ALL=C $parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//') + rootsize=$(($maxsize-2)) + + $parted -s $1 unit cyl mkpart primary ext2 0 $rootsize + $parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize + $parted -s $1 set 1 boot on + $sfdisk --change-id $1 2 88 + $mke2fs ${1}1 + fi +fi + +if [ $? -eq 0 ];then + printf "Successfully created partition ${rootpart}\n" +else + printf "Partition creation failed, Exiting.\n" + exit 1 +fi + +sleep 2 +$tune2fs -c 0 -i 0 -m 1 ${rootpart} >/dev/null +if [ $? -eq 0 ];then + printf "Successfully disabled filesystem checks on ${rootpart}\n" +else + printf "Disabling filesystem checks failed, Exiting.\n" + exit 1 +fi + +tmp=$(mktemp -d) +mount -t ext2 ${rootpart} $tmp +printf "Extracting install archive\n" +tar -C $tmp -xzpf $2 +printf "Fixing permissions\n" +chmod 1777 $tmp/tmp +chmod 4755 $tmp/bin/busybox + +if [ $rb532 -eq 0 ];then + printf "Installing GRUB bootloader\n" + mkdir -p $tmp/boot/grub + mount -o bind /dev $tmp/dev + chroot $tmp mount -t proc /proc /proc + chroot $tmp mount -t sysfs /sys /sys +cat << EOF > $tmp/boot/grub/grub.cfg +set default=0 +set timeout=1 +serial --unit=0 --speed=$speed +terminal_output serial +terminal_input serial + +menuentry "GNU/Linux (OpenADK)" { + insmod ext2 + set root=(hd0,1) + linux /boot/vmlinuz-adk ro init=/init console=ttyS0,$speed console=tty0 panic=10 +} +EOF + chroot $tmp grub-install $1 + umount $tmp/proc + umount $tmp/sys + umount $tmp/dev +fi + +umount $tmp + +printf "Successfully installed.\n" +exit 0 diff --git a/target/Config.in b/target/Config.in index a43456d49..66e6fd1b4 100644 --- a/target/Config.in +++ b/target/Config.in @@ -83,12 +83,6 @@ config ADK_ppc_toolchain config ADK_sparc_toolchain tristate -config ADK_x86_toolchain - tristate - -config ADK_x86_64_toolchain - tristate - config ADK_arm_qemu tristate @@ -125,27 +119,12 @@ config ADK_zaurus config ADK_foxg20 tristate -config ADK_ibmx40 - tristate - config ADK_foxboard tristate config ADK_lemote tristate -config ADK_x86_rescue - tristate - -config ADK_x86_64_rescue - tristate - -config ADK_mips_rescue - tristate - -config ADK_mipsel_rescue - tristate - config ADK_brcm tristate @@ -155,7 +134,7 @@ config ADK_ag241 config ADK_wag54g tristate -config ADK_shuttle +config ADK_x86_64 tristate config ADK_x86 @@ -166,14 +145,14 @@ config ADK_TARGET default "alix" if ADK_alix default "wrap" if ADK_wrap default "brcm" if ADK_brcm + default "x86" if ADK_x86 + default "x86_64" if ADK_x86_64 default "toolchain-arm" if ADK_arm_toolchain default "toolchain-armel" if ADK_armel_toolchain default "toolchain-mips" if ADK_mips_toolchain default "toolchain-mipsel" if ADK_mipsel_toolchain default "toolchain-ppc" if ADK_ppc_toolchain default "toolchain-sparc" if ADK_sparc_toolchain - default "toolchain-x86" if ADK_x86_toolchain - default "toolchain-x86_64" if ADK_x86_64_toolchain default "qemu-arm" if ADK_arm_qemu default "qemu-cris" if ADK_cris_qemu default "qemu-mips" if ADK_mips_qemu @@ -188,14 +167,8 @@ config ADK_TARGET default "rb4xx" if ADK_rb4xx default "zaurus" if ADK_arm default "lemote" if ADK_lemote - default "ibmx40" if ADK_ibmx40 default "wag54g" if ADK_wag54g default "ag241" if ADK_ag241 - default "rescue-x86" if ADK_x86_rescue - default "rescue-x86_64" if ADK_x86_64_rescue - default "rescue-mips" if ADK_mips_rescue - default "rescue-mipsel" if ADK_mipsel_rescue - default "shuttle" if ADK_shuttle # c library @@ -328,14 +301,6 @@ config ADK_LINUX_XSCALE_ZAURUS Support for Sharp Zaurus SL-C3200 (aka Terrier) Status: development -config ADK_LINUX_RESCUE - bool "Minimal Linux Rescuesystem" - select ADK_KERNEL_INPUT_KEYBOARD - select ADK_TARGET_WITH_INPUT - help - Rescuesystem with can be used to Boot from Disk or USB stick. - Status: development - config ADK_LINUX_QEMU bool "Qemu Emulator" |