diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-05-11 22:55:31 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-05-11 22:55:31 +0300 |
| commit | 27ffa747f36aee9c1d5bbc61395a078238366070 (patch) | |
| tree | f37c544aaca6bebd1cc146d1eb002483c7cfd474 /scripts | |
| parent | 3109effe7297232e17c1792e63c3a9c7d129a4eb (diff) | |
| download | kmi-27ffa747f36aee9c1d5bbc61395a078238366070.tar.gz kmi-27ffa747f36aee9c1d5bbc61395a078238366070.zip | |
arbitrary load address and RAM base detection
+ Both kind of go hand in hand, made sense to do both at the same time.
Some parts feel slightly hacky, the loader works by placing everything
on the stack and avoiding global values. Still, seems to work?
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/gen-deps | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/gen-deps b/scripts/gen-deps index 674ead6..9a9ad6e 100755 --- a/scripts/gen-deps +++ b/scripts/gen-deps @@ -1,9 +1,9 @@ #!/bin/sh gencommon () { - lint="build/${s%.*}${1}.l" - dep="build/${s%.*}${1}.d" - obj="build/${s%.*}${1}" + lint="build/${path}/${s%.*}${1}.l" + dep="build/${path}/${s%.*}${1}.d" + obj="build/${path}/${s%.*}${1}" echo "${dep}:" >> deps.mk echo "-include ${dep}" >> deps.mk @@ -30,9 +30,11 @@ genrule () { case "${1}" in --kernel) kern=1 + path=kernel flags='$(KERN_FLAGS)' ;; --init) + path=init flags='$(INIT_FLAGS)' ;; esac @@ -48,7 +50,8 @@ case "${2}" in esac # create all subdirectories -mkdir -p $(echo "${3}" | xargs -n 1 dirname | uniq | sed 's|^|build/|g') +mkdir -p $(echo "${3}" | xargs -n 1 dirname | uniq | sed 's|^|build/init/|g') +mkdir -p $(echo "${3}" | xargs -n 1 dirname | uniq | sed 's|^|build/kernel/|g') for s in ${3} do |
