You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function test_package_urls(){
@@ -196,35 +205,35 @@ function get_packages(){
do
URL="$PICORE_PACKAGES_URL/$i.$PICORE_PACKAGE_EXTESION"
echo " * $i" "($URL)"
RPi Zero W needs additional firmware and serial console settings like RPi 3
`
--- picore-headless-setup.sh 2018-07-01 13:07:58.214843119 +0200
+++ picore-headless-setup_9.0.3.sh 2018-07-01 20:45:59.565317199 +0200
@@ -1,18 +1,19 @@
#/bin/bash
PICORE_ARCH="armv6"
-PICORE_VERSION="8.x"
-PICORE_SUBVERSION="8.1.5"
-PICORE_KERNEL_VERSION="4.4.39"
-WORK_DIR=~/picore-$PICORE_SUBVERSION
-MNT_DIR="$WORK_DIR/mnt"
+PICORE_VERSION="9.x"
+PICORE_SUBVERSION="9.0.3"
+PICORE_KERNEL_VERSION="4.9.22"
+
+WORK_DIR=./picore-$PICORE_SUBVERSION
+MNT1_DIR="$WORK_DIR/mnt1"
+MNT2_DIR="$WORK_DIR/mnt2"
IMG_BLOCKSIZE=512
IMG_BLOCKS=204800 # 512 * 204800 = 104857600 (~100MB)
@@ -22,9 +23,10 @@ PICORE_RELEASES_URL="$PICORE_REPOSITORY_
PICORE_PACKAGES_URL="$PICORE_REPOSITORY_URL/tcz"
PICORE_PACKAGE_EXTESION="tcz"
PICORE_RELEASE_URL="$PICORE_RELEASES_URL/piCore-$PICORE_SUBVERSION.zip"
-PICORE_KERNEL_SUFFIX="-$PICORE_KERNEL_VERSION-piCore+"
+PICORE_KERNEL_SUFFIX="-$PICORE_KERNEL_VERSION-piCore"
PICORE_LOCAL_PACKAGE_PATH="tce/optional"
PICORE_LOCAL_MYDATA="tce/mydata"
+PICORE_FILESYSTEM_DIR=$(mktemp -d ${WORK_DIR}/filesystem.XXXXXXXXXX)
PICORE_PACKAGES=( "file"
"ncurses"
@@ -38,6 +40,7 @@ PICORE_PACKAGES_WLAN_CLIENT=( "libnl"
"wpa_supplicant"
"openssl"
"openssh"\
)
WPA_SUPPLICANT_CONF="
@@ -79,7 +82,8 @@ DEPENDENCIES=( "wget"\
function prepare_dirs(){
[ -d $WORK_DIR ] || mkdir $WORK_DIR
}
function command_exists() {
@@ -160,17 +164,22 @@ function make_image(){
sudo e2fsck -f "$WORK_DIR/piCore-$PICORE_SUBVERSION.custom.img2"
sudo resize2fs "$WORK_DIR/piCore-$PICORE_SUBVERSION.custom.img2"
}
function cleanup(){
echo "*** Cleaning up ***"
sudo kpartx -d "$WORK_DIR/piCore-$PICORE_SUBVERSION.custom.img"
[ -L "$WORK_DIR/piCore-$PICORE_SUBVERSION.custom.img1" ] && rm "$WORK_DIR/piCore-$PICORE_SUBVERSION.custom.img1"
[ -L "$WORK_DIR/piCore-$PICORE_SUBVERSION.custom.img2" ] && rm "$WORK_DIR/piCore-$PICORE_SUBVERSION.custom.img2"
[ -e "$WORK_DIR/piCore-$PICORE_SUBVERSION.zip" ] && rm "$WORK_DIR/piCore-$PICORE_SUBVERSION.zip"
}
function test_package_urls(){
@@ -196,35 +205,35 @@ function get_packages(){
do
URL="$PICORE_PACKAGES_URL/$i.$PICORE_PACKAGE_EXTESION"
echo " * $i" "($URL)"
}
function make_onboot_list(){
echo "*** Adding packages to onboot.lst ***"
for i in "${PICORE_PACKAGES[@]}"
do
}
function config_wpa_supplicant(){
}
function config_bootlocal(){
}
function make_mydata(){
echo "*** Adjust mydata.tgz ***"
[ -d "$MNT2_DIR/$PICORE_LOCAL_MYDATA" ] || sudo mkdir "$MNT2_DIR/$PICORE_LOCAL_MYDATA"
sudo tar xfz "$MNT2_DIR/$PICORE_LOCAL_MYDATA.tgz" -C "$MNT2_DIR/$PICORE_LOCAL_MYDATA"
echo " * WPA Supplicant"
config_wpa_supplicant
@@ -233,11 +242,59 @@ function make_mydata(){
config_bootlocal
echo " * finalizing"
sudo tar -zcf ../mydata.tgz .
cd -
}
+function extract_filesystem(){
+}
+function rebuild_filesystem(){
+}
+function patch_startserialtty(){
piCore 9.0.3 /usr/sbin/startserialtty misses support for RPi Zero W's
serial configuration, which is like RPi 3, not like RPi 1/2/Zero:
Console is on /dev/ttyS0, not /dev/ttyAMA0
maybe RPi Zero W support will be fixed in piCore 9.0.>3, so check, if it
is already done
+--- usr/sbin/startserialtty
++++ usr/sbin/startserialtty
+@@ -4,6 +4,8 @@
+
++elif [ "${model:0:19}" = "Raspberry Pi Zero W" ]; then
++ port=ttyS0
+"
+}
check_dependencies
prepare_dirs
get_release
@@ -246,4 +303,7 @@ test_package_urls
get_packages
make_onboot_list
make_mydata
+extract_filesystem
+patch_startserialtty
+rebuild_filesystem
cleanup
The text was updated successfully, but these errors were encountered: