Add utilite script, kernel config and patches
This commit is contained in:
4148
kernel-configs/utilite-3.10.config
Normal file
4148
kernel-configs/utilite-3.10.config
Normal file
File diff suppressed because it is too large
Load Diff
49
patches/31727b0.patch
Normal file
49
patches/31727b0.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
commit 31727b0662fe8714509166fd322cd55013fa2a0c
|
||||
Author: Valentin Raevsky <valentin@compulab.co.il>
|
||||
Date: Wed Jun 17 09:59:44 2015 +0300
|
||||
|
||||
ARM: i.MX6: cm-fx6: Fix usdhc3 controller's property
|
||||
|
||||
Fix usdhc3 controller's property in ordert to match
|
||||
the sbc-fx6, sbc-fx6m hw implementation.
|
||||
|
||||
Signed-off-by: Valentin Raevsky <valentin@compulab.co.il>
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
|
||||
index 9fed3d9..76df2e3 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
|
||||
@@ -84,6 +84,7 @@
|
||||
|
||||
&usdhc3 {
|
||||
wp-gpios = <&gpio7 0 0>;
|
||||
+ cd-gpios = <&gpio7 1 0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi
|
||||
index c92136c..ec9bec3 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi
|
||||
@@ -94,6 +94,7 @@
|
||||
};
|
||||
|
||||
&usdhc3 {
|
||||
+ non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi
|
||||
index 01f73ae..f98a87d 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi
|
||||
@@ -103,8 +103,8 @@
|
||||
pinctrl-0 = <&pinctrl_usdhc3>;
|
||||
pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
|
||||
pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
|
||||
- cd-gpios = <&gpio7 1 0>;
|
||||
no-1-8-v;
|
||||
+ keep-power-in-suspend;
|
||||
vmmc-supply = <®_3p3v>;
|
||||
status = "disabled";
|
||||
};
|
||||
26
patches/f922b0d.patch
Normal file
26
patches/f922b0d.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
commit f922b0de95fb0107b67142b58d2aef169c8dc1c7
|
||||
Author: Valentin Raevsky <valentin@compulab.co.il>
|
||||
Date: Thu May 14 10:51:08 2015 +0300
|
||||
|
||||
ARM: i.MX6: HDMI: Fix HDMI PHY init hang
|
||||
|
||||
Remove the hdmi_enable_overflow_interrupts() function call from
|
||||
the mxc_hdmi_phy_init(). This fix addresses the HDMI PHY init hang.
|
||||
This occurs in case that the HDMI PHY has been turned on by the U-Boot.
|
||||
|
||||
Signed-off-by: Valentin Raevsky <valentin@compulab.co.il>
|
||||
|
||||
diff --git a/drivers/video/mxc/mxc_hdmi.c b/drivers/video/mxc/mxc_hdmi.c
|
||||
index e510025..57382ca 100644
|
||||
--- a/drivers/video/mxc/mxc_hdmi.c
|
||||
+++ b/drivers/video/mxc/mxc_hdmi.c
|
||||
@@ -1267,9 +1267,6 @@ static void mxc_hdmi_phy_init(struct mxc_hdmi *hdmi)
|
||||
|| (hdmi->blank != FB_BLANK_UNBLANK))
|
||||
return;
|
||||
|
||||
- if (!hdmi->hdmi_data.video_mode.mDVI)
|
||||
- hdmi_enable_overflow_interrupts();
|
||||
-
|
||||
/*check csc whether needed activated in HDMI mode */
|
||||
cscon = (isColorSpaceConversion(hdmi) &&
|
||||
!hdmi->hdmi_data.video_mode.mDVI);
|
||||
93
utilite.sh
93
utilite.sh
@@ -4,7 +4,7 @@
|
||||
# A trusted Kali Linux image created by Offensive Security - http://www.offensive-security.com
|
||||
|
||||
if [[ $# -eq 0 ]] ; then
|
||||
echo "Please pass version number, e.g. $0 1.0.1"
|
||||
echo "Please pass version number, e.g. $0 2.0"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -30,21 +30,22 @@ unset CROSS_COMPILE
|
||||
# script will throw an error, but will still continue on, and create an unusable
|
||||
# image, keep that in mind.
|
||||
|
||||
arm="abootimg cgpt fake-hwclock ntpdate vboot-utils vboot-kernel-utils uboot-mkimage"
|
||||
base="kali-menu kali-defaults initramfs-tools usbutils"
|
||||
desktop="xfce4 network-manager network-manager-gnome xserver-xorg-video-fbdev"
|
||||
tools="passing-the-hash winexe aircrack-ng hydra john sqlmap wireshark libnfc-bin mfoc"
|
||||
services="openssh-server apache2"
|
||||
extras="iceweasel wpasupplicant"
|
||||
arm="abootimg cgpt fake-hwclock ntpdate u-boot-tools vboot-utils vboot-kernel-utils"
|
||||
base="btrfs-tools e2fsprogs initramfs-tools kali-defaults kali-menu parted sudo usbutils"
|
||||
desktop="fonts-croscore fonts-crosextra-caladea fonts-crosextra-carlito gnome-theme-kali gtk3-engines-xfce kali-desktop-xfce kali-root-login lightdm network-manager network-manager-gnome xfce4 xserver-xorg-video-fbdev"
|
||||
tools="aircrack-ng ethtool hydra john libnfc-bin mfoc nmap passing-the-hash sqlmap usbutils winexe wireshark"
|
||||
services="apache2 openssh-server"
|
||||
#extras="bash-completion command-not-found docker.io htop kali-linux-full iceweasel pv xfce4-goodies xfce4-terminal wpasupplicant"
|
||||
extras="iceweasel xfce4-terminal wpasupplicant"
|
||||
|
||||
export packages="${arm} ${base} ${desktop} ${tools} ${services} ${extras}"
|
||||
export architecture="armhf"
|
||||
packages="${arm} ${base} ${desktop} ${tools} ${services} ${extras}"
|
||||
architecture="armhf"
|
||||
# If you have your own preferred mirrors, set them here.
|
||||
# You may want to leave security.kali.org alone, but if you trust your local
|
||||
# mirror, feel free to change this as well.
|
||||
# After generating the rootfs, we set the sources.list to the default settings.
|
||||
export mirror=http.kali.org
|
||||
export security=security.kali.org
|
||||
mirror=repo.kali.org
|
||||
security=security.kali.org
|
||||
|
||||
# Set this to use an http proxy, like apt-cacher-ng, and uncomment further down
|
||||
# to unset it.
|
||||
@@ -54,14 +55,14 @@ mkdir -p ${basedir}
|
||||
cd ${basedir}
|
||||
|
||||
# create the rootfs - not much to modify here, except maybe the hostname.
|
||||
debootstrap --foreign --arch $architecture kali kali-$architecture http://$mirror/kali
|
||||
debootstrap --foreign --arch $architecture sana kali-$architecture http://$mirror/kali
|
||||
|
||||
cp /usr/bin/qemu-arm-static kali-$architecture/usr/bin/
|
||||
|
||||
LANG=C chroot kali-$architecture /debootstrap/debootstrap --second-stage
|
||||
cat << EOF > kali-$architecture/etc/apt/sources.list
|
||||
deb http://$mirror/kali kali main contrib non-free
|
||||
deb http://$mirror/kali-security kali/updates main contrib non-free
|
||||
deb http://$mirror/kali sana main contrib non-free
|
||||
deb http://$security/kali-security sana/updates main contrib non-free
|
||||
EOF
|
||||
|
||||
# Set hostname
|
||||
@@ -114,12 +115,15 @@ apt-get install locales-all
|
||||
debconf-set-selections /debconf.set
|
||||
rm -f /debconf.set
|
||||
apt-get update
|
||||
apt-get -y install git-core binutils ca-certificates initramfs-tools uboot-mkimage
|
||||
apt-get -y install git-core binutils ca-certificates initramfs-tools u-boot-tools
|
||||
apt-get -y install locales console-common less nano git
|
||||
echo "root:toor" | chpasswd
|
||||
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
|
||||
rm -f /etc/udev/rules.d/70-persistent-net.rules
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get --yes --force-yes install $packages
|
||||
apt-get --yes --force-yes dist-upgrade
|
||||
apt-get --yes --force-yes autoremove
|
||||
|
||||
rm -f /usr/sbin/policy-rc.d
|
||||
rm -f /usr/sbin/invoke-rc.d
|
||||
@@ -152,7 +156,7 @@ umount kali-$architecture/proc
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file for Utilite"
|
||||
dd if=/dev/zero of=${basedir}/kali-$1-utilite.img bs=1M count=7000
|
||||
dd if=/dev/zero of=${basedir}/kali-$1-utilite.img bs=1M count=1 seek=7000
|
||||
parted kali-$1-utilite.img --script -- mklabel msdos
|
||||
parted kali-$1-utilite.img --script -- mkpart primary fat32 2048s 264191s
|
||||
parted kali-$1-utilite.img --script -- mkpart primary ext4 264192s 100%
|
||||
@@ -166,7 +170,7 @@ rootp=${device}p2
|
||||
|
||||
# Create file systems
|
||||
mkfs.vfat $bootp
|
||||
mkfs.ext4 $rootp
|
||||
mkfs.btrfs $rootp
|
||||
|
||||
# Create the dirs for the partitions and mount them
|
||||
mkdir -p ${basedir}/bootp ${basedir}/root
|
||||
@@ -188,11 +192,11 @@ ttymxc3
|
||||
EOF
|
||||
|
||||
cat << EOF > ${basedir}/root/etc/apt/sources.list
|
||||
deb http://http.kali.org/kali kali main non-free contrib
|
||||
deb http://security.kali.org/kali-security kali/updates main contrib non-free
|
||||
deb http://http.kali.org/kali sana main non-free contrib
|
||||
deb http://security.kali.org/kali-security sana/updates main contrib non-free
|
||||
|
||||
deb-src http://http.kali.org/kali kali main non-free contrib
|
||||
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
|
||||
deb-src http://http.kali.org/kali sana main non-free contrib
|
||||
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free
|
||||
EOF
|
||||
|
||||
# Uncomment this if you use apt-cacher-ng otherwise git clones will fail
|
||||
@@ -200,25 +204,60 @@ EOF
|
||||
|
||||
# Kernel section. If you want to use a custom kernel, or configuration, replace
|
||||
# them in this section.
|
||||
# For now, use the 3.0 kernel. Latest kernel is 3.10, but needs a new u-boot.
|
||||
git clone --branch utilite/devel --depth 1 https://github.com/utilite-computer/linux-kernel-3.0 ${basedir}/kernel
|
||||
cd ${basedir}/kernel
|
||||
git clone --branch utilite/devel --depth 1 https://github.com/utilite-computer/linux-kernel ${basedir}/root/usr/src/kernel
|
||||
cd ${basedir}/root/usr/src/kernel
|
||||
git rev-parse HEAD > ../kernel-at-commit
|
||||
patch -p1 --no-backup-if-mismatch < ${basedir}/../patches/mac80211.patch
|
||||
cp ${basedir}/../kernel-configs/utilite.config .config
|
||||
# Needed for issues with hdmi being inited already in u-boot.
|
||||
patch -p1 --no-backup-if-mismatch < ${basedir}/../patches/f922b0d.patch
|
||||
# This patch is necessary for older revisions of the Utilite so leave the patch
|
||||
# and comment in the repo to know why this is here. Should be fixed by a u-boot
|
||||
# upgrade but CompuLab haven't released it yet, so leave it here for now.
|
||||
#patch -p1 --no-backup-if-mismatch < ${basedir}/../patches/31727b0.patch
|
||||
cp ${basedir}/../kernel-configs/utilite-3.10.config .config
|
||||
cp ${basedir}/../kernel-configs/utilite-3.10.config ../utilite-3.10.config
|
||||
touch .scmversion
|
||||
export ARCH=arm
|
||||
export CROSS_COMPILE=arm-linux-gnueabihf-
|
||||
make -j $(grep -c processor /proc/cpuinfo) uImage modules
|
||||
make -j $(grep -c processor /proc/cpuinfo)
|
||||
make modules_install INSTALL_MOD_PATH=${basedir}/root
|
||||
cp arch/arm/boot/uImage ${basedir}/bootp/uImage-cm-fx6
|
||||
cp arch/arm/boot/zImage ${basedir}/bootp/zImage-cm-fx6
|
||||
cp arch/arm/boot/dts/imx6q-sbc-fx6m.dtb ${basedir}/bootp/imx6q-sbc-fx6m.dtb
|
||||
make mrproper
|
||||
cp ../utilite-3.10.config .config
|
||||
make modules_prepare
|
||||
cd ${basedir}
|
||||
|
||||
# Create a file to set up our u-boot environment
|
||||
cat << EOF > ${basedir}/bootp/boot.txt
|
||||
setenv mmcdev 2
|
||||
setenv bootargs 'quiet earlyprintk console=ttymxc3,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=btrfs rw rootwait'
|
||||
setenv loadaddr 0x10800000
|
||||
setenv fdtaddr 0x15000000
|
||||
setenv bootm_low 0x15000000
|
||||
setenv zimage zImage-cm-fx6
|
||||
setenv dtb imx6q-sbc-fx6m.dtb
|
||||
#setenv kernel uImage-cm-fx6
|
||||
|
||||
load mmc \${mmcdev}:1 \${loadaddr} \${zimage}
|
||||
load mmc \${mmcdev}:1 \${fdtaddr} \${dtb}
|
||||
bootz \${loadaddr} - \${fdtaddr}
|
||||
#load mmc \${mmcdev}:1 \${loadaddr} \${kernel}
|
||||
#bootm \${loadaddr}
|
||||
EOF
|
||||
|
||||
# And generate the boot.scr
|
||||
mkimage -A arm -T script -C none -d ${basedir}/bootp/boot.txt ${basedir}/bootp/boot.scr
|
||||
|
||||
rm -rf ${basedir}/root/lib/firmware
|
||||
cd ${basedir}/root/lib
|
||||
git clone --depth 1 https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git firmware
|
||||
rm -rf ${basedir}/root/lib/firmware/.git
|
||||
cd ${basedir}
|
||||
|
||||
cp ${basedir}/../misc/zram ${basedir}/root/etc/init.d/zram
|
||||
chmod +x ${basedir}/root/etc/init.d/zram
|
||||
|
||||
# Unmount partitions
|
||||
umount $bootp
|
||||
umount $rootp
|
||||
|
||||
Reference in New Issue
Block a user