aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2016-10-08 20:52:51 +0100
committerSilvino Silva <silvino@bk.ru>2016-10-08 20:52:51 +0100
commitdff1f7550e50e94cac79bd56e80b0473988b715b (patch)
tree2a5ea60a7629987202fe67fb2b82340c9fe9b382
parentc03eec1ba16a93ae65e868da4ca5b144401174f4 (diff)
parent5d60e76fafc0fa76c8e9019459ecaeaf25d5b764 (diff)
downloaddoc-dff1f7550e50e94cac79bd56e80b0473988b715b.tar.gz
Merge branch 'r-0.2.4' into develop
-rw-r--r--core/install.html10
-rw-r--r--core/scripts/act-chroot.sh3
-rw-r--r--core/scripts/install.sh185
-rw-r--r--core/scripts/mkparted.sh9
-rw-r--r--core/scripts/setup-install.sh183
-rw-r--r--core/scripts/setup-target.sh35
-rw-r--r--dev/git.html204
-rw-r--r--dev/index.html15
-rw-r--r--index.html2
-rw-r--r--tools/qemu.html26
10 files changed, 381 insertions, 291 deletions
diff --git a/core/install.html b/core/install.html
index 194e245..f95910f 100644
--- a/core/install.html
+++ b/core/install.html
@@ -38,6 +38,10 @@
<a href="http://devil-detail.blogspot.pt/2013/07/install-grub2-on-gpt-disk-dedicated-partition.html">gpt partition table</a>.
</p>
+ <pre>
+ (parted) mklabel gpt
+ </pre>
+
<h3>/boot/efi</h3>
<p>EFI System Partition, ESP type EF00. Partition
@@ -57,7 +61,9 @@
<p>Boot partition. Partition with 1G provides
room for crux iso to boot directly from grub.</p>
- <pre>(parted) mkpart primary ext4 120MiB 1000MiB</pre>
+ <pre>
+ (parted) mkpart primary ext4 120MiB 1000MiB
+ </pre>
<pre>
(parted) align-check optimal 2
@@ -184,7 +190,7 @@
$ sudo mkfs.ext4 $BKL_PRT
</pre>
- <h2 id="step3">1.1.3. Prepare Target</h2>
+ <h2 id="step3">1.1.3. Prepare Install</h2>
<pre>
$ export CHROOT=/mnt
diff --git a/core/scripts/act-chroot.sh b/core/scripts/act-chroot.sh
index 587e35c..7f665f0 100644
--- a/core/scripts/act-chroot.sh
+++ b/core/scripts/act-chroot.sh
@@ -36,7 +36,6 @@ printf "1.1.3 mount point to chroot (/mnt):"
#read CHROOT
CHROOT="/mnt"
-
mount $BLK_ROOT $CHROOT
mount $BLK_BOOT $CHROOT/boot
@@ -44,7 +43,7 @@ mount $BLK_EFI $CHROOT/boot/efi
mount $BLK_VAR $CHROOT/var
mount $BLK_USR $CHROOT/usr
-#mount $BLK_PRT $CHROOT/usr/ports
+mount $BLK_PRT $CHROOT/usr/ports
mount $BLK_HOME $CHROOT/home
#mount -vt devpts devpts $CHROOT/dev/pts
diff --git a/core/scripts/install.sh b/core/scripts/install.sh
deleted file mode 100644
index 495b327..0000000
--- a/core/scripts/install.sh
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/bin/bash
-# Set Global Vars
-
-DIR=$(dirname "$PWD");
-DIR_PRT=$(dirname "$DIR")"/c9-ports";
-DIR_CONF=$DIR"/conf"
-
-printf "CHROOT="$CHROOT"\n";
-printf "DIR="$DIR"\n";
-printf "DIR_CONF="$DIR_CONF"\n";
-printf "DIR_PRT="$DIR_PRT"\n";
-read PAUSE
-
-printf "1.1.2 EFI block; (/dev/sda1):\n"
-#read BLK_EFI
-BLK_EFI="/dev/sda1"
-
-printf "1.1.2 boot block; (/dev/sda2):\n"
-#read BLK_BOOT
-BLK_BOOT="/dev/sda2"
-
-printf "1.1.2 root block; (/dev/sda3):\n"
-#read BLK_ROOT
-BLK_ROOT="/dev/sda3"
-#
-printf "1.1.2 var block; (/dev/sda4):\n"
-#read BLK_VAR
-BLK_VAR="/dev/sda4"
-#
-printf "1.1.2 usr block; (/dev/sda6):\n"
-#read BLK_USR
-BLK_USR="/dev/sda6"
-#
-printf "1.1.2 home block; (/dev/sda7):\n"
-#read BLK_HOME
-BLK_HOME="/dev/sda7"
-#
-printf "1.1.2 ports block; (/dev/sda8):\n"
-#read BLK_PRT
-BLK_PRT="/dev/sda8"
-
-printf "1.1.2 swap block; (/dev/sda9):\n"
-#read BLK_SWP
-BLK_SWP="/dev/sda9"
-
-printf "1.1.3 mount point to chroot (/mnt):\n"
-#read CHROOT
-CHROOT="/mnt"
-
-#manual_install() {
-
- echo "1.1.2 Creating File System on $BLK_EFI with fat32:"
- mkfs.fat -F 32 $BLK_EFI
- echo "1.1.2 Creating File System on $BLK_BOOT with ext4:"
- mkfs.ext4 $BLK_BOOT
- echo "1.1.2 Creating File System on $BLK_ROOT with ext4:"
- mkfs.ext4 $BLK_ROOT
- echo "1.1.2 Creating File System on $BLK_VAR with ext4:"
- mkfs.ext4 $BLK_VAR
- echo "1.1.2 Creating File System on $BLK_USR with ext4:"
- mkfs.ext4 $BLK_USR
- echo "1.1.2 Creating File System on $BLK_HOME with ext4:"
- mkfs.ext4 $BLK_HOME
-# echo "1.1.2 Creating File System on $BLK_PRT with ext4:"
-# mkfs.ext4 $BLK_PRT
- echo "1.1.2 Creating Swap File System on $BLK_SWP:"
- #mkswap $BLK_SWP
-
-#}
-
-
-#prepare_target(){
-
- printf "1.1.3 mount point to chroot (/mnt):\n"
- mount $BLK_ROOT $CHROOT
-
- mkdir -p $CHROOT/boot
- mkdir -p $CHROOT/var
- mkdir -p $CHROOT/usr
- mkdir -p $CHROOT/media
- mkdir -p $CHROOT/home
-
- mkdir -p $CHROOT/dev
- mkdir -p $CHROOT/tmp
- mkdir -p $CHROOT/proc
- mkdir -p $CHROOT/sys
-
- mount $BLK_BOOT $CHROOT/boot
- mkdir -p $CHROOT/boot/efi
- mount $BLK_EFI $CHROOT/boot/efi
-
- mount $BLK_VAR $CHROOT/var
- mkdir -p $CHROOT/var/lib/pkg
-
- mount $BLK_USR $CHROOT/usr
- mkdir -p $CHROOT/usr/ports
-# mount $BLK_PRT $CHROOT/usr/ports
- mount $BLK_HOME $CHROOT/home
-
-#install_crux() {
-
- echo "1.1.4 Create core.lst and install pkgadd"
- for p in /media/crux/core/*; do echo $p >> $CHROOT/core.lst; done
-
- tar xf "/media/crux/core/pkgutils#5.36-2.pkg.tar.xz" usr/bin/pkgadd -O > $CHROOT/pkgadd
-
- chmod +x $CHROOT/pkgadd
-
- echo "1.1.4 File core.lst complete, review list of packages before continue..."
- read PAUSE
- vim $CHROOT/core.lst
-
- echo "1.1.4 Starting install"
- touch $CHROOT/var/lib/pkg/db
-
- cd $CHROOT
- while read line; do
- printf "Installing $line;\n"
- $CHROOT/pkgadd -f -r $CHROOT $line
- done < core.lst
-
- rm $CHROOT/pkgadd
- rm $CHROOT/core.lst
-
- echo "1.1.5. Install extra packages;"
-
- mkdir $CHROOT/usr/ports/packages
- cp /media/crux/core/* $CHROOT/usr/ports/packages
- cp /media/crux/opt/* $CHROOT/usr/ports/packages
- cp /media/crux/xorg/* $CHROOT/usr/ports/packages
-
- echo "Installing $CHROOT/usr/ports/packages/fakeroot#1.20.2-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/fakeroot#1.20.2-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/dbus#1.10.2-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/dbus#1.10.2-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/expat#2.1.0-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/expat#2.1.0-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/libnl#3.2.27-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/libnl#3.2.27-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/libpng#1.6.19-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/libpng#1.6.19-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/freetype#2.6.1-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/freetype#2.6.1-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/libffi#3.2.1-2.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/libffi#3.2.1-2.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/sqlite3#3.9.2-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/sqlite3#3.9.2-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/python#2.7.10-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/python#2.7.10-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/glib#2.46.2-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/glib#2.46.2-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/grub2#2.00-7.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/grub2#2.00-7.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/grub2-efi#2.00-4.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/grub2-efi#2.00-4.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/wireless-tools#29-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/wireless-tools#29-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/wpa_supplicant#2.5-2.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/wpa_supplicant#2.5-2.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/lvm2#2.02.133-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/lvm2#2.02.133-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/mdadm#3.3.4-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/mdadm#3.3.4-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/efivar#0.21-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/efivar#0.21-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/efibootmgr#0.12-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/efibootmgr#0.12-1.pkg.tar.xz"
- echo "Installing $CHROOT/usr/ports/packages/dosfstools#3.0.26-1.pkg.tar.xz"
- $CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/dosfstools#3.0.26-1.pkg.tar.xz"
-
- echo "1.1.6. Install extra ports;\n"
-
- mkdir $CHROOT/usr/ports/c9-ports
- cp -r $DIR_PRT/* $CHROOT/usr/ports/c9-ports/
-
- echo "1.1.7. dns resolver, copy resolv.conf;\n"
- cp /etc/resolv.conf $CHROOT/etc
-
- echo "1.1.8. Install Handbook\n"
- cp /media/crux/handbook.txt $CHROOT/root/
-
- echo "1.1.9. Install Skeletons\n"
- cp -r $DIR_CONF/skel $CHROOT/etc/
-#}
-printf "Ready to chroot $CHROOT /bin/bash \n"
diff --git a/core/scripts/mkparted.sh b/core/scripts/mkparted.sh
deleted file mode 100644
index b71d6b2..0000000
--- a/core/scripts/mkparted.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-DEVICE=/dev/sda
-
-
-#parted --script /sda \
-# mklabel gpt \
-# mkpart primary 1MiB 100MiB \
-# mkpart primary 100MiB 200MiB \
diff --git a/core/scripts/setup-install.sh b/core/scripts/setup-install.sh
new file mode 100644
index 0000000..553aee0
--- /dev/null
+++ b/core/scripts/setup-install.sh
@@ -0,0 +1,183 @@
+#!/bin/sh
+
+# First we define the function
+ConfirmOrExit ()
+{
+ while true
+ do
+ echo -n "Please confirm (y or n) :"
+ read CONFIRM
+ case $CONFIRM in
+ y|Y|YES|yes|Yes) break ;;
+ n|N|no|NO|No)
+ echo "Aborting - you entered $CONFIRM"
+ exit
+ ;;
+ *) echo "Please enter only y or n"
+ esac
+ done
+ echo "You entered $CONFIRM. Continuing ..."
+}
+
+# Set Global Vars
+DEV=$1
+CHROOT="/mnt"
+##read BLK_SWP
+BLK_SWP="/dev/sda9"
+
+##read BLK_EFI
+BLK_EFI="${DEV}1"
+##read BLK_BOOT
+BLK_BOOT="${DEV}2"
+##read BLK_ROOT
+BLK_ROOT="${DEV}3"
+##read BLK_VAR
+BLK_VAR="${DEV}4"
+
+DIR=$(dirname "$PWD");
+DIR_PRT=$(dirname "$DIR")"/c9-ports";
+DIR_CONF=$DIR"/core/conf"
+
+CRUX_ISO="/boot/crux-3.2.iso"
+
+echo "Device: $DEV\n"
+
+echo "1.1.2 EFI block; ($BLK_EFI)"
+echo "1.1.2 boot block; ($BLK_BOOT)"
+echo "1.1.2 root block; ($BLK_ROOT)"
+echo "1.1.2 var block; ($BLK_VAR)"
+#echo "1.1.2 swap block; ($BLK_SWP)\n"
+
+echo "CHROOT=$CHROOT";
+echo "DIR=$DIR";
+echo "DIR_CONF=$DIR_CONF";
+echo "DIR_PRT=$DIR_PRT";
+
+echo "CRUX_ISO=$CRUX_ISO";
+ConfirmOrExit
+
+echo "1.1.2 Creating File System on $BLK_EFI with fat32:"
+mkfs.fat -F 32 $BLK_EFI
+echo "1.1.2 Creating File System on $BLK_BOOT with ext4:"
+mkfs.ext4 $BLK_BOOT
+echo "1.1.2 Creating File System on $BLK_ROOT with ext4:"
+mkfs.ext4 $BLK_ROOT
+echo "1.1.2 Creating File System on $BLK_VAR with ext4:"
+mkfs.ext4 $BLK_VAR
+#echo "1.1.2 Creating Swap File System on $BLK_SWP:"
+#mkswap $BLK_SWP
+
+echo "1.1.3 mount point to chroot (/mnt):\n"
+mount $BLK_ROOT $CHROOT
+
+mkdir -p $CHROOT/boot
+mount $BLK_BOOT $CHROOT/boot
+mkdir -p $CHROOT/boot/efi
+mount $BLK_EFI $CHROOT/boot/efi
+mkdir -p $CHROOT/var
+mount $BLK_VAR $CHROOT/var
+
+mkdir -p $CHROOT/dev
+mkdir -p $CHROOT/tmp
+mkdir -p $CHROOT/proc
+mkdir -p $CHROOT/sys
+
+mkdir -p $CHROOT/var/lib/pkg
+mkdir -p $CHROOT/usr/ports
+
+mkdir -p $CHROOT/media
+mkdir -p $CHROOT/home
+
+mount --bind /dev $CHROOT/dev
+mount -vt devpts devpts $CHROOT/dev/pts
+mount -vt tmpfs shm $CHROOT/dev/shm
+mount -vt proc proc $CHROOT/proc
+mount -vt sysfs sysfs $CHROOT/sys
+
+mount -o loop $CRUX_ISO $CHROOT/media
+#install_crux() {
+
+echo "1.1.4 Create core.lst and install pkgadd"
+for p in $CHROOT/media/crux/core/*; do echo $p >> $CHROOT/core.lst; done
+
+tar xf "$CHROOT/media/crux/core/pkgutils#5.36-2.pkg.tar.xz" usr/bin/pkgadd -O > $CHROOT/pkgadd
+
+chmod +x $CHROOT/pkgadd
+
+echo "1.1.4 File core.lst complete, review list of packages before continue..."
+read PAUSE
+vim $CHROOT/core.lst
+
+echo "1.1.4 Starting install"
+touch $CHROOT/var/lib/pkg/db
+
+cd $CHROOT
+while read line; do
+ echo "Installing $line;\n"
+ $CHROOT/pkgadd -f -r $CHROOT $line
+done < core.lst
+
+rm $CHROOT/pkgadd
+rm $CHROOT/core.lst
+
+echo "1.1.5. Install extra packages;"
+
+mkdir $CHROOT/usr/ports/packages
+cp $CHROOT/media/crux/core/* $CHROOT/usr/ports/packages
+cp $CHROOT/media/crux/opt/* $CHROOT/usr/ports/packages
+cp $CHROOT/media/crux/xorg/* $CHROOT/usr/ports/packages
+
+echo "Installing $CHROOT/usr/ports/packages/fakeroot#1.20.2-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/fakeroot#1.20.2-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/dbus#1.10.2-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/dbus#1.10.2-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/expat#2.1.0-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/expat#2.1.0-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/libnl#3.2.27-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/libnl#3.2.27-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/libpng#1.6.19-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/libpng#1.6.19-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/freetype#2.6.1-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/freetype#2.6.1-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/libffi#3.2.1-2.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/libffi#3.2.1-2.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/sqlite3#3.9.2-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/sqlite3#3.9.2-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/python#2.7.10-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/python#2.7.10-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/glib#2.46.2-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/glib#2.46.2-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/grub2#2.00-7.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/grub2#2.00-7.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/grub2-efi#2.00-4.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/grub2-efi#2.00-4.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/wireless-tools#29-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/wireless-tools#29-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/wpa_supplicant#2.5-2.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/wpa_supplicant#2.5-2.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/lvm2#2.02.133-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/lvm2#2.02.133-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/mdadm#3.3.4-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/mdadm#3.3.4-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/efivar#0.21-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/efivar#0.21-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/efibootmgr#0.12-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/efibootmgr#0.12-1.pkg.tar.xz"
+echo "Installing $CHROOT/usr/ports/packages/dosfstools#3.0.26-1.pkg.tar.xz"
+$CHROOT/usr/bin/pkgadd -f -r $CHROOT "$CHROOT/usr/ports/packages/dosfstools#3.0.26-1.pkg.tar.xz"
+
+echo "1.1.6. Install extra ports;\n"
+
+mkdir $CHROOT/usr/ports/c9-ports
+cp -r $DIR_PRT/* $CHROOT/usr/ports/c9-ports/
+
+echo "1.1.7. dns resolver, copy resolv.conf;\n"
+cp /etc/resolv.conf $CHROOT/etc
+
+echo "1.1.8. Install Handbook\n"
+cp /media/crux/handbook.txt $CHROOT/root/
+
+echo "1.1.9. Install Skeletons\n"
+cp -r $DIR_CONF/skel $CHROOT/etc/
+#}
+echo "Ready to chroot $CHROOT /bin/bash \n"
diff --git a/core/scripts/setup-target.sh b/core/scripts/setup-target.sh
new file mode 100644
index 0000000..4f38853
--- /dev/null
+++ b/core/scripts/setup-target.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# First we define the function
+ConfirmOrExit ()
+{
+ while true
+ do
+ echo -n "Please confirm (y or n) :"
+ read CONFIRM
+ case $CONFIRM in
+ y|Y|YES|yes|Yes) break ;;
+ n|N|no|NO|No)
+ echo "Aborting - you entered $CONFIRM"
+ exit
+ ;;
+ *) echo "Please enter only y or n"
+ esac
+ done
+ echo "You entered $CONFIRM. Continuing ..."
+}
+
+DEV=$1
+
+echo "Device: $DEV\n"
+ConfirmOrExit
+
+parted --script $DEV \
+ mklabel gpt \
+ mkpart ESP fat32 1MiB 120MiB \
+ mkpart primary ext4 120MiB 720MiB \
+ mkpart primary ext4 720MiB 2720MiB \
+ mkpart primary ext4 2720MiB 5000MiB \
+ set 1 boot on
+
+exit 0;
diff --git a/dev/git.html b/dev/git.html
index fdae528..3e5f4c1 100644
--- a/dev/git.html
+++ b/dev/git.html
@@ -6,7 +6,7 @@
</head>
<body>
- <a href="index.html">Dev Index</a>
+ <a href="index.html">Development Index</a>
<h1>Git</h1>
<p>First configure your global identity, configuration
@@ -34,45 +34,48 @@
</li>
</ul>
- <h2 id="teamwork">Team WorkFlow</h2>
+ <pre>
+ $ git clone devbox:atom
+ $ git remote -v
+ </pre>
+
+ <h2 id="teamwork">1. Team WorkFlow</h2>
<p>This work flow is based on
- <a href="http://nvie.com/posts/a-successful-git-branching-model/">Vicent Driessen</a>,
+ <a href="http://nvie.com/posts/a-successful-git-branching-model/">Vicent Driessen</a>
development model, it defines rules how branches are forked,
merged and tagged. By having well defined set of branches,
the project structure is used as a communication tool,
allowing to work simultaneously on different stages
of the development.</p>
- <pre>
- $ git clone devbox:atom
- $ git remote -v
- </pre>
-
-
- <h3>Main Branches;</h3>
+ <p>Main Branches;</p>
<dl>
<dt>master</dt>
<dd>Current official stable release history.</dd>
- <dt>release</dt>
- <dd>Next release, new features not allowed.</dd>
<dt>develop</dt>
<dd>Integration branch for features.</dd>
</dl>
- <h3>Add-on Branches;</h3>
+ <p>Add-on Branches;</p>
<dl>
- <dt>feature</dt>
+ <dt>feature (f-)</dt>
<dd>New features, improvement proposal, tests, etc...</dd>
- <dt>hotfix</dt>
- <dd>Hotfix is branched of master and should only contain isolated bugfixes.</dd>
+ <dd>Only fork and merge from/to develop.
+ <dt>release (r-)</dt>
+ <dd>Next release, new features not allowed.</dd>
+ <dd>Fork from develop, merges to master and develop.</dd>
+ <dt>hotfix (h-)</dt>
+ <dd>Hotfix only contain isolated bugfixes.</dd>
+ <dd>Only fork from master, merges back to master and develop.</dd>
</dl>
- <h2 id="feature">Feature</h2>
+ <p>
+ <h3 id="feature">1.1. Feature</h3>
- <p>Create a branch and checkout;</p>
+ <p>Create a branch featurex from develop and checkout;</p>
<pre>
$ git checkout -b featurex develop
@@ -84,52 +87,69 @@
$ git push -u origin featurex
</pre>
- <p>Rename a branch;</p>
+ <p>Rename a branch, if all feature branches start by "f-" is easy
+ and quick to type and easy to spot;</p>
<pre>
- $ git branch -m featurex feature-x
+ $ git branch -m featurex f-xpto
</pre>
<p>Rename remote branch;</p>
<pre>
- $ git push origin :featurex feature-x
- $ git push origin -u feature-x
+ $ git push origin :featurex f-xpto
+ $ git push origin -u f-xpto
</pre>
<p>Merge branch feature into develop;</p>
<pre>
- $ git checkout develop
- Switched to branch 'develop'
- $ git merge --no-ff feature-x
- Updating ea1b82a..05e9557
- (Summary of changes)
- $ git push origin develop
+ $ git checkout develop
+ Switched to branch 'develop'
+ $ git merge --no-ff f-xpto
+ Updating ea1b82a..05e9557
+ (Summary of changes)
+ $ git push origin develop
</pre>
<p>Delete Local;</p>
<pre>
- $ git branch -D feature-x
+ $ git branch -D f-xpto
</pre>
<p>Delete Remote</p>
<pre>
- $ git push origin :feature-x
+ $ git push origin :f-xpto
</pre>
- <h2 id="release">Release</h2>
+ <h3 id="release">1.2. Release</h3>
+
+ <p>Software release numbers follow <a href="http://semver.org/">Tom Preston-Werner</a>
+ description;</p>
<pre>
- $ git checkout -b release-1.2 develop
- Switched to a new branch "release-1.2"
- $ ./bump-version.sh 1.2
- Files modified successfully, version bumped to 1.2.
- $ git commit -a -m "Bumped version number to 1.2"
- [release-1.2 74d9424] Bumped version number to 1.2
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ software-name-X.Y.Z.tar.xz
+ </pre>
+
+ <dl>
+ <dt>X</dt>
+ <dd>Major version, backwards incompatible API changes.</dd>
+ <dt>Y</dt>
+ <dd>Minor version, backwards-compatible changes.</dd>
+ <dt>Z</dt>
+ <dd>Patch version, backwards-compatible bug fixes.</dd>
+ </dl>
+
+ <pre>
+ $ git checkout -b r-1.2.1 develop
+ Switched to a new branch "release-1.2.1"
+ $ ./bump-version.sh 1.2.1
+ Files modified successfully, version bumped to 1.2.1.
+ $ git commit -a -m "Bumped version number to 1.2.1"
+ [release-1.2 74d9424] Bumped version number to 1.2.1
+ 1 files changed, 1 insertions(+), 1 deletions(-)
</pre>
<p>Only documentation or bugfixes are allowed in this
@@ -137,75 +157,99 @@
and push to master;</p>
<pre>
- $ git checkout master
- Switched to branch 'master'
- $ git merge --no-ff release-1.2
- Merge made by recursive.
- (Summary of changes)
- $ git tag -a 1.2
+ $ git checkout master
+ Switched to branch 'master'
+ $ git merge --no-ff r-1.2.1
+ Merge made by recursive.
+ </pre>
+
+ <p>Tag new release with software-name-version, this
+ allows meaningful ports
+ <a href="../core/ports.html">distfiles</a> when
+ downloading releases from git archives;</p>
+
+ <pre>
+ $ git tag -a software-name-1.2.1
+ $ git push --follow-tags
</pre>
<p>Update branch develop with bugfixes from last release,
conflict will happen in next step</p>
<pre>
- $ git checkout develop
- Switched to branch 'develop'
- $ git merge --no-ff release-1.2
- Merge made by recursive.
- (Summary of changes)
+ $ git checkout develop
+ Switched to branch 'develop'
+ $ git merge --no-ff r-1.2.1
+ Merge made by recursive.
+ (Summary of changes)
+ $ git push
</pre>
- <h2 id="hotfix">Hotfix</h2>
+ <h3 id="tags">1.3. Tags</h3>
- <p>This branch should never exist, ;)</p>
+ <p>There are two main types of tags, lightweight and
+ annotated. Lightweight tag is a pointer to a specific commit,
+ much like cheap branches. Annotated tags are stored as full objects
+ and allow to sign with <a href="gnupg.html">gnupg</a>, making it ideal
+ for distributing releases.</p>
+
+ <p>Delete local and remote last end of life version;</p>
<pre>
- $ git checkout -b hotfix-1.2.1 master
- $ ./bump-version.sh 1.2.1
- Files modified successfully, version bumped to 1.2.1
- $ git commit -a -m "Bumped version number to 1.2"
+ $ git tag -d software-name-0.0.12
+ $ git push origin :refs/tags/software-name-0.8
</pre>
+ <p>Checkout master commit you want to start long term support and then;</p>
+
<pre>
- $ git commit -m "Commit severe fixes"
+ $ git tag -m "this commit is tagged" -a "software-name-1.1.8"
+ $ git push --follow-tags
</pre>
+ <h3 id="hotfix">1.4. Hotfix</h3>
+
+ <p>This branch should never exist, ;)</p>
+
<pre>
- $ git checkout master
- Switched to branch 'master'
- $ git merge --no-ff release-1.2.1
- Merge made by recursive.
- (Summary of changes)
- $ git tag -a 1.2.1
+ $ git checkout -b h-1.2.2 master
+ $ ./bump-version.sh 1.2.2
+ Files modified successfully, version bumped to 1.2.2
+ $ git commit -a -m "Bumped version number to 1.2.2"
</pre>
- <p>Conflict will happen in next step</p>
-
<pre>
- $ git checkout develop
- Switched to branch 'develop'
- $ git merge --no-ff release-1.2.1
- Merge made by recursive.
- (Summary of changes)
+ $ git merge --no-ff b-error-xpto
+ ...
+ $ git merge --no-ff b-error-xpto
+ ...
+ $ git commit -m "Commit severe fix"
+ ...
+ $ git commit -m "Commit severe fix"
+ ...
</pre>
<pre>
- $ git -D hotfix-1.2.1
+ $ git checkout master
+ Switched to branch 'master'
+ $ git merge --no-ff h-1.2.2
+ Merge made by recursive.
+ (Summary of changes)
+ $ git tag -a software-name-1.2.2
</pre>
- <h2 id="tags">Tags</h2>
+ <p>Conflict will happen in next step</p>
<pre>
- $ git tag -m "this commit is tagged" -a "v1.8"
- $ git push --follow-tags
+ $ git checkout develop
+ Switched to branch 'develop'
+ $ git merge --no-ff h-1.2.2
+ Merge made by recursive.
+ (Summary of changes)
</pre>
- <p>Delete local and remote tag;</p>
-
<pre>
- $ git tag -d v1.8
- $ git push origin :refs/tags/v1.8
+ $ git -D h-1.2.2
</pre>
<h2 id="local">Local Workflow</h2>
@@ -230,10 +274,10 @@
$ git checkout f000^ -- path/to/file
</pre>
- <a href="index.html">Dev Index</a>
- <p>This is part of the SysDoc Manual.
+ <a href="index.html">Development Index</a>
+ <p>This is part of the c9-doc Manual.
Copyright (C) 2016
- Silvino Silva.
+ c9 Team.
See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
for copying conditions.</p>
diff --git a/dev/index.html b/dev/index.html
index 20e2c22..cd314f9 100644
--- a/dev/index.html
+++ b/dev/index.html
@@ -16,12 +16,15 @@
<ul>
<li><a href="git.html">Git</a>
<ul>
- <li><a href="git.html#teamwork">Team workflow</a></li>
- <li><a href="git.html#feature">Feature</a></li>
- <li><a href="git.html#release">Release</a></li>
- <li><a href="git.html#hotfix">Hotfix</a></li>
- <li><a href="git.html#tags">Tags</a></li>
- <li><a href="git.html#local">Local</a></li>
+ <li><a href="git.html#teamwork">1. Team workflow</a>
+ <ul>
+ <li><a href="git.html#feature">1.1. Feature</a></li>
+ <li><a href="git.html#release">1.2. Release</a></li>
+ <li><a href="git.html#tags">1.3. Tags</a></li>
+ <li><a href="git.html#hotfix">1.4. Hotfix</a></li>
+ </ul>
+ </li>
+ <li><a href="git.html#local">2. Local Workflow</a></li>
</ul>
</li>
</ul>
diff --git a/index.html b/index.html
index a499669..c52c290 100644
--- a/index.html
+++ b/index.html
@@ -27,7 +27,7 @@
<p>Version;</p>
<pre>
- rev develop
+ rev 0.2.4
</pre>
diff --git a/tools/qemu.html b/tools/qemu.html
index 8c53ce7..272a26b 100644
--- a/tools/qemu.html
+++ b/tools/qemu.html
@@ -63,24 +63,38 @@
to use parted to create a gpt system table;</p>
<pre>
- # parted /dev/nbd0
- (parted) mklabel gpt
- (parted) mkpart ext4 0% 100%
- (parted) set 1 boot on
+ # parted --script $DEV \
+ mklabel gpt \
+ mkpart ESP fat32 1MiB 120MiB \
+ mkpart primary ext4 120MiB 720MiB \
+ mkpart primary ext4 720MiB 2720MiB \
+ mkpart primary ext4 2720MiB 5000MiB \
+ set 1 boot on
</pre>
<pre>
# kpartx -a -s -l -u /dev/nbd0
</pre>
+ <p>Use /dev/mapper/$(name_of_device) to assign correct blocks;</p>
+
<pre>
- # mkfs.ext4 /dev/mapper/nbd0p1
+ # mkfs.fat -F 32 $BLK_EFI
+ # mkfs.ext4 $BLK_BOOT
+ # mkfs.ext4 $BLK_ROOT
+ # mkfs.ext4 $BLK_VAR
</pre>
<p>Mount partition;</p>
<pre>
- # mount /dev/mapper/nbd0p1
+ # mount $BLK_ROOT $CHROOT
+ # mkdir -p $CHROOT/boot
+ # mount $BLK_BOOT $CHROOT/boot
+ # mkdir -p $CHROOT/boot/efi
+ # mount $BLK_EFI $CHROOT/boot/efi
+ # mkdir -p $CHROOT/var
+ # mount $BLK_VAR $CHROOT/var
</pre>
<h2 id="net">2. Network</h2>