summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-boot/raspberrypi-mkimage/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-boot/raspberrypi-mkimage/files')
-rw-r--r--sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-args-uncompressed.txt12
-rw-r--r--sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-boot-uncompressed.txt17
-rw-r--r--sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed-python3.patch11
-rw-r--r--sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed.patch49
-rw-r--r--sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed.py45
5 files changed, 134 insertions, 0 deletions
diff --git a/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-args-uncompressed.txt b/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-args-uncompressed.txt
new file mode 100644
index 000000000000..09398b47eee8
--- /dev/null
+++ b/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-args-uncompressed.txt
@@ -0,0 +1,12 @@
+; kernel args (place at 0x00000100)
+0x00000005
+0x54410001
+0x00000001
+0x00001000
+0x00000000
+0x00000004
+0x54410002
+0x08000000
+0x00000000
+0x00000000
+0x00000000
diff --git a/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-boot-uncompressed.txt b/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-boot-uncompressed.txt
new file mode 100644
index 000000000000..1cf5888278af
--- /dev/null
+++ b/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-boot-uncompressed.txt
@@ -0,0 +1,17 @@
+; bootloader (place at 0x00000000)
+0xea000006
+0xe1a00000
+0xe1a00000
+0xe1a00000
+0xe1a00000
+0xe1a00000
+0xe1a00000
+0xe1a00000
+
+0xe3a00000
+0xe3a01042
+0xe3811c0c
+0xe59f2000
+0xe59ff000
+0x00000100
+0x00008000
diff --git a/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed-python3.patch b/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed-python3.patch
new file mode 100644
index 000000000000..f9d0c00602c8
--- /dev/null
+++ b/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed-python3.patch
@@ -0,0 +1,11 @@
+--- mkimage/imagetool-uncompressed.py
++++ mkimage/imagetool-uncompressed.py
+@@ -46,7 +47,7 @@
+ f = open(args.bootimage, "wb")
+
+ for m in mem:
+- f.write(chr(m))
++ f.write(chr(m).encode('latin1'))
+
+ f.write(kernel_image)
+ f.close()
diff --git a/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed.patch b/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed.patch
new file mode 100644
index 000000000000..6b12c95c0fbe
--- /dev/null
+++ b/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed.patch
@@ -0,0 +1,49 @@
+diff -ru raspberrypi-mkimage-0_p20120201.orig/imagetool-uncompressed.py raspberrypi-mkimage-0_p20120201/imagetool-uncompressed.py
+--- raspberrypi-mkimage-0_p20120201.orig/imagetool-uncompressed.py 2013-07-19 15:11:23.373837900 +0200
++++ raspberrypi-mkimage-0_p20120201/imagetool-uncompressed.py 2013-07-19 15:31:56.495421758 +0200
+@@ -3,15 +3,23 @@
+ import os
+ import re
+ import sys
++import argparse
+
+-try:
+- kernel_image = sys.argv[1]
+-except:
+- kernel_image = ""
+-
+-if kernel_image == "":
+- print("usage : imagetool-uncompressed.py <kernel image>");
+- sys.exit(0)
++parser = argparse.ArgumentParser(description='Prepare kernel files for Raspberry Pi bootloader')
++parser.add_argument('--force', '-f', action='store_true', default=False,
++ help='overwrite target file')
++parser.add_argument('kernel',
++ help='kernel file from /usr/src/linux*/arch/arm/boot/Image')
++parser.add_argument('bootimage',
++ help='file to be placed in /boot/kernel.img')
++args = parser.parse_args()
++if os.path.exists(args.bootimage) and not args.force:
++ print('Target file exists, use --force to override')
++ sys.exit(1)
++
++f = open(args.kernel, 'rb')
++kernel_image = f.read()
++f.close()
+
+ re_line = re.compile(r"0x(?P<value>[0-9a-f]{8})")
+
+@@ -35,11 +43,10 @@
+ load_to_mem("boot-uncompressed.txt", 0x00000000)
+ load_to_mem("args-uncompressed.txt", 0x00000100)
+
+-f = open("first32k.bin", "wb")
++f = open(args.bootimage, "wb")
+
+ for m in mem:
+ f.write(chr(m))
+
++f.write(kernel_image)
+ f.close()
+-
+-os.system("cat first32k.bin " + kernel_image + " > kernel.img")
diff --git a/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed.py b/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed.py
new file mode 100644
index 000000000000..46ff4fc8ea6b
--- /dev/null
+++ b/sys-boot/raspberrypi-mkimage/files/raspberrypi-mkimage-0_p20120201-imagetool-uncompressed.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python2
+
+import os
+import re
+import sys
+
+try:
+ kernel_image = sys.argv[1]
+except:
+ kernel_image = ""
+
+if kernel_image == "":
+ print("usage : imagetool-uncompressed.py <kernel image>");
+ sys.exit(0)
+
+re_line = re.compile(r"0x(?P<value>[0-9a-f]{8})")
+
+mem = [0 for i in range(32768)]
+
+def load_to_mem(name, addr):
+ f = open(name)
+
+ for l in f.readlines():
+ m = re_line.match(l)
+
+ if m:
+ value = int(m.group("value"), 16)
+
+ for i in range(4):
+ mem[addr] = int(value >> i * 8 & 0xff)
+ addr += 1
+
+ f.close()
+
+load_to_mem("boot-uncompressed.txt", 0x00000000)
+load_to_mem("args-uncompressed.txt", 0x00000100)
+
+f = open("first32k.bin", "wb")
+
+for m in mem:
+ f.write(chr(m))
+
+f.close()
+
+os.system("cat first32k.bin " + kernel_image + " > kernel.img")