Cleaned up image creation, made functional installation scripts
Cleaned up build files, resources, scripts. Made the image use a partition map to fix mmc issues Signed-off-by: SolidHal <solidhal@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									2f162bce46
								
							
						
					
					
						commit
						d0403b14e3
					
				
							
								
								
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,6 +1,3 @@ | ||||
| devuan-jessie-c201-libre-*GB.img | ||||
| linux-* | ||||
| open-ath9k-htc-firmware | ||||
| debian-stretch-c201-libre-*GB.img | ||||
| librean-stretch-c201-libre-*GB.img | ||||
| 
 | ||||
| PrawnOS-Alpha-c201-libre-2GB.img | ||||
|  | ||||
							
								
								
									
										24
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								README.md
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | ||||
| # Librean | ||||
| # PrawnOS | ||||
| 
 | ||||
| A build system for making blobless debian and mainline kernel for the Asus c201 Chromebook | ||||
| 
 | ||||
| @ -8,7 +8,7 @@ No blobs, anywhere. | ||||
| Support for Aetheros AR271 usb wifi dongles through the open source firmware | ||||
| Minimal toolset intended as a based, including tools to setup a wifi connection | ||||
| Sources from only main, not contrib or non-free which keeps Debian libre | ||||
| TODO: basic graphical desktop like xfce | ||||
| Currently PrawnOS supports lxqt, with plans to include xfce as an option in the future | ||||
| 
 | ||||
| ### why | ||||
| 
 | ||||
| @ -16,7 +16,7 @@ Combined with libreboot,an AR271 wifi dongle, and a libre OS (like Debian, the o | ||||
| 
 | ||||
| ### Dependencies | ||||
| 
 | ||||
| Librean has been tested on Debian 9 Stretch (in a vm) | ||||
| Building PrawnOS has been tested on Debian 9 Stretch (in a vm) | ||||
| These packages are required: | ||||
| 
 | ||||
| ``` | ||||
| @ -26,7 +26,7 @@ These packages are required: | ||||
| 	        u-boot-tools \ | ||||
| 		gcc make libc-dev wget g++ cmake \ | ||||
| 		binfmt-support qemu-user-static debootstrap \ | ||||
| 		lzip libssl-dev libncurses-dev flex bison | ||||
| 		lzip libssl-dev libncurses-dev flex bison sudo patch | ||||
| ``` | ||||
| 
 | ||||
| ### Build | ||||
| @ -36,22 +36,20 @@ Run the kernel one then the fs one. | ||||
| ### Install | ||||
| Write the 2GB image to a flash drive, which contains the full 15GB (acutally 14.7GB) to write to the internal storage. We can do this since the 15GB image is a sparse file.  | ||||
| ``` | ||||
| sudo dd if=debian-stretch-c201-libre-2GB.img of=/dev/$USB_DEVICE bs=50M | ||||
| sudo dd if=PrawnOs-Alpha-c201-libre-2GB.img of=/dev/$USB_DEVICE bs=50M | ||||
| ``` | ||||
| 
 | ||||
| Now on the C201, login as root. The password is blank.  | ||||
| Write the 15GB image to the internal storage | ||||
| For me this was /dev/mmcblk2 but it may be /dev/mmcblk1 for you depending on what device it assigns to sdcards | ||||
| 
 | ||||
| ``` | ||||
| dd if=/debian-stretch-c201-libre-2GB.img of=/dev/$DEVICE bs=50M | ||||
| ``` | ||||
| WIP | ||||
| 
 | ||||
| Reboot. Run /Install.sh which will install xfce, wicd, and some device configurations. This will reboot one last time when done. | ||||
| Reboot. Run /Install.sh which will install lxqt, wicd, and some device configurations. This will reboot one last time when done. | ||||
| ``` | ||||
| /Install.sh | ||||
| ``` | ||||
| You should now be greeted by the xfce login screen.  | ||||
| You should now be greeted by a login screen.  | ||||
| 
 | ||||
| If you just want a basic enviroment without xfce upu can skip running Install.sh but I recommend installing wicd-curses for wifi configuration.  | ||||
| 
 | ||||
| @ -69,15 +67,15 @@ Check out the instructions here: https://github.com/SolidHal/AsusC201-usb-wifi-f | ||||
| 
 | ||||
| ### Troubleshooting | ||||
| 
 | ||||
| The pulse audio mixer will only run if you are logged in as a non root account. This is an issue (feature?) of pulse audio | ||||
| The pulse audio mixer will only run if you are logged in as a non-root account. This is an issue (feature?) of pulse audio | ||||
| 
 | ||||
| ### Credits and Legal Information | ||||
| 
 | ||||
| Thanks to dimkr for his great devsus scripts, from which Librean took much inspiration | ||||
| Thanks to dimkr for his great devsus scripts, from which PrawnOS took much inspiration | ||||
| https://github.com/dimkr/devsus | ||||
| 
 | ||||
| Because of this started as a fork of devsus, much of this repos history can be found at https://github.com/SolidHal/devsus/tree/hybrid_debian | ||||
| 
 | ||||
| Librean is free and unencumbered software released under the terms of the GNU | ||||
| PrawnOS is free and unencumbered software released under the terms of the GNU | ||||
| General Public License, version 2; see COPYING for the license text. For a list | ||||
| of its authors and contributors, see AUTHORS. | ||||
|  | ||||
							
								
								
									
										13
									
								
								TODO.txt
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								TODO.txt
									
									
									
									
									
								
							| @ -1,13 +0,0 @@ | ||||
| Investigate CONFIG_DRM_PANEL_LVDS vs CONFIG_DRM_PANEL_SIMPLE | ||||
| 
 | ||||
| CONFIG_DRM_DW_HDMI_I2S_AUDIO vs CONFIG_DRM_DW_HDMI_AHB_AUDIO | ||||
| 
 | ||||
|  CONFIG_IIO_CROS_EC_SENSORS_CORE vs CONFIG_IIO_CROS_EC_ACCEL_LEGACY | ||||
| (probably the first??) | ||||
| tried the first, didn't change anything obvious. Further testing required.  | ||||
| 
 | ||||
| Enable boot logo? Device Drivers->Graphics support->Bootup logo | ||||
| 
 | ||||
| 
 | ||||
| Added: | ||||
| better sound support? HDMI support? | ||||
							
								
								
									
										
											BIN
										
									
								
								blank_kernel
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								blank_kernel
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										6
									
								
								buildLibrean.sh → buildPrawnOS.sh
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										6
									
								
								buildLibrean.sh → buildPrawnOS.sh
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| @ -5,6 +5,8 @@ | ||||
| #Get sudo | ||||
| sudo echo "Thanks." | ||||
| #Build kernel WITHOUT SUDO, building the kernel with sudo is bad practice | ||||
| ./buildKernel.sh | ||||
| #Once, sometime in the kernel version 2 days building the kernel with sudo broke the | ||||
| #The system it was built on | ||||
| #./scripts/buildKernel.sh | ||||
| #build os WITH sudo, debootstrap requires sudo | ||||
| sudo ./buildDebian.sh | ||||
| sudo ./scripts/buildDebianFs.sh | ||||
							
								
								
									
										9
									
								
								resources/InstallResources/mmc.partmap
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								resources/InstallResources/mmc.partmap
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | ||||
| label: gpt | ||||
| label-id: EBA5A923-2F33-7C4E-AC9A-1555FD600D19 | ||||
| device: /dev/mmcblk2 | ||||
| unit: sectors | ||||
| first-lba: 34 | ||||
| last-lba: 30785502 | ||||
| 
 | ||||
| /dev/mmcblk2p1 : start=       20480, size=       65536, type=FE3A2A5D-4F32-41A7-B725-ACCC3285A309, uuid=89B31CDB-1147-5241-8271-C1ADBB9BBB44, name="Kernel", attrs="GUID:49,51,52,54,56" | ||||
| /dev/mmcblk2p2 : start=       86016, size=    30699486, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=63DB8E49-63C4-984E-90A0-8AC3222C4771, name="Root" | ||||
							
								
								
									
										18
									
								
								Install.sh → scripts/InstallScripts/InstallPackages.sh
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										18
									
								
								Install.sh → scripts/InstallScripts/InstallPackages.sh
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| @ -1,19 +1,23 @@ | ||||
| #!/bin/sh -xe | ||||
| 
 | ||||
| #Setup locales | ||||
| DIR=/InstallResources | ||||
| 
 | ||||
| #Setup locales, crda | ||||
| apt install -y locales | ||||
| #Install xfce, wicd | ||||
| dpkg-reconfigure locale | ||||
| apt install -y crda | ||||
| locale-gen | ||||
| #Install lxqt, wicd | ||||
| apt install -y xorg acpi-support lightdm tasksel dpkg librsvg2-common xorg xserver-xorg-input-libinput alsa-utils anacron avahi-daemon eject iw libnss-mdns xdg-utils lxqt wicd-daemon wicd wicd-curses wicd-gtk xserver-xorg-input-synaptics | ||||
| #Copy in acpi, pulse audio, trackpad settings, funtion key settings | ||||
| cp -rf /os_configs/default.pa /etc/pulse/default.pa | ||||
| cp -rf $DIR/default.pa /etc/pulse/default.pa | ||||
| mkdir /etc/acpi | ||||
| cp -rf /os_configs/sound.sh /etc/acpi/sound.sh | ||||
| cp -rf $DIR/sound.sh /etc/acpi/sound.sh | ||||
| mkdir /etc/acpi/events | ||||
| cp -rf /os_configs/headphone-acpi-toggle /etc/acpi/events/headphone-acpi-toggle | ||||
| cp -rf $DIR/headphone-acpi-toggle /etc/acpi/events/headphone-acpi-toggle | ||||
| mkdir /etc/X11/xorg.conf.d/ | ||||
| cp -rf /os_configs/50-synaptics.conf /etc/X11/xorg.conf.d/ | ||||
| cp -rf $DIR/50-synaptics.conf /etc/X11/xorg.conf.d/ | ||||
| 
 | ||||
| locale-gen | ||||
| 
 | ||||
| echo " Enter new username: " | ||||
| read username | ||||
							
								
								
									
										27
									
								
								scripts/InstallScripts/InstallToInternal.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										27
									
								
								scripts/InstallScripts/InstallToInternal.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,27 @@ | ||||
| #!/bin/bash | ||||
| 
 | ||||
| #Install PrawnOS to the internal emmc, this will partition the internal emmc | ||||
| #and erase ALL data on it | ||||
| 
 | ||||
| 
 | ||||
| RESOURCES=/InstallResources | ||||
| 
 | ||||
| read -p "This will ERASE ALL DATA ON THE INTERNAL STORAGE (EMMC) and reboot when finished, do you want to continue? [Y/n]" -n 1 -r | ||||
| echo  | ||||
| if [[ $REPLY =~ ^[Yy]$ ]] | ||||
| then | ||||
|     echo Writing partition map | ||||
|     sfdisk /dev/mmcblk2 < $RESOURCES/mmc.partmap | ||||
|     echo Writing kernel partition | ||||
|     dd if=/dev/sda1 of=/dev/mmcblk2p1 | ||||
|     echo Writing Filesystem, this will take a moment... | ||||
|     #Set the post install script to run after reboot | ||||
|     ./$RESOURCES/runonce.sh $RESOURCES/InstallPackages.sh | ||||
|     dd if=/dev/sda2 of=/dev/mmcblk2p2 bs=50M | ||||
|     echo Expanding Filesystem | ||||
|     e2fsck -p /dev/mmcblk2p2 | ||||
|     resize2fs /dev/mmcblk2p2 | ||||
|     echo Rebooting... Please remove the usb drive once shutdown is complete | ||||
| fi | ||||
| 
 | ||||
| echo Exiting | ||||
							
								
								
									
										5
									
								
								scripts/InstallScripts/InstallToUSB.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								scripts/InstallScripts/InstallToUSB.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | ||||
| 
 | ||||
| #!/bin/bash | ||||
| 
 | ||||
| #Install PrawnOS to an external device, the first usb by default | ||||
| 
 | ||||
							
								
								
									
										46
									
								
								scripts/InstallScripts/runonce.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										46
									
								
								scripts/InstallScripts/runonce.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,46 @@ | ||||
| #!/bin/bash | ||||
| 
 | ||||
| if [[ $# -eq 0 ]]; then | ||||
|     echo "Schedules a command to be run after the next reboot." | ||||
|     echo "Usage: $(basename $0) <command>" | ||||
|     echo "       $(basename $0) -p <path> <command>" | ||||
|     echo "       $(basename $0) -r <command>" | ||||
| else | ||||
|     REMOVE=0 | ||||
|     COMMAND=${!#} | ||||
|     SCRIPTPATH=$PATH | ||||
| 
 | ||||
|     while getopts ":r:p:" optionName; do | ||||
|         case "$optionName" in | ||||
|             r) REMOVE=1; COMMAND=$OPTARG;; | ||||
|             p) SCRIPTPATH=$OPTARG;; | ||||
|         esac | ||||
|     done | ||||
| 
 | ||||
|     SCRIPT="${HOME}/.$(basename $0)_$(echo $COMMAND | sed 's/[^a-zA-Z0-9_]/_/g')" | ||||
| 
 | ||||
|     if [[ ! -f $SCRIPT ]]; then | ||||
|         echo "PATH=$SCRIPTPATH" >> $SCRIPT | ||||
|         echo "cd $(pwd)"        >> $SCRIPT | ||||
|         echo "logger -t $(basename $0) -p local3.info \"COMMAND=$COMMAND ; USER=\$(whoami) ($(logname)) ; PWD=$(pwd) ; PATH=\$PATH\"" >> $SCRIPT | ||||
|         echo "$COMMAND | logger -t $(basename $0) -p local3.info" >> $SCRIPT | ||||
|         echo "$0 -r \"$(echo $COMMAND | sed 's/\"/\\\"/g')\""     >> $SCRIPT | ||||
|         chmod +x $SCRIPT | ||||
|     fi | ||||
| 
 | ||||
|     CRONTAB="${HOME}/.$(basename $0)_temp_crontab_$RANDOM" | ||||
|     ENTRY="@reboot $SCRIPT" | ||||
| 
 | ||||
|     echo "$(crontab -l 2>/dev/null)" | grep -v "$ENTRY" | grep -v "^# DO NOT EDIT THIS FILE - edit the master and reinstall.$" | grep -v "^# ([^ ]* installed on [^)]*)$" | grep -v "^# (Cron version [^$]*\$[^$]*\$)$" > $CRONTAB | ||||
| 
 | ||||
|     if [[ $REMOVE -eq 0 ]]; then | ||||
|         echo "$ENTRY" >> $CRONTAB | ||||
|     fi | ||||
| 
 | ||||
|     crontab $CRONTAB | ||||
|     rm $CRONTAB | ||||
| 
 | ||||
|     if [[ $REMOVE -ne 0 ]]; then | ||||
|         rm $SCRIPT | ||||
|     fi | ||||
| fi | ||||
| @ -6,37 +6,31 @@ | ||||
| KVER=4.17.2 | ||||
| 
 | ||||
| #Ensure Sudo | ||||
| if [[ $UID != 0 ]]; then | ||||
|     echo "Please run this script with sudo:" | ||||
| if [ ! $UID = "0" ] | ||||
| then | ||||
|     echo "Please run this script with sudo, or as root:" | ||||
|     echo "sudo $0 $*" | ||||
|     exit 1 | ||||
| fi | ||||
| 
 | ||||
| outmnt=$(mktemp -d -p `pwd`) | ||||
| inmnt=$(mktemp -d -p `pwd`) | ||||
| 
 | ||||
| outdev=/dev/loop4 | ||||
| indev=/dev/loop5 | ||||
| 
 | ||||
| install_resources=resources/InstallResources | ||||
| build_resources=resources/BuildResources | ||||
| 
 | ||||
| #A hacky way to ensure the loops are properly unmounted and the temp files are properly deleted. | ||||
| #Without this, a reboot is sometimes required to properly clean the loop devices and ensure a clean build  | ||||
| cleanup() { | ||||
|   set +e | ||||
| 
 | ||||
|   umount -l $inmnt > /dev/null 2>&1 | ||||
|   rmdir $inmnt > /dev/null 2>&1 | ||||
|   losetup -d $indev > /dev/null 2>&1 | ||||
| 
 | ||||
|   umount -l $outmnt > /dev/null 2>&1 | ||||
|   rmdir $outmnt > /dev/null 2>&1 | ||||
|   losetup -d $outdev > /dev/null 2>&1 | ||||
| 
 | ||||
|   set +e | ||||
| 
 | ||||
|   umount -l $inmnt > /dev/null 2>&1 | ||||
|   rmdir $inmnt > /dev/null 2>&1 | ||||
|   losetup -d $indev > /dev/null 2>&1 | ||||
| 
 | ||||
|   umount -l $outmnt > /dev/null 2>&1 | ||||
|   rmdir $outmnt > /dev/null 2>&1 | ||||
|   losetup -d $outdev > /dev/null 2>&1 | ||||
| @ -64,7 +58,7 @@ create_image() { | ||||
| } | ||||
| 
 | ||||
| # create a 2GB image with the Chrome OS partition layout | ||||
| create_image librean-stretch-c201-libre-2GB.img $outdev 50M 40 $outmnt | ||||
| create_image PrawnOS-Alpha-c201-libre-2GB.img $outdev 50M 40 $outmnt | ||||
| 
 | ||||
| # install Debian on it | ||||
| export LC_ALL="en_US.UTF-8" #Change this as necessary if not US | ||||
| @ -73,18 +67,18 @@ qemu-debootstrap --arch armhf stretch --include locales,init $outmnt http://deb. | ||||
| chroot $outmnt passwd -d root | ||||
| 
 | ||||
| #Place the config files and installer script and give them the proper permissions | ||||
| echo -n librean > $outmnt/etc/hostname | ||||
| cp -R os_configs/ $outmnt/os_configs/ | ||||
| cp Install.sh $outmnt/Install.sh | ||||
| chmod +x $outmnt/os_configs/sound.sh | ||||
| chmod +x $outmnt/Install.sh | ||||
| echo -n PrawnOS-Alpha > $outmnt/etc/hostname | ||||
| cp -R $install_resources/ $outmnt/InstallResources/ | ||||
| cp scripts/InstallScripts/* $outmnt/InstallResources/ | ||||
| cp scripts/InstallScripts/InstallToInternal.sh $outmnt/ | ||||
| chmod +x $outmnt/*.sh | ||||
| 
 | ||||
| #install -D -m 644 80disable-recommends $outmnt/etc/apt/apt.conf.d/80disable-recommends #This should fix the issue of crda being installed but unconfigured causing regulatory.db firmware loading errors in dmesg | ||||
| install -D -m 644 $build_resources/80disable-recommends $outmnt/etc/apt/apt.conf.d/80disable-recommends #This should fix the issue of crda being installed but unconfigured causing regulatory.db firmware loading errors in dmesg | ||||
| 
 | ||||
| #Setup the chroot for apt  | ||||
| #This is what https://wiki.debian.org/EmDebian/CrossDebootstrap suggests | ||||
| cp /etc/hosts $outmnt/etc/ | ||||
| cp sources.list $outmount/etc/apt/sources.list | ||||
| cp $build_resources/sources.list $outmount/etc/apt/sources.list | ||||
| 
 | ||||
| #Setup the locale | ||||
| cp /etc/locale.gen $outmnt/etc/ | ||||
| @ -98,33 +92,19 @@ chroot $outmnt apt-get autoremove --purge | ||||
| chroot $outmnt apt-get clean | ||||
| 
 | ||||
| #Download the packages to be installed by Install.sh: TODO: potentially dpkg-reconfigure locales? | ||||
| chroot $outmnt apt-get install -y -d xorg acpi-support lightdm tasksel dpkg librsvg2-common xorg xserver-xorg-input-libinput alsa-utils anacron avahi-daemon eject iw libnss-mdns xdg-utils lxqt wicd-daemon wicd wicd-curses wicd-gtk xserver-xorg-input-synaptics | ||||
| chroot $outmnt apt-get install -y -d xorg acpi-support lightdm tasksel dpkg librsvg2-common xorg xserver-xorg-input-libinput alsa-utils anacron avahi-daemon eject iw libnss-mdns xdg-utils lxqt wicd-daemon wicd wicd-curses wicd-gtk xserver-xorg-input-synaptics crda | ||||
| 
 | ||||
| #Cleanup hosts | ||||
| rm -rf $outmnt/etc/hosts #This is what https://wiki.debian.org/EmDebian/CrossDebootstrap suggests | ||||
| echo -n "127.0.0.1        librean" > $outmnt/etc/hosts | ||||
| echo -n "127.0.0.1        PrawnOS-Alpha" > $outmnt/etc/hosts | ||||
| 
 | ||||
| # put the kernel in the kernel partition, modules in /lib/modules and AR9271 | ||||
| # firmware in /lib/firmware | ||||
| dd if=linux-$KVER/vmlinux.kpart of=${outdev}p1 conv=notrunc | ||||
| make -C linux-$KVER ARCH=arm INSTALL_MOD_PATH=$outmnt modules_install | ||||
| dd if=build/linux-$KVER/vmlinux.kpart of=${outdev}p1 conv=notrunc | ||||
| make -C build/linux-$KVER ARCH=arm INSTALL_MOD_PATH=$outmnt modules_install | ||||
| rm -f $outmnt/lib/modules/3.14.0/{build,source} | ||||
| install -D -m 644 open-ath9k-htc-firmware/target_firmware/htc_9271.fw $outmnt/lib/firmware/ath9k_htc/htc_9271-1.4.0.fw | ||||
| install -D -m 644 build/open-ath9k-htc-firmware/target_firmware/htc_9271.fw $outmnt/lib/firmware/ath9k_htc/htc_9271-1.4.0.fw | ||||
| 
 | ||||
| # create a 15GB image | ||||
| create_image librean-stretch-c201-libre-15GB.img $indev 512 30777343 $inmnt | ||||
| 
 | ||||
| # copy the kernel and / of the 2GB image to the 15GB one | ||||
| dd if=${outdev}p1 of=${indev}p1 conv=notrunc | ||||
| cp -a $outmnt/* $inmnt/ | ||||
| 
 | ||||
| #Cleanup the 15GB image | ||||
| umount -l $inmnt | ||||
| rmdir $inmnt | ||||
| losetup -d $indev | ||||
| 
 | ||||
| # move the 15GB image inside the 2GB one | ||||
| cp -f librean-stretch-c201-libre-15GB.img $outmnt/ | ||||
| echo "DONE!" | ||||
| cleanup | ||||
| 
 | ||||
| @ -6,6 +6,10 @@ | ||||
| KVER=4.17.2 | ||||
| TEST_PATCHES=false | ||||
| 
 | ||||
| ROOT_DIR=`pwd` | ||||
| RESOURCES=$ROOT_DIR/resources/BuildResources | ||||
| 
 | ||||
| cd build | ||||
| # build Linux-libre, with ath9k_htc, dwc2 from Chrome OS and without many useless drivers | ||||
| [ ! -f linux-libre-$KVER-gnu.tar.lz ] && wget https://www.linux-libre.fsfla.org/pub/linux-libre/releases/$KVER-gnu/linux-libre-$KVER-gnu.tar.lz | ||||
| [ ! -d linux-$KVER ] && tar --lzip -xvf linux-libre-$KVER-gnu.tar.lz && FRESH=true | ||||
| @ -13,18 +17,18 @@ cd linux-$KVER | ||||
| make clean | ||||
| make mrproper | ||||
| #Apply the usb and mmc patches if unapplied | ||||
| [ "$FRESH" = true ] && for i in ../patches-tested/*.patch; do patch -p1 < $i; done | ||||
| [ "$FRESH" = true ] && for i in ../patches-tested/DTS/*.patch; do patch -p1 < $i; done | ||||
| [ "$FRESH" = true ] && for i in ../patches-tested/kernel/*.patch; do patch -p1 < $i; done | ||||
| [ "$FRESH" = true ] && for i in $RESOURCES/patches-tested/*.patch; do patch -p1 < $i; done | ||||
| [ "$FRESH" = true ] && for i in $RESOURCES/patches-tested/DTS/*.patch; do patch -p1 < $i; done | ||||
| [ "$FRESH" = true ] && for i in $RESOURCES/patches-tested/kernel/*.patch; do patch -p1 < $i; done | ||||
| #Apply all of the rockMyy patches that make sense | ||||
| [ "$TEST_PATCHES" = true ] && for i in ../patches-untested/kernel/*.patch; do patch -p1 < $i; done | ||||
| [ "$TEST_PATCHES" = true ] && for i in ../patches-untested/DTS/*.patch; do patch -p1 < $i; done | ||||
| [ "$TEST_PATCHES" = true ] && for i in $RESOURCES/patches-untested/kernel/*.patch; do patch -p1 < $i; done | ||||
| [ "$TEST_PATCHES" = true ] && for i in $RESOURCES/patches-untested/DTS/*.patch; do patch -p1 < $i; done | ||||
| # reset the minor version number, so out-of-tree drivers continue to work after | ||||
| # a kernel upgrade | ||||
| sed s/'SUBLEVEL = .*'/'SUBLEVEL = 0'/ -i Makefile | ||||
| cp ../config .config | ||||
| # a kernel upgrade **TODO - is this needed? | ||||
| # sed s/'SUBLEVEL = .*'/'SUBLEVEL = 0'/ -i Makefile | ||||
| cp $RESOURCES/config .config | ||||
| make -j `grep ^processor /proc/cpuinfo  | wc -l`  CROSS_COMPILE=arm-none-eabi- ARCH=arm zImage modules dtbs | ||||
| [ ! -h kernel.its ] && ln -s ../kernel.its . | ||||
| [ ! -h kernel.its ] && ln -s $RESOURCES/kernel.its . | ||||
| mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg | ||||
| dd if=/dev/zero of=bootloader.bin bs=512 count=1 | ||||
| vbutil_kernel --pack vmlinux.kpart \ | ||||
| @ -33,7 +37,7 @@ vbutil_kernel --pack vmlinux.kpart \ | ||||
|               --arch arm \ | ||||
|               --keyblock /usr/share/vboot/devkeys/kernel.keyblock \ | ||||
|               --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \ | ||||
|               --config ../cmdline \ | ||||
|               --config $RESOURCES/cmdline \ | ||||
|               --bootloader bootloader.bin | ||||
| cd .. | ||||
| 
 | ||||
| @ -44,3 +48,4 @@ cd open-ath9k-htc-firmware | ||||
| make toolchain | ||||
| make -C target_firmware | ||||
| cd .. | ||||
| cd $ROOT_DIR | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 SolidHal
						SolidHal