Bug 8719

Summary: Ensure bootable images can be supported by wic for all reference BSPs
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: Scripts and ToolsAssignee: Ed Bartosh <eduard.bartosh>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: benjamin.esquivel, dvhart, kexin.hao, richard.purdie, ross.burton, sgw, tom.zanussi, yi.zhao
Version: 2.0   
Target Milestone: 2.3 M2   
Hardware: All   
OS: Multiple   
See Also: https://bugzilla.yoctoproject.org/show_bug.cgi?id=10593
Whiteboard: LET
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Paul Eggleton 2015-11-24 00:02:44 UTC
Ideally we want one standard method to produce bootable images for all of the reference boards, and wic ought to be the tool to support this. In practice what this will mean is ensuring README.hardware specifies wic as the primary way (if not the only way) to produce images for all of the supported devices.
Comment 1 Ed Bartosh 2015-11-24 09:30:28 UTC
Where can I find a list of reference BSPs?
Comment 2 Ross Burton 2015-11-24 10:14:50 UTC
The machines defined in meta-yocto-bsp.
Comment 3 Ed Bartosh 2016-02-02 13:16:58 UTC
I'm still puzzled with this bug. The description is too generic to me.

Does this bug means that I need to generate bootable images for all boards mentioned here http://git.yoctoproject.org/cgit.cgi/meta-yocto/tree/README.hardware and change image instructions in that file?
Comment 4 Paul Eggleton 2016-02-02 19:39:29 UTC
(In reply to comment #3)
> Does this bug means that I need to generate bootable images for all boards
> mentioned here
> http://git.yoctoproject.org/cgit.cgi/meta-yocto/tree/README.hardware and
> change image instructions in that file?

Yes, that's what I meant.
Comment 5 Ed Bartosh 2016-03-08 09:30:49 UTC
Moving to 2.2 as I will not have time for this in 2.1 time frame.
Comment 6 Ed Bartosh 2016-09-16 14:46:01 UTC
As a first step we'll try to make wic images produced by default for reference BSPs. I'm going to start with genericx86 and genericx86_64.
Comment 7 Ed Bartosh 2016-09-20 09:31:29 UTC
Enabled wic images for genericx86* BSPs: https://lists.yoctoproject.org/pipermail/poky/2016-September/010692.html
Comment 8 Ed Bartosh 2016-09-22 08:19:26 UTC
Enabled building of wic images for Beaglebone BSP: https://lists.yoctoproject.org/pipermail/poky/2016-September/010714.html

Successfully tested on BBB(Beaglebone Black).
Comment 9 Ed Bartosh 2016-09-22 09:08:32 UTC
So far I was able to test wic images on generic x86-64(my desktop) and Beaglebone hardware. There are 2 more reference BSPs mentioned in README.hardware that I don't have:
- Freescale MPC8315E-RDB
- Ubiquiti Networks EdgeRouter Lite

Can you suggest how should I proceed with this bug further without having access to the hardware?
Comment 10 Paul Eggleton 2016-09-22 09:17:43 UTC
Well, they have both of those in London AFAIK, obviously that's still some distance away but you could get one of the folks there to help. Aside from that README.hardware and the BSP should cover the basics of how these devices should be set up to boot.
Comment 11 Saul Wold 2016-09-29 15:38:30 UTC
We need to update the README.hardware file to remove the older Intel hardware and include at least the standard NUC and MB hardware, not sure if we should include any other hardware
Comment 12 Ed Bartosh 2016-10-10 08:53:33 UTC
Status update.

Set of wic fixes related to this bug were accepted recently to oe-core master:

Added support for PARTUUID for MBR partitions: http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127339.html

Updated kernel command line in wks files:
http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127361.html
http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127380.html
http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127418.html


There are also some patches under review:

 Usage of GPT table in all EFI .wks files: http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127419.html

 Produce EFI images for genericx86* machines: https://lists.yoctoproject.org/pipermail/poky/2016-October/010742.html

 Update for README.hardware: https://lists.yoctoproject.org/pipermail/poky/2016-October/010741.html
Comment 13 Ed Bartosh 2016-10-12 11:02:40 UTC
Updated instructions for Beaglebone: https://lists.yoctoproject.org/pipermail/poky/2016-October/010749.html

Please, review.
Comment 14 Ed Bartosh 2016-10-14 08:52:55 UTC
Edgerouter changes submitted for review
[poky] [PATCH] edgerouter.conf: produce wic images for Edgerouter
https://lists.yoctoproject.org/pipermail/poky/2016-October/010754.html

[poky] [PATCH] README.hardware: update Edgerouter section
https://lists.yoctoproject.org/pipermail/poky/2016-October/010755.html

Saul, thank you for the help!
Comment 15 Ed Bartosh 2016-10-28 11:55:08 UTC
Moving to 2.3M1 as there work for Freescale MPC8315E-RDB hardware is not done yet.
Comment 16 Ed Bartosh 2016-11-24 14:46:09 UTC
Configured wic image building for qemux86* machines: http://lists.openembedded.org/pipermail/openembedded-core/2016-November/129219.html
Comment 17 Ed Bartosh 2016-11-25 13:03:31 UTC
Status update:
 All BSPs except of Freescale MPC8315 have been successfully tested
 machine configurations have been updated to produce wic images by default for genericx86_64, genericx86, beaglebone and edgerouter machines

Freescale MPC8315 machine I've got seem to be dead. I couldn't get into u-boot prompt on serial console. The only way to get it back to live I know about is to cold flash it using CodeWarrior flasher. However, this requires to use USB TAP device similar to this one http://uk.farnell.com/freescale-semiconductor/cwh-ctp-base-he/kit-codeworrior-tap-usb-eth/dp/2279949?MER=sy-me-pd-mi-acce which I don't have.

I need a suggestion how to proceed further with this.
Comment 18 Ed Bartosh 2016-11-25 13:26:47 UTC
A bit more details about MPC 8315:

I've tried to reflash it with IC2 bootloader embedded into the device.

kermit u-boot transfers u-boot.bin successfully, but after that device u-boot failed to erase flash.
Here is what I see on the screen:

---

## DONE binary (kermit) download

Serial Download Done

Flash Init Done

detected flash



...... done

Flash not Erased

The write error has occured and flash cann't be written

---

I tried to flash recent and original u-boot.bin but the error was always the same.

I'd appreciate any help with this.
Comment 19 Ed Bartosh 2016-12-02 11:09:33 UTC
With a great help from Yi Zhao we had some progress with MPC8315. Now the process is much more simple, i.e. it doesn't require dealing with NFS root.
The work is still in progress, but almost finished. You can see details in bug 10593.
Comment 20 Ed Bartosh 2016-12-12 12:18:35 UTC
Moving to M2 as work on MPC8315 is still ongoing.
Comment 21 Ed Bartosh 2016-12-16 17:26:55 UTC
Added wks file for MPC8315: http://lists.openembedded.org/pipermail/openembedded-core/2016-December/130296.html
Comment 22 Ed Bartosh 2016-12-22 21:18:06 UTC
Added beaglebone.wks to meta-yocto-bsp/wic/ https://lists.yoctoproject.org/pipermail/poky/2016-December/010848.html
Comment 23 Ed Bartosh 2017-01-05 10:07:18 UTC
enabled producing wic images for MPC8315: https://lists.yoctoproject.org/pipermail/poky/2016-December/010847.html
Comment 24 Ed Bartosh 2017-01-09 18:58:20 UTC
Added edgerouter.wks to meta-yocto-bsp/wic/: https://lists.yoctoproject.org/pipermail/poky/2017-January/010860.html
Comment 25 Ed Bartosh 2017-01-09 20:42:37 UTC
Added flashing instructions for MPC8315E-RDB: https://lists.yoctoproject.org/pipermail/poky/2017-January/010861.html
Comment 26 Ed Bartosh 2017-01-09 21:59:26 UTC
Added genericx86.wks to meta-yocto-bsp/wic: https://lists.yoctoproject.org/pipermail/poky/2017-January/010863.html
Comment 27 Ed Bartosh 2017-01-10 18:25:58 UTC
All patches have been sent for review.
Comment 28 Ed Bartosh 2017-01-17 09:49:55 UTC
All changes have been accepted to poky master.