Merge lp:~manjo/ubuntu/trusty/flash-kernel/HPm800Server into lp:ubuntu/trusty/flash-kernel

Proposed by Manoj Iyer
Status: Merged
Merge reported by: Martin Pitt
Merged at revision: not available
Proposed branch: lp:~manjo/ubuntu/trusty/flash-kernel/HPm800Server
Merge into: lp:ubuntu/trusty/flash-kernel
Diff against target: 144 lines (+82/-1)
7 files modified
bootscript/bootscr.keystone2 (+31/-0)
db/all.db (+11/-0)
debian/changelog (+7/-0)
debian/dirs (+1/-0)
debian/flash-kernel.install (+1/-0)
functions (+30/-1)
ubootenv.d/default.conf (+1/-0)
To merge this branch: bzr merge lp:~manjo/ubuntu/trusty/flash-kernel/HPm800Server
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+217152@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

If you want this SRU'd to Trusty you'll need a corresponding SRU bug.

Revision history for this message
Martin Pitt (pitti) wrote :

Uploaded to utopic for now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'bootscript/bootscr.keystone2'
2--- bootscript/bootscr.keystone2 1970-01-01 00:00:00 +0000
3+++ bootscript/bootscr.keystone2 2014-04-24 22:37:12 +0000
4@@ -0,0 +1,31 @@
5+setenv interface scsi
6+echo Starting Ubuntu...
7+if test -n ${fs} && test -n ${interface} && test -n ${device} && test -n ${prefix}; then
8+ ${fs}load ${interface} ${device} ${kernel_addr_r} ${prefix}uImage
9+ ${fs}load ${interface} ${device} ${ramdisk_addr_r} ${prefix}uInitrd
10+ setenv bootargs ro quiet ${args_vendor} $rootfs
11+ bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
12+else
13+ echo boot information not recieved from u-boot, scanning for startup device
14+
15+ for i in ext2 ext4; do
16+ for j in 0 1; do
17+ for k in / /boot/; do
18+ setenv fs $i;
19+ setenv device $j;
20+ setenv prefix $k;
21+
22+ echo Scanning ${fs} ${interface} ${device} on prefix ${prefix} ...;
23+
24+ if ${fs}load ${interface} ${device} ${script_addr_r} ${prefix}boot.scr; then
25+ if iminfo ${script_addr_r}; then
26+ echo boot.scr found! Executing ...;
27+ source ${script_addr_r};
28+ fi;
29+ fi;
30+ done;
31+ done;
32+ done;
33+fi;
34+
35+echo No boot device found.;
36
37=== modified file 'db/all.db'
38--- db/all.db 2014-04-10 04:15:37 +0000
39+++ db/all.db 2014-04-24 22:37:12 +0000
40@@ -142,6 +142,17 @@
41 Boot-Initrd-Path: /boot/uInitrd
42 Boot-Script-Path: /boot/boot.scr
43
44+Machine: HP ProLiant m800 Server Cartridge
45+Kernel-Flavors: keystone
46+U-Boot-Kernel-Address: 0x80008000
47+U-Boot-Initrd-Address: 0x0
48+U-Boot-Script-Address: 0x0
49+U-Boot-Script-Name: bootscr.keystone2
50+Required-Packages: u-boot-tools
51+Boot-Kernel-Path: /boot/uImage
52+Boot-Initrd-Path: /boot/uInitrd
53+Boot-Script-Path: /boot/boot.scr
54+
55 Machine: HP t5325 Thin Client
56 Kernel-Flavors: kirkwood
57 Machine-Id: 2846
58
59=== modified file 'debian/changelog'
60--- debian/changelog 2014-04-10 04:15:37 +0000
61+++ debian/changelog 2014-04-24 22:37:12 +0000
62@@ -1,3 +1,10 @@
63+flash-kernel (3.0~rc.4ubuntu50) trusty; urgency=medium
64+
65+ * Added support for user defined uboot environment variables
66+ * Added support for HP ProLiant m800 Server Cartridge
67+
68+ -- Manoj Iyer <manoj.iyer@canonical.com> Thu, 24 Apr 2014 17:34:28 -0500
69+
70 flash-kernel (3.0~rc.4ubuntu49) trusty; urgency=medium
71
72 * db/all.db: add dummy entries as noops when running on VMs (LP: #1298070)
73
74=== modified file 'debian/dirs'
75--- debian/dirs 2006-09-25 18:06:07 +0000
76+++ debian/dirs 2014-04-24 22:37:12 +0000
77@@ -1,1 +1,2 @@
78 usr/sbin
79+etc/flash-kernel/ubootenv.d
80
81=== modified file 'debian/flash-kernel.install'
82--- debian/flash-kernel.install 2012-03-11 14:51:15 +0000
83+++ debian/flash-kernel.install 2014-04-24 22:37:12 +0000
84@@ -6,3 +6,4 @@
85 bootscript usr/share/flash-kernel
86 db usr/share/flash-kernel
87 functions usr/share/flash-kernel
88+ubootenv.d usr/share/flash-kernel
89
90=== modified file 'functions'
91--- functions 2013-12-23 14:51:32 +0000
92+++ functions 2014-04-24 22:37:12 +0000
93@@ -187,6 +187,34 @@
94 } >"$output"
95 }
96
97+append_ubootvars() {
98+ local input="$1"
99+ local output="$2"
100+ local default_conf_file="/usr/share/flash-kernel/ubootenv.d/default.conf"
101+ local user_conf_file="/etc/flash-kernel/ubootenv.d/"
102+ local tmp_conf_file="$(dirname "$2")/tmp_conf_file"
103+
104+ if [ -r "$default_conf_file" ]; then
105+ sed -e "/^#/d" < "$default_conf_file" > "$output"
106+
107+ for files in "$(find $user_conf_file -type f)"; do
108+ if [ -r "$files" ]; then
109+ sed -e "/^#/d" -e "/^$/d" < "$files" >> "$tmp_conf_file"
110+ fi
111+ done
112+
113+ if [ -s "$tmp_conf_file" ]; then
114+ while read -r line ; do
115+ uservar="$(echo $line | awk '{print $2}')"
116+ sed -i "/.*$uservar.*/c$line" "$output"
117+ grep -q "$uservar" "$output" || echo "$line" >> "$output"
118+ done < "$tmp_conf_file"
119+ fi
120+ fi
121+ cat "$input" >> "$output"
122+}
123+
124+
125 append_dtb() {
126 local kernel="$1"
127 local dtb="$2"
128@@ -574,7 +602,8 @@
129 case $usname in
130 bootscr*)
131 boot_script_path="$boot_mnt_dir/$boot_script_path"
132- boot_script="$BOOTSCRIPTS_DIR/$usname"
133+ append_ubootvars "$BOOTSCRIPTS_DIR/$usname" "$tmpdir/bootscript"
134+ boot_script="$tmpdir/bootscript"
135 mkimage_script "$usaddr" "boot script" "$boot_script" \
136 "$tmpdir/boot.scr"
137 boot_script="$tmpdir/boot.scr"
138
139=== added directory 'ubootenv.d'
140=== added file 'ubootenv.d/default.conf'
141--- ubootenv.d/default.conf 1970-01-01 00:00:00 +0000
142+++ ubootenv.d/default.conf 2014-04-24 22:37:12 +0000
143@@ -0,0 +1,1 @@
144+# Enter default uboot environment variables here

Subscribers

People subscribed via source and target branches

to all changes: