Skip to content

Commit

Permalink
Support initrd for 'check' target
Browse files Browse the repository at this point in the history
  • Loading branch information
jserv committed Jul 29, 2023
1 parent 61cea98 commit c2773ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ ext4.img:
$(Q)dd if=/dev/zero of=$@ bs=4k count=600
$(Q)$(MKFS_EXT4) -F $@

check: $(BIN) minimal.dtb $(KERNEL_DATA) $(DISKIMG_FILE)
check: $(BIN) minimal.dtb $(KERNEL_DATA) $(INITRD_DATA) $(DISKIMG_FILE)
@$(call notice, Ready to launch Linux kernel. Please be patient.)
$(Q)./$(BIN) -k $(KERNEL_DATA) -b minimal.dtb -i rootfs.cpio $(OPTS)
$(Q)./$(BIN) -k $(KERNEL_DATA) -b minimal.dtb -i $(INITRD_DATA) $(OPTS)

build-image:
scripts/build-image.sh
Expand All @@ -92,7 +92,7 @@ clean:

distclean: clean
$(Q)$(RM) minimal.dtb
$(Q)$(RM) Image
$(Q)$(RM) Image rootfs.cpio
$(Q)$(RM) ext4.img

-include $(deps)
9 changes: 7 additions & 2 deletions mk/external.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
# kernel
KERNEL_DATA_URL = https://github.com/jserv/semu/raw/blob/Image.bz2
KERNEL_DATA = Image
KERNEL_DATA_SHA1 = 2583315c6fe4591344fdba4f318a695553b00b20
KERNEL_DATA_SHA1 = 36d770efe97beac85204f1f50f8de81e3e529d84

# initrd
INITRD_DATA_URL = https://github.com/jserv/semu/raw/blob/rootfs.cpio.bz2
INITRD_DATA = rootfs.cpio
INITRD_DATA_SHA1 = fad749d0a9eb33178525f961d6b82e7c0ce917a7

define download
$($(T)_DATA):
Expand All @@ -16,5 +21,5 @@ $($(T)_DATA):
$(Q)bunzip2 $$@.bz2
endef

EXTERNAL_DATA = KERNEL
EXTERNAL_DATA = KERNEL INITRD
$(foreach T,$(EXTERNAL_DATA),$(eval $(download)))

0 comments on commit c2773ea

Please sign in to comment.