Merge lp:~sergiusens/goget-ubuntu-touch/byeByeFlashAssets into lp:goget-ubuntu-touch

Proposed by Sergio Schvezov
Status: Merged
Approved by: John Lenton
Approved revision: 206
Merged at revision: 196
Proposed branch: lp:~sergiusens/goget-ubuntu-touch/byeByeFlashAssets
Merge into: lp:goget-ubuntu-touch
Prerequisite: lp:~sergiusens/goget-ubuntu-touch/assetsGeneric
Diff against target: 67 lines (+2/-42)
1 file modified
diskimage/core_uboot.go (+2/-42)
To merge this branch: bzr merge lp:~sergiusens/goget-ubuntu-touch/byeByeFlashAssets
Reviewer Review Type Date Requested Status
John Lenton (community) Approve
Review via email: mp+262707@code.launchpad.net

Commit message

Remove legacy FlashAsset handling.

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) :
review: Approve
206. By Sergio Schvezov

Merged assetsGeneric into byeByeFlashAssets.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'diskimage/core_uboot.go'
--- diskimage/core_uboot.go 2015-06-24 12:57:49 +0000
+++ diskimage/core_uboot.go 2015-06-24 12:57:49 +0000
@@ -107,7 +107,6 @@
107 bootPath := filepath.Join(img.baseMount, string(bootDir))107 bootPath := filepath.Join(img.baseMount, string(bootDir))
108 bootAPath := filepath.Join(bootPath, "a")108 bootAPath := filepath.Join(bootPath, "a")
109 bootBPath := filepath.Join(bootPath, "b")109 bootBPath := filepath.Join(bootPath, "b")
110 bootuEnvPath := filepath.Join(bootPath, "uEnv.txt")
111 bootSnappySystemPath := filepath.Join(bootPath, "snappy-system.txt")110 bootSnappySystemPath := filepath.Join(bootPath, "snappy-system.txt")
112111
113 // origins112 // origins
@@ -154,16 +153,8 @@
154 return err153 return err
155 }154 }
156155
157 // if the oem package provides BootAssets use it directly, if not156 if err := setupBootAssetFiles(bootPath, oemRoot, img.oem.OEM.Hardware.BootAssets.Files); err != nil {
158 // provisionUenv for backwards compatibility.157 return err
159 if bootAssets := img.oem.OEM.Hardware.BootAssets; bootAssets != nil {
160 if err := setupBootAssetFiles(bootPath, oemRoot, bootAssets.Files); err != nil {
161 return err
162 }
163 } else {
164 if err := img.provisionUenv(bootuEnvPath); err != nil {
165 return err
166 }
167 }158 }
168159
169 // create /boot/uboot160 // create /boot/uboot
@@ -192,37 +183,6 @@
192 return nil183 return nil
193}184}
194185
195func (img CoreUBootImage) provisionUenv(bootuEnvPath string) error {
196 platform := img.oem.Platform()
197
198 if platform != "" {
199 printOut("No platform select, not searching for uEnv.txt")
200 return nil
201 }
202
203 flashAssetsPath := filepath.Join(img.baseMount, "flashtool-assets", platform)
204 uEnvPath := filepath.Join(flashAssetsPath, "uEnv.txt")
205
206 if _, err := os.Stat(flashAssetsPath); os.IsNotExist(err) {
207 printOut("No flash assets path available")
208 return nil
209 } else if err != nil {
210 return err
211 }
212
213 // if a uEnv.txt is provided in the flashtool-assets, use it
214 if _, err := os.Stat(uEnvPath); err == nil {
215 printOut("Adding uEnv.txt to", bootuEnvPath)
216 if err := sysutils.CopyFile(uEnvPath, bootuEnvPath); err != nil {
217 return err
218 }
219 } else {
220 printOut("Can't copy", uEnvPath, "to", bootuEnvPath, "due to:", err)
221 }
222
223 return nil
224}
225
226func (img CoreUBootImage) provisionDtbs(bootDtbPath string) error {186func (img CoreUBootImage) provisionDtbs(bootDtbPath string) error {
227 dtbsPath := filepath.Join(img.baseMount, img.hardware.Dtbs)187 dtbsPath := filepath.Join(img.baseMount, img.hardware.Dtbs)
228188

Subscribers

People subscribed via source and target branches