summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/cfgfs/Config.in9
-rw-r--r--package/cfinstall/Config.in1
-rw-r--r--package/cfinstall/src/cfinstall58
-rw-r--r--package/grub-bin/Config.in6
4 files changed, 70 insertions, 4 deletions
diff --git a/package/cfgfs/Config.in b/package/cfgfs/Config.in
index e3412a458..c187a5eb1 100644
--- a/package/cfgfs/Config.in
+++ b/package/cfgfs/Config.in
@@ -4,8 +4,13 @@ config ADK_PACKAGE_CFGFS
select BUSYBOX_COMM
select BUSYBOX_MD5SUM
select BUSYBOX_FEATURE_SORT_BIG
- depends on ADK_LINUX_X86_ALIX1C || ADK_LINUX_CRIS_FOXBOARD || \
+ depends on \
+ ADK_LINUX_X86_ALIX1C || \
+ ADK_LINUX_X86_WRAP || \
+ ADK_LINUX_CRIS_FOXBOARD || \
ADK_LINUX_MIPS_RB532
default y
help
- Adopted from FreeWRT fwcf
+ Compressed config filesystem for /etc.
+ This makes smooth updates of your embedded device possible.
+ (Adopted from FreeWRT fwcf)
diff --git a/package/cfinstall/Config.in b/package/cfinstall/Config.in
index 2777b80e6..18a73344b 100644
--- a/package/cfinstall/Config.in
+++ b/package/cfinstall/Config.in
@@ -3,7 +3,6 @@ config ADK_PACKAGE_CFINSTALL
tristate
select ADK_PACKAGE_SFDISK
select ADK_PACKAGE_PARTED
- select ADK_PACKAGE_GRUB_BIN
depends on \
ADK_LINUX_X86_ALIX1C || \
ADK_LINUX_X86_WRAP || \
diff --git a/package/cfinstall/src/cfinstall b/package/cfinstall/src/cfinstall
index 1ff908963..ffb5fd6c8 100644
--- a/package/cfinstall/src/cfinstall
+++ b/package/cfinstall/src/cfinstall
@@ -1,4 +1,62 @@
#!/bin/sh
# installs a rootfs tar archive from OpenADK onto a Compact Flash disk
+if [ -z $1 ];then
+ printf "Please give your root tar archive as parameter\n"
+ exit 1
+fi
+# create empty partition table
+parted -s /dev/sda mklabel msdos
+sleep 2
+maxsize=$(env LC_ALL=C parted /dev/sda -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
+rootsize=$(($maxsize-2))
+parted -s /dev/sda unit cyl mkpartfs primary ext2 0 $rootsize
+parted -s /dev/sda unit cyl mkpart primary fat32 $rootsize $maxsize
+parted -s /dev/sda set 1 boot on
+sfdisk --change-id /dev/sda 2 88
+if [ $? -eq 0 ];then
+ printf "Successfully created partition ${rootpart}\n"
+else
+ printf "Partition creation failed, Exiting.\n"
+ exit 1
+fi
+mount -t ext2 /dev/sda1 /mnt
+printf "Extracting install archive\n"
+tar -C /mnt -xzpf $1
+chmod 1777 /mnt/tmp
+chmod 4755 /mnt/bin/busybox
+
+speed=$(awk -F \, '/console=ttyS0/ { print $2 }' /proc/cmdline|sed -e "s/ .*$//")
+
+printf "Install bootloader\n"
+mkdir -p /mnt/boot/grub
+mount -o bind /dev /mnt/dev
+chroot /mnt mount -t proc /proc /proc
+chroot /mnt mount -t sysfs /sys /sys
+cat << EOF > /mnt/boot/grub/grub.cfg
+set default=0
+set timeout=5
+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 root=/dev/sda1 ro init=/init panic=10
+}
+EOF
+chroot /mnt grub-install /dev/sda
+umount /mnt/proc
+umount /mnt/sys
+umount /mnt/dev
+
+printf "Creating device nodes\n"
+mknod -m 666 /mnt/dev/null c 1 3
+mknod -m 622 /mnt/dev/console c 5 1
+mknod -m 666 /mnt/dev/tty c 5 0
+
+umount /mnt
+printf "Successfully installed.\n"
+exit 0
diff --git a/package/grub-bin/Config.in b/package/grub-bin/Config.in
index 31042cf60..20fc07408 100644
--- a/package/grub-bin/Config.in
+++ b/package/grub-bin/Config.in
@@ -1,9 +1,13 @@
config ADK_PACKAGE_GRUB_BIN
prompt "grub-bin............................. GRUB 2 bootloader (binary)"
tristate
- depends on ADK_LINUX_X86_64_SHUTTLE || ADK_LINUX_X86_ALIX1C
+ depends on \
+ ADK_LINUX_X86_64_SHUTTLE || \
+ ADK_LINUX_X86_WRAP || \
+ ADK_LINUX_X86_ALIX1C
select BUSYBOX_FEATURE_STAT_FORMAT
default y if ADK_LINUX_X86_64_SHUTTLE
default y if ADK_LINUX_X86_ALIX1C
+ default y if ADK_LINUX_X86_WRAP
help