Browse Source

Minor cleanup and additional info.

parazyd 2 years ago
parent
commit
c68571d285
No known key found for this signature in database
3 changed files with 31 additions and 19 deletions
  1. 15
    2
      README.md
  2. 6
    8
      cobox.blend
  3. 10
    9
      cobox.config

+ 15
- 2
README.md View File

@@ -8,6 +8,7 @@ Cloning
8 8
 $ git clone --recursive https://ledger-git.dyne.org/CoBox/cobox-os
9 9
 ```
10 10
 
11
+
11 12
 Dependencies
12 13
 ------------
13 14
 
@@ -17,15 +18,22 @@ Dependencies
17 18
 zsh sudo cgpt parted xz-utils curl git wget qemu-user-static build-essential rsync gcc-arm-none-eabi gcc-multilib lib32z1 u-boot-tools device-tree-compiler lzop dosfstools vboot-utils vboot-kernel-utils libftdi-dev libfdt-dev swig libpython-dev bc bison flex libssl-dev
18 19
 ```
19 20
 
21
+Also with arm-sdk, once the repositories are cloned, go inside and
22
+download the additional needed GCC toolchains:
23
+
24
+```
25
+$ cd arm-sdk
26
+$ ./init.sh
27
+```
28
+
29
+
20 30
 ### VM
21 31
 
22 32
 ```
23 33
 zsh sudo cgpt parted xz-utils virtualbox vagrant qemu qemu-utils
24 34
 ```
25 35
 
26
-```
27 36
 * http://download.virtualbox.org/virtualbox/5.1.30/virtualbox-5.1_5.1.30-118389~Debian~stretch_amd64.deb
28
-* http://download.virtualbox.org/virtualbox/5.1.30/virtualbox-5.1_5.1.30-118389~Debian~jessie_amd64.deb
29 37
 * https://releases.hashicorp.com/vagrant/2.0.0/vagrant_2.0.0_x86_64.deb
30 38
 
31 39
 
@@ -72,6 +80,11 @@ $ load devuan sunxi cobox
72 80
 $ build_image_dist
73 81
 ```
74 82
 
83
+For the Olimex LIME2 target, the device name in arm-sdk is `sunxi`. The
84
+u-boot bootloader will be found in `dist/u-boot` called
85
+`A20-OLinuXino-Lime2_defconfig.bin`.
86
+
87
+
75 88
 Reference for images
76 89
 --------------------
77 90
 

+ 6
- 8
cobox.blend View File

@@ -3,7 +3,6 @@
3 3
 # /../ because $R is the root of *-sdk
4 4
 source "$R/../cobox.config"
5 5
 
6
-
7 6
 blend_preinst() {
8 7
 	cat <<EOF | sudo tee "$strapdir/blend-preinst"
9 8
 #!/bin/sh
@@ -24,17 +23,16 @@ EOF
24 23
 }
25 24
 
26 25
 blend_postinst() {
27
-	for i in $cobox_sw_npm; do
28
-		cat <<EOF | sudo tee "$strapdir/npm-pkg-inst"
26
+	cat <<EOF | sudo tee "$strapdir/npm-pkg-inst"
29 27
 #!/bin/sh
30
-#npm install ${i} || exit 1
31
-sudo -u cobox npm install ${i} || exit 1
28
+for i in ${cobox_sw_npm}; do
29
+	sudo -u cobox npm install ${i} || exit 1
30
+done
32 31
 ln -s /home/cobox/node_modules/cobox-group/bin.js /usr/local/bin/cobox-group
33 32
 rm -f npm-pkg-inst
34 33
 EOF
35
-		sudo chmod +x "$strapdir/npm-pkg-inst"
36
-		chroot-script -d npm-pkg-inst
37
-	done
34
+	sudo chmod +x "$strapdir/npm-pkg-inst"
35
+	chroot-script -d npm-pkg-inst
38 36
 
39 37
 	notice "copying rootfs overlay"
40 38
 	sudo rsync -vraX --chown=root:root "$R/../rootfs-overlay/" "${strapdir}"

+ 10
- 9
cobox.config View File

@@ -3,18 +3,13 @@
3 3
 blend_name="cobox"
4 4
 blend_vers="1.0"
5 5
 
6
+# Size of the base image in MB
6 7
 size=4096
7 8
 
8 9
 # Cache the stage4 tarball during build
9 10
 TAR_STAGE4=true
10 11
 
11
-if [ -n "$armsdk_version" ]; then
12
-    image_name="${blend_name}-${blend_vers}-${arch}-${device_name}-$(date '+%Y%m%d')"
13
-elif [ -n "$vmsdk_version" ]; then
14
-    image_name="${blend_name}-${blend_vers}-${arch}-$(date '+%Y%m%d')"
15
-    vm_name="${blend_name}-${blend_vers}-${arch}-virtual-$(date '+%Y%m%d')"
16
-fi
17
-
12
+# Extra packages that will be installed in stage4 bootstrap using apt
18 13
 extra_packages=(
19 14
 	build-essential
20 15
 	libsodium-dev
@@ -25,13 +20,19 @@ extra_packages=(
25 20
 	net-tools
26 21
 )
27 22
 
23
+# nodejs data
28 24
 node_ver="11.x"
29
-
30 25
 node_repo_key="https://deb.nodesource.com/gpgkey/nodesource.gpg.key"
31 26
 node_repo_apt="deb https://deb.nodesource.com/node_${node_ver} stretch main"
32 27
 
33 28
 
34 29
 # Separate with spaces
35
-#cobox_sw_npm="https://ledger-git.dyne.org/CoBox/cobox-group"
36 30
 #cobox_sw_npm="cobox-group cobox-cli"
37 31
 cobox_sw_npm="cobox-group"
32
+
33
+if [ -n "$armsdk_version" ]; then
34
+    image_name="${blend_name}-${blend_vers}-${arch}-${device_name}-$(date '+%Y%m%d')"
35
+elif [ -n "$vmsdk_version" ]; then
36
+    image_name="${blend_name}-${blend_vers}-${arch}-$(date '+%Y%m%d')"
37
+    vm_name="${blend_name}-${blend_vers}-${arch}-virtual-$(date '+%Y%m%d')"
38
+fi