Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

linux-script.dhall 1005B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. let Genode = env:DHALL_GENODE
  2. let Prelude = Genode.Prelude
  3. let Args = { config : Genode.Init.Type, rom : Genode.BootModules.Type } : Type
  4. let RomEntry = Prelude.Map.Entry Text Genode.BootModules.ROM.Type
  5. let addLine =
  6. λ(e : RomEntry)
  7. → λ(script : Text)
  8. → merge
  9. { RomText =
  10. λ(rom : Text)
  11. → ''
  12. ${script}
  13. echo ${Text/show rom} > ${Text/show e.mapKey}
  14. ''
  15. , RomPath =
  16. λ(rom : Text)
  17. → ''
  18. ${script}
  19. ln -s ${Text/show rom} ${Text/show e.mapKey}
  20. ''
  21. }
  22. e.mapValue
  23. in λ(args : Args)
  24. → λ(out : Text)
  25. → { config = Genode.Init.render args.config
  26. , script =
  27. Prelude.List.fold
  28. RomEntry
  29. args.rom
  30. Text
  31. addLine
  32. ''
  33. #!/bin/sh
  34. ln -s ${out}/config config
  35. ''
  36. }