Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export DEBIAN_FRONTEND=noninteractive
- export ARCH=arm
- export CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-
- cd ~/
- apt-get update
- apt-get --yes --force-yes install emdebian-archive-keyring debootstrap qemu-user-static
- echo 'deb http://www.emdebian.org/debian unstable main' >> /etc/apt/sources.list
- apt-get update
- apt-get --yes --force-yes install gcc-4.7-arm-linux-gnueabihf git u-boot-tools lzop make gcc hdparm dosfstools bc
- ln -s /usr/bin/arm-linux-gnueabihf-gcc-4.7 /usr/bin/arm-linux-gnueabihf-gcc
- dd if=/dev/zero of=/dev/sdb bs=1M count=4
- git clone https://github.com/SolidRun/u-boot-imx6.git
- sed -i "s/CROSS_COMPILE ?= arm-linux-/CROSS_COMPILE ?= arm-linux-gnueabihf-/" u-boot-imx6/arch/arm/config.mk
- cd u-boot-imx6
- make mx6_cubox-i_config
- make
- dd if=SPL of=/dev/sdb bs=1K seek=1
- dd if=u-boot.img of=/dev/sdb bs=1K seek=42
- cd ..
- sync
- fdisk /dev/sdb
- o
- n
- p
- 1
- 2048
- +20M
- n
- p
- 2
- 43008
- +500M
- t
- 1
- c
- w
- hdparm -z /dev/sdb
- mkfs.vfat /dev/sdb1
- mkfs.ext4 /dev/sdb2
- sync
- git clone https://github.com/linux4kix/linux-linaro-stable-mx6.git -b linux-linaro-lsk-v3.14-mx6
- cd linux-linaro-stable-mx6
- make imx_v7_cbi_hb_defconfig
- echo '--------------- optional modify .config for a custom kernel ---------------'
- make zImage imx6q-cubox-i.dtb imx6dl-cubox-i.dtb imx6dl-hummingboard.dtb imx6q-hummingboard.dtb
- make modules
- mkdir ~/sdb1
- mount /dev/sdb1 ~/sdb1
- cp arch/arm/boot/zImage ~/sdb1/
- cp arch/arm/boot/dts/*.dtb ~/sdb1/
- mkdir ~/sdb2
- mount /dev/sdb2 ~/sdb2
- ARH=arm INSTALL_MOD_PATH=~/sdb2 make modules_install
- cd ..
- debootstrap --foreign --arch=armhf wheezy ~/sdb2 http://http.debian.net/debian
- cp /usr/bin/qemu-arm-static ~/sdb2/usr/bin/
- chroot ~/sdb2
- /debootstrap/debootstrap --second-stage
- echo -e "debian\ndebian" | (passwd root)
- echo debian > /etc/hostname
- echo 'T0:23:respawn:/sbin/getty -L ttymxc0 115200 vt100' >> /etc/inittab
- echo -e '/dev/mmcblk0p2\t/\text4\tdefaults,noatime\t0\t0\n/dev/mmcblk0p1\t/boot\tvfat\tro\t0\t0\n/proc\t/proc\tproc\tdefaults\t0\t0\n/tmpfs\t/tmp\ttmpfs\tdefaults\t0\t0\n/tmpfs\t/run\ttmpfs\tdefaults\t0\t0\n' >> /etc/fstab
- echo -e 'allow-hotplug eth0\niface eth0 inet dhcp' >> /etc/network/interfaces
- echo -e 'deb http://ftp.fr.debian.org/debian/ wheezy main\ndeb-src http://ftp.fr.debian.org/debian/ wheezy main\ndeb http://security.debian.org/ wheezy/updates main\ndeb-src http://security.debian.org/ wheezy/updates main\n' > /etc/apt/sources.list
- exit
- echo -e 'bootfile=zImage\nmmcargs=setenv bootargs root=/dev/mmcblk0p2 rootwait video=mxcfb0:dev=hdmi \
- consoleblank=0 ' > ~/sdb1/uEnv.txt
- umount /dev/sdb1
- umount /dev/sdb2
- sync
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement