This commit is contained in:
Igor Pečovnik
2015-12-18 15:21:47 +01:00
9 changed files with 55 additions and 33 deletions

View File

@@ -9,9 +9,9 @@
# This file is a part of tool chain https://github.com/igorpecovnik/lib
#
#
# Board speciefic
#
#
# Functions:
# install_board_specific
# install_kernel
install_board_specific (){
#---------------------------------------------------------------------------------------------------------------------------------

View File

@@ -9,6 +9,13 @@
# This file is a part of tool chain https://github.com/igorpecovnik/lib
#
# Functions:
# compile_uboot
# compile_sunxi_tools
# compile_kernel
# install_external_applications
# shrinking_raw_image
# closing_image
compile_uboot (){
#---------------------------------------------------------------------------------------------------------------------------------

View File

@@ -28,7 +28,7 @@
# common options
REVISION="5.00" # all boards have same revision
SDSIZE="4000" # SD image size in MB
SDSIZE="4G" # SD image size in MB
TZDATA=`cat /etc/timezone` # Timezone for target is taken from host or defined here.
USEALLCORES="yes" # Use all CPU cores for compiling
SYSTEMD="no" # Enable or disable systemd on Jessie in debootstrap process

View File

@@ -9,8 +9,8 @@
# This file is a part of tool chain https://github.com/igorpecovnik/lib
#
#
# Create system template
#
# Functions:
# custom_debootstrap
#
custom_debootstrap (){
@@ -19,10 +19,10 @@ custom_debootstrap (){
#---------------------------------------------------------------------------------------------------------------------------------
# is boot partition to big?
if [ "$SDSIZE" -le "$(($OFFSET+$BOOTSIZE))" ]; then
display_alert "Image size too small." "$BOOTSIZE > $SDSIZE" "err"
exit
fi
#if [ "$SDSIZE" -le "$(($OFFSET+$BOOTSIZE))" ]; then
# display_alert "Image size too small." "$BOOTSIZE > $SDSIZE" "err"
# exit
#fi
# create needed directories and mount image to next free loop device
rm -rf $DEST/cache/sdcard/
@@ -36,15 +36,13 @@ ROOTSTART=$(($BOOTSTART+($BOOTSIZE*2048)))
BOOTEND=$(($ROOTSTART-1))
# Create image file
while read line;do
[[ "$line" =~ "records out" ]] &&
echo "$(( ${line%+*}*100/$SDSIZE +1 ))" | dialog --backtitle "$backtitle" --title "Creating blank image ($SDSIZE Mb), please wait ..." --gauge "" 5 70
done< <( dd if=/dev/zero of=$DEST/cache/tmprootfs.raw bs=1M count=$SDSIZE 2>&1 &
pid=$!
sleep 1
while kill -USR1 $pid 2>/dev/null;do
sleep 1
done )
if [ "$OUTPUT_DIALOG" = "yes" ]; then
(pv -n -s $SDSIZE -S /dev/zero | dd status=none of=$DEST/cache/tmprootfs.raw) 2>&1 \
| dialog --backtitle "$backtitle" --title "Creating blank image ($SDSIZE Mb), please wait ..." --gauge "" 5 70
else
pv -p -b -r -s $SDSIZE -S /dev/zero | dd status=none of=$DEST/cache/tmprootfs.raw
fi
# Find first available free device
LOOP=$(losetup -f)

View File

@@ -8,7 +8,8 @@
#
# This file is a part of tool chain https://github.com/igorpecovnik/lib
#
# Functions:
# install_distribution_specific
install_distribution_specific (){
#---------------------------------------------------------------------------------------------------------------------------------

View File

@@ -67,7 +67,7 @@ After switching power on or rebooting, when u-boot loads up, press some key on t
Hit any key to stop autoboot: 0
sunxi#
Enter these commands, replacing root device path if necessary. Select setenv line with ttyS0 for serial, tty1 for keyboard+monitor:
Enter these commands, replacing root device path if necessary. Select setenv line with ttyS0 for serial, tty1 for keyboard+monitor (these are for booting with mainline kernel, check boot.cmd for your device for commands related to legacy kernel):
setenv bootargs init=/bin/bash root=/dev/mmcblk0p1 rootwait console=ttyS0,115200
# or
@@ -114,11 +114,11 @@ Unmount SD card, move it to the board and power on.
To create a normal user do this:
adduser MyNewUsername
adduser MyNewUsername
Put user to sudo group:
usermod -aG sudo MyNewUsername
usermod -aG sudo MyNewUsername
# How to customize keyboard, time zone?
@@ -187,10 +187,10 @@ Check [this site](http://namhuy.net/1085/install-gui-on-debian-7-wheezy.html) fo
dpkg -r ramlog
cp /etc/apt/sources.list{,.bak}
sed -i -e 's/ \(old-stable\|wheezy\)/ jessie/ig' /etc/apt/sources.list
apt-get update
apt-get --download-only dist-upgrade
apt-get dist-upgrade
sed -i -e 's/ \(old-stable\|wheezy\)/ jessie/ig' /etc/apt/sources.list
apt-get update
apt-get --download-only dist-upgrade
apt-get dist-upgrade
# How to upgrade from Ubuntu Trusty to next LTS?

View File

@@ -9,6 +9,18 @@
# This file is a part of tool chain https://github.com/igorpecovnik/lib
#
# Functions:
# cleaning
# fetch_from_github
# display_alert
# check_error
# install_packet
# grab_version
# choosing_kernel
# fingerprint_image
# umount_image
# addtorepo
# prepare_host
# cleaning <target>
#

View File

@@ -11,7 +11,8 @@
#
# Create board support packages
#
#
# Functions:
# create_board_package
create_board_package (){
#---------------------------------------------------------------------------------------------------------------------------------

View File

@@ -11,7 +11,10 @@
#
# Source patching functions
#
#
# Functions:
# advanced_patch
# process_patch_file
# patching_sources
# advanced_patch <dest> <family> <device> <description>
#
@@ -60,7 +63,7 @@ advanced_patch () {
if [ -s "$dir/$name" ]; then
process_patch_file "$dir/$name" "$description"
else
display_alert "... ${description} ${name}" "skipped" "info"
display_alert "... $name" "skipped" "info"
fi
break # next name
fi
@@ -84,13 +87,13 @@ process_patch_file() {
| awk '{print $NF}' | sed -n 's/,//p' | xargs -I % sh -c 'rm %'
# main patch command
echo "$patch" >> $DEST/debug/install.log
echo "$patch $description" >> $DEST/debug/install.log
patch --batch --silent -p1 -N < $patch >> $DEST/debug/install.log 2>&1
if [ $? -ne 0 ]; then
display_alert "... $(basename $patch) $description" "failed" "wrn";
display_alert "... $(basename $patch)" "failed" "wrn";
else
display_alert "... $(basename $patch) $description" "succeeded" "info"
display_alert "... $(basename $patch)" "succeeded" "info"
fi
}