Commit 5d3064e9 authored by thiolliere's avatar thiolliere

make vexpress boot: zip + documentation

parent 6845d183
...@@ -29,10 +29,14 @@ build your image with for example ...@@ -29,10 +29,14 @@ build your image with for example
warning: you need write priviledge for the device warning: you need write priviledge for the device
There is also a script to compile linux kernel for QEMU emulation ## Build pibox-installer vexpress boot
in `make_vexpress_boot` directory.
You need gcc-arm-linux-gnueabihf to compile it pibox-installer download a linux kernel for the QEMU emulation of vexpress machine.
This vexpress boot can be compiled on linux using make-vexpress-boot python3 script.
requirements: `gcc-arm-linux-gnueabihf` and `zip`
run: `python3 make-vexpress-boot`
## Principle ## Principle
...@@ -48,7 +52,7 @@ Inside the emulator it builds ideascube with ansiblecube. ...@@ -48,7 +52,7 @@ Inside the emulator it builds ideascube with ansiblecube.
* run ansible-pull * run ansible-pull
* write image to the device * write image to the device
## build for windows ## Build for windows
On a windows machine install python3.5 and QEMU On a windows machine install python3.5 and QEMU
......
...@@ -8,7 +8,8 @@ from zipfile import ZipFile ...@@ -8,7 +8,8 @@ from zipfile import ZipFile
os.makedirs("build", exist_ok=True) os.makedirs("build", exist_ok=True)
os.chdir("build") os.chdir("build")
boot_dir = "vexpress-boot" boot_dir = "pibox-installer-vexpress-boot"
boot_zip = boot_dir + ".zip"
linux_version = "4.10" linux_version = "4.10"
linux_folder = "linux-" + linux_version linux_folder = "linux-" + linux_version
...@@ -16,7 +17,7 @@ linux_zip = linux_folder + ".zip" ...@@ -16,7 +17,7 @@ linux_zip = linux_folder + ".zip"
url = "https://github.com/torvalds/linux/archive/v{}.zip".format(linux_version) url = "https://github.com/torvalds/linux/archive/v{}.zip".format(linux_version)
print("--> make vexpress boot") print("--> make vexpress boot")
if os.path.isdir(boot_dir): if os.path.isdir(boot_zip):
print("nothing to do") print("nothing to do")
exit(0) exit(0)
...@@ -59,5 +60,11 @@ subprocess.check_call("make -j 2 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- all ...@@ -59,5 +60,11 @@ subprocess.check_call("make -j 2 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- all
print("--> create vexpress boot directory") print("--> create vexpress boot directory")
os.mkdir("../{}".format(boot_dir)) os.mkdir("../{}".format(boot_dir))
subprocess.check_call("cp .config arch/arm/boot/zImage arch/arm/boot/dts/vexpress-v2p-ca9.dtb ../{}".format(boot_dir), shell=True) subprocess.check_call("cp .config arch/arm/boot/zImage arch/arm/boot/dts/vexpress-v2p-ca9.dtb ../{}".format(boot_dir), shell=True)
os.chdir("..") os.chdir("..")
with open("{}/README.txt".format(boot_dir), "w+") as readme:
readme.write("""This is the kernel used by pibox-installer to boot the vexpress machine in QEMU
It has been generated by make-vexpress-boot script at https://framagit.org/ideascube/pibox-installer""")
readme.flush()
print("--> create vexpress boot zip archive")
subprocess.check_call("zip -r --move {} {}".format(boot_zip, boot_dir), shell=True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment