Added youki build and fromatting of scripts
This commit is contained in:
70
README.md
70
README.md
@@ -243,7 +243,9 @@ Services are migrated from existing `configs/zinit/` directory with proper initi
|
||||
### Phase 6: Packaging
|
||||
1. Create `initramfs.cpio.xz` with XZ compression
|
||||
2. Build kernel with embedded initramfs
|
||||
3. Generate `vmlinuz.efi`
|
||||
3. Generate `vmlinuz.efi` (default kernel)
|
||||
4. Generate versioned kernel: `vmlinuz-{VERSION}-{ZINIT_HASH}.efi`
|
||||
5. Optionally upload versioned kernel to S3 (set `UPLOAD_KERNEL=true`)
|
||||
|
||||
## Testing
|
||||
|
||||
@@ -357,6 +359,72 @@ function build_myapp() {
|
||||
}
|
||||
```
|
||||
|
||||
### S3 Uploads (Kernel & RFS Flists)
|
||||
|
||||
Automatically upload build artifacts to S3-compatible storage:
|
||||
|
||||
#### Configuration
|
||||
|
||||
Create `config/rfs.conf`:
|
||||
|
||||
```bash
|
||||
S3_ENDPOINT="https://s3.example.com:9000"
|
||||
S3_REGION="us-east-1"
|
||||
S3_BUCKET="zos"
|
||||
S3_PREFIX="flists/zosbuilder"
|
||||
S3_ACCESS_KEY="YOUR_ACCESS_KEY"
|
||||
S3_SECRET_KEY="YOUR_SECRET_KEY"
|
||||
```
|
||||
|
||||
#### Upload Kernel
|
||||
|
||||
```bash
|
||||
# Enable kernel upload
|
||||
UPLOAD_KERNEL=true ./scripts/build.sh
|
||||
|
||||
# Custom kernel subpath (default: kernel)
|
||||
KERNEL_SUBPATH=kernels UPLOAD_KERNEL=true ./scripts/build.sh
|
||||
```
|
||||
|
||||
**Uploaded files:**
|
||||
- `s3://{bucket}/{prefix}/kernel/vmlinuz-{VERSION}-{ZINIT_HASH}.efi` - Versioned kernel
|
||||
- `s3://{bucket}/{prefix}/kernel/kernels.txt` - Text index (one kernel per line)
|
||||
- `s3://{bucket}/{prefix}/kernel/kernels.json` - JSON index with metadata
|
||||
|
||||
**Index files:**
|
||||
The build automatically generates and uploads index files listing all available kernels in the S3 bucket. This enables:
|
||||
- Easy kernel selection in web UIs (dropdown menus)
|
||||
- Programmatic access without S3 API listing
|
||||
- Metadata like upload timestamp and kernel count (JSON format)
|
||||
|
||||
**JSON index format:**
|
||||
```json
|
||||
{
|
||||
"kernels": [
|
||||
"vmlinuz-6.12.44-Zero-OS-abc1234.efi",
|
||||
"vmlinuz-6.12.44-Zero-OS-def5678.efi"
|
||||
],
|
||||
"updated": "2025-01-04T12:00:00Z",
|
||||
"count": 2
|
||||
}
|
||||
```
|
||||
|
||||
#### Upload RFS Flists
|
||||
|
||||
```bash
|
||||
# Enable flist uploads
|
||||
UPLOAD_MANIFESTS=true ./scripts/build.sh
|
||||
```
|
||||
|
||||
Uploaded as:
|
||||
- `s3://{bucket}/{prefix}/manifests/modules-{VERSION}.fl`
|
||||
- `s3://{bucket}/{prefix}/manifests/firmware-{TAG}.fl`
|
||||
|
||||
#### Requirements
|
||||
|
||||
- MinIO Client (`mcli` or `mc`) must be installed
|
||||
- Valid S3 credentials in `config/rfs.conf`
|
||||
|
||||
### Container Builds
|
||||
|
||||
Build in isolated container:
|
||||
|
||||
Reference in New Issue
Block a user