summaryrefslogtreecommitdiffstats
path: root/classes/image-hdd.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/image-hdd.bbclass')
-rw-r--r--classes/image-hdd.bbclass19
1 files changed, 2 insertions, 17 deletions
diff --git a/classes/image-hdd.bbclass b/classes/image-hdd.bbclass
index 123c417..fb59c20 100644
--- a/classes/image-hdd.bbclass
+++ b/classes/image-hdd.bbclass
@@ -29,32 +29,17 @@ SYSLINUX_PROMPT = "0"
29SYSLINUX_TIMEOUT = "1" 29SYSLINUX_TIMEOUT = "1"
30SYSLINUX_LABELS = "boot" 30SYSLINUX_LABELS = "boot"
31LABELS_append = " ${SYSLINUX_LABELS} " 31LABELS_append = " ${SYSLINUX_LABELS} "
32SYSLINUX_DEFAULT_CONSOLE = "console=ttyS0,115200"
32 33
33inherit image_types boot-directdisk 34inherit image_types boot-directdisk
34 35
35create_hdd_image () { 36create_hdd_image () {
36 ln -s ${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdd 37 ln -fs ${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdd
37} 38}
38 39
39python do_hddimg() { 40python do_hddimg() {
40 bb.build.exec_func('create_hdd_image', d) 41 bb.build.exec_func('create_hdd_image', d)
41} 42}
42 43
43python build_syslinux_cfg_append () {
44 import re
45
46 try:
47 cfgfile = file(cfile, 'r+')
48 except OSError:
49 raise bb.build.funcFailed('Unable to open %s' % (cfile))
50
51 f_content = cfgfile.read()
52 f_content = re.sub('tty0', 'ttyS0,115200', f_content)
53
54 cfgfile.seek(0)
55 cfgfile.write(f_content)
56 cfgfile.close()
57}
58
59addtask hddimg after do_bootdirectdisk before do_build 44addtask hddimg after do_bootdirectdisk before do_build
60do_hddimg[nostamp] = "1" 45do_hddimg[nostamp] = "1"