Creating a Pharo Kernel

"Image Definition"
seed := PharoSeed new
    fromDirectoryNamed: 'PharoKernel/source';
    processInitializer: [ :env | (env at: #HazelZygote) freshProcessQuitting ];
    buildSeed.
"Builder, do it!"
builder := HazelKernelBuilder new.
builder kernelSpec: seed.
builder buildKernel.
"Now the image file"
writer := HzImageWriter new.
writer format: HzCogImageFormat new.
seed appySubstitutionsOn: writer forEnvironment: builder bootstrapEnvironment.
writer imageFileName: 'kernel'.
writer writeImage: builder bootstrapEnvironment.