Merge lp:~paulliu/ubuntu/precise/flash-kernel/mx6 into lp:ubuntu/precise/flash-kernel

Proposed by Ying-Chun Liu
Status: Merged
Merged at revision: 418
Proposed branch: lp:~paulliu/ubuntu/precise/flash-kernel/mx6
Merge into: lp:ubuntu/precise/flash-kernel
Diff against target: 66 lines (+35/-0)
1 file modified
flash-kernel (+35/-0)
To merge this branch: bzr merge lp:~paulliu/ubuntu/precise/flash-kernel/mx6
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+88388@code.launchpad.net

Description of the change

Hi.

I've add support for i.MX6 and the devicetree support for all imx boards.
Please review this patch.

Thanks.

To post a comment you must log in.
Colin Watson (cjwatson) wrote :

Looks good to me, thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'flash-kernel'
2--- flash-kernel 2011-09-28 15:32:57 +0000
3+++ flash-kernel 2012-01-12 15:01:25 +0000
4@@ -384,6 +384,33 @@
5 rm -f "$tmp"
6 }
7
8+imx_update_dtb() {
9+ model=""
10+ if [ -e /proc/device-tree/model ]; then
11+ model=$(cat /proc/device-tree/model)
12+ fi
13+ dtbvers=$(echo "$kfile" | sed -e 's/[^-]*-//')
14+ case "$model" in
15+ "Freescale i.MX6 Quad SABRE Lite Board")
16+ dtbfile=/boot/dt-$dtbvers/imx6q-sabrelite.dtb
17+ ;;
18+ "Freescale i.MX6 Quad Armadillo2 Board")
19+ dtbfile=/boot/dt-$dtbvers/imx6q-arm2.dtb
20+ ;;
21+ *)
22+ dtbfile=""
23+ ;;
24+ esac
25+ if [ -e "$dtbfile" ]; then
26+ if [ -e $TMPMOUNT/board.dtb ]; then
27+ mv $TMPMOUNT/board.dtb $TMPMOUNT/board.dtb.bak
28+ fi
29+ printf "Generating device tree dtb... " >&2
30+ cp "$dtbfile" $TMPMOUNT/board.dtb
31+ echo "done." >&2
32+ fi
33+}
34+
35 imx_flash_kernel() {
36 echo "Using u-boot partition: ${UBOOT_PART}" >&2
37 TMPMOUNT=$(mktemp -d)
38@@ -421,6 +448,8 @@
39 echo "done." >&2
40 fi
41
42+ imx_update_dtb
43+
44 umount -l $TMPMOUNT
45 rmdir $TMPMOUNT
46 }
47@@ -455,6 +484,7 @@
48 "D-Link DNS-323") exit 0 ;;
49 "Freescale MX51 Babbage Board") exit 0 ;;
50 "Freescale MX53 LOCO Board") exit 0 ;;
51+ "Freescale i.MX6 Quad (Device Tree)") exit 0 ;;
52 "GLAN Tank") exit 0 ;;
53 "Genesi Efika MX (Smartbook)") exit 0 ;;
54 "Genesi Efika MX (Smarttop)") exit 0 ;;
55@@ -658,6 +688,11 @@
56 IMX_KERNEL_ADDR=0x70008000
57 imx_flash_kernel
58 ;;
59+ "Freescale i.MX6 Quad (Device Tree)")
60+ check_subarch "mx6"
61+ IMX_KERNEL_ADDR=0x10008000
62+ imx_flash_kernel
63+ ;;
64 "GLAN Tank")
65 rm -f /boot/initrd /boot/zImage
66 ln -s "$(basename "$ifile")" /boot/initrd

Subscribers

People subscribed via source and target branches

to all changes: