summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-02-21 23:34:33 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-02-21 23:34:33 +0100
commitcd945e49e76927a4c2924523458ceebfc2f859d6 (patch)
tree522e6d2becd283d0adf9fb63366bd8725a466275
parent3f5ed16b700efcfbc6d3eb0cc54bc63b3aa75ea5 (diff)
rename ext2-cf target rootfs to ext2-block
- add a foxg20 adkinstaller (not working yet) - rename ext2-cf target rootfs to ext2-block
-rw-r--r--mk/rootfs.mk7
-rw-r--r--package/adkinstall/Makefile11
-rw-r--r--package/adkinstall/src/adkinstall.foxg2051
-rw-r--r--target/Config.in8
-rw-r--r--target/alix1c/Makefile2
-rw-r--r--target/alix2d/Makefile4
-rw-r--r--target/alix2d13/Makefile2
-rw-r--r--target/foxg20/Makefile10
-rw-r--r--target/linux/config/Config.in.debug2
-rw-r--r--target/linux/config/Config.in.fs2
-rw-r--r--target/linux/config/Config.in.multimedia2
-rw-r--r--target/rb532/Makefile2
-rw-r--r--target/wrap/Makefile2
13 files changed, 86 insertions, 19 deletions
diff --git a/mk/rootfs.mk b/mk/rootfs.mk
index 1099a7fac..d0775b2ee 100644
--- a/mk/rootfs.mk
+++ b/mk/rootfs.mk
@@ -12,8 +12,11 @@ ifeq ($(ADK_LINUX_MIPS_RB532),y)
ROOTFS:= root=/dev/sda2
endif
-$(eval $(call rootfs_template,ext2-cf,EXT2_CF,$(ROOTFS)))
-$(eval $(call rootfs_template,ext2-mmc,EXT2_MMC))
+ifeq ($(ADK_LINUX_ARM_FOXBOARD),y)
+ROOTFS:= root=/dev/mmcblk0p2
+endif
+
+$(eval $(call rootfs_template,ext2-block,EXT2_BLOCK,$(ROOTFS)))
$(eval $(call rootfs_template,archive,ARCHIVE))
$(eval $(call rootfs_template,initramfs,INITRAMFS))
$(eval $(call rootfs_template,initramfs-piggyback,INITRAMFS_PIGGYBACK))
diff --git a/package/adkinstall/Makefile b/package/adkinstall/Makefile
index f8ada2ebe..5a1823cc3 100644
--- a/package/adkinstall/Makefile
+++ b/package/adkinstall/Makefile
@@ -5,12 +5,12 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= adkinstall
PKG_VERSION:= 1.0
-PKG_RELEASE:= 3
-PKG_DESCR:= installer for compact flash or nand/mtd devices
+PKG_RELEASE:= 4
+PKG_DESCR:= installer for cf, mmc, sd or mtd devices
PKG_SECTION:= base
-PKG_DEPENDS:= parted sfdisk
+PKG_DEPENDS:= parted sfdisk e2fsprogs
-PKG_TARGET_DEPENDS:= alix wrap rb532
+PKG_TARGET_DEPENDS:= alix wrap rb532 foxg20
WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION}
NO_DISTFILES:= 1
@@ -31,6 +31,9 @@ do-install:
ifeq ($(ADK_LINUX_MIPS_RB532),y)
${INSTALL_BIN} ./src/adkinstall.rb532 \
$(IDIR_ADKINSTALL)/sbin/adkinstall
+else ifeq ($(ADK_LINUX_ARM_FOXBOARD),y)
+ ${INSTALL_BIN} ./src/adkinstall.foxg20 \
+ $(IDIR_ADKINSTALL)/sbin/adkinstall
else
${INSTALL_BIN} ./src/adkinstall $(IDIR_ADKINSTALL)/sbin
endif
diff --git a/package/adkinstall/src/adkinstall.foxg20 b/package/adkinstall/src/adkinstall.foxg20
new file mode 100644
index 000000000..fec746ef0
--- /dev/null
+++ b/package/adkinstall/src/adkinstall.foxg20
@@ -0,0 +1,51 @@
+#!/bin/sh
+# installs a rootfs tar archive from OpenADK onto a micro SD card
+# special script for foxboard netus aka foxg20
+
+if [ -z $1 ];then
+ printf "Please give your root tar archive as first parameter\n"
+ exit 1
+fi
+if [ -z $2 ];then
+ printf "Please give your kernel as second parameter\n"
+ exit 1
+fi
+
+printf "Creating partition scheme\n"
+parted -s /dev/mmcblk0 mklabel msdos
+sleep 2
+maxsize=$(env LC_ALL=C parted /dev/mmcblk0 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
+rootsize=$(($maxsize-2))
+parted -s /dev/mmcblk0 unit cyl mkpartfs primary fat32 0 5
+parted -s /dev/mmcblk0 unit cyl mkpart primary ext2 5 $rootsize
+parted -s /dev/mmcblk0 unit cyl mkpart primary fat32 $rootsize $maxsize
+parted -s /dev/mmcblk0 set 1 boot on
+sfdisk --change-id /dev/mmcblk0 3 88 >/dev/null 2>&1
+sleep 2
+sync
+printf "Installing kernel\n"
+mount -t vfat /dev/mmcblk0p1 /mnt
+cp $2 /mnt/uImage
+sync
+umount /mnt
+mke2fs /dev/mmcblk0p2
+mount -t ext2 /dev/mmcblk0p2 /mnt
+
+printf "Extracting install archive\n"
+tar -C /mnt -xzpf $1
+if [ $? -ne 0 ];then
+ printf "Extracting of install archive failed"
+ exit 1
+fi
+
+chmod 1777 /mnt/tmp
+chmod 4755 /mnt/bin/busybox
+sync
+umount /mnt
+if [ $? -ne 0 ];then
+ printf "Unmounting filesystem failed"
+ exit 1
+else
+ printf "Successfully installed.\n"
+ exit 0
+fi
diff --git a/target/Config.in b/target/Config.in
index 8361234a2..c3ea51f5a 100644
--- a/target/Config.in
+++ b/target/Config.in
@@ -866,8 +866,8 @@ config ADK_TARGET_ROOTFS_NFSROOT
help
Root filesystem mounted via NFS. (DHCP)
-config ADK_TARGET_ROOTFS_EXT2_CF
- bool "read-write filesystem for compact flash (ext2)"
+config ADK_TARGET_ROOTFS_EXT2_BLOCK
+ bool "read-write filesystem for block devices with ext2"
depends on \
ADK_LINUX_X86_ALIX1C || \
ADK_LINUX_X86_ALIX2D || \
@@ -878,8 +878,8 @@ config ADK_TARGET_ROOTFS_EXT2_CF
select ADK_KERNEL_EXT2_FS
select ADK_KERNEL_SCSI
help
- Use this option if you have a compact flash reader
- inside your hardware and want to boot from it.
+ Use this option if you have a compact flash or mmc/sd card
+ reader inside your hardware and want to boot from it.
config ADK_TARGET_ROOTFS_ARCHIVE
bool "Archive usable for different filesystems"
diff --git a/target/alix1c/Makefile b/target/alix1c/Makefile
index c17a1ef8a..da95587ed 100644
--- a/target/alix1c/Makefile
+++ b/target/alix1c/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/mk/image.mk
kernel-install:
cp $(LINUX_DIR)/arch/x86/boot/bzImage $(TARGET_DIR)/boot/vmlinuz-adk
-ifeq ($(FS),ext2-cf)
+ifeq ($(FS),ext2-block)
imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
@echo
@echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
diff --git a/target/alix2d/Makefile b/target/alix2d/Makefile
index 404cc5bbd..932c81109 100644
--- a/target/alix2d/Makefile
+++ b/target/alix2d/Makefile
@@ -8,9 +8,9 @@ include $(TOPDIR)/mk/kernel-build.mk
include $(TOPDIR)/mk/image.mk
kernel-install:
- cp $(LINUX_DIR)/arch/x86/boot/bzImage $(TARGET_DIR)/boot/vmlinuz-adk
+ @cp $(LINUX_DIR)/arch/x86/boot/bzImage $(TARGET_DIR)/boot/vmlinuz-adk
-ifeq ($(FS),ext2-cf)
+ifeq ($(FS),ext2-block)
imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
@echo
@echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
diff --git a/target/alix2d13/Makefile b/target/alix2d13/Makefile
index c17a1ef8a..da95587ed 100644
--- a/target/alix2d13/Makefile
+++ b/target/alix2d13/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/mk/image.mk
kernel-install:
cp $(LINUX_DIR)/arch/x86/boot/bzImage $(TARGET_DIR)/boot/vmlinuz-adk
-ifeq ($(FS),ext2-cf)
+ifeq ($(FS),ext2-block)
imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
@echo
@echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
diff --git a/target/foxg20/Makefile b/target/foxg20/Makefile
index 1d07f9db6..804236f9b 100644
--- a/target/foxg20/Makefile
+++ b/target/foxg20/Makefile
@@ -20,3 +20,13 @@ imageinstall: ${BIN_DIR}/${ROOTFSUSERTARBALL}
@echo 'After that type bootm to load the kernel'
@echo 'Login as user root with password linux123 via ssh or console'
endif
+
+ifeq ($(FS),ext2-block)
+imageinstall: $(BIN_DIR)/$(ROOTFSUSERTARBALL)
+ @echo
+ @echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel'
+ @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSUSERTARBALL)"
+ @echo "Boot the board via network and use adkinstall."
+ @echo "If you just want to update, use adkupdate."
+ @echo 'Login as user root with password linux123 via ssh or console.'
+endif
diff --git a/target/linux/config/Config.in.debug b/target/linux/config/Config.in.debug
index 9c876e205..57927f3ec 100644
--- a/target/linux/config/Config.in.debug
+++ b/target/linux/config/Config.in.debug
@@ -41,7 +41,7 @@ config ADK_KERNEL_DEBUG_WITH_KGDB
boolean
prompt "Enable remote kernel debugging using KGDB"
depends on ADK_TARGET_ROOTFS_NFSROOT || \
- ADK_TARGET_ROOTFS_EXT2_CF || \
+ ADK_TARGET_ROOTFS_EXT2_BLOCK || \
ADK_TARGET_ROOTFS_EXT2
default n
select ADK_KERNEL_DEBUG_KERNEL
diff --git a/target/linux/config/Config.in.fs b/target/linux/config/Config.in.fs
index dc417c146..1378c3528 100644
--- a/target/linux/config/Config.in.fs
+++ b/target/linux/config/Config.in.fs
@@ -30,7 +30,7 @@ config ADK_KPACKAGE_KMOD_EXT2_FS
prompt "kmod-fs-ext2...................... EXT2 filesystem support"
tristate
default n
- depends on !ADK_TARGET_ROOTFS_EXT2_CF
+ depends on !ADK_TARGET_ROOTFS_EXT2_BLOCK
depends on !ADK_KERNEL_EXT2_FS
help
Ext2 is a standard Linux file system for hard disks.
diff --git a/target/linux/config/Config.in.multimedia b/target/linux/config/Config.in.multimedia
index cb9de47af..01e837dca 100644
--- a/target/linux/config/Config.in.multimedia
+++ b/target/linux/config/Config.in.multimedia
@@ -44,7 +44,7 @@ config ADK_KPACKAGE_KMOD_SND
Basic ALSA sound support.
config ADK_KPACKAGE_KMOD_SND_OSSEMUL
- prompt "kmod-sound-alsa-oss-emul........ ALSA OSS Emulation"
+ prompt "kmod-sound-alsa-oss-emul....... ALSA OSS Emulation"
depends on ADK_KPACKAGE_KMOD_SND
select ADK_KERNEL_SND_MIXER_OSS
select ADK_KERNEL_SND_PCM_OSS
diff --git a/target/rb532/Makefile b/target/rb532/Makefile
index b0c50dc5d..8568bb135 100644
--- a/target/rb532/Makefile
+++ b/target/rb532/Makefile
@@ -15,7 +15,7 @@ kernel-install:
@cp $(TARGET_DIR)/boot/kernel \
$(BUILD_DIR)/${ADK_TARGET}-${FS}-kernel
-ifeq ($(FS),ext2-cf)
+ifeq ($(FS),ext2-block)
imageinstall: $(BIN_DIR)/$(ROOTFSUSERTARBALL)
@cp $(BUILD_DIR)/${ADK_TARGET}-${FS}-kernel \
$(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
diff --git a/target/wrap/Makefile b/target/wrap/Makefile
index 825b55175..e0cb894da 100644
--- a/target/wrap/Makefile
+++ b/target/wrap/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/mk/image.mk
kernel-install:
@cp $(LINUX_DIR)/arch/x86/boot/bzImage $(TARGET_DIR)/boot/vmlinuz-adk
-ifeq ($(FS),ext2-cf)
+ifeq ($(FS),ext2-block)
imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
@echo
@echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"