Browse Source

split debootstrap and sunxi build

Émile Morel 10 years ago
parent
commit
070fc619d9
3 changed files with 45 additions and 38 deletions
  1. 6 1
      README.md
  2. 0 37
      olinux/create_arm_debootstrap.sh
  3. 39 0
      olinux/create_sunxi_boot_files.sh

+ 6 - 1
README.md

@@ -6,7 +6,7 @@ Bootstrap a minimal debian for olinuxino-a20-lime2
 Thanks to [lukas2511](https://github.com/lukas2511/olinuxino-a20-micro) for
 quick bootstrap.
 
-# Build minimal U-boot
+# Build docker image
 
 ```shell
 sudo docker pull debian:stable
@@ -24,7 +24,12 @@ issue](https://github.com/docker/docker/issues/1916)
 sudo docker run --privileged -i -t -v $(pwd)/olinux/:/olinux/ debian/olinux sh ./olinux/create_arm_debootstrap.sh
 ```
 
+# Build sunxi kernel and boot files
+
 You shoud have both debootstrap and sunxi directories in olinux/
+```shell
+sudo docker run --privileged -i -t -v $(pwd)/olinux/:/olinux/ debian/olinux sh ./olinux/create_sunxi_boot_files.sh
+```
 
 # Install on a sd card
 

+ 0 - 37
olinux/create_arm_debootstrap.sh

@@ -1,43 +1,6 @@
 #/bin/sh
 
 ######################
-#     Sunxi part     #
-######################
-
-# Sunxi u-boot
-if [ -d /olinux/sunxi/u-boot-sunxi/ ] ; then 
-  cd /olinux/sunxi/u-boot-sunxi/ && make clean && git pull 
-else
-  git clone -b sunxi https://github.com/linux-sunxi/u-boot-sunxi.git /olinux/sunxi/u-boot-sunxi
-fi
-
-cd /olinux/sunxi/u-boot-sunxi && make CROSS_COMPILE=arm-linux-gnueabihf A20-OLinuXino-Lime_config && make CROSS_COMPILE=arm-linux-gnueabihf-
-
-# Sunxi kernel
-if [ -d /olinux/sunxi/linux-sunxi/ ] ; then 
-  cd /olinux/sunxi/linux-sunxi/ && make clean && git pull 
-else
-  git clone https://github.com/linux-sunxi/linux-sunxi -b stage/sunxi-3.4 /olinux/sunxi/linux-sunxi
-fi
-
-cp /olinux/a20_defconfig /olinux/sunxi/linux-sunxi/arch/arm/configs/.
-cd /olinux/sunxi/linux-sunxi/ && make ARCH=arm a20_defconfig
-cd /olinux/sunxi/linux-sunxi/ && make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 uImage  
-cd /olinux/sunxi/linux-sunxi/ && make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 INSTALL_MOD_PATH=out modules
-cd /olinux/sunxi/linux-sunxi/ && make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 INSTALL_MOD_PATH=out modules_install
-
-# Sunxi fex2bin
-if [ -d /olinux/sunxi/sunxi-tools/ ] ; then 
-  cd /olinux/sunxi/sunxi-tools/ && make clean && git pull 
-else
- git clone https://github.com/linux-sunxi/sunxi-tools /olinux/sunxi/sunxi-tools 
-fi
-
-cd /olinux/sunxi/sunxi-tools/ && make
-cd /olinux/sunxi/ && ./sunxi-tools/fex2bin ../script.fex script.bin 
-cd /olinux/sunxi/ && chown +x script.bin 
-
-######################
 #  Debootstrap part  #
 ######################
 

+ 39 - 0
olinux/create_sunxi_boot_files.sh

@@ -0,0 +1,39 @@
+#/bin/sh
+
+######################
+#     Sunxi part     #
+######################
+
+# Sunxi u-boot
+if [ -d /olinux/sunxi/u-boot-sunxi/ ] ; then 
+  cd /olinux/sunxi/u-boot-sunxi/ && make clean && git pull 
+else
+  git clone -b sunxi https://github.com/linux-sunxi/u-boot-sunxi.git /olinux/sunxi/u-boot-sunxi
+fi
+
+cd /olinux/sunxi/u-boot-sunxi && make CROSS_COMPILE=arm-linux-gnueabihf A20-OLinuXino-Lime_config && make CROSS_COMPILE=arm-linux-gnueabihf-
+
+# Sunxi kernel
+if [ -d /olinux/sunxi/linux-sunxi/ ] ; then 
+  cd /olinux/sunxi/linux-sunxi/ && make clean && git pull 
+else
+  git clone https://github.com/linux-sunxi/linux-sunxi -b stage/sunxi-3.4 /olinux/sunxi/linux-sunxi
+fi
+
+cp /olinux/a20_defconfig /olinux/sunxi/linux-sunxi/arch/arm/configs/.
+cd /olinux/sunxi/linux-sunxi/ && make ARCH=arm a20_defconfig
+cd /olinux/sunxi/linux-sunxi/ && make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 uImage  
+cd /olinux/sunxi/linux-sunxi/ && make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 INSTALL_MOD_PATH=out modules
+cd /olinux/sunxi/linux-sunxi/ && make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 INSTALL_MOD_PATH=out modules_install
+
+# Sunxi fex2bin
+if [ -d /olinux/sunxi/sunxi-tools/ ] ; then 
+  cd /olinux/sunxi/sunxi-tools/ && make clean && git pull 
+else
+ git clone https://github.com/linux-sunxi/sunxi-tools /olinux/sunxi/sunxi-tools 
+fi
+
+cd /olinux/sunxi/sunxi-tools/ && make
+cd /olinux/sunxi/ && ./sunxi-tools/fex2bin ../script.fex script.bin 
+cd /olinux/sunxi/ && chown +x script.bin 
+