From 6b9c4adc66f37d1b0fd0f766326cbba4c6c841a9 Mon Sep 17 00:00:00 2001 From: Thomas Kaiser Date: Fri, 26 Feb 2016 17:20:03 +0100 Subject: [PATCH 1/3] Build a10disp for sun8i target also, improve 1st login on H3 devices --- common.sh | 18 ++++++++---------- scripts/check_first_login.sh | 21 ++++++++++++++++++--- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/common.sh b/common.sh index 252a0db89a..f3ca163e01 100644 --- a/common.sh +++ b/common.sh @@ -140,7 +140,6 @@ END rm -rf $CHOOSEN_UBOOT CHOOSEN_UBOOT=$CHOOSEN_UBOOT".deb" - FILESIZE=$(wc -c $DEST/debs/$CHOOSEN_UBOOT | cut -f 1 -d ' ') if [[ $FILESIZE -lt 50000 ]]; then @@ -154,7 +153,6 @@ END fi } - compile_sunxi_tools (){ #--------------------------------------------------------------------------------------------------------------------------------- # https://github.com/linux-sunxi/sunxi-tools Tools to help hacking Allwinner devices @@ -302,7 +300,6 @@ cp $SOURCES/usb-redirector-linux-arm-eabi/files/rc.usbsrvd $DEST/cache/sdcard/et # not started by default ----- update.rc rc.usbsrvd defaults # chroot $DEST/cache/sdcard /bin/bash -c "update-rc.d rc.usbsrvd defaults" - # some aditional stuff. Some driver as example if [[ -n "$MISC3_DIR" ]]; then display_alert "Installing external applications" "RT8192 driver" "info" @@ -316,10 +313,15 @@ if [[ -n "$MISC3_DIR" ]]; then fi # MISC4 = NOTRO DRIVERS / special handling -# MISC5 = sunxu display control -if [[ -n "$MISC5_DIR" && $BRANCH != "next" && $LINUXSOURCEDIR == *sunxi* ]]; then + +# MISC5 = sunxi display control +if [[ -n "$MISC5_DIR" && $BRANCH != "next" && $LINUXSOURCEDIR == *sunxi* -o $LINUXSOURCEDIR == *sun8i* ]]; then cd $SOURCES/$MISC5_DIR - cp $SOURCES/$LINUXSOURCEDIR/include/video/sunxi_disp_ioctl.h . + if [ -f "$SOURCES/$LINUXSOURCEDIR/include/video/sunxi_disp_ioctl.h" ]; then + cp "$SOURCES/$LINUXSOURCEDIR/include/video/sunxi_disp_ioctl.h" . + else + wget -q "https://raw.githubusercontent.com/linux-sunxi/linux-sunxi/sunxi-3.4/include/video/sunxi_disp_ioctl.h" + fi make clean >/dev/null 2>&1 (make ARCH=arm CC=arm-linux-gnueabihf-gcc KSRC=$SOURCES/$LINUXSOURCEDIR/ >/dev/null 2>&1) install -m 755 a10disp $DEST/cache/sdcard/usr/local/bin @@ -394,8 +396,6 @@ if [ "$BOARD" = "orangepiplus" -o "$BOARD" = "orangepih3" ]; then fi } - - shrinking_raw_image (){ # Parameter: RAW image with full path #--------------------------------------------------------------------------------------------------------------------------------- # Shrink partition and image to real size with a place for 128Mb swap space @@ -448,7 +448,6 @@ losetup -d $LOOP echo "NEWSIZE $NEWSIZE STARTFROM $STARTFROM TRUNCATE $TRUNCATE" >> $DEST/debug/install.log } - closing_image (){ #-------------------------------------------------------------------------------------------------------------------------------- # Closing image and clean-up @@ -478,7 +477,6 @@ if [ "$BUILD_DESKTOP" = "yes" ]; then VERSION=$VERSION"_desktop" fi - # kill process inside KILLPROC=$(ps -uax | pgrep ntpd | tail -1); if [ -n "$KILLPROC" ]; then kill -9 $KILLPROC; fi KILLPROC=$(ps -uax | pgrep dbus-daemon | tail -1); if [ -n "$KILLPROC" ]; then kill -9 $KILLPROC; fi diff --git a/scripts/check_first_login.sh b/scripts/check_first_login.sh index 7511904bb7..560cbe138a 100644 --- a/scripts/check_first_login.sh +++ b/scripts/check_first_login.sh @@ -14,13 +14,28 @@ if [ "$-" != "${-#*i}" ]; then RealName="$(awk -F":" "/^${RealUserName}:/ {print \$5}" Date: Fri, 26 Feb 2016 17:59:38 +0100 Subject: [PATCH 2/3] Use desktop wallpapers/settings also for root again --- desktop.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desktop.sh b/desktop.sh index 6977a2b2bc..08a3ddbbdd 100644 --- a/desktop.sh +++ b/desktop.sh @@ -25,6 +25,7 @@ if [[ $RELEASE == "wheezy" ]]; then d=$DEST/cache/sdcard/usr/share/xfce4/backdrops/ test -d "$d" || mkdir -p "$d" && cp $SRC/lib/bin/armbian*.jpg "$d" chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/wheezy-desktop.tgz -C /etc/skel/" + chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/wheezy-desktop.tgz -C /root/" fi # Debian Jessie @@ -33,6 +34,7 @@ if [[ $RELEASE == "jessie" ]]; then d=$DEST/cache/sdcard/usr/share/backgrounds/xfce/ test -d "$d" || mkdir -p "$d" && cp $SRC/lib/bin/armbian*.jpg "$d" chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/jessie-desktop.tgz -C /etc/skel/" + chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/jessie-desktop.tgz -C /root/" fi # Ubuntu trusty @@ -41,6 +43,7 @@ if [[ $RELEASE == "trusty" ]]; then d=$DEST/cache/sdcard/usr/share/backgrounds/xfce/ test -d "$d" || mkdir -p "$d" && cp $SRC/lib/bin/armbian*.jpg "$d" chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/trusty-desktop.tgz -C /etc/skel/" + chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/trusty-desktop.tgz -C /etc/root/" fi # Install custom icons and theme From e4e8fe1d0e851e1ae45d2a70477abf76104544e5 Mon Sep 17 00:00:00 2001 From: Thomas Kaiser Date: Fri, 26 Feb 2016 18:09:20 +0100 Subject: [PATCH 3/3] Fix silly copy&paste error in desktop.sh --- desktop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop.sh b/desktop.sh index 08a3ddbbdd..a8422d7d19 100644 --- a/desktop.sh +++ b/desktop.sh @@ -43,7 +43,7 @@ if [[ $RELEASE == "trusty" ]]; then d=$DEST/cache/sdcard/usr/share/backgrounds/xfce/ test -d "$d" || mkdir -p "$d" && cp $SRC/lib/bin/armbian*.jpg "$d" chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/trusty-desktop.tgz -C /etc/skel/" - chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/trusty-desktop.tgz -C /etc/root/" + chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/trusty-desktop.tgz -C /root/" fi # Install custom icons and theme